[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [PATCH 33/40] arm64: gic: implement the REG_WRITE32/REG_READ32



Implement the REG_WRITE32/REG_READ32.

This patch refers to Chen Baozi's patch:
     "Initial codes for arm64"

Change-Id: I942d68d7e9ed31382951a2bfebd29d87acc84281
Jira: ENTOS-247
Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>
---
 arch/arm/gic.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/gic.c b/arch/arm/gic.c
index e72c723..ce7f7c8 100644
--- a/arch/arm/gic.c
+++ b/arch/arm/gic.c
@@ -44,14 +44,22 @@ static struct gic gic;
 static inline uint32_t REG_READ32(volatile uint32_t *addr)
 {
     uint32_t value;
+#if defined(__arm__)
     __asm__ __volatile__("ldr %0, [%1]":"=&r"(value):"r"(addr));
+#else
+    __asm__ __volatile__("ldr %w0, [%1]":"=&r"(value):"r"(addr));
+#endif
     rmb();
     return value;
 }
 
 static inline void REG_WRITE32(volatile uint32_t *addr, unsigned int value)
 {
+#if defined(__arm__)
     __asm__ __volatile__("str %0, [%1]"::"r"(value), "r"(addr));
+#else
+    __asm__ __volatile__("str %w0, [%1]"::"r" (value), "r"(addr));
+#endif
     wmb();
 }
 
-- 
2.7.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.