[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b28a6f3-8d3d-76f4-d517-62260ac5b337@intel.com>
Date: Mon, 14 Mar 2022 14:05:56 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Kohei Tarumizu <tarumizu.kohei@...itsu.com>,
catalin.marinas@....com, will@...nel.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/8] x86: Add hardware prefetch control support for x86
On 3/11/22 02:19, Kohei Tarumizu wrote:
> +static int broadwell_write_pfreg(enum pfctl_attr pattr, unsigned int cpu,
> + unsigned int level, u64 val)
> +{
> + int ret;
> + u64 reg;
> +
> + ret = rdmsrl_on_cpu(cpu, MSR_MISC_FEATURE_CONTROL, ®);
> + if (ret)
> + return ret;
> +
> + ret = broadwell_modify_pfreg(pattr, ®, level, val);
> + if (ret < 0)
> + return ret;
> +
> + ret = wrmsrl_on_cpu(cpu, MSR_MISC_FEATURE_CONTROL, reg);
> + if (ret)
> + return ret;
> +
> + return 0;
> +}
This needs to integrate _somehow_ with the pseudo_lock.c code. Right
now, I suspect that code would just overwrite any MSR changes made by
this code.
Powered by blists - more mailing lists