public inbox for linux-kernel@vger.kernel.org
 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>,
	Robert Richter <rric@kernel.org>,
	oprofile-list@lists.sf.net
Subject: [PATCH 08/35] [PATCH 08/36] drivers/oprofile: Replace __get_cpu_var uses for address calculation
Date: Sun, 17 Aug 2014 12:30:31 -0500	[thread overview]
Message-ID: <20140817173034.171175734@linux.com> (raw)
In-Reply-To: 20140817173023.439660246@linux.com

[-- Attachment #1: 0008-drivers-oprofile-Replace-__get_cpu_var-uses-for-addr.patch --]
[-- Type: text/plain, Size: 2499 bytes --]

Replace the uses of __get_cpu_var for address calculation with this_cpu_ptr.

Cc: Robert Richter <rric@kernel.org>
Cc: oprofile-list@lists.sf.net
Signed-off-by: Christoph Lameter <cl@linux.com>
---
 drivers/oprofile/cpu_buffer.c | 10 +++++-----
 drivers/oprofile/timer_int.c  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

Index: linux/drivers/oprofile/cpu_buffer.c
===================================================================
--- linux.orig/drivers/oprofile/cpu_buffer.c
+++ linux/drivers/oprofile/cpu_buffer.c
@@ -45,7 +45,7 @@ unsigned long oprofile_get_cpu_buffer_si
 
 void oprofile_cpu_buffer_inc_smpl_lost(void)
 {
-	struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer);
+	struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer);
 
 	cpu_buf->sample_lost_overflow++;
 }
@@ -297,7 +297,7 @@ __oprofile_add_ext_sample(unsigned long
 			  unsigned long event, int is_kernel,
 			  struct task_struct *task)
 {
-	struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer);
+	struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer);
 	unsigned long backtrace = oprofile_backtrace_depth;
 
 	/*
@@ -357,7 +357,7 @@ oprofile_write_reserve(struct op_entry *
 {
 	struct op_sample *sample;
 	int is_kernel = !user_mode(regs);
-	struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer);
+	struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer);
 
 	cpu_buf->sample_received++;
 
@@ -412,13 +412,13 @@ int oprofile_write_commit(struct op_entr
 
 void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event)
 {
-	struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer);
+	struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer);
 	log_sample(cpu_buf, pc, 0, is_kernel, event, NULL);
 }
 
 void oprofile_add_trace(unsigned long pc)
 {
-	struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(op_cpu_buffer);
+	struct oprofile_cpu_buffer *cpu_buf = this_cpu_ptr(&op_cpu_buffer);
 
 	if (!cpu_buf->tracing)
 		return;
Index: linux/drivers/oprofile/timer_int.c
===================================================================
--- linux.orig/drivers/oprofile/timer_int.c
+++ linux/drivers/oprofile/timer_int.c
@@ -32,7 +32,7 @@ static enum hrtimer_restart oprofile_hrt
 
 static void __oprofile_hrtimer_start(void *unused)
 {
-	struct hrtimer *hrtimer = &__get_cpu_var(oprofile_hrtimer);
+	struct hrtimer *hrtimer = this_cpu_ptr(&oprofile_hrtimer);
 
 	if (!ctr_running)
 		return;


  parent reply	other threads:[~2014-08-17 17:31 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-17 17:30 [PATCH 00/35] percpu: Consistent per cpu operations V7 Christoph Lameter
2014-08-17 17:30 ` [PATCH 01/35] [PATCH 02/36] kernel misc: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:04   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 02/35] [PATCH 03/36] time: " Christoph Lameter
2014-08-26 18:05   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 03/35] time: Convert a bunch of &__get_cpu_var introduced in the 3.16 merge period Christoph Lameter
2014-08-26 18:05   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 04/35] [PATCH 04/36] scheduler: Replace __get_cpu_var with this_cpu_ptr Christoph Lameter
2014-08-26 18:05   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 05/35] [PATCH 05/36] block: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-26 18:06   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 06/35] [PATCH 06/36] drivers/char/random: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:07   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 07/35] [PATCH 07/36] drivers/cpuidle: Replace __get_cpu_var uses for address calculation Christoph Lameter
2014-08-26 18:07   ` Tejun Heo
2014-08-17 17:30 ` Christoph Lameter [this message]
2014-08-26 18:08   ` [PATCH 08/35] [PATCH 08/36] drivers/oprofile: " Tejun Heo
2014-08-17 17:30 ` [PATCH 09/35] [PATCH 09/36] drivers/clocksource: Replace __get_cpu_var used " Christoph Lameter
2014-08-26 18:08   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 10/35] [PATCH 10/36] drivers/net/ethernet/tile: Replace __get_cpu_var uses " Christoph Lameter
2014-08-26 18:08   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 11/35] [PATCH 11/36] watchdog: Replace __raw_get_cpu_var uses Christoph Lameter
2014-08-26 18:08   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 12/35] [PATCH 12/36] net: Replace get_cpu_var through this_cpu_ptr Christoph Lameter
2014-08-26 18:09   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 13/35] [PATCH 13/36] md: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-26 18:09   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 14/35] [PATCH 14/36] metag: Replace __get_cpu_var uses for address calculation Christoph Lameter
2014-08-26 18:09   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 15/35] [PATCH 15/36] drivers/net/ethernet/tile: __get_cpu_var call introduced in 3.14 Christoph Lameter
2014-08-26 18:09   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 16/35] [PATCH 16/36] irqchips: Replace __this_cpu_ptr uses Christoph Lameter
2014-08-26 18:10   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 17/35] [PATCH 17/36] x86: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:10   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 18/35] [PATCH 18/36] uv: Replace __get_cpu_var Christoph Lameter
2014-08-26 18:11   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 19/35] [PATCH 19/36] arm: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-22 17:48   ` Will Deacon
2014-08-26 18:11   ` Tejun Heo
2014-08-26 18:16     ` Will Deacon
2014-08-26 18:19       ` Tejun Heo
2014-08-17 17:30 ` [PATCH 20/35] [PATCH 20/36] MIPS: Replace __get_cpu_var uses in FPU emulator Christoph Lameter
2014-08-26 18:12   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 21/35] [PATCH 21/36] mips: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:12   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 22/35] [PATCH 22/36] s390: " Christoph Lameter
2014-08-26 18:13   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 23/35] [PATCH 23/36] s390: cio driver &__get_cpu_var replacements Christoph Lameter
2014-08-26 18:13   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 24/35] [PATCH 24/36] ia64: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:13   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 25/35] [PATCH 25/36] alpha: Replace __get_cpu_var Christoph Lameter
2014-08-26 18:14   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 26/35] [PATCH 26/36] powerpc: Replace __get_cpu_var uses Christoph Lameter
2014-08-18  2:45   ` Christoph Lameter
2014-08-26 18:14   ` Tejun Heo
2014-12-16 22:07     ` Alexander Graf
2014-12-17  9:43       ` Paolo Bonzini
2014-12-17 15:31         ` Christoph Lameter
2014-08-17 17:30 ` [PATCH 27/35] [PATCH 27/36] tile: " Christoph Lameter
2014-08-26 18:11   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 28/35] [PATCH 28/36] tile: Use this_cpu_ptr() for hardware counters Christoph Lameter
2014-08-26 18:15   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 29/35] [PATCH 29/36] blackfin: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:15   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 30/35] [PATCH 30/36] avr32: Replace __get_cpu_var with __this_cpu_write Christoph Lameter
2014-08-26 18:15   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 31/35] [PATCH 31/36] sparc: Replace __get_cpu_var uses Christoph Lameter
2014-08-26 18:16   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 32/35] [PATCH 32/36] clocksource: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-08-26 18:16   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 33/35] [PATCH 34/36] percpu: Remove __this_cpu_ptr Christoph Lameter
2014-08-26 18:16   ` Tejun Heo
2014-08-17 17:30 ` [PATCH 34/35] [PATCH 01/36] __get_cpu_var/cpumask_var_t: Resolve ambiguities Christoph Lameter
2014-08-17 17:30 ` [PATCH 35/35] [PATCH 33/36] Remove __get_cpu_var and __raw_get_cpu_var macros [only in 3.17] Christoph Lameter
2014-08-26 18:17 ` [PATCH 00/35] percpu: Consistent per cpu operations V7 Tejun Heo

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=20140817173034.171175734@linux.com \
    --to=cl@linux.com \
    --cc=akpm@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oprofile-list@lists.sf.net \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=rric@kernel.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