aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-04-14 08:06:26 -0400
committerThomas Gleixner <tglx@linutronix.de>2017-04-14 10:10:06 -0400
commit06b57e4550d400c2e7dcafbde6fdb1fcb6fcdcee (patch)
tree1e9ad858269cb886611e3cce066fe6faede18d76
parentb6466d53afdb0c3ca058848cd4c12e141aba0763 (diff)
x86/intel_rdt: Init padding only if a device exists
If no device exists it's pointless to calculate the padding data for the schemata files. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: ravi.v.shankar@intel.com Cc: tony.luck@intel.com Cc: fenghua.yu@intel.com Cc: vikas.shivappa@intel.com
-rw-r--r--arch/x86/kernel/cpu/intel_rdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c
index 70a3307fd592..2802cad0371d 100644
--- a/arch/x86/kernel/cpu/intel_rdt.c
+++ b/arch/x86/kernel/cpu/intel_rdt.c
@@ -212,8 +212,6 @@ static inline bool get_rdt_resources(void)
212 ret = true; 212 ret = true;
213 } 213 }
214 214
215 rdt_init_padding();
216
217 return ret; 215 return ret;
218} 216}
219 217
@@ -410,6 +408,8 @@ static int __init intel_rdt_late_init(void)
410 if (!get_rdt_resources()) 408 if (!get_rdt_resources())
411 return -ENODEV; 409 return -ENODEV;
412 410
411 rdt_init_padding();
412
413 state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, 413 state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
414 "x86/rdt/cat:online:", 414 "x86/rdt/cat:online:",
415 intel_rdt_online_cpu, intel_rdt_offline_cpu); 415 intel_rdt_online_cpu, intel_rdt_offline_cpu);