提交 141a0895 编写于 作者: C Chris Wilson 提交者: Tvrtko Ursulin

drm/i915/pmu: Remove conditional HOTPLUG_CPU registration

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: b46a33e2 ("drm/i915/pmu: Expose a PMU interface for perf queries")
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171123123432.25035-1-tvrtko.ursulin@linux.intel.com
上级 e7e5da71
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#define ENGINE_SAMPLE_BITS (1 << I915_PMU_SAMPLE_BITS) #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) static u8 engine_config_sample(u64 config)
{ {
...@@ -770,7 +770,6 @@ static const struct attribute_group *i915_pmu_attr_groups[] = { ...@@ -770,7 +770,6 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
NULL NULL
}; };
#ifdef CONFIG_HOTPLUG_CPU
static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node) static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
{ {
struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu), node); struct i915_pmu *pmu = hlist_entry_safe(node, typeof(*pmu), node);
...@@ -806,11 +805,9 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node) ...@@ -806,11 +805,9 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
} }
static enum cpuhp_state cpuhp_slot = CPUHP_INVALID; static enum cpuhp_state cpuhp_slot = CPUHP_INVALID;
#endif
static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915) static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
{ {
#ifdef CONFIG_HOTPLUG_CPU
enum cpuhp_state slot; enum cpuhp_state slot;
int ret; int ret;
...@@ -829,17 +826,14 @@ static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915) ...@@ -829,17 +826,14 @@ static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
} }
cpuhp_slot = slot; cpuhp_slot = slot;
#endif
return 0; return 0;
} }
static void i915_pmu_unregister_cpuhp_state(struct drm_i915_private *i915) 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_slot == CPUHP_INVALID);
WARN_ON(cpuhp_state_remove_instance(cpuhp_slot, &i915->pmu.node)); WARN_ON(cpuhp_state_remove_instance(cpuhp_slot, &i915->pmu.node));
cpuhp_remove_multi_state(cpuhp_slot); cpuhp_remove_multi_state(cpuhp_slot);
#endif
} }
void i915_pmu_register(struct drm_i915_private *i915) void i915_pmu_register(struct drm_i915_private *i915)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册