Re: [PATCH v3 10/18] x86/intel_rdt: Build structures for each resource based on cache topology
From: Nilay Vaish
Date: Sun Oct 09 2016 - 17:59:37 EST
On 7 October 2016 at 21:45, Fenghua Yu <fenghua.yu@xxxxxxxxx> wrote:
> From: Tony Luck <tony.luck@xxxxxxxxx>
>
> diff --git a/arch/x86/include/asm/intel_rdt.h b/arch/x86/include/asm/intel_rdt.h
> index 251ac2a..bad8dc7 100644
> --- a/arch/x86/include/asm/intel_rdt.h
> +++ b/arch/x86/include/asm/intel_rdt.h
> @@ -40,6 +40,39 @@ struct rdt_resource {
> if (r->enabled)
>
> #define IA32_L3_CBM_BASE 0xc90
> +
> +/**
> + * struct rdt_domain - group of cpus sharing an RDT resource
> + * @list: all instances of this resource
> + * @id: unique id for this instance
> + * @cpu_mask: which cpus share this resource
> + * @cbm: array of cache bit masks (indexed by CLOSID)
> + */
> +struct rdt_domain {
> + struct list_head list;
> + int id;
> + struct cpumask cpu_mask;
> + u32 *cbm;
> +};
> +
> +/**
> + * struct msr_param - set a range of MSRs from a domain
> + * @res: The resource to use
> + * @low: Beginning index from base MSR
> + * @high: End index
> + */
> +struct msr_param {
> + struct rdt_resource *res;
> + int low;
> + int high;
> +};
> +
> +extern struct static_key_false rdt_enable_key;
> +extern struct mutex rdtgroup_mutex;
> +
> +int __init rdtgroup_init(void);
> +
> +extern struct rdtgroup *rdtgroup_default;
struct rdtgroup has not been defined yet. The statement above should
be part of the next patch.
--
Nilay