mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel/uncore: don't use smp_processor_id() in validate_group()
@ 2013-09-17  6:48 Yan, Zheng
  2013-09-18 11:31 ` Peter Zijlstra
  2013-09-20  9:57 ` [tip:perf/urgent] perf/x86/intel/uncore: Don' t " tip-bot for Yan, Zheng
  0 siblings, 2 replies; 4+ messages in thread
From: Yan, Zheng @ 2013-09-17  6:48 UTC (permalink / raw)
  To: peterz; +Cc: eranian, mingo, linux-kernel, Yan, Zheng

From: "Yan, Zheng" <zheng.z.yan@intel.com>

uncore_validate_group() can't call smp_processor_id() because it is
in preemptible context. Pass NUMA_NO_NODE to the allocator instead.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index fd8011e..11b1582 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -3031,7 +3031,7 @@ static int uncore_validate_group(struct intel_uncore_pmu *pmu,
 	struct intel_uncore_box *fake_box;
 	int ret = -EINVAL, n;
 
-	fake_box = uncore_alloc_box(pmu->type, smp_processor_id());
+	fake_box = uncore_alloc_box(pmu->type, NUMA_NO_NODE);
 	if (!fake_box)
 		return -ENOMEM;
 
-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-20  9:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-17  6:48 [PATCH] perf/x86/intel/uncore: don't use smp_processor_id() in validate_group() Yan, Zheng
2013-09-18 11:31 ` Peter Zijlstra
2013-09-20  3:27   ` Bjorn Helgaas
2013-09-20  9:57 ` [tip:perf/urgent] perf/x86/intel/uncore: Don' t " tip-bot for Yan, Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome