Thread (29 messages) 29 messages, 8 authors, 2014-09-19

Re: linux-next: Tree for Sep 1

From: Nicolas Pitre <hidden>
Date: 2014-09-05 19:27:57
Also in: lkml

On Tue, 2 Sep 2014, Christoph Lameter wrote:
quoted hunk ↗ jump to hunk
On Tue, 2 Sep 2014, Christoph Lameter wrote:
quoted
Oww.. This is double indirection deal there. A percpu offset pointing to
a pointer?

Generally the following is true (definition from
include/asm-generic/percpu.h that is used for ARM for raw_cpu_read):

#define raw_cpu_read_4(pcp)             (*raw_cpu_ptr(&(pcp)))
I think what the issue is that we dropped the fetch of the percpu offset
in the patch. Instead we are using the address of the variable that
contains the offset. Does this patch fix it?


Subject: irqchip: Properly fetch the per cpu offset

The raw_cpu_read() conversion dropped the fetch of the offset
from base->percpu_base in gic_get_percpu_base.

Signed-off-by: Christoph Lameter <redacted>

Index: linux/drivers/irqchip/irq-gic.c
===================================================================
--- linux.orig/drivers/irqchip/irq-gic.c
+++ linux/drivers/irqchip/irq-gic.c
@@ -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 raw_cpu_read(base->percpu_base);
+	return raw_cpu_read(*base->percpu_base);
Isn't the pointer dereference supposed to be performed _outside_ the per 
CPU accessor?


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help