Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06b57e45 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

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: default avatarThomas 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
parent b6466d53
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -212,8 +212,6 @@ static inline bool get_rdt_resources(void)
		ret = true;
	}

	rdt_init_padding();

	return ret;
}

@@ -410,6 +408,8 @@ static int __init intel_rdt_late_init(void)
	if (!get_rdt_resources())
		return -ENODEV;

	rdt_init_padding();

	state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
				  "x86/rdt/cat:online:",
				  intel_rdt_online_cpu, intel_rdt_offline_cpu);