From fa59a10bcd7384fc2c3c583f525f775ea1bd0ff0 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Mon, 5 Aug 2019 12:58:49 -0700 Subject: [PATCH] Update to kernel headers v5.2.6. Also, fix a bug in update_all.py when the syscalls file does not change. Test: Builds and boots on a taimen. Change-Id: If85b00daef2c176f804a0861894f5bbca9c6d5df --- libc/kernel/tools/update_all.py | 4 +++- libc/kernel/uapi/asm-x86/asm/vmx.h | 1 - libc/kernel/uapi/linux/bpf.h | 1 + libc/kernel/uapi/linux/nilfs2_ondisk.h | 13 +++++++------ libc/kernel/uapi/linux/version.h | 2 +- libc/kernel/uapi/linux/videodev2.h | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/libc/kernel/tools/update_all.py b/libc/kernel/tools/update_all.py index 9d5b02dee..cef24dd4c 100755 --- a/libc/kernel/tools/update_all.py +++ b/libc/kernel/tools/update_all.py @@ -110,7 +110,9 @@ def GenerateGlibcSyscallsHeader(updater): content += ' #define SYS_%s %s\n' % (syscall, nr_name) content += '#endif\n' - updater.editFile('%s/include/bits/glibc-syscalls.h' % libc_root, content) + syscall_file = os.path.join(libc_root, 'include/bits/glibc-syscalls.h') + updater.readFile(syscall_file) + updater.editFile(syscall_file, content) try: diff --git a/libc/kernel/uapi/asm-x86/asm/vmx.h b/libc/kernel/uapi/asm-x86/asm/vmx.h index 0f7ede3b5..83365f8df 100644 --- a/libc/kernel/uapi/asm-x86/asm/vmx.h +++ b/libc/kernel/uapi/asm-x86/asm/vmx.h @@ -78,6 +78,5 @@ #define VMX_EXIT_REASONS { EXIT_REASON_EXCEPTION_NMI, "EXCEPTION_NMI" }, { EXIT_REASON_EXTERNAL_INTERRUPT, "EXTERNAL_INTERRUPT" }, { EXIT_REASON_TRIPLE_FAULT, "TRIPLE_FAULT" }, { EXIT_REASON_PENDING_INTERRUPT, "PENDING_INTERRUPT" }, { EXIT_REASON_NMI_WINDOW, "NMI_WINDOW" }, { EXIT_REASON_TASK_SWITCH, "TASK_SWITCH" }, { EXIT_REASON_CPUID, "CPUID" }, { EXIT_REASON_HLT, "HLT" }, { EXIT_REASON_INVD, "INVD" }, { EXIT_REASON_INVLPG, "INVLPG" }, { EXIT_REASON_RDPMC, "RDPMC" }, { EXIT_REASON_RDTSC, "RDTSC" }, { EXIT_REASON_VMCALL, "VMCALL" }, { EXIT_REASON_VMCLEAR, "VMCLEAR" }, { EXIT_REASON_VMLAUNCH, "VMLAUNCH" }, { EXIT_REASON_VMPTRLD, "VMPTRLD" }, { EXIT_REASON_VMPTRST, "VMPTRST" }, { EXIT_REASON_VMREAD, "VMREAD" }, { EXIT_REASON_VMRESUME, "VMRESUME" }, { EXIT_REASON_VMWRITE, "VMWRITE" }, { EXIT_REASON_VMOFF, "VMOFF" }, { EXIT_REASON_VMON, "VMON" }, { EXIT_REASON_CR_ACCESS, "CR_ACCESS" }, { EXIT_REASON_DR_ACCESS, "DR_ACCESS" }, { EXIT_REASON_IO_INSTRUCTION, "IO_INSTRUCTION" }, { EXIT_REASON_MSR_READ, "MSR_READ" }, { EXIT_REASON_MSR_WRITE, "MSR_WRITE" }, { EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, { EXIT_REASON_MSR_LOAD_FAIL, "MSR_LOAD_FAIL" }, { EXIT_REASON_MWAIT_INSTRUCTION, "MWAIT_INSTRUCTION" }, { EXIT_REASON_MONITOR_TRAP_FLAG, "MONITOR_TRAP_FLAG" }, { EXIT_REASON_MONITOR_INSTRUCTION, "MONITOR_INSTRUCTION" }, { EXIT_REASON_PAUSE_INSTRUCTION, "PAUSE_INSTRUCTION" }, { EXIT_REASON_MCE_DURING_VMENTRY, "MCE_DURING_VMENTRY" }, { EXIT_REASON_TPR_BELOW_THRESHOLD, "TPR_BELOW_THRESHOLD" }, { EXIT_REASON_APIC_ACCESS, "APIC_ACCESS" }, { EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, { EXIT_REASON_GDTR_IDTR, "GDTR_IDTR" }, { EXIT_REASON_LDTR_TR, "LDTR_TR" }, { EXIT_REASON_EPT_VIOLATION, "EPT_VIOLATION" }, { EXIT_REASON_EPT_MISCONFIG, "EPT_MISCONFIG" }, { EXIT_REASON_INVEPT, "INVEPT" }, { EXIT_REASON_RDTSCP, "RDTSCP" }, { EXIT_REASON_PREEMPTION_TIMER, "PREEMPTION_TIMER" }, { EXIT_REASON_INVVPID, "INVVPID" }, { EXIT_REASON_WBINVD, "WBINVD" }, { EXIT_REASON_XSETBV, "XSETBV" }, { EXIT_REASON_APIC_WRITE, "APIC_WRITE" }, { EXIT_REASON_RDRAND, "RDRAND" }, { EXIT_REASON_INVPCID, "INVPCID" }, { EXIT_REASON_VMFUNC, "VMFUNC" }, { EXIT_REASON_ENCLS, "ENCLS" }, { EXIT_REASON_RDSEED, "RDSEED" }, { EXIT_REASON_PML_FULL, "PML_FULL" }, { EXIT_REASON_XSAVES, "XSAVES" }, { EXIT_REASON_XRSTORS, "XRSTORS" } #define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1 #define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2 -#define VMX_ABORT_VMCS_CORRUPTED 3 #define VMX_ABORT_LOAD_HOST_MSR_FAIL 4 #endif diff --git a/libc/kernel/uapi/linux/bpf.h b/libc/kernel/uapi/linux/bpf.h index 11df9942b..3f0942167 100644 --- a/libc/kernel/uapi/linux/bpf.h +++ b/libc/kernel/uapi/linux/bpf.h @@ -548,6 +548,7 @@ struct bpf_prog_info { char name[BPF_OBJ_NAME_LEN]; __u32 ifindex; __u32 gpl_compatible : 1; + __u32 : 31; __u64 netns_dev; __u64 netns_ino; __u32 nr_jited_ksyms; diff --git a/libc/kernel/uapi/linux/nilfs2_ondisk.h b/libc/kernel/uapi/linux/nilfs2_ondisk.h index e9995a11a..a05e7b732 100644 --- a/libc/kernel/uapi/linux/nilfs2_ondisk.h +++ b/libc/kernel/uapi/linux/nilfs2_ondisk.h @@ -20,6 +20,7 @@ #define _LINUX_NILFS2_ONDISK_H #include #include +#include #define NILFS_INODE_BMAP_SIZE 7 struct nilfs_inode { __le64 i_blocks; @@ -248,11 +249,11 @@ enum { NILFS_CHECKPOINT_MINOR, }; #define NILFS_CHECKPOINT_FNS(flag,name) static inline void nilfs_checkpoint_set_ ##name(struct nilfs_checkpoint * cp) \ -{ cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) | (1UL << NILFS_CHECKPOINT_ ##flag)); \ +{ cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) | (1UL << NILFS_CHECKPOINT_ ##flag)); \ } static inline void nilfs_checkpoint_clear_ ##name(struct nilfs_checkpoint * cp) \ -{ cp->cp_flags = cpu_to_le32(le32_to_cpu(cp->cp_flags) & ~(1UL << NILFS_CHECKPOINT_ ##flag)); \ +{ cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) & ~(1UL << NILFS_CHECKPOINT_ ##flag)); \ } static inline int nilfs_checkpoint_ ##name(const struct nilfs_checkpoint * cp) \ -{ return ! ! (le32_to_cpu(cp->cp_flags) & (1UL << NILFS_CHECKPOINT_ ##flag)); \ +{ return ! ! (__le32_to_cpu(cp->cp_flags) & (1UL << NILFS_CHECKPOINT_ ##flag)); \ } struct nilfs_cpfile_header { __le64 ch_ncheckpoints; @@ -272,11 +273,11 @@ enum { NILFS_SEGMENT_USAGE_ERROR, }; #define NILFS_SEGMENT_USAGE_FNS(flag,name) static inline void nilfs_segment_usage_set_ ##name(struct nilfs_segment_usage * su) \ -{ su->su_flags = cpu_to_le32(le32_to_cpu(su->su_flags) | (1UL << NILFS_SEGMENT_USAGE_ ##flag)); \ +{ su->su_flags = __cpu_to_le32(__le32_to_cpu(su->su_flags) | (1UL << NILFS_SEGMENT_USAGE_ ##flag)); \ } static inline void nilfs_segment_usage_clear_ ##name(struct nilfs_segment_usage * su) \ -{ su->su_flags = cpu_to_le32(le32_to_cpu(su->su_flags) & ~(1UL << NILFS_SEGMENT_USAGE_ ##flag)); \ +{ su->su_flags = __cpu_to_le32(__le32_to_cpu(su->su_flags) & ~(1UL << NILFS_SEGMENT_USAGE_ ##flag)); \ } static inline int nilfs_segment_usage_ ##name(const struct nilfs_segment_usage * su) \ -{ return ! ! (le32_to_cpu(su->su_flags) & (1UL << NILFS_SEGMENT_USAGE_ ##flag)); \ +{ return ! ! (__le32_to_cpu(su->su_flags) & (1UL << NILFS_SEGMENT_USAGE_ ##flag)); \ } struct nilfs_sufile_header { __le64 sh_ncleansegs; diff --git a/libc/kernel/uapi/linux/version.h b/libc/kernel/uapi/linux/version.h index 815f53d96..94bf4ba5e 100644 --- a/libc/kernel/uapi/linux/version.h +++ b/libc/kernel/uapi/linux/version.h @@ -16,5 +16,5 @@ *** **************************************************************************** ****************************************************************************/ -#define LINUX_VERSION_CODE 328192 +#define LINUX_VERSION_CODE 328198 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) diff --git a/libc/kernel/uapi/linux/videodev2.h b/libc/kernel/uapi/linux/videodev2.h index e6df45c8a..f77c6bda5 100644 --- a/libc/kernel/uapi/linux/videodev2.h +++ b/libc/kernel/uapi/linux/videodev2.h @@ -210,7 +210,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') #define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') #define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') -#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('B', 'A', '1', '2') +#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') #define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') #define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5')