From 5eace91ee7bd76b8ab44291299ac313c87c9ecb8 Mon Sep 17 00:00:00 2001 From: Philipp Rudo Date: Tue, 8 Oct 2019 19:44:11 +0200 Subject: [PATCH] zipl: Define __noinline macro and make use of it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philipp Rudo Reviewed-by: Stefan Haberland Signed-off-by: Jan Höppner --- include/lib/zt_common.h | 1 + libutil/util_panic_example.c | 2 +- zipl/boot/libc.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/lib/zt_common.h b/include/lib/zt_common.h index 8b2992ab..68f8af01 100644 --- a/include/lib/zt_common.h +++ b/include/lib/zt_common.h @@ -32,6 +32,7 @@ #define __aligned(x) __attribute__((aligned(x))) #define __may_alias __attribute__((may_alias)) #define __section(x) __attribute__((__section__(#x))) +#define __noinline __attribute__((__noinline__)) typedef unsigned long long u64; typedef signed long long s64; diff --git a/libutil/util_panic_example.c b/libutil/util_panic_example.c index a676bce7..aa9c159a 100644 --- a/libutil/util_panic_example.c +++ b/libutil/util_panic_example.c @@ -15,10 +15,10 @@ #include #include +#include "lib/zt_common.h" #include "lib/util_panic.h" /* Make functions noinline to have a nice backtrace */ -#define __noinline __attribute__((noinline)) /* * Test util_panic() diff --git a/zipl/boot/libc.c b/zipl/boot/libc.c index a9b31913..764b7e68 100644 --- a/zipl/boot/libc.c +++ b/zipl/boot/libc.c @@ -345,7 +345,7 @@ void pgm_check_handler_fn(void) libc_stop(psw_old->addr); } -__attribute__ ((noinline)) void load_wait_psw(uint64_t psw_mask, struct psw_t *psw) +void __noinline load_wait_psw(uint64_t psw_mask, struct psw_t *psw) { struct psw_t wait_psw = { .mask = psw_mask, .addr = 0 }; struct psw_t old_psw, *wait_psw_ptr = &wait_psw;