linux-next: manual merge of the tip tree with the pm tree
Subsystems (2)
Hi all,
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.c
between commit:
608a76b65288 ("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")
from the pm tree and commit:
d7484babd2c4 ("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")
from the tip tree.
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 13 lines · On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.cbetween commit:
608a76b65288("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")from the pm tree and commit:
d7484babd2c4("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")
Quoted 8 lines
from the tip tree.
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Actually it needed the fix up below.
Signature · 44 lines
Cheers,
Stephen Rothwell
diff --cc drivers/cpufreq/amd-pstate.c
index d96bb3e202ee,66fdc74f13ef..0d4c0de89a00
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@@ -389,10 -389,9 +389,10 @@@ static inline int amd_pstate_cppc_enabl
static int msr_init_perf(struct amd_cpudata *cpudata)
{
union perf_cached perf = READ_ONCE(cpudata->perf);
- u64 cap1, numerator;
+ u64 cap1, numerator, cppc_req;
+ u8 min_perf;
- int ret = rdmsrl_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1,
+ int ret = rdmsrq_safe_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1,
&cap1);
if (ret)
return ret;
@@@ -401,22 -400,6 +401,22 @@@
if (ret)
return ret;
- ret = rdmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, &cppc_req);
++ ret = rdmsrq_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, &cppc_req);
+ if (ret)
+ return ret;
+
+ WRITE_ONCE(cpudata->cppc_req_cached, cppc_req);
+ min_perf = FIELD_GET(AMD_CPPC_MIN_PERF_MASK, cppc_req);
+
+ /*
+ * Clear out the min_perf part to check if the rest of the MSR is 0, if yes, this is an
+ * indication that the min_perf value is the one specified through the BIOS option
+ */
+ cppc_req &= ~(AMD_CPPC_MIN_PERF_MASK);
+
+ if (!cppc_req)
+ perf.bios_min_perf = min_perf;
+
perf.highest_perf = numerator;
perf.max_limit_perf = numerator;
perf.min_limit_perf = FIELD_GET(AMD_CPPC_LOWEST_PERF_MASK, cap1);Quoted 18 lines · Stephen Rothwell
Hi all,
Quoted 15 lines · On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.cbetween commit:
608a76b65288("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")from the pm tree and commit:
d7484babd2c4 ("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")from the tip tree.
Quoted 9 lines
Quoted 6 lines
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Actually it needed the fix up below.
Ingo,
Can you guys make an immutable branch for Rafael to merge into linux-pm for this change?
I can redo the amd-pstate merge based on that immutable branch.
Rafael,
If you want to just carry the fixup that's fine too. Just LMK what you need.
Quoted 34 lines · Mario Limonciello
Quoted 18 lines · Stephen Rothwell
Hi all,
Quoted 15 lines · On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.cbetween commit:
608a76b65288("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")from the pm tree and commit:
d7484babd2c4 ("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")from the tip tree.
Quoted 9 lines
Quoted 6 lines
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Actually it needed the fix up below.
Ingo,
Can you guys make an immutable branch for Rafael to merge into linux-pm for this change?
Quoted 6 lines
I can redo the amd-pstate merge based on that immutable branch.
Rafael,
If you want to just carry the fixup that's fine too. Just LMK what you need.
If it's only about rdmsrl_on_cpu(), how about the simple compatibility wrapper below instead, applied to the x86 tree?
Can merge it into -tip and tomorrow's -next would resolve this without any changes or merges done to the PM tree.
Thanks,
Ingo
===============>
arch/x86/include/asm/msr.h | 1 + 1 file changed, 1 insertion(+)
arch/x86/include/asm/msr.h +1 -0
@@ -329,6 +329,7 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])/* Compatibility wrappers: */ #define rdmsrl (msr, val) rdmsrq(msr, val)#define wrmsrl (msr, val) wrmsrq(msr, val) +#define rdmsrl_on_cpu (cpu, msr, q) rdmsrq_on_cpu(cpu, msr, q)#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */
Quoted 41 lines · Ingo Molnar
Quoted 38 lines · Mario Limonciello
Quoted 18 lines · Stephen Rothwell
Hi all,
Quoted 15 lines · On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.cbetween commit:
608a76b65288("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")from the pm tree and commit:
d7484babd2c4 ("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")from the tip tree.
Quoted 9 lines
Quoted 6 lines
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Actually it needed the fix up below.
Ingo,
Can you guys make an immutable branch for Rafael to merge into linux-pm for this change?
I can redo the amd-pstate merge based on that immutable branch.
Rafael,
Quoted 8 lines
Quoted 2 lines
If you want to just carry the fixup that's fine too. Just LMK what you need.
If it's only about
rdmsrl_on_cpu(), how about the simple compatibility wrapper below instead, applied to the x86 tree?Can merge it into -tip and tomorrow's -next would resolve this without any changes or merges done to the PM tree.
Sounds good to me.
Quoted 21 lines
Thanks,
Ingo
===============>
arch/x86/include/asm/msr.h | 1 + 1 file changed, 1 insertion(+)arch/x86/include/asm/msr.h +1
-0@@ -329,6 +329,7 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])/* Compatibility wrappers: */ #define rdmsrl (msr, val) rdmsrq(msr, val)#define wrmsrl (msr, val) wrmsrq(msr, val) +#define rdmsrl_on_cpu (cpu, msr, q) rdmsrq_on_cpu(cpu, msr, q)#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */
PATCH 1/1 x86/msr: Add rdmsrl_on_cpu() compatibility wrapper
Quoted 7 lines · Mario Limonciello
Quoted 5 lines
If it's only about
rdmsrl_on_cpu(), how about the simple compatibility wrapper below instead, applied to the x86 tree?Can merge it into -tip and tomorrow's -next would resolve this without any changes or merges done to the PM tree.
Sounds good to me.
Great - I've added the patch below to the x86 tree, tomorrow's -next should have this resolved in theory.
Thanks,
Ingo
=======================>
From: Ingo Molnar <[email protected]>
Date: Thu, 15 May 2025 17:49:16 +0200
Subject: [PATCH] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper
Add a simple rdmsrl_on_cpu() compatibility wrapper for rdmsrq_on_cpu(), to make life in -next easier, where the PM tree recently grew more uses of the old API.
--- arch/x86/include/asm/msr.h | 1 + 1 file changed, 1 insertion(+)
arch/x86/include/asm/msr.h +1 -0
@@ -329,6 +329,7 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])/* Compatibility wrappers: */ #define rdmsrl (msr, val) rdmsrq(msr, val)#define wrmsrl (msr, val) wrmsrq(msr, val) +#define rdmsrl_on_cpu (cpu, msr, q) rdmsrq_on_cpu(cpu, msr, q)#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */
Hi all,
Quoted 58 lines · On Mon, 12 May 2025 15:23:26 +1000 Stephen Rothwell <[email protected]>…
Quoted 13 lines · On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.cbetween commit:
608a76b65288("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")from the pm tree and commit:
d7484babd2c4("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")Quoted 8 lines
from the tip tree.
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Actually it needed the fix up below.
drivers/cpufreq/amd-pstate.c +2
-2@@@ -389,10 -389,9 +389,10 @@@ static inline int amd_pstate_cppc_enablstatic int msr_init_perf (struct amd_cpudata *cpudata) {union perf_cached perf =READ_ONCE (cpudata->perf); - u64 cap1, numerator; + u64 cap1, numerator, cppc_req; + u8 min_perf; -int ret =rdmsrl_safe_on_cpu (cpudata->cpu,MSR_AMD_CPPC_CAP1 , +int ret =rdmsrq_safe_on_cpu (cpudata->cpu,MSR_AMD_CPPC_CAP1 , &cap1);if (ret)return ret;@@@ -401,22 -400,6 +401,22 @@@if (ret)return ret; - ret =rdmsrl_on_cpu (cpudata->cpu,MSR_AMD_CPPC_REQ , &cppc_req); ++ ret =rdmsrq_on_cpu (cpudata->cpu,MSR_AMD_CPPC_REQ , &cppc_req); + if (ret) + return ret; + +WRITE_ONCE (cpudata->cppc_req_cached, cppc_req); + min_perf =FIELD_GET (AMD_CPPC_MIN_PERF_MASK , cppc_req); + +/* + * Clear out the min_perf part to check if the rest of the MSR is 0, if yes, this is an
drivers/cpufreq/amd-pstate.c
Quoted 10 lines
drivers/cpufreq/amd-pstate.c +0
-0+ * indication that the min_perf value is the one specified through the BIOS option + */ + cppc_req &= ~(AMD_CPPC_MIN_PERF_MASK ); + + if (!cppc_req) + perf.bios_min_perf = min_perf; + perf.highest_perf = numerator; perf.max_limit_perf = numerator; perf.min_limit_perf =FIELD_GET (AMD_CPPC_LOWEST_PERF_MASK , cap1);
This is now a conflict between the pm tree and Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 65 lines · Stephen Rothwell
Hi all,
Quoted 62 lines · On Mon, 12 May 2025 15:23:26 +1000 Stephen Rothwell <[email protected]>…
Quoted 13 lines · On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.cbetween commit:
608a76b65288("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")from the pm tree and commit:
d7484babd2c4 ("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")Quoted 8 lines
from the tip tree.
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Actually it needed the fix up below.
drivers/cpufreq/amd-pstate.c +2
-2@@@ -389,10 -389,9 +389,10 @@@ static inline int amd_pstate_cppc_enablstatic int msr_init_perf (struct amd_cpudata *cpudata) {union perf_cached perf =READ_ONCE (cpudata->perf); - u64 cap1, numerator; + u64 cap1, numerator, cppc_req; + u8 min_perf; -int ret =rdmsrl_safe_on_cpu (cpudata->cpu,MSR_AMD_CPPC_CAP1 , +int ret =rdmsrq_safe_on_cpu (cpudata->cpu,MSR_AMD_CPPC_CAP1 , &cap1);if (ret)return ret;@@@ -401,22 -400,6 +401,22 @@@if (ret)return ret; - ret =rdmsrl_on_cpu (cpudata->cpu,MSR_AMD_CPPC_REQ , &cppc_req); ++ ret =rdmsrq_on_cpu (cpudata->cpu,MSR_AMD_CPPC_REQ , &cppc_req); + if (ret) + return ret; + +WRITE_ONCE (cpudata->cppc_req_cached, cppc_req); + min_perf =FIELD_GET (AMD_CPPC_MIN_PERF_MASK , cppc_req); + +/* + * Clear out the min_perf part to check if the rest of the MSR is 0, if yes, this is an + * indication that the min_perf value is the one specified through the BIOS option + */ + cppc_req &= ~(AMD_CPPC_MIN_PERF_MASK ); +
Quoted 9 lines
Quoted 6 lines
+ if (!cppc_req) + perf.bios_min_perf = min_perf; + perf.highest_perf = numerator; perf.max_limit_perf = numerator; perf.min_limit_perf = FIELD_GET(AMD_CPPC_LOWEST_PERF_MASK, cap1);This is now a conflict between the pm tree and Linus' tree.
I thought that Ingo added an extra #define for compatibility?
Hi Mario,
Quoted 76 lines · Mario
Quoted 64 lines · Stephen Rothwell
Quoted 62 lines · On Mon, 12 May 2025 15:23:26 +1000 Stephen Rothwell <[email protected]>…
Quoted 13 lines · On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the tip tree got a conflict in:
drivers/cpufreq/amd-pstate.cbetween commit:
608a76b65288("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")from the pm tree and commit:
d7484babd2c4 ("x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'")Quoted 8 lines
from the tip tree.
I fixed it up (the former removed a line updated by the latter) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Actually it needed the fix up below.
drivers/cpufreq/amd-pstate.c +2
-2@@@ -389,10 -389,9 +389,10 @@@ static inline int amd_pstate_cppc_enablstatic int msr_init_perf (struct amd_cpudata *cpudata) {union perf_cached perf =READ_ONCE (cpudata->perf); - u64 cap1, numerator; + u64 cap1, numerator, cppc_req; + u8 min_perf; -int ret =rdmsrl_safe_on_cpu (cpudata->cpu,MSR_AMD_CPPC_CAP1 , +int ret =rdmsrq_safe_on_cpu (cpudata->cpu,MSR_AMD_CPPC_CAP1 , &cap1);if (ret)return ret;@@@ -401,22 -400,6 +401,22 @@@if (ret)return ret; - ret =rdmsrl_on_cpu (cpudata->cpu,MSR_AMD_CPPC_REQ , &cppc_req); ++ ret =rdmsrq_on_cpu (cpudata->cpu,MSR_AMD_CPPC_REQ , &cppc_req); + if (ret) + return ret; + +WRITE_ONCE (cpudata->cppc_req_cached, cppc_req); + min_perf =FIELD_GET (AMD_CPPC_MIN_PERF_MASK , cppc_req); + +/* + * Clear out the min_perf part to check if the rest of the MSR is 0, if yes, this is an + * indication that the min_perf value is the one specified through the BIOS option + */ + cppc_req &= ~(AMD_CPPC_MIN_PERF_MASK ); +Quoted 9 lines
Quoted 6 lines
+ if (!cppc_req) + perf.bios_min_perf = min_perf; + perf.highest_perf = numerator; perf.max_limit_perf = numerator; perf.min_limit_perf = FIELD_GET(AMD_CPPC_LOWEST_PERF_MASK, cap1);This is now a conflict between the pm tree and Linus' tree.
Quoted 1 line
I thought that Ingo added an extra #define for compatibility?
Having that define does not change the above conflict at all. It just means that further additions of calls to rdmsrl_safe_on_cpu() will not cause build failures.
Signature · 2 lines
Cheers, Stephen Rothwell
[tip: x86/core] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper
In reply to Stephen RothwellThe following commit has been merged into the x86/core branch of tip:
The following commit has been merged into the x86/core branch of tip:
Commit-ID: baad9190e6465fdbe458f59cf04c2b2032ec4797 Gitweb: https://git.kernel.org/tip/baad9190e6465fdbe458f59cf04c2b2032ec4797 Author: Ingo Molnar <[email protected]> AuthorDate: Thu, 15 May 2025 17:49:16 +02:00 Committer: Ingo Molnar <[email protected]> CommitterDate: Thu, 15 May 2025 17:58:55 +02:00
x86/msr: Add rdmsrl_on_cpu() compatibility wrapper
Add a simple rdmsrl_on_cpu() compatibility wrapper for rdmsrq_on_cpu(), to make life in -next easier, where the PM tree recently grew more uses of the old API.
--- arch/x86/include/asm/msr.h | 1 + 1 file changed, 1 insertion(+)
arch/x86/include/asm/msr.h +1 -0
@@ -329,6 +329,7 @@ static inline int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])/* Compatibility wrappers: */ #define rdmsrl (msr, val) rdmsrq(msr, val)#define wrmsrl (msr, val) wrmsrq(msr, val) +#define rdmsrl_on_cpu (cpu, msr, q) rdmsrq_on_cpu(cpu, msr, q)#endif /* __ASSEMBLER__ */ #endif /* _ASM_X86_MSR_H */