Skip to content

Commit 532d0d0

Browse files
Christoph Lameterhtejun
authored andcommitted
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>
1 parent eee8492 commit 532d0d0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/irqchip/irq-gic.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly;
102102
#ifdef CONFIG_GIC_NON_BANKED
103103
static void __iomem *gic_get_percpu_base(union gic_base *base)
104104
{
105-
return *__this_cpu_ptr(base->percpu_base);
105+
return raw_cpu_read(base->percpu_base);
106106
}
107107

108108
static void __iomem *gic_get_common_base(union gic_base *base)
@@ -504,11 +504,11 @@ static void gic_cpu_save(unsigned int gic_nr)
504504
if (!dist_base || !cpu_base)
505505
return;
506506

507-
ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
507+
ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
508508
for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
509509
ptr[i] = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
510510

511-
ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
511+
ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
512512
for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
513513
ptr[i] = readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4);
514514

@@ -530,11 +530,11 @@ static void gic_cpu_restore(unsigned int gic_nr)
530530
if (!dist_base || !cpu_base)
531531
return;
532532

533-
ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
533+
ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
534534
for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
535535
writel_relaxed(ptr[i], dist_base + GIC_DIST_ENABLE_SET + i * 4);
536536

537-
ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
537+
ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
538538
for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
539539
writel_relaxed(ptr[i], dist_base + GIC_DIST_CONFIG + i * 4);
540540

kernel/irq/chip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc)
669669
{
670670
struct irq_chip *chip = irq_desc_get_chip(desc);
671671
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);
673673
irqreturn_t res;
674674

675675
kstat_incr_irqs_this_cpu(irq, desc);

0 commit comments

Comments
 (0)