aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-16 11:10:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-16 11:10:27 -0500
commit50d25bdc64318a8a367c4433fa1e030c38331f05 (patch)
treeeb191d2950ae55da3855254c04db65d62757f4d5
parent59749c2d49bf28df69ac4bcabf1f69b00d3dca59 (diff)
parent40dc948f234b73497c3278875eb08a01d5854d3f (diff)
Merge tag 'xtensa-20181115' of git://github.com/jcmvbkbc/linux-xtensa
Pull Xtensa fixes from Max Filippov: - fix stack alignment for bFLT binaries. - fix physical-to-virtual address translation for boot parameters in MMUv3 256+256 and 512+512 virtual memory layouts. * tag 'xtensa-20181115' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: fix boot parameters address translation xtensa: make sure bFLT stack is 16 byte aligned
-rw-r--r--arch/xtensa/include/asm/processor.h6
-rw-r--r--arch/xtensa/kernel/head.S7
2 files changed, 10 insertions, 3 deletions
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h
index be9bfd9aa865..34a23016dd14 100644
--- a/arch/xtensa/include/asm/processor.h
+++ b/arch/xtensa/include/asm/processor.h
@@ -23,7 +23,11 @@
23# error Linux requires the Xtensa Windowed Registers Option. 23# error Linux requires the Xtensa Windowed Registers Option.
24#endif 24#endif
25 25
26#define ARCH_SLAB_MINALIGN XCHAL_DATA_WIDTH 26/* Xtensa ABI requires stack alignment to be at least 16 */
27
28#define STACK_ALIGN (XCHAL_DATA_WIDTH > 16 ? XCHAL_DATA_WIDTH : 16)
29
30#define ARCH_SLAB_MINALIGN STACK_ALIGN
27 31
28/* 32/*
29 * User space process size: 1 GB. 33 * User space process size: 1 GB.
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index 2f76118ecf62..9053a5622d2c 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -88,9 +88,12 @@ _SetupMMU:
88 initialize_mmu 88 initialize_mmu
89#if defined(CONFIG_MMU) && XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY 89#if defined(CONFIG_MMU) && XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY
90 rsr a2, excsave1 90 rsr a2, excsave1
91 movi a3, 0x08000000 91 movi a3, XCHAL_KSEG_PADDR
92 bltu a2, a3, 1f
93 sub a2, a2, a3
94 movi a3, XCHAL_KSEG_SIZE
92 bgeu a2, a3, 1f 95 bgeu a2, a3, 1f
93 movi a3, 0xd0000000 96 movi a3, XCHAL_KSEG_CACHED_VADDR
94 add a2, a2, a3 97 add a2, a2, a3
95 wsr a2, excsave1 98 wsr a2, excsave1
961: 991: