unify {de,}mangle_poll(), get rid of kernel-side POLL...
[cris-mirror.git] / arch / powerpc / boot / xz_config.h
blobe22e5b3770ddcc32b4ee37fecc63893b96522535
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __XZ_CONFIG_H__
3 #define __XZ_CONFIG_H__
5 /*
6 * most of this is copied from lib/xz/xz_private.h, we can't use their defines
7 * since the boot wrapper is not built in the same environment as the rest of
8 * the kernel.
9 */
11 #include "types.h"
12 #include "swab.h"
14 static inline uint32_t swab32p(void *p)
16 uint32_t *q = p;
18 return swab32(*q);
21 #ifdef __LITTLE_ENDIAN__
22 #define get_le32(p) (*((uint32_t *) (p)))
23 #else
24 #define get_le32(p) swab32p(p)
25 #endif
27 #define memeq(a, b, size) (memcmp(a, b, size) == 0)
28 #define memzero(buf, size) memset(buf, 0, size)
30 /* prevent the inclusion of the xz-preboot MM headers */
31 #define DECOMPR_MM_H
32 #define memmove memmove
33 #define XZ_EXTERN static
35 /* xz.h needs to be included directly since we need enum xz_mode */
36 #include "../../../include/linux/xz.h"
38 #undef XZ_EXTERN
40 #endif