summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2020-07-24 19:25:26 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-29 21:02:12 +1000
commit9ee571d84bf8cfdd587a1acbf3490ca90fc40c9d (patch)
treed11fb11bb05584220ae6d909380c7070275eca53 /tools/testing
parent63dee5df43a31f3844efabc58972f0a206ca4534 (diff)
selftests/powerpc: Update the stack expansion test
Update the stack expansion load/store test to take into account the new allowance of 4224 bytes below the stack pointer. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200724092528.1578671-3-mpe@ellerman.id.au
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/powerpc/mm/stack_expansion_ldst.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/testing/selftests/powerpc/mm/stack_expansion_ldst.c b/tools/testing/selftests/powerpc/mm/stack_expansion_ldst.c
index 0587e11437f5..8dbfb51acf0f 100644
--- a/tools/testing/selftests/powerpc/mm/stack_expansion_ldst.c
+++ b/tools/testing/selftests/powerpc/mm/stack_expansion_ldst.c
@@ -186,17 +186,17 @@ static void test_one_type(enum access_type type, unsigned long page_size, unsign
// But if we go past the rlimit it should fail
assert(test_one(DEFAULT_SIZE, rlim_cur + 1, type) != 0);
- // Above 1MB powerpc only allows accesses within 2048 bytes of
+ // Above 1MB powerpc only allows accesses within 4224 bytes of
// r1 for accesses that aren't stdu
- assert(test_one(1 * _MB + page_size - 128, -2048, type) == 0);
+ assert(test_one(1 * _MB + page_size - 128, -4224, type) == 0);
#ifdef __powerpc__
- assert(test_one(1 * _MB + page_size - 128, -2049, type) != 0);
+ assert(test_one(1 * _MB + page_size - 128, -4225, type) != 0);
#else
- assert(test_one(1 * _MB + page_size - 128, -2049, type) == 0);
+ assert(test_one(1 * _MB + page_size - 128, -4225, type) == 0);
#endif
// By consuming 2MB of stack we test the stdu case
- assert(test_one(2 * _MB + page_size - 128, -2048, type) == 0);
+ assert(test_one(2 * _MB + page_size - 128, -4224, type) == 0);
}
static int test(void)