Skip to contentSkip to conversation

ARM: fix __div64_32() error when compiling with clang

PATCH RESEND Superseded Antony Yu 8 participants 17 messages Nov 23, 2020 – Nov 30, 2020 Arm (32-bit)

lore
Share & tools
lore

Antony Yu

author
#0 lore raw

PATCH RESEND 1/1 ARM: fix __div64_32() error when compiling with clang

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -2
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 	asm(	__asmeq("%0", __xh)
 		__asmeq("%1", "r2")
 		__asmeq("%2", "r0")
-		__asmeq("%3", "r4")
+		__asmeq("%3", "r0")
+		__asmeq("%4", "r4")
 		"bl	__do_div64"
-		: "=r" (__rem), "=r" (__res)
+		: "=r" (__rem), "=r" (__res), "=r" (__n)
 		: "r" (__n), "r" (__base)
 		: "ip", "lr", "cc");
 	*n = __res;
Signature · 1 line
2.23.0
#1 lore raw
Quoted 30 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -2
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 	asm(	__asmeq("%0", __xh)
 		__asmeq("%1", "r2")
 		__asmeq("%2", "r0")
-		__asmeq("%3", "r4")
+		__asmeq("%3", "r0")
+		__asmeq("%4", "r4")
 		"bl	__do_div64"
-		: "=r" (__rem), "=r" (__res)
+		: "=r" (__rem), "=r" (__res), "=r" (__n)
 		: "r" (__n), "r" (__base)
 		: "ip", "lr", "cc");
 	*n = __res;
Signature · 1 line
2.23.0

I am not sure that I am qualified to review this (my assembly knowledge is not the best) but your commit title mentions an error when compiling with clang. What is the exact error, what configuration generates it, and what version of clang? We have done fairly decent testing for 32-bit ARM, I would like to know what we are missing.

Cheers,
Nathan

author
#2 lore raw
Quoted 38 lines · Nathan Chancellor
Quoted 30 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -2
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 	asm(	__asmeq("%0", __xh)
 		__asmeq("%1", "r2")
 		__asmeq("%2", "r0")
-		__asmeq("%3", "r4")
+		__asmeq("%3", "r0")
+		__asmeq("%4", "r4")
 		"bl	__do_div64"
-		: "=r" (__rem), "=r" (__res)
+		: "=r" (__rem), "=r" (__res), "=r" (__n)
 		: "r" (__n), "r" (__base)
 		: "ip", "lr", "cc");
 	*n = __res;
Signature · 1 line
2.23.0

I am not sure that I am qualified to review this (my assembly knowledge is not the best) but your commit title mentions an error when compiling with clang. What is the exact error, what configuration generates it, and what version of clang? We have done fairly decent testing for 32-bit ARM, I would like to know what we are missing.

Quoted 2 lines

Cheers,
Nathan

We have run fail on android R vts vts_libsnapshot_test with kernel 4.14. This bug is triggered accidently by a workaround patch in our code base. It is fine on a pure clean 4.14 branch since __do_div64 may not be executed in skip_metadata.

The attachment are .i and generated .s file. .s file can be reproduced with clang -target arm-linux-eabi -march=armv8.2-a -O2.

In function skip_metadata, it loads some value to r0, calls __do_div64, adds 1 to r0 and stores it to [r5]. It gets wrong value since __do_div64 clobbers r0 register.

We have tried clang-10, clang-11 and android prebuilt clang-r383902b. All of them have the same problem.

# 1 "drivers/md/dm-snap-persistent.c"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 366 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "././include/linux/kconfig.h" 1

# 1 "./include/generated/autoconf.h" 1
# 6 "././include/linux/kconfig.h" 2
# 74 "././include/linux/kconfig.h"
# 1 "./include/linux/compiler_types.h" 1
# 58 "./include/linux/compiler_types.h"
# 1 "./include/linux/compiler-gcc.h" 1
# 59 "./include/linux/compiler_types.h" 2
# 78 "./include/linux/compiler_types.h"
# 1 "./include/linux/compiler-clang.h" 1
# 79 "./include/linux/compiler_types.h" 2
# 99 "./include/linux/compiler_types.h"
struct ftrace_branch_data {
const char *func;
const char *file;
unsigned line;
union {
struct {
unsigned long correct;
unsigned long incorrect;
};
struct {
unsigned long miss;
unsigned long hit;
};
unsigned long miss_hit[2];
};
};

struct ftrace_likely_data {
struct ftrace_branch_data data;
unsigned long constant;
};
# 75 "././include/linux/kconfig.h" 2
# 2 "<built-in>" 2
# 1 "drivers/md/dm-snap-persistent.c" 2

# 1 "drivers/md/dm-exception-store.h" 1
# 13 "drivers/md/dm-exception-store.h"
# 1 "./include/linux/blkdev.h" 1

# 1 "./include/linux/sched.h" 1
# 10 "./include/linux/sched.h"
# 1 "./include/uapi/linux/sched.h" 1
# 11 "./include/linux/sched.h" 2

# 1 "./arch/arm/include/generated/asm/current.h" 1 # 1 "./include/asm-generic/current.h" 1

# 1 "./include/linux/thread_info.h" 1
# 11 "./include/linux/thread_info.h"
# 1 "./include/linux/types.h" 1

# 1 "./include/uapi/linux/types.h" 1

# 1 "./arch/arm/include/uapi/asm/types.h" 1

# 1 "./include/asm-generic/int-ll64.h" 1
# 11 "./include/asm-generic/int-ll64.h"
# 1 "./include/uapi/asm-generic/int-ll64.h" 1
# 12 "./include/uapi/asm-generic/int-ll64.h"
# 1 "./arch/arm/include/generated/uapi/asm/bitsperlong.h" 1 # 1 "./include/asm-generic/bitsperlong.h" 1

# 1 "./include/uapi/asm-generic/bitsperlong.h" 1
# 6 "./include/asm-generic/bitsperlong.h" 2
# 2 "./arch/arm/include/generated/uapi/asm/bitsperlong.h" 2 # 13 "./include/uapi/asm-generic/int-ll64.h" 2

typedef __signed__ char __s8;
typedef unsigned char __u8;

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;

__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
# 12 "./include/asm-generic/int-ll64.h" 2

typedef signed char s8;
typedef unsigned char u8;

typedef signed short s16;
typedef unsigned short u16;

typedef signed int s32;
typedef unsigned int u32;

typedef signed long long s64;
typedef unsigned long long u64;
# 6 "./arch/arm/include/uapi/asm/types.h" 2
# 6 "./include/uapi/linux/types.h" 2

# 1 "./include/uapi/linux/posix_types.h" 1

# 1 "./include/linux/stddef.h" 1

# 1 "./include/uapi/linux/stddef.h" 1
# 6 "./include/linux/stddef.h" 2

enum {
false = 0,
true = 1
};
# 6 "./include/uapi/linux/posix_types.h" 2 # 25 "./include/uapi/linux/posix_types.h" typedef struct {
unsigned long fds_bits[1024 / (8 * sizeof(long))];
} __kernel_fd_set;

typedef void (*__kernel_sighandler_t)(int);

typedef int __kernel_key_t;
typedef int __kernel_mqd_t;

# 1 "./arch/arm/include/uapi/asm/posix_types.h" 1
# 23 "./arch/arm/include/uapi/asm/posix_types.h"
typedef unsigned short __kernel_mode_t;

typedef unsigned short __kernel_ipc_pid_t;

typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;

typedef unsigned short __kernel_old_dev_t;

# 1 "./include/uapi/asm-generic/posix_types.h" 1

# 1 "./arch/arm/include/generated/uapi/asm/bitsperlong.h" 1 # 6 "./include/uapi/asm-generic/posix_types.h" 2
# 15 "./include/uapi/asm-generic/posix_types.h" typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;

typedef __kernel_ulong_t __kernel_ino_t;

typedef int __kernel_pid_t;
# 41 "./include/uapi/asm-generic/posix_types.h"
typedef __kernel_long_t __kernel_suseconds_t;

typedef int __kernel_daddr_t;

typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;

typedef __kernel_uid_t __kernel_old_uid_t;
typedef __kernel_gid_t __kernel_old_gid_t;
# 68 "./include/uapi/asm-generic/posix_types.h"
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
# 79 "./include/uapi/asm-generic/posix_types.h"
typedef struct {
int val[2];
} __kernel_fsid_t;

typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t;
typedef __kernel_long_t __kernel_time_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t;
# 37 "./arch/arm/include/uapi/asm/posix_types.h" 2 # 37 "./include/uapi/linux/posix_types.h" 2 # 15 "./include/uapi/linux/types.h" 2
# 29 "./include/uapi/linux/types.h" typedef __u16 __le16;
typedef __u16 __be16;
typedef __u32 __le32;
typedef __u32 __be32;
typedef __u64 __le64;
typedef __u64 __be64;

typedef __u16 __sum16;
typedef __u32 __wsum;
# 7 "./include/linux/types.h" 2

typedef __u32 __kernel_dev_t;

typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
typedef __kernel_mode_t mode_t;
typedef unsigned short umode_t;
typedef __u32 nlink_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
typedef __kernel_daddr_t daddr_t;
typedef __kernel_key_t key_t;
typedef __kernel_suseconds_t suseconds_t;
typedef __kernel_timer_t timer_t;
typedef __kernel_clockid_t clockid_t;
typedef __kernel_mqd_t mqd_t;

typedef _Bool bool;

typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
typedef __kernel_uid16_t uid16_t;
typedef __kernel_gid16_t gid16_t;

typedef unsigned long uintptr_t;

typedef __kernel_old_uid_t old_uid_t;
typedef __kernel_old_gid_t old_gid_t;

typedef __kernel_loff_t loff_t;
# 55 "./include/linux/types.h"
typedef __kernel_size_t size_t;

typedef __kernel_ssize_t ssize_t;

typedef __kernel_ptrdiff_t ptrdiff_t;

typedef __kernel_time_t time_t;

typedef __kernel_clock_t clock_t;

typedef __kernel_caddr_t caddr_t;

typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;

typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;

typedef __u8 u_int8_t;
typedef __s8 int8_t;
typedef __u16 u_int16_t;
typedef __s16 int16_t;
typedef __u32 u_int32_t;
typedef __s32 int32_t;

typedef __u8 uint8_t;
typedef __u16 uint16_t;
typedef __u32 uint32_t;

typedef __u64 uint64_t;
typedef __u64 u_int64_t;
typedef __s64 int64_t;
# 131 "./include/linux/types.h"
typedef u64 sector_t;
typedef u64 blkcnt_t;
# 155 "./include/linux/types.h"
typedef u32 dma_addr_t;

typedef unsigned gfp_t;
typedef unsigned fmode_t;

typedef u32 phys_addr_t;

typedef phys_addr_t resource_size_t;

typedef unsigned long irq_hw_number_t;

typedef struct {
int counter;
} atomic_t;

struct list_head {
struct list_head *next, *prev;
};

struct hlist_head {
struct hlist_node *first;
};

struct hlist_node {
struct hlist_node *next, **pprev;
};

struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
char f_fname[6];
char f_fpack[6];
};
# 223 "./include/linux/types.h"
struct callback_head {
struct callback_head *next;
void (*func)(struct callback_head *head);
} __attribute__((aligned(sizeof(void *))));

typedef void (*rcu_callback_t)(struct callback_head *head);
typedef void (*call_rcu_func_t)(struct callback_head *head, rcu_callback_t func); # 12 "./include/linux/thread_info.h" 2
# 1 "./include/linux/bug.h" 1

# 1 "./arch/arm/include/asm/bug.h" 1

# 1 "./include/linux/linkage.h" 1

# 1 "./include/linux/stringify.h" 1
# 7 "./include/linux/linkage.h" 2
# 1 "./include/linux/export.h" 1
# 27 "./include/linux/export.h"
struct kernel_symbol
{
unsigned long value;
const char *name;
};
# 8 "./include/linux/linkage.h" 2
# 1 "./arch/arm/include/asm/linkage.h" 1
# 9 "./include/linux/linkage.h" 2
# 6 "./arch/arm/include/asm/bug.h" 2

# 1 "./arch/arm/include/asm/opcodes.h" 1
# 14 "./arch/arm/include/asm/opcodes.h"
extern unsigned int arm_check_condition(u32 opcode, u32 psr); # 89 "./arch/arm/include/asm/opcodes.h"
# 1 "./include/linux/swab.h" 1

# 1 "./include/uapi/linux/swab.h" 1

# 1 "./include/linux/compiler.h" 1
# 180 "./include/linux/compiler.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline))
void __read_once_size(const volatile void *p, void *res, int size)
{
({ switch (size) { case 1: *(__u8 *)res = *(volatile __u8 *)p; break; case 2: *(__u16 *)res = *(volatile __u16 *)p; break; case 4: *(__u32 *)res = *(volatile __u32 *)p; break; case 8: *(__u64 *)res = *(volatile __u64 *)p; break; default: __asm__ __volatile__("": : :"memory"); __builtin_memcpy((void *)res, (const void *)p, size); __asm__ __volatile__("": : :"memory"); } });
}
# 198 "./include/linux/compiler.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline))
void __read_once_size_nocheck(const volatile void *p, void *res, int size)
{
({ switch (size) { case 1: *(__u8 *)res = *(volatile __u8 *)p; break; case 2: *(__u16 *)res = *(volatile __u16 *)p; break; case 4: *(__u32 *)res = *(volatile __u32 *)p; break; case 8: *(__u64 *)res = *(volatile __u64 *)p; break; default: __asm__ __volatile__("": : :"memory"); __builtin_memcpy((void *)res, (const void *)p, size); __asm__ __volatile__("": : :"memory"); } });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void __write_once_size(volatile void *p, void *res, int size) {
switch (size) {
case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
default:
__asm__ __volatile__("": : :"memory");
__builtin_memcpy((void *)p, (const void *)res, size);
__asm__ __volatile__("": : :"memory");
}
}
# 240 "./include/linux/compiler.h"
# 1 "./arch/arm/include/asm/barrier.h" 1
# 82 "./arch/arm/include/asm/barrier.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long array_index_mask_nospec(unsigned long idx,
unsigned long sz)
{
unsigned long mask;

asm volatile(
"cmp %1, %2\n"
" sbc %0, %1, %1\n"
".inst 0xe320f014"
: "=r" (mask)
: "r" (idx), "Ir" (sz)
: "cc");

return mask;
}

# 1 "./include/asm-generic/barrier.h" 1
# 20 "./include/asm-generic/barrier.h"
# 1 "./include/linux/compiler.h" 1
# 21 "./include/asm-generic/barrier.h" 2
# 101 "./arch/arm/include/asm/barrier.h" 2
# 241 "./include/linux/compiler.h" 2
# 1 "./include/linux/kasan-checks.h" 1

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void kasan_check_read(const volatile void *p, unsigned int size) { }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void kasan_check_write(const volatile void *p, unsigned int size) { }
# 242 "./include/linux/compiler.h" 2
# 261 "./include/linux/compiler.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline))
unsigned long read_word_at_a_time(const void *addr)
{
kasan_check_read(addr, 1);
return *(unsigned long *)addr;
}
# 7 "./include/uapi/linux/swab.h" 2
# 1 "./arch/arm/include/generated/uapi/asm/bitsperlong.h" 1
# 8 "./include/uapi/linux/swab.h" 2
# 1 "./arch/arm/include/asm/swab.h" 1
# 19 "./arch/arm/include/asm/swab.h"
# 1 "./arch/arm/include/uapi/asm/swab.h" 1
# 20 "./arch/arm/include/asm/swab.h" 2

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) __u32 __arch_swahb32(__u32 x) {
__asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x));
return x;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) __u32 __arch_swab32(__u32 x) {
__asm__ ("rev %0, %1" : "=r" (x) : "r" (x));
return x;
}
# 9 "./include/uapi/linux/swab.h" 2
# 48 "./include/uapi/linux/swab.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) __u16 __fswab16(__u16 val) {

return ((__u16)__arch_swahb32(val));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) __u32 __fswab32(__u32 val) {

return __arch_swab32(val);

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) __u64 __fswab64(__u64 val) {

__u32 h = val >> 32;
__u32 l = val & ((1ULL << 32) - 1);
return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) __u32 __fswahw32(__u32 val) {

return ((__u32)( (((__u32)(val) & (__u32)0x0000ffffUL) << 16) | (((__u32)(val) & (__u32)0xffff0000UL) >> 16)));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) __u32 __fswahb32(__u32 val) {

return __arch_swahb32(val);

}
# 136 "./include/uapi/linux/swab.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) unsigned long __swab(const unsigned long y) {

return (__builtin_constant_p((__u32)(y)) ? ((__u32)( (((__u32)(y) & (__u32)0x000000ffUL) << 24) | (((__u32)(y) & (__u32)0x0000ff00UL) << 8) | (((__u32)(y) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(y) & (__u32)0xff000000UL) >> 24))) : __fswab32(y));

}
# 171 "./include/uapi/linux/swab.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u16 __swab16p(const __u16 *p) {

return (__builtin_constant_p((__u16)(*p)) ? ((__u16)( (((__u16)(*p) & (__u16)0x00ffU) << 8) | (((__u16)(*p) & (__u16)0xff00U) >> 8))) : __fswab16(*p));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u32 __swab32p(const __u32 *p) {

return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x000000ffUL) << 24) | (((__u32)(*p) & (__u32)0x0000ff00UL) << 8) | (((__u32)(*p) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(*p) & (__u32)0xff000000UL) >> 24))) : __fswab32(*p));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u64 __swab64p(const __u64 *p) {

return (__builtin_constant_p((__u64)(*p)) ? ((__u64)( (((__u64)(*p) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(*p) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(*p) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(*p) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(*p) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(*p) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(*p) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(*p) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(*p));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u32 __swahw32p(const __u32 *p) {

return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x0000ffffUL) << 16) | (((__u32)(*p) & (__u32)0xffff0000UL) >> 16))) : __fswahw32(*p));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u32 __swahb32p(const __u32 *p) {

return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(*p) & (__u32)0xff00ff00UL) >> 8))) : __fswahb32(*p));

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __swab16s(__u16 *p) {

*p = __swab16p(p);

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void __swab32s(__u32 *p) {

*p = __swab32p(p);

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void __swab64s(__u64 *p) {

*p = __swab64p(p);

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __swahw32s(__u32 *p) {

*p = __swahw32p(p);

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __swahb32s(__u32 *p) {

*p = __swahb32p(p);

}
# 6 "./include/linux/swab.h" 2
# 90 "./arch/arm/include/asm/opcodes.h" 2
# 8 "./arch/arm/include/asm/bug.h" 2
# 60 "./arch/arm/include/asm/bug.h"
# 1 "./include/asm-generic/bug.h" 1
# 16 "./include/asm-generic/bug.h"
# 1 "./include/linux/kernel.h" 1

# 1 "/home/fann/src/DB1101/kernel/android/R/prebuilts/clang/host/linux-x86/clang-r383902b/lib64/clang/11.0.2/include/stdarg.h" 1 3 # 14 "/home/fann/src/DB1101/kernel/android/R/prebuilts/clang/host/linux-x86/clang-r383902b/lib64/clang/11.0.2/include/stdarg.h" 3 typedef __builtin_va_list va_list;
# 32 "/home/fann/src/DB1101/kernel/android/R/prebuilts/clang/host/linux-x86/clang-r383902b/lib64/clang/11.0.2/include/stdarg.h" 3 typedef __builtin_va_list __gnuc_va_list;
# 7 "./include/linux/kernel.h" 2

# 1 "./include/linux/bitops.h" 1

# 1 "./include/linux/bits.h" 1

# 1 "./arch/arm/include/generated/uapi/asm/bitsperlong.h" 1 # 5 "./include/linux/bits.h" 2
# 6 "./include/linux/bitops.h" 2

extern unsigned int __sw_hweight8(unsigned int w); extern unsigned int __sw_hweight16(unsigned int w); extern unsigned int __sw_hweight32(unsigned int w); extern unsigned long __sw_hweight64(__u64 w);

# 1 "./arch/arm/include/asm/bitops.h" 1
# 28 "./arch/arm/include/asm/bitops.h"
# 1 "./include/linux/irqflags.h" 1
# 15 "./include/linux/irqflags.h"
# 1 "./include/linux/typecheck.h" 1
# 16 "./include/linux/irqflags.h" 2
# 1 "./arch/arm/include/asm/irqflags.h" 1

# 1 "./arch/arm/include/asm/ptrace.h" 1
# 13 "./arch/arm/include/asm/ptrace.h"
# 1 "./arch/arm/include/uapi/asm/ptrace.h" 1
# 14 "./arch/arm/include/uapi/asm/ptrace.h"
# 1 "./arch/arm/include/asm/hwcap.h" 1

# 1 "./arch/arm/include/uapi/asm/hwcap.h" 1
# 6 "./arch/arm/include/asm/hwcap.h" 2

extern unsigned int elf_hwcap, elf_hwcap2;
# 15 "./arch/arm/include/uapi/asm/ptrace.h" 2
# 14 "./arch/arm/include/asm/ptrace.h" 2

struct pt_regs {
unsigned long uregs[18];
};

struct svc_pt_regs {
struct pt_regs regs;
u32 dacr;
u32 addr_limit;
};
# 60 "./arch/arm/include/asm/ptrace.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int valid_user_regs(struct pt_regs *regs) {

unsigned long mode = regs->uregs[16] & 0x0000001f;

regs->uregs[16] &= ~(0x00000040 | 0x00000100);

if ((regs->uregs[16] & 0x00000080) == 0) {
if (mode == 0x00000010)
return 1;
if (elf_hwcap & (1 << 3) && mode == 0x00000000)
return 1;
}

regs->uregs[16] &= 0xff000000 | 0x00ff0000 | 0x0000ff00 | 0x00000020 | 0x00000010; if (!(elf_hwcap & (1 << 3)))
regs->uregs[16] |= 0x00000010;

return 0;

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long regs_return_value(struct pt_regs *regs) {
return regs->uregs[0];
}
# 103 "./arch/arm/include/asm/ptrace.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void instruction_pointer_set(struct pt_regs *regs,
unsigned long val)
{
(regs)->uregs[15] = val;
}

extern unsigned long profile_pc(struct pt_regs *regs);
# 132 "./arch/arm/include/asm/ptrace.h"
extern int regs_query_register_offset(const char *name);
extern const char *regs_query_register_name(unsigned int offset); extern bool regs_within_kernel_stack(struct pt_regs *regs, unsigned long addr); extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,

            unsigned int n);

# 147 "./arch/arm/include/asm/ptrace.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long regs_get_register(struct pt_regs *regs,
unsigned int offset)
{
if (__builtin_expect(!!(offset > (__builtin_offsetof(struct pt_regs, uregs[17]))), 0))
return 0;
return *(unsigned long *)((unsigned long)regs + offset);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long kernel_stack_pointer(struct pt_regs *regs) {
return regs->uregs[13];
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long user_stack_pointer(struct pt_regs *regs) {
return regs->uregs[13];
}
# 8 "./arch/arm/include/asm/irqflags.h" 2
# 25 "./arch/arm/include/asm/irqflags.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long arch_local_irq_save(void) {
unsigned long flags;

asm volatile(
" mrs %0, " "cpsr" " @ arch_local_irq_save\n"
" cpsid i"
: "=r" (flags) : : "memory", "cc");
return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_local_irq_enable(void) {
asm volatile(
" cpsie i @ arch_local_irq_enable"
:
:
: "memory", "cc");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_local_irq_disable(void) {
asm volatile(
" cpsid i @ arch_local_irq_disable"
:
:
: "memory", "cc");
}
# 156 "./arch/arm/include/asm/irqflags.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long arch_local_save_flags(void) {
unsigned long flags;
asm volatile(
" mrs %0, " "cpsr" " @ local_save_flags"
: "=r" (flags) : : "memory", "cc");
return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_local_irq_restore(unsigned long flags) {
asm volatile(
" msr " "cpsr_c" ", %0 @ local_irq_restore"
:
: "r" (flags)
: "memory", "cc");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_irqs_disabled_flags(unsigned long flags) {
return flags & 0x00000080;
}

# 1 "./include/asm-generic/irqflags.h" 1
# 61 "./include/asm-generic/irqflags.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_irqs_disabled(void) {
return arch_irqs_disabled_flags(arch_local_save_flags());
}
# 185 "./arch/arm/include/asm/irqflags.h" 2
# 17 "./include/linux/irqflags.h" 2
# 29 "./arch/arm/include/asm/bitops.h" 2

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p) {
unsigned long flags;
unsigned long mask = (1UL << ((bit) % 32));

p += ((bit) / 32);

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); *p |= mask;
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p) {
unsigned long flags;
unsigned long mask = (1UL << ((bit) % 32));

p += ((bit) / 32);

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); *p &= ~mask;
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p) {
unsigned long flags;
unsigned long mask = (1UL << ((bit) % 32));

p += ((bit) / 32);

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); *p ^= mask;
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int ____atomic_test_and_set_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = (1UL << ((bit) % 32));

p += ((bit) / 32);

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); res = *p;
*p = res | mask;
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0);

return (res & mask) != 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int ____atomic_test_and_clear_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = (1UL << ((bit) % 32));

p += ((bit) / 32);

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); res = *p;
*p = res & ~mask;
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0);

return (res & mask) != 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int ____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = (1UL << ((bit) % 32));

p += ((bit) / 32);

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); res = *p;
*p = res ^ mask;
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0);

return (res & mask) != 0;
}

# 1 "./include/asm-generic/bitops/non-atomic.h" 1
# 16 "./include/asm-generic/bitops/non-atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __set_bit(int nr, volatile unsigned long *addr) {
unsigned long mask = (1UL << ((nr) % 32));
unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);

*p |= mask;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __clear_bit(int nr, volatile unsigned long *addr) {
unsigned long mask = (1UL << ((nr) % 32));
unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);

*p &= ~mask;
}
# 41 "./include/asm-generic/bitops/non-atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __change_bit(int nr, volatile unsigned long *addr) {
unsigned long mask = (1UL << ((nr) % 32));
unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);

*p ^= mask;
}
# 58 "./include/asm-generic/bitops/non-atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __test_and_set_bit(int nr, volatile unsigned long *addr) {
unsigned long mask = (1UL << ((nr) % 32));
unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
unsigned long old = *p;

*p = old | mask;
return (old & mask) != 0;
}
# 77 "./include/asm-generic/bitops/non-atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __test_and_clear_bit(int nr, volatile unsigned long *addr) {
unsigned long mask = (1UL << ((nr) % 32));
unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
unsigned long old = *p;

*p = old & ~mask;
return (old & mask) != 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __test_and_change_bit(int nr,
volatile unsigned long *addr)
{
unsigned long mask = (1UL << ((nr) % 32));
unsigned long *p = ((unsigned long *)addr) + ((nr) / 32);
unsigned long old = *p;

*p = old ^ mask;
return (old & mask) != 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int test_bit(int nr, const volatile unsigned long *addr) {
return 1UL & (addr[((nr) / 32)] >> (nr & (32 -1)));
}
# 124 "./arch/arm/include/asm/bitops.h" 2
# 153 "./arch/arm/include/asm/bitops.h"
extern void _set_bit(int nr, volatile unsigned long * p);
extern void _clear_bit(int nr, volatile unsigned long * p);
extern void _change_bit(int nr, volatile unsigned long * p);
extern int _test_and_set_bit(int nr, volatile unsigned long * p);
extern int _test_and_clear_bit(int nr, volatile unsigned long * p);
extern int _test_and_change_bit(int nr, volatile unsigned long * p);

extern int _find_first_zero_bit_le(const unsigned long *p, unsigned size); extern int _find_next_zero_bit_le(const unsigned long *p, int size, int offset); extern int _find_first_bit_le(const unsigned long *p, unsigned size); extern int _find_next_bit_le(const unsigned long *p, int size, int offset);

extern int _find_first_zero_bit_be(const unsigned long *p, unsigned size);
extern int _find_next_zero_bit_be(const unsigned long *p, int size, int offset);
extern int _find_first_bit_be(const unsigned long *p, unsigned size);
extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
# 226 "./arch/arm/include/asm/bitops.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int constant_fls(int x) {
int r = 32;

if (!x)
return 0;
if (!(x & 0xffff0000u)) {
x <<= 16;
r -= 16;
}
if (!(x & 0xff000000u)) {
x <<= 8;
r -= 8;
}
if (!(x & 0xf0000000u)) {
x <<= 4;
r -= 4;
}
if (!(x & 0xc0000000u)) {
x <<= 2;
r -= 2;
}
if (!(x & 0x80000000u)) {
x <<= 1;
r -= 1;
}
return r;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int __clz(unsigned int x) {
unsigned int ret;

asm("clz\t%0, %1" : "=r" (ret) : "r" (x));

return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int fls(int x) {
if (__builtin_constant_p(x))

        return constant_fls(x);

return 32 - __clz(x);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __fls(unsigned long x) {
return fls(x) - 1;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int ffs(int x) {
return fls(x & -x);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __ffs(unsigned long x) {
return ffs(x) - 1;
}

# 1 "./include/asm-generic/bitops/fls64.h" 1
# 19 "./include/asm-generic/bitops/fls64.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int fls64(__u64 x) {
__u32 h = x >> 32;
if (h)
return fls(h) + 32;
return fls(x);
}
# 314 "./arch/arm/include/asm/bitops.h" 2

# 1 "./include/asm-generic/bitops/sched.h" 1
# 13 "./include/asm-generic/bitops/sched.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int sched_find_first_bit(const unsigned long *b) {

if (b[0])
return __ffs(b[0]);
if (b[1])
return __ffs(b[1]) + 32;
if (b[2])
return __ffs(b[2]) + 64;
return __ffs(b[3]) + 96;

}
# 316 "./arch/arm/include/asm/bitops.h" 2
# 1 "./include/asm-generic/bitops/hweight.h" 1

# 1 "./include/asm-generic/bitops/arch_hweight.h" 1

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int __arch_hweight32(unsigned int w) {
return __sw_hweight32(w);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int __arch_hweight16(unsigned int w) {
return __sw_hweight16(w);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int __arch_hweight8(unsigned int w) {
return __sw_hweight8(w);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __arch_hweight64(__u64 w) {
return __sw_hweight64(w);
}
# 6 "./include/asm-generic/bitops/hweight.h" 2
# 1 "./include/asm-generic/bitops/const_hweight.h" 1
# 7 "./include/asm-generic/bitops/hweight.h" 2
# 317 "./arch/arm/include/asm/bitops.h" 2
# 1 "./include/asm-generic/bitops/lock.h" 1
# 318 "./arch/arm/include/asm/bitops.h" 2
# 341 "./arch/arm/include/asm/bitops.h"
# 1 "./include/asm-generic/bitops/le.h" 1

# 1 "./arch/arm/include/uapi/asm/byteorder.h" 1
# 22 "./arch/arm/include/uapi/asm/byteorder.h"
# 1 "./include/linux/byteorder/little_endian.h" 1

# 1 "./include/uapi/linux/byteorder/little_endian.h" 1
# 44 "./include/uapi/linux/byteorder/little_endian.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p) {
return ( __le64)*p;
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p) {
return ( __u64)*p;
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p) {
return ( __le32)*p;
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p) {
return ( __u32)*p;
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p) {
return ( __le16)*p;
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p) {
return ( __u16)*p;
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p) {
return ( __be64)__swab64p(p);
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p) {
return __swab64p((__u64 *)p);
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p) {
return ( __be32)__swab32p(p);
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p) {
return __swab32p((__u32 *)p);
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p) {
return ( __be16)__swab16p(p);
}
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p) {
return __swab16p((__u16 *)p);
}
# 6 "./include/linux/byteorder/little_endian.h" 2

# 1 "./include/linux/byteorder/generic.h" 1
# 144 "./include/linux/byteorder/generic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void le16_add_cpu(__le16 *var, u16 val) {
*var = (( __le16)(__u16)((( __u16)(__le16)(*var)) + val));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void le32_add_cpu(__le32 *var, u32 val) {
*var = (( __le32)(__u32)((( __u32)(__le32)(*var)) + val));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void le64_add_cpu(__le64 *var, u64 val) {
*var = (( __le64)(__u64)((( __u64)(__le64)(*var)) + val));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void be16_add_cpu(__be16 *var, u16 val)
{
*var = (( __be16)(__builtin_constant_p((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val))) ? ((__u16)( (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val)) & (__u16)0x00ffU) << 8) | (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val)) & (__u16)0xff00U) >> 8))) : __fswab16(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val))));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void be32_add_cpu(__be32 *var, u32 val)
{
*var = (( __be32)(__builtin_constant_p((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val))) ? ((__u32)( (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x000000ffUL) << 24) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0xff000000UL) >> 24))) : __fswab32(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val))));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void be64_add_cpu(__be64 *var, u64 val)
{
*var = (( __be64)(__builtin_constant_p((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val))) ? ((__u64)( (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val))));
}
# 12 "./include/linux/byteorder/little_endian.h" 2
# 23 "./arch/arm/include/uapi/asm/byteorder.h" 2
# 7 "./include/asm-generic/bitops/le.h" 2

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset)
{
return _find_next_zero_bit_le(addr,size,offset);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long find_next_bit_le(const void *addr,
unsigned long size, unsigned long offset)
{
return _find_next_bit_le(addr,size,offset);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long find_first_zero_bit_le(const void *addr,
unsigned long size)
{
return _find_first_zero_bit_le(addr,size);
}
# 53 "./include/asm-generic/bitops/le.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int test_bit_le(int nr, const void *addr) {
return test_bit(nr ^ 0, addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void set_bit_le(int nr, void *addr) {
_set_bit(nr ^ 0,addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void clear_bit_le(int nr, void *addr) {
_clear_bit(nr ^ 0,addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __set_bit_le(int nr, void *addr) {
__set_bit(nr ^ 0, addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __clear_bit_le(int nr, void *addr) {
__clear_bit(nr ^ 0, addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int test_and_set_bit_le(int nr, void *addr) {
return _test_and_set_bit(nr ^ 0,addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int test_and_clear_bit_le(int nr, void *addr) {
return _test_and_clear_bit(nr ^ 0,addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __test_and_set_bit_le(int nr, void *addr) {
return __test_and_set_bit(nr ^ 0, addr);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __test_and_clear_bit_le(int nr, void *addr) {
return __test_and_clear_bit(nr ^ 0, addr);
}
# 342 "./arch/arm/include/asm/bitops.h" 2

# 1 "./include/asm-generic/bitops/ext2-atomic-setbit.h" 1
# 347 "./arch/arm/include/asm/bitops.h" 2
# 20 "./include/linux/bitops.h" 2
# 43 "./include/linux/bitops.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int get_bitmask_order(unsigned int count) {
int order;

order = fls(count);
return order;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
{
return sizeof(w) == 4 ? (__builtin_constant_p(w) ? ((((unsigned int) ((!!((w) & (1ULL << 0))) + (!!((w) & (1ULL << 1))) + (!!((w) & (1ULL << 2))) + (!!((w) & (1ULL << 3))) + (!!((w) & (1ULL << 4))) + (!!((w) & (1ULL << 5))) + (!!((w) & (1ULL << 6))) + (!!((w) & (1ULL << 7))))) + ((unsigned int) ((!!(((w) >> 8) & (1ULL << 0))) + (!!(((w) >> 8) & (1ULL << 1))) + (!!(((w) >> 8) & (1ULL << 2))) + (!!(((w) >> 8) & (1ULL << 3))) + (!!(((w) >> 8) & (1ULL << 4))) + (!!(((w) >> 8) & (1ULL << 5))) + (!!(((w) >> 8) & (1ULL << 6))) + (!!(((w) >> 8) & (1ULL << 7)))))) + (((unsigned int) ((!!(((w) >> 16) & (1ULL << 0))) + (!!(((w) >> 16) & (1ULL << 1))) + (!!(((w) >> 16) & (1ULL << 2))) + (!!(((w) >> 16) & (1ULL << 3))) + (!!(((w) >> 16) & (1ULL << 4))) + (!!(((w) >> 16) & (1ULL << 5))) + (!!(((w) >> 16) & (1ULL << 6))) + (!!(((w) >> 16) & (1ULL << 7))))) + ((unsigned int) ((!!((((w) >> 16) >> 8) & (1ULL << 0))) + (!!((((w) >> 16) >> 8) & (1ULL << 1))) + (!!((((w) >> 16) >> 8) & (1ULL << 2))) + (!!((((w) >> 16) >> 8) & (1ULL << 3))) + (!!((((w) >> 16) >> 8) & (1ULL << 4))) + (!!((((w) >> 16) >> 8) & (1ULL << 5))) + (!!((((w) >> 16) >> 8) & (1ULL << 6))) + (!!((((w) >> 16) >> 8) & (1ULL << 7))))))) : __arch_hweight32(w)) : (__builtin_constant_p((__u64)w) ? (((((unsigned int) ((!!(((__u64)w) & (1ULL << 0))) + (!!(((__u64)w) & (1ULL << 1))) + (!!(((__u64)w) & (1ULL << 2))) + (!!(((__u64)w) & (1ULL << 3))) + (!!(((__u64)w) & (1ULL << 4))) + (!!(((__u64)w) & (1ULL << 5))) + (!!(((__u64)w) & (1ULL << 6))) + (!!(((__u64)w) & (1ULL << 7))))) + ((unsigned int) ((!!((((__u64)w) >> 8) & (1ULL << 0))) + (!!((((__u64)w) >> 8) & (1ULL << 1))) + (!!((((__u64)w) >> 8) & (1ULL << 2))) + (!!((((__u64)w) >> 8) & (1ULL << 3))) + (!!((((__u64)w) >> 8) & (1ULL << 4))) + (!!((((__u64)w) >> 8) & (1ULL << 5))) + (!!((((__u64)w) >> 8) & (1ULL << 6))) + (!!((((__u64)w) >> 8) & (1ULL << 7)))))) + (((unsigned int) ((!!((((__u64)w) >> 16) & (1ULL << 0))) + (!!((((__u64)w) >> 16) & (1ULL << 1))) + (!!((((__u64)w) >> 16) & (1ULL << 2))) + (!!((((__u64)w) >> 16) & (1ULL << 3))) + (!!((((__u64)w) >> 16) & (1ULL << 4))) + (!!((((__u64)w) >> 16) & (1ULL << 5))) + (!!((((__u64)w) >> 16) & (1ULL << 6))) + (!!((((__u64)w) >> 16) & (1ULL << 7))))) + ((unsigned int) ((!!(((((__u64)w) >> 16) >> 8) & (1ULL << 0))) + (!!(((((__u64)w) >> 16) >> 8) & (1ULL << 1))) + (!!(((((__u64)w) >> 16) >> 8) & (1ULL << 2))) + (!!(((((__u64)w) >> 16) >> 8) & (1ULL << 3))) + (!!(((((__u64)w) >> 16) >> 8) & (1ULL << 4))) + (!!(((((__u64)w) >> 16) >> 8) & (1ULL << 5))) + (!!(((((__u64)w) >> 16) >> 8) & (1ULL << 6))) + (!!(((((__u64)w) >> 16) >> 8) & (1ULL << 7))))))) + ((((unsigned int) ((!!((((__u64)w) >> 32) & (1ULL << 0))) + (!!((((__u64)w) >> 32) & (1ULL << 1))) + (!!((((__u64)w) >> 32) & (1ULL << 2))) + (!!((((__u64)w) >> 32) & (1ULL << 3))) + (!!((((__u64)w) >> 32) & (1ULL << 4))) + (!!((((__u64)w) >> 32) & (1ULL << 5))) + (!!((((__u64)w) >> 32) & (1ULL << 6))) + (!!((((__u64)w) >> 32) & (1ULL << 7))))) + ((unsigned int) ((!!(((((__u64)w) >> 32) >> 8) & (1ULL << 0))) + (!!(((((__u64)w) >> 32) >> 8) & (1ULL << 1))) + (!!(((((__u64)w) >> 32) >> 8) & (1ULL << 2))) + (!!(((((__u64)w) >> 32) >> 8) & (1ULL << 3))) + (!!(((((__u64)w) >> 32) >> 8) & (1ULL << 4))) + (!!(((((__u64)w) >> 32) >> 8) & (1ULL << 5))) + (!!(((((__u64)w) >> 32) >> 8) & (1ULL << 6))) + (!!(((((__u64)w) >> 32) >> 8) & (1ULL << 7)))))) + (((unsigned int) ((!!(((((__u64)w) >> 32) >> 16) & (1ULL << 0))) + (!!(((((__u64)w) >> 32) >> 16) & (1ULL << 1))) + (!!(((((__u64)w) >> 32) >> 16) & (1ULL << 2))) + (!!(((((__u64)w) >> 32) >> 16) & (1ULL << 3))) + (!!(((((__u64)w) >> 32) >> 16) & (1ULL << 4))) + (!!(((((__u64)w) >> 32) >> 16) & (1ULL << 5))) + (!!(((((__u64)w) >> 32) >> 16) & (1ULL << 6))) + (!!(((((__u64)w) >> 32) >> 16) & (1ULL << 7))))) + ((unsigned int) ((!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 0))) + (!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 1))) + (!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 2))) + (!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 3))) + (!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 4))) + (!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 5))) + (!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 6))) + (!!((((((__u64)w) >> 32) >> 16) >> 8) & (1ULL << 7)))))))) : __arch_hweight64((__u64)w));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u64 rol64(__u64 word, unsigned int shift) {
return (word << (shift & 63)) | (word >> ((-shift) & 63));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u64 ror64(__u64 word, unsigned int shift) {
return (word >> (shift & 63)) | (word << ((-shift) & 63));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u32 rol32(__u32 word, unsigned int shift) {
return (word << (shift & 31)) | (word >> ((-shift) & 31));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u32 ror32(__u32 word, unsigned int shift) {
return (word >> (shift & 31)) | (word << ((-shift) & 31));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u16 rol16(__u16 word, unsigned int shift) {
return (word << (shift & 15)) | (word >> ((-shift) & 15));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u16 ror16(__u16 word, unsigned int shift) {
return (word >> (shift & 15)) | (word << ((-shift) & 15));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u8 rol8(__u8 word, unsigned int shift) {
return (word << (shift & 7)) | (word >> ((-shift) & 7));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __u8 ror8(__u8 word, unsigned int shift) {
return (word >> (shift & 7)) | (word << ((-shift) & 7));
}
# 143 "./include/linux/bitops.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __s32 sign_extend32(__u32 value, int index) {
__u8 shift = 31 - index;
return (__s32)(value << shift) >> shift;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __s64 sign_extend64(__u64 value, int index) {
__u8 shift = 63 - index;
return (__s64)(value << shift) >> shift;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned fls_long(unsigned long l) {
if (sizeof(l) == 4)
return fls(l);
return fls64(l);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int get_count_order(unsigned int count) {
int order;

order = fls(count) - 1;
if (count & (count - 1))
order++;
return order;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int get_count_order_long(unsigned long l) {
if (l == 0UL)
return -1;
else if (l & (l - 1UL))
return (int)fls_long(l);
else
return (int)fls_long(l) - 1;
}
# 201 "./include/linux/bitops.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __ffs64(u64 word) {

if (((u32)word) == 0UL)
return __ffs((u32)(word >> 32)) + 32;

return __ffs((unsigned long)word);
}
# 253 "./include/linux/bitops.h"
extern unsigned long find_last_bit(const unsigned long *addr,

       unsigned long size);

# 12 "./include/linux/kernel.h" 2
# 1 "./include/linux/log2.h" 1
# 25 "./include/linux/log2.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((const)) int __ilog2_u32(u32 n)
{
return fls(n) - 1;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((const)) int __ilog2_u64(u64 n)
{
return fls64(n) - 1;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((const)) bool is_power_of_2(unsigned long n)
{
return (n != 0 && ((n & (n - 1)) == 0));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((const)) unsigned long __roundup_pow_of_two(unsigned long n)
{
return 1UL << fls_long(n - 1);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((const))
unsigned long __rounddown_pow_of_two(unsigned long n)
{
return 1UL << (fls_long(n) - 1);
}
# 210 "./include/linux/log2.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__))
int __order_base_2(unsigned long n)
{
return n > 1 ? ( __builtin_constant_p(n - 1) ? ( __builtin_constant_p(n - 1) ? ( (n - 1) < 2 ? 0 : (n - 1) & (1ULL << 63) ? 63 : (n - 1) & (1ULL << 62) ? 62 : (n - 1) & (1ULL << 61) ? 61 : (n - 1) & (1ULL << 60) ? 60 : (n - 1) & (1ULL << 59) ? 59 : (n - 1) & (1ULL << 58) ? 58 : (n - 1) & (1ULL << 57) ? 57 : (n - 1) & (1ULL << 56) ? 56 : (n - 1) & (1ULL << 55) ? 55 : (n - 1) & (1ULL << 54) ? 54 : (n - 1) & (1ULL << 53) ? 53 : (n - 1) & (1ULL << 52) ? 52 : (n - 1) & (1ULL << 51) ? 51 : (n - 1) & (1ULL << 50) ? 50 : (n - 1) & (1ULL << 49) ? 49 : (n - 1) & (1ULL << 48) ? 48 : (n - 1) & (1ULL << 47) ? 47 : (n - 1) & (1ULL << 46) ? 46 : (n - 1) & (1ULL << 45) ? 45 : (n - 1) & (1ULL << 44) ? 44 : (n - 1) & (1ULL << 43) ? 43 : (n - 1) & (1ULL << 42) ? 42 : (n - 1) & (1ULL << 41) ? 41 : (n - 1) & (1ULL << 40) ? 40 : (n - 1) & (1ULL << 39) ? 39 : (n - 1) & (1ULL << 38) ? 38 : (n - 1) & (1ULL << 37) ? 37 : (n - 1) & (1ULL << 36) ? 36 : (n - 1) & (1ULL << 35) ? 35 : (n - 1) & (1ULL << 34) ? 34 : (n - 1) & (1ULL << 33) ? 33 : (n - 1) & (1ULL << 32) ? 32 : (n - 1) & (1ULL << 31) ? 31 : (n - 1) & (1ULL << 30) ? 30 : (n - 1) & (1ULL << 29) ? 29 : (n - 1) & (1ULL << 28) ? 28 : (n - 1) & (1ULL << 27) ? 27 : (n - 1) & (1ULL << 26) ? 26 : (n - 1) & (1ULL << 25) ? 25 : (n - 1) & (1ULL << 24) ? 24 : (n - 1) & (1ULL << 23) ? 23 : (n - 1) & (1ULL << 22) ? 22 : (n - 1) & (1ULL << 21) ? 21 : (n - 1) & (1ULL << 20) ? 20 : (n - 1) & (1ULL << 19) ? 19 : (n - 1) & (1ULL << 18) ? 18 : (n - 1) & (1ULL << 17) ? 17 : (n - 1) & (1ULL << 16) ? 16 : (n - 1) & (1ULL << 15) ? 15 : (n - 1) & (1ULL << 14) ? 14 : (n - 1) & (1ULL << 13) ? 13 : (n - 1) & (1ULL << 12) ? 12 : (n - 1) & (1ULL << 11) ? 11 : (n - 1) & (1ULL << 10) ? 10 : (n - 1) & (1ULL << 9) ? 9 : (n - 1) & (1ULL << 8) ? 8 : (n - 1) & (1ULL << 7) ? 7 : (n - 1) & (1ULL << 6) ? 6 : (n - 1) & (1ULL << 5) ? 5 : (n - 1) & (1ULL << 4) ? 4 : (n - 1) & (1ULL << 3) ? 3 : (n - 1) & (1ULL << 2) ? 2 : 1) : -1) : (sizeof(n - 1) <= 4) ? __ilog2_u32(n - 1) : __ilog2_u64(n - 1) ) + 1 : 0;
}
# 13 "./include/linux/kernel.h" 2

# 1 "./include/linux/printk.h" 1

# 1 "./include/linux/init.h" 1
# 118 "./include/linux/init.h"
typedef int (*initcall_t)(void);
typedef void (*exitcall_t)(void);

extern initcall_t __con_initcall_start[], __con_initcall_end[]; extern initcall_t __security_initcall_start[], __security_initcall_end[];

typedef void (*ctor_fn_t)(void);

extern int do_one_initcall(initcall_t fn);
extern char __attribute__ ((__section__(".init.data"))) boot_command_line[]; extern char *saved_command_line;
extern unsigned int reset_devices;

void setup_arch(char **);
void prepare_namespace(void);
void __attribute__ ((__section__(".init.text"))) load_default_modules(void); int __attribute__ ((__section__(".init.text"))) init_rootfs(void);

extern bool rodata_enabled;

void mark_rodata_ro(void);

extern void (*late_time_init)(void);

extern bool initcall_debug;
# 237 "./include/linux/init.h"
struct user_initcall_param {
char *name;
initcall_t fn;
};
# 254 "./include/linux/init.h"
struct obs_kernel_param {
const char *str;
int (*setup_func)(char *);
int early;
};
# 303 "./include/linux/init.h"
void __attribute__ ((__section__(".init.text"))) parse_early_param(void); void __attribute__ ((__section__(".init.text"))) parse_early_options(char *cmdline); # 7 "./include/linux/printk.h" 2
# 1 "./include/linux/kern_levels.h" 1
# 8 "./include/linux/printk.h" 2

# 1 "./include/linux/cache.h" 1

# 1 "./include/uapi/linux/kernel.h" 1

# 1 "./include/uapi/linux/sysinfo.h" 1

struct sysinfo {
__kernel_long_t uptime;
__kernel_ulong_t loads[3];
__kernel_ulong_t totalram;
__kernel_ulong_t freeram;
__kernel_ulong_t sharedram;
__kernel_ulong_t bufferram;
__kernel_ulong_t totalswap;
__kernel_ulong_t freeswap;
__u16 procs;
__u16 pad;
__kernel_ulong_t totalhigh;
__kernel_ulong_t freehigh;
__u32 mem_unit;
char _f[20-2*sizeof(__kernel_ulong_t)-sizeof(__u32)];
};
# 6 "./include/uapi/linux/kernel.h" 2
# 6 "./include/linux/cache.h" 2
# 1 "./arch/arm/include/asm/cache.h" 1
# 7 "./include/linux/cache.h" 2
# 10 "./include/linux/printk.h" 2

extern const char linux_banner[];
extern const char linux_proc_banner[];

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int printk_get_level(const char *buffer) {
if (buffer[0] == '\001' && buffer[1]) {
switch (buffer[1]) {
case '0' ... '7':
case 'd':
case 'c':
return buffer[1];
}
}
return 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) const char *printk_skip_level(const char *buffer) {
if (printk_get_level(buffer))
return buffer + 2;

return buffer;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) const char *printk_skip_headers(const char *buffer) {
while (printk_get_level(buffer))
buffer = printk_skip_level(buffer);

return buffer;
}
# 63 "./include/linux/printk.h"
extern int console_printk[];

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void console_silent(void) {
(console_printk[0]) = 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void console_verbose(void) {
if (1 )
(console_printk[0]) = 15;
}

extern char devkmsg_log_str[];
struct ctl_table;

struct va_format {
const char *fmt;
va_list *va;
};
# 143 "./include/linux/printk.h"
extern __attribute__((format(printf, 1, 2)))
void early_printk(const char *fmt, ...);

extern void printk_nmi_enter(void);
extern void printk_nmi_exit(void);
extern void printk_nmi_direct_enter(void);
extern void printk_nmi_direct_exit(void);
# 163 "./include/linux/printk.h"

           __attribute__((format(printf, 5, 0)))

int vprintk_emit(int facility, int level,
const char *dict, size_t dictlen,
const char *fmt, va_list args);

           __attribute__((format(printf, 1, 0)))

int vprintk(const char *fmt, va_list args);

           __attribute__((format(printf, 5, 6)))

int printk_emit(int facility, int level,
const char *dict, size_t dictlen,
const char *fmt, ...);

           __attribute__((format(printf, 1, 2)))

int printk(const char *fmt, ...);

__attribute__((format(printf, 1, 2))) int printk_deferred(const char *fmt, ...);

extern int __printk_ratelimit(const char *func);

extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,

       unsigned int interval_msec);

extern int printk_delay_msec;
extern int dmesg_restrict;
extern int kptr_restrict;

extern int
devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void *buf,

     size_t *lenp, loff_t *ppos);

extern void wake_up_klogd(void);

char *log_buf_addr_get(void);
u32 log_buf_len_get(void);
void log_buf_vmcoreinfo_setup(void);
void __attribute__ ((__section__(".init.text"))) setup_log_buf(int early); __attribute__((format(printf, 1, 2))) void dump_stack_set_arch_desc(const char *fmt, ...); void dump_stack_print_info(const char *log_lvl);
void show_regs_print_info(const char *log_lvl);
extern void printk_safe_init(void);
extern void printk_safe_flush(void);
extern void printk_safe_flush_on_panic(void);
# 287 "./include/linux/printk.h"
extern void dump_stack(void) ;
# 334 "./include/linux/printk.h"
# 1 "./include/linux/dynamic_debug.h" 1
# 14 "./include/linux/dynamic_debug.h"
struct _ddebug {

const char *modname;
const char *function;
const char *filename;
const char *format;
unsigned int lineno:18;
# 40 "./include/linux/dynamic_debug.h"
unsigned int flags:8;

} __attribute__((aligned(8)));

int ddebug_add_module(struct _ddebug *tab, unsigned int n,

    const char *modname);

extern int ddebug_remove_module(const char *mod_name);
extern __attribute__((format(printf, 2, 3)))
void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);

extern int ddebug_dyndbg_module_param_cb(char *param, char *val,

     const char *modname);

struct device;

extern __attribute__((format(printf, 3, 4)))
void __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,

         const char *fmt, ...);

struct net_device;

extern __attribute__((format(printf, 3, 4))) void __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev,
const char *fmt, ...);
# 335 "./include/linux/printk.h" 2
# 479 "./include/linux/printk.h"
extern const struct file_operations kmsg_fops;

enum {
DUMP_PREFIX_NONE,
DUMP_PREFIX_ADDRESS,
DUMP_PREFIX_OFFSET
};
extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize,
int groupsize, char *linebuf, size_t linebuflen, bool ascii);

extern void print_hex_dump(const char *level, const char *prefix_str,
int prefix_type, int rowsize, int groupsize,
const void *buf, size_t len, bool ascii);
# 538 "./include/linux/printk.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void dump_ddr_reg(void) {
}
# 15 "./include/linux/kernel.h" 2
# 1 "./include/linux/build_bug.h" 1
# 16 "./include/linux/kernel.h" 2
# 178 "./include/linux/kernel.h"
# 1 "./arch/arm/include/asm/div64.h" 1

# 1 "./arch/arm/include/asm/div64_443.h" 1

# 1 "./arch/arm/include/asm/compiler.h" 1
# 6 "./arch/arm/include/asm/div64_443.h" 2
# 63 "./arch/arm/include/asm/div64_443.h"
# 1 "./arch/arm/include/asm/bug.h" 1
# 64 "./arch/arm/include/asm/div64_443.h" 2
# 4 "./arch/arm/include/asm/div64.h" 2
# 179 "./include/linux/kernel.h" 2
# 207 "./include/linux/kernel.h"
struct completion;
struct pt_regs;
struct user;
# 235 "./include/linux/kernel.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void ___might_sleep(const char *file, int line,

       int preempt_offset) { }
  static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __might_sleep(const char *file, int line,
       int preempt_offset) { }

# 282 "./include/linux/kernel.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 reciprocal_scale(u32 val, u32 ep_ro) {
return (u32)(((u64) val * ep_ro) >> 32);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void might_fault(void) { }

extern struct atomic_notifier_head panic_notifier_list;
extern long (*panic_blink)(int state); __attribute__((format(printf, 1, 2)))
void panic(const char *fmt, ...) __attribute__((noreturn)) ; void nmi_panic(struct pt_regs *regs, const char *msg);
extern void oops_enter(void);
extern void oops_exit(void);
void print_oops_end_marker(void);
extern int oops_may_print(void);
void do_exit(long error_code) __attribute__((noreturn));
void complete_and_exit(struct completion *, long) __attribute__((noreturn));

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void refcount_error_report(struct pt_regs *regs, const char *err) { }

int __attribute__((warn_unused_result)) _kstrtoul(const char *s, unsigned int base, unsigned long *res); int __attribute__((warn_unused_result)) _kstrtol(const char *s, unsigned int base, long *res);

int __attribute__((warn_unused_result)) kstrtoull(const char *s, unsigned int base, unsigned long long *res);
int __attribute__((warn_unused_result)) kstrtoll(const char *s, unsigned int base, long long *res);
# 337 "./include/linux/kernel.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtoul(const char *s, unsigned int base, unsigned long *res) {

if (sizeof(unsigned long) == sizeof(unsigned long long) &&

     __alignof__(unsigned long) == __alignof__(unsigned long long))

return kstrtoull(s, base, (unsigned long long *)res);
else
return _kstrtoul(s, base, res);
}
# 366 "./include/linux/kernel.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtol(const char *s, unsigned int base, long *res) {

if (sizeof(long) == sizeof(long long) &&

     __alignof__(long) == __alignof__(long long))

return kstrtoll(s, base, (long long *)res);
else
return _kstrtol(s, base, res);
}

int __attribute__((warn_unused_result)) kstrtouint(const char *s, unsigned int base, unsigned int *res); int __attribute__((warn_unused_result)) kstrtoint(const char *s, unsigned int base, int *res);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtou64(const char *s, unsigned int base, u64 *res) {
return kstrtoull(s, base, res);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtos64(const char *s, unsigned int base, s64 *res) {
return kstrtoll(s, base, res);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtou32(const char *s, unsigned int base, u32 *res) {
return kstrtouint(s, base, res);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtos32(const char *s, unsigned int base, s32 *res) {
return kstrtoint(s, base, res);
}

int __attribute__((warn_unused_result)) kstrtou16(const char *s, unsigned int base, u16 *res); int __attribute__((warn_unused_result)) kstrtos16(const char *s, unsigned int base, s16 *res); int __attribute__((warn_unused_result)) kstrtou8(const char *s, unsigned int base, u8 *res); int __attribute__((warn_unused_result)) kstrtos8(const char *s, unsigned int base, s8 *res); int __attribute__((warn_unused_result)) kstrtobool(const char *s, bool *res);

int __attribute__((warn_unused_result)) kstrtoull_from_user(const char *s, size_t count, unsigned int base, unsigned long long *res); int __attribute__((warn_unused_result)) kstrtoll_from_user(const char *s, size_t count, unsigned int base, long long *res); int __attribute__((warn_unused_result)) kstrtoul_from_user(const char *s, size_t count, unsigned int base, unsigned long *res); int __attribute__((warn_unused_result)) kstrtol_from_user(const char *s, size_t count, unsigned int base, long *res); int __attribute__((warn_unused_result)) kstrtouint_from_user(const char *s, size_t count, unsigned int base, unsigned int *res); int __attribute__((warn_unused_result)) kstrtoint_from_user(const char *s, size_t count, unsigned int base, int *res); int __attribute__((warn_unused_result)) kstrtou16_from_user(const char *s, size_t count, unsigned int base, u16 *res); int __attribute__((warn_unused_result)) kstrtos16_from_user(const char *s, size_t count, unsigned int base, s16 *res); int __attribute__((warn_unused_result)) kstrtou8_from_user(const char *s, size_t count, unsigned int base, u8 *res); int __attribute__((warn_unused_result)) kstrtos8_from_user(const char *s, size_t count, unsigned int base, s8 *res); int __attribute__((warn_unused_result)) kstrtobool_from_user(const char *s, size_t count, bool *res);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtou64_from_user(const char *s, size_t count, unsigned int base, u64 *res) {
return kstrtoull_from_user(s, count, base, res);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtos64_from_user(const char *s, size_t count, unsigned int base, s64 *res) {
return kstrtoll_from_user(s, count, base, res);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtou32_from_user(const char *s, size_t count, unsigned int base, u32 *res) {
return kstrtouint_from_user(s, count, base, res);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) kstrtos32_from_user(const char *s, size_t count, unsigned int base, s32 *res) {
return kstrtoint_from_user(s, count, base, res);
}

extern unsigned long simple_strtoul(const char *,char **,unsigned int); extern long simple_strtol(const char *,char **,unsigned int); extern unsigned long long simple_strtoull(const char *,char **,unsigned int); extern long long simple_strtoll(const char *,char **,unsigned int);

extern int num_to_str(char *buf, int size, unsigned long long num);

extern __attribute__((format(printf, 2, 3))) int sprintf(char *buf, const char * fmt, ...); extern __attribute__((format(printf, 2, 0))) int vsprintf(char *buf, const char *, va_list); extern __attribute__((format(printf, 3, 4)))
int snprintf(char *buf, size_t size, const char *fmt, ...);
extern __attribute__((format(printf, 3, 0)))
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
extern __attribute__((format(printf, 3, 4)))
int scnprintf(char *buf, size_t size, const char *fmt, ...);
extern __attribute__((format(printf, 3, 0)))
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
extern __attribute__((format(printf, 2, 3))) __attribute__((__malloc__))
char *kasprintf(gfp_t gfp, const char *fmt, ...);
extern __attribute__((format(printf, 2, 0))) __attribute__((__malloc__))
char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
extern __attribute__((format(printf, 2, 0)))
const char *kvasprintf_const(gfp_t gfp, const char *fmt, va_list args);

extern __attribute__((format(scanf, 2, 3)))
int sscanf(const char *, const char *, ...);
extern __attribute__((format(scanf, 2, 0)))
int vsscanf(const char *, const char *, va_list);

extern int get_option(char **str, int *pint);
extern char *get_options(const char *str, int nints, int *ints); extern unsigned long long memparse(const char *ptr, char **retptr); extern bool parse_option_str(const char *str, const char *option); extern char *next_arg(char *args, char **param, char **val);

extern int core_kernel_text(unsigned long addr); extern int core_kernel_data(unsigned long addr); extern int __kernel_text_address(unsigned long addr); extern int kernel_text_address(unsigned long addr); extern int func_ptr_is_kernel_text(void *ptr);

unsigned long int_sqrt(unsigned long);

extern void bust_spinlocks(int yes);
extern int oops_in_progress;
extern int panic_timeout;
extern int panic_on_oops;
extern int panic_on_unrecovered_nmi;
extern int panic_on_io_nmi;
extern int panic_on_warn;
extern int sysctl_panic_on_rcu_stall;
extern int sysctl_panic_on_stackoverflow;

extern bool crash_kexec_post_notifiers;

extern atomic_t panic_cpu;

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void set_arch_panic_timeout(int timeout, int arch_default_timeout) {
if (panic_timeout == arch_default_timeout)
panic_timeout = timeout;
}
extern const char *print_tainted(void);
enum lockdep_ok {
LOCKDEP_STILL_OK,
LOCKDEP_NOW_UNRELIABLE
};
extern void add_taint(unsigned flag, enum lockdep_ok);
extern int test_taint(unsigned flag);
extern unsigned long get_taint(void);
extern int root_mountflags;

extern bool early_boot_irqs_disabled;

extern enum system_states {
SYSTEM_BOOTING,
SYSTEM_SCHEDULING,
SYSTEM_RUNNING,
SYSTEM_HALT,
SYSTEM_POWER_OFF,
SYSTEM_RESTART,
} system_state;
# 559 "./include/linux/kernel.h"
struct taint_flag {
char c_true;
char c_false;
bool module;
};

extern const struct taint_flag taint_flags[16];

extern const char hex_asc[];

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) char *hex_byte_pack(char *buf, u8 byte) {
*buf++ = hex_asc[((byte) & 0xf0) >> 4];
*buf++ = hex_asc[((byte) & 0x0f)];
return buf;
}

extern const char hex_asc_upper[];

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) char *hex_byte_pack_upper(char *buf, u8 byte) {
*buf++ = hex_asc_upper[((byte) & 0xf0) >> 4];
*buf++ = hex_asc_upper[((byte) & 0x0f)];
return buf;
}

extern int hex_to_bin(char ch);
extern int __attribute__((warn_unused_result)) hex2bin(u8 *dst, const char *src, size_t count); extern char *bin2hex(char *dst, const void *src, size_t count);

bool mac_pton(const char *s, u8 *mac);
# 615 "./include/linux/kernel.h"
enum ftrace_dump_mode {
DUMP_NONE,
DUMP_ALL,
DUMP_ORIG,
};

void tracing_on(void);
void tracing_off(void);
int tracing_is_on(void);
void tracing_snapshot(void);
void tracing_snapshot_alloc(void);

extern void tracing_start(void);
extern void tracing_stop(void);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((format(printf, 1, 2))) void ____trace_printk_check_format(const char *fmt, ...)
{
}
# 694 "./include/linux/kernel.h"
extern __attribute__((format(printf, 2, 3)))
int __trace_bprintk(unsigned long ip, const char *fmt, ...);

extern __attribute__((format(printf, 2, 3)))
int __trace_printk(unsigned long ip, const char *fmt, ...); # 735 "./include/linux/kernel.h"
extern int __trace_bputs(unsigned long ip, const char *str); extern int __trace_puts(unsigned long ip, const char *str, int size);

extern void trace_dump_stack(int skip);
# 757 "./include/linux/kernel.h"
extern __attribute__((format(printf, 2, 0))) int __ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap);

extern __attribute__((format(printf, 2, 0))) int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);

extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); # 961 "./include/linux/kernel.h"
extern unsigned int *sched_log_buf_head;
extern unsigned int *sched_log_buf_tail;
extern unsigned int *sched_log_buf_ptr;
extern unsigned int sched_log_flag;
extern unsigned int sched_log_time_scale;
extern unsigned int sched_log_start_time;

extern unsigned int log_get_time_stamp(void); extern void log_sched(int cpu, int pid, int type); extern void log_intr_enter(int cpu, int irq); extern void log_intr_exit(int cpu, int irq); # 17 "./include/asm-generic/bug.h" 2

struct bug_entry {

unsigned long bug_addr;

const char *file;

unsigned short line;

unsigned short flags;
};
# 81 "./include/asm-generic/bug.h"
extern __attribute__((format(printf, 3, 4))) void warn_slowpath_fmt(const char *file, const int line,

         const char *fmt, ...);
extern __attribute__((format(printf, 4, 5)))
void warn_slowpath_fmt_taint(const char *file, const int line, unsigned taint,
        const char *fmt, ...);

extern void warn_slowpath_null(const char *file, const int line); # 101 "./include/asm-generic/bug.h"
struct warn_args;
struct pt_regs;

void __warn(const char *file, int line, void *caller, unsigned taint,

     struct pt_regs *regs, struct warn_args *args);

# 61 "./arch/arm/include/asm/bug.h" 2

struct pt_regs;
void die(const char *msg, struct pt_regs *regs, int err);

struct siginfo;
void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info,
unsigned long err, unsigned long trap);
# 77 "./arch/arm/include/asm/bug.h"
void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
struct pt_regs *),
int sig, int code, const char *name);

void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int,
struct pt_regs *),
int sig, int code, const char *name);

extern void c_backtrace(unsigned long fp, int pmode);

struct mm_struct;
extern void show_pte(struct mm_struct *mm, unsigned long addr); extern void __show_regs(struct pt_regs *);
# 6 "./include/linux/bug.h" 2

enum bug_trap_type {
BUG_TRAP_TYPE_NONE = 0,
BUG_TRAP_TYPE_WARN = 1,
BUG_TRAP_TYPE_BUG = 2,
};

struct pt_regs;
# 34 "./include/linux/bug.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int is_warning_bug(const struct bug_entry *bug) {
return bug->flags & (1 << 0);
}

struct bug_entry *find_bug(unsigned long bugaddr);

enum bug_trap_type report_bug(unsigned long bug_addr, struct pt_regs *regs);

int is_valid_bugaddr(unsigned long addr);
# 65 "./include/linux/bug.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((warn_unused_result)) bool check_data_corruption(bool v) { return v; } # 13 "./include/linux/thread_info.h" 2
# 1 "./include/linux/restart_block.h" 1
# 11 "./include/linux/restart_block.h"
struct timespec;
struct compat_timespec;
struct pollfd;

enum timespec_type {
TT_NONE = 0,
TT_NATIVE = 1,

};

struct restart_block {
long (*fn)(struct restart_block *);
union {

  struct {
   u32 *uaddr;
   u32 val;
   u32 flags;
   u32 bitset;
   u64 time;
   u32 *uaddr2;
  } futex;

  struct {
   clockid_t clockid;
   enum timespec_type type;
   union {
    struct timespec *rmtp;
   };
   u64 expires;
  } nanosleep;

struct {
struct pollfd *ufds;
int nfds;
int has_timeout;
unsigned long tv_sec;
unsigned long tv_nsec;
} poll;
};
};

extern long do_no_restart_syscall(struct restart_block *parm); # 14 "./include/linux/thread_info.h" 2
# 31 "./include/linux/thread_info.h"
enum {
BAD_STACK = -1,
NOT_STACK = 0,
GOOD_FRAME,
GOOD_STACK,
};

# 1 "./arch/arm/include/asm/thread_info.h" 1
# 16 "./arch/arm/include/asm/thread_info.h"
# 1 "./arch/arm/include/asm/fpstate.h" 1
# 26 "./arch/arm/include/asm/fpstate.h"
struct vfp_hard_struct {

__u64 fpregs[32];

__u32 fpexc;
__u32 fpscr;

__u32 fpinst;
__u32 fpinst2;

__u32 cpu;

};

union vfp_state {
struct vfp_hard_struct hard;
};

extern void vfp_flush_thread(union vfp_state *); extern void vfp_release_thread(union vfp_state *);

struct fp_hard_struct {
unsigned int save[35];
};

struct fp_soft_struct {
unsigned int save[35];
};

struct iwmmxt_struct {
unsigned int save[0x98 / sizeof(unsigned int)];
};

union fp_state {
struct fp_hard_struct hard;
struct fp_soft_struct soft;

};

struct crunch_state {
unsigned int mvdx[16][2];
unsigned int mvax[4][3];
unsigned int dspsc[2];
};
# 17 "./arch/arm/include/asm/thread_info.h" 2
# 1 "./arch/arm/include/asm/page.h" 1
# 26 "./arch/arm/include/asm/page.h"
# 1 "./arch/arm/include/asm/glue.h" 1
# 27 "./arch/arm/include/asm/page.h" 2
# 110 "./arch/arm/include/asm/page.h"
struct page;
struct vm_area_struct;

struct cpu_user_fns {
void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); void (*cpu_copy_user_highpage)(struct page *to, struct page *from,
unsigned long vaddr, struct vm_area_struct *vma);
};

extern struct cpu_user_fns cpu_user;
# 143 "./arch/arm/include/asm/page.h"
extern void copy_page(void *to, const void *from); # 152 "./arch/arm/include/asm/page.h"
# 1 "./arch/arm/include/asm/pgtable-2level-types.h" 1 # 24 "./arch/arm/include/asm/pgtable-2level-types.h" typedef u32 pteval_t;
typedef u32 pmdval_t;
# 51 "./arch/arm/include/asm/pgtable-2level-types.h" typedef pteval_t pte_t;
typedef pmdval_t pmd_t;
typedef pmdval_t pgd_t[2];
typedef pteval_t pgprot_t;
# 153 "./arch/arm/include/asm/page.h" 2

typedef struct page *pgtable_t;

extern int pfn_valid(unsigned long);

# 1 "./arch/arm/include/asm/memory.h" 1
# 17 "./arch/arm/include/asm/memory.h"
# 1 "./include/uapi/linux/const.h" 1
# 18 "./arch/arm/include/asm/memory.h" 2

# 1 "./include/linux/sizes.h" 1
# 20 "./arch/arm/include/asm/memory.h" 2
# 271 "./arch/arm/include/asm/memory.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) phys_addr_t __virt_to_phys_nodebug(unsigned long x) {
return (phys_addr_t)x - (0xC0000000UL) + (0x00000000UL);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __phys_to_virt(phys_addr_t x) {
return x - (0x00000000UL) + (0xC0000000UL);
}
# 304 "./arch/arm/include/asm/memory.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) phys_addr_t virt_to_phys(const volatile void *x) {
return __virt_to_phys_nodebug((unsigned long)(x));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void *phys_to_virt(phys_addr_t x) {
return (void *)__phys_to_virt(x);
}
# 323 "./arch/arm/include/asm/memory.h"
extern long long arch_phys_to_idmap_offset;

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool arm_has_idmap_alias(void) {
return 1 && arch_phys_to_idmap_offset != 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long phys_to_idmap(phys_addr_t addr) {
if (1 && arch_phys_to_idmap_offset) {
addr += arch_phys_to_idmap_offset;
if (addr > (u32)~0)
addr = ((u32)~0);
}
return addr;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) phys_addr_t idmap_to_phys(unsigned long idmap) {
phys_addr_t addr = idmap;

if (1 && arch_phys_to_idmap_offset)
addr -= arch_phys_to_idmap_offset;

return addr;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __virt_to_idmap(unsigned long x) {
return phys_to_idmap(__virt_to_phys_nodebug(x));
}
# 394 "./arch/arm/include/asm/memory.h"
# 1 "./include/asm-generic/memory_model.h" 1

# 1 "./include/linux/pfn.h" 1
# 13 "./include/linux/pfn.h"
typedef struct {
u64 val;
} pfn_t;
# 6 "./include/asm-generic/memory_model.h" 2
# 395 "./arch/arm/include/asm/memory.h" 2
# 164 "./arch/arm/include/asm/page.h" 2

# 1 "./include/asm-generic/getorder.h" 1
# 29 "./include/asm-generic/getorder.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((__const__)) int get_order(unsigned long size) {
if (__builtin_constant_p(size)) {
if (!size)
return 32 - 12;

if (size < (1UL << 12))
return 0;

return ( __builtin_constant_p((size) - 1) ? ( __builtin_constant_p((size) - 1) ? ( ((size) - 1) < 2 ? 0 : ((size) - 1) & (1ULL << 63) ? 63 : ((size) - 1) & (1ULL << 62) ? 62 : ((size) - 1) & (1ULL << 61) ? 61 : ((size) - 1) & (1ULL << 60) ? 60 : ((size) - 1) & (1ULL << 59) ? 59 : ((size) - 1) & (1ULL << 58) ? 58 : ((size) - 1) & (1ULL << 57) ? 57 : ((size) - 1) & (1ULL << 56) ? 56 : ((size) - 1) & (1ULL << 55) ? 55 : ((size) - 1) & (1ULL << 54) ? 54 : ((size) - 1) & (1ULL << 53) ? 53 : ((size) - 1) & (1ULL << 52) ? 52 : ((size) - 1) & (1ULL << 51) ? 51 : ((size) - 1) & (1ULL << 50) ? 50 : ((size) - 1) & (1ULL << 49) ? 49 : ((size) - 1) & (1ULL << 48) ? 48 : ((size) - 1) & (1ULL << 47) ? 47 : ((size) - 1) & (1ULL << 46) ? 46 : ((size) - 1) & (1ULL << 45) ? 45 : ((size) - 1) & (1ULL << 44) ? 44 : ((size) - 1) & (1ULL << 43) ? 43 : ((size) - 1) & (1ULL << 42) ? 42 : ((size) - 1) & (1ULL << 41) ? 41 : ((size) - 1) & (1ULL << 40) ? 40 : ((size) - 1) & (1ULL << 39) ? 39 : ((size) - 1) & (1ULL << 38) ? 38 : ((size) - 1) & (1ULL << 37) ? 37 : ((size) - 1) & (1ULL << 36) ? 36 : ((size) - 1) & (1ULL << 35) ? 35 : ((size) - 1) & (1ULL << 34) ? 34 : ((size) - 1) & (1ULL << 33) ? 33 : ((size) - 1) & (1ULL << 32) ? 32 : ((size) - 1) & (1ULL << 31) ? 31 : ((size) - 1) & (1ULL << 30) ? 30 : ((size) - 1) & (1ULL << 29) ? 29 : ((size) - 1) & (1ULL << 28) ? 28 : ((size) - 1) & (1ULL << 27) ? 27 : ((size) - 1) & (1ULL << 26) ? 26 : ((size) - 1) & (1ULL << 25) ? 25 : ((size) - 1) & (1ULL << 24) ? 24 : ((size) - 1) & (1ULL << 23) ? 23 : ((size) - 1) & (1ULL << 22) ? 22 : ((size) - 1) & (1ULL << 21) ? 21 : ((size) - 1) & (1ULL << 20) ? 20 : ((size) - 1) & (1ULL << 19) ? 19 : ((size) - 1) & (1ULL << 18) ? 18 : ((size) - 1) & (1ULL << 17) ? 17 : ((size) - 1) & (1ULL << 16) ? 16 : ((size) - 1) & (1ULL << 15) ? 15 : ((size) - 1) & (1ULL << 14) ? 14 : ((size) - 1) & (1ULL << 13) ? 13 : ((size) - 1) & (1ULL << 12) ? 12 : ((size) - 1) & (1ULL << 11) ? 11 : ((size) - 1) & (1ULL << 10) ? 10 : ((size) - 1) & (1ULL << 9) ? 9 : ((size) - 1) & (1ULL << 8) ? 8 : ((size) - 1) & (1ULL << 7) ? 7 : ((size) - 1) & (1ULL << 6) ? 6 : ((size) - 1) & (1ULL << 5) ? 5 : ((size) - 1) & (1ULL << 4) ? 4 : ((size) - 1) & (1ULL << 3) ? 3 : ((size) - 1) & (1ULL << 2) ? 2 : 1) : -1) : (sizeof((size) - 1) <= 4) ? __ilog2_u32((size) - 1) : __ilog2_u64((size) - 1) ) - 12 + 1;
}

size--;
size >>= 12;

return fls(size);

}
# 172 "./arch/arm/include/asm/page.h" 2
# 18 "./arch/arm/include/asm/thread_info.h" 2
# 29 "./arch/arm/include/asm/thread_info.h"
struct task_struct;

typedef unsigned long mm_segment_t;

struct cpu_context_save {
__u32 r4;
__u32 r5;
__u32 r6;
__u32 r7;
__u32 r8;
__u32 r9;
__u32 sl;
__u32 fp;
__u32 sp;
__u32 pc;
__u32 extra[2];
};

struct thread_info {
unsigned long flags;
int preempt_count;
mm_segment_t addr_limit;
struct task_struct *task;
__u32 cpu;
__u32 cpu_domain;
struct cpu_context_save cpu_context;
__u32 syscall;
__u8 used_cp[16];
unsigned long tp_value[2];

union fp_state fpstate __attribute__((aligned(8))); union vfp_state vfpstate;

unsigned long thumbee_state;

};
# 88 "./arch/arm/include/asm/thread_info.h" register unsigned long current_stack_pointer asm ("sp");

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct thread_info *current_thread_info(void) __attribute__((__const__));

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct thread_info *current_thread_info(void) {
return (struct thread_info *)
(current_stack_pointer & ~((((1UL) << 12) << 1) - 1));
}
# 114 "./arch/arm/include/asm/thread_info.h"
extern void crunch_task_disable(struct thread_info *);
extern void crunch_task_copy(struct thread_info *, void *);
extern void crunch_task_restore(struct thread_info *, void *);
extern void crunch_task_release(struct thread_info *);

extern void iwmmxt_task_disable(struct thread_info *); extern void iwmmxt_task_copy(struct thread_info *, void *); extern void iwmmxt_task_restore(struct thread_info *, void *); extern void iwmmxt_task_release(struct thread_info *); extern void iwmmxt_task_switch(struct thread_info *);

extern void vfp_sync_hwstate(struct thread_info *); extern void vfp_flush_hwstate(struct thread_info *);

struct user_vfp;
struct user_vfp_exc;

extern int vfp_preserve_user_clear_hwstate(struct user_vfp *,

        struct user_vfp_exc *);
extern int vfp_restore_user_hwstate(struct user_vfp *,
        struct user_vfp_exc *);

# 39 "./include/linux/thread_info.h" 2
# 53 "./include/linux/thread_info.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void set_ti_thread_flag(struct thread_info *ti, int flag) {
_set_bit(flag,(unsigned long *)&ti->flags);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void clear_ti_thread_flag(struct thread_info *ti, int flag) {
_clear_bit(flag,(unsigned long *)&ti->flags);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void update_ti_thread_flag(struct thread_info *ti, int flag,
bool value)
{
if (value)
set_ti_thread_flag(ti, flag);
else
clear_ti_thread_flag(ti, flag);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) {
return _test_and_set_bit(flag,(unsigned long *)&ti->flags);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) {
return _test_and_clear_bit(flag,(unsigned long *)&ti->flags);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int test_ti_thread_flag(struct thread_info *ti, int flag) {
return test_bit(flag, (unsigned long *)&ti->flags);
}
# 103 "./include/linux/thread_info.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_within_stack_frames(const void * const stack,
const void * const stackend,
const void *obj, unsigned long len)
{
return 0;
}

extern void __check_object_size(const void *ptr, unsigned long n,

     bool to_user);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void check_object_size(const void *ptr, unsigned long n,
bool to_user)
{
if (!__builtin_constant_p(n))
__check_object_size(ptr, n, to_user);
}

extern void
__bad_copy_from(void);
extern void
__bad_copy_to(void);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void copy_overflow(int size, unsigned long count)
{
({ int __ret_warn_on = !!(1); if (__builtin_expect(!!(__ret_warn_on), 0)) warn_slowpath_fmt("include/linux/thread_info.h", 134, "Buffer overflow detected (%d < %lu)!\n", size, count); __builtin_expect(!!(__ret_warn_on), 0); });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) bool check_copy_size(const void *addr, size_t bytes, bool is_source)
{
int sz = __builtin_object_size(addr, 0);
if (__builtin_expect(!!(sz >= 0 && sz < bytes), 0)) {
if (!__builtin_constant_p(bytes))
copy_overflow(sz, bytes);
else if (is_source)
__bad_copy_from();
else
__bad_copy_to();
return false;
}
check_object_size(addr, bytes, is_source);
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_setup_new_exec(void) { } # 6 "./include/asm-generic/current.h" 2
# 2 "./arch/arm/include/generated/asm/current.h" 2
# 13 "./include/linux/sched.h" 2

# 1 "./include/linux/pid.h" 1

# 1 "./include/linux/rculist.h" 1
# 10 "./include/linux/rculist.h"
# 1 "./include/linux/list.h" 1

# 1 "./include/linux/poison.h" 1
# 8 "./include/linux/list.h" 2
# 26 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void INIT_LIST_HEAD(struct list_head *list)
{
({ union { typeof(list->next) __val; char __c[1]; } __u = { .__val = ( typeof(list->next)) (list) }; __write_once_size(&(list->next), __u.__c, sizeof(list->next)); __u.__val; }); list->prev = list;
}

extern bool __list_add_valid(struct list_head *new,
struct list_head *prev,
struct list_head *next);
extern bool __list_del_entry_valid(struct list_head *entry);
# 56 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __list_add(struct list_head *new,
struct list_head *prev,
struct list_head *next)
{
if (!__list_add_valid(new, prev, next))
return;

next->prev = new;
new->next = next;
new->prev = prev;
({ union { typeof(prev->next) __val; char __c[1]; } __u = { .__val = ( typeof(prev->next)) (new) }; __write_once_size(&(prev->next), __u.__c, sizeof(prev->next)); __u.__val; });
}
# 77 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_add(struct list_head *new, struct list_head *head) {
__list_add(new, head, head->next);
}
# 91 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_add_tail(struct list_head *new, struct list_head *head) {
__list_add(new, head->prev, head);
}
# 103 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __list_del(struct list_head * prev, struct list_head * next) {
next->prev = prev;
({ union { typeof(prev->next) __val; char __c[1]; } __u = { .__val = ( typeof(prev->next)) (next) }; __write_once_size(&(prev->next), __u.__c, sizeof(prev->next)); __u.__val; });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __list_del_entry(struct list_head *entry) {
if (!__list_del_entry_valid(entry))
return;

__list_del(entry->prev, entry->next);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_del(struct list_head *entry) {
__list_del_entry(entry);
entry->next = ((void *) 0x100 + 0);
entry->prev = ((void *) 0x200 + 0);
}
# 137 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_replace(struct list_head *old,
struct list_head *new)
{
new->next = old->next;
new->next->prev = new;
new->prev = old->prev;
new->prev->next = new;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_replace_init(struct list_head *old,
struct list_head *new)
{
list_replace(old, new);
INIT_LIST_HEAD(old);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_del_init(struct list_head *entry) {
__list_del_entry(entry);
INIT_LIST_HEAD(entry);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_move(struct list_head *list, struct list_head *head) {
__list_del_entry(list);
list_add(list, head);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_move_tail(struct list_head *list,
struct list_head *head)
{
__list_del_entry(list);
list_add_tail(list, head);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int list_is_last(const struct list_head *list,
const struct list_head *head)
{
return list->next == head;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int list_empty(const struct list_head *head)
{
return ({ union { typeof(head->next) __val; char __c[1]; } __u; if (1) __read_once_size(&(head->next), __u.__c, sizeof(head->next)); else __read_once_size_nocheck(&(head->next), __u.__c, sizeof(head->next)); do { } while (0); __u.__val; }) == head;
}
# 219 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int list_empty_careful(const struct list_head *head)
{
struct list_head *next = head->next;
return (next == head) && (next == head->prev);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_rotate_left(struct list_head *head) {
struct list_head *first;

if (!list_empty(head)) {
first = head->next;
list_move_tail(first, head);
}
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int list_is_singular(const struct list_head *head) {
return !list_empty(head) && (head->next == head->prev);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __list_cut_position(struct list_head *list,
struct list_head *head, struct list_head *entry)
{
struct list_head *new_first = entry->next;
list->next = head->next;
list->next->prev = list;
list->prev = entry;
entry->next = list;
head->next = new_first;
new_first->prev = head;
}
# 274 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_cut_position(struct list_head *list,
struct list_head *head, struct list_head *entry)
{
if (list_empty(head))
return;
if (list_is_singular(head) &&
(head->next != entry && head != entry))
return;
if (entry == head)
INIT_LIST_HEAD(list);
else
__list_cut_position(list, head, entry);
}
# 302 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_cut_before(struct list_head *list,
struct list_head *head,
struct list_head *entry)
{
if (head->next == entry) {
INIT_LIST_HEAD(list);
return;
}
list->next = head->next;
list->next->prev = list;
list->prev = entry->prev;
list->prev->next = list;
head->next = entry;
entry->prev = head;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __list_splice(const struct list_head *list,
struct list_head *prev,
struct list_head *next)
{
struct list_head *first = list->next;
struct list_head *last = list->prev;

first->prev = prev;
prev->next = first;

last->next = next;
next->prev = last;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_splice(const struct list_head *list,
struct list_head *head)
{
if (!list_empty(list))
__list_splice(list, head, head->next);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_splice_tail(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list))
__list_splice(list, head->prev, head);
}
# 363 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_splice_init(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list)) {
__list_splice(list, head, head->next);
INIT_LIST_HEAD(list);
}
}
# 380 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_splice_tail_init(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list)) {
__list_splice(list, head->prev, head);
INIT_LIST_HEAD(list);
}
}
# 658 "./include/linux/list.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void INIT_HLIST_NODE(struct hlist_node *h) {
h->next = ((void *)0);
h->pprev = ((void *)0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int hlist_unhashed(const struct hlist_node *h) {
return !h->pprev;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int hlist_empty(const struct hlist_head *h)
{
return !({ union { typeof(h->first) __val; char __c[1]; } __u; if (1) __read_once_size(&(h->first), __u.__c, sizeof(h->first)); else __read_once_size_nocheck(&(h->first), __u.__c, sizeof(h->first)); do { } while (0); __u.__val; });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __hlist_del(struct hlist_node *n) {
struct hlist_node *next = n->next;
struct hlist_node **pprev = n->pprev;

({ union { typeof(*pprev) __val; char __c[1]; } __u = { .__val = ( typeof(*pprev)) (next) }; __write_once_size(&(*pprev), __u.__c, sizeof(*pprev)); __u.__val; }); if (next)
next->pprev = pprev;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_del(struct hlist_node *n) {
__hlist_del(n);
n->next = ((void *) 0x100 + 0);
n->pprev = ((void *) 0x200 + 0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_del_init(struct hlist_node *n) {
if (!hlist_unhashed(n)) {
__hlist_del(n);
INIT_HLIST_NODE(n);
}
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h) {
struct hlist_node *first = h->first;
n->next = first;
if (first)
first->pprev = &n->next;
({ union { typeof(h->first) __val; char __c[1]; } __u = { .__val = ( typeof(h->first)) (n) }; __write_once_size(&(h->first), __u.__c, sizeof(h->first)); __u.__val; }); n->pprev = &h->first;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_before(struct hlist_node *n,
struct hlist_node *next)
{
n->pprev = next->pprev;
n->next = next;
next->pprev = &n->next;
({ union { typeof(*(n->pprev)) __val; char __c[1]; } __u = { .__val = ( typeof(*(n->pprev))) (n) }; __write_once_size(&(*(n->pprev)), __u.__c, sizeof(*(n->pprev))); __u.__val; });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_behind(struct hlist_node *n,
struct hlist_node *prev)
{
n->next = prev->next;
({ union { typeof(prev->next) __val; char __c[1]; } __u = { .__val = ( typeof(prev->next)) (n) }; __write_once_size(&(prev->next), __u.__c, sizeof(prev->next)); __u.__val; }); n->pprev = &prev->next;

if (n->next)
n->next->pprev = &n->next;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_fake(struct hlist_node *n) {
n->pprev = &n->next;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool hlist_fake(struct hlist_node *h) {
return h->pprev == &h->next;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool hlist_is_singular_node(struct hlist_node *n, struct hlist_head *h)
{
return !n->next && n->pprev == &h->first;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_move_list(struct hlist_head *old,
struct hlist_head *new)
{
new->first = old->first;
if (new->first)
new->first->pprev = &new->first;
old->first = ((void *)0);
}
# 11 "./include/linux/rculist.h" 2
# 1 "./include/linux/rcupdate.h" 1
# 38 "./include/linux/rcupdate.h"
# 1 "./include/linux/atomic.h" 1

# 1 "./arch/arm/include/asm/atomic.h" 1
# 15 "./arch/arm/include/asm/atomic.h"
# 1 "./include/linux/prefetch.h" 1
# 15 "./include/linux/prefetch.h"
# 1 "./arch/arm/include/asm/processor.h" 1
# 22 "./arch/arm/include/asm/processor.h"
# 1 "./arch/arm/include/asm/hw_breakpoint.h" 1

struct task_struct;

struct arch_hw_breakpoint_ctrl {
u32 __reserved : 9,
mismatch : 1,

    : 9,

len : 8,
type : 2,
privilege : 2,
enabled : 1;
};

struct arch_hw_breakpoint {
u32 address;
u32 trigger;
struct arch_hw_breakpoint_ctrl step_ctrl;
struct arch_hw_breakpoint_ctrl ctrl;
};

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 encode_ctrl_reg(struct arch_hw_breakpoint_ctrl ctrl) {
return (ctrl.mismatch << 22) | (ctrl.len << 5) | (ctrl.type << 3) |
(ctrl.privilege << 1) | ctrl.enabled;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void decode_ctrl_reg(u32 reg,
struct arch_hw_breakpoint_ctrl *ctrl)
{
ctrl->enabled = reg & 0x1;
reg >>= 1;
ctrl->privilege = reg & 0x3;
reg >>= 2;
ctrl->type = reg & 0x3;
reg >>= 2;
ctrl->len = reg & 0xff;
reg >>= 17;
ctrl->mismatch = reg & 0x1;
}
# 114 "./arch/arm/include/asm/hw_breakpoint.h"
struct notifier_block;
struct perf_event;
struct pmu;

extern int arch_bp_generic_fields(struct arch_hw_breakpoint_ctrl ctrl,

      int *gen_len, int *gen_type);
extern int arch_check_bp_in_kernelspace(struct perf_event *bp);
extern int arch_validate_hwbkpt_settings(struct perf_event *bp);
extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused,
        unsigned long val, void *data);

extern u8 arch_get_debug_arch(void);
extern u8 arch_get_max_wp_len(void);
extern void clear_ptrace_hw_breakpoint(struct task_struct *tsk);

int arch_install_hw_breakpoint(struct perf_event *bp); void arch_uninstall_hw_breakpoint(struct perf_event *bp);

void hw_breakpoint_pmu_read(struct perf_event *bp); int hw_breakpoint_slots(int type);
# 23 "./arch/arm/include/asm/processor.h" 2

# 1 "./arch/arm/include/asm/unified.h" 1
# 26 "./arch/arm/include/asm/unified.h"
__asm__(".syntax unified");
# 26 "./arch/arm/include/asm/processor.h" 2

struct debug_info {

struct perf_event *hbp[(16 + 16)];

};

struct thread_struct {

unsigned long address;
unsigned long trap_no;
unsigned long error_code;

struct debug_info debug;
};
# 72 "./arch/arm/include/asm/processor.h"
struct task_struct;

extern void release_thread(struct task_struct *);

unsigned long get_wchan(struct task_struct *p);
# 112 "./arch/arm/include/asm/processor.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void prefetch(const void *ptr) {
__asm__ __volatile__(
"pld\t%a0"
:: "p" (ptr));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void prefetchw(const void *ptr) {
__asm__ __volatile__(
".arch_extension mp\n"
"9998: " "pldw" "\t%a0" "\n" " .pushsection \".alt.smp.init\", \"a\"\n" " .long 9998b\n" " " "pld" "\t%a0" "\n" " .popsection\n"

:: "p" (ptr));
}
# 16 "./include/linux/prefetch.h" 2
# 54 "./include/linux/prefetch.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void prefetch_range(void *addr, size_t len) {

char *cp;
char *end = addr + len;

for (cp = addr; cp < end; cp += (4*(1 << 6)))
prefetch(cp);

}
# 16 "./arch/arm/include/asm/atomic.h" 2

# 1 "./arch/arm/include/asm/cmpxchg.h" 1
# 28 "./arch/arm/include/asm/cmpxchg.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __xchg(unsigned long x, volatile void *ptr, int size) {
extern void __bad_xchg(volatile void *, int);
unsigned long ret;

unsigned int tmp;

prefetchw((const void *)ptr);

switch (size) {

case 1:
asm volatile("@ __xchg1\n"
"1: ldrexb %0, [%3]\n"
" strexb %1, %2, [%3]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (ret), "=&r" (tmp)
: "r" (x), "r" (ptr)
: "memory", "cc");
break;
case 2:
asm volatile("@ __xchg2\n"
"1: ldrexh %0, [%3]\n"
" strexh %1, %2, [%3]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (ret), "=&r" (tmp)
: "r" (x), "r" (ptr)
: "memory", "cc");
break;

case 4:
asm volatile("@ __xchg4\n"
"1: ldrex %0, [%3]\n"
" strex %1, %2, [%3]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (ret), "=&r" (tmp)
: "r" (x), "r" (ptr)
: "memory", "cc");
break;
# 108 "./arch/arm/include/asm/cmpxchg.h"
default:

__bad_xchg(ptr, size), ret = 0;
break;
}

return ret;
}

# 1 "./include/asm-generic/cmpxchg-local.h" 1

extern unsigned long wrong_size_cmpxchg(volatile void *ptr)
__attribute__((noreturn));

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __cmpxchg_local_generic(volatile void *ptr,
unsigned long old, unsigned long new, int size)
{
unsigned long flags, prev;

if (size == 8 && sizeof(unsigned long) != 8)
wrong_size_cmpxchg(ptr);

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); switch (size) {
case 1: prev = *(u8 *)ptr;
if (prev == old)
*(u8 *)ptr = (u8)new;
break;
case 2: prev = *(u16 *)ptr;
if (prev == old)
*(u16 *)ptr = (u16)new;
break;
case 4: prev = *(u32 *)ptr;
if (prev == old)
*(u32 *)ptr = (u32)new;
break;
case 8: prev = *(u64 *)ptr;
if (prev == old)
*(u64 *)ptr = (u64)new;
break;
default:
wrong_size_cmpxchg(ptr);
}
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); return prev;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 __cmpxchg64_local_generic(volatile void *ptr,
u64 old, u64 new)
{
u64 prev;
unsigned long flags;

do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); prev = *(u64 *)ptr;
if (prev == old)
*(u64 *)ptr = new;
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); return prev;
}
# 123 "./arch/arm/include/asm/cmpxchg.h" 2
# 150 "./arch/arm/include/asm/cmpxchg.h"
extern void __bad_cmpxchg(volatile void *ptr, int size);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
unsigned long new, int size)
{
unsigned long oldval, res;

prefetchw((const void *)ptr);

switch (size) {

case 1:
do {
asm volatile("@ __cmpxchg1\n"
" ldrexb %1, [%2]\n"
" mov %0, #0\n"
" teq %1, %3\n"
" strexbeq %0, %4, [%2]\n"

    : "=&r" (res), "=&r" (oldval)
    : "r" (ptr), "Ir" (old), "r" (new)
    : "memory", "cc");
  } while (res);
  break;
 case 2:
  do {
   asm volatile("@ __cmpxchg1\n"
   "	ldrexh	%1, [%2]\n"
   "	mov	%0, #0\n"
   "	teq	%1, %3\n"
   "	strexheq %0, %4, [%2]\n"
    : "=&r" (res), "=&r" (oldval)
    : "r" (ptr), "Ir" (old), "r" (new)
    : "memory", "cc");

} while (res);
break;

case 4:
do {
asm volatile("@ __cmpxchg4\n"
" ldrex %1, [%2]\n"
" mov %0, #0\n"
" teq %1, %3\n"
" strexeq %0, %4, [%2]\n"

    : "=&r" (res), "=&r" (oldval)
    : "r" (ptr), "Ir" (old), "r" (new)
    : "memory", "cc");

} while (res);
break;
default:
__bad_cmpxchg(ptr, size);
oldval = 0;
}

return oldval;
}
# 217 "./arch/arm/include/asm/cmpxchg.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __cmpxchg_local(volatile void *ptr,
unsigned long old,
unsigned long new, int size)
{
unsigned long ret;

switch (size) {

default:
ret = __cmpxchg(ptr, old, new, size);
}

return ret;
}
# 244 "./arch/arm/include/asm/cmpxchg.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long long __cmpxchg64(unsigned long long *ptr,
unsigned long long old,
unsigned long long new)
{
unsigned long long oldval;
unsigned long res;

prefetchw(ptr);

__asm__ __volatile__(
"1: ldrexd %1, %H1, [%3]\n"
" teq %1, %4\n"
" teqeq %H1, %H4\n"
" bne 2f\n"
" strexd %0, %5, %H5, [%3]\n"
" teq %0, #0\n"
" bne 1b\n"
"2:"
: "=&r" (res), "=&r" (oldval), "+Qo" (*ptr)
: "r" (ptr), "r" (old), "r" (new)
: "cc");

return oldval;
}
# 20 "./arch/arm/include/asm/atomic.h" 2
# 111 "./arch/arm/include/asm/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_cmpxchg_relaxed(atomic_t *ptr, int old, int new) {
int oldval;
unsigned long res;

prefetchw(&ptr->counter);

do {
__asm__ __volatile__("@ atomic_cmpxchg\n"
"ldrex %1, [%3]\n"
"mov %0, #0\n"
"teq %1, %4\n"
"strexeq %0, %5, [%3]\n"

      : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
      : "r" (&ptr->counter), "Ir" (old), "r" (new)
      : "cc");

} while (res);

return oldval;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __atomic_add_unless(atomic_t *v, int a, int u) {
int oldval, newval;
unsigned long tmp;

__asm__ __volatile__ ("dmb " "ish" : : : "memory"); prefetchw(&v->counter);

__asm__ __volatile__ ("@ atomic_add_unless\n"
"1: ldrex %0, [%4]\n"
" teq %0, %5\n"
" beq 2f\n"
" add %1, %0, %6\n"
" strex %2, %1, [%4]\n"
" teq %2, #0\n"
" bne 1b\n"
"2:"
: "=&r" (oldval), "=&r" (newval), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (u), "r" (a)
: "cc");

if (oldval != u)
__asm__ __volatile__ ("dmb " "ish" : : : "memory");

return oldval;
}
# 235 "./arch/arm/include/asm/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_add(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "add" "\n" "1: ldrex %0, [%3]\n" " " "add" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_add_return_relaxed(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "add" "_return\n" "1: ldrex %0, [%3]\n" " " "add" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_fetch_add_relaxed(int i, atomic_t *v) { unsigned long tmp; int result, val; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_fetch_" "add" "\n" "1: ldrex %0, [%4]\n" " " "add" " %1, %0, %5\n" " strex %2, %1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_sub(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "sub" "\n" "1: ldrex %0, [%3]\n" " " "sub" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_sub_return_relaxed(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "sub" "_return\n" "1: ldrex %0, [%3]\n" " " "sub" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_fetch_sub_relaxed(int i, atomic_t *v) { unsigned long tmp; int result, val; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_fetch_" "sub" "\n" "1: ldrex %0, [%4]\n" " " "sub" " %1, %0, %5\n" " strex %2, %1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; }
# 245 "./arch/arm/include/asm/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_and(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "and" "\n" "1: ldrex %0, [%3]\n" " " "and" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_fetch_and_relaxed(int i, atomic_t *v) { unsigned long tmp; int result, val; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_fetch_" "and" "\n" "1: ldrex %0, [%4]\n" " " "and" " %1, %0, %5\n" " strex %2, %1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_andnot(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "andnot" "\n" "1: ldrex %0, [%3]\n" " " "bic" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_fetch_andnot_relaxed(int i, atomic_t *v) { unsigned long tmp; int result, val; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_fetch_" "andnot" "\n" "1: ldrex %0, [%4]\n" " " "bic" " %1, %0, %5\n" " strex %2, %1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_or(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "or" "\n" "1: ldrex %0, [%3]\n" " " "orr" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_fetch_or_relaxed(int i, atomic_t *v) { unsigned long tmp; int result, val; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_fetch_" "or" "\n" "1: ldrex %0, [%4]\n" " " "orr" " %1, %0, %5\n" " strex %2, %1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_xor(int i, atomic_t *v) { unsigned long tmp; int result; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_" "xor" "\n" "1: ldrex %0, [%3]\n" " " "eor" " %0, %0, %4\n" " strex %1, %0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_fetch_xor_relaxed(int i, atomic_t *v) { unsigned long tmp; int result, val; prefetchw(&v->counter); __asm__ __volatile__("@ atomic_fetch_" "xor" "\n" "1: ldrex %0, [%4]\n" " " "eor" " %1, %0, %5\n" " strex %2, %1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "Ir" (i) : "cc"); return result; }
# 269 "./arch/arm/include/asm/atomic.h"
typedef struct {
long long counter;
} atomic64_t;
# 298 "./arch/arm/include/asm/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_read(const atomic64_t *v) {
long long result;

__asm__ __volatile__("@ atomic64_read\n"
" ldrexd %0, %H0, [%1]"
: "=&r" (result)
: "r" (&v->counter), "Qo" (v->counter)
);

return result;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic64_set(atomic64_t *v, long long i) {
long long tmp;

prefetchw(&v->counter);
__asm__ __volatile__("@ atomic64_set\n"
"1: ldrexd %0, %H0, [%2]\n"
" strexd %0, %3, %H3, [%2]\n"
" teq %0, #0\n"
" bne 1b"
: "=&r" (tmp), "=Qo" (v->counter)
: "r" (&v->counter), "r" (i)
: "cc");
}
# 397 "./arch/arm/include/asm/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic64_add(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "add" "\n" "1: ldrexd %0, %H0, [%3]\n" " " "adds" " %Q0, %Q0, %Q4\n" " " "adc" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_add_return_relaxed(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "add" "_return\n" "1: ldrexd %0, %H0, [%3]\n" " " "adds" " %Q0, %Q0, %Q4\n" " " "adc" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_fetch_add_relaxed(long long i, atomic64_t *v) { long long result, val; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_fetch_" "add" "\n" "1: ldrexd %0, %H0, [%4]\n" " " "adds" " %Q1, %Q0, %Q5\n" " " "adc" " %R1, %R0, %R5\n" " strexd %2, %1, %H1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic64_sub(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "sub" "\n" "1: ldrexd %0, %H0, [%3]\n" " " "subs" " %Q0, %Q0, %Q4\n" " " "sbc" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_sub_return_relaxed(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "sub" "_return\n" "1: ldrexd %0, %H0, [%3]\n" " " "subs" " %Q0, %Q0, %Q4\n" " " "sbc" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_fetch_sub_relaxed(long long i, atomic64_t *v) { long long result, val; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_fetch_" "sub" "\n" "1: ldrexd %0, %H0, [%4]\n" " " "subs" " %Q1, %Q0, %Q5\n" " " "sbc" " %R1, %R0, %R5\n" " strexd %2, %1, %H1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; }
# 412 "./arch/arm/include/asm/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic64_and(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "and" "\n" "1: ldrexd %0, %H0, [%3]\n" " " "and" " %Q0, %Q0, %Q4\n" " " "and" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_fetch_and_relaxed(long long i, atomic64_t *v) { long long result, val; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_fetch_" "and" "\n" "1: ldrexd %0, %H0, [%4]\n" " " "and" " %Q1, %Q0, %Q5\n" " " "and" " %R1, %R0, %R5\n" " strexd %2, %1, %H1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic64_andnot(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "andnot" "\n" "1: ldrexd %0, %H0, [%3]\n" " " "bic" " %Q0, %Q0, %Q4\n" " " "bic" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_fetch_andnot_relaxed(long long i, atomic64_t *v) { long long result, val; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_fetch_" "andnot" "\n" "1: ldrexd %0, %H0, [%4]\n" " " "bic" " %Q1, %Q0, %Q5\n" " " "bic" " %R1, %R0, %R5\n" " strexd %2, %1, %H1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic64_or(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "or" "\n" "1: ldrexd %0, %H0, [%3]\n" " " "orr" " %Q0, %Q0, %Q4\n" " " "orr" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_fetch_or_relaxed(long long i, atomic64_t *v) { long long result, val; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_fetch_" "or" "\n" "1: ldrexd %0, %H0, [%4]\n" " " "orr" " %Q1, %Q0, %Q5\n" " " "orr" " %R1, %R0, %R5\n" " strexd %2, %1, %H1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic64_xor(long long i, atomic64_t *v) { long long result; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_" "xor" "\n" "1: ldrexd %0, %H0, [%3]\n" " " "eor" " %Q0, %Q0, %Q4\n" " " "eor" " %R0, %R0, %R4\n" " strexd %1, %0, %H0, [%3]\n" " teq %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_fetch_xor_relaxed(long long i, atomic64_t *v) { long long result, val; unsigned long tmp; prefetchw(&v->counter); __asm__ __volatile__("@ atomic64_fetch_" "xor" "\n" "1: ldrexd %0, %H0, [%4]\n" " " "eor" " %Q1, %Q0, %Q5\n" " " "eor" " %R1, %R0, %R5\n" " strexd %2, %1, %H1, [%4]\n" " teq %2, #0\n" " bne 1b" : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (i) : "cc"); return result; }
# 427 "./arch/arm/include/asm/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_cmpxchg_relaxed(atomic64_t *ptr, long long old, long long new)
{
long long oldval;
unsigned long res;

prefetchw(&ptr->counter);

do {
__asm__ __volatile__("@ atomic64_cmpxchg\n"
"ldrexd %1, %H1, [%3]\n"
"mov %0, #0\n"
"teq %1, %4\n"
"teqeq %H1, %H4\n"
"strexdeq %0, %5, %H5, [%3]"
: "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter) : "r" (&ptr->counter), "r" (old), "r" (new) : "cc");
} while (res);

return oldval;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_xchg_relaxed(atomic64_t *ptr, long long new) {
long long result;
unsigned long tmp;

prefetchw(&ptr->counter);

__asm__ __volatile__("@ atomic64_xchg\n"
"1: ldrexd %0, %H0, [%3]\n"
" strexd %1, %4, %H4, [%3]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (result), "=&r" (tmp), "+Qo" (ptr->counter) : "r" (&ptr->counter), "r" (new)
: "cc");

return result;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long long atomic64_dec_if_positive(atomic64_t *v) {
long long result;
unsigned long tmp;

__asm__ __volatile__ ("dmb " "ish" : : : "memory"); prefetchw(&v->counter);

__asm__ __volatile__("@ atomic64_dec_if_positive\n"
"1: ldrexd %0, %H0, [%3]\n"
" subs %Q0, %Q0, #1\n"
" sbc %R0, %R0, #0\n"
" teq %R0, #0\n"
" bmi 2f\n"
" strexd %1, %0, %H0, [%3]\n"
" teq %1, #0\n"
" bne 1b\n"
"2:"
: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter)
: "cc");

__asm__ __volatile__ ("dmb " "ish" : : : "memory");

return result;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic64_add_unless(atomic64_t *v, long long a, long long u) {
long long val;
unsigned long tmp;
int ret = 1;

__asm__ __volatile__ ("dmb " "ish" : : : "memory"); prefetchw(&v->counter);

__asm__ __volatile__("@ atomic64_add_unless\n"
"1: ldrexd %0, %H0, [%4]\n"
" teq %0, %5\n"
" teqeq %H0, %H5\n"
" moveq %1, #0\n"
" beq 2f\n"
" adds %Q0, %Q0, %Q6\n"
" adc %R0, %R0, %R6\n"
" strexd %2, %0, %H0, [%4]\n"
" teq %2, #0\n"
" bne 1b\n"
"2:"
: "=&r" (val), "+r" (ret), "=&r" (tmp), "+Qo" (v->counter) : "r" (&v->counter), "r" (u), "r" (a)
: "cc");

if (ret)
__asm__ __volatile__ ("dmb " "ish" : : : "memory");

return ret;
}
# 6 "./include/linux/atomic.h" 2
# 531 "./include/linux/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_add_unless(atomic_t *v, int a, int u) {
return __atomic_add_unless(v, a, u) != u;
}
# 587 "./include/linux/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_inc_not_zero_hint(atomic_t *v, int hint) {
int val, c = hint;

if (!hint)
return atomic_add_unless((v), 1, 0);

do {
val = ({ typeof(atomic_cmpxchg_relaxed(v, c, c + 1)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_cmpxchg_relaxed(v, c, c + 1); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); if (val == c)
return 1;
c = val;
} while (c);

return 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_inc_unless_negative(atomic_t *p)
{
int v, v1;
for (v = 0; v >= 0; v = v1) {
v1 = ({ typeof(atomic_cmpxchg_relaxed(p, v, v + 1)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_cmpxchg_relaxed(p, v, v + 1); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); if (__builtin_expect(!!(v1 == v), 1))
return 1;
}
return 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_dec_unless_positive(atomic_t *p)
{
int v, v1;
for (v = 0; v <= 0; v = v1) {
v1 = ({ typeof(atomic_cmpxchg_relaxed(p, v, v - 1)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_cmpxchg_relaxed(p, v, v - 1); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; });
if (__builtin_expect(!!(v1 == v), 1))
return 1;
}
return 0;
}
# 640 "./include/linux/atomic.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_dec_if_positive(atomic_t *v)
{
int c, old, dec;
c = ({ union { typeof((v)->counter) __val; char __c[1]; } __u; if (1) __read_once_size(&((v)->counter), __u.__c, sizeof((v)->counter)); else __read_once_size_nocheck(&((v)->counter), __u.__c, sizeof((v)->counter)); do { } while (0); __u.__val; });
for (;;) {
dec = c - 1;
if (__builtin_expect(!!(dec < 0), 0))
break;
old = ({ typeof(atomic_cmpxchg_relaxed((v), c, dec)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_cmpxchg_relaxed((v), c, dec); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; });
if (__builtin_expect(!!(old == c), 1))
break;
c = old;
}
return dec;
}
# 1076 "./include/linux/atomic.h"
# 1 "./include/asm-generic/atomic-long.h" 1
# 31 "./include/asm-generic/atomic-long.h"
typedef atomic_t atomic_long_t;
# 45 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_read(const atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ union { typeof((v)->counter) __val; char __c[1]; } __u; if (1) __read_once_size(&((v)->counter), __u.__c, sizeof((v)->counter)); else __read_once_size_nocheck(&((v)->counter), __u.__c, sizeof((v)->counter)); do { } while (0); __u.__val; }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_read_acquire(const atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(*&(v)->counter) ___p1 = ({ union { typeof(*&(v)->counter) __val; char __c[1]; } __u; if (1) __read_once_size(&(*&(v)->counter), __u.__c, sizeof(*&(v)->counter)); else __read_once_size_nocheck(&(*&(v)->counter), __u.__c, sizeof(*&(v)->counter)); do { } while (0); __u.__val; }); do { bool __cond = !((sizeof(*&(v)->counter) == sizeof(char) || sizeof(*&(v)->counter) == sizeof(short) || sizeof(*&(v)->counter) == sizeof(int) || sizeof(*&(v)->counter) == sizeof(long))); extern void __compiletime_assert_0(void) ; if (__cond) __compiletime_assert_0(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ___p1; }); } # 57 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_long_set(atomic_long_t *l, long i) { atomic_t *v = (atomic_t *)l; ({ union { typeof(((v)->counter)) __val; char __c[1]; } __u = { .__val = ( typeof(((v)->counter))) ((i)) }; __write_once_size(&(((v)->counter)), __u.__c, sizeof(((v)->counter))); __u.__val; }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void atomic_long_set_release(atomic_long_t *l, long i) { atomic_t *v = (atomic_t *)l; do { do { bool __cond = !((sizeof(*&(v)->counter) == sizeof(char) || sizeof(*&(v)->counter) == sizeof(short) || sizeof(*&(v)->counter) == sizeof(int) || sizeof(*&(v)->counter) == sizeof(long))); extern void __compiletime_assert_1(void) ; if (__cond) __compiletime_assert_1(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(v)->counter) __val; char __c[1]; } __u = { .__val = ( typeof(*&(v)->counter)) ((i)) }; __write_once_size(&(*&(v)->counter), __u.__c, sizeof(*&(v)->counter)); __u.__val; }); } while (0); } # 70 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_add_return(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_add_return_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_add_return_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_add_return_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_add_return_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_add_return_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_add_return_relaxed(i, v)) __ret = atomic_add_return_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_add_return_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_add_return_relaxed(i, v); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_sub_return(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_sub_return_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_sub_return_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_sub_return_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_sub_return_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_sub_return_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_sub_return_relaxed(i, v)) __ret = atomic_sub_return_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_sub_return_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_sub_return_relaxed(i, v); }); }
# 102 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l)
{
atomic_t *v = (atomic_t *)l;

atomic_add(1, v);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l) {
atomic_t *v = (atomic_t *)l;

atomic_sub(1, v);
}
# 125 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_add(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_add_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_add_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_add_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_add_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_add_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_add_relaxed(i, v)) __ret = atomic_fetch_add_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_add_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_add_relaxed(i, v); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_sub(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_sub_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_sub_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_sub_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_sub_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_sub_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_sub_relaxed(i, v)) __ret = atomic_fetch_sub_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_sub_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_sub_relaxed(i, v); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_and(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_and_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_and_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_and_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_and_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_and_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_and_relaxed(i, v)) __ret = atomic_fetch_and_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_and_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_and_relaxed(i, v); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_andnot(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_andnot_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_andnot_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_andnot_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_andnot_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_andnot_relaxed(i, v)) __ret = atomic_fetch_andnot_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_andnot_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_andnot_relaxed(i, v); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_or(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_or_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_or_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_or_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_or_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_or_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_or_relaxed(i, v)) __ret = atomic_fetch_or_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_or_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_or_relaxed(i, v); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_xor(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_xor_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_xor_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_xor_relaxed(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_xor_relaxed(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_xor_acquire(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_xor_relaxed(i, v)) __ret = atomic_fetch_xor_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_xor_release(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_xor_relaxed(i, v); }); }
# 161 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_inc(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_add_relaxed(1, (v))) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_add_relaxed(1, (v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_inc_relaxed(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_add_relaxed(1, (v)); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_inc_acquire(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_add_relaxed(1, (v))) __ret = atomic_fetch_add_relaxed(1, (v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_inc_release(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_add_relaxed(1, (v)); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_dec(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_sub_relaxed(1, (v))) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_fetch_sub_relaxed(1, (v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_dec_relaxed(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)atomic_fetch_sub_relaxed(1, (v)); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_dec_acquire(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof(atomic_fetch_sub_relaxed(1, (v))) __ret = atomic_fetch_sub_relaxed(1, (v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_fetch_dec_release(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); atomic_fetch_sub_relaxed(1, (v)); }); }
# 181 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_add(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_sub(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_and(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_and(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_andnot(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_andnot(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_or(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_or(i, v); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void atomic_long_xor(long i, atomic_long_t *l) { atomic_t *v = (atomic_t *)l; atomic_xor(i, v); }

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_long_sub_and_test(long i, atomic_long_t *l) {
atomic_t *v = (atomic_t *)l;

return (({ typeof(atomic_sub_return_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_sub_return_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }) == 0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_long_dec_and_test(atomic_long_t *l) {
atomic_t *v = (atomic_t *)l;

return (({ typeof(atomic_sub_return_relaxed(1, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_sub_return_relaxed(1, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }) == 0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_long_inc_and_test(atomic_long_t *l) {
atomic_t *v = (atomic_t *)l;

return (({ typeof(atomic_add_return_relaxed(1, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_add_return_relaxed(1, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }) == 0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int atomic_long_add_negative(long i, atomic_long_t *l) {
atomic_t *v = (atomic_t *)l;

return (({ typeof(atomic_add_return_relaxed(i, v)) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = atomic_add_return_relaxed(i, v); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }) < 0);
}
# 226 "./include/asm-generic/atomic-long.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_inc_return(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof((atomic_add_return_relaxed(1, v))) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = (atomic_add_return_relaxed(1, v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_inc_return_relaxed(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)(atomic_add_return_relaxed(1, v)); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_inc_return_acquire(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof((atomic_add_return_relaxed(1, v))) __ret = (atomic_add_return_relaxed(1, v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_inc_return_release(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); (atomic_add_return_relaxed(1, v)); }); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_dec_return(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof((atomic_sub_return_relaxed(1, v))) __ret; __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret = (atomic_sub_return_relaxed(1, v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_dec_return_relaxed(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)(atomic_sub_return_relaxed(1, v)); }
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_dec_return_acquire(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ typeof((atomic_sub_return_relaxed(1, v))) __ret = (atomic_sub_return_relaxed(1, v)); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); __ret; }); } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_dec_return_release(atomic_long_t *l) { atomic_t *v = (atomic_t *)l; return (long)({ __asm__ __volatile__ ("dmb " "ish" : : : "memory"); (atomic_sub_return_relaxed(1, v)); }); }

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long atomic_long_add_unless(atomic_long_t *l, long a, long u) {
atomic_t *v = (atomic_t *)l;

return (long)atomic_add_unless(v, a, u);
}
# 1077 "./include/linux/atomic.h" 2
# 39 "./include/linux/rcupdate.h" 2

# 1 "./include/linux/preempt.h" 1
# 81 "./include/linux/preempt.h"
# 1 "./arch/arm/include/generated/asm/preempt.h" 1 # 1 "./include/asm-generic/preempt.h" 1

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int preempt_count(void)
{
return ({ union { typeof(current_thread_info()->preempt_count) __val; char __c[1]; } __u; if (1) __read_once_size(&(current_thread_info()->preempt_count), __u.__c, sizeof(current_thread_info()->preempt_count)); else __read_once_size_nocheck(&(current_thread_info()->preempt_count), __u.__c, sizeof(current_thread_info()->preempt_count)); do { } while (0); __u.__val; });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) volatile int *preempt_count_ptr(void) {
return &current_thread_info()->preempt_count;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void preempt_count_set(int pc) {
*preempt_count_ptr() = pc;
}
# 35 "./include/asm-generic/preempt.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void set_preempt_need_resched(void) {
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void clear_preempt_need_resched(void) {
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) bool test_preempt_need_resched(void) {
return false;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void __preempt_count_add(int val) {
*preempt_count_ptr() += val;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void __preempt_count_sub(int val) {
*preempt_count_ptr() -= val;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) bool __preempt_count_dec_and_test(void) {

return !--*preempt_count_ptr() && test_ti_thread_flag(current_thread_info(), 1);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) bool should_resched(int preempt_offset) {
return __builtin_expect(!!(preempt_count() == preempt_offset && test_ti_thread_flag(current_thread_info(), 1)), 0);

}

extern void preempt_schedule(void);

extern void preempt_schedule_notrace(void);
# 2 "./arch/arm/include/generated/asm/preempt.h" 2
# 82 "./include/linux/preempt.h" 2
# 41 "./include/linux/rcupdate.h" 2
# 1 "./include/linux/bottom_half.h" 1
# 10 "./include/linux/bottom_half.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void __local_bh_disable_ip(unsigned long ip, unsigned int cnt) {
__preempt_count_add(cnt);
__asm__ __volatile__("": : :"memory");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void local_bh_disable(void) {
__local_bh_disable_ip(({ __label__ __here; __here: (unsigned long)&&__here; }), (2 * (1UL << (0 + 8))));
}

extern void _local_bh_enable(void);
extern void __local_bh_enable_ip(unsigned long ip, unsigned int cnt);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void local_bh_enable_ip(unsigned long ip) {
__local_bh_enable_ip(ip, (2 * (1UL << (0 + 8))));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void local_bh_enable(void) {
__local_bh_enable_ip(({ __label__ __here; __here: (unsigned long)&&__here; }), (2 * (1UL << (0 + 8))));
}
# 42 "./include/linux/rcupdate.h" 2
# 1 "./include/linux/lockdep.h" 1
# 13 "./include/linux/lockdep.h"
struct task_struct;
struct lockdep_map;

extern int prove_locking;
extern int lock_stat;
# 491 "./include/linux/lockdep.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void lockdep_off(void) {
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void lockdep_on(void)
{
}
# 529 "./include/linux/lockdep.h"
struct lock_class_key { };
# 542 "./include/linux/lockdep.h"
struct pin_cookie { };
# 552 "./include/linux/lockdep.h"
enum xhlock_context_t {
XHLOCK_HARD,
XHLOCK_SOFT,
XHLOCK_CTX_NR,
};
# 597 "./include/linux/lockdep.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void crossrelease_hist_start(enum xhlock_context_t c) {} static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void crossrelease_hist_end(enum xhlock_context_t c) {} static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void lockdep_invariant_state(bool force) {} static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void lockdep_init_task(struct task_struct *task) {} static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void lockdep_free_task(struct task_struct *task) {} # 663 "./include/linux/lockdep.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void print_irqtrace_events(struct task_struct *curr) {
}
# 731 "./include/linux/lockdep.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
{
}
# 43 "./include/linux/rcupdate.h" 2

# 1 "./include/linux/cpumask.h" 1
# 11 "./include/linux/cpumask.h"
# 1 "./include/linux/threads.h" 1
# 12 "./include/linux/cpumask.h" 2
# 1 "./include/linux/bitmap.h" 1

# 1 "./include/linux/string.h" 1
# 10 "./include/linux/string.h"
# 1 "./include/uapi/linux/string.h" 1
# 11 "./include/linux/string.h" 2

extern char *strndup_user(const char *, long); extern void *memdup_user(const void *, size_t); extern void *memdup_user_nul(const void *, size_t);

# 1 "./arch/arm/include/asm/string.h" 1
# 11 "./arch/arm/include/asm/string.h"
extern char * strrchr(const char * s, int c);

extern char * strchr(const char * s, int c);

extern void * memcpy(void *, const void *, __kernel_size_t); extern void * __memcpy(void *, const void *, __kernel_size_t);

extern void * memmove(void *, const void *, __kernel_size_t); extern void * __memmove(void *, const void *, __kernel_size_t);

extern void * memchr(const void *, int, __kernel_size_t);

extern void * memset(void *, int, __kernel_size_t); extern void * __memset(void *, int, __kernel_size_t);

extern void *__memset32(uint32_t *, uint32_t v, __kernel_size_t);
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void *memset32(uint32_t *p, uint32_t v, __kernel_size_t n) {
return __memset32(p, v, n * 4);
}

extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi);
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n) {
return __memset64(p, v, n * 8, v >> 32);
}

extern void __memzero(void *ptr, __kernel_size_t n); # 20 "./include/linux/string.h" 2

extern char * strcpy(char *,const char *);

extern char * strncpy(char *,const char *, __kernel_size_t);

size_t strlcpy(char *, const char *, size_t);

ssize_t strscpy(char *, const char *, size_t);

extern char * strcat(char *, const char *);

extern char * strncat(char *, const char *, __kernel_size_t);

extern size_t strlcat(char *, const char *, __kernel_size_t);

extern int strcmp(const char *,const char *);

extern int strncmp(const char *,const char *,__kernel_size_t);

extern int strcasecmp(const char *s1, const char *s2);

extern int strncasecmp(const char *s1, const char *s2, size_t n);

extern char * strchrnul(const char *,int);

extern char * strnchr(const char *, size_t, int);

extern char * __attribute__((warn_unused_result)) skip_spaces(const char *);

extern char *strim(char *);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((warn_unused_result)) char *strstrip(char *str) {
return strim(str);
}

extern char * strstr(const char *, const char *);

extern char * strnstr(const char *, const char *, size_t);

extern __kernel_size_t strlen(const char *);

extern __kernel_size_t strnlen(const char *,__kernel_size_t);

extern char * strpbrk(const char *,const char *);

extern char * strsep(char **,const char *);

extern __kernel_size_t strspn(const char *,const char *);

extern __kernel_size_t strcspn(const char *,const char *);

extern void *memset16(uint16_t *, uint16_t, __kernel_size_t);
# 116 "./include/linux/string.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void *memset_l(unsigned long *p, unsigned long v,
__kernel_size_t n)
{
if (32 == 32)
return memset32((uint32_t *)p, v, n);
else
return memset64((uint64_t *)p, v, n);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void *memset_p(void **p, void *v, __kernel_size_t n) {
if (32 == 32)
return memset32((uint32_t *)p, (uintptr_t)v, n);
else
return memset64((uint64_t *)p, (uintptr_t)v, n);
}
# 140 "./include/linux/string.h"
extern void * memscan(void *,int,__kernel_size_t);

extern int memcmp(const void *,const void *,__kernel_size_t);

extern int bcmp(const void *,const void *,__kernel_size_t);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((warn_unused_result)) int memcpy_mcsafe(void *dst, const void *src,
size_t cnt)
{
memcpy(dst, src, cnt);
return 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void memcpy_flushcache(void *dst, const void *src, size_t cnt) {
memcpy(dst, src, cnt);
}

void *memchr_inv(const void *s, int c, size_t n);
char *strreplace(char *s, char old, char new);

extern void kfree_const(const void *x);

extern char *kstrdup(const char *s, gfp_t gfp) __attribute__((__malloc__)); extern const char *kstrdup_const(const char *s, gfp_t gfp); extern char *kstrndup(const char *s, size_t len, gfp_t gfp); extern void *kmemdup(const void *src, size_t len, gfp_t gfp); extern char *kmemdup_nul(const char *s, size_t len, gfp_t gfp);

extern char **argv_split(gfp_t gfp, const char *str, int *argcp); extern void argv_free(char **argv);

extern bool sysfs_streq(const char *s1, const char *s2);
# 191 "./include/linux/string.h"
int match_string(const char * const *array, size_t n, const char *string);
int __sysfs_match_string(const char * const *array, size_t n, const char *s);
# 204 "./include/linux/string.h"
int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args);
int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __attribute__((format(printf, 3, 4)));

extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,

           const void *from, size_t available);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool strstarts(const char *str, const char *prefix) {
return strncmp(str, prefix, strlen(prefix)) == 0;
}

size_t memweight(const void *ptr, size_t bytes);
void memzero_explicit(void *s, size_t count);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) const char *kbasename(const char *path) {
const char *tail = strrchr(path, '/');
return tail ? tail + 1 : path;
}

void fortify_panic(const char *name) __attribute__((noreturn)) ;
void __read_overflow(void) ;
void __read_overflow2(void) ;
void __read_overflow3(void) ;
void __write_overflow(void) ;
# 485 "./include/linux/string.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void memcpy_and_pad(void *dest, size_t dest_len,
const void *src, size_t count, int pad)
{
if (dest_len > count) {
memcpy(dest, src, count);
({ void *__p = (dest + count); size_t __n = dest_len - count; if ((__n) != 0) { if (__builtin_constant_p((pad)) && (pad) == 0) __memzero((__p),(__n)); else memset((__p),(pad),(__n)); } (__p); });
} else
memcpy(dest, src, dest_len);
}
# 10 "./include/linux/bitmap.h" 2
# 93 "./include/linux/bitmap.h"
extern unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags);
extern unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags);
extern void bitmap_free(const unsigned long *bitmap);

extern int __bitmap_empty(const unsigned long *bitmap, unsigned int nbits); extern int __bitmap_full(const unsigned long *bitmap, unsigned int nbits); extern int __bitmap_equal(const unsigned long *bitmap1,

     const unsigned long *bitmap2, unsigned int nbits);
extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
   unsigned int nbits);
extern void __bitmap_shift_right(unsigned long *dst, const unsigned long *src,
    unsigned int shift, unsigned int nbits);
extern void __bitmap_shift_left(unsigned long *dst, const unsigned long *src,
    unsigned int shift, unsigned int nbits);

extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
const unsigned long *bitmap2, unsigned int nbits);
extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
const unsigned long *bitmap2, unsigned int nbits);
extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
const unsigned long *bitmap2, unsigned int nbits);
extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
const unsigned long *bitmap2, unsigned int nbits);
extern int __bitmap_intersects(const unsigned long *bitmap1,
const unsigned long *bitmap2, unsigned int nbits);
extern int __bitmap_subset(const unsigned long *bitmap1,
const unsigned long *bitmap2, unsigned int nbits);
extern int __bitmap_weight(const unsigned long *bitmap, unsigned int nbits); extern void __bitmap_set(unsigned long *map, unsigned int start, int len); extern void __bitmap_clear(unsigned long *map, unsigned int start, int len);

extern unsigned long bitmap_find_next_zero_area_off(unsigned long *map,
unsigned long size,
unsigned long start,
unsigned int nr,
unsigned long align_mask,
unsigned long align_offset);
# 146 "./include/linux/bitmap.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long bitmap_find_next_zero_area(unsigned long *map,
unsigned long size,
unsigned long start,
unsigned int nr,
unsigned long align_mask)
{
return bitmap_find_next_zero_area_off(map, size, start, nr,

           align_mask, 0);
}

extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
unsigned long *dst, int nbits);
extern int bitmap_parse_user(const char *ubuf, unsigned int ulen,
unsigned long *dst, int nbits);
extern int bitmap_parselist(const char *buf, unsigned long *maskp,
int nmaskbits);
extern int bitmap_parselist_user(const char *ubuf, unsigned int ulen,
unsigned long *dst, int nbits);
extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
const unsigned long *old, const unsigned long *new, unsigned int nbits);
extern int bitmap_bitremap(int oldbit,
const unsigned long *old, const unsigned long *new, int bits);
extern void bitmap_onto(unsigned long *dst, const unsigned long *orig,
const unsigned long *relmap, unsigned int bits);
extern void bitmap_fold(unsigned long *dst, const unsigned long *orig,
unsigned int sz, unsigned int nbits);
extern int bitmap_find_free_region(unsigned long *bitmap, unsigned int bits, int order); extern void bitmap_release_region(unsigned long *bitmap, unsigned int pos, int order); extern int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order); extern unsigned int bitmap_from_u32array(unsigned long *bitmap,

      unsigned int nbits,
      const u32 *buf,
      unsigned int nwords);

extern unsigned int bitmap_to_u32array(u32 *buf,
unsigned int nwords,
const unsigned long *bitmap,
unsigned int nbits);

extern unsigned int bitmap_ord_to_pos(const unsigned long *bitmap, unsigned int ord, unsigned int nbits); extern int bitmap_print_to_pagebuf(bool list, char *buf,

       const unsigned long *maskp, int nmaskbits);

# 204 "./include/linux/bitmap.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_zero(unsigned long *dst, unsigned int nbits) {
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
*dst = 0UL;
else {
unsigned int len = (((nbits) + ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8))) * sizeof(unsigned long);
({ void *__p = (dst); size_t __n = len; if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
}
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_fill(unsigned long *dst, unsigned int nbits) {
unsigned int nlongs = (((nbits) + ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8)));
if (!(__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0)) {
unsigned int len = (nlongs - 1) * sizeof(unsigned long);
({ void *__p = (dst); size_t __n = len; if ((__n) != 0) { if (__builtin_constant_p((0xff)) && (0xff) == 0) __memzero((__p),(__n)); else memset((__p),(0xff),(__n)); } (__p); });
}
dst[nlongs - 1] = (~0UL >> (-(nbits) & (32 - 1)));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_copy(unsigned long *dst, const unsigned long *src,
unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
*dst = *src;
else {
unsigned int len = (((nbits) + ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8))) * sizeof(unsigned long);
memcpy(dst, src, len);
}
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_and(unsigned long *dst, const unsigned long *src1,
const unsigned long *src2, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return (*dst = *src1 & *src2 & (~0UL >> (-(nbits) & (32 - 1)))) != 0;
return __bitmap_and(dst, src1, src2, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_or(unsigned long *dst, const unsigned long *src1,
const unsigned long *src2, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
*dst = *src1 | *src2;
else
__bitmap_or(dst, src1, src2, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_xor(unsigned long *dst, const unsigned long *src1,
const unsigned long *src2, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
*dst = *src1 ^ *src2;
else
__bitmap_xor(dst, src1, src2, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_andnot(unsigned long *dst, const unsigned long *src1,
const unsigned long *src2, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return (*dst = *src1 & ~(*src2) & (~0UL >> (-(nbits) & (32 - 1)))) != 0;
return __bitmap_andnot(dst, src1, src2, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_complement(unsigned long *dst, const unsigned long *src,
unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
*dst = ~(*src);
else
__bitmap_complement(dst, src, nbits);
}
# 285 "./include/linux/bitmap.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_equal(const unsigned long *src1,
const unsigned long *src2, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return !((*src1 ^ *src2) & (~0UL >> (-(nbits) & (32 - 1))));
if (__builtin_constant_p(nbits & (8 - 1)) &&

     (((nbits) & ((typeof(nbits))(8) - 1)) == 0))

return !memcmp(src1, src2, nbits / 8);
return __bitmap_equal(src1, src2, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_intersects(const unsigned long *src1,
const unsigned long *src2, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return ((*src1 & *src2) & (~0UL >> (-(nbits) & (32 - 1)))) != 0;
else
return __bitmap_intersects(src1, src2, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_subset(const unsigned long *src1,
const unsigned long *src2, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return ! ((*src1 & ~(*src2)) & (~0UL >> (-(nbits) & (32 - 1))));
else
return __bitmap_subset(src1, src2, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_empty(const unsigned long *src, unsigned nbits) {
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return ! (*src & (~0UL >> (-(nbits) & (32 - 1))));

return _find_first_bit_le(src,nbits) == nbits;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_full(const unsigned long *src, unsigned int nbits) {
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return ! (~(*src) & (~0UL >> (-(nbits) & (32 - 1))));

return _find_first_zero_bit_le(src,nbits) == nbits;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, unsigned int nbits) {
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
return hweight_long(*src & (~0UL >> (-(nbits) & (32 - 1))));
return __bitmap_weight(src, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void bitmap_set(unsigned long *map, unsigned int start,
unsigned int nbits)
{
if (__builtin_constant_p(nbits) && nbits == 1)
__set_bit(start, map);
else if (__builtin_constant_p(start & (8 - 1)) &&
(((start) & ((typeof(start))(8) - 1)) == 0) &&
__builtin_constant_p(nbits & (8 - 1)) &&
(((nbits) & ((typeof(nbits))(8) - 1)) == 0))
({ void *__p = ((char *)map + start / 8); size_t __n = nbits / 8; if ((__n) != 0) { if (__builtin_constant_p((0xff)) && (0xff) == 0) __memzero((__p),(__n)); else memset((__p),(0xff),(__n)); } (__p); });
else
__bitmap_set(map, start, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void bitmap_clear(unsigned long *map, unsigned int start,
unsigned int nbits)
{
if (__builtin_constant_p(nbits) && nbits == 1)
__clear_bit(start, map);
else if (__builtin_constant_p(start & (8 - 1)) &&
(((start) & ((typeof(start))(8) - 1)) == 0) &&
__builtin_constant_p(nbits & (8 - 1)) &&
(((nbits) & ((typeof(nbits))(8) - 1)) == 0))
({ void *__p = ((char *)map + start / 8); size_t __n = nbits / 8; if ((__n) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((__p),(__n)); else memset((__p),(0),(__n)); } (__p); });
else
__bitmap_clear(map, start, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_shift_right(unsigned long *dst, const unsigned long *src,
unsigned int shift, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
*dst = (*src & (~0UL >> (-(nbits) & (32 - 1)))) >> shift;
else
__bitmap_shift_right(dst, src, shift, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_shift_left(unsigned long *dst, const unsigned long *src,
unsigned int shift, unsigned int nbits)
{
if ((__builtin_constant_p(nbits) && (nbits) <= 32 && (nbits) > 0))
*dst = (*src << shift) & (~0UL >> (-(nbits) & (32 - 1)));
else
__bitmap_shift_left(dst, src, shift, nbits);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int bitmap_parse(const char *buf, unsigned int buflen,
unsigned long *maskp, int nmaskbits)
{
return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
}
# 431 "./include/linux/bitmap.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void bitmap_from_u64(unsigned long *dst, u64 mask) {
dst[0] = mask & (~0UL);

if (sizeof(mask) > sizeof(unsigned long))
dst[1] = mask >> 32;
}
# 13 "./include/linux/cpumask.h" 2

typedef struct cpumask { unsigned long bits[(((4) + ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8)))]; } cpumask_t; # 38 "./include/linux/cpumask.h"
extern unsigned int nr_cpu_ids;
# 89 "./include/linux/cpumask.h"
extern struct cpumask __cpu_possible_mask;
extern struct cpumask __cpu_online_mask;
extern struct cpumask __cpu_present_mask;
extern struct cpumask __cpu_active_mask;
# 119 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int cpumask_check(unsigned int cpu) {

return cpu;
}
# 179 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int cpumask_first(const struct cpumask *srcp) {
return _find_first_bit_le(((srcp)->bits),((unsigned int)4));
}

unsigned int cpumask_next(int n, const struct cpumask *srcp);
# 193 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) {

if (n != -1)
cpumask_check(n);
return _find_next_zero_bit_le(((srcp)->bits),((unsigned int)4),n+1);
}

int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *);
int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
unsigned int cpumask_local_spread(unsigned int i, int node);
# 229 "./include/linux/cpumask.h"
extern int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap);
# 281 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) {
_set_bit(cpumask_check(cpu),((dstp)->bits));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) {
__set_bit(cpumask_check(cpu), ((dstp)->bits));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_clear_cpu(int cpu, struct cpumask *dstp) {
_clear_bit(cpumask_check(cpu),((dstp)->bits));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __cpumask_clear_cpu(int cpu, struct cpumask *dstp) {
__clear_bit(cpumask_check(cpu), ((dstp)->bits));
}
# 314 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_test_cpu(int cpu, const struct cpumask *cpumask) {
return test_bit(cpumask_check(cpu), (((cpumask))->bits));
}
# 328 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) {
return _test_and_set_bit(cpumask_check(cpu),((cpumask)->bits));
}
# 342 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) {
return _test_and_clear_bit(cpumask_check(cpu),((cpumask)->bits));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_setall(struct cpumask *dstp) {
bitmap_fill(((dstp)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_clear(struct cpumask *dstp) {
bitmap_zero(((dstp)->bits), ((unsigned int)4));
}
# 373 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_and(struct cpumask *dstp,
const struct cpumask *src1p,
const struct cpumask *src2p)
{
return bitmap_and(((dstp)->bits), ((src1p)->bits),

           ((src2p)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_or(struct cpumask *dstp, const struct cpumask *src1p,
const struct cpumask *src2p)
{
bitmap_or(((dstp)->bits), ((src1p)->bits),

          ((src2p)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_xor(struct cpumask *dstp,
const struct cpumask *src1p,
const struct cpumask *src2p)
{
bitmap_xor(((dstp)->bits), ((src1p)->bits),

           ((src2p)->bits), ((unsigned int)4));
}

# 416 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_andnot(struct cpumask *dstp,
const struct cpumask *src1p,
const struct cpumask *src2p)
{
return bitmap_andnot(((dstp)->bits), ((src1p)->bits),

       ((src2p)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_complement(struct cpumask *dstp,
const struct cpumask *srcp)
{
bitmap_complement(((dstp)->bits), ((srcp)->bits),

           ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool cpumask_equal(const struct cpumask *src1p,
const struct cpumask *src2p)
{
return bitmap_equal(((src1p)->bits), ((src2p)->bits),

       ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool cpumask_intersects(const struct cpumask *src1p,
const struct cpumask *src2p)
{
return bitmap_intersects(((src1p)->bits), ((src2p)->bits),

            ((unsigned int)4));
}

# 467 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_subset(const struct cpumask *src1p,
const struct cpumask *src2p)
{
return bitmap_subset(((src1p)->bits), ((src2p)->bits),

        ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool cpumask_empty(const struct cpumask *srcp) {
return bitmap_empty(((srcp)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool cpumask_full(const struct cpumask *srcp) {
return bitmap_full(((srcp)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned int cpumask_weight(const struct cpumask *srcp) {
return bitmap_weight(((srcp)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_shift_right(struct cpumask *dstp,
const struct cpumask *srcp, int n)
{
bitmap_shift_right(((dstp)->bits), ((srcp)->bits), n,

            ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_shift_left(struct cpumask *dstp,
const struct cpumask *srcp, int n)
{
bitmap_shift_left(((dstp)->bits), ((srcp)->bits), n,

           ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void cpumask_copy(struct cpumask *dstp,
const struct cpumask *srcp)
{
bitmap_copy(((dstp)->bits), ((srcp)->bits), ((unsigned int)4));
}
# 578 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_parse_user(const char *buf, int len,
struct cpumask *dstp)
{
return bitmap_parse_user(buf, len, ((dstp)->bits), ((unsigned int)4));
}
# 592 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_parselist_user(const char *buf, int len,
struct cpumask *dstp)
{
return bitmap_parselist_user(buf, len, ((dstp)->bits),

         ((unsigned int)4));
}

# 606 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpumask_parse(const char *buf, struct cpumask *dstp) {
char *nl = strchr(buf, '\n');
unsigned int len = nl ? (unsigned int)(nl - buf) : strlen(buf);

return bitmap_parse(buf, len, ((dstp)->bits), ((unsigned int)4));
}
# 621 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int cpulist_parse(const char *buf, struct cpumask *dstp) {
return bitmap_parselist(buf, ((dstp)->bits), ((unsigned int)4));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) size_t cpumask_size(void) {
return (((((unsigned int)4)) + ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8))) * sizeof(long);
}
# 694 "./include/linux/cpumask.h"
typedef struct cpumask cpumask_var_t[1];

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) {
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
int node)
{
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) {
cpumask_clear(*mask);
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
int node)
{
cpumask_clear(*mask);
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void alloc_bootmem_cpumask_var(cpumask_var_t *mask) {
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void free_cpumask_var(cpumask_var_t mask) {
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void free_bootmem_cpumask_var(cpumask_var_t mask) {
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool cpumask_available(cpumask_var_t mask) {
return true;
}

extern const unsigned long cpu_all_bits[(((4) + ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8)))]; # 754 "./include/linux/cpumask.h"
void init_cpu_present(const struct cpumask *src);
void init_cpu_possible(const struct cpumask *src);
void init_cpu_online(const struct cpumask *src);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void reset_cpu_possible_mask(void) {
bitmap_zero(((&__cpu_possible_mask)->bits), 4);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void set_cpu_possible(unsigned int cpu, bool possible)
{
if (possible)
cpumask_set_cpu(cpu, &__cpu_possible_mask);
else
cpumask_clear_cpu(cpu, &__cpu_possible_mask);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void set_cpu_present(unsigned int cpu, bool present)
{
if (present)
cpumask_set_cpu(cpu, &__cpu_present_mask);
else
cpumask_clear_cpu(cpu, &__cpu_present_mask);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void set_cpu_online(unsigned int cpu, bool online)
{
if (online)
cpumask_set_cpu(cpu, &__cpu_online_mask);
else
cpumask_clear_cpu(cpu, &__cpu_online_mask);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void set_cpu_active(unsigned int cpu, bool active)
{
if (active)
cpumask_set_cpu(cpu, &__cpu_active_mask);
else
cpumask_clear_cpu(cpu, &__cpu_active_mask);
}
# 814 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __check_is_bitmap(const unsigned long *bitmap) {
return 1;
}
# 826 "./include/linux/cpumask.h"
extern const unsigned long
cpu_bit_bitmap[32 +1][(((4) + ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8)))];

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) const struct cpumask *get_cpu_mask(unsigned int cpu) {
const unsigned long *p = cpu_bit_bitmap[1 + cpu % 32];
p -= cpu / 32;
return ((struct cpumask *)(1 ? (p) : (void *)sizeof(__check_is_bitmap(p))));
}
# 863 "./include/linux/cpumask.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ssize_t cpumap_print_to_pagebuf(bool list, char *buf, const struct cpumask *mask)
{
return bitmap_print_to_pagebuf(list, buf, ((mask)->bits),

          nr_cpu_ids);
}

# 45 "./include/linux/rcupdate.h" 2

void call_rcu(struct callback_head *head, rcu_callback_t func);

void call_rcu_bh(struct callback_head *head, rcu_callback_t func); void call_rcu_sched(struct callback_head *head, rcu_callback_t func); void synchronize_sched(void);
void rcu_barrier_tasks(void);

void __rcu_read_lock(void);
void __rcu_read_unlock(void);
void rcu_read_unlock_special(struct task_struct *t);
void synchronize_rcu(void);
# 103 "./include/linux/rcupdate.h"
void rcu_init(void);
extern int rcu_scheduler_active __attribute__((__section__(".data..read_mostly"))); void rcu_sched_qs(void);
void rcu_bh_qs(void);
void rcu_check_callbacks(int user);
void rcu_report_dead(unsigned int cpu);
void rcu_cpu_starting(unsigned int cpu);
void rcutree_migrate_callbacks(int cpu);

void rcu_sysrq_start(void);
void rcu_sysrq_end(void);
# 124 "./include/linux/rcupdate.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_user_enter(void) { } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_user_exit(void) { }

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_init_nohz(void) { } # 175 "./include/linux/rcupdate.h"
void call_rcu_tasks(struct callback_head *head, rcu_callback_t func);
void synchronize_rcu_tasks(void);
void exit_tasks_rcu_start(void);
void exit_tasks_rcu_finish(void);
# 207 "./include/linux/rcupdate.h"
# 1 "./include/linux/rcutree.h" 1
# 33 "./include/linux/rcutree.h"
void rcu_note_context_switch(bool preempt);
int rcu_needs_cpu(u64 basem, u64 *nextevt);
void rcu_cpu_stall_reset(void);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_virt_note_context_switch(int cpu) {
rcu_note_context_switch(false);
}

void synchronize_rcu_bh(void);
void synchronize_sched_expedited(void);
void synchronize_rcu_expedited(void);

void kfree_call_rcu(struct callback_head *head, rcu_callback_t func);
# 69 "./include/linux/rcutree.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void synchronize_rcu_bh_expedited(void) {
synchronize_sched_expedited();
}

void rcu_barrier(void);
void rcu_barrier_bh(void);
void rcu_barrier_sched(void);
unsigned long get_state_synchronize_rcu(void); void cond_synchronize_rcu(unsigned long oldstate); unsigned long get_state_synchronize_sched(void); void cond_synchronize_sched(unsigned long oldstate);

void rcu_idle_enter(void);
void rcu_idle_exit(void);
void rcu_irq_enter(void);
void rcu_irq_exit(void);
void rcu_irq_enter_irqson(void);
void rcu_irq_exit_irqson(void);
bool rcu_irq_enter_disabled(void);

void exit_rcu(void);

void rcu_scheduler_starting(void);
extern int rcu_scheduler_active __attribute__((__section__(".data..read_mostly"))); void rcu_end_inkernel_boot(void);
bool rcu_is_watching(void);
void rcu_all_qs(void);

int rcutree_prepare_cpu(unsigned int cpu);
int rcutree_online_cpu(unsigned int cpu);
int rcutree_offline_cpu(unsigned int cpu);
int rcutree_dead_cpu(unsigned int cpu);
int rcutree_dying_cpu(unsigned int cpu);
# 208 "./include/linux/rcupdate.h" 2
# 226 "./include/linux/rcupdate.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void init_rcu_head(struct callback_head *head) { } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void destroy_rcu_head(struct callback_head *head) { } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void init_rcu_head_on_stack(struct callback_head *head) { } static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void destroy_rcu_head_on_stack(struct callback_head *head) { }

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool rcu_lockdep_current_cpu_online(void) { return true; } # 264 "./include/linux/rcupdate.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int rcu_read_lock_held(void)
{
return 1;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int rcu_read_lock_bh_held(void) {
return 1;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int rcu_read_lock_sched_held(void)
{
return !(preempt_count() == 0 && !({ unsigned long _flags; do { ({ unsigned long __dummy; typeof(_flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); _flags = arch_local_save_flags(); } while (0); ({ ({ unsigned long __dummy; typeof(_flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(_flags); }); }));
}
# 625 "./include/linux/rcupdate.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void rcu_read_lock(void)
{
__rcu_read_lock();
(void)0;
do { } while (0);
do { } while (0);

}
# 679 "./include/linux/rcupdate.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_read_unlock(void) {
do { } while (0);

(void)0;
__rcu_read_unlock();
do { } while (0);
}
# 705 "./include/linux/rcupdate.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_read_lock_bh(void) {
local_bh_disable();
(void)0;
do { } while (0);
do { } while (0);

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_read_unlock_bh(void) {
do { } while (0);

do { } while (0);
(void)0;
local_bh_enable();
}
# 741 "./include/linux/rcupdate.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_read_lock_sched(void) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
(void)0;
do { } while (0);
do { } while (0);

}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((no_instrument_function)) void rcu_read_lock_sched_notrace(void) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
(void)0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void rcu_read_unlock_sched(void) {
do { } while (0);

do { } while (0);
(void)0;
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((no_instrument_function)) void rcu_read_unlock_sched_notrace(void) {
(void)0;
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule_notrace(); } while (0);
}
# 12 "./include/linux/rculist.h" 2
# 31 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void INIT_LIST_HEAD_RCU(struct list_head *list)
{
({ union { typeof(list->next) __val; char __c[1]; } __u = { .__val = ( typeof(list->next)) (list) }; __write_once_size(&(list->next), __u.__c, sizeof(list->next)); __u.__val; }); ({ union { typeof(list->prev) __val; char __c[1]; } __u = { .__val = ( typeof(list->prev)) (list) }; __write_once_size(&(list->prev), __u.__c, sizeof(list->prev)); __u.__val; });
}
# 49 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __list_add_rcu(struct list_head *new,
struct list_head *prev, struct list_head *next)
{
if (!__list_add_valid(new, prev, next))
return;

new->next = next;
new->prev = prev;
({ uintptr_t _r_a_p__v = (uintptr_t)(new); if (__builtin_constant_p(new) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof(((*((struct list_head **)(&(prev)->next))))) __val; char __c[1]; } __u = { .__val = ( typeof(((*((struct list_head **)(&(prev)->next)))))) ((typeof((*((struct list_head **)(&(prev)->next)))))(_r_a_p__v)) }; __write_once_size(&(((*((struct list_head **)(&(prev)->next))))), __u.__c, sizeof(((*((struct list_head **)(&(prev)->next)))))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(char) || sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(short) || sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(int) || sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(long))); extern void __compiletime_assert_2(void) ; if (__cond) __compiletime_assert_2(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(*((struct list_head **)(&(prev)->next)))) __val; char __c[1]; } __u = { .__val = ( typeof(*&(*((struct list_head **)(&(prev)->next))))) ((typeof(*((typeof((*((struct list_head **)(&(prev)->next)))))_r_a_p__v)) *)((typeof((*((struct list_head **)(&(prev)->next)))))_r_a_p__v)) }; __write_once_size(&(*&(*((struct list_head **)(&(prev)->next)))), __u.__c, sizeof(*&(*((struct list_head **)(&(prev)->next))))); __u.__val; }); } while (0); _r_a_p__v; }); next->prev = new;
}
# 77 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_add_rcu(struct list_head *new, struct list_head *head)
{
__list_add_rcu(new, head, head->next);
}
# 98 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_add_tail_rcu(struct list_head *new,
struct list_head *head)
{
__list_add_rcu(new, head->prev, head);
}
# 128 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_del_rcu(struct list_head *entry)
{
__list_del_entry(entry);
entry->prev = ((void *) 0x200 + 0);
}
# 154 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_del_init_rcu(struct hlist_node *n)
{
if (!hlist_unhashed(n)) {
__hlist_del(n);
n->pprev = ((void *)0);
}
}
# 170 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_replace_rcu(struct list_head *old,
struct list_head *new)
{
new->next = old->next;
new->prev = old->prev;
({ uintptr_t _r_a_p__v = (uintptr_t)(new); if (__builtin_constant_p(new) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof(((*((struct list_head **)(&(new->prev)->next))))) __val; char __c[1]; } __u = { .__val = ( typeof(((*((struct list_head **)(&(new->prev)->next)))))) ((typeof((*((struct list_head **)(&(new->prev)->next)))))(_r_a_p__v)) }; __write_once_size(&(((*((struct list_head **)(&(new->prev)->next))))), __u.__c, sizeof(((*((struct list_head **)(&(new->prev)->next)))))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&(*((struct list_head **)(&(new->prev)->next)))) == sizeof(char) || sizeof(*&(*((struct list_head **)(&(new->prev)->next)))) == sizeof(short) || sizeof(*&(*((struct list_head **)(&(new->prev)->next)))) == sizeof(int) || sizeof(*&(*((struct list_head **)(&(new->prev)->next)))) == sizeof(long))); extern void __compiletime_assert_3(void) ; if (__cond) __compiletime_assert_3(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(*((struct list_head **)(&(new->prev)->next)))) __val; char __c[1]; } __u = { .__val = ( typeof(*&(*((struct list_head **)(&(new->prev)->next))))) ((typeof(*((typeof((*((struct list_head **)(&(new->prev)->next)))))_r_a_p__v)) *)((typeof((*((struct list_head **)(&(new->prev)->next)))))_r_a_p__v)) }; __write_once_size(&(*&(*((struct list_head **)(&(new->prev)->next)))), __u.__c, sizeof(*&(*((struct list_head **)(&(new->prev)->next))))); __u.__val; }); } while (0); _r_a_p__v; }); new->next->prev = new;
old->prev = ((void *) 0x200 + 0);
}
# 199 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __list_splice_init_rcu(struct list_head *list,
struct list_head *prev,
struct list_head *next,
void (*sync)(void))
{
struct list_head *first = list->next;
struct list_head *last = list->prev;

INIT_LIST_HEAD_RCU(list);
# 222 "./include/linux/rculist.h"
sync();
# 232 "./include/linux/rculist.h"
last->next = next;
({ uintptr_t _r_a_p__v = (uintptr_t)(first); if (__builtin_constant_p(first) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof(((*((struct list_head **)(&(prev)->next))))) __val; char __c[1]; } __u = { .__val = ( typeof(((*((struct list_head **)(&(prev)->next)))))) ((typeof((*((struct list_head **)(&(prev)->next)))))(_r_a_p__v)) }; __write_once_size(&(((*((struct list_head **)(&(prev)->next))))), __u.__c, sizeof(((*((struct list_head **)(&(prev)->next)))))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(char) || sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(short) || sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(int) || sizeof(*&(*((struct list_head **)(&(prev)->next)))) == sizeof(long))); extern void __compiletime_assert_4(void) ; if (__cond) __compiletime_assert_4(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(*((struct list_head **)(&(prev)->next)))) __val; char __c[1]; } __u = { .__val = ( typeof(*&(*((struct list_head **)(&(prev)->next))))) ((typeof(*((typeof((*((struct list_head **)(&(prev)->next)))))_r_a_p__v)) *)((typeof((*((struct list_head **)(&(prev)->next)))))_r_a_p__v)) }; __write_once_size(&(*&(*((struct list_head **)(&(prev)->next)))), __u.__c, sizeof(*&(*((struct list_head **)(&(prev)->next))))); __u.__val; }); } while (0); _r_a_p__v; }); first->prev = prev;
next->prev = last;
}
# 245 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_splice_init_rcu(struct list_head *list,
struct list_head *head,
void (*sync)(void))
{
if (!list_empty(list))
__list_splice_init_rcu(list, head, head->next, sync);
}
# 260 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void list_splice_tail_init_rcu(struct list_head *list,
struct list_head *head,
void (*sync)(void))
{
if (!list_empty(list))
__list_splice_init_rcu(list, head->prev, head, sync);
}
# 425 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_del_rcu(struct hlist_node *n)
{
__hlist_del(n);
n->pprev = ((void *) 0x200 + 0);
}
# 438 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_replace_rcu(struct hlist_node *old,
struct hlist_node *new)
{
struct hlist_node *next = old->next;

new->next = next;
new->pprev = old->pprev;
({ uintptr_t _r_a_p__v = (uintptr_t)(new); if (__builtin_constant_p(new) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof((*(struct hlist_node **)new->pprev)) __val; char __c[1]; } __u = { .__val = ( typeof((*(struct hlist_node **)new->pprev))) ((typeof(*(struct hlist_node **)new->pprev))(_r_a_p__v)) }; __write_once_size(&((*(struct hlist_node **)new->pprev)), __u.__c, sizeof((*(struct hlist_node **)new->pprev))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&*(struct hlist_node **)new->pprev) == sizeof(char) || sizeof(*&*(struct hlist_node **)new->pprev) == sizeof(short) || sizeof(*&*(struct hlist_node **)new->pprev) == sizeof(int) || sizeof(*&*(struct hlist_node **)new->pprev) == sizeof(long))); extern void __compiletime_assert_5(void) ; if (__cond) __compiletime_assert_5(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&*(struct hlist_node **)new->pprev) __val; char __c[1]; } __u = { .__val = ( typeof(*&*(struct hlist_node **)new->pprev)) ((typeof(*((typeof(*(struct hlist_node **)new->pprev))_r_a_p__v)) *)((typeof(*(struct hlist_node **)new->pprev))_r_a_p__v)) }; __write_once_size(&(*&*(struct hlist_node **)new->pprev), __u.__c, sizeof(*&*(struct hlist_node **)new->pprev)); __u.__val; }); } while (0); _r_a_p__v; }); if (next)
new->next->pprev = &new->next;
old->pprev = ((void *) 0x200 + 0);
}
# 477 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_head_rcu(struct hlist_node *n,
struct hlist_head *h)
{
struct hlist_node *first = h->first;

n->next = first;
n->pprev = &h->first;
({ uintptr_t _r_a_p__v = (uintptr_t)(n); if (__builtin_constant_p(n) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof(((*((struct hlist_node **)(&(h)->first))))) __val; char __c[1]; } __u = { .__val = ( typeof(((*((struct hlist_node **)(&(h)->first)))))) ((typeof((*((struct hlist_node **)(&(h)->first)))))(_r_a_p__v)) }; __write_once_size(&(((*((struct hlist_node **)(&(h)->first))))), __u.__c, sizeof(((*((struct hlist_node **)(&(h)->first)))))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&(*((struct hlist_node **)(&(h)->first)))) == sizeof(char) || sizeof(*&(*((struct hlist_node **)(&(h)->first)))) == sizeof(short) || sizeof(*&(*((struct hlist_node **)(&(h)->first)))) == sizeof(int) || sizeof(*&(*((struct hlist_node **)(&(h)->first)))) == sizeof(long))); extern void __compiletime_assert_6(void) ; if (__cond) __compiletime_assert_6(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(*((struct hlist_node **)(&(h)->first)))) __val; char __c[1]; } __u = { .__val = ( typeof(*&(*((struct hlist_node **)(&(h)->first))))) ((typeof(*((typeof((*((struct hlist_node **)(&(h)->first)))))_r_a_p__v)) *)((typeof((*((struct hlist_node **)(&(h)->first)))))_r_a_p__v)) }; __write_once_size(&(*&(*((struct hlist_node **)(&(h)->first)))), __u.__c, sizeof(*&(*((struct hlist_node **)(&(h)->first))))); __u.__val; }); } while (0); _r_a_p__v; }); if (first)
first->pprev = &n->next;
}
# 508 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_tail_rcu(struct hlist_node *n,
struct hlist_head *h)
{
struct hlist_node *i, *last = ((void *)0);

for (i = h->first; i; i = i->next)
last = i;

if (last) {
n->next = last->next;
n->pprev = &last->next;
({ uintptr_t _r_a_p__v = (uintptr_t)(n); if (__builtin_constant_p(n) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof(((*((struct hlist_node **)(&(last)->next))))) __val; char __c[1]; } __u = { .__val = ( typeof(((*((struct hlist_node **)(&(last)->next)))))) ((typeof((*((struct hlist_node **)(&(last)->next)))))(_r_a_p__v)) }; __write_once_size(&(((*((struct hlist_node **)(&(last)->next))))), __u.__c, sizeof(((*((struct hlist_node **)(&(last)->next)))))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&(*((struct hlist_node **)(&(last)->next)))) == sizeof(char) || sizeof(*&(*((struct hlist_node **)(&(last)->next)))) == sizeof(short) || sizeof(*&(*((struct hlist_node **)(&(last)->next)))) == sizeof(int) || sizeof(*&(*((struct hlist_node **)(&(last)->next)))) == sizeof(long))); extern void __compiletime_assert_7(void) ; if (__cond) __compiletime_assert_7(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(*((struct hlist_node **)(&(last)->next)))) __val; char __c[1]; } __u = { .__val = ( typeof(*&(*((struct hlist_node **)(&(last)->next))))) ((typeof(*((typeof((*((struct hlist_node **)(&(last)->next)))))_r_a_p__v)) *)((typeof((*((struct hlist_node **)(&(last)->next)))))_r_a_p__v)) }; __write_once_size(&(*&(*((struct hlist_node **)(&(last)->next)))), __u.__c, sizeof(*&(*((struct hlist_node **)(&(last)->next))))); __u.__val; }); } while (0); _r_a_p__v; });
} else {
hlist_add_head_rcu(n, h);
}
}
# 544 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_before_rcu(struct hlist_node *n,
struct hlist_node *next)
{
n->pprev = next->pprev;
n->next = next;
({ uintptr_t _r_a_p__v = (uintptr_t)(n); if (__builtin_constant_p(n) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof(((*((struct hlist_node **)((n)->pprev))))) __val; char __c[1]; } __u = { .__val = ( typeof(((*((struct hlist_node **)((n)->pprev)))))) ((typeof((*((struct hlist_node **)((n)->pprev)))))(_r_a_p__v)) }; __write_once_size(&(((*((struct hlist_node **)((n)->pprev))))), __u.__c, sizeof(((*((struct hlist_node **)((n)->pprev)))))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&(*((struct hlist_node **)((n)->pprev)))) == sizeof(char) || sizeof(*&(*((struct hlist_node **)((n)->pprev)))) == sizeof(short) || sizeof(*&(*((struct hlist_node **)((n)->pprev)))) == sizeof(int) || sizeof(*&(*((struct hlist_node **)((n)->pprev)))) == sizeof(long))); extern void __compiletime_assert_8(void) ; if (__cond) __compiletime_assert_8(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(*((struct hlist_node **)((n)->pprev)))) __val; char __c[1]; } __u = { .__val = ( typeof(*&(*((struct hlist_node **)((n)->pprev))))) ((typeof(*((typeof((*((struct hlist_node **)((n)->pprev)))))_r_a_p__v)) *)((typeof((*((struct hlist_node **)((n)->pprev)))))_r_a_p__v)) }; __write_once_size(&(*&(*((struct hlist_node **)((n)->pprev)))), __u.__c, sizeof(*&(*((struct hlist_node **)((n)->pprev))))); __u.__val; }); } while (0); _r_a_p__v; }); next->pprev = &n->next;
}
# 571 "./include/linux/rculist.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_add_behind_rcu(struct hlist_node *n,
struct hlist_node *prev)
{
n->next = prev->next;
n->pprev = &prev->next;
({ uintptr_t _r_a_p__v = (uintptr_t)(n); if (__builtin_constant_p(n) && (_r_a_p__v) == (uintptr_t)((void *)0)) ({ union { typeof(((*((struct hlist_node **)(&(prev)->next))))) __val; char __c[1]; } __u = { .__val = ( typeof(((*((struct hlist_node **)(&(prev)->next)))))) ((typeof((*((struct hlist_node **)(&(prev)->next)))))(_r_a_p__v)) }; __write_once_size(&(((*((struct hlist_node **)(&(prev)->next))))), __u.__c, sizeof(((*((struct hlist_node **)(&(prev)->next)))))); __u.__val; }); else do { do { bool __cond = !((sizeof(*&(*((struct hlist_node **)(&(prev)->next)))) == sizeof(char) || sizeof(*&(*((struct hlist_node **)(&(prev)->next)))) == sizeof(short) || sizeof(*&(*((struct hlist_node **)(&(prev)->next)))) == sizeof(int) || sizeof(*&(*((struct hlist_node **)(&(prev)->next)))) == sizeof(long))); extern void __compiletime_assert_9(void) ; if (__cond) __compiletime_assert_9(); do { ((void)sizeof(char[1 - 2 * __cond])); } while (0); } while (0); __asm__ __volatile__ ("dmb " "ish" : : : "memory"); ({ union { typeof(*&(*((struct hlist_node **)(&(prev)->next)))) __val; char __c[1]; } __u = { .__val = ( typeof(*&(*((struct hlist_node **)(&(prev)->next))))) ((typeof(*((typeof((*((struct hlist_node **)(&(prev)->next)))))_r_a_p__v)) *)((typeof((*((struct hlist_node **)(&(prev)->next)))))_r_a_p__v)) }; __write_once_size(&(*&(*((struct hlist_node **)(&(prev)->next)))), __u.__c, sizeof(*&(*((struct hlist_node **)(&(prev)->next))))); __u.__val; }); } while (0); _r_a_p__v; }); if (n->next)
n->next->pprev = &n->next;
}
# 6 "./include/linux/pid.h" 2
# 1 "./include/linux/wait.h" 1

# 1 "./include/linux/spinlock.h" 1
# 82 "./include/linux/spinlock.h"
# 1 "./include/linux/spinlock_types.h" 1
# 13 "./include/linux/spinlock_types.h"
# 1 "./arch/arm/include/asm/spinlock_types.h" 1
# 11 "./arch/arm/include/asm/spinlock_types.h"
typedef struct {
union {
u32 slock;
struct __raw_tickets {

u16 owner;
u16 next;

} tickets;
};
} arch_spinlock_t;

typedef struct {
u32 lock;
} arch_rwlock_t;
# 14 "./include/linux/spinlock_types.h" 2

typedef struct raw_spinlock {
arch_spinlock_t raw_lock;
# 32 "./include/linux/spinlock_types.h"
} raw_spinlock_t;
# 64 "./include/linux/spinlock_types.h"
typedef struct spinlock {
union {
struct raw_spinlock rlock;
# 75 "./include/linux/spinlock_types.h"
};
} spinlock_t;
# 86 "./include/linux/spinlock_types.h"
# 1 "./include/linux/rwlock_types.h" 1
# 11 "./include/linux/rwlock_types.h"
typedef struct {
arch_rwlock_t raw_lock;
# 23 "./include/linux/rwlock_types.h"
} rwlock_t;
# 87 "./include/linux/spinlock_types.h" 2
# 83 "./include/linux/spinlock.h" 2

# 1 "./arch/arm/include/asm/spinlock.h" 1
# 41 "./arch/arm/include/asm/spinlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void dsb_sev(void) {

__asm__ __volatile__ ("dsb " "ishst" : : : "memory");
__asm__("9998: " "sev" "\n" " .pushsection \".alt.smp.init\", \"a\"\n" " .long 9998b\n" " " "nop" "\n" " .popsection\n");
}
# 58 "./arch/arm/include/asm/spinlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_spin_lock(arch_spinlock_t *lock) {
unsigned long tmp;
u32 newval;
arch_spinlock_t lockval;

prefetchw(&lock->slock);
__asm__ __volatile__(
"1: ldrex %0, [%3]\n"
" add %1, %0, %4\n"
" strex %2, %1, [%3]\n"
" teq %2, #0\n"
" bne 1b"
: "=&r" (lockval), "=&r" (newval), "=&r" (tmp)
: "r" (&lock->slock), "I" (1 << 16)
: "cc");

while (lockval.tickets.next != lockval.tickets.owner) {
__asm__ __volatile__ ("wfe" : : : "memory");
lockval.tickets.owner = (*({ __attribute__((unused)) typeof(lock->tickets.owner) __var = ( typeof(lock->tickets.owner)) 0; (volatile typeof(lock->tickets.owner) *)&(lock->tickets.owner); }));
}

__asm__ __volatile__ ("dmb " "ish" : : : "memory");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_spin_trylock(arch_spinlock_t *lock) {
unsigned long contended, res;
u32 slock;

prefetchw(&lock->slock);
do {
__asm__ __volatile__(
" ldrex %0, [%3]\n"
" mov %2, #0\n"
" subs %1, %0, %0, ror #16\n"
" addeq %0, %0, %4\n"
" strexeq %2, %0, [%3]"
: "=&r" (slock), "=&r" (contended), "=&r" (res)
: "r" (&lock->slock), "I" (1 << 16)
: "cc");
} while (res);

if (!contended) {
__asm__ __volatile__ ("dmb " "ish" : : : "memory"); return 1;
} else {
return 0;
}
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_spin_unlock(arch_spinlock_t *lock) {
__asm__ __volatile__ ("dmb " "ish" : : : "memory");
lock->tickets.owner++;
dsb_sev();
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_spin_value_unlocked(arch_spinlock_t lock) {
return lock.tickets.owner == lock.tickets.next;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_spin_is_locked(arch_spinlock_t *lock)
{
return !arch_spin_value_unlocked(({ union { typeof(*lock) __val; char __c[1]; } __u; if (1) __read_once_size(&(*lock), __u.__c, sizeof(*lock)); else __read_once_size_nocheck(&(*lock), __u.__c, sizeof(*lock)); do { } while (0); __u.__val; }));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_spin_is_contended(arch_spinlock_t *lock)
{
struct __raw_tickets tickets = ({ union { typeof(lock->tickets) __val; char __c[1]; } __u; if (1) __read_once_size(&(lock->tickets), __u.__c, sizeof(lock->tickets)); else __read_once_size_nocheck(&(lock->tickets), __u.__c, sizeof(lock->tickets)); do { } while (0); __u.__val; }); return (tickets.next - tickets.owner) > 1;
}
# 141 "./arch/arm/include/asm/spinlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_write_lock(arch_rwlock_t *rw)
{
unsigned long tmp;

prefetchw(&rw->lock);
__asm__ __volatile__(
"1: ldrex %0, [%1]\n"
" teq %0, #0\n"
"9998: " "wfe" "ne" "\n" " .pushsection \".alt.smp.init\", \"a\"\n" " .long 9998b\n" " " "nop" "\n" " .popsection\n"
" strexeq %0, %2, [%1]\n"
" teq %0, #0\n"
" bne 1b"
: "=&r" (tmp)
: "r" (&rw->lock), "r" (0x80000000)
: "cc");

__asm__ __volatile__ ("dmb " "ish" : : : "memory");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_write_trylock(arch_rwlock_t *rw) {
unsigned long contended, res;

prefetchw(&rw->lock);
do {
__asm__ __volatile__(
" ldrex %0, [%2]\n"
" mov %1, #0\n"
" teq %0, #0\n"
" strexeq %1, %3, [%2]"
: "=&r" (contended), "=&r" (res)
: "r" (&rw->lock), "r" (0x80000000)
: "cc");
} while (res);

if (!contended) {
__asm__ __volatile__ ("dmb " "ish" : : : "memory"); return 1;
} else {
return 0;
}
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_write_unlock(arch_rwlock_t *rw) {
__asm__ __volatile__ ("dmb " "ish" : : : "memory");

__asm__ __volatile__(
"str %1, [%0]\n"
:
: "r" (&rw->lock), "r" (0)
: "cc");

dsb_sev();
}
# 212 "./arch/arm/include/asm/spinlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_read_lock(arch_rwlock_t *rw) {
unsigned long tmp, tmp2;

prefetchw(&rw->lock);
__asm__ __volatile__(
"1: ldrex %0, [%2]\n"
" adds %0, %0, #1\n"
" strexpl %1, %0, [%2]\n"
"9998: " "wfe" "mi" "\n" " .pushsection \".alt.smp.init\", \"a\"\n" " .long 9998b\n" " " "nop" "\n" " .popsection\n"
" rsbpls %0, %1, #0\n"
" bmi 1b"
: "=&r" (tmp), "=&r" (tmp2)
: "r" (&rw->lock)
: "cc");

__asm__ __volatile__ ("dmb " "ish" : : : "memory");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void arch_read_unlock(arch_rwlock_t *rw) {
unsigned long tmp, tmp2;

__asm__ __volatile__ ("dmb " "ish" : : : "memory");

prefetchw(&rw->lock);
__asm__ __volatile__(
"1: ldrex %0, [%2]\n"
" sub %0, %0, #1\n"
" strex %1, %0, [%2]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (tmp), "=&r" (tmp2)
: "r" (&rw->lock)
: "cc");

if (tmp == 0)
dsb_sev();
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int arch_read_trylock(arch_rwlock_t *rw) {
unsigned long contended, res;

prefetchw(&rw->lock);
do {
__asm__ __volatile__(
" ldrex %0, [%2]\n"
" mov %1, #0\n"
" adds %0, %0, #1\n"
" strexpl %1, %0, [%2]"
: "=&r" (contended), "=&r" (res)
: "r" (&rw->lock)
: "cc");
} while (res);

if (contended < 0x80000000) {
__asm__ __volatile__ ("dmb " "ish" : : : "memory");
return 1;
} else {
return 0;
}
}
# 89 "./include/linux/spinlock.h" 2
# 163 "./include/linux/spinlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void do_raw_spin_lock(raw_spinlock_t *lock) {
(void)0;
arch_spin_lock(&lock->raw_lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags)
{
(void)0;
arch_spin_lock(&lock->raw_lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int do_raw_spin_trylock(raw_spinlock_t *lock) {
return arch_spin_trylock(&(lock)->raw_lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void do_raw_spin_unlock(raw_spinlock_t *lock) {
arch_spin_unlock(&lock->raw_lock);
(void)0;
}
# 289 "./include/linux/spinlock.h"
# 1 "./include/linux/rwlock.h" 1
# 290 "./include/linux/spinlock.h" 2

# 1 "./include/linux/spinlock_api_smp.h" 1
# 18 "./include/linux/spinlock_api_smp.h"
int in_lock_functions(unsigned long addr);

void __attribute__((section(".spinlock.text"))) _raw_spin_lock(raw_spinlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass)

                        ;
void __attribute__((section(".spinlock.text")))
_raw_spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map)
                        ;
void __attribute__((section(".spinlock.text"))) _raw_spin_lock_bh(raw_spinlock_t *lock) ;
void __attribute__((section(".spinlock.text"))) _raw_spin_lock_irq(raw_spinlock_t *lock)
                        ;

unsigned long __attribute__((section(".spinlock.text"))) _raw_spin_lock_irqsave(raw_spinlock_t *lock)

                        ;
unsigned long __attribute__((section(".spinlock.text")))
_raw_spin_lock_irqsave_nested(raw_spinlock_t *lock, int subclass)
                        ;

int __attribute__((section(".spinlock.text"))) _raw_spin_trylock(raw_spinlock_t *lock); int __attribute__((section(".spinlock.text"))) _raw_spin_trylock_bh(raw_spinlock_t *lock); void __attribute__((section(".spinlock.text"))) _raw_spin_unlock(raw_spinlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_spin_unlock_bh(raw_spinlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_spin_unlock_irq(raw_spinlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags)

                        ;

# 86 "./include/linux/spinlock_api_smp.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __raw_spin_trylock(raw_spinlock_t *lock) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
if (do_raw_spin_trylock(lock)) {
do { } while (0);
return 1;
}
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0); return 0;
}
# 104 "./include/linux/spinlock_api_smp.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __raw_spin_lock_irqsave(raw_spinlock_t *lock) {
unsigned long flags;

do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); } while (0); do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
# 119 "./include/linux/spinlock_api_smp.h"
do_raw_spin_lock_flags(lock, &flags);

return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_spin_lock_irq(raw_spinlock_t *lock) {
do { arch_local_irq_disable(); } while (0);
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do_raw_spin_lock(lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_spin_lock_bh(raw_spinlock_t *lock) {
__local_bh_disable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
do { } while (0);
do_raw_spin_lock(lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_spin_lock(raw_spinlock_t *lock) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do_raw_spin_lock(lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_spin_unlock(raw_spinlock_t *lock) {
do { } while (0);
do_raw_spin_unlock(lock);
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock,
unsigned long flags)
{
do { } while (0);
do_raw_spin_unlock(lock);
do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } while (0); do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_spin_unlock_irq(raw_spinlock_t *lock) {
do { } while (0);
do_raw_spin_unlock(lock);
do { arch_local_irq_enable(); } while (0);
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_spin_unlock_bh(raw_spinlock_t *lock) {
do { } while (0);
do_raw_spin_unlock(lock);
__local_bh_enable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __raw_spin_trylock_bh(raw_spinlock_t *lock) {
__local_bh_disable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
if (do_raw_spin_trylock(lock)) {
do { } while (0);
return 1;
}
__local_bh_enable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
return 0;
}

# 1 "./include/linux/rwlock_api_smp.h" 1
# 18 "./include/linux/rwlock_api_smp.h"
void __attribute__((section(".spinlock.text"))) _raw_read_lock(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_write_lock(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_read_lock_bh(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_write_lock_bh(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_read_lock_irq(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_write_lock_irq(rwlock_t *lock) ; unsigned long __attribute__((section(".spinlock.text"))) _raw_read_lock_irqsave(rwlock_t *lock)

                       ;
unsigned long __attribute__((section(".spinlock.text"))) _raw_write_lock_irqsave(rwlock_t *lock)
                       ;

int __attribute__((section(".spinlock.text"))) _raw_read_trylock(rwlock_t *lock); int __attribute__((section(".spinlock.text"))) _raw_write_trylock(rwlock_t *lock); void __attribute__((section(".spinlock.text"))) _raw_read_unlock(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_write_unlock(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_read_unlock_bh(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_write_unlock_bh(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_read_unlock_irq(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_write_unlock_irq(rwlock_t *lock) ; void __attribute__((section(".spinlock.text"))) _raw_read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)

                       ;
void __attribute__((section(".spinlock.text")))
_raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
                       ;

# 117 "./include/linux/rwlock_api_smp.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __raw_read_trylock(rwlock_t *lock) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
if (arch_read_trylock(&(lock)->raw_lock)) {
do { } while (0);
return 1;
}
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0); return 0;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __raw_write_trylock(rwlock_t *lock) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
if (arch_write_trylock(&(lock)->raw_lock)) {
do { } while (0);
return 1;
}
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0); return 0;
}
# 146 "./include/linux/rwlock_api_smp.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_read_lock(rwlock_t *lock) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do {(void)0; arch_read_lock(&(lock)->raw_lock); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __raw_read_lock_irqsave(rwlock_t *lock) {
unsigned long flags;

do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); } while (0); do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do {(void)0; arch_read_lock(&((lock))->raw_lock); } while (0);

return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_read_lock_irq(rwlock_t *lock) {
do { arch_local_irq_disable(); } while (0);
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do {(void)0; arch_read_lock(&(lock)->raw_lock); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_read_lock_bh(rwlock_t *lock) {
__local_bh_disable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
do { } while (0);
do {(void)0; arch_read_lock(&(lock)->raw_lock); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __raw_write_lock_irqsave(rwlock_t *lock) {
unsigned long flags;

do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); } while (0); do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do {(void)0; arch_write_lock(&((lock))->raw_lock); } while (0);

return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_write_lock_irq(rwlock_t *lock) {
do { arch_local_irq_disable(); } while (0);
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do {(void)0; arch_write_lock(&(lock)->raw_lock); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_write_lock_bh(rwlock_t *lock) {
__local_bh_disable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
do { } while (0);
do {(void)0; arch_write_lock(&(lock)->raw_lock); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_write_lock(rwlock_t *lock) {
do { __preempt_count_add(1); __asm__ __volatile__("": : :"memory"); } while (0);
do { } while (0);
do {(void)0; arch_write_lock(&(lock)->raw_lock); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_write_unlock(rwlock_t *lock) {
do { } while (0);
do {arch_write_unlock(&(lock)->raw_lock); (void)0; } while (0);
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_read_unlock(rwlock_t *lock) {
do { } while (0);
do {arch_read_unlock(&(lock)->raw_lock); (void)0; } while (0);
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
{
do { } while (0);
do {arch_read_unlock(&(lock)->raw_lock); (void)0; } while (0);
do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } while (0); do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_read_unlock_irq(rwlock_t *lock) {
do { } while (0);
do {arch_read_unlock(&(lock)->raw_lock); (void)0; } while (0);
do { arch_local_irq_enable(); } while (0);
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_read_unlock_bh(rwlock_t *lock) {
do { } while (0);
do {arch_read_unlock(&(lock)->raw_lock); (void)0; } while (0);
__local_bh_enable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_write_unlock_irqrestore(rwlock_t *lock,
unsigned long flags)
{
do { } while (0);
do {arch_write_unlock(&(lock)->raw_lock); (void)0; } while (0);
do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } while (0); do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_write_unlock_irq(rwlock_t *lock) {
do { } while (0);
do {arch_write_unlock(&(lock)->raw_lock); (void)0; } while (0);
do { arch_local_irq_enable(); } while (0);
do { __asm__ __volatile__("": : :"memory"); if (__builtin_expect(!!(__preempt_count_dec_and_test()), 0)) preempt_schedule(); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __raw_write_unlock_bh(rwlock_t *lock) {
do { } while (0);
do {arch_write_unlock(&(lock)->raw_lock); (void)0; } while (0);
__local_bh_enable_ip((unsigned long)__builtin_return_address(0), ((2 * (1UL << (0 + 8))) + (1UL << 0)));
}
# 191 "./include/linux/spinlock_api_smp.h" 2
# 296 "./include/linux/spinlock.h" 2

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) raw_spinlock_t *spinlock_check(spinlock_t *lock) {
return &lock->rlock;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void spin_lock(spinlock_t *lock) {
_raw_spin_lock(&lock->rlock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void spin_lock_bh(spinlock_t *lock) {
_raw_spin_lock_bh(&lock->rlock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int spin_trylock(spinlock_t *lock) {
return (_raw_spin_trylock(&lock->rlock));
}
# 340 "./include/linux/spinlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void spin_lock_irq(spinlock_t *lock) {
_raw_spin_lock_irq(&lock->rlock);
}
# 355 "./include/linux/spinlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void spin_unlock(spinlock_t *lock) {
_raw_spin_unlock(&lock->rlock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void spin_unlock_bh(spinlock_t *lock) {
_raw_spin_unlock_bh(&lock->rlock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void spin_unlock_irq(spinlock_t *lock) {
_raw_spin_unlock_irq(&lock->rlock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) {
do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); _raw_spin_unlock_irqrestore(&lock->rlock, flags); } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int spin_trylock_bh(spinlock_t *lock) {
return (_raw_spin_trylock_bh(&lock->rlock));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int spin_trylock_irq(spinlock_t *lock) {
return ({ do { arch_local_irq_disable(); } while (0); (_raw_spin_trylock(&lock->rlock)) ? 1 : ({ do { arch_local_irq_enable(); } while (0); 0; }); });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int spin_is_locked(spinlock_t *lock) {
return arch_spin_is_locked(&(&lock->rlock)->raw_lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int spin_is_contended(spinlock_t *lock) {
return arch_spin_is_contended(&(&lock->rlock)->raw_lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) int spin_can_lock(spinlock_t *lock) {
return (!arch_spin_is_locked(&(&lock->rlock)->raw_lock));
}
# 420 "./include/linux/spinlock.h"
extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);

extern int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock,

     unsigned long *flags);

# 10 "./include/linux/wait.h" 2

# 1 "./arch/arm/include/generated/asm/current.h" 1 # 12 "./include/linux/wait.h" 2
# 1 "./include/uapi/linux/wait.h" 1
# 13 "./include/linux/wait.h" 2

typedef struct wait_queue_entry wait_queue_entry_t;

typedef int (*wait_queue_func_t)(struct wait_queue_entry *wq_entry, unsigned mode, int flags, void *key); int default_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int flags, void *key); # 27 "./include/linux/wait.h"
struct wait_queue_entry {
unsigned int flags;
void *private;
wait_queue_func_t func;
struct list_head entry;
};

struct wait_queue_head {
spinlock_t lock;
struct list_head head;
};
typedef struct wait_queue_head wait_queue_head_t;

struct task_struct;
# 61 "./include/linux/wait.h"
extern void __init_waitqueue_head(struct wait_queue_head *wq_head, const char *name, struct lock_class_key *);
# 79 "./include/linux/wait.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void init_waitqueue_entry(struct wait_queue_entry *wq_entry, struct task_struct *p) {
wq_entry->flags = 0;
wq_entry->private = p;
wq_entry->func = default_wake_function;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void init_waitqueue_func_entry(struct wait_queue_entry *wq_entry, wait_queue_func_t func)
{
wq_entry->flags = 0;
wq_entry->private = ((void *)0);
wq_entry->func = func;
}
# 124 "./include/linux/wait.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int waitqueue_active(struct wait_queue_head *wq_head) {
return !list_empty(&wq_head->head);
}
# 137 "./include/linux/wait.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool wq_has_sleeper(struct wait_queue_head *wq_head) {

__asm__ __volatile__ ("dmb " "ish" : : : "memory"); return waitqueue_active(wq_head);
}

extern void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); extern void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); extern void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) {
list_add(&wq_entry->entry, &wq_head->head);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) {
wq_entry->flags |= 0x01;
__add_wait_queue(wq_head, wq_entry);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __add_wait_queue_entry_tail(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) {
list_add_tail(&wq_entry->entry, &wq_head->head);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __add_wait_queue_entry_tail_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) {
wq_entry->flags |= 0x01;
__add_wait_queue_entry_tail(wq_head, wq_entry);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry) {
list_del(&wq_entry->entry);
}

void __wake_up(struct wait_queue_head *wq_head, unsigned int mode, int nr, void *key);
void __wake_up_locked_key(struct wait_queue_head *wq_head, unsigned int mode, void *key); void __wake_up_locked_key_bookmark(struct wait_queue_head *wq_head,
unsigned int mode, void *key, wait_queue_entry_t *bookmark);
void __wake_up_sync_key(struct wait_queue_head *wq_head, unsigned int mode, int nr, void *key); void __wake_up_locked(struct wait_queue_head *wq_head, unsigned int mode, int nr);
void __wake_up_sync(struct wait_queue_head *wq_head, unsigned int mode, int nr);
# 230 "./include/linux/wait.h"
extern void init_wait_entry(struct wait_queue_entry *wq_entry, int flags);
# 600 "./include/linux/wait.h"
extern int do_wait_intr(wait_queue_head_t *, wait_queue_entry_t *);
extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *);
# 984 "./include/linux/wait.h"
void prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state); void prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state); long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state); void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout);
int woken_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key); int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *key); # 7 "./include/linux/pid.h" 2

enum pid_type
{
PIDTYPE_PID,
PIDTYPE_PGID,
PIDTYPE_SID,
PIDTYPE_MAX,

__PIDTYPE_TGID
};
# 54 "./include/linux/pid.h"
struct upid {

int nr;
struct pid_namespace *ns;
struct hlist_node pid_chain;
};

struct pid
{
atomic_t count;
unsigned int level;

struct hlist_head tasks[PIDTYPE_MAX];

wait_queue_head_t wait_pidfd;
struct callback_head rcu;
struct upid numbers[1];
};

extern struct pid init_struct_pid;

struct pid_link
{
struct hlist_node node;
struct pid *pid;
};

extern const struct file_operations pidfd_fops;

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct pid *get_pid(struct pid *pid) {
if (pid)
atomic_add(1, &pid->count);
return pid;
}

extern void put_pid(struct pid *pid);
extern struct task_struct *pid_task(struct pid *pid, enum pid_type); extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);

extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);

extern void attach_pid(struct task_struct *task, enum pid_type); extern void detach_pid(struct task_struct *task, enum pid_type); extern void change_pid(struct task_struct *task, enum pid_type,
struct pid *pid);
extern void transfer_pid(struct task_struct *old, struct task_struct *new,

    enum pid_type);

struct pid_namespace;
extern struct pid_namespace init_pid_ns;
# 118 "./include/linux/pid.h"
extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); extern struct pid *find_vpid(int nr);

extern struct pid *find_get_pid(int nr);
extern struct pid *find_ge_pid(int nr, struct pid_namespace *); int next_pidmap(struct pid_namespace *pid_ns, unsigned int last);

extern struct pid *alloc_pid(struct pid_namespace *ns);
extern void free_pid(struct pid *pid);
extern void disable_pid_allocation(struct pid_namespace *ns);
# 142 "./include/linux/pid.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct pid_namespace *ns_of_pid(struct pid *pid) {
struct pid_namespace *ns = ((void *)0);
if (pid)
ns = pid->numbers[pid->level].ns;
return ns;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool is_child_reaper(struct pid *pid) {
return pid->numbers[pid->level].nr == 1;
}
# 172 "./include/linux/pid.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) pid_t pid_nr(struct pid *pid) {
pid_t nr = 0;
if (pid)
nr = pid->numbers[0].nr;
return nr;
}

pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns); pid_t pid_vnr(struct pid *pid);
# 15 "./include/linux/sched.h" 2
# 1 "./include/linux/sem.h" 1

# 1 "./include/linux/time64.h" 1

# 1 "./include/uapi/linux/time.h" 1
# 10 "./include/uapi/linux/time.h"
struct timespec {
__kernel_time_t tv_sec;
long tv_nsec;
};

struct timeval {
__kernel_time_t tv_sec;
__kernel_suseconds_t tv_usec;
};

struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
# 35 "./include/uapi/linux/time.h"
struct itimerspec {
struct timespec it_interval;
struct timespec it_value;
};

struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};
# 6 "./include/linux/time64.h" 2
# 1 "./include/linux/math64.h" 1

# 1 "./arch/arm/include/asm/div64.h" 1
# 7 "./include/linux/math64.h" 2
# 65 "./include/linux/math64.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) {
*remainder = ({ unsigned int __r, __b = (divisor); if (!__builtin_constant_p(__b) || __b == 0 || (7 < 4 && (__b & (__b - 1)) != 0)) { __r = ({ register unsigned int __base asm("r4") = __b; register unsigned long long __n asm("r0") = dividend; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm( ".ifnc " "%0" "," "r1" "; " ".ifnc " "%0" "r1" ",fpr11; " ".ifnc " "%0" "r1" ",r11fp; " ".ifnc " "%0" "r1" ",ipr12; " ".ifnc " "%0" "r1" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%1" "," "r2" "; " ".ifnc " "%1" "r2" ",fpr11; " ".ifnc " "%1" "r2" ",r11fp; " ".ifnc " "%1" "r2" ",ipr12; " ".ifnc " "%1" "r2" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%2" "," "r0" "; " ".ifnc " "%2" "r0" ",fpr11; " ".ifnc " "%2" "r0" ",r11fp; " ".ifnc " "%2" "r0" ",ipr12; " ".ifnc " "%2" "r0" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%3" "," "r4" "; " ".ifnc " "%3" "r4" ",fpr11; " ".ifnc " "%3" "r4" ",r11fp; " ".ifnc " "%3" "r4" ",ipr12; " ".ifnc " "%3" "r4" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); dividend = __res; __rem; }); } else if ((__b & (__b - 1)) == 0) { __r = dividend; __r &= (__b - 1); dividend /= __b; } else { unsigned long long __res, __x, __t, __m, __n = dividend; unsigned int __c, __p, __z = 0; __r = __n; __p = 1 << ({ unsigned int __left = (__b), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m = (~0ULL / __b) * __p; __m += (((~0ULL % __b + 1) * __p) + __b - 1) / __b; __x = ~0ULL / __b * __b - 1; __res = (__m & 0xffffffff) * (__x & 0xffffffff); __res >>= 32; __res += (__m & 0xffffffff) * (__x >> 32); __t = __res; __res += (__x & 0xffffffff) * (__m >> 32); __t = (__res < __t) ? (1ULL << 32) : 0; __res = (__res >> 32) + __t; __res += (__m >> 32) * (__x >> 32); __res /= __p; if (~0ULL % (__b / (__b & -__b)) == 0) { __n /= (__b & -__b); __m = ~0ULL / (__b / (__b & -__b)); __p = 1; __c = 1; } else if (__res != __x / __b) { __c = 1; __m = (~0ULL / __b) * __p; __m += ((~0ULL % __b + 1) * __p) / __b; } else { unsigned int __bits = -(__m & -__m); __bits |= __m >> 32; __bits = (~__bits) << 1; if (!__bits) { __p /= (__m & -__m); __m /= (__m & -__m); } else { __p >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); } __c = 0; } if (!__c) { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "=&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { __res = __m; asm ( "umlal %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "cmn %Q0, %Q1\n\t" "adcs %R0, %R0, %R1\n\t" "adc %Q0, %3, #0" : "=&r" (__res) : "r" (__m), "r" (__n), "r" (__z) : "cc" ); } if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { asm ( "umlal %R0, %Q0, %R1, %Q2\n\t" "umlal %R0, %Q0, %Q1, %R2\n\t" "mov %R0, #0\n\t" "umlal %Q0, %R0, %R1, %R2" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umlal %R0, %Q0, %R2, %Q3\n\t" "umlal %R0, %1, %Q2, %R3\n\t" "mov %R0, #0\n\t" "adds %Q0, %1, %Q0\n\t" "adc %R0, %R0, #0\n\t" "umlal %Q0, %R0, %R2, %R3" : "+&r" (__res), "+&r" (__z) : "r" (__m), "r" (__n) : "cc" ); } __res /= __p; { unsigned int __res0 = __res; unsigned int __b0 = __b; __r -= __res0 * __b0; } dividend = __res; } __r; });
return dividend;
}

extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder);

extern u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder);

extern u64 div64_u64(u64 dividend, u64 divisor);

extern s64 div64_s64(s64 dividend, s64 divisor);
# 98 "./include/linux/math64.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 div_u64(u64 dividend, u32 divisor) {
u32 remainder;
return div_u64_rem(dividend, divisor, &remainder);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 div_s64(s64 dividend, s32 divisor) {
s32 remainder;
return div_s64_rem(dividend, divisor, &remainder);
}

u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) u32 __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
{
u32 ret = 0;

while (dividend >= divisor) {

  asm("" : "+rm"(dividend));

dividend -= divisor;
ret++;
}

*remainder = dividend;

return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 mul_u32_u32(u32 a, u32 b)
{
return (u64)a * b;
}
# 166 "./include/linux/math64.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift) {
u32 ah, al;
u64 ret;

al = a;
ah = a >> 32;

ret = mul_u32_u32(al, mul) >> shift;
if (ah)
ret += mul_u32_u32(ah, mul) << (32 - shift);

return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 mul_u64_u64_shr(u64 a, u64 b, unsigned int shift) {
union {
u64 ll;
struct {

u32 low, high;

} l;
} rl, rm, rn, rh, a0, b0;
u64 c;

a0.ll = a;
b0.ll = b;

rl.ll = mul_u32_u32(a0.l.low, b0.l.low);
rm.ll = mul_u32_u32(a0.l.low, b0.l.high);
rn.ll = mul_u32_u32(a0.l.high, b0.l.low);
rh.ll = mul_u32_u32(a0.l.high, b0.l.high);

rl.l.high = c = (u64)rl.l.high + rm.l.low + rn.l.low; rh.l.low = c = (c >> 32) + rm.l.high + rn.l.high + rh.l.low; rh.l.high = (c >> 32) + rh.l.high;

if (shift == 0)
return rl.ll;
if (shift < 64)
return (rl.ll >> shift) | (rh.ll << (64 - shift));
return rh.ll >> (shift & 63);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 mul_u64_u32_div(u64 a, u32 mul, u32 divisor) {
union {
u64 ll;
struct {

u32 low, high;

} l;
} u, rl, rh;

u.ll = a;
rl.ll = mul_u32_u32(u.l.low, mul);
rh.ll = mul_u32_u32(u.l.high, mul) + rl.l.high;

rl.l.high = ({ unsigned int __r, __b = (divisor); if (!__builtin_constant_p(__b) || __b == 0 || (7 < 4 && (__b & (__b - 1)) != 0)) { __r = ({ register unsigned int __base asm("r4") = __b; register unsigned long long __n asm("r0") = rh.ll; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm( ".ifnc " "%0" "," "r1" "; " ".ifnc " "%0" "r1" ",fpr11; " ".ifnc " "%0" "r1" ",r11fp; " ".ifnc " "%0" "r1" ",ipr12; " ".ifnc " "%0" "r1" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%1" "," "r2" "; " ".ifnc " "%1" "r2" ",fpr11; " ".ifnc " "%1" "r2" ",r11fp; " ".ifnc " "%1" "r2" ",ipr12; " ".ifnc " "%1" "r2" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%2" "," "r0" "; " ".ifnc " "%2" "r0" ",fpr11; " ".ifnc " "%2" "r0" ",r11fp; " ".ifnc " "%2" "r0" ",ipr12; " ".ifnc " "%2" "r0" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%3" "," "r4" "; " ".ifnc " "%3" "r4" ",fpr11; " ".ifnc " "%3" "r4" ",r11fp; " ".ifnc " "%3" "r4" ",ipr12; " ".ifnc " "%3" "r4" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); rh.ll = __res; __rem; }); } else if ((__b & (__b - 1)) == 0) { __r = rh.ll; __r &= (__b - 1); rh.ll /= __b; } else { unsigned long long __res, __x, __t, __m, __n = rh.ll; unsigned int __c, __p, __z = 0; __r = __n; __p = 1 << ({ unsigned int __left = (__b), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m = (~0ULL / __b) * __p; __m += (((~0ULL % __b + 1) * __p) + __b - 1) / __b; __x = ~0ULL / __b * __b - 1; __res = (__m & 0xffffffff) * (__x & 0xffffffff); __res >>= 32; __res += (__m & 0xffffffff) * (__x >> 32); __t = __res; __res += (__x & 0xffffffff) * (__m >> 32); __t = (__res < __t) ? (1ULL << 32) : 0; __res = (__res >> 32) + __t; __res += (__m >> 32) * (__x >> 32); __res /= __p; if (~0ULL % (__b / (__b & -__b)) == 0) { __n /= (__b & -__b); __m = ~0ULL / (__b / (__b & -__b)); __p = 1; __c = 1; } else if (__res != __x / __b) { __c = 1; __m = (~0ULL / __b) * __p; __m += ((~0ULL % __b + 1) * __p) / __b; } else { unsigned int __bits = -(__m & -__m); __bits |= __m >> 32; __bits = (~__bits) << 1; if (!__bits) { __p /= (__m & -__m); __m /= (__m & -__m); } else { __p >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); } __c = 0; } if (!__c) { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "=&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { __res = __m; asm ( "umlal %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "cmn %Q0, %Q1\n\t" "adcs %R0, %R0, %R1\n\t" "adc %Q0, %3, #0" : "=&r" (__res) : "r" (__m), "r" (__n), "r" (__z) : "cc" ); } if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { asm ( "umlal %R0, %Q0, %R1, %Q2\n\t" "umlal %R0, %Q0, %Q1, %R2\n\t" "mov %R0, #0\n\t" "umlal %Q0, %R0, %R1, %R2" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umlal %R0, %Q0, %R2, %Q3\n\t" "umlal %R0, %1, %Q2, %R3\n\t" "mov %R0, #0\n\t" "adds %Q0, %1, %Q0\n\t" "adc %R0, %R0, #0\n\t" "umlal %Q0, %R0, %R2, %R3" : "+&r" (__res), "+&r" (__z) : "r" (__m), "r" (__n) : "cc" ); } __res /= __p; { unsigned int __res0 = __res; unsigned int __b0 = __b; __r -= __res0 * __b0; } rh.ll = __res; } __r; });

({ unsigned int __r, __b = (divisor); if (!__builtin_constant_p(__b) || __b == 0 || (7 < 4 && (__b & (__b - 1)) != 0)) { __r = ({ register unsigned int __base asm("r4") = __b; register unsigned long long __n asm("r0") = rl.ll; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm( ".ifnc " "%0" "," "r1" "; " ".ifnc " "%0" "r1" ",fpr11; " ".ifnc " "%0" "r1" ",r11fp; " ".ifnc " "%0" "r1" ",ipr12; " ".ifnc " "%0" "r1" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%1" "," "r2" "; " ".ifnc " "%1" "r2" ",fpr11; " ".ifnc " "%1" "r2" ",r11fp; " ".ifnc " "%1" "r2" ",ipr12; " ".ifnc " "%1" "r2" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%2" "," "r0" "; " ".ifnc " "%2" "r0" ",fpr11; " ".ifnc " "%2" "r0" ",r11fp; " ".ifnc " "%2" "r0" ",ipr12; " ".ifnc " "%2" "r0" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%3" "," "r4" "; " ".ifnc " "%3" "r4" ",fpr11; " ".ifnc " "%3" "r4" ",r11fp; " ".ifnc " "%3" "r4" ",ipr12; " ".ifnc " "%3" "r4" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); rl.ll = __res; __rem; }); } else if ((__b & (__b - 1)) == 0) { __r = rl.ll; __r &= (__b - 1); rl.ll /= __b; } else { unsigned long long __res, __x, __t, __m, __n = rl.ll; unsigned int __c, __p, __z = 0; __r = __n; __p = 1 << ({ unsigned int __left = (__b), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m = (~0ULL / __b) * __p; __m += (((~0ULL % __b + 1) * __p) + __b - 1) / __b; __x = ~0ULL / __b * __b - 1; __res = (__m & 0xffffffff) * (__x & 0xffffffff); __res >>= 32; __res += (__m & 0xffffffff) * (__x >> 32); __t = __res; __res += (__x & 0xffffffff) * (__m >> 32); __t = (__res < __t) ? (1ULL << 32) : 0; __res = (__res >> 32) + __t; __res += (__m >> 32) * (__x >> 32); __res /= __p; if (~0ULL % (__b / (__b & -__b)) == 0) { __n /= (__b & -__b); __m = ~0ULL / (__b / (__b & -__b)); __p = 1; __c = 1; } else if (__res != __x / __b) { __c = 1; __m = (~0ULL / __b) * __p; __m += ((~0ULL % __b + 1) * __p) / __b; } else { unsigned int __bits = -(__m & -__m); __bits |= __m >> 32; __bits = (~__bits) << 1; if (!__bits) { __p /= (__m & -__m); __m /= (__m & -__m); } else { __p >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); } __c = 0; } if (!__c) { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "=&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { __res = __m; asm ( "umlal %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "cmn %Q0, %Q1\n\t" "adcs %R0, %R0, %R1\n\t" "adc %Q0, %3, #0" : "=&r" (__res) : "r" (__m), "r" (__n), "r" (__z) : "cc" ); } if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { asm ( "umlal %R0, %Q0, %R1, %Q2\n\t" "umlal %R0, %Q0, %Q1, %R2\n\t" "mov %R0, #0\n\t" "umlal %Q0, %R0, %R1, %R2" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umlal %R0, %Q0, %R2, %Q3\n\t" "umlal %R0, %1, %Q2, %R3\n\t" "mov %R0, #0\n\t" "adds %Q0, %1, %Q0\n\t" "adc %R0, %R0, #0\n\t" "umlal %Q0, %R0, %R2, %R3" : "+&r" (__res), "+&r" (__z) : "r" (__m), "r" (__n) : "cc" ); } __res /= __p; { unsigned int __res0 = __res; unsigned int __b0 = __b; __r -= __res0 * __b0; } rl.ll = __res; } __r; });

rl.l.high = rh.l.low;
return rl.ll;
}
# 7 "./include/linux/time64.h" 2

typedef __s64 time64_t;
typedef __u64 timeu64_t;
# 19 "./include/linux/time64.h"
struct timespec64 {
time64_t tv_sec;
long tv_nsec;
};

struct itimerspec64 {
struct timespec64 it_interval;
struct timespec64 it_value;
};
# 80 "./include/linux/time64.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec timespec64_to_timespec(const struct timespec64 ts64) {
struct timespec ret;

ret.tv_sec = (time_t)ts64.tv_sec;
ret.tv_nsec = ts64.tv_nsec;
return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec64 timespec_to_timespec64(const struct timespec ts) {
struct timespec64 ret;

ret.tv_sec = ts.tv_sec;
ret.tv_nsec = ts.tv_nsec;
return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct itimerspec itimerspec64_to_itimerspec(struct itimerspec64 *its64) {
struct itimerspec ret;

ret.it_interval = timespec64_to_timespec(its64->it_interval); ret.it_value = timespec64_to_timespec(its64->it_value); return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct itimerspec64 itimerspec_to_itimerspec64(struct itimerspec *its) {
struct itimerspec64 ret;

ret.it_interval = timespec_to_timespec64(its->it_interval); ret.it_value = timespec_to_timespec64(its->it_value); return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int timespec64_equal(const struct timespec64 *a,
const struct timespec64 *b)
{
return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int timespec64_compare(const struct timespec64 *lhs, const struct timespec64 *rhs) {
if (lhs->tv_sec < rhs->tv_sec)
return -1;
if (lhs->tv_sec > rhs->tv_sec)
return 1;
return lhs->tv_nsec - rhs->tv_nsec;
}

extern void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec64 timespec64_add(struct timespec64 lhs,
struct timespec64 rhs)
{
struct timespec64 ts_delta;
set_normalized_timespec64(&ts_delta, lhs.tv_sec + rhs.tv_sec,

    lhs.tv_nsec + rhs.tv_nsec);

return ts_delta;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec64 timespec64_sub(struct timespec64 lhs,
struct timespec64 rhs)
{
struct timespec64 ts_delta;
set_normalized_timespec64(&ts_delta, lhs.tv_sec - rhs.tv_sec,

    lhs.tv_nsec - rhs.tv_nsec);

return ts_delta;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool timespec64_valid(const struct timespec64 *ts) {

if (ts->tv_sec < 0)
return false;

if ((unsigned long)ts->tv_nsec >= 1000000000L)
return false;
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool timespec64_valid_strict(const struct timespec64 *ts) {
if (!timespec64_valid(ts))
return false;

if ((unsigned long long)ts->tv_sec >= (((s64)~((u64)1 << 63)) / 1000000000L))
return false;
return true;
}
# 190 "./include/linux/time64.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 timespec64_to_ns(const struct timespec64 *ts) {
return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
}

extern struct timespec64 ns_to_timespec64(const s64 nsec);
# 211 "./include/linux/time64.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void timespec64_add_ns(struct timespec64 *a, u64 ns) {
a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, 1000000000L, &ns);
a->tv_nsec = ns;
}

extern struct timespec64 timespec64_add_safe(const struct timespec64 lhs,

      const struct timespec64 rhs);

# 9 "./include/linux/sem.h" 2
# 1 "./include/uapi/linux/sem.h" 1

# 1 "./include/linux/ipc.h" 1

# 1 "./include/linux/uidgid.h" 1
# 16 "./include/linux/uidgid.h"
# 1 "./include/linux/highuid.h" 1
# 35 "./include/linux/highuid.h"
extern int overflowuid;
extern int overflowgid;

extern void __bad_uid(void);
extern void __bad_gid(void);
# 82 "./include/linux/highuid.h"
extern int fs_overflowuid;
extern int fs_overflowgid;
# 17 "./include/linux/uidgid.h" 2

struct user_namespace;
extern struct user_namespace init_user_ns;

typedef struct {
uid_t val;
} kuid_t;

typedef struct {
gid_t val;
} kgid_t;

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) uid_t __kuid_val(kuid_t uid) {
return uid.val;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) gid_t __kgid_val(kgid_t gid) {
return gid.val;
}
# 61 "./include/linux/uidgid.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool uid_eq(kuid_t left, kuid_t right) {
return __kuid_val(left) == __kuid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool gid_eq(kgid_t left, kgid_t right) {
return __kgid_val(left) == __kgid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool uid_gt(kuid_t left, kuid_t right) {
return __kuid_val(left) > __kuid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool gid_gt(kgid_t left, kgid_t right) {
return __kgid_val(left) > __kgid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool uid_gte(kuid_t left, kuid_t right) {
return __kuid_val(left) >= __kuid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool gid_gte(kgid_t left, kgid_t right) {
return __kgid_val(left) >= __kgid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool uid_lt(kuid_t left, kuid_t right) {
return __kuid_val(left) < __kuid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool gid_lt(kgid_t left, kgid_t right) {
return __kgid_val(left) < __kgid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool uid_lte(kuid_t left, kuid_t right) {
return __kuid_val(left) <= __kuid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool gid_lte(kgid_t left, kgid_t right) {
return __kgid_val(left) <= __kgid_val(right);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool uid_valid(kuid_t uid) {
return __kuid_val(uid) != (uid_t) -1;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool gid_valid(kgid_t gid)
{
return __kgid_val(gid) != (gid_t) -1;
}
# 143 "./include/linux/uidgid.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) kuid_t make_kuid(struct user_namespace *from, uid_t uid) {
return (kuid_t){ uid };
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) kgid_t make_kgid(struct user_namespace *from, gid_t gid) {
return (kgid_t){ gid };
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) uid_t from_kuid(struct user_namespace *to, kuid_t kuid) {
return __kuid_val(kuid);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) gid_t from_kgid(struct user_namespace *to, kgid_t kgid) {
return __kgid_val(kgid);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) uid_t from_kuid_munged(struct user_namespace *to, kuid_t kuid) {
uid_t uid = from_kuid(to, kuid);
if (uid == (uid_t)-1)
uid = overflowuid;
return uid;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) gid_t from_kgid_munged(struct user_namespace *to, kgid_t kgid) {
gid_t gid = from_kgid(to, kgid);
if (gid == (gid_t)-1)
gid = overflowgid;
return gid;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) {
return uid_valid(uid);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) {
return gid_valid(gid);
}
# 7 "./include/linux/ipc.h" 2
# 1 "./include/linux/rhashtable.h" 1
# 22 "./include/linux/rhashtable.h"
# 1 "./include/linux/err.h" 1

# 1 "./arch/arm/include/generated/uapi/asm/errno.h" 1 # 1 "./include/uapi/asm-generic/errno.h" 1

# 1 "./include/uapi/asm-generic/errno-base.h" 1
# 6 "./include/uapi/asm-generic/errno.h" 2
# 2 "./arch/arm/include/generated/uapi/asm/errno.h" 2
# 9 "./include/linux/err.h" 2
# 24 "./include/linux/err.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void * __attribute__((warn_unused_result)) ERR_PTR(long error) {
return (void *) error;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) long __attribute__((warn_unused_result)) PTR_ERR( const void *ptr) {
return (long) ptr;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool __attribute__((warn_unused_result)) IS_ERR( const void *ptr) {
return __builtin_expect(!!((unsigned long)(void *)((unsigned long)ptr) >= (unsigned long)-4095), 0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool __attribute__((warn_unused_result)) IS_ERR_OR_NULL( const void *ptr) {
return __builtin_expect(!!(!ptr), 0) || __builtin_expect(!!((unsigned long)(void *)((unsigned long)ptr) >= (unsigned long)-4095), 0);
}
# 51 "./include/linux/err.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void * __attribute__((warn_unused_result)) ERR_CAST( const void *ptr) {

return (void *) ptr;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __attribute__((warn_unused_result)) PTR_ERR_OR_ZERO( const void *ptr) {
if (IS_ERR(ptr))
return PTR_ERR(ptr);
else
return 0;
}
# 23 "./include/linux/rhashtable.h" 2
# 1 "./include/linux/errno.h" 1

# 1 "./include/uapi/linux/errno.h" 1
# 1 "./arch/arm/include/generated/uapi/asm/errno.h" 1 # 2 "./include/uapi/linux/errno.h" 2
# 6 "./include/linux/errno.h" 2
# 24 "./include/linux/rhashtable.h" 2
# 1 "./include/linux/jhash.h" 1
# 27 "./include/linux/jhash.h"
# 1 "./include/linux/unaligned/packed_struct.h" 1

struct __una_u16 { u16 x; } __attribute__((packed)); struct __una_u32 { u32 x; } __attribute__((packed)); struct __una_u64 { u64 x; } __attribute__((packed));

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u16 __get_unaligned_cpu16(const void *p) {
const struct __una_u16 *ptr = (const struct __una_u16 *)p;
return ptr->x;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 __get_unaligned_cpu32(const void *p) {
const struct __una_u32 *ptr = (const struct __una_u32 *)p;
return ptr->x;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 __get_unaligned_cpu64(const void *p) {
const struct __una_u64 *ptr = (const struct __una_u64 *)p;
return ptr->x;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __put_unaligned_cpu16(u16 val, void *p) {
struct __una_u16 *ptr = (struct __una_u16 *)p;
ptr->x = val;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __put_unaligned_cpu32(u32 val, void *p) {
struct __una_u32 *ptr = (struct __una_u32 *)p;
ptr->x = val;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __put_unaligned_cpu64(u64 val, void *p) {
struct __una_u64 *ptr = (struct __una_u64 *)p;
ptr->x = val;
}
# 28 "./include/linux/jhash.h" 2
# 70 "./include/linux/jhash.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 jhash(const void *key, u32 length, u32 initval) {
u32 a, b, c;
const u8 *k = key;

a = b = c = 0xdeadbeef + length + initval;

while (length > 12) {
a += __get_unaligned_cpu32(k);
b += __get_unaligned_cpu32(k + 4);
c += __get_unaligned_cpu32(k + 8);
{ a -= c; a ^= rol32(c, 4); c += b; b -= a; b ^= rol32(a, 6); a += c; c -= b; c ^= rol32(b, 8); b += a; a -= c; a ^= rol32(c, 16); c += b; b -= a; b ^= rol32(a, 19); a += c; c -= b; c ^= rol32(b, 4); b += a; }; length -= 12;
k += 12;
}

switch (length) {
case 12: c += (u32)k[11]<<24;
case 11: c += (u32)k[10]<<16;
case 10: c += (u32)k[9]<<8;
case 9: c += k[8];
case 8: b += (u32)k[7]<<24;
case 7: b += (u32)k[6]<<16;
case 6: b += (u32)k[5]<<8;
case 5: b += k[4];
case 4: a += (u32)k[3]<<24;
case 3: a += (u32)k[2]<<16;
case 2: a += (u32)k[1]<<8;
case 1: a += k[0];
{ c ^= b; c -= rol32(b, 14); a ^= c; a -= rol32(c, 11); b ^= a; b -= rol32(a, 25); c ^= b; c -= rol32(b, 16); a ^= c; a -= rol32(c, 4); b ^= a; b -= rol32(a, 14); c ^= b; c -= rol32(b, 24); };
case 0:
break;
}

return c;
}
# 116 "./include/linux/jhash.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 jhash2(const u32 *k, u32 length, u32 initval) {
u32 a, b, c;

a = b = c = 0xdeadbeef + (length<<2) + initval;

while (length > 3) {
a += k[0];
b += k[1];
c += k[2];
{ a -= c; a ^= rol32(c, 4); c += b; b -= a; b ^= rol32(a, 6); a += c; c -= b; c ^= rol32(b, 8); b += a; a -= c; a ^= rol32(c, 16); c += b; b -= a; b ^= rol32(a, 19); a += c; c -= b; c ^= rol32(b, 4); b += a; }; length -= 3;
k += 3;
}

switch (length) {
case 3: c += k[2];
case 2: b += k[1];
case 1: a += k[0];
{ c ^= b; c -= rol32(b, 14); a ^= c; a -= rol32(c, 11); b ^= a; b -= rol32(a, 25); c ^= b; c -= rol32(b, 16); a ^= c; a -= rol32(c, 4); b ^= a; b -= rol32(a, 14); c ^= b; c -= rol32(b, 24); };
case 0:
break;
}

return c;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 __jhash_nwords(u32 a, u32 b, u32 c, u32 initval) {
a += initval;
b += initval;
c += initval;

{ c ^= b; c -= rol32(b, 14); a ^= c; a -= rol32(c, 11); b ^= a; b -= rol32(a, 25); c ^= b; c -= rol32(b, 16); a ^= c; a -= rol32(c, 4); b ^= a; b -= rol32(a, 14); c ^= b; c -= rol32(b, 24); };

return c;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval) {
return __jhash_nwords(a, b, c, initval + 0xdeadbeef + (3 << 2));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 jhash_2words(u32 a, u32 b, u32 initval) {
return __jhash_nwords(a, b, 0, initval + 0xdeadbeef + (2 << 2));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u32 jhash_1word(u32 a, u32 initval) {
return __jhash_nwords(a, 0, 0, initval + 0xdeadbeef + (1 << 2));
}
# 25 "./include/linux/rhashtable.h" 2
# 1 "./include/linux/list_nulls.h" 1
# 21 "./include/linux/list_nulls.h"
struct hlist_nulls_head {
struct hlist_nulls_node *first;
};

struct hlist_nulls_node {
struct hlist_nulls_node *next, **pprev;
};
# 43 "./include/linux/list_nulls.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int is_a_nulls(const struct hlist_nulls_node *ptr) {
return ((unsigned long)ptr & 1);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long get_nulls_value(const struct hlist_nulls_node *ptr) {
return ((unsigned long)ptr) >> 1;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int hlist_nulls_unhashed(const struct hlist_nulls_node *h) {
return !h->pprev;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int hlist_nulls_empty(const struct hlist_nulls_head *h)
{
return is_a_nulls(({ union { typeof(h->first) __val; char __c[1]; } __u; if (1) __read_once_size(&(h->first), __u.__c, sizeof(h->first)); else __read_once_size_nocheck(&(h->first), __u.__c, sizeof(h->first)); do { } while (0); __u.__val; }));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_nulls_add_head(struct hlist_nulls_node *n,
struct hlist_nulls_head *h)
{
struct hlist_nulls_node *first = h->first;

n->next = first;
({ union { typeof(n->pprev) __val; char __c[1]; } __u = { .__val = ( typeof(n->pprev)) (&h->first) }; __write_once_size(&(n->pprev), __u.__c, sizeof(n->pprev)); __u.__val; }); h->first = n;
if (!is_a_nulls(first))
({ union { typeof(first->pprev) __val; char __c[1]; } __u = { .__val = ( typeof(first->pprev)) (&n->next) }; __write_once_size(&(first->pprev), __u.__c, sizeof(first->pprev)); __u.__val; });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __hlist_nulls_del(struct hlist_nulls_node *n) {
struct hlist_nulls_node *next = n->next;
struct hlist_nulls_node **pprev = n->pprev;

({ union { typeof(*pprev) __val; char __c[1]; } __u = { .__val = ( typeof(*pprev)) (next) }; __write_once_size(&(*pprev), __u.__c, sizeof(*pprev)); __u.__val; }); if (!is_a_nulls(next))
({ union { typeof(next->pprev) __val; char __c[1]; } __u = { .__val = ( typeof(next->pprev)) (pprev) }; __write_once_size(&(next->pprev), __u.__c, sizeof(next->pprev)); __u.__val; });
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void hlist_nulls_del(struct hlist_nulls_node *n)
{
__hlist_nulls_del(n);
({ union { typeof(n->pprev) __val; char __c[1]; } __u = { .__val = ( typeof(n->pprev)) (((void *) 0x200 + 0)) }; __write_once_size(&(n->pprev), __u.__c, sizeof(n->pprev)); __u.__val; });
}
# 26 "./include/linux/rhashtable.h" 2
# 1 "./include/linux/workqueue.h" 1

# 1 "./include/linux/timer.h" 1

# 1 "./include/linux/ktime.h" 1
# 24 "./include/linux/ktime.h"
# 1 "./include/linux/time.h" 1

# 1 "./include/linux/seqlock.h" 1
# 48 "./include/linux/seqlock.h"
typedef struct seqcount {
unsigned sequence;

} seqcount_t;

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void __seqcount_init(seqcount_t *s, const char *name,
struct lock_class_key *key)
{

do { (void)(name); (void)(key); } while (0);
s->sequence = 0;
}
# 108 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned __read_seqcount_begin(const seqcount_t *s) {
unsigned ret;

repeat:
ret = ({ union { typeof(s->sequence) __val; char __c[1]; } __u; if (1) __read_once_size(&(s->sequence), __u.__c, sizeof(s->sequence)); else __read_once_size_nocheck(&(s->sequence), __u.__c, sizeof(s->sequence)); do { } while (0); __u.__val; }); if (__builtin_expect(!!(ret & 1), 0)) {
__asm__ __volatile__("": : :"memory");
goto repeat;
}
return ret;
}
# 130 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned raw_read_seqcount(const seqcount_t *s)
{
unsigned ret = ({ union { typeof(s->sequence) __val; char __c[1]; } __u; if (1) __read_once_size(&(s->sequence), __u.__c, sizeof(s->sequence)); else __read_once_size_nocheck(&(s->sequence), __u.__c, sizeof(s->sequence)); do { } while (0); __u.__val; }); __asm__ __volatile__ ("dmb " "ish" : : : "memory");
return ret;
}
# 146 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned raw_read_seqcount_begin(const seqcount_t *s)
{
unsigned ret = __read_seqcount_begin(s);
__asm__ __volatile__ ("dmb " "ish" : : : "memory");
return ret;
}
# 162 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned read_seqcount_begin(const seqcount_t *s)

{
                                  ;

return raw_read_seqcount_begin(s);
}
# 182 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned raw_seqcount_begin(const seqcount_t *s)
{
unsigned ret = ({ union { typeof(s->sequence) __val; char __c[1]; } __u; if (1) __read_once_size(&(s->sequence), __u.__c, sizeof(s->sequence)); else __read_once_size_nocheck(&(s->sequence), __u.__c, sizeof(s->sequence)); do { } while (0); __u.__val; }); __asm__ __volatile__ ("dmb " "ish" : : : "memory");
return ret & ~1;
}
# 203 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __read_seqcount_retry(const seqcount_t *s, unsigned start)
{
return __builtin_expect(!!(s->sequence != start), 0);
}
# 218 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int read_seqcount_retry(const seqcount_t *s, unsigned start)
{
__asm__ __volatile__ ("dmb " "ish" : : : "memory");
return __read_seqcount_retry(s, start);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void raw_write_seqcount_begin(seqcount_t *s) {
s->sequence++;
__asm__ __volatile__ ("dmb " "ishst" : : : "memory");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void raw_write_seqcount_end(seqcount_t *s) {
__asm__ __volatile__ ("dmb " "ishst" : : : "memory");
s->sequence++;
}
# 272 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void raw_write_seqcount_barrier(seqcount_t *s) {
s->sequence++;
__asm__ __volatile__ ("dmb " "ishst" : : : "memory");
s->sequence++;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int raw_read_seqcount_latch(seqcount_t *s)
{
int seq = ({ union { typeof(s->sequence) __val; char __c[1]; } __u; if (1) __read_once_size(&(s->sequence), __u.__c, sizeof(s->sequence)); else __read_once_size_nocheck(&(s->sequence), __u.__c, sizeof(s->sequence)); do { } while (0); __u.__val; });

do { } while (0);
return seq;
}
# 364 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void raw_write_seqcount_latch(seqcount_t *s)

{
       __asm__ __volatile__ ("dmb " "ishst" : : : "memory");
       s->sequence++;
       __asm__ __volatile__ ("dmb " "ishst" : : : "memory");
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_seqcount_begin_nested(seqcount_t *s, int subclass) {
raw_write_seqcount_begin(s);
do { } while (0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_seqcount_begin(seqcount_t *s) {
write_seqcount_begin_nested(s, 0);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_seqcount_end(seqcount_t *s) {
do { } while (0);
raw_write_seqcount_end(s);
}
# 399 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_seqcount_invalidate(seqcount_t *s) {
__asm__ __volatile__ ("dmb " "ishst" : : : "memory");
s->sequence+=2;
}

typedef struct {
struct seqcount seqcount;
spinlock_t lock;
} seqlock_t;
# 432 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned read_seqbegin(const seqlock_t *sl) {
return read_seqcount_begin(&sl->seqcount);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned read_seqretry(const seqlock_t *sl, unsigned start) {
return read_seqcount_retry(&sl->seqcount, start);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_seqlock(seqlock_t *sl) {
spin_lock(&sl->lock);
write_seqcount_begin(&sl->seqcount);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_sequnlock(seqlock_t *sl) {
write_seqcount_end(&sl->seqcount);
spin_unlock(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_seqlock_bh(seqlock_t *sl) {
spin_lock_bh(&sl->lock);
write_seqcount_begin(&sl->seqcount);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_sequnlock_bh(seqlock_t *sl) {
write_seqcount_end(&sl->seqcount);
spin_unlock_bh(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_seqlock_irq(seqlock_t *sl) {
spin_lock_irq(&sl->lock);
write_seqcount_begin(&sl->seqcount);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_sequnlock_irq(seqlock_t *sl) {
write_seqcount_end(&sl->seqcount);
spin_unlock_irq(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __write_seqlock_irqsave(seqlock_t *sl) {
unsigned long flags;

do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = _raw_spin_lock_irqsave(spinlock_check(&sl->lock)); } while (0); } while (0); write_seqcount_begin(&sl->seqcount);
return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void write_sequnlock_irqrestore(seqlock_t *sl, unsigned long flags)
{
write_seqcount_end(&sl->seqcount);
spin_unlock_irqrestore(&sl->lock, flags);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_seqlock_excl(seqlock_t *sl) {
spin_lock(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_sequnlock_excl(seqlock_t *sl) {
spin_unlock(&sl->lock);
}
# 527 "./include/linux/seqlock.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_seqbegin_or_lock(seqlock_t *lock, int *seq) {
if (!(*seq & 1))
*seq = read_seqbegin(lock);
else
read_seqlock_excl(lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int need_seqretry(seqlock_t *lock, int seq) {
return !(seq & 1) && read_seqretry(lock, seq);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void done_seqretry(seqlock_t *lock, int seq) {
if (seq & 1)
read_sequnlock_excl(lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_seqlock_excl_bh(seqlock_t *sl) {
spin_lock_bh(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_sequnlock_excl_bh(seqlock_t *sl) {
spin_unlock_bh(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_seqlock_excl_irq(seqlock_t *sl) {
spin_lock_irq(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_sequnlock_excl_irq(seqlock_t *sl) {
spin_unlock_irq(&sl->lock);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long __read_seqlock_excl_irqsave(seqlock_t *sl) {
unsigned long flags;

do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = _raw_spin_lock_irqsave(spinlock_check(&sl->lock)); } while (0); } while (0); return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void read_sequnlock_excl_irqrestore(seqlock_t *sl, unsigned long flags)
{
spin_unlock_irqrestore(&sl->lock, flags);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long read_seqbegin_or_lock_irqsave(seqlock_t *lock, int *seq)
{
unsigned long flags = 0;

if (!(*seq & 1))
*seq = read_seqbegin(lock);
else
do { flags = __read_seqlock_excl_irqsave(lock); } while (0);

return flags;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void done_seqretry_irqrestore(seqlock_t *lock, int seq, unsigned long flags)
{
if (seq & 1)
read_sequnlock_excl_irqrestore(lock, flags);
}
# 7 "./include/linux/time.h" 2

extern struct timezone sys_tz;

int get_timespec64(struct timespec64 *ts,
const struct timespec *uts);
int put_timespec64(const struct timespec64 *ts,
struct timespec *uts);
int get_itimerspec64(struct itimerspec64 *it,
const struct itimerspec *uit);
int put_itimerspec64(const struct itimerspec64 *it,
struct itimerspec *uit);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int timespec_equal(const struct timespec *a,
const struct timespec *b)
{
return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) {
if (lhs->tv_sec < rhs->tv_sec)
return -1;
if (lhs->tv_sec > rhs->tv_sec)
return 1;
return lhs->tv_nsec - rhs->tv_nsec;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) {
if (lhs->tv_sec < rhs->tv_sec)
return -1;
if (lhs->tv_sec > rhs->tv_sec)
return 1;
return lhs->tv_usec - rhs->tv_usec;
}

extern time64_t mktime64(const unsigned int year, const unsigned int mon,
const unsigned int day, const unsigned int hour,
const unsigned int min, const unsigned int sec);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long mktime(const unsigned int year,
const unsigned int mon, const unsigned int day,
const unsigned int hour, const unsigned int min,
const unsigned int sec)
{
return mktime64(year, mon, day, hour, min, sec);
}

extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec);

extern struct timespec timespec_add_safe(const struct timespec lhs,

      const struct timespec rhs);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec timespec_add(struct timespec lhs,
struct timespec rhs)
{
struct timespec ts_delta;
set_normalized_timespec(&ts_delta, lhs.tv_sec + rhs.tv_sec,

    lhs.tv_nsec + rhs.tv_nsec);

return ts_delta;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec timespec_sub(struct timespec lhs,
struct timespec rhs)
{
struct timespec ts_delta;
set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec,

    lhs.tv_nsec - rhs.tv_nsec);

return ts_delta;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool timespec_valid(const struct timespec *ts) {

if (ts->tv_sec < 0)
return false;

if ((unsigned long)ts->tv_nsec >= 1000000000L)
return false;
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool timespec_valid_strict(const struct timespec *ts) {
if (!timespec_valid(ts))
return false;

if ((unsigned long long)ts->tv_sec >= (((s64)~((u64)1 << 63)) / 1000000000L))
return false;
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool timeval_valid(const struct timeval *tv) {

if (tv->tv_sec < 0)
return false;

if (tv->tv_usec < 0 || tv->tv_usec >= 1000000L)
return false;

return true;
}

extern struct timespec timespec_trunc(struct timespec t, unsigned gran);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool timeval_inject_offset_valid(const struct timeval *tv) {

if (tv->tv_usec < 0 || tv->tv_usec >= 1000000L)
return false;
return true;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool timespec_inject_offset_valid(const struct timespec *ts) {

if (ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000L)
return false;
return true;
}
# 177 "./include/linux/time.h"
struct itimerval;
extern int do_setitimer(int which, struct itimerval *value,
struct itimerval *ovalue);
extern int do_getitimer(int which, struct itimerval *value);

extern long do_utimes(int dfd, const char *filename, struct timespec64 *times, int flags);

struct tm {

int tm_sec;

int tm_min;

int tm_hour;

int tm_mday;

int tm_mon;

long tm_year;

int tm_wday;

int tm_yday;
};

void time64_to_tm(time64_t totalsecs, int offset, struct tm *result);
# 220 "./include/linux/time.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void time_to_tm(time_t totalsecs, int offset, struct tm *result) {
time64_to_tm(totalsecs, offset, result);
}
# 232 "./include/linux/time.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 timespec_to_ns(const struct timespec *ts) {
return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec;
}
# 244 "./include/linux/time.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 timeval_to_ns(const struct timeval *tv) {
return ((s64) tv->tv_sec * 1000000000L) +
tv->tv_usec * 1000L;
}

extern struct timespec ns_to_timespec(const s64 nsec);

extern struct timeval ns_to_timeval(const s64 nsec);
# 274 "./include/linux/time.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns) {
a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, 1000000000L, &ns);
a->tv_nsec = ns;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool itimerspec64_valid(const struct itimerspec64 *its) {
if (!timespec64_valid(&(its->it_interval)) ||
!timespec64_valid(&(its->it_value)))
return false;

return true;
}
# 25 "./include/linux/ktime.h" 2
# 1 "./include/linux/jiffies.h" 1
# 10 "./include/linux/jiffies.h"
# 1 "./include/linux/timex.h" 1
# 56 "./include/linux/timex.h"
# 1 "./include/uapi/linux/timex.h" 1
# 64 "./include/uapi/linux/timex.h"
struct timex {
unsigned int modes;
__kernel_long_t offset;
__kernel_long_t freq;
__kernel_long_t maxerror;
__kernel_long_t esterror;
int status;
__kernel_long_t constant;
__kernel_long_t precision;
__kernel_long_t tolerance;

struct timeval time;
__kernel_long_t tick;

__kernel_long_t ppsfreq;
__kernel_long_t jitter;
int shift;
__kernel_long_t stabil;
__kernel_long_t jitcnt;
__kernel_long_t calcnt;
__kernel_long_t errcnt;
__kernel_long_t stbcnt;

int tai;

int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
int :32; int :32; int :32;
};
# 57 "./include/linux/timex.h" 2

# 1 "./include/uapi/linux/param.h" 1

# 1 "./arch/arm/include/generated/uapi/asm/param.h" 1 # 1 "./include/asm-generic/param.h" 1

# 1 "./include/uapi/asm-generic/param.h" 1
# 6 "./include/asm-generic/param.h" 2
# 2 "./arch/arm/include/generated/uapi/asm/param.h" 2 # 6 "./include/uapi/linux/param.h" 2
# 64 "./include/linux/timex.h" 2

# 1 "./arch/arm/include/asm/timex.h" 1
# 15 "./arch/arm/include/asm/timex.h"
typedef unsigned long cycles_t;
# 66 "./include/linux/timex.h" 2
# 139 "./include/linux/timex.h"
extern unsigned long tick_usec;
extern unsigned long tick_nsec;
# 154 "./include/linux/timex.h"
extern int do_adjtimex(struct timex *);
extern void hardpps(const struct timespec64 *, const struct timespec64 *);

int read_current_timer(unsigned long *timer_val);
void ntp_notify_cmos_timer(void);
# 11 "./include/linux/jiffies.h" 2
# 1 "./arch/arm/include/generated/uapi/asm/param.h" 1
# 12 "./include/linux/jiffies.h" 2
# 1 "./include/generated/timeconst.h" 1
# 13 "./include/linux/jiffies.h" 2
# 60 "./include/linux/jiffies.h"
extern int register_refined_jiffies(long clock_tick_rate);
# 80 "./include/linux/jiffies.h"
extern u64 __attribute__((__aligned__((1 << 6)), __section__(".data..cacheline_aligned"))) jiffies_64; extern unsigned long volatile __attribute__((__aligned__((1 << 6)), __section__(".data..cacheline_aligned"))) jiffies;

u64 get_jiffies_64(void);
# 190 "./include/linux/jiffies.h"
extern unsigned long preset_lpj;
# 291 "./include/linux/jiffies.h"
extern unsigned int jiffies_to_msecs(const unsigned long j); extern unsigned int jiffies_to_usecs(const unsigned long j);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 jiffies_to_nsecs(const unsigned long j) {
return (u64)jiffies_to_usecs(j) * 1000L;
}

extern u64 jiffies64_to_nsecs(u64 j);

extern unsigned long __msecs_to_jiffies(const unsigned int m);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long _msecs_to_jiffies(const unsigned int m) {
return (m + (1000L / 100) - 1) / (1000L / 100);
}
# 363 "./include/linux/jiffies.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) unsigned long msecs_to_jiffies(const unsigned int m) {
if (__builtin_constant_p(m)) {
if ((int)m < 0)
return ((((long)(~0UL>>1)) >> 1)-1);
return _msecs_to_jiffies(m);
} else {
return __msecs_to_jiffies(m);
}
}

extern unsigned long __usecs_to_jiffies(const unsigned int u);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long _usecs_to_jiffies(const unsigned int u) {
return (u + (1000000L / 100) - 1) / (1000000L / 100);
}
# 410 "./include/linux/jiffies.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((always_inline)) unsigned long usecs_to_jiffies(const unsigned int u) {
if (__builtin_constant_p(u)) {
if (u > jiffies_to_usecs(((((long)(~0UL>>1)) >> 1)-1)))
return ((((long)(~0UL>>1)) >> 1)-1);
return _usecs_to_jiffies(u);
} else {
return __usecs_to_jiffies(u);
}
}

extern unsigned long timespec64_to_jiffies(const struct timespec64 *value); extern void jiffies_to_timespec64(const unsigned long jiffies,

      struct timespec64 *value);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) unsigned long timespec_to_jiffies(const struct timespec *value) {
struct timespec64 ts = timespec_to_timespec64(*value);

return timespec64_to_jiffies(&ts);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void jiffies_to_timespec(const unsigned long jiffies,
struct timespec *value)
{
struct timespec64 ts;

jiffies_to_timespec64(jiffies, &ts);
*value = timespec64_to_timespec(ts);
}

extern unsigned long timeval_to_jiffies(const struct timeval *value); extern void jiffies_to_timeval(const unsigned long jiffies,

          struct timeval *value);

extern clock_t jiffies_to_clock_t(unsigned long x);
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) clock_t jiffies_delta_to_clock_t(long delta)
{
return jiffies_to_clock_t(({ typeof(0L) __UNIQUE_ID_max1_10 = (0L); typeof(delta) __UNIQUE_ID_max2_11 = (delta); (void) (&__UNIQUE_ID_max1_10 == &__UNIQUE_ID_max2_11); __UNIQUE_ID_max1_10 > __UNIQUE_ID_max2_11 ? __UNIQUE_ID_max1_10 : __UNIQUE_ID_max2_11; }));
}

extern unsigned long clock_t_to_jiffies(unsigned long x); extern u64 jiffies_64_to_clock_t(u64 x);
extern u64 nsec_to_clock_t(u64 x);
extern u64 nsecs_to_jiffies64(u64 n);
extern unsigned long nsecs_to_jiffies(u64 n);
# 26 "./include/linux/ktime.h" 2

typedef s64 ktime_t;
# 37 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_set(const s64 secs, const unsigned long nsecs) {
if (__builtin_expect(!!(secs >= (((s64)~((u64)1 << 63)) / 1000000000L)), 0))
return ((s64)~((u64)1 << 63));

return secs * 1000000000L + (s64)nsecs;
}
# 70 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t timespec_to_ktime(struct timespec ts) {
return ktime_set(ts.tv_sec, ts.tv_nsec);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t timespec64_to_ktime(struct timespec64 ts) {
return ktime_set(ts.tv_sec, ts.tv_nsec);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t timeval_to_ktime(struct timeval tv) {
return ktime_set(tv.tv_sec, tv.tv_usec * 1000L);
}
# 109 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int ktime_compare(const ktime_t cmp1, const ktime_t cmp2) {
if (cmp1 < cmp2)
return -1;
if (cmp1 > cmp2)
return 1;
return 0;
}
# 125 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool ktime_after(const ktime_t cmp1, const ktime_t cmp2) {
return ktime_compare(cmp1, cmp2) > 0;
}
# 137 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) bool ktime_before(const ktime_t cmp1, const ktime_t cmp2) {
return ktime_compare(cmp1, cmp2) < 0;
}

extern s64 __ktime_divns(const ktime_t kt, s64 div);
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 ktime_divns(const ktime_t kt, s64 div) {

do { if (__builtin_expect(!!(div < 0), 0)) do { asm volatile("1:\t" ".long " "((0xe7f001f2) & 0xFFFFFFFF)" "\n\t" "\n" ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" "2:\t.asciz " "\"include/linux/ktime.h\"" "\n" ".popsection\n" ".pushsection __bug_table,\"aw\"\n" ".align 2\n" "3:\t.word 1b, 2b\n" "\t.hword " "150" ", 0\n" ".popsection"); do { ; do { } while (1); } while (0); } while (0); } while (0); if (__builtin_constant_p(div) && !(div >> 32)) {
s64 ns = kt;
u64 tmp = ns < 0 ? -ns : ns;

({ unsigned int __r, __b = (div); if (!__builtin_constant_p(__b) || __b == 0 || (7 < 4 && (__b & (__b - 1)) != 0)) { __r = ({ register unsigned int __base asm("r4") = __b; register unsigned long long __n asm("r0") = tmp; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm( ".ifnc " "%0" "," "r1" "; " ".ifnc " "%0" "r1" ",fpr11; " ".ifnc " "%0" "r1" ",r11fp; " ".ifnc " "%0" "r1" ",ipr12; " ".ifnc " "%0" "r1" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%1" "," "r2" "; " ".ifnc " "%1" "r2" ",fpr11; " ".ifnc " "%1" "r2" ",r11fp; " ".ifnc " "%1" "r2" ",ipr12; " ".ifnc " "%1" "r2" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%2" "," "r0" "; " ".ifnc " "%2" "r0" ",fpr11; " ".ifnc " "%2" "r0" ",r11fp; " ".ifnc " "%2" "r0" ",ipr12; " ".ifnc " "%2" "r0" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" ".ifnc " "%3" "," "r4" "; " ".ifnc " "%3" "r4" ",fpr11; " ".ifnc " "%3" "r4" ",r11fp; " ".ifnc " "%3" "r4" ",ipr12; " ".ifnc " "%3" "r4" ",r12ip; " ".err; " ".endif; " ".endif; " ".endif; " ".endif; " ".endif\n\t" "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); tmp = __res; __rem; }); } else if ((__b & (__b - 1)) == 0) { __r = tmp; __r &= (__b - 1); tmp /= __b; } else { unsigned long long __res, __x, __t, __m, __n = tmp; unsigned int __c, __p, __z = 0; __r = __n; __p = 1 << ({ unsigned int __left = (__b), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m = (~0ULL / __b) * __p; __m += (((~0ULL % __b + 1) * __p) + __b - 1) / __b; __x = ~0ULL / __b * __b - 1; __res = (__m & 0xffffffff) * (__x & 0xffffffff); __res >>= 32; __res += (__m & 0xffffffff) * (__x >> 32); __t = __res; __res += (__x & 0xffffffff) * (__m >> 32); __t = (__res < __t) ? (1ULL << 32) : 0; __res = (__res >> 32) + __t; __res += (__m >> 32) * (__x >> 32); __res /= __p; if (~0ULL % (__b / (__b & -__b)) == 0) { __n /= (__b & -__b); __m = ~0ULL / (__b / (__b & -__b)); __p = 1; __c = 1; } else if (__res != __x / __b) { __c = 1; __m = (~0ULL / __b) * __p; __m += ((~0ULL % __b + 1) * __p) / __b; } else { unsigned int __bits = -(__m & -__m); __bits |= __m >> 32; __bits = (~__bits) << 1; if (!__bits) { __p /= (__m & -__m); __m /= (__m & -__m); } else { __p >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); __m >>= ({ unsigned int __left = (__bits), __nr = 0; if (__left & 0xffff0000) __nr += 16, __left >>= 16; if (__left & 0x0000ff00) __nr += 8, __left >>= 8; if (__left & 0x000000f0) __nr += 4, __left >>= 4; if (__left & 0x0000000c) __nr += 2, __left >>= 2; if (__left & 0x00000002) __nr += 1; __nr; }); } __c = 0; } if (!__c) { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "=&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { __res = __m; asm ( "umlal %Q0, %R0, %Q1, %Q2\n\t" "mov %Q0, #0" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umull %Q0, %R0, %Q1, %Q2\n\t" "cmn %Q0, %Q1\n\t" "adcs %R0, %R0, %R1\n\t" "adc %Q0, %3, #0" : "=&r" (__res) : "r" (__m), "r" (__n), "r" (__z) : "cc" ); } if (!(__m & ((1ULL << 63) | (1ULL << 31)))) { asm ( "umlal %R0, %Q0, %R1, %Q2\n\t" "umlal %R0, %Q0, %Q1, %R2\n\t" "mov %R0, #0\n\t" "umlal %Q0, %R0, %R1, %R2" : "+&r" (__res) : "r" (__m), "r" (__n) : "cc" ); } else { asm ( "umlal %R0, %Q0, %R2, %Q3\n\t" "umlal %R0, %1, %Q2, %R3\n\t" "mov %R0, #0\n\t" "adds %Q0, %1, %Q0\n\t" "adc %R0, %R0, #0\n\t" "umlal %Q0, %R0, %R2, %R3" : "+&r" (__res), "+&r" (__z) : "r" (__m), "r" (__n) : "cc" ); } __res /= __p; { unsigned int __res0 = __res; unsigned int __b0 = __b; __r -= __res0 * __b0; } tmp = __res; } __r; });
return ns < 0 ? -tmp : tmp;
} else {
return __ktime_divns(kt, div);
}
}
# 173 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 ktime_to_us(const ktime_t kt) {
return ktime_divns(kt, 1000L);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 ktime_to_ms(const ktime_t kt) {
return ktime_divns(kt, 1000000L);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 ktime_us_delta(const ktime_t later, const ktime_t earlier)

{
       return ktime_to_us(((later) - (earlier)));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) s64 ktime_ms_delta(const ktime_t later, const ktime_t earlier) {
return ktime_to_ms(((later) - (earlier)));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_add_us(const ktime_t kt, const u64 usec) {
return ((kt) + (usec * 1000L));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_add_ms(const ktime_t kt, const u64 msec) {
return ((kt) + (msec * 1000000L));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) {
return ((kt) - (usec * 1000L));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_sub_ms(const ktime_t kt, const u64 msec) {
return ((kt) - (msec * 1000000L));
}

extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs);
# 223 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((warn_unused_result)) bool ktime_to_timespec_cond(const ktime_t kt,
struct timespec *ts)
{
if (kt) {
*ts = ns_to_timespec((kt));
return true;
} else {
return false;
}
}
# 242 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) __attribute__((warn_unused_result)) bool ktime_to_timespec64_cond(const ktime_t kt,
struct timespec64 *ts)
{
if (kt) {
*ts = ns_to_timespec64((kt));
return true;
} else {
return false;
}
}
# 262 "./include/linux/ktime.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ns_to_ktime(u64 ns)
{
return ns;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ms_to_ktime(u64 ms) {
return ms * 1000000L;
}

# 1 "./include/linux/timekeeping.h" 1

void timekeeping_init(void);
extern int timekeeping_suspended;

extern void update_process_times(int user);
extern void xtime_update(unsigned long ticks);

extern void do_gettimeofday(struct timeval *tv); extern int do_settimeofday64(const struct timespec64 *ts); extern int do_sys_settimeofday64(const struct timespec64 *tv,

     const struct timezone *tz);

unsigned long get_seconds(void);
struct timespec64 current_kernel_time64(void);

struct timespec __current_kernel_time(void);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec current_kernel_time(void) {
struct timespec64 now = current_kernel_time64();

return timespec64_to_timespec(now);
}

struct timespec64 get_monotonic_coarse64(void); extern void getrawmonotonic64(struct timespec64 *ts); extern void ktime_get_ts64(struct timespec64 *ts); extern time64_t ktime_get_seconds(void); extern time64_t ktime_get_real_seconds(void);

extern int __getnstimeofday64(struct timespec64 *tv);
extern void getnstimeofday64(struct timespec64 *tv);
extern void getboottime64(struct timespec64 *ts);
# 98 "./include/linux/timekeeping.h"
static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int do_settimeofday(const struct timespec *ts) {
struct timespec64 ts64;

ts64 = timespec_to_timespec64(*ts);
return do_settimeofday64(&ts64);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) int __getnstimeofday(struct timespec *ts) {
struct timespec64 ts64;
int ret = __getnstimeofday64(&ts64);

*ts = timespec64_to_timespec(ts64);
return ret;
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void getnstimeofday(struct timespec *ts) {
struct timespec64 ts64;

getnstimeofday64(&ts64);
*ts = timespec64_to_timespec(ts64);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void ktime_get_ts(struct timespec *ts) {
struct timespec64 ts64;

ktime_get_ts64(&ts64);
*ts = timespec64_to_timespec(ts64);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void ktime_get_real_ts(struct timespec *ts) {
struct timespec64 ts64;

getnstimeofday64(&ts64);
*ts = timespec64_to_timespec(ts64);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void getrawmonotonic(struct timespec *ts) {
struct timespec64 ts64;

getrawmonotonic64(&ts64);
*ts = timespec64_to_timespec(ts64);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) struct timespec get_monotonic_coarse(void) {
return timespec64_to_timespec(get_monotonic_coarse64());
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void getboottime(struct timespec *ts) {
struct timespec64 ts64;

getboottime64(&ts64);
*ts = timespec64_to_timespec(ts64);
}
# 167 "./include/linux/timekeeping.h"
enum tk_offsets {
TK_OFFS_REAL,
TK_OFFS_BOOT,
TK_OFFS_TAI,
TK_OFFS_MAX,
};

extern ktime_t ktime_get(void);
extern ktime_t ktime_get_with_offset(enum tk_offsets offs); extern ktime_t ktime_mono_to_any(ktime_t tmono, enum tk_offsets offs); extern ktime_t ktime_get_raw(void);
extern u32 ktime_get_resolution_ns(void);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_get_real(void) {
return ktime_get_with_offset(TK_OFFS_REAL);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_get_boottime(void) {
return ktime_get_with_offset(TK_OFFS_BOOT);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_get_clocktai(void) {
return ktime_get_with_offset(TK_OFFS_TAI);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) ktime_t ktime_mono_to_real(ktime_t mono) {
return ktime_mono_to_any(mono, TK_OFFS_REAL);
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 ktime_get_ns(void) {
return (ktime_get());
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 ktime_get_real_ns(void) {
return (ktime_get_real());
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 ktime_get_boot_ns(void) {
return (ktime_get_boottime());
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 ktime_get_tai_ns(void) {
return (ktime_get_clocktai());
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) u64 ktime_get_raw_ns(void) {
return (ktime_get_raw());
}

extern u64 ktime_get_mono_fast_ns(void);
extern u64 ktime_get_raw_fast_ns(void);
extern u64 ktime_get_boot_fast_ns(void);

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void get_monotonic_boottime(struct timespec *ts) {
*ts = ns_to_timespec((ktime_get_boottime()));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void get_monotonic_boottime64(struct timespec64 *ts) {
*ts = ns_to_timespec64((ktime_get_boottime()));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void timekeeping_clocktai(struct timespec *ts) {
*ts = ns_to_timespec((ktime_get_clocktai()));
}

static inline __attribute__((always_inline, unused)) __attribute__((no_instrument_function)) void timekeeping_clocktai64(struct timespec64 *ts) {
*ts = ns_to_timespec64((ktime_get_clocktai()));
}

extern bool timekeeping_rtc_skipsuspend(void);
extern bool timekeeping_rtc_skipresume(void);

extern void timekeeping_inject_sleeptime64(struct timespec64 *delta);

extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw,

            struct timespec64 *ts_real);

# 290 "./include/linux/timekeeping.h"
struct system_time_snapshot {
u64 cycles;
ktime_t real;
ktime_t raw;
unsigned int clock_was_set_seq;
u8 cs_was_changed_seq;
};
# 305 "./include/linux/timekeeping.h"
struct system_device_crosststamp {
ktime_t device;
ktime_t sys_realtime;
ktime_t sys_monoraw;
};
# 318 "./include/linux/timekeeping.h"
struct system_counterval_t {
u64 cycles;
struct clocksource *cs;
};

extern int get_device_system_crosststamp(
int (*get_time_fn)(ktime_t *device_time,
struct system_counterval_t *system_counterval, void *ctx),
void *ctx,
struct system_time_snapshot *history, struct system_device_crosststamp *xtstamp);

extern void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot);

extern int persistent_clock_is_local;

extern void read_persistent_clock(struct timespec *ts); extern void read_persistent_clock64(struct timespec64 *ts); extern void read_boot_clock64(struct timespec64 *ts); extern int update_persistent_clock(struct timespec now); extern int update_persistent_clock64(struct timespec64 now); # 273 "./include/linux/ktime.h" 2
# 7 "./include/linux/timer.h" 2

# 1 "./include/linux/debugobjects.h" 1

enum debug_obj_state {
ODEBUG_STATE_NONE,
ODEBUG_STATE_INIT,
ODEBUG_STATE_INACTIVE,
ODEBUG_STATE_ACTIVE,
ODEBUG_STATE_DESTROYED,
ODEBUG_STATE_NOTAVAILABLE,
ODEBUG_STATE_MAX,
};

21,444 lines not shown · raw message

Part of this message is not shown here. View the raw message.

author
#3 lore raw

Antony Yu <[email protected]> 於 2020年11月24日 週二 下午3:43寫道:

Quoted 51 lines · Nathan Chancellor
Quoted 38 lines · Antony Yu
Quoted 28 lines

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
    asm(    __asmeq("%0", __xh)
            __asmeq("%1", "r2")
            __asmeq("%2", "r0")
-           __asmeq("%3", "r4")
+           __asmeq("%3", "r0")
+           __asmeq("%4", "r4")
            "bl     __do_div64"
-           : "=r" (__rem), "=r" (__res)
+           : "=r" (__rem), "=r" (__res), "=r" (__n)
            : "r" (__n), "r" (__base)
            : "ip", "lr", "cc");
    *n = __res;
--
Quoted 2 lines

2.23.0

I am not sure that I am qualified to review this (my assembly knowledge is not the best) but your commit title mentions an error when compiling with clang. What is the exact error, what configuration generates it, and what version of clang? We have done fairly decent testing for 32-bit ARM, I would like to know what we are missing.

Quoted 2 lines

Cheers,
Nathan

We have run fail on android R vts vts_libsnapshot_test with kernel 4.14. This bug is triggered accidently by a workaround patch in our code base. It is fine on a pure clean 4.14 branch since __do_div64 may not be executed in skip_metadata.

The attachment are .i and generated .s file. .s file can be reproduced with clang -target arm-linux-eabi -march=armv8.2-a -O2.

Quoted 6 lines

In function skip_metadata, it loads some value to r0, calls __do_div64, adds 1 to r0 and stores it to [r5]. It gets wrong value since __do_div64 clobbers r0 register.

We have tried clang-10, clang-11 and android prebuilt clang-r383902b. All of them have the same problem.

Sorry for the large attachment.
I put .i and .s files on
https://gist.github.com/penyung/274b0c697062a1c776994bb40243cfff

Antony Yu

#4 lore raw

Thanks for the report, it probably was not fun to debug. I'll take a closer look at this after the Thanksgiving holiday.

Quoted 65 lines · Antony Yu

Antony Yu <[email protected]> 於 2020年11月24日 週二 下午3:43寫道:

Quoted 51 lines · Nathan Chancellor
Quoted 38 lines · Antony Yu
Quoted 28 lines

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
    asm(    __asmeq("%0", __xh)
            __asmeq("%1", "r2")
            __asmeq("%2", "r0")
-           __asmeq("%3", "r4")
+           __asmeq("%3", "r0")
+           __asmeq("%4", "r4")
            "bl     __do_div64"
-           : "=r" (__rem), "=r" (__res)
+           : "=r" (__rem), "=r" (__res), "=r" (__n)
            : "r" (__n), "r" (__base)
            : "ip", "lr", "cc");
    *n = __res;
--
Quoted 2 lines

2.23.0

I am not sure that I am qualified to review this (my assembly knowledge is not the best) but your commit title mentions an error when compiling with clang. What is the exact error, what configuration generates it, and what version of clang? We have done fairly decent testing for 32-bit ARM, I would like to know what we are missing.

Quoted 2 lines

Cheers,
Nathan

We have run fail on android R vts vts_libsnapshot_test with kernel 4.14. This bug is triggered accidently by a workaround patch in our code base. It is fine on a pure clean 4.14 branch since __do_div64 may not be executed in skip_metadata.

The attachment are .i and generated .s file. .s file can be reproduced with clang -target arm-linux-eabi -march=armv8.2-a -O2.

Quoted 6 lines

In function skip_metadata, it loads some value to r0, calls __do_div64, adds 1 to r0 and stores it to [r5]. It gets wrong value since __do_div64 clobbers r0 register.

We have tried clang-10, clang-11 and android prebuilt clang-r383902b. All of them have the same problem.

Sorry for the large attachment.
I put .i and .s files on
https://gist.github.com/penyung/274b0c697062a1c776994bb40243cfff

Antony Yu

Signature · 2 lines
Thanks,
~Nick Desaulniers
author
#5 lore raw

PATCH v2 1/1 ARM: fix __div64_32() error when compiling with clang

From 3a4c19e09079324a625941ea3c16fe4b0df2ed86 Mon Sep 17 00:00:00 2001
From: Antony Yu <[email protected]>
Date: Mon, 9 Nov 2020 17:31:52 +0800
Subject: [PATCH v2] ARM: fix __div64_32() error when compiling with clang

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
changed in v2
- add kernel-test-robot tag
- fix build failure on big endian

 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -2
index 898e9c78a7e7..961a129eb41f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 	asm(	__asmeq("%0", __xh)
 		__asmeq("%1", "r2")
 		__asmeq("%2", "r0")
-		__asmeq("%3", "r4")
+		__asmeq("%3", "r0")
+		__asmeq("%4", "r4")
 		"bl	__do_div64"
-		: "=r" (__rem), "=r" (__res)
+		: "=r" (__rem), "=r" (__res), "=r" (__xl)
 		: "r" (__n), "r" (__base)
 		: "ip", "lr", "cc");
 	*n = __res;
Signature · 1 line
2.29.0
#6 lore raw
In reply to Antony Yu
Thank you for the patch! Yet something to improve:

Hi Antony,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.10-rc5 next-20201124]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Antony-Yu/ARM-fix-__div64_32-error-when-compiling-with-clang/20201123-154454
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 418baf2c28f3473039f2f7377760bd8f6897ae18
config: arm-randconfig-r036-20201124 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project df9ae5992889560a8f3c6760b54d5051b47c7bf5)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/83df1f983ed4219556020bf30cc819e66bb7e69c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Antony-Yu/ARM-fix-__div64_32-error-when-compiling-with-clang/20201123-154454 git checkout 83df1f983ed4219556020bf30cc819e66bb7e69c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

drivers/tty/serial/imx.c:359:19: warning: unused function 'imx_uart_is_imx21' [-Wunused-function] static inline int imx_uart_is_imx21(struct imx_port *sport)

                     ^
   drivers/tty/serial/imx.c:364:19: warning: unused function 'imx_uart_is_imx53' [-Wunused-function]
   static inline int imx_uart_is_imx53(struct imx_port *sport)
                     ^
   drivers/tty/serial/imx.c:369:19: warning: unused function 'imx_uart_is_imx6q' [-Wunused-function]
   static inline int imx_uart_is_imx6q(struct imx_port *sport)
                     ^
   In file included from drivers/tty/serial/imx.c:11:
   In file included from include/linux/module.h:12:
   In file included from include/linux/list.h:9:
   In file included from include/linux/kernel.h:19:
>> arch/arm/include/asm/div64.h:39:2: error: multiple outputs to hard register: r0
           asm(    __asmeq("%0", __xh)
           ^

3 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/tegra/dc.c:7:
In file included from include/linux/clk.h:13:
In file included from include/linux/kernel.h:19:

>> arch/arm/include/asm/div64.h:39:2: error: multiple outputs to hard register: r0
           asm(    __asmeq("%0", __xh)
           ^

1 error generated.

vim +39 arch/arm/include/asm/div64.h

^1da177e4c3f415 include/asm-arm/div64.h      Linus Torvalds 2005-04-16  32  
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  33  static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  34  {
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  35  	register unsigned int __base      asm("r4") = base;
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  36  	register unsigned long long __n   asm("r0") = *n;
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  37  	register unsigned long long __res asm("r2");
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  38  	register unsigned int __rem       asm(__xh);
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02 @39  	asm(	__asmeq("%0", __xh)
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  40  		__asmeq("%1", "r2")
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  41  		__asmeq("%2", "r0")
83df1f983ed4219 arch/arm/include/asm/div64.h Antony Yu      2020-11-23  42  		__asmeq("%3", "r0")
83df1f983ed4219 arch/arm/include/asm/div64.h Antony Yu      2020-11-23  43  		__asmeq("%4", "r4")
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  44  		"bl	__do_div64"
83df1f983ed4219 arch/arm/include/asm/div64.h Antony Yu      2020-11-23  45  		: "=r" (__rem), "=r" (__res), "=r" (__n)
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  46  		: "r" (__n), "r" (__base)
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  47  		: "ip", "lr", "cc");
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  48  	*n = __res;
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  49  	return __rem;
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  50  }
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  51  #define __div64_32 __div64_32
040b323b5012b55 arch/arm/include/asm/div64.h Nicolas Pitre  2015-11-02  52  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#7 lore raw
In reply to Antony Yu
Quoted 29 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
        asm(    __asmeq("%0", __xh)
                __asmeq("%1", "r2")
                __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%3", "r0")
+               __asmeq("%4", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
+               : "=r" (__rem), "=r" (__res), "=r" (__n)
                : "r" (__n), "r" (__base)
                : "ip", "lr", "cc");
        *n = __res;
--
Quoted 2 lines

2.23.0

Agree that using r0 as an input operand only is incorrect, and not only on Clang. The compiler might assume that r0 will retain its value across the asm() block, which is obviously not the case.

However, your patch will likely break big-endian, since in that case, __xh == r0, and so it will appear twice.

Perhaps it would be better to change the type of __rem to unsigned long long as well?

#8 lore raw

(+ Nico)

Quoted 43 lines · Ard Biesheuvel
Quoted 29 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
        asm(    __asmeq("%0", __xh)
                __asmeq("%1", "r2")
                __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%3", "r0")
+               __asmeq("%4", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
+               : "=r" (__rem), "=r" (__res), "=r" (__n)
                : "r" (__n), "r" (__base)
                : "ip", "lr", "cc");
        *n = __res;
--
Quoted 2 lines

2.23.0

Agree that using r0 as an input operand only is incorrect, and not only on Clang. The compiler might assume that r0 will retain its value across the asm() block, which is obviously not the case.

However, your patch will likely break big-endian, since in that case, __xh == r0, and so it will appear twice.

Perhaps it would be better to change the type of __rem to unsigned long long as well?

#9 lore raw
Quoted 40 lines · Ard Biesheuvel

(+ Nico)

Quoted 37 lines · Ard Biesheuvel
Quoted 29 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
        asm(    __asmeq("%0", __xh)
                __asmeq("%1", "r2")
                __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%3", "r0")
+               __asmeq("%4", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
+               : "=r" (__rem), "=r" (__res), "=r" (__n)
                : "r" (__n), "r" (__base)
                : "ip", "lr", "cc");
        *n = __res;
--
Quoted 2 lines

2.23.0

Agree that using r0 as an input operand only is incorrect, and not only on Clang. The compiler might assume that r0 will retain its value across the asm() block, which is obviously not the case.

However, you can _not_ have an asm block that names two outputs using the same physical register - that's why both the original patch and the posted v2 will fail.

You also can't mark r0 as clobbered because it's used as an operand and that is not allowed by gcc.

The fact is, we have two register variables occupying the same register, which are __n and __rem. It doesn't matter which endian-ness __rem is, r0 will be used for both __n (input) and __rem (output).

If the compiler can't work out that if a physical register used as an output operand will be written by the assembler, then the compiler is quite simply buggy.

The code is correct as it stands; Clang is buggy.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
#10 lore raw
Quoted 47 lines · Russell King - ARM Linux admin
Quoted 40 lines · Ard Biesheuvel

(+ Nico)

Quoted 37 lines · Ard Biesheuvel
Quoted 29 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
        asm(    __asmeq("%0", __xh)
                __asmeq("%1", "r2")
                __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%3", "r0")
+               __asmeq("%4", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
+               : "=r" (__rem), "=r" (__res), "=r" (__n)
                : "r" (__n), "r" (__base)
                : "ip", "lr", "cc");
        *n = __res;
--
Quoted 2 lines

2.23.0

Agree that using r0 as an input operand only is incorrect, and not only on Clang. The compiler might assume that r0 will retain its value across the asm() block, which is obviously not the case.

However, you can _not_ have an asm block that names two outputs using the same physical register - that's why both the original patch and the posted v2 will fail.

Quoted 7 lines

You also can't mark r0 as clobbered because it's used as an operand and that is not allowed by gcc.

The fact is, we have two register variables occupying the same register, which are __n and __rem. It doesn't matter which endian-ness __rem is, r0 will be used for both __n (input) and __rem (output).

__rem is a 32-bit variable, so in LE mode, only r1 is used for __rem, not r0. So r0/r1 are used as an input operand pair, and r1 is used as an output operand.

So I don't think the compiler has to be buggy in order for it to assume that r0 will still contain the low word of the dividend afterwards.

And actually, the same applies on BE, but the other way around. So we should mark __xl as an output register as well, as __xl will assume the right value depending on the endianness.

I suggest something like the below,

arch/arm/include/asm/div64.h +0 -0
index 898e9c78a7e7..85ff9109595e 100644
@@ -36,12 +36,14 @@ static inline uint32_t __div64_32(uint64_t *n,

uint32_t base)

        register unsigned long long __n   asm("r0") = *n;
        register unsigned long long __res asm("r2");
        register unsigned int __rem       asm(__xh);
+       register unsigned int __dummy     asm(__xl);
        asm(    __asmeq("%0", __xh)
                __asmeq("%1", "r2")
-               __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%2", __xl)
+               __asmeq("%3", "r0")
+               __asmeq("%4", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
+               : "=r" (__rem), "=r" (__res), "=r"(__dummy)
                : "r" (__n), "r" (__base)
                : "ip", "lr", "cc");
        *n = __res;
Quoted 9 lines

If the compiler can't work out that if a physical register used as an output operand will be written by the assembler, then the compiler is quite simply buggy.

The code is correct as it stands; Clang is buggy.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

#11 lore raw
Quoted 3 lines

And actually, the same applies on BE, but the other way around. So we should mark __xl as an output register as well, as __xl will assume the right value depending on the endianness.

Why not use "+r" to indicate than an 'output' parameter is also used as an input.

Rather cleaner than specifying the same C variable as both input and output.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#12 lore raw
Quoted 9 lines · David Laight
Quoted 3 lines

And actually, the same applies on BE, but the other way around. So we should mark __xl as an output register as well, as __xl will assume the right value depending on the endianness.

Why not use "+r" to indicate than an 'output' parameter is also used as an input.

Rather cleaner than specifying the same C variable as both input and output.

You have an incorrect understanding. "__n" is the input operand in r0. "__rem" is the output operand in r0/r1.

No single C variable is used as both an input and an output.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
#13 lore raw
In reply to Ard Biesheuvel
Quoted 40 lines · Ard Biesheuvel

(+ Nico)

Quoted 37 lines · Ard Biesheuvel
Quoted 29 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
        asm(    __asmeq("%0", __xh)
                __asmeq("%1", "r2")
                __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%3", "r0")
+               __asmeq("%4", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
+               : "=r" (__rem), "=r" (__res), "=r" (__n)
                : "r" (__n), "r" (__base)
                : "ip", "lr", "cc");
        *n = __res;
--
Quoted 2 lines

2.23.0

Agree that using r0 as an input operand only is incorrect, and not only on Clang. The compiler might assume that r0 will retain its value across the asm() block, which is obviously not the case.

You're right.

This was done like that most likely to work around some stupid code generation with "__n >> 32" while using gcc from about 20 years ago. IOW I don't exactly remember why I did it like that, but it is certainly flawed.

Here's my version of the fix which should be correct. Warning: this is completely untested, but should in theory produce the same code on modern gcc.

arch/arm/include/asm/div64.h +6 -15
index 898e9c78a7..595e538f5b 100644
@@ -21,29 +21,20 @@
  * assembly implementation with completely non standard calling convention
  * for arguments and results (beware).
  */
-
-#ifdef __ARMEB__
-#define __xh "r0"
-#define __xl "r1"
-#else
-#define __xl "r0"
-#define __xh "r1"
-#endif
-
 static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 {
 	register unsigned int __base      asm("r4") = base;
 	register unsigned long long __n   asm("r0") = *n;
 	register unsigned long long __res asm("r2");
-	register unsigned int __rem       asm(__xh);
-	asm(	__asmeq("%0", __xh)
+	unsigned int __rem;
+	asm(	__asmeq("%0", "r0")
 		__asmeq("%1", "r2")
-		__asmeq("%2", "r0")
-		__asmeq("%3", "r4")
+		__asmeq("%2", "r4")
 		"bl	__do_div64"
-		: "=r" (__rem), "=r" (__res)
-		: "r" (__n), "r" (__base)
+		: "+r" (__n), "=r" (__res)
+		: "r" (__base)
 		: "ip", "lr", "cc");
+	__rem = __n >> 32;
 	*n = __res;
 	return __rem;
 }

I'll submit it if someone confirms it works.

Nicolas

#14 lore raw
Quoted 82 lines · Nicolas Pitre
Quoted 40 lines · Ard Biesheuvel

(+ Nico)

Quoted 37 lines · Ard Biesheuvel
Quoted 29 lines · Antony Yu

__do_div64 clobbers the input register r0 in little endian system. According to the inline assembly document, if an input operand is modified, it should be tied to a output operand. This patch can prevent compilers from reusing r0 register after asm statements.

---
 arch/arm/include/asm/div64.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/include/asm/div64.h +3 -3
index 898e9c78a7e7..809efc51e90f 100644
@@ -39,9 +39,10 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
        asm(    __asmeq("%0", __xh)
                __asmeq("%1", "r2")
                __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%3", "r0")
+               __asmeq("%4", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
+               : "=r" (__rem), "=r" (__res), "=r" (__n)
                : "r" (__n), "r" (__base)
                : "ip", "lr", "cc");
        *n = __res;
--
Quoted 2 lines

2.23.0

Agree that using r0 as an input operand only is incorrect, and not only on Clang. The compiler might assume that r0 will retain its value across the asm() block, which is obviously not the case.

You're right.

This was done like that most likely to work around some stupid code generation with "__n >> 32" while using gcc from about 20 years ago. IOW I don't exactly remember why I did it like that, but it is certainly flawed.

Here's my version of the fix which should be correct. Warning: this is completely untested, but should in theory produce the same code on modern gcc.

arch/arm/include/asm/div64.h +2 -11
index 898e9c78a7..595e538f5b 100644
@@ -21,29 +21,20 @@
  * assembly implementation with completely non standard calling convention
  * for arguments and results (beware).
  */
-
-#ifdef __ARMEB__
-#define __xh "r0"
-#define __xl "r1"
-#else
-#define __xl "r0"
-#define __xh "r1"
-#endif
-
 static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 {
        register unsigned int __base      asm("r4") = base;
        register unsigned long long __n   asm("r0") = *n;
        register unsigned long long __res asm("r2");
-       register unsigned int __rem       asm(__xh);
-       asm(    __asmeq("%0", __xh)
+       unsigned int __rem;
+       asm(    __asmeq("%0", "r0")
                __asmeq("%1", "r2")

arch/arm/include/asm/div64.h line 37

Quoted 10 lines
arch/arm/include/asm/div64.h +4 -4
-               __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%2", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
-               : "r" (__n), "r" (__base)
+               : "+r" (__n), "=r" (__res)
+               : "r" (__base)
                : "ip", "lr", "cc");
+       __rem = __n >> 32;

This treats {r0, r1} as a {low, high} pair, regardless of endianness, and so it puts the value of r0 into r1. Doesn't that mean the shift should only be done on little endian?

Quoted 13 lines
arch/arm/include/asm/div64.h +0 -0
        *n = __res;
        return __rem;
 }

I'll submit it if someone confirms it works.

Nicolas

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#15 lore raw
Quoted 39 lines · Ard Biesheuvel
Quoted 37 lines · Nicolas Pitre

Here's my version of the fix which should be correct. Warning: this is completely untested, but should in theory produce the same code on modern gcc.

arch/arm/include/asm/div64.h +3 -15
index 898e9c78a7..595e538f5b 100644
@@ -21,29 +21,20 @@
  * assembly implementation with completely non standard calling convention
  * for arguments and results (beware).
  */
-
-#ifdef __ARMEB__
-#define __xh "r0"
-#define __xl "r1"
-#else
-#define __xl "r0"
-#define __xh "r1"
-#endif
-
 static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 {
        register unsigned int __base      asm("r4") = base;
        register unsigned long long __n   asm("r0") = *n;
        register unsigned long long __res asm("r2");
-       register unsigned int __rem       asm(__xh);
-       asm(    __asmeq("%0", __xh)
+       unsigned int __rem;
+       asm(    __asmeq("%0", "r0")
                __asmeq("%1", "r2")
-               __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%2", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
-               : "r" (__n), "r" (__base)
Quoted 8 lines

arch/arm/include/asm/div64.h line 37

Quoted 4 lines
arch/arm/include/asm/div64.h +3 -0
+               : "+r" (__n), "=r" (__res)
+               : "r" (__base)
                : "ip", "lr", "cc");
+       __rem = __n >> 32;

This treats {r0, r1} as a {low, high} pair, regardless of endianness, and so it puts the value of r0 into r1. Doesn't that mean the shift should only be done on little endian?

Not quite. r0-r1 = low-high is for little endian. Then "__n >> 32" is actually translated into "mov r0, r1" to move it into __rem and returned through r0.

On big endial it is r0-r1 = high-low. Here "__n >> 32" picks r0 and moves it to __rem which is returned through r0 so no extra instruction needed.

Of course the function is inlined so r0 can be anything, or optimized away if__rem is not used.

Nicolas

Reviewed-by Tested-by
#16 lore raw
Quoted 55 lines · Nicolas Pitre
Quoted 39 lines · Ard Biesheuvel
Quoted 37 lines · Nicolas Pitre

Here's my version of the fix which should be correct. Warning: this is completely untested, but should in theory produce the same code on modern gcc.

arch/arm/include/asm/div64.h +3 -15
index 898e9c78a7..595e538f5b 100644
@@ -21,29 +21,20 @@
  * assembly implementation with completely non standard calling convention
  * for arguments and results (beware).
  */
-
-#ifdef __ARMEB__
-#define __xh "r0"
-#define __xl "r1"
-#else
-#define __xl "r0"
-#define __xh "r1"
-#endif
-
 static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 {
        register unsigned int __base      asm("r4") = base;
        register unsigned long long __n   asm("r0") = *n;
        register unsigned long long __res asm("r2");
-       register unsigned int __rem       asm(__xh);
-       asm(    __asmeq("%0", __xh)
+       unsigned int __rem;
+       asm(    __asmeq("%0", "r0")
                __asmeq("%1", "r2")
-               __asmeq("%2", "r0")
-               __asmeq("%3", "r4")
+               __asmeq("%2", "r4")
                "bl     __do_div64"
-               : "=r" (__rem), "=r" (__res)
-               : "r" (__n), "r" (__base)
Quoted 8 lines

arch/arm/include/asm/div64.h line 37

Quoted 4 lines
arch/arm/include/asm/div64.h +3 -0
+               : "+r" (__n), "=r" (__res)
+               : "r" (__base)
                : "ip", "lr", "cc");
+       __rem = __n >> 32;

This treats {r0, r1} as a {low, high} pair, regardless of endianness, and so it puts the value of r0 into r1. Doesn't that mean the shift should only be done on little endian?

Not quite. r0-r1 = low-high is for little endian. Then "__n >> 32" is actually translated into "mov r0, r1" to move it into __rem and returned through r0.

Quoted 7 lines

On big endial it is r0-r1 = high-low. Here "__n >> 32" picks r0 and moves it to __rem which is returned through r0 so no extra instruction needed.

Of course the function is inlined so r0 can be anything, or optimized away if__rem is not used.

OK, you're right. I got myself confused there, but a quick test with GCC confirms your explanation:

$ arm-linux-gnueabihf-gcc -mbig-endian -O2 -S -o - \
   -xc - <<<"long f(long long l) { return l >> 32; }"

just produces

bx lr

whereas removing the -mbig-endian gives

mov r0, r1
bx lr

I tested the change and it builds and runs fine (although I am not sure how much coverage this code gets on an ordinary boot):