From: Chris Wilson Date: Thu, 23 Nov 2017 12:34:31 +0000 Subject: drm/i915/pmu: Remove conditional HOTPLUG_CPU registration Git-commit: 141a0895d5ad3d2540c3d08651f2b63443fb8dfd Patch-mainline: v4.16-rc1 References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166 Even for static CPU configurations, the hotplug CPU framework is still used to determine the CPU topology, and is still being used by the perf event register to check for valid CPUs. Fixes: b46a33e271ed ("drm/i915/pmu: Expose a PMU interface for perf queries") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Dmitry Rogozhkin Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171123123432.25035-1-tvrtko.ursulin@linux.intel.com Acked-by: Petr Tesarik --- drivers/gpu/drm/i915/i915_pmu.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -40,7 +40,7 @@ #define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) -static cpumask_t i915_pmu_cpumask = CPU_MASK_NONE; +static cpumask_t i915_pmu_cpumask; static u8 engine_config_sample(u64 config) { @@ -770,7 +770,6 @@ static const struct attribute_group *i91 NULL }; -#ifdef CONFIG_HOTPLUG_CPU static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node) { struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu), node); @@ -806,11 +805,9 @@ static int i915_pmu_cpu_offline(unsigned } static enum cpuhp_state cpuhp_slot = CPUHP_INVALID; -#endif static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915) { -#ifdef CONFIG_HOTPLUG_CPU enum cpuhp_state slot; int ret; @@ -829,17 +826,14 @@ static int i915_pmu_register_cpuhp_state } cpuhp_slot = slot; -#endif return 0; } static void i915_pmu_unregister_cpuhp_state(struct drm_i915_private *i915) { -#ifdef CONFIG_HOTPLUG_CPU WARN_ON(cpuhp_slot == CPUHP_INVALID); WARN_ON(cpuhp_state_remove_instance(cpuhp_slot, &i915->pmu.node)); cpuhp_remove_multi_state(cpuhp_slot); -#endif } void i915_pmu_register(struct drm_i915_private *i915)