public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* some question about arm64 smp_spin_table.c
@ 2015-05-27  9:47 yoma sophian
  2015-05-27 10:06 ` Arnd Bergmann
  2015-05-27 10:36 ` Mark Rutland
  0 siblings, 2 replies; 6+ messages in thread
From: yoma sophian @ 2015-05-27  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

hi all:
in arm64/kernel/smp_spin_table.c
    --> smp_spin_table_prepare_cpu,
we suppose the cpu_release_addr[cpu] is located in kernel logical memory.

in Arm plarform, this part is implement by each platform driver, since
they register its own smp_operations.

And in Arm64, once other platform use different area, such as register
or device memory, to put cpu_release_addr[cpu], shall we use ioremap
to get the va like below patch?

Appreciate your kind in advance,

diff --git a/arch/arm64/kernel/smp_spin_table.c
b/arch/arm64/kernel/smp_spin_table.c
index 7c35fa6..9d945bd 100644
--- a/arch/arm64/kernel/smp_spin_table.c
+++ b/arch/arm64/kernel/smp_spin_table.c
@@ -21,6 +21,7 @@
 #include <linux/smp.h>

 #include <asm/cacheflush.h>
+#include <linux/io.h>

 static phys_addr_t cpu_release_addr[NR_CPUS];

@@ -47,10 +48,9 @@ static int __init smp_spin_table_prepare_cpu(int cpu)
        if (!cpu_release_addr[cpu])
                return -ENODEV;

-       release_addr = __va(cpu_release_addr[cpu]);
+       release_addr = ioremap(cpu_release_addr[cpu], SZ_4K);
        release_addr[0] = (void *)__pa(secondary_holding_pen);
-       __flush_dcache_area(release_addr, sizeof(release_addr[0]));
-
+       iounmap(release_addr);
        /*
         * Send an event to wake up the secondary CPU.
         */

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-27 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27  9:47 some question about arm64 smp_spin_table.c yoma sophian
2015-05-27 10:06 ` Arnd Bergmann
2015-05-27 12:09   ` yoma sophian
2015-05-27 10:36 ` Mark Rutland
2015-05-27 12:24   ` yoma sophian
2015-05-27 12:41     ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox