zipl: move __always_inline/barrier/__pa32/pa to zt_common.h

Move `__always_inline/barrier/__pa32/pa` to `lib/zt_common.h` as this
is non-architecture dependent code.

Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2019-12-09 16:24:38 +01:00
committed by Jan Höppner
parent 67e76b8ebd
commit 24fe8c1d1b
2 changed files with 12 additions and 9 deletions
+12
View File
@@ -55,6 +55,18 @@
#define __may_alias __attribute__((may_alias))
#define __section(x) __attribute__((__section__(#x)))
#define __noinline __attribute__((__noinline__))
/* The Linux kernel (in stddef.h) and glibc (sys/cdefs.h) define
* __always_inline. Therefore undefine it first to allow the headers
* to be included first.
*/
#undef __always_inline
#define __always_inline inline __attribute__((always_inline))
#define __pa32(x) ((uint32_t)(unsigned long)(x))
#define __pa(x) ((unsigned long)(x))
#define barrier() __asm__ __volatile__("": : :"memory")
typedef unsigned long long u64;
typedef signed long long s64;
-9
View File
@@ -15,16 +15,7 @@
#include "libc.h"
#include "boot/sigp.h"
#define __pa32(x) ((uint32_t)(unsigned long)(x))
#define __pa(x) ((unsigned long)(x))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define barrier() __asm__ __volatile__("": : :"memory")
/* The Linux kernel (in stddef.h) and glibc (sys/cdefs.h) define
* __always_inline. Therefore undefine it first to allow the headers
* to be included first.
*/
#undef __always_inline
#define __always_inline inline __attribute__((always_inline))
/*
* Helper macro for exception table entries