linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Tejun Heo <tj@kernel.org>
Cc: akpm@linuxfoundation.org, rostedt@goodmis.org,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	James Hogan <james.hogan@imgtec.com>
Subject: [PATCH 13/31] metag: Replace __get_cpu_var uses for address calculation
Date: Fri, 20 Jun 2014 14:31:28 -0500	[thread overview]
Message-ID: <20140620193126.411543066@linux.com> (raw)
In-Reply-To: 20140620193115.547427118@linux.com

[-- Attachment #1: this_metag --]
[-- Type: text/plain, Size: 2513 bytes --]

Replace __get_cpu_var uses for address calculation with this_cpu_ptr().

Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Christoph Lameter <cl@linux.com>

Index: linux/arch/metag/kernel/perf/perf_event.c
===================================================================
--- linux.orig/arch/metag/kernel/perf/perf_event.c	2014-04-14 13:24:54.921359116 -0500
+++ linux/arch/metag/kernel/perf/perf_event.c	2014-04-14 13:24:54.913359272 -0500
@@ -258,7 +258,7 @@
 
 static void metag_pmu_start(struct perf_event *event, int flags)
 {
-	struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
+	struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
 	struct hw_perf_event *hwc = &event->hw;
 	int idx = hwc->idx;
 
@@ -306,7 +306,7 @@
 
 static int metag_pmu_add(struct perf_event *event, int flags)
 {
-	struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
+	struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
 	struct hw_perf_event *hwc = &event->hw;
 	int idx = 0, ret = 0;
 
@@ -348,7 +348,7 @@
 
 static void metag_pmu_del(struct perf_event *event, int flags)
 {
-	struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
+	struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
 	struct hw_perf_event *hwc = &event->hw;
 	int idx = hwc->idx;
 
@@ -607,7 +607,7 @@
 
 static void metag_pmu_enable_counter(struct hw_perf_event *event, int idx)
 {
-	struct cpu_hw_events *events = &__get_cpu_var(cpu_hw_events);
+	struct cpu_hw_events *events = this_cpu_ptr(&cpu_hw_events);
 	unsigned int config = event->config;
 	unsigned int tmp = config & 0xf0;
 	unsigned long flags;
@@ -680,7 +680,7 @@
 
 static void metag_pmu_disable_counter(struct hw_perf_event *event, int idx)
 {
-	struct cpu_hw_events *events = &__get_cpu_var(cpu_hw_events);
+	struct cpu_hw_events *events = this_cpu_ptr(&cpu_hw_events);
 	unsigned int tmp = 0;
 	unsigned long flags;
 
@@ -728,7 +728,7 @@
 
 static void metag_pmu_write_counter(int idx, u32 val)
 {
-	struct cpu_hw_events *events = &__get_cpu_var(cpu_hw_events);
+	struct cpu_hw_events *events = this_cpu_ptr(&cpu_hw_events);
 	u32 tmp = 0;
 	unsigned long flags;
 
@@ -761,7 +761,7 @@
 static irqreturn_t metag_pmu_counter_overflow(int irq, void *dev)
 {
 	int idx = (int)dev;
-	struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events);
+	struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events);
 	struct perf_event *event = cpuhw->events[idx];
 	struct hw_perf_event *hwc = &event->hw;
 	struct pt_regs *regs = get_irq_regs();


  parent reply	other threads:[~2014-06-20 19:32 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 19:31 [PATCH 00/31] percpu: Consistent per cpu operations V5 Christoph Lameter
2014-06-20 19:31 ` [PATCH 01/31] kernel misc: Replace __get_cpu_var uses Christoph Lameter
2014-07-18 23:26   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 02/31] time: " Christoph Lameter
2014-06-20 19:31 ` [PATCH 03/31] scheduler: Replace __get_cpu_var with this_cpu_ptr Christoph Lameter
2014-07-18 23:27   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 04/31] block: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-07-18 23:28   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 05/31] drivers/char/random: Replace __get_cpu_var uses Christoph Lameter
2014-07-18 23:28   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 06/31] drivers/cpuidle: Replace __get_cpu_var uses for address calculation Christoph Lameter
2014-07-18 23:28   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 07/31] drivers/oprofile: " Christoph Lameter
2014-07-18 23:28   ` Tejun Heo
2014-07-19 11:54     ` Robert Richter
2014-06-20 19:31 ` [PATCH 08/31] drivers/clocksource: Replace __get_cpu_var used " Christoph Lameter
2014-07-18 23:29   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 09/31] drivers/net/ethernet/tile: Replace __get_cpu_var uses " Christoph Lameter
2014-07-18 23:29   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 10/31] watchdog: Replace __raw_get_cpu_var uses Christoph Lameter
2014-07-18 23:29   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 11/31] net: Replace get_cpu_var through this_cpu_ptr Christoph Lameter
2014-07-18 23:29   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 12/31] md: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-07-18 23:29   ` Tejun Heo
2014-06-20 19:31 ` Christoph Lameter [this message]
2014-07-18 23:30   ` [PATCH 13/31] metag: Replace __get_cpu_var uses for address calculation Tejun Heo
2014-06-20 19:31 ` [PATCH 14/31] drivers/net/ethernet/tile: __get_cpu_var call introduced in 3.14 Christoph Lameter
2014-07-18 23:30   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 15/31] irqchips: Replace __this_cpu_ptr uses Christoph Lameter
2014-07-18 23:30   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 16/31] x86: Replace __get_cpu_var uses Christoph Lameter
2014-06-20 19:31 ` [PATCH 17/31] uv: Replace __get_cpu_var Christoph Lameter
2014-07-18 23:30   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 18/31] arm: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-07-18 23:31   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 19/31] MIPS: Replace __get_cpu_var uses in FPU emulator Christoph Lameter
2014-06-20 20:07   ` David Daney
2014-07-18 23:31   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 20/31] mips: Replace __get_cpu_var uses Christoph Lameter
2014-07-18 23:31   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 21/31] s390: " Christoph Lameter
2014-07-18 23:32   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 22/31] s390: cio driver &__get_cpu_var replacements Christoph Lameter
2014-07-18 23:32   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 23/31] ia64: Replace __get_cpu_var uses Christoph Lameter
2014-07-18 23:32   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 24/31] alpha: Replace __get_cpu_var Christoph Lameter
2014-07-18 23:32   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 25/31] powerpc: Replace __get_cpu_var uses Christoph Lameter
2014-06-20 19:31 ` [PATCH 26/31] tile: " Christoph Lameter
2014-07-18 23:33   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 27/31] tile: Use this_cpu_ptr() for hardware counters Christoph Lameter
2014-07-18 23:33   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 28/31] blackfin: Replace __get_cpu_var uses Christoph Lameter
2014-07-18 23:33   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 29/31] avr32: Replace __get_cpu_var with __this_cpu_write Christoph Lameter
2014-07-18 23:33   ` Tejun Heo
2014-06-20 19:31 ` [PATCH 30/31] Remove __get_cpu_var and __raw_get_cpu_var macros [only in 3.17] Christoph Lameter
2014-06-20 19:31 ` [PATCH 31/31] percpu: Remove __this_cpu_ptr Christoph Lameter

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=20140620193126.411543066@linux.com \
    --to=cl@linux.com \
    --cc=akpm@linuxfoundation.org \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).