Initial Contribution
diff --git a/libc/kernel/common/asm-generic/4level-fixup.h b/libc/kernel/common/asm-generic/4level-fixup.h
new file mode 100644
index 0000000..91ae7f4
--- /dev/null
+++ b/libc/kernel/common/asm-generic/4level-fixup.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _4LEVEL_FIXUP_H
+#define _4LEVEL_FIXUP_H
+
+#define __ARCH_HAS_4LEVEL_HACK
+#define __PAGETABLE_PUD_FOLDED
+
+#define PUD_SIZE PGDIR_SIZE
+#define PUD_MASK PGDIR_MASK
+#define PTRS_PER_PUD 1
+
+#define pud_t pgd_t
+
+#define pmd_alloc(mm, pud, address)   ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))?   NULL: pmd_offset(pud, address))
+
+#define pud_alloc(mm, pgd, address) (pgd)
+#define pud_offset(pgd, start) (pgd)
+#define pud_none(pud) 0
+#define pud_bad(pud) 0
+#define pud_present(pud) 1
+#define pud_ERROR(pud) do { } while (0)
+#define pud_clear(pud) pgd_clear(pud)
+
+#undef pud_free_tlb
+#define pud_free_tlb(tlb, x) do { } while (0)
+#define pud_free(x) do { } while (0)
+#define __pud_free_tlb(tlb, x) do { } while (0)
+
+#undef pud_addr_end
+#define pud_addr_end(addr, end) (end)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/audit_dir_write.h b/libc/kernel/common/asm-generic/audit_dir_write.h
new file mode 100644
index 0000000..1327b59
--- /dev/null
+++ b/libc/kernel/common/asm-generic/audit_dir_write.h
@@ -0,0 +1,11 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
diff --git a/libc/kernel/common/asm-generic/bitops/__ffs.h b/libc/kernel/common/asm-generic/bitops/__ffs.h
new file mode 100644
index 0000000..3d135bd
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/__ffs.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS___FFS_H_
+#define _ASM_GENERIC_BITOPS___FFS_H_
+
+#include <asm/types.h>
+
+#if BITS_PER_LONG == 64
+#endif
+#endif
diff --git a/libc/kernel/common/asm-generic/bitops/atomic.h b/libc/kernel/common/asm-generic/bitops/atomic.h
new file mode 100644
index 0000000..5f53ba9
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/atomic.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_ATOMIC_H_
+#define _ASM_GENERIC_BITOPS_ATOMIC_H_
+
+#include <asm/types.h>
+
+#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+
+#define _atomic_spin_lock_irqsave(l,f) do { local_irq_save(f); } while (0)
+#define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/bitops/ffz.h b/libc/kernel/common/asm-generic/bitops/ffz.h
new file mode 100644
index 0000000..18da271
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/ffz.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FFZ_H_
+#define _ASM_GENERIC_BITOPS_FFZ_H_
+
+#define ffz(x) __ffs(~(x))
+
+#endif
diff --git a/libc/kernel/common/asm-generic/bitops/find.h b/libc/kernel/common/asm-generic/bitops/find.h
new file mode 100644
index 0000000..8361cfe
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/find.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FIND_H_
+#define _ASM_GENERIC_BITOPS_FIND_H_
+
+#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
+#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/bitops/fls.h b/libc/kernel/common/asm-generic/bitops/fls.h
new file mode 100644
index 0000000..8adbf31
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/fls.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FLS_H_
+#define _ASM_GENERIC_BITOPS_FLS_H_
+
+#endif
diff --git a/libc/kernel/common/asm-generic/bitops/fls64.h b/libc/kernel/common/asm-generic/bitops/fls64.h
new file mode 100644
index 0000000..af77098
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/fls64.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
+#define _ASM_GENERIC_BITOPS_FLS64_H_
+
+#include <asm/types.h>
+
+#endif
diff --git a/libc/kernel/common/asm-generic/bitops/le.h b/libc/kernel/common/asm-generic/bitops/le.h
new file mode 100644
index 0000000..97ca973
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/le.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_LE_H_
+#define _ASM_GENERIC_BITOPS_LE_H_
+
+#include <asm/types.h>
+#include <asm/byteorder.h>
+
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
+
+#ifdef __LITTLE_ENDIAN
+
+#define generic_test_le_bit(nr, addr) test_bit(nr, addr)
+#define generic___set_le_bit(nr, addr) __set_bit(nr, addr)
+#define generic___clear_le_bit(nr, addr) __clear_bit(nr, addr)
+
+#define generic_test_and_set_le_bit(nr, addr) test_and_set_bit(nr, addr)
+#define generic_test_and_clear_le_bit(nr, addr) test_and_clear_bit(nr, addr)
+
+#define generic___test_and_set_le_bit(nr, addr) __test_and_set_bit(nr, addr)
+#define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit(nr, addr)
+
+#define generic_find_next_zero_le_bit(addr, size, offset) find_next_zero_bit(addr, size, offset)
+
+#elif defined(__BIG_ENDIAN)
+
+#define generic_test_le_bit(nr, addr)   test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___set_le_bit(nr, addr)   __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___clear_le_bit(nr, addr)   __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#define generic_test_and_set_le_bit(nr, addr)   test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic_test_and_clear_le_bit(nr, addr)   test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#define generic___test_and_set_le_bit(nr, addr)   __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___test_and_clear_le_bit(nr, addr)   __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+
+#define generic_find_first_zero_le_bit(addr, size)   generic_find_next_zero_le_bit((addr), (size), 0)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/bitops/non-atomic.h b/libc/kernel/common/asm-generic/bitops/non-atomic.h
new file mode 100644
index 0000000..727f736
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bitops/non-atomic.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
+#define _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
+
+#include <asm/types.h>
+
+#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/bug.h b/libc/kernel/common/asm-generic/bug.h
new file mode 100644
index 0000000..d91a135
--- /dev/null
+++ b/libc/kernel/common/asm-generic/bug.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BUG_H
+#define _ASM_GENERIC_BUG_H
+
+#include <linux/compiler.h>
+
+#ifndef HAVE_ARCH_BUG
+#define BUG()
+#endif
+
+#ifndef HAVE_ARCH_BUG_ON
+#define BUG_ON(condition) do { if (condition) ; } while(0)
+#endif
+
+#ifndef HAVE_ARCH_WARN_ON
+#define WARN_ON(condition) do { if (condition) ; } while(0)
+#endif
+
+#define WARN_ON_ONCE(condition)  ({   static int __warn_once = 1;   int __ret = 0;     if (unlikely((condition) && __warn_once)) {   __warn_once = 0;   WARN_ON(1);   __ret = 1;   }   __ret;  })
+
+#define WARN_ON_SMP(x) do { } while (0)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/cputime.h b/libc/kernel/common/asm-generic/cputime.h
new file mode 100644
index 0000000..0486b87
--- /dev/null
+++ b/libc/kernel/common/asm-generic/cputime.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_CPUTIME_H
+#define _ASM_GENERIC_CPUTIME_H
+
+#include <linux/time.h>
+#include <linux/jiffies.h>
+
+typedef unsigned long cputime_t;
+
+#define cputime_zero (0UL)
+#define cputime_max ((~0UL >> 1) - 1)
+#define cputime_add(__a, __b) ((__a) + (__b))
+#define cputime_sub(__a, __b) ((__a) - (__b))
+#define cputime_div(__a, __n) ((__a) / (__n))
+#define cputime_halve(__a) ((__a) >> 1)
+#define cputime_eq(__a, __b) ((__a) == (__b))
+#define cputime_gt(__a, __b) ((__a) > (__b))
+#define cputime_ge(__a, __b) ((__a) >= (__b))
+#define cputime_lt(__a, __b) ((__a) < (__b))
+#define cputime_le(__a, __b) ((__a) <= (__b))
+#define cputime_to_jiffies(__ct) (__ct)
+#define jiffies_to_cputime(__hz) (__hz)
+
+typedef u64 cputime64_t;
+
+#define cputime64_zero (0ULL)
+#define cputime64_add(__a, __b) ((__a) + (__b))
+#define cputime64_sub(__a, __b) ((__a) - (__b))
+#define cputime64_to_jiffies64(__ct) (__ct)
+#define jiffies64_to_cputime64(__jif) (__jif)
+#define cputime_to_cputime64(__ct) ((u64) __ct)
+
+#define cputime_to_msecs(__ct) jiffies_to_msecs(__ct)
+#define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs)
+
+#define cputime_to_secs(jif) ((jif) / HZ)
+#define secs_to_cputime(sec) ((sec) * HZ)
+
+#define timespec_to_cputime(__val) timespec_to_jiffies(__val)
+#define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val)
+
+#define timeval_to_cputime(__val) timeval_to_jiffies(__val)
+#define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val)
+
+#define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct)
+#define clock_t_to_cputime(__x) clock_t_to_jiffies(__x)
+
+#define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/emergency-restart.h b/libc/kernel/common/asm-generic/emergency-restart.h
new file mode 100644
index 0000000..619c682
--- /dev/null
+++ b/libc/kernel/common/asm-generic/emergency-restart.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
+#define _ASM_GENERIC_EMERGENCY_RESTART_H
+
+#endif
diff --git a/libc/kernel/common/asm-generic/errno-base.h b/libc/kernel/common/asm-generic/errno-base.h
new file mode 100644
index 0000000..2fb4a33
--- /dev/null
+++ b/libc/kernel/common/asm-generic/errno-base.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_ERRNO_BASE_H
+#define _ASM_GENERIC_ERRNO_BASE_H
+
+#define EPERM 1  
+#define ENOENT 2  
+#define ESRCH 3  
+#define EINTR 4  
+#define EIO 5  
+#define ENXIO 6  
+#define E2BIG 7  
+#define ENOEXEC 8  
+#define EBADF 9  
+#define ECHILD 10  
+#define EAGAIN 11  
+#define ENOMEM 12  
+#define EACCES 13  
+#define EFAULT 14  
+#define ENOTBLK 15  
+#define EBUSY 16  
+#define EEXIST 17  
+#define EXDEV 18  
+#define ENODEV 19  
+#define ENOTDIR 20  
+#define EISDIR 21  
+#define EINVAL 22  
+#define ENFILE 23  
+#define EMFILE 24  
+#define ENOTTY 25  
+#define ETXTBSY 26  
+#define EFBIG 27  
+#define ENOSPC 28  
+#define ESPIPE 29  
+#define EROFS 30  
+#define EMLINK 31  
+#define EPIPE 32  
+#define EDOM 33  
+#define ERANGE 34  
+
+#endif
diff --git a/libc/kernel/common/asm-generic/errno.h b/libc/kernel/common/asm-generic/errno.h
new file mode 100644
index 0000000..11dd00f
--- /dev/null
+++ b/libc/kernel/common/asm-generic/errno.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_ERRNO_H
+#define _ASM_GENERIC_ERRNO_H
+
+#include <asm-generic/errno-base.h>
+
+#define EDEADLK 35  
+#define ENAMETOOLONG 36  
+#define ENOLCK 37  
+#define ENOSYS 38  
+#define ENOTEMPTY 39  
+#define ELOOP 40  
+#define EWOULDBLOCK EAGAIN  
+#define ENOMSG 42  
+#define EIDRM 43  
+#define ECHRNG 44  
+#define EL2NSYNC 45  
+#define EL3HLT 46  
+#define EL3RST 47  
+#define ELNRNG 48  
+#define EUNATCH 49  
+#define ENOCSI 50  
+#define EL2HLT 51  
+#define EBADE 52  
+#define EBADR 53  
+#define EXFULL 54  
+#define ENOANO 55  
+#define EBADRQC 56  
+#define EBADSLT 57  
+
+#define EDEADLOCK EDEADLK
+
+#define EBFONT 59  
+#define ENOSTR 60  
+#define ENODATA 61  
+#define ETIME 62  
+#define ENOSR 63  
+#define ENONET 64  
+#define ENOPKG 65  
+#define EREMOTE 66  
+#define ENOLINK 67  
+#define EADV 68  
+#define ESRMNT 69  
+#define ECOMM 70  
+#define EPROTO 71  
+#define EMULTIHOP 72  
+#define EDOTDOT 73  
+#define EBADMSG 74  
+#define EOVERFLOW 75  
+#define ENOTUNIQ 76  
+#define EBADFD 77  
+#define EREMCHG 78  
+#define ELIBACC 79  
+#define ELIBBAD 80  
+#define ELIBSCN 81  
+#define ELIBMAX 82  
+#define ELIBEXEC 83  
+#define EILSEQ 84  
+#define ERESTART 85  
+#define ESTRPIPE 86  
+#define EUSERS 87  
+#define ENOTSOCK 88  
+#define EDESTADDRREQ 89  
+#define EMSGSIZE 90  
+#define EPROTOTYPE 91  
+#define ENOPROTOOPT 92  
+#define EPROTONOSUPPORT 93  
+#define ESOCKTNOSUPPORT 94  
+#define EOPNOTSUPP 95  
+#define EPFNOSUPPORT 96  
+#define EAFNOSUPPORT 97  
+#define EADDRINUSE 98  
+#define EADDRNOTAVAIL 99  
+#define ENETDOWN 100  
+#define ENETUNREACH 101  
+#define ENETRESET 102  
+#define ECONNABORTED 103  
+#define ECONNRESET 104  
+#define ENOBUFS 105  
+#define EISCONN 106  
+#define ENOTCONN 107  
+#define ESHUTDOWN 108  
+#define ETOOMANYREFS 109  
+#define ETIMEDOUT 110  
+#define ECONNREFUSED 111  
+#define EHOSTDOWN 112  
+#define EHOSTUNREACH 113  
+#define EALREADY 114  
+#define EINPROGRESS 115  
+#define ESTALE 116  
+#define EUCLEAN 117  
+#define ENOTNAM 118  
+#define ENAVAIL 119  
+#define EISNAM 120  
+#define EREMOTEIO 121  
+#define EDQUOT 122  
+
+#define ENOMEDIUM 123  
+#define EMEDIUMTYPE 124  
+#define ECANCELED 125  
+#define ENOKEY 126  
+#define EKEYEXPIRED 127  
+#define EKEYREVOKED 128  
+#define EKEYREJECTED 129  
+
+#define EOWNERDEAD 130  
+#define ENOTRECOVERABLE 131  
+
+#endif
diff --git a/libc/kernel/common/asm-generic/fcntl.h b/libc/kernel/common/asm-generic/fcntl.h
new file mode 100644
index 0000000..a53b536
--- /dev/null
+++ b/libc/kernel/common/asm-generic/fcntl.h
@@ -0,0 +1,148 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_FCNTL_H
+#define _ASM_GENERIC_FCNTL_H
+
+#include <linux/types.h>
+
+#define O_ACCMODE 00000003
+#define O_RDONLY 00000000
+#define O_WRONLY 00000001
+#define O_RDWR 00000002
+#ifndef O_CREAT
+#define O_CREAT 00000100  
+#endif
+#ifndef O_EXCL
+#define O_EXCL 00000200  
+#endif
+#ifndef O_NOCTTY
+#define O_NOCTTY 00000400  
+#endif
+#ifndef O_TRUNC
+#define O_TRUNC 00001000  
+#endif
+#ifndef O_APPEND
+#define O_APPEND 00002000
+#endif
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 00004000
+#endif
+#ifndef O_SYNC
+#define O_SYNC 00010000
+#endif
+#ifndef FASYNC
+#define FASYNC 00020000  
+#endif
+#ifndef O_DIRECT
+#define O_DIRECT 00040000  
+#endif
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 00100000
+#endif
+#ifndef O_DIRECTORY
+#define O_DIRECTORY 00200000  
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 00400000  
+#endif
+#ifndef O_NOATIME
+#define O_NOATIME 01000000
+#endif
+#ifndef O_NDELAY
+#define O_NDELAY O_NONBLOCK
+#endif
+
+#define F_DUPFD 0  
+#define F_GETFD 1  
+#define F_SETFD 2  
+#define F_GETFL 3  
+#define F_SETFL 4  
+#ifndef F_GETLK
+#define F_GETLK 5
+#define F_SETLK 6
+#define F_SETLKW 7
+#endif
+#ifndef F_SETOWN
+#define F_SETOWN 8  
+#define F_GETOWN 9  
+#endif
+#ifndef F_SETSIG
+#define F_SETSIG 10  
+#define F_GETSIG 11  
+#endif
+
+#define FD_CLOEXEC 1  
+
+#ifndef F_RDLCK
+#define F_RDLCK 0
+#define F_WRLCK 1
+#define F_UNLCK 2
+#endif
+
+#ifndef F_EXLCK
+#define F_EXLCK 4  
+#define F_SHLCK 8  
+#endif
+
+#ifndef F_INPROGRESS
+#define F_INPROGRESS 16
+#endif
+
+#define LOCK_SH 1  
+#define LOCK_EX 2  
+#define LOCK_NB 4  
+#define LOCK_UN 8  
+
+#define LOCK_MAND 32  
+#define LOCK_READ 64  
+#define LOCK_WRITE 128  
+#define LOCK_RW 192  
+
+#define F_LINUX_SPECIFIC_BASE 1024
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK
+#ifndef __ARCH_FLOCK_PAD
+#define __ARCH_FLOCK_PAD
+#endif
+
+struct flock {
+ short l_type;
+ short l_whence;
+ off_t l_start;
+ off_t l_len;
+ pid_t l_pid;
+ __ARCH_FLOCK_PAD
+};
+#endif
+
+#ifndef F_GETLK64
+#define F_GETLK64 12  
+#define F_SETLK64 13
+#define F_SETLKW64 14
+#endif
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK64
+#ifndef __ARCH_FLOCK64_PAD
+#define __ARCH_FLOCK64_PAD
+#endif
+
+struct flock64 {
+ short l_type;
+ short l_whence;
+ loff_t l_start;
+ loff_t l_len;
+ pid_t l_pid;
+ __ARCH_FLOCK64_PAD
+};
+#endif
+
+#endif
diff --git a/libc/kernel/common/asm-generic/futex.h b/libc/kernel/common/asm-generic/futex.h
new file mode 100644
index 0000000..05d3afe
--- /dev/null
+++ b/libc/kernel/common/asm-generic/futex.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_FUTEX_H
+#define _ASM_GENERIC_FUTEX_H
+
+#endif
diff --git a/libc/kernel/common/asm-generic/ioctl.h b/libc/kernel/common/asm-generic/ioctl.h
new file mode 100644
index 0000000..cba2b8e
--- /dev/null
+++ b/libc/kernel/common/asm-generic/ioctl.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_IOCTL_H
+#define _ASM_GENERIC_IOCTL_H
+
+#define _IOC_NRBITS 8
+#define _IOC_TYPEBITS 8
+#define _IOC_SIZEBITS 14
+#define _IOC_DIRBITS 2
+
+#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
+#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
+#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
+#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
+
+#define _IOC_NRSHIFT 0
+#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
+#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
+#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
+
+#define _IOC_NONE 0U
+#define _IOC_WRITE 1U
+#define _IOC_READ 2U
+
+#define _IOC(dir,type,nr,size)   (((dir) << _IOC_DIRSHIFT) |   ((type) << _IOC_TYPESHIFT) |   ((nr) << _IOC_NRSHIFT) |   ((size) << _IOC_SIZESHIFT))
+
+extern unsigned int __invalid_size_argument_for_IOC;
+#define _IOC_TYPECHECK(t)   ((sizeof(t) == sizeof(t[1]) &&   sizeof(t) < (1 << _IOC_SIZEBITS)) ?   sizeof(t) : __invalid_size_argument_for_IOC)
+
+#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
+#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
+#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
+#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
+
+#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
+#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
+#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
+#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
+
+#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
+#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
+#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
+#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
+#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/ipc.h b/libc/kernel/common/asm-generic/ipc.h
new file mode 100644
index 0000000..57657a7
--- /dev/null
+++ b/libc/kernel/common/asm-generic/ipc.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_IPC_H
+#define _ASM_GENERIC_IPC_H
+
+struct ipc_kludge {
+ struct msgbuf __user *msgp;
+ long msgtyp;
+};
+
+#define SEMOP 1
+#define SEMGET 2
+#define SEMCTL 3
+#define SEMTIMEDOP 4
+#define MSGSND 11
+#define MSGRCV 12
+#define MSGGET 13
+#define MSGCTL 14
+#define SHMAT 21
+#define SHMDT 22
+#define SHMGET 23
+#define SHMCTL 24
+
+#define DIPC 25
+
+#define IPCCALL(version,op) ((version)<<16 | (op))
+
+#endif
diff --git a/libc/kernel/common/asm-generic/local.h b/libc/kernel/common/asm-generic/local.h
new file mode 100644
index 0000000..cae0d54
--- /dev/null
+++ b/libc/kernel/common/asm-generic/local.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_LOCAL_H
+#define _ASM_GENERIC_LOCAL_H
+
+#include <linux/percpu.h>
+#include <linux/hardirq.h>
+#include <asm/atomic.h>
+#include <asm/types.h>
+
+typedef struct
+{
+ atomic_long_t a;
+} local_t;
+
+#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
+
+#define local_read(l) atomic_long_read(&(l)->a)
+#define local_set(l,i) atomic_long_set((&(l)->a),(i))
+#define local_inc(l) atomic_long_inc(&(l)->a)
+#define local_dec(l) atomic_long_dec(&(l)->a)
+#define local_add(i,l) atomic_long_add((i),(&(l)->a))
+#define local_sub(i,l) atomic_long_sub((i),(&(l)->a))
+
+#define __local_inc(l) local_set((l), local_read(l) + 1)
+#define __local_dec(l) local_set((l), local_read(l) - 1)
+#define __local_add(i,l) local_set((l), local_read(l) + (i))
+#define __local_sub(i,l) local_set((l), local_read(l) - (i))
+
+#define cpu_local_read(v) local_read(&__get_cpu_var(v))
+#define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i))
+#define cpu_local_inc(v) local_inc(&__get_cpu_var(v))
+#define cpu_local_dec(v) local_dec(&__get_cpu_var(v))
+#define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v))
+#define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v))
+
+#define __cpu_local_inc(v) __local_inc(&__get_cpu_var(v))
+#define __cpu_local_dec(v) __local_dec(&__get_cpu_var(v))
+#define __cpu_local_add(i, v) __local_add((i), &__get_cpu_var(v))
+#define __cpu_local_sub(i, v) __local_sub((i), &__get_cpu_var(v))
+
+#endif
diff --git a/libc/kernel/common/asm-generic/memory_model.h b/libc/kernel/common/asm-generic/memory_model.h
new file mode 100644
index 0000000..fa7602e
--- /dev/null
+++ b/libc/kernel/common/asm-generic/memory_model.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_MEMORY_MODEL_H
+#define __ASM_MEMORY_MODEL_H
+
+#endif
diff --git a/libc/kernel/common/asm-generic/mman.h b/libc/kernel/common/asm-generic/mman.h
new file mode 100644
index 0000000..98d2783
--- /dev/null
+++ b/libc/kernel/common/asm-generic/mman.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_MMAN_H
+#define _ASM_GENERIC_MMAN_H
+
+#define PROT_READ 0x1  
+#define PROT_WRITE 0x2  
+#define PROT_EXEC 0x4  
+#define PROT_SEM 0x8  
+#define PROT_NONE 0x0  
+#define PROT_GROWSDOWN 0x01000000  
+#define PROT_GROWSUP 0x02000000  
+
+#define MAP_SHARED 0x01  
+#define MAP_PRIVATE 0x02  
+#define MAP_TYPE 0x0f  
+#define MAP_FIXED 0x10  
+#define MAP_ANONYMOUS 0x20  
+
+#define MS_ASYNC 1  
+#define MS_INVALIDATE 2  
+#define MS_SYNC 4  
+
+#define MADV_NORMAL 0  
+#define MADV_RANDOM 1  
+#define MADV_SEQUENTIAL 2  
+#define MADV_WILLNEED 3  
+#define MADV_DONTNEED 4  
+
+#define MADV_REMOVE 9  
+#define MADV_DONTFORK 10  
+#define MADV_DOFORK 11  
+
+#define MAP_ANON MAP_ANONYMOUS
+#define MAP_FILE 0
+
+#endif
diff --git a/libc/kernel/common/asm-generic/mutex-xchg.h b/libc/kernel/common/asm-generic/mutex-xchg.h
new file mode 100644
index 0000000..63a557e
--- /dev/null
+++ b/libc/kernel/common/asm-generic/mutex-xchg.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_MUTEX_XCHG_H
+#define _ASM_GENERIC_MUTEX_XCHG_H
+
+#define __mutex_slowpath_needs_to_unlock() 0
+#endif
diff --git a/libc/kernel/common/asm-generic/percpu.h b/libc/kernel/common/asm-generic/percpu.h
new file mode 100644
index 0000000..e498300
--- /dev/null
+++ b/libc/kernel/common/asm-generic/percpu.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_PERCPU_H_
+#define _ASM_GENERIC_PERCPU_H_
+#include <linux/compiler.h>
+
+#define __GENERIC_PER_CPU
+
+#define DEFINE_PER_CPU(type, name)   __typeof__(type) per_cpu__##name
+
+#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
+#define __get_cpu_var(var) per_cpu__##var
+#define __raw_get_cpu_var(var) per_cpu__##var
+
+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
+
+#endif
diff --git a/libc/kernel/common/asm-generic/pgtable-nopud.h b/libc/kernel/common/asm-generic/pgtable-nopud.h
new file mode 100644
index 0000000..585f816
--- /dev/null
+++ b/libc/kernel/common/asm-generic/pgtable-nopud.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _PGTABLE_NOPUD_H
+#define _PGTABLE_NOPUD_H
+
+#ifndef __ASSEMBLY__
+
+#define __PAGETABLE_PUD_FOLDED
+
+typedef struct { pgd_t pgd; } pud_t;
+
+#define PUD_SHIFT PGDIR_SHIFT
+#define PTRS_PER_PUD 1
+#define PUD_SIZE (1UL << PUD_SHIFT)
+#define PUD_MASK (~(PUD_SIZE-1))
+
+#define pud_ERROR(pud) (pgd_ERROR((pud).pgd))
+#define pgd_populate(mm, pgd, pud) do { } while (0)
+#define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval })
+#define pud_val(x) (pgd_val((x).pgd))
+#define __pud(x) ((pud_t) { __pgd(x) } )
+#define pgd_page(pgd) (pud_page((pud_t){ pgd }))
+#define pgd_page_kernel(pgd) (pud_page_kernel((pud_t){ pgd }))
+#define pud_alloc_one(mm, address) NULL
+#define pud_free(x) do { } while (0)
+#define __pud_free_tlb(tlb, x) do { } while (0)
+#undef pud_addr_end
+#define pud_addr_end(addr, end) (end)
+#endif
+#endif
diff --git a/libc/kernel/common/asm-generic/pgtable.h b/libc/kernel/common/asm-generic/pgtable.h
new file mode 100644
index 0000000..a21cdba
--- /dev/null
+++ b/libc/kernel/common/asm-generic/pgtable.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_PGTABLE_H
+#define _ASM_GENERIC_PGTABLE_H
+
+#ifndef __HAVE_ARCH_PTEP_ESTABLISH
+
+#ifndef __HAVE_ARCH_SET_PTE_ATOMIC
+#define ptep_establish(__vma, __address, __ptep, __entry)  do {   set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry);   flush_tlb_page(__vma, __address);  } while (0)
+#else
+#define ptep_establish(__vma, __address, __ptep, __entry)  do {   set_pte_atomic(__ptep, __entry);   flush_tlb_page(__vma, __address);  } while (0)
+#endif
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
+
+#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty)  do {   set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry);   flush_tlb_page(__vma, __address);  } while (0)
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define ptep_test_and_clear_young(__vma, __address, __ptep)  ({   pte_t __pte = *(__ptep);   int r = 1;   if (!pte_young(__pte))   r = 0;   else   set_pte_at((__vma)->vm_mm, (__address),   (__ptep), pte_mkold(__pte));   r;  })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
+#define ptep_clear_flush_young(__vma, __address, __ptep)  ({   int __young;   __young = ptep_test_and_clear_young(__vma, __address, __ptep);   if (__young)   flush_tlb_page(__vma, __address);   __young;  })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
+#define ptep_test_and_clear_dirty(__vma, __address, __ptep)  ({   pte_t __pte = *__ptep;   int r = 1;   if (!pte_dirty(__pte))   r = 0;   else   set_pte_at((__vma)->vm_mm, (__address), (__ptep),   pte_mkclean(__pte));   r;  })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH
+#define ptep_clear_flush_dirty(__vma, __address, __ptep)  ({   int __dirty;   __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep);   if (__dirty)   flush_tlb_page(__vma, __address);   __dirty;  })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define ptep_get_and_clear(__mm, __address, __ptep)  ({   pte_t __pte = *(__ptep);   pte_clear((__mm), (__address), (__ptep));   __pte;  })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
+#define ptep_get_and_clear_full(__mm, __address, __ptep, __full)  ({   pte_t __pte;   __pte = ptep_get_and_clear((__mm), (__address), (__ptep));   __pte;  })
+#endif
+
+#ifndef __HAVE_ARCH_PTE_CLEAR_FULL
+#define pte_clear_full(__mm, __address, __ptep, __full)  do {   pte_clear((__mm), (__address), (__ptep));  } while (0)
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH
+#define ptep_clear_flush(__vma, __address, __ptep)  ({   pte_t __pte;   __pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep);   flush_tlb_page(__vma, __address);   __pte;  })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
+struct mm_struct;
+#endif
+#ifndef __HAVE_ARCH_PTE_SAME
+#define pte_same(A,B) (pte_val(A) == pte_val(B))
+#endif
+#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY
+#define page_test_and_clear_dirty(page) (0)
+#define pte_maybe_dirty(pte) pte_dirty(pte)
+#else
+#define pte_maybe_dirty(pte) (1)
+#endif
+#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_YOUNG
+#define page_test_and_clear_young(page) (0)
+#endif
+#ifndef __HAVE_ARCH_PGD_OFFSET_GATE
+#define pgd_offset_gate(mm, addr) pgd_offset(mm, addr)
+#endif
+#ifndef __HAVE_ARCH_LAZY_MMU_PROT_UPDATE
+#define lazy_mmu_prot_update(pte) do { } while (0)
+#endif
+#ifndef __HAVE_ARCH_MOVE_PTE
+#define move_pte(pte, prot, old_addr, new_addr) (pte)
+#endif
+#define pgd_addr_end(addr, end)  ({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK;   (__boundary - 1 < (end) - 1)? __boundary: (end);  })
+#ifndef pud_addr_end
+#define pud_addr_end(addr, end)  ({ unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK;   (__boundary - 1 < (end) - 1)? __boundary: (end);  })
+#endif
+#ifndef pmd_addr_end
+#define pmd_addr_end(addr, end)  ({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK;   (__boundary - 1 < (end) - 1)? __boundary: (end);  })
+#endif
+#ifndef __ASSEMBLY__
+
+#endif
+#endif
diff --git a/libc/kernel/common/asm-generic/resource.h b/libc/kernel/common/asm-generic/resource.h
new file mode 100644
index 0000000..a7f7dec
--- /dev/null
+++ b/libc/kernel/common/asm-generic/resource.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_RESOURCE_H
+#define _ASM_GENERIC_RESOURCE_H
+
+#define RLIMIT_CPU 0  
+#define RLIMIT_FSIZE 1  
+#define RLIMIT_DATA 2  
+#define RLIMIT_STACK 3  
+#define RLIMIT_CORE 4  
+
+#ifndef RLIMIT_RSS
+#define RLIMIT_RSS 5  
+#endif
+
+#ifndef RLIMIT_NPROC
+#define RLIMIT_NPROC 6  
+#endif
+
+#ifndef RLIMIT_NOFILE
+#define RLIMIT_NOFILE 7  
+#endif
+
+#ifndef RLIMIT_MEMLOCK
+#define RLIMIT_MEMLOCK 8  
+#endif
+
+#ifndef RLIMIT_AS
+#define RLIMIT_AS 9  
+#endif
+
+#define RLIMIT_LOCKS 10  
+#define RLIMIT_SIGPENDING 11  
+#define RLIMIT_MSGQUEUE 12  
+#define RLIMIT_NICE 13  
+#define RLIMIT_RTPRIO 14  
+
+#define RLIM_NLIMITS 15
+
+#ifndef RLIM_INFINITY
+#define RLIM_INFINITY (~0UL)
+#endif
+
+#ifndef _STK_LIM_MAX
+#define _STK_LIM_MAX RLIM_INFINITY
+#endif
+
+#endif
diff --git a/libc/kernel/common/asm-generic/sections.h b/libc/kernel/common/asm-generic/sections.h
new file mode 100644
index 0000000..e9eaa46
--- /dev/null
+++ b/libc/kernel/common/asm-generic/sections.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SECTIONS_H_
+#define _ASM_GENERIC_SECTIONS_H_
+
+#endif
diff --git a/libc/kernel/common/asm-generic/siginfo.h b/libc/kernel/common/asm-generic/siginfo.h
new file mode 100644
index 0000000..d6743a7
--- /dev/null
+++ b/libc/kernel/common/asm-generic/siginfo.h
@@ -0,0 +1,213 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SIGINFO_H
+#define _ASM_GENERIC_SIGINFO_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+typedef union sigval {
+ int sival_int;
+ void __user *sival_ptr;
+} sigval_t;
+
+#ifndef __ARCH_SI_PREAMBLE_SIZE
+#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
+#endif
+
+#define SI_MAX_SIZE 128
+#ifndef SI_PAD_SIZE
+#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
+#endif
+
+#ifndef __ARCH_SI_UID_T
+#define __ARCH_SI_UID_T uid_t
+#endif
+
+#ifndef __ARCH_SI_BAND_T
+#define __ARCH_SI_BAND_T long
+#endif
+
+#ifndef HAVE_ARCH_SIGINFO_T
+
+typedef struct siginfo {
+ int si_signo;
+ int si_errno;
+ int si_code;
+
+ union {
+ int _pad[SI_PAD_SIZE];
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ } _kill;
+
+ struct {
+ timer_t _tid;
+ int _overrun;
+ char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
+ sigval_t _sigval;
+ int _sys_private;
+ } _timer;
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ sigval_t _sigval;
+ } _rt;
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ int _status;
+ clock_t _utime;
+ clock_t _stime;
+ } _sigchld;
+
+ struct {
+ void __user *_addr;
+#ifdef __ARCH_SI_TRAPNO
+ int _trapno;
+#endif
+ } _sigfault;
+
+ struct {
+ __ARCH_SI_BAND_T _band;
+ int _fd;
+ } _sigpoll;
+ } _sifields;
+} siginfo_t;
+
+#endif
+
+#define si_pid _sifields._kill._pid
+#define si_uid _sifields._kill._uid
+#define si_tid _sifields._timer._tid
+#define si_overrun _sifields._timer._overrun
+#define si_sys_private _sifields._timer._sys_private
+#define si_status _sifields._sigchld._status
+#define si_utime _sifields._sigchld._utime
+#define si_stime _sifields._sigchld._stime
+#define si_value _sifields._rt._sigval
+#define si_int _sifields._rt._sigval.sival_int
+#define si_ptr _sifields._rt._sigval.sival_ptr
+#define si_addr _sifields._sigfault._addr
+#ifdef __ARCH_SI_TRAPNO
+#define si_trapno _sifields._sigfault._trapno
+#endif
+#define si_band _sifields._sigpoll._band
+#define si_fd _sifields._sigpoll._fd
+
+#define __SI_KILL 0
+#define __SI_TIMER 0
+#define __SI_POLL 0
+#define __SI_FAULT 0
+#define __SI_CHLD 0
+#define __SI_RT 0
+#define __SI_MESGQ 0
+#define __SI_CODE(T,N) (N)
+
+#define SI_USER 0  
+#define SI_KERNEL 0x80  
+#define SI_QUEUE -1  
+#define SI_TIMER __SI_CODE(__SI_TIMER,-2)  
+#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3)  
+#define SI_ASYNCIO -4  
+#define SI_SIGIO -5  
+#define SI_TKILL -6  
+#define SI_DETHREAD -7  
+
+#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
+#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
+
+#define ILL_ILLOPC (__SI_FAULT|1)  
+#define ILL_ILLOPN (__SI_FAULT|2)  
+#define ILL_ILLADR (__SI_FAULT|3)  
+#define ILL_ILLTRP (__SI_FAULT|4)  
+#define ILL_PRVOPC (__SI_FAULT|5)  
+#define ILL_PRVREG (__SI_FAULT|6)  
+#define ILL_COPROC (__SI_FAULT|7)  
+#define ILL_BADSTK (__SI_FAULT|8)  
+#define NSIGILL 8
+
+#define FPE_INTDIV (__SI_FAULT|1)  
+#define FPE_INTOVF (__SI_FAULT|2)  
+#define FPE_FLTDIV (__SI_FAULT|3)  
+#define FPE_FLTOVF (__SI_FAULT|4)  
+#define FPE_FLTUND (__SI_FAULT|5)  
+#define FPE_FLTRES (__SI_FAULT|6)  
+#define FPE_FLTINV (__SI_FAULT|7)  
+#define FPE_FLTSUB (__SI_FAULT|8)  
+#define NSIGFPE 8
+
+#define SEGV_MAPERR (__SI_FAULT|1)  
+#define SEGV_ACCERR (__SI_FAULT|2)  
+#define NSIGSEGV 2
+
+#define BUS_ADRALN (__SI_FAULT|1)  
+#define BUS_ADRERR (__SI_FAULT|2)  
+#define BUS_OBJERR (__SI_FAULT|3)  
+#define NSIGBUS 3
+
+#define TRAP_BRKPT (__SI_FAULT|1)  
+#define TRAP_TRACE (__SI_FAULT|2)  
+#define NSIGTRAP 2
+
+#define CLD_EXITED (__SI_CHLD|1)  
+#define CLD_KILLED (__SI_CHLD|2)  
+#define CLD_DUMPED (__SI_CHLD|3)  
+#define CLD_TRAPPED (__SI_CHLD|4)  
+#define CLD_STOPPED (__SI_CHLD|5)  
+#define CLD_CONTINUED (__SI_CHLD|6)  
+#define NSIGCHLD 6
+
+#define POLL_IN (__SI_POLL|1)  
+#define POLL_OUT (__SI_POLL|2)  
+#define POLL_MSG (__SI_POLL|3)  
+#define POLL_ERR (__SI_POLL|4)  
+#define POLL_PRI (__SI_POLL|5)  
+#define POLL_HUP (__SI_POLL|6)  
+#define NSIGPOLL 6
+
+#define SIGEV_SIGNAL 0  
+#define SIGEV_NONE 1  
+#define SIGEV_THREAD 2  
+#define SIGEV_THREAD_ID 4  
+
+#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
+#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
+#endif
+
+#define SIGEV_MAX_SIZE 64
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE)   / sizeof(int))
+
+typedef struct sigevent {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+ union {
+ int _pad[SIGEV_PAD_SIZE];
+ int _tid;
+
+ struct {
+ void (*_function)(sigval_t);
+ void *_attribute;
+ } _sigev_thread;
+ } _sigev_un;
+} sigevent_t;
+
+#define sigev_notify_function _sigev_un._sigev_thread._function
+#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+#define sigev_notify_thread_id _sigev_un._tid
+
+#endif
diff --git a/libc/kernel/common/asm-generic/signal.h b/libc/kernel/common/asm-generic/signal.h
new file mode 100644
index 0000000..226d99c
--- /dev/null
+++ b/libc/kernel/common/asm-generic/signal.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_GENERIC_SIGNAL_H
+#define __ASM_GENERIC_SIGNAL_H
+
+#include <linux/compiler.h>
+
+#ifndef SIG_BLOCK
+#define SIG_BLOCK 0  
+#endif
+#ifndef SIG_UNBLOCK
+#define SIG_UNBLOCK 1  
+#endif
+#ifndef SIG_SETMASK
+#define SIG_SETMASK 2  
+#endif
+
+#ifndef __ASSEMBLY__
+typedef void __signalfn_t(int);
+typedef __signalfn_t __user *__sighandler_t;
+
+typedef void __restorefn_t(void);
+typedef __restorefn_t __user *__sigrestore_t;
+
+#define SIG_DFL ((__force __sighandler_t)0)  
+#define SIG_IGN ((__force __sighandler_t)1)  
+#define SIG_ERR ((__force __sighandler_t)-1)  
+#endif
+
+#endif
diff --git a/libc/kernel/common/asm-generic/tlb.h b/libc/kernel/common/asm-generic/tlb.h
new file mode 100644
index 0000000..dc1e79f
--- /dev/null
+++ b/libc/kernel/common/asm-generic/tlb.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC__TLB_H
+#define _ASM_GENERIC__TLB_H
+
+#include <linux/swap.h>
+#include <asm/pgalloc.h>
+#include <asm/tlbflush.h>
+
+#define FREE_PTE_NR 1
+#define tlb_fast_mode(tlb) 1
+
+struct mmu_gather {
+ struct mm_struct *mm;
+ unsigned int nr;
+ unsigned int need_flush;
+ unsigned int fullmm;
+ struct page * pages[FREE_PTE_NR];
+};
+
+#define tlb_remove_tlb_entry(tlb, ptep, address)   do {   tlb->need_flush = 1;   __tlb_remove_tlb_entry(tlb, ptep, address);   } while (0)
+#define pte_free_tlb(tlb, ptep)   do {   tlb->need_flush = 1;   __pte_free_tlb(tlb, ptep);   } while (0)
+#ifndef __ARCH_HAS_4LEVEL_HACK
+#define pud_free_tlb(tlb, pudp)   do {   tlb->need_flush = 1;   __pud_free_tlb(tlb, pudp);   } while (0)
+#endif
+#define pmd_free_tlb(tlb, pmdp)   do {   tlb->need_flush = 1;   __pmd_free_tlb(tlb, pmdp);   } while (0)
+#define tlb_migrate_finish(mm) do {} while (0)
+#endif
diff --git a/libc/kernel/common/asm-generic/topology.h b/libc/kernel/common/asm-generic/topology.h
new file mode 100644
index 0000000..089b1f2
--- /dev/null
+++ b/libc/kernel/common/asm-generic/topology.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_TOPOLOGY_H
+#define _ASM_GENERIC_TOPOLOGY_H
+
+#ifndef cpu_to_node
+#define cpu_to_node(cpu) (0)
+#endif
+#ifndef parent_node
+#define parent_node(node) (0)
+#endif
+#ifndef node_to_cpumask
+#define node_to_cpumask(node) (cpu_online_map)
+#endif
+#ifndef node_to_first_cpu
+#define node_to_first_cpu(node) (0)
+#endif
+#ifndef pcibus_to_node
+#define pcibus_to_node(node) (-1)
+#endif
+
+#ifndef pcibus_to_cpumask
+#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ?   CPU_MASK_ALL :   node_to_cpumask(pcibus_to_node(bus))   )
+#endif
+
+#endif
diff --git a/libc/kernel/common/asm-generic/xor.h b/libc/kernel/common/asm-generic/xor.h
new file mode 100644
index 0000000..6b1e4e8
--- /dev/null
+++ b/libc/kernel/common/asm-generic/xor.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm/processor.h>
+
+#define XOR_TRY_TEMPLATES   do {   xor_speed(&xor_block_8regs);   xor_speed(&xor_block_8regs_p);   xor_speed(&xor_block_32regs);   xor_speed(&xor_block_32regs_p);   } while (0)