Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752722AbdHAUuG (ORCPT ); Tue, 1 Aug 2017 16:50:06 -0400 Received: from terminus.zytor.com ([65.50.211.136]:32855 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752530AbdHAUuB (ORCPT ); Tue, 1 Aug 2017 16:50:01 -0400 Date: Tue, 1 Aug 2017 13:48:53 -0700 From: tip-bot for Vikas Shivappa Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, vikas.shivappa@linux.intel.com, tglx@linutronix.de, mingo@kernel.org Reply-To: hpa@zytor.com, vikas.shivappa@linux.intel.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <1501017287-28083-8-git-send-email-vikas.shivappa@linux.intel.com> References: <1501017287-28083-8-git-send-email-vikas.shivappa@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cache] x86/intel_rdt: Make rdt_resources_all more readable Git-Commit-ID: dd131853f3fbc1c3aa051c34a2967c2f76309024 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2537 Lines: 81 Commit-ID: dd131853f3fbc1c3aa051c34a2967c2f76309024 Gitweb: http://git.kernel.org/tip/dd131853f3fbc1c3aa051c34a2967c2f76309024 Author: Vikas Shivappa AuthorDate: Tue, 25 Jul 2017 14:14:26 -0700 Committer: Thomas Gleixner CommitDate: Tue, 1 Aug 2017 22:41:20 +0200 x86/intel_rdt: Make rdt_resources_all more readable Change the format of the global rdt_resources_all. This holds all the RDT resource structure initialization values. Make this more readable by using the format: rdt_resources_all[] = { [] = {... } ... } Signed-off-by: Vikas Shivappa Signed-off-by: Thomas Gleixner Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: peterz@infradead.org Cc: eranian@google.com Cc: vikas.shivappa@intel.com Cc: ak@linux.intel.com Cc: davidcc@google.com Cc: reinette.chatre@intel.com Link: http://lkml.kernel.org/r/1501017287-28083-8-git-send-email-vikas.shivappa@linux.intel.com --- arch/x86/kernel/cpu/intel_rdt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 835e1ff..98715c5 100644 --- a/arch/x86/kernel/cpu/intel_rdt.c +++ b/arch/x86/kernel/cpu/intel_rdt.c @@ -63,6 +63,7 @@ cat_wrmsr(struct rdt_domain *d, struct msr_param *m, struct rdt_resource *r); #define domain_init(id) LIST_HEAD_INIT(rdt_resources_all[id].domains) struct rdt_resource rdt_resources_all[] = { + [RDT_RESOURCE_L3] = { .name = "L3", .domains = domain_init(RDT_RESOURCE_L3), @@ -77,6 +78,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_L3DATA] = { .name = "L3DATA", .domains = domain_init(RDT_RESOURCE_L3DATA), @@ -91,6 +93,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_L3CODE] = { .name = "L3CODE", .domains = domain_init(RDT_RESOURCE_L3CODE), @@ -105,6 +108,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_L2] = { .name = "L2", .domains = domain_init(RDT_RESOURCE_L2), @@ -119,6 +123,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_MBA] = { .name = "MB", .domains = domain_init(RDT_RESOURCE_MBA),