Skip to contentSkip to conversation

powercap: intel_rapl: Add support for RAPTORLAKE_P

PATCH In review [email protected] 5 participants 11 messages Jun 1, 2022 – Jul 5, 2022 Power management core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powercap: intel_rapl: Add support for RAPTORLAKE_P

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +1 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {
 	X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,		&rapl_defaults_core),
 	X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N,		&rapl_defaults_core),
 	X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,		&rapl_defaults_core),
+	X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P,        &rapl_defaults_core),
 	X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X,	&rapl_defaults_spr_server),
 	X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD,		&rapl_defaults_core),
 
Signature · 1 line
2.17.1
#1 lore raw

Rui, Srinivas, should I take this one?

Quoted 27 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +1 -1
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,         &rapl_defaults_core),
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N,         &rapl_defaults_core),
        X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,          &rapl_defaults_core),
+       X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P,        &rapl_defaults_core),
        X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X,    &rapl_defaults_spr_server),
        X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD,           &rapl_defaults_core),
 
--

2.17.1

#2 lore raw
Quoted 2 lines · Rafael J. Wysocki

Rui, Srinivas, should I take this one?

Yes.

Not sure if the RAPL-MMIO driver is loaded on this system.

George,

What is the output of
lspci -vv -s :0:4.0

If the device id is 0xA71D, then we have this change in the upstream kernel. If not then we need to submit patch for that.

Thanks,
Srinivas

Quoted 37 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:
Quoted 36 lines

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +

 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[]
 __initconst = {
         X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,        
 &rapl_defaults_core),
         X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N,        
 &rapl_defaults_core),
         X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,         

&rapl_defaults_core),
+       X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl_defaults_core), X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl_defaults_spr_server), X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl_defaults_core),

--
2.17.1

#3 lore raw
Quoted 9 lines · srinivas pandruvada
Quoted 2 lines · Rafael J. Wysocki

Rui, Srinivas, should I take this one?

Yes.

Not sure if the RAPL-MMIO driver is loaded on this system.

George,

Quoted 9 lines

What is the output of
lspci -vv -s :0:4.0

If the device id is 0xA71D, then we have this change in the upstream kernel. If not then we need to submit patch for that.

Thanks,
Srinivas

Thanks for the quick review.

the device id is 0xA71D is not avaible without this patch. But when add it i can see the ID. Below are the outputs

Output from a kernel without this patch:
-------------------------------------
localhost ~ # lspci -vv -s :0:4.0
00:04.0 Signal processing controller: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant (rev 03)
Subsystem: Intel Corporation Device 7270
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-

Output with this patch added:
----------------------------------------
localhost ~ # lspci -vv -s :0:4.0
00:04.0 Signal processing controller: Intel Corporation Device a71d

Quoted 36 lines
Quoted 36 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:
Quoted 35 lines

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[]
 __initconst = {
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,        
 &rapl_defaults_core),
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N,        
 &rapl_defaults_core),
        X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,         

&rapl_defaults_core),
+ X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P,
&rapl_defaults_core),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X,
&rapl_defaults_spr_server),
X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD,
&rapl_defaults_core),

--
2.17.1

#4 lore raw
Quoted 16 lines · George D
Quoted 15 lines · srinivas pandruvada
Quoted 2 lines · Rafael J. Wysocki

Rui, Srinivas, should I take this one?

Yes.

Not sure if the RAPL-MMIO driver is loaded on this system.

George,

What is the output of
lspci -vv -s :0:4.0

If the device id is 0xA71D, then we have this change in the upstream kernel. If not then we need to submit patch for that.

Quoted 6 lines
Quoted 3 lines

Thanks,
Srinivas

Thanks for the quick review.

the device id is 0xA71D

We have upstream patch for this ID. So we are good.

Thanks,
Srinivas

Quoted 53 lines

is not avaible without this patch. But when
add it i can see the ID. Below are the outputs

Output from a kernel without this patch:
-------------------------------------
localhost ~ # lspci -vv -s :0:4.0
00:04.0 Signal processing controller: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant (rev 03)
        Subsystem: Intel Corporation Device 7270
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-

Output with this patch added:
----------------------------------------
localhost ~ # lspci -vv -s :0:4.0
00:04.0 Signal processing controller: Intel Corporation Device a71d

Quoted 37 lines
Quoted 37 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:
Quoted 36 lines

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the
Intel

RAPL power capping driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +

 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[]
 __initconst = {
         X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,        
 &rapl_defaults_core),
         X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N,        
 &rapl_defaults_core),
         X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,         

&rapl_defaults_core),
+       X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl_defaults_core), X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl_defaults_spr_server), X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl_defaults_core),

--
2.17.1

#5 lore raw
In reply to Rafael J. Wysocki
Quoted 1 line · Rafael J. Wysocki

Rui, Srinivas, should I take this one?

Sorry that I missed this one.

George,

Have this patch been tested yet?
I have the same patch internally, it should work but I haven't got chance to test it yet.

thanks,
rui

Quoted 38 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:
Quoted 36 lines

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[]
 __initconst = {
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,         &rapl_defau
 lts_core),
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N,         &rapl_defau
 lts_core),
        X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE,          &rapl_defau

lts_core),
+ X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl_defau
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl_defau
lts_spr_server),
X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl_defau
lts_core),

--
2.17.1

Acked-by
#6 lore raw
Quoted 5 lines · Zhang Rui
Quoted 1 line · Rafael J. Wysocki

Rui, Srinivas, should I take this one?

Sorry that I missed this one.

Quoted 19 lines

George,

Have this patch been tested yet?
I have the same patch internally, it should work but I haven't got chance to test it yet.

thanks,
rui

Quoted 11 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:
Quoted 9 lines

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

As long as you have tested it,

-rui

Quoted 35 lines
Quoted 33 lines
Quoted 33 lines
---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[]
 __initconst = {
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,         &rapl_def

au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &rapl_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &rapl_def
au
lts_core),
+ X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl_def
au
lts_spr_server),
X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl_def
au
lts_core),

--
2.17.1

#7 lore raw
In reply to Zhang Rui
Quoted 8 lines · Zhang Rui
Quoted 1 line · Rafael J. Wysocki

Rui, Srinivas, should I take this one?

Sorry that I missed this one.

George,

Have this patch been tested yet?

yes. This is tested on RPL SOC. Thanks

Quoted 47 lines

I have the same patch internally, it should work but I haven't got chance to test it yet.

thanks,
rui

Quoted 42 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:
Quoted 41 lines

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[]
 __initconst = {
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,         &rapl_def

au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &rapl_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &rapl_def
au
lts_core),
+ X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl_def
au
lts_spr_server),
X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl_def
au
lts_core),

--
2.17.1

#8 lore raw
Quoted 12 lines

-----Original Message-----
From: Sworo, George D <[email protected]>
Sent: Friday, June 10, 2022 9:02 AM
To: Zhang, Rui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH] powercap: intel_rapl: Add support for RAPTORLAKE_P

Quoted 1 line · Zhang Rui

On Thu, 2022-06-09 at 20:55 +0200, Rafael J. Wysocki wrote:

Quoted 22 lines
Quoted 7 lines
Quoted 1 line

Rui, Srinivas, should I take this one?

Sorry that I missed this one.

George,

Have this patch been tested yet?

yes. This is tested on RPL SOC. Thanks

Quoted 14 lines

I have the same patch internally, it should work but I haven't got chance to test it yet.

thanks,
rui

Quoted 9 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:
Quoted 8 lines

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the Intel

RAPL power capping driver.

Hi George,
Thank you for this patch.
I have tested this on Raptor Lake system and it works.

Thanks,
Sumeet.

Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id rapl_ids[]
 __initconst = {
        X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L,         &rapl_def

au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &rapl_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &rapl_def
au
lts_core),
+ X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl_def
au
lts_spr_server),
X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl_def
au
lts_core),

--
2.17.1

#9 lore raw
Quoted 38 lines · Sumeet R
Quoted 12 lines

-----Original Message-----
From: Sworo, George D <[email protected]>
Sent: Friday, June 10, 2022 9:02 AM
To: Zhang, Rui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH] powercap: intel_rapl: Add support for RAPTORLAKE_P

Quoted 1 line · Zhang Rui

On Thu, 2022-06-09 at 20:55 +0200, Rafael J. Wysocki wrote:

Quoted 25 lines
Quoted 7 lines
Quoted 1 line

Rui, Srinivas, should I take this one?

Sorry that I missed this one.

George,

Have this patch been tested yet?

yes. This is tested on RPL SOC. Thanks

Quoted 17 lines

I have the same patch internally, it should work but I haven't got
chance to test it yet.

thanks,
rui

Quoted 11 lines
Quoted 9 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the
Intel

RAPL power capping driver.

Quoted 9 lines

Hi George,
Thank you for this patch.
I have tested this on Raptor Lake system and it works.

Thanks,
Sumeet.

Thanks Sumeet for confirming!
@Rafael, let me know if you have further comments

Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id

rapl_ids[]
__initconst = {
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &rapl
_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &rapl
_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &rapl
_def
au
lts_core),
+ X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl
_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl
_def
au
lts_spr_server),
X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl
_def
au
lts_core),

--
2.17.1

#10 lore raw
Quoted 44 lines · George D
Quoted 42 lines · Sumeet R
Quoted 12 lines

-----Original Message-----
From: Sworo, George D <[email protected]>
Sent: Friday, June 10, 2022 9:02 AM
To: Zhang, Rui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [PATCH] powercap: intel_rapl: Add support for RAPTORLAKE_P

Quoted 1 line · Zhang Rui

On Thu, 2022-06-09 at 20:55 +0200, Rafael J. Wysocki wrote:

Quoted 25 lines
Quoted 7 lines
Quoted 1 line

Rui, Srinivas, should I take this one?

Sorry that I missed this one.

George,

Have this patch been tested yet?

yes. This is tested on RPL SOC. Thanks

Quoted 17 lines

I have the same patch internally, it should work but I haven't got
chance to test it yet.

thanks,
rui

Quoted 11 lines
Quoted 9 lines · On Wed, Jun 1, 2022 at 9:22 PM <[email protected]> wrote:

From: George D Sworo <[email protected]>

Add RAPTORLAKE_P to the list of supported processor model in the
Intel

RAPL power capping driver.

Hi George,
Thank you for this patch.
I have tested this on Raptor Lake system and it works.

Quoted 7 lines
Quoted 5 lines

Thanks,
Sumeet.

Thanks Sumeet for confirming!
@Rafael, let me know if you have further comments

I've applied the patch as 5.20 material with a couple of minor edits in the changelog.

Thanks!

Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +0 -0
index a9c99d9e8b42..21d624f9f5fb 100644
@@ -1109,6 +1109,7 @@ static const struct x86_cpu_id

rapl_ids[]
__initconst = {
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, &rapl
_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &rapl
_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &rapl
_def
au
lts_core),
+ X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &rapl
_def
au
lts_core),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &rapl
_def
au
lts_spr_server),
X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, &rapl
_def
au
lts_core),

--
2.17.1