* linux-next: manual merge of the tip tree with the pm tree @ 2025-05-12 4:55 Stephen Rothwell 2025-05-12 5:23 ` Stephen Rothwell 2025-05-15 16:04 ` [tip: x86/core] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper tip-bot2 for Ingo Molnar 0 siblings, 2 replies; 10+ messages in thread From: Stephen Rothwell @ 2025-05-12 4:55 UTC (permalink / raw) To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Rafael J. Wysocki Cc: Dhananjay Ugwekar, Linux Kernel Mailing List, Linux Next Mailing List, Mario Limonciello [-- Attachment #1: Type: text/plain, Size: 809 bytes --] 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. -- Cheers, Stephen Rothwell [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: manual merge of the tip tree with the pm tree 2025-05-12 4:55 linux-next: manual merge of the tip tree with the pm tree Stephen Rothwell @ 2025-05-12 5:23 ` Stephen Rothwell 2025-05-12 20:45 ` Mario Limonciello 2025-05-28 3:50 ` linux-next: manual merge of the tip tree with the pm tree Stephen Rothwell 2025-05-15 16:04 ` [tip: x86/core] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper tip-bot2 for Ingo Molnar 1 sibling, 2 replies; 10+ messages in thread From: Stephen Rothwell @ 2025-05-12 5:23 UTC (permalink / raw) To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Rafael J. Wysocki Cc: Dhananjay Ugwekar, Linux Kernel Mailing List, Linux Next Mailing List, Mario Limonciello [-- Attachment #1: Type: text/plain, Size: 2382 bytes --] Hi all, On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > 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. Actually it needed the fix up below. -- 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); [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: manual merge of the tip tree with the pm tree 2025-05-12 5:23 ` Stephen Rothwell @ 2025-05-12 20:45 ` Mario Limonciello 2025-05-15 15:49 ` Ingo Molnar 2025-05-28 3:50 ` linux-next: manual merge of the tip tree with the pm tree Stephen Rothwell 1 sibling, 1 reply; 10+ messages in thread From: Mario Limonciello @ 2025-05-12 20:45 UTC (permalink / raw) To: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Rafael J. Wysocki Cc: Dhananjay Ugwekar, Linux Kernel Mailing List, Linux Next Mailing List On 5/12/2025 12:23 AM, Stephen Rothwell wrote: > Hi all, > > On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: >> >> 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. > > 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. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: manual merge of the tip tree with the pm tree 2025-05-12 20:45 ` Mario Limonciello @ 2025-05-15 15:49 ` Ingo Molnar 2025-05-15 15:50 ` Mario Limonciello 0 siblings, 1 reply; 10+ messages in thread From: Ingo Molnar @ 2025-05-15 15:49 UTC (permalink / raw) To: Mario Limonciello Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, Rafael J. Wysocki, Dhananjay Ugwekar, Linux Kernel Mailing List, Linux Next Mailing List * Mario Limonciello <mario.limonciello@amd.com> wrote: > On 5/12/2025 12:23 AM, Stephen Rothwell wrote: > > Hi all, > > > > On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > > > 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. > > > > 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. 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(+) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index a9ce56fc8785..4096b8af4ba7 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -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 */ ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: linux-next: manual merge of the tip tree with the pm tree 2025-05-15 15:49 ` Ingo Molnar @ 2025-05-15 15:50 ` Mario Limonciello 2025-05-15 16:01 ` [PATCH] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper Ingo Molnar 0 siblings, 1 reply; 10+ messages in thread From: Mario Limonciello @ 2025-05-15 15:50 UTC (permalink / raw) To: Ingo Molnar Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, Rafael J. Wysocki, Dhananjay Ugwekar, Linux Kernel Mailing List, Linux Next Mailing List On 5/15/2025 10:49 AM, Ingo Molnar wrote: > > * Mario Limonciello <mario.limonciello@amd.com> wrote: > >> On 5/12/2025 12:23 AM, Stephen Rothwell wrote: >>> Hi all, >>> >>> On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: >>>> >>>> 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. >>> >>> 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. > > 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. > > Thanks, > > Ingo > > ===============> > arch/x86/include/asm/msr.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h > index a9ce56fc8785..4096b8af4ba7 100644 > --- a/arch/x86/include/asm/msr.h > +++ b/arch/x86/include/asm/msr.h > @@ -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 */ ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper 2025-05-15 15:50 ` Mario Limonciello @ 2025-05-15 16:01 ` Ingo Molnar 0 siblings, 0 replies; 10+ messages in thread From: Ingo Molnar @ 2025-05-15 16:01 UTC (permalink / raw) To: Mario Limonciello Cc: Stephen Rothwell, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, Rafael J. Wysocki, Dhananjay Ugwekar, Linux Kernel Mailing List, Linux Next Mailing List * Mario Limonciello <mario.limonciello@amd.com> wrote: > > 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 <mingo@kernel.org> 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. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Mario Limonciello <mario.limonciello@amd.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Juergen Gross <jgross@suse.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Xin Li <xin@zytor.com> Link: https://lore.kernel.org/r/20250512145517.6e0666e3@canb.auug.org.au --- arch/x86/include/asm/msr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index a9ce56fc8785..4096b8af4ba7 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -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 */ ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: linux-next: manual merge of the tip tree with the pm tree 2025-05-12 5:23 ` Stephen Rothwell 2025-05-12 20:45 ` Mario Limonciello @ 2025-05-28 3:50 ` Stephen Rothwell 2025-05-28 14:14 ` Limonciello, Mario 1 sibling, 1 reply; 10+ messages in thread From: Stephen Rothwell @ 2025-05-28 3:50 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra, Dhananjay Ugwekar, Linux Kernel Mailing List, Linux Next Mailing List, Mario Limonciello [-- Attachment #1: Type: text/plain, Size: 2669 bytes --] Hi all, On Mon, 12 May 2025 15:23:26 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > 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. > > Actually it needed the fix up below. > > > 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); This is now a conflict between the pm tree and Linus' tree. -- Cheers, Stephen Rothwell [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: manual merge of the tip tree with the pm tree 2025-05-28 3:50 ` linux-next: manual merge of the tip tree with the pm tree Stephen Rothwell @ 2025-05-28 14:14 ` Limonciello, Mario 2025-05-28 22:12 ` Stephen Rothwell 0 siblings, 1 reply; 10+ messages in thread From: Limonciello, Mario @ 2025-05-28 14:14 UTC (permalink / raw) To: Stephen Rothwell, Rafael J. Wysocki, Ingo Molnar Cc: Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, Ugwekar, Dhananjay, Linux Kernel Mailing List, Linux Next Mailing List On 5/27/25 22:50, Stephen Rothwell wrote: > Hi all, > > On Mon, 12 May 2025 15:23:26 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: >> >> On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: >>> >>> 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. >> >> Actually it needed the fix up below. >> >> >> 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); > > This is now a conflict between the pm tree and Linus' tree. > I thought that Ingo added an extra #define for compatibility? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: manual merge of the tip tree with the pm tree 2025-05-28 14:14 ` Limonciello, Mario @ 2025-05-28 22:12 ` Stephen Rothwell 0 siblings, 0 replies; 10+ messages in thread From: Stephen Rothwell @ 2025-05-28 22:12 UTC (permalink / raw) To: Limonciello, Mario Cc: Rafael J. Wysocki, Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra, Ugwekar, Dhananjay, Linux Kernel Mailing List, Linux Next Mailing List [-- Attachment #1: Type: text/plain, Size: 3288 bytes --] Hi Mario, On Wed, 28 May 2025 14:14:40 +0000 "Limonciello, Mario" <Mario.Limonciello@amd.com> wrote: > > On 5/27/25 22:50, Stephen Rothwell wrote: > > > > On Mon, 12 May 2025 15:23:26 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > >> > >> On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > >>> > >>> 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. > >> > >> Actually it needed the fix up below. > >> > >> > >> 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); > > > > This is now a conflict between the pm tree and Linus' tree. > > > > 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. -- Cheers, Stephen Rothwell [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 484 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [tip: x86/core] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper 2025-05-12 4:55 linux-next: manual merge of the tip tree with the pm tree Stephen Rothwell 2025-05-12 5:23 ` Stephen Rothwell @ 2025-05-15 16:04 ` tip-bot2 for Ingo Molnar 1 sibling, 0 replies; 10+ messages in thread From: tip-bot2 for Ingo Molnar @ 2025-05-15 16:04 UTC (permalink / raw) To: linux-tip-commits Cc: Stephen Rothwell, Ingo Molnar, Mario Limonciello, H. Peter Anvin, Juergen Gross, Dave Hansen, Xin Li, x86, linux-kernel 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 <mingo@kernel.org> AuthorDate: Thu, 15 May 2025 17:49:16 +02:00 Committer: Ingo Molnar <mingo@kernel.org> 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. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Mario Limonciello <mario.limonciello@amd.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Juergen Gross <jgross@suse.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Xin Li <xin@zytor.com> Link: https://lore.kernel.org/r/20250512145517.6e0666e3@canb.auug.org.au --- arch/x86/include/asm/msr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index a9ce56f..4096b8a 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -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 */ ^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-05-28 22:12 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-12 4:55 linux-next: manual merge of the tip tree with the pm tree Stephen Rothwell 2025-05-12 5:23 ` Stephen Rothwell 2025-05-12 20:45 ` Mario Limonciello 2025-05-15 15:49 ` Ingo Molnar 2025-05-15 15:50 ` Mario Limonciello 2025-05-15 16:01 ` [PATCH] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper Ingo Molnar 2025-05-28 3:50 ` linux-next: manual merge of the tip tree with the pm tree Stephen Rothwell 2025-05-28 14:14 ` Limonciello, Mario 2025-05-28 22:12 ` Stephen Rothwell 2025-05-15 16:04 ` [tip: x86/core] x86/msr: Add rdmsrl_on_cpu() compatibility wrapper tip-bot2 for Ingo Molnar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).