Commit dd131853 authored by Vikas Shivappa's avatar Vikas Shivappa Committed by Thomas Gleixner

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[] = {
	[<resource_index>] =
            {...
	    }
	...
}
Signed-off-by: default avatarVikas Shivappa <vikas.shivappa@linux.intel.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
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
parent 1b5c0b75
...@@ -63,6 +63,7 @@ cat_wrmsr(struct rdt_domain *d, struct msr_param *m, struct rdt_resource *r); ...@@ -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) #define domain_init(id) LIST_HEAD_INIT(rdt_resources_all[id].domains)
struct rdt_resource rdt_resources_all[] = { struct rdt_resource rdt_resources_all[] = {
[RDT_RESOURCE_L3] =
{ {
.name = "L3", .name = "L3",
.domains = domain_init(RDT_RESOURCE_L3), .domains = domain_init(RDT_RESOURCE_L3),
...@@ -77,6 +78,7 @@ struct rdt_resource rdt_resources_all[] = { ...@@ -77,6 +78,7 @@ struct rdt_resource rdt_resources_all[] = {
.parse_ctrlval = parse_cbm, .parse_ctrlval = parse_cbm,
.format_str = "%d=%0*x", .format_str = "%d=%0*x",
}, },
[RDT_RESOURCE_L3DATA] =
{ {
.name = "L3DATA", .name = "L3DATA",
.domains = domain_init(RDT_RESOURCE_L3DATA), .domains = domain_init(RDT_RESOURCE_L3DATA),
...@@ -91,6 +93,7 @@ struct rdt_resource rdt_resources_all[] = { ...@@ -91,6 +93,7 @@ struct rdt_resource rdt_resources_all[] = {
.parse_ctrlval = parse_cbm, .parse_ctrlval = parse_cbm,
.format_str = "%d=%0*x", .format_str = "%d=%0*x",
}, },
[RDT_RESOURCE_L3CODE] =
{ {
.name = "L3CODE", .name = "L3CODE",
.domains = domain_init(RDT_RESOURCE_L3CODE), .domains = domain_init(RDT_RESOURCE_L3CODE),
...@@ -105,6 +108,7 @@ struct rdt_resource rdt_resources_all[] = { ...@@ -105,6 +108,7 @@ struct rdt_resource rdt_resources_all[] = {
.parse_ctrlval = parse_cbm, .parse_ctrlval = parse_cbm,
.format_str = "%d=%0*x", .format_str = "%d=%0*x",
}, },
[RDT_RESOURCE_L2] =
{ {
.name = "L2", .name = "L2",
.domains = domain_init(RDT_RESOURCE_L2), .domains = domain_init(RDT_RESOURCE_L2),
...@@ -119,6 +123,7 @@ struct rdt_resource rdt_resources_all[] = { ...@@ -119,6 +123,7 @@ struct rdt_resource rdt_resources_all[] = {
.parse_ctrlval = parse_cbm, .parse_ctrlval = parse_cbm,
.format_str = "%d=%0*x", .format_str = "%d=%0*x",
}, },
[RDT_RESOURCE_MBA] =
{ {
.name = "MB", .name = "MB",
.domains = domain_init(RDT_RESOURCE_MBA), .domains = domain_init(RDT_RESOURCE_MBA),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment