[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250529081200.280bb922@canb.auug.org.au>
Date: Thu, 29 May 2025 08:12:00 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: "Limonciello, Mario" <Mario.Limonciello@....com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, "H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>, "Ugwekar, Dhananjay"
<Dhananjay.Ugwekar@....com>, Linux Kernel Mailing List
<linux-kernel@...r.kernel.org>, Linux Next Mailing List
<linux-next@...r.kernel.org>
Subject: Re: linux-next: manual merge of the tip tree with the pm tree
Hi Mario,
On Wed, 28 May 2025 14:14:40 +0000 "Limonciello, Mario" <Mario.Limonciello@....com> wrote:
>
> On 5/27/25 22:50, Stephen Rothwell wrote:
> >
> > On Mon, 12 May 2025 15:23:26 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> >>
> >> On Mon, 12 May 2025 14:55:17 +1000 Stephen Rothwell <sfr@...b.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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists