diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-16 11:14:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-16 11:14:54 -0500 |
commit | ef268de19756e6bc78cd3e6d9b15545f7df97ef2 (patch) | |
tree | 593c6ce06142726b120383c584dc7436abead9f3 /tools | |
parent | 50d25bdc64318a8a367c4433fa1e030c38331f05 (diff) | |
parent | b2fed34a628df6118b5d4e13f49a33e15f704fa9 (diff) |
Merge tag 'powerpc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman:
"Two weeks worth of fixes since rc1.
- I broke 16-byte alignment of the stack when we moved PPR into
pt_regs. Despite being required by the ABI this broke almost
nothing, we eventually hit it in code where GCC does arithmetic on
the stack pointer assuming the bottom 4 bits are clear. Fix it by
padding the in-kernel pt_regs by 8 bytes.
- A couple of commits fixing minor bugs in the recent SLB rewrite.
- A build fix related to tracepoints in KVM in some configurations.
- Our old "IO workarounds" code written for Cell couldn't coexist in
a kernel that runs on Power9 with the Radix MMU, fix that.
- Remove the NPU DMA ops, these just printed a warning and should
never have been called.
- Suppress an overly chatty message triggered by CPU hotplug in some
configs.
- Two small selftest fixes.
Thanks to: Alistair Popple, Gustavo Romero, Nicholas Piggin, Satheesh
Rajendran, Scott Wood"
* tag 'powerpc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
selftests/powerpc: Adjust wild_bctr to build with old binutils
powerpc/64: Fix kernel stack 16-byte alignment
powerpc/numa: Suppress "VPHN is not supported" messages
selftests/powerpc: Fix wild_bctr test to work on ppc64
powerpc/io: Fix the IO workarounds code to work with Radix
powerpc/mm/64s: Fix preempt warning in slb_allocate_kernel()
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
powerpc/mm/64s: Only use slbfee on CPUs that support it
powerpc/mm/64s: Use PPC_SLBFEE macro
powerpc/mm/64s: Consolidate SLB assertions
powerpc/powernv/npu: Remove NPU DMA ops
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/powerpc/mm/wild_bctr.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/tools/testing/selftests/powerpc/mm/wild_bctr.c b/tools/testing/selftests/powerpc/mm/wild_bctr.c index 1b0e9e9a2ddc..f2fa101c5a6a 100644 --- a/tools/testing/selftests/powerpc/mm/wild_bctr.c +++ b/tools/testing/selftests/powerpc/mm/wild_bctr.c | |||
@@ -47,8 +47,9 @@ static int ok(void) | |||
47 | return 0; | 47 | return 0; |
48 | } | 48 | } |
49 | 49 | ||
50 | #define REG_POISON 0x5a5aUL | 50 | #define REG_POISON 0x5a5a |
51 | #define POISONED_REG(n) ((REG_POISON << 48) | ((n) << 32) | (REG_POISON << 16) | (n)) | 51 | #define POISONED_REG(n) ((((unsigned long)REG_POISON) << 48) | ((n) << 32) | \ |
52 | (((unsigned long)REG_POISON) << 16) | (n)) | ||
52 | 53 | ||
53 | static inline void poison_regs(void) | 54 | static inline void poison_regs(void) |
54 | { | 55 | { |
@@ -105,6 +106,20 @@ static void dump_regs(void) | |||
105 | } | 106 | } |
106 | } | 107 | } |
107 | 108 | ||
109 | #ifdef _CALL_AIXDESC | ||
110 | struct opd { | ||
111 | unsigned long ip; | ||
112 | unsigned long toc; | ||
113 | unsigned long env; | ||
114 | }; | ||
115 | static struct opd bad_opd = { | ||
116 | .ip = BAD_NIP, | ||
117 | }; | ||
118 | #define BAD_FUNC (&bad_opd) | ||
119 | #else | ||
120 | #define BAD_FUNC BAD_NIP | ||
121 | #endif | ||
122 | |||
108 | int test_wild_bctr(void) | 123 | int test_wild_bctr(void) |
109 | { | 124 | { |
110 | int (*func_ptr)(void); | 125 | int (*func_ptr)(void); |
@@ -133,7 +148,7 @@ int test_wild_bctr(void) | |||
133 | 148 | ||
134 | poison_regs(); | 149 | poison_regs(); |
135 | 150 | ||
136 | func_ptr = (int (*)(void))BAD_NIP; | 151 | func_ptr = (int (*)(void))BAD_FUNC; |
137 | func_ptr(); | 152 | func_ptr(); |
138 | 153 | ||
139 | FAIL_IF(1); /* we didn't segv? */ | 154 | FAIL_IF(1); /* we didn't segv? */ |