xtensa: clean up optional XCHAL_* definitions
authorMax Filippov <jcmvbkbc@gmail.com>
Sat, 1 Feb 2020 05:20:58 +0000 (21:20 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Sat, 1 Feb 2020 08:43:28 +0000 (00:43 -0800)
Simplify users of XCHAL_HAVE_EXTERN_REGS and XCHAL_HAVE_VECBASE and
always define them as 0 if they're not defined in the variant/core.h

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/include/asm/core.h
arch/xtensa/include/asm/processor.h
arch/xtensa/include/asm/vectors.h

index 5b4acb7d1c0738774f8b3b2a1c306bc5277a665f..5590b0f688376cd75acbaaed5d991110c909257d 100644 (file)
 #define XCHAL_HAVE_EXCLUSIVE 0
 #endif
 
+#ifndef XCHAL_HAVE_EXTERN_REGS
+#define XCHAL_HAVE_EXTERN_REGS 0
+#endif
+
 #ifndef XCHAL_HAVE_MPU
 #define XCHAL_HAVE_MPU 0
 #endif
 
+#ifndef XCHAL_HAVE_VECBASE
+#define XCHAL_HAVE_VECBASE 0
+#endif
+
 #ifndef XCHAL_SPANNING_WAY
 #define XCHAL_SPANNING_WAY 0
 #endif
index 6fa903daf2a2eb1e458c9b76433df8fa7a85176c..7f63aca6a0d340632646ccceb9f31ae63b878402 100644 (file)
@@ -237,10 +237,6 @@ extern unsigned long get_wchan(struct task_struct *p);
         v; \
         })
 
-#ifndef XCHAL_HAVE_EXTERN_REGS
-#define XCHAL_HAVE_EXTERN_REGS 0
-#endif
-
 #if XCHAL_HAVE_EXTERN_REGS
 
 static inline void set_er(unsigned long value, unsigned long addr)
index fd99b25037a7520813df4dd4e151ab8d172840d6..140f30762cf9fed981fb5461694b1bc8c0f14620 100644 (file)
@@ -40,7 +40,7 @@
 #define VECBASE_VADDR                  _vecbase
 #endif
 
-#if defined(XCHAL_HAVE_VECBASE) && XCHAL_HAVE_VECBASE
+#if XCHAL_HAVE_VECBASE
 
 #define VECTOR_VADDR(offset)           (VECBASE_VADDR + offset)