From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 410F21A0E51 for ; Mon, 15 Jun 2015 22:11:21 +1000 (AEST) Received: from e28smtp01.in.ibm.com (e28smtp01.in.ibm.com [122.248.162.1]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 760FD1402B1 for ; Mon, 15 Jun 2015 22:11:20 +1000 (AEST) Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Jun 2015 17:41:18 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 0A186E005C for ; Mon, 15 Jun 2015 17:44:43 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay05.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t5FCBAp462652620 for ; Mon, 15 Jun 2015 17:41:10 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t5FBD3Td024970 for ; Mon, 15 Jun 2015 16:43:04 +0530 From: Anshuman Khandual To: linuxppc-dev@ozlabs.org Cc: dja@axtens.net, mpe@ellerman.id.au, sukadev@linux.vnet.ibm.com, mikey@neuling.org Subject: [PATCH V9 03/13] powerpc, perf: Replace last usage of get_cpu_var with this_cpu_ptr Date: Mon, 15 Jun 2015 17:40:58 +0530 Message-Id: <1434370268-19056-4-git-send-email-khandual@linux.vnet.ibm.com> In-Reply-To: <1434370268-19056-1-git-send-email-khandual@linux.vnet.ibm.com> References: <1434370268-19056-1-git-send-email-khandual@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , The commit 69111bac42f5ce ("powerpc: Replace __get_cpu_var uses") replaced all usage of get_cpu_var with this_cpu_ptr inside core perf event handling on powerpc. But it skipped one of them which is being replaced with this patch. Reported-by: Daniel Axtens Signed-off-by: Anshuman Khandual --- arch/powerpc/perf/core-book3s.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 9798f00..7a03cce 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c @@ -1831,20 +1831,17 @@ static int power_pmu_event_init(struct perf_event *event) if (check_excludes(ctrs, cflags, n, 1)) return -EINVAL; - cpuhw = &get_cpu_var(cpu_hw_events); + cpuhw = this_cpu_ptr(&cpu_hw_events); err = power_check_constraints(cpuhw, events, cflags, n + 1); if (has_branch_stack(event)) { cpuhw->bhrb_filter = ppmu->bhrb_filter_map( event->attr.branch_sample_type); - if (cpuhw->bhrb_filter == -1) { - put_cpu_var(cpu_hw_events); + if (cpuhw->bhrb_filter == -1) return -EOPNOTSUPP; - } } - put_cpu_var(cpu_hw_events); if (err) return -EINVAL; -- 2.1.0