diff options
author | Christoph Lameter <cl@linux.com> | 2014-08-17 13:30:39 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-08-26 13:45:48 -0400 |
commit | 532d0d0690d1532dcc5a190162ad820b636bcd4d (patch) | |
tree | 0e8223f94910d1bb0d7a9426c501d13a3023a9de | |
parent | eee8492db674a5c89daa83158d8bf2839efc8850 (diff) |
irqchips: Replace __this_cpu_ptr uses
[ARM specific]
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>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | drivers/irqchip/irq-gic.c | 10 | ||||
-rw-r--r-- | kernel/irq/chip.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 4b959e606fe8..399a707ec51e 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c | |||
@@ -102,7 +102,7 @@ static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; | |||
102 | #ifdef CONFIG_GIC_NON_BANKED | 102 | #ifdef CONFIG_GIC_NON_BANKED |
103 | static void __iomem *gic_get_percpu_base(union gic_base *base) | 103 | static void __iomem *gic_get_percpu_base(union gic_base *base) |
104 | { | 104 | { |
105 | return *__this_cpu_ptr(base->percpu_base); | 105 | return raw_cpu_read(base->percpu_base); |
106 | } | 106 | } |
107 | 107 | ||
108 | static void __iomem *gic_get_common_base(union gic_base *base) | 108 | static void __iomem *gic_get_common_base(union gic_base *base) |
@@ -504,11 +504,11 @@ static void gic_cpu_save(unsigned int gic_nr) | |||
504 | if (!dist_base || !cpu_base) | 504 | if (!dist_base || !cpu_base) |
505 | return; | 505 | return; |
506 | 506 | ||
507 | ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); | 507 | ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); |
508 | for (i = 0; i < DIV_ROUND_UP(32, 32); i++) | 508 | for (i = 0; i < DIV_ROUND_UP(32, 32); i++) |
509 | ptr[i] = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4); | 509 | ptr[i] = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4); |
510 | 510 | ||
511 | ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); | 511 | ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); |
512 | for (i = 0; i < DIV_ROUND_UP(32, 16); i++) | 512 | for (i = 0; i < DIV_ROUND_UP(32, 16); i++) |
513 | ptr[i] = readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4); | 513 | ptr[i] = readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4); |
514 | 514 | ||
@@ -530,11 +530,11 @@ static void gic_cpu_restore(unsigned int gic_nr) | |||
530 | if (!dist_base || !cpu_base) | 530 | if (!dist_base || !cpu_base) |
531 | return; | 531 | return; |
532 | 532 | ||
533 | ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); | 533 | ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); |
534 | for (i = 0; i < DIV_ROUND_UP(32, 32); i++) | 534 | for (i = 0; i < DIV_ROUND_UP(32, 32); i++) |
535 | writel_relaxed(ptr[i], dist_base + GIC_DIST_ENABLE_SET + i * 4); | 535 | writel_relaxed(ptr[i], dist_base + GIC_DIST_ENABLE_SET + i * 4); |
536 | 536 | ||
537 | ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); | 537 | ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); |
538 | for (i = 0; i < DIV_ROUND_UP(32, 16); i++) | 538 | for (i = 0; i < DIV_ROUND_UP(32, 16); i++) |
539 | writel_relaxed(ptr[i], dist_base + GIC_DIST_CONFIG + i * 4); | 539 | writel_relaxed(ptr[i], dist_base + GIC_DIST_CONFIG + i * 4); |
540 | 540 | ||
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index a2b28a2fd7b1..cca7292fc61e 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -669,7 +669,7 @@ void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc) | |||
669 | { | 669 | { |
670 | struct irq_chip *chip = irq_desc_get_chip(desc); | 670 | struct irq_chip *chip = irq_desc_get_chip(desc); |
671 | struct irqaction *action = desc->action; | 671 | struct irqaction *action = desc->action; |
672 | void *dev_id = __this_cpu_ptr(action->percpu_dev_id); | 672 | void *dev_id = raw_cpu_ptr(action->percpu_dev_id); |
673 | irqreturn_t res; | 673 | irqreturn_t res; |
674 | 674 | ||
675 | kstat_incr_irqs_this_cpu(irq, desc); | 675 | kstat_incr_irqs_this_cpu(irq, desc); |