Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1632b9e2 authored by David Howells's avatar David Howells
Browse files

UAPI: Split trivial #if defined(__KERNEL__) && X conditionals



Split trivial #if defined(__KERNEL__) && X conditionals to make automated
disintegration easier.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent fdc29805
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@
#define HWCAP_IDIVT	(1 << 18)
#define HWCAP_IDIV	(HWCAP_IDIVA | HWCAP_IDIVT)

#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
#if defined(__KERNEL__)
#if !defined(__ASSEMBLY__)
/*
 * This yields a mask that user programs can use to figure out what
 * instruction set this cpu supports.
@@ -33,5 +34,6 @@
#define ELF_HWCAP	(elf_hwcap)
extern unsigned int elf_hwcap;
#endif
#endif

#endif
+5 −2
Original line number Diff line number Diff line
@@ -22,7 +22,8 @@
#  define __SWAB_64_THRU_32__
#endif

#if defined(__KERNEL__) && __LINUX_ARM_ARCH__ >= 6
#if defined(__KERNEL__)
#if __LINUX_ARM_ARCH__ >= 6

static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
{
@@ -38,8 +39,10 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
}
#define __arch_swab32 __arch_swab32

#else
#endif
#endif

#if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6
static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
{
	__u32 t;
+3 −1
Original line number Diff line number Diff line
@@ -427,7 +427,8 @@
/*
 * The following syscalls are obsolete and no longer available for EABI.
 */
#if defined(__ARM_EABI__) && !defined(__KERNEL__)
#if !defined(__KERNEL__)
#if defined(__ARM_EABI__)
#undef __NR_time
#undef __NR_umount
#undef __NR_stime
@@ -441,6 +442,7 @@
#undef __NR_syscall
#undef __NR_ipc
#endif
#endif

#ifdef __KERNEL__

+13 −8
Original line number Diff line number Diff line
@@ -201,16 +201,21 @@ extern long ia64_cmpxchg_called_with_bad_pointer (void);
#endif

#ifndef __ASSEMBLY__
#if defined(CONFIG_PARAVIRT) && defined(__KERNEL__)

#define IA64_INTRINSIC_API(name)	ia64_native_ ## name
#define IA64_INTRINSIC_MACRO(name)	ia64_native_ ## name

#if defined(__KERNEL__)
#if defined(CONFIG_PARAVIRT)
# undef IA64_INTRINSIC_API
# undef IA64_INTRINSIC_MACRO
# ifdef ASM_SUPPORTED
#  define IA64_INTRINSIC_API(name)	paravirt_ ## name
# else
#  define IA64_INTRINSIC_API(name)	pv_cpu_ops.name
# endif
#define IA64_INTRINSIC_MACRO(name)	paravirt_ ## name
#else
#define IA64_INTRINSIC_API(name)	ia64_native_ ## name
#define IA64_INTRINSIC_MACRO(name)	ia64_native_ ## name
#endif
#endif

/************************************************/
+7 −3
Original line number Diff line number Diff line
@@ -15,11 +15,15 @@
 * We don't use int-l64.h for the kernel anymore but still use it for
 * userspace to avoid code changes.
 */
#if (_MIPS_SZLONG == 64) && !defined(__KERNEL__)
#ifdef __KERNEL__
# include <asm-generic/int-ll64.h>
#else
# if _MIPS_SZLONG == 64
#  include <asm-generic/int-l64.h>
# else
#  include <asm-generic/int-ll64.h>
# endif
#endif

#ifndef __ASSEMBLY__

Loading