Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751667AbcJIV72 (ORCPT ); Sun, 9 Oct 2016 17:59:28 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:33662 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbcJIV71 (ORCPT ); Sun, 9 Oct 2016 17:59:27 -0400 MIME-Version: 1.0 In-Reply-To: <1475894763-64683-11-git-send-email-fenghua.yu@intel.com> References: <1475894763-64683-1-git-send-email-fenghua.yu@intel.com> <1475894763-64683-11-git-send-email-fenghua.yu@intel.com> From: Nilay Vaish Date: Sun, 9 Oct 2016 16:57:43 -0500 Message-ID: Subject: Re: [PATCH v3 10/18] x86/intel_rdt: Build structures for each resource based on cache topology To: Fenghua Yu Cc: Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Tony Luck , Peter Zijlstra , Stephane Eranian , Borislav Petkov , Dave Hansen , Shaohua Li , David Carrillo-Cisneros , Ravi V Shankar , Sai Prakhya , Vikas Shivappa , linux-kernel , x86 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1542 Lines: 50 On 7 October 2016 at 21:45, Fenghua Yu wrote: > From: Tony Luck > > 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