mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
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:
committed by
Jan Höppner
parent
67e76b8ebd
commit
24fe8c1d1b
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user