linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Add KSEG*ADDR definitions to CONFIG_64BIT
@ 2019-12-10 17:27 Denis Efremov
  2019-12-10 18:57 ` Paul Burton
  0 siblings, 1 reply; 5+ messages in thread
From: Denis Efremov @ 2019-12-10 17:27 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Denis Efremov, Paul Burton, James Hogan, linux-mips, linux-kernel

The patch adds KSEG0ADDR, KSEG1ADDR, KSEG2ADDR, KSEG3ADDR
definitions to CONFIG_64BIT ifdef. This fixes broken compilation:
  CC      drivers/watchdog/mtx-1_wdt.o
In file included from drivers/watchdog/mtx-1_wdt.c:44:
./arch/mips/include/asm/mach-au1x00/au1000.h: In function ‘alchemy_rdsys’:
./arch/mips/include/asm/mach-au1x00/au1000.h:603:36: error: implicit
  declaration of function ‘KSEG1ADDR’; did you mean ‘CKSEG1ADDR’?
  [-Werror=implicit-function-declaration]

Signed-off-by: Denis Efremov <efremov@linux.com>
---
 arch/mips/include/asm/addrspace.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h
index 59a48c60a065..db663654c1fd 100644
--- a/arch/mips/include/asm/addrspace.h
+++ b/arch/mips/include/asm/addrspace.h
@@ -65,6 +65,10 @@
 #define XKSSEG			_CONST64_(0x4000000000000000)
 #define XKPHYS			_CONST64_(0x8000000000000000)
 #define XKSEG			_CONST64_(0xc000000000000000)
+#define KSEG0			_CONST64_(0xffffffff80000000)
+#define KSEG1			_CONST64_(0xffffffffa0000000)
+#define KSSEG			_CONST64_(0xffffffffc0000000)
+#define KSEG3			_CONST64_(0xffffffffe0000000)
 #define CKSEG0			_CONST64_(0xffffffff80000000)
 #define CKSEG1			_CONST64_(0xffffffffa0000000)
 #define CKSSEG			_CONST64_(0xffffffffc0000000)
@@ -75,6 +79,14 @@
 #define CKSEG2ADDR(a)		(CPHYSADDR(a) | CKSEG2)
 #define CKSEG3ADDR(a)		(CPHYSADDR(a) | CKSEG3)
 
+/*
+ * Map an address to a certain kernel segment
+ */
+#define KSEG0ADDR(a)		(CPHYSADDR(a) | KSEG0)
+#define KSEG1ADDR(a)		(CPHYSADDR(a) | KSEG1)
+#define KSEG2ADDR(a)		(CPHYSADDR(a) | KSEG2)
+#define KSEG3ADDR(a)		(CPHYSADDR(a) | KSEG3)
+
 #else
 
 #define CKSEG0ADDR(a)		(CPHYSADDR(a) | KSEG0)
-- 
2.20.1


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

end of thread, other threads:[~2019-12-11 10:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 17:27 [PATCH] MIPS: Add KSEG*ADDR definitions to CONFIG_64BIT Denis Efremov
2019-12-10 18:57 ` Paul Burton
2019-12-10 20:14   ` Denis Efremov
2019-12-10 23:04     ` Florian Fainelli
2019-12-11 10:27       ` Denis Efremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).