Revert "Update to v5.18 kernel headers."

Revert "Update to v5.18 kernel headers."

Revert submission 2106847-kernel_update

Reason for revert: b/234125620
Reverted Changes:
I5844ca1fc:Update to v5.18 kernel headers.
I5700813ee:Update to v5.18 kernel headers.
Bug: 234125620

Change-Id: I07a39aa9c01939455b5a2a9da5fc04be497ca399
diff --git a/libc/kernel/uapi/asm-x86/asm/amd_hsmp.h b/libc/kernel/uapi/asm-x86/asm/amd_hsmp.h
deleted file mode 100644
index ed59bb8..0000000
--- a/libc/kernel/uapi/asm-x86/asm/amd_hsmp.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   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.
- ***
- ***   To edit the content of this header, modify the corresponding
- ***   source file (e.g. under external/kernel-headers/original/) then
- ***   run bionic/libc/kernel/tools/update_all.py
- ***
- ***   Any manual change here will be lost the next time this script will
- ***   be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef _UAPI_ASM_X86_AMD_HSMP_H_
-#define _UAPI_ASM_X86_AMD_HSMP_H_
-#include <linux/types.h>
-#pragma pack(4)
-#define HSMP_MAX_MSG_LEN 8
-enum hsmp_message_ids {
-  HSMP_TEST = 1,
-  HSMP_GET_SMU_VER,
-  HSMP_GET_PROTO_VER,
-  HSMP_GET_SOCKET_POWER,
-  HSMP_SET_SOCKET_POWER_LIMIT,
-  HSMP_GET_SOCKET_POWER_LIMIT,
-  HSMP_GET_SOCKET_POWER_LIMIT_MAX,
-  HSMP_SET_BOOST_LIMIT,
-  HSMP_SET_BOOST_LIMIT_SOCKET,
-  HSMP_GET_BOOST_LIMIT,
-  HSMP_GET_PROC_HOT,
-  HSMP_SET_XGMI_LINK_WIDTH,
-  HSMP_SET_DF_PSTATE,
-  HSMP_SET_AUTO_DF_PSTATE,
-  HSMP_GET_FCLK_MCLK,
-  HSMP_GET_CCLK_THROTTLE_LIMIT,
-  HSMP_GET_C0_PERCENT,
-  HSMP_SET_NBIO_DPM_LEVEL,
-  HSMP_GET_DDR_BANDWIDTH = 0x14,
-  HSMP_GET_TEMP_MONITOR,
-  HSMP_MSG_ID_MAX,
-};
-struct hsmp_message {
-  __u32 msg_id;
-  __u16 num_args;
-  __u16 response_sz;
-  __u32 args[HSMP_MAX_MSG_LEN];
-  __u16 sock_ind;
-};
-enum hsmp_msg_type {
-  HSMP_RSVD = - 1,
-  HSMP_SET = 0,
-  HSMP_GET = 1,
-};
-struct hsmp_msg_desc {
-  int num_args;
-  int response_sz;
-  enum hsmp_msg_type type;
-};
-static const struct hsmp_msg_desc hsmp_msg_desc_table[] = {
- {
-    0, 0, HSMP_RSVD
-  }
- , {
-    1, 1, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    1, 0, HSMP_SET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    1, 0, HSMP_SET
-  }
- , {
-    1, 0, HSMP_SET
-  }
- , {
-    1, 1, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    1, 0, HSMP_SET
-  }
- , {
-    1, 0, HSMP_SET
-  }
- , {
-    0, 0, HSMP_SET
-  }
- , {
-    0, 2, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    1, 0, HSMP_SET
-  }
- , {
-    0, 0, HSMP_RSVD
-  }
- , {
-    0, 1, HSMP_GET
-  }
- , {
-    0, 1, HSMP_GET
-  }
- ,
-};
-#pragma pack()
-#define HSMP_BASE_IOCTL_NR 0xF8
-#define HSMP_IOCTL_CMD _IOWR(HSMP_BASE_IOCTL_NR, 0, struct hsmp_message)
-#endif
diff --git a/libc/kernel/uapi/asm-x86/asm/processor-flags.h b/libc/kernel/uapi/asm-x86/asm/processor-flags.h
index 0a95afd..85f9d7e 100644
--- a/libc/kernel/uapi/asm-x86/asm/processor-flags.h
+++ b/libc/kernel/uapi/asm-x86/asm/processor-flags.h
@@ -127,8 +127,6 @@
 #define X86_CR4_SMAP _BITUL(X86_CR4_SMAP_BIT)
 #define X86_CR4_PKE_BIT 22
 #define X86_CR4_PKE _BITUL(X86_CR4_PKE_BIT)
-#define X86_CR4_CET_BIT 23
-#define X86_CR4_CET _BITUL(X86_CR4_CET_BIT)
 #define X86_CR8_TPR _AC(0x0000000f, UL)
 #define CX86_PCR0 0x20
 #define CX86_GCR 0xb8
diff --git a/libc/kernel/uapi/asm-x86/asm/shmbuf.h b/libc/kernel/uapi/asm-x86/asm/shmbuf.h
index 2a0dcb5..03e195e 100644
--- a/libc/kernel/uapi/asm-x86/asm/shmbuf.h
+++ b/libc/kernel/uapi/asm-x86/asm/shmbuf.h
@@ -21,11 +21,9 @@
 #if !defined(__x86_64__) || !defined(__ILP32__)
 #include <asm-generic/shmbuf.h>
 #else
-#include <asm/ipcbuf.h>
-#include <asm/posix_types.h>
 struct shmid64_ds {
   struct ipc64_perm shm_perm;
-  __kernel_size_t shm_segsz;
+  size_t shm_segsz;
   __kernel_long_t shm_atime;
   __kernel_long_t shm_dtime;
   __kernel_long_t shm_ctime;
diff --git a/libc/kernel/uapi/asm-x86/asm/signal.h b/libc/kernel/uapi/asm-x86/asm/signal.h
index cbeeac4..8226da8 100644
--- a/libc/kernel/uapi/asm-x86/asm/signal.h
+++ b/libc/kernel/uapi/asm-x86/asm/signal.h
@@ -90,7 +90,7 @@
 typedef struct sigaltstack {
   void __user * ss_sp;
   int ss_flags;
-  __kernel_size_t ss_size;
+  size_t ss_size;
 } stack_t;
 #endif
 #endif