lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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, &reg);
> + if (ret)
> + return ret;
> +
> + ret = broadwell_modify_pfreg(pattr, &reg, 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.

\
 
 \ /
  Last update: 2022-03-14 22:07    [W:0.122 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site