[RFC PATCH 04/15] mips: fix warnings from CPHYSADDR() macro
Peter Mamonov
pmamonov at gmail.com
Thu May 17 06:58:47 PDT 2018
Signed-off-by: Peter Mamonov <pmamonov at gmail.com>
---
arch/mips/include/asm/addrspace.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h
index 17d480d08..04d0f95db 100644
--- a/arch/mips/include/asm/addrspace.h
+++ b/arch/mips/include/asm/addrspace.h
@@ -48,7 +48,12 @@
/*
* Returns the physical address of a CKSEGx / XKPHYS address
*/
+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
+#define CPHYSADDR(a) ((_ACAST64_(a)) & 0x1fffffff)
+#else
#define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff)
+#endif
+
#define XPHYSADDR(a) ((_ACAST64_(a)) & \
_CONST64_(0x000000ffffffffff))
--
2.17.0
More information about the barebox
mailing list