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>,
nicolas.pitre@linaro.org,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: [PATCH 26/40] irqchips: Replace __this_cpu_ptr uses
Date: Thu, 19 Dec 2013 09:50:41 -0600 [thread overview]
Message-ID: <20131219155033.505853984@linux.com> (raw)
In-Reply-To: 20131219155015.443763038@linux.com
[-- Attachment #1: this_irqchip --]
[-- Type: text/plain, Size: 2639 bytes --]
[Patch depends on another patch in this series that introduces raw_cpu_ops]
These are generally replaced with raw_cpu_ptr. However, in
gic_get_percpu_base() we immediately dereference the pointer. This is
equivalent to a raw_cpu_read. So use that operation there.
Cc: nicolas.pitre@linaro.org
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Christoph Lameter <cl@linux.com>
Index: linux/drivers/irqchip/irq-gic.c
===================================================================
--- linux.orig/drivers/irqchip/irq-gic.c 2013-12-02 16:07:55.564473217 -0600
+++ linux/drivers/irqchip/irq-gic.c 2013-12-02 16:07:55.554473493 -0600
@@ -102,7 +102,7 @@ static struct gic_chip_data gic_data[MAX
#ifdef CONFIG_GIC_NON_BANKED
static void __iomem *gic_get_percpu_base(union gic_base *base)
{
- return *__this_cpu_ptr(base->percpu_base);
+ return raw_cpu_read(base->percpu_base);
}
static void __iomem *gic_get_common_base(union gic_base *base)
@@ -552,11 +552,11 @@ static void gic_cpu_save(unsigned int gi
if (!dist_base || !cpu_base)
return;
- ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
+ ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
ptr[i] = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
- ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
+ ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
ptr[i] = readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4);
@@ -578,11 +578,11 @@ static void gic_cpu_restore(unsigned int
if (!dist_base || !cpu_base)
return;
- ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
+ ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
writel_relaxed(ptr[i], dist_base + GIC_DIST_ENABLE_SET + i * 4);
- ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
+ ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
writel_relaxed(ptr[i], dist_base + GIC_DIST_CONFIG + i * 4);
Index: linux/kernel/irq/chip.c
===================================================================
--- linux.orig/kernel/irq/chip.c 2013-12-02 16:07:55.564473217 -0600
+++ linux/kernel/irq/chip.c 2013-12-02 16:07:55.554473493 -0600
@@ -638,7 +638,7 @@ void handle_percpu_devid_irq(unsigned in
{
struct irq_chip *chip = irq_desc_get_chip(desc);
struct irqaction *action = desc->action;
- void *dev_id = __this_cpu_ptr(action->percpu_dev_id);
+ void *dev_id = raw_cpu_ptr(action->percpu_dev_id);
irqreturn_t res;
kstat_incr_irqs_this_cpu(irq, desc);
next prev parent reply other threads:[~2013-12-19 15:50 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-19 15:50 [PATCH 00/40] percpu: Consistent per cpu operations V2 Christoph Lameter
2013-12-19 15:50 ` [PATCH 01/40] mm: Replace __get_cpu_var uses with this_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` [PATCH 02/40] tracing: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 03/40] percpu: Replace __get_cpu_var " Christoph Lameter
2013-12-19 15:50 ` [PATCH 04/40] kernel misc: Replace __get_cpu_var uses Christoph Lameter
2013-12-19 15:50 ` [PATCH 05/40] drivers/char/random: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 06/40] drivers/cpuidle: Replace __get_cpu_var uses for address calculation Christoph Lameter
2013-12-19 15:50 ` [PATCH 07/40] drivers/oprofile: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 08/40] drivers/leds: Replace __get_cpu_var use through this_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` [PATCH 09/40] drivers/clocksource: Replace __get_cpu_var used for address calculation Christoph Lameter
2013-12-19 15:50 ` [PATCH 10/40] staging/zsmalloc: Replace instances of using __get_cpu_var " Christoph Lameter
2013-12-19 15:50 ` [PATCH 11/40] parisc: Replace __get_cpu_var uses " Christoph Lameter
2013-12-19 15:50 ` [PATCH 12/40] metag: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 13/40] drivers/net/ethernet/tile: " Christoph Lameter
2013-12-19 15:59 ` Chris Metcalf
2013-12-19 15:50 ` [PATCH 14/40] percpu: Add raw_cpu_ops Christoph Lameter
2013-12-19 15:50 ` [PATCH 15/40] mm: Use raw_cpu ops for determining current NUMA node Christoph Lameter
2013-12-19 15:50 ` [PATCH 16/40] modules: Use raw_cpu_write for initialization of per cpu refcount Christoph Lameter
2013-12-19 15:50 ` [PATCH 17/40] net: Replace __this_cpu_inc in route.c with raw_cpu_inc Christoph Lameter
2013-12-19 15:50 ` [PATCH 18/40] percpu: Add preemption checks to __this_cpu ops Christoph Lameter
2013-12-19 17:16 ` David Daney
2013-12-19 17:37 ` Christoph Lameter
2013-12-19 15:50 ` [PATCH 19/40] time: Replace __get_cpu_var uses Christoph Lameter
2013-12-19 15:50 ` [PATCH 20/40] scheduler: Replace __get_cpu_var with this_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` [PATCH 21/40] block: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` [PATCH 22/40] rcu: Replace __this_cpu_ptr uses " Christoph Lameter
2013-12-19 15:50 ` [PATCH 23/40] watchdog: Replace __raw_get_cpu_var uses Christoph Lameter
2013-12-19 15:50 ` [PATCH 24/40] net: Replace get_cpu_var through this_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` [PATCH 25/40] md: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` Christoph Lameter [this message]
2013-12-19 15:50 ` [PATCH 27/40] x86: Replace __get_cpu_var uses Christoph Lameter
2013-12-19 15:50 ` [PATCH 28/40] arm: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` [PATCH 29/40] mips: Replace __get_cpu_var uses Christoph Lameter
2013-12-19 17:46 ` David Daney
2013-12-19 21:10 ` Christoph Lameter
2013-12-19 23:08 ` David Daney
2013-12-20 17:43 ` Christoph Lameter
2013-12-20 17:49 ` Christoph Lameter
2013-12-19 21:31 ` Christoph Lameter
2013-12-19 15:50 ` [PATCH 30/40] s390: rename __this_cpu_ptr to raw_cpu_ptr Christoph Lameter
2013-12-19 15:50 ` [PATCH 31/40] ia64: Replace __get_cpu_var uses Christoph Lameter
2013-12-19 15:50 ` [PATCH 32/40] powerpc: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 33/40] sparc: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 34/40] tile: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 35/40] blackfin: " Christoph Lameter
2013-12-19 15:50 ` [PATCH 36/40] avr32: Replace __get_cpu_var with __this_cpu_write Christoph Lameter
2013-12-19 15:50 ` [PATCH 37/40] alpha: Replace __get_cpu_var Christoph Lameter
2013-12-19 21:18 ` Richard Henderson
2013-12-19 21:47 ` Max Filippov
2013-12-20 17:59 ` Christoph Lameter
2013-12-19 15:50 ` [PATCH 38/40] sh: Replace __get_cpu_var uses Christoph Lameter
2013-12-19 15:50 ` [PATCH 39/40] Remove __get_cpu_var and __raw_get_cpu_var macros [only in 3.15] Christoph Lameter
2013-12-19 15:50 ` [PATCH 40/40] 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=20131219155033.505853984@linux.com \
--to=cl@linux.com \
--cc=akpm@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=peterz@infradead.org \
--cc=rmk+kernel@arm.linux.org.uk \
--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).