File s390-tools-sles15sp2-09-zipl-Define-__noinline-macro-and-make-use-of-it.patch of Package s390-tools.18705

Subject: [PATCH] [FEAT VS1804] zipl: Define __noinline macro and make use of it
From: Marc Hartmayer <mhartmay@linux.ibm.com>

Summary:     genprotimg: Introduce new tool for the creation of PV images
Description: genprotimg takes a kernel, host-key documents, optionally an
             initrd, optionally a file with the kernel command line, and it
             generates a single, loadable image file. The image consists of a
             concatenation of a plain text boot loader, the encrypted
             components for kernel, initrd, and cmdline, and the
             integrity-protected PV header, containing metadata necessary for
             running the guest in PV mode. It's possible to use this image file
             as a kernel for zIPL or for a direct kernel boot using QEMU.
Upstream-ID: 5eace91ee7bd76b8ab44291299ac313c87c9ecb8
Problem-ID:  VS1804

Upstream-Description:

             zipl: Define __noinline macro and make use of it

             Signed-off-by: Philipp Rudo <prudo@linux.ibm.com>
             Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
             Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>


Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
---
 include/lib/zt_common.h      |    1 +
 libutil/util_panic_example.c |    2 +-
 zipl/boot/libc.c             |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

--- 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;
--- a/libutil/util_panic_example.c
+++ b/libutil/util_panic_example.c
@@ -15,10 +15,10 @@
 #include <sys/resource.h>
 #include <sys/time.h>
 
+#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()
--- a/zipl/boot/libc.c
+++ b/zipl/boot/libc.c
@@ -473,7 +473,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;
openSUSE Build Service is sponsored by