Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756085AbbDOPJS (ORCPT ); Wed, 15 Apr 2015 11:09:18 -0400 Received: from mga14.intel.com ([192.55.52.115]:23699 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756015AbbDOPIw (ORCPT ); Wed, 15 Apr 2015 11:08:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,582,1422950400"; d="scan'208";a="714104622" From: Kan Liang To: acme@kernel.org, a.p.zijlstra@chello.nl Cc: eranian@google.com, andi@firstfloor.org, linux-kernel@vger.kernel.org, Kan Liang Subject: [PATCH V2 6/6] perf/x86/intel/uncore: do not implicitly set uncore event cpu Date: Wed, 15 Apr 2015 03:56:16 -0400 Message-Id: <1429084576-1078-6-git-send-email-kan.liang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1429084576-1078-1-git-send-email-kan.liang@intel.com> References: <1429084576-1078-1-git-send-email-kan.liang@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 34 From: Kan Liang There is cpumask exposed to the uncore pmu sysfs directory. User should set the cpu according to the cpumask. Kernel should not implicitly change the event->cpu. Signed-off-by: Kan Liang --- arch/x86/kernel/cpu/perf_event_intel_uncore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index c635b8b..cd80731 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -621,9 +621,8 @@ static int uncore_pmu_event_init(struct perf_event *event) if (event->cpu < 0) return -EINVAL; box = uncore_pmu_to_box(pmu, event->cpu); - if (!box || box->cpu < 0) + if (!box || box->cpu < 0 || (box->cpu != event->cpu)) return -EINVAL; - event->cpu = box->cpu; event->hw.idx = -1; event->hw.last_tag = ~0ULL; -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/