aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include/asm/vectors.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/include/asm/vectors.h')
-rw-r--r--arch/xtensa/include/asm/vectors.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/xtensa/include/asm/vectors.h b/arch/xtensa/include/asm/vectors.h
index 4220c6dac44f..fd99b25037a7 100644
--- a/arch/xtensa/include/asm/vectors.h
+++ b/arch/xtensa/include/asm/vectors.h
@@ -22,9 +22,13 @@
#include <asm/kmem_layout.h>
#if defined(CONFIG_MMU) && XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY
+#ifdef CONFIG_KERNEL_VIRTUAL_ADDRESS
+#define KERNELOFFSET CONFIG_KERNEL_VIRTUAL_ADDRESS
+#else
#define KERNELOFFSET (CONFIG_KERNEL_LOAD_ADDRESS + \
XCHAL_KSEG_CACHED_VADDR - \
XCHAL_KSEG_PADDR)
+#endif
#else
#define KERNELOFFSET CONFIG_KERNEL_LOAD_ADDRESS
#endif