From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration
Date: Thu, 23 Nov 2017 12:34:31 +0000 [thread overview]
Message-ID: <20171123123432.25035-1-tvrtko.ursulin@linux.intel.com> (raw)
From: Chris Wilson <chris@chris-wilson.co.uk>
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 <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/i915_pmu.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index 1071935bfa67..d7acdaf7d9f8 100644
--- 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)
{
@@ -742,7 +742,6 @@ static const struct attribute_group *i915_pmu_attr_groups[] = {
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);
@@ -778,11 +777,9 @@ static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
}
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;
@@ -801,17 +798,14 @@ static int i915_pmu_register_cpuhp_state(struct drm_i915_private *i915)
}
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)
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2017-11-23 12:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 12:34 Tvrtko Ursulin [this message]
2017-11-23 12:34 ` [PATCH 2/2] drm/i915/pmu: Only allow running on a single CPU Tvrtko Ursulin
2017-11-23 12:50 ` Chris Wilson
2017-11-23 13:32 ` Tvrtko Ursulin
2017-11-23 13:48 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/pmu: Remove conditional HOTPLUG_CPU registration Patchwork
2017-11-24 9:56 ` Tvrtko Ursulin
2017-11-23 15:58 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171123123432.25035-1-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--cc=Intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.