Clean up mips references in the headers.

Test: treehugger
Change-Id: I1997af980b9e46c7c530f9e6cb1aa407b2d63d76
diff --git a/libc/include/sys/cachectl.h b/libc/include/sys/cachectl.h
index 9235327..5ec295d 100644
--- a/libc/include/sys/cachectl.h
+++ b/libc/include/sys/cachectl.h
@@ -26,12 +26,8 @@
  * SUCH DAMAGE.
  */
 
-#ifndef _SYS_CACHECTL_H
-#define _SYS_CACHECTL_H 1
+#pragma once
 
 #include <sys/cdefs.h>
-#ifdef __mips__
-#include <asm/cachectl.h>
-#endif
 
-#endif
+/* This header file is obsolete. */
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index e2acab7..3ecbcce 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -46,13 +46,8 @@
 
 struct timespec;
 
-#ifdef __mips__
-#define SOCK_DGRAM      1
-#define SOCK_STREAM     2
-#else
 #define SOCK_STREAM     1
 #define SOCK_DGRAM      2
-#endif
 #define SOCK_RAW        3
 #define SOCK_RDM        4
 #define SOCK_SEQPACKET  5
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index d8e92d9..a6c73b7 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -36,7 +36,7 @@
 
 __BEGIN_DECLS
 
-#if defined(__aarch64__) || (defined(__mips__) && defined(__LP64__))
+#if defined(__aarch64__)
 #define __STAT64_BODY \
   dev_t st_dev; \
   ino_t st_ino; \
@@ -56,25 +56,6 @@
   unsigned int __unused4; \
   unsigned int __unused5; \
 
-#elif defined(__mips__) && !defined(__LP64__)
-#define __STAT64_BODY \
-  unsigned int st_dev; \
-  unsigned int __pad0[3]; \
-  unsigned long long st_ino; \
-  mode_t st_mode; \
-  nlink_t st_nlink; \
-  uid_t st_uid; \
-  gid_t st_gid; \
-  unsigned int st_rdev; \
-  unsigned int __pad1[3]; \
-  long long st_size; \
-  struct timespec st_atim; \
-  struct timespec st_mtim; \
-  struct timespec st_ctim; \
-  unsigned int st_blksize; \
-  unsigned int __pad2; \
-  unsigned long long st_blocks; \
-
 #elif defined(__x86_64__)
 #define __STAT64_BODY \
   dev_t st_dev; \
diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h
index 730ac69..9c5801f 100644
--- a/libc/include/sys/ucontext.h
+++ b/libc/include/sys/ucontext.h
@@ -213,78 +213,6 @@
   struct _libc_fpstate __fpregs_mem;
 } ucontext_t;
 
-#elif defined(__mips__)
-
-/* glibc doesn't have names for MIPS registers. */
-
-#define NGREG 32
-#define NFPREG 32
-
-typedef unsigned long long greg_t;
-typedef greg_t gregset_t[NGREG];
-
-typedef struct fpregset {
-  union {
-    double fp_dregs[NFPREG];
-    struct {
-      float _fp_fregs;
-      unsigned _fp_pad;
-    } fp_fregs[NFPREG];
-  } fp_r;
-} fpregset_t;
-
-#ifdef __LP64__
-typedef struct {
-  gregset_t gregs;
-  fpregset_t fpregs;
-  greg_t mdhi;
-  greg_t hi1;
-  greg_t hi2;
-  greg_t hi3;
-  greg_t mdlo;
-  greg_t lo1;
-  greg_t lo2;
-  greg_t lo3;
-  greg_t pc;
-  uint32_t fpc_csr;
-  uint32_t used_math;
-  uint32_t dsp;
-  uint32_t reserved;
-} mcontext_t;
-#else
-typedef struct {
-  unsigned regmask;
-  unsigned status;
-  greg_t pc;
-  gregset_t gregs;
-  fpregset_t fpregs;
-  unsigned fp_owned;
-  unsigned fpc_csr;
-  unsigned fpc_eir;
-  unsigned used_math;
-  unsigned dsp;
-  greg_t mdhi;
-  greg_t mdlo;
-  unsigned long hi1;
-  unsigned long lo1;
-  unsigned long hi2;
-  unsigned long lo2;
-  unsigned long hi3;
-  unsigned long lo3;
-} mcontext_t;
-#endif
-
-typedef struct ucontext {
-  unsigned long uc_flags;
-  struct ucontext* uc_link;
-  stack_t uc_stack;
-  mcontext_t uc_mcontext;
-  union {
-    sigset_t uc_sigmask;
-    sigset64_t uc_sigmask64;
-  };
-} ucontext_t;
-
 #elif defined(__x86_64__)
 
 enum {
diff --git a/libc/include/sys/user.h b/libc/include/sys/user.h
index ed3e10a..2392edd 100644
--- a/libc/include/sys/user.h
+++ b/libc/include/sys/user.h
@@ -172,22 +172,6 @@
   unsigned long fault_address;
 };
 
-#elif defined(__mips__)
-
-struct user {
-  unsigned long regs[180 / sizeof(unsigned long) + 64];
-  size_t u_tsize;
-  size_t u_dsize;
-  size_t u_ssize;
-  unsigned long start_code;
-  unsigned long start_data;
-  unsigned long start_stack;
-  long int signal;
-  void* u_ar0;
-  unsigned long magic;
-  char u_comm[32];
-};
-
 #elif defined(__arm__)
 
 struct user_fpregs {
diff --git a/libc/include/sys/vfs.h b/libc/include/sys/vfs.h
index 9237ee6..ad859f0 100644
--- a/libc/include/sys/vfs.h
+++ b/libc/include/sys/vfs.h
@@ -39,7 +39,7 @@
 typedef struct { int __val[2]; } __fsid_t;
 typedef __fsid_t fsid_t;
 
-#if defined(__aarch64__) || defined(__x86_64__)
+#if defined(__LP64__)
 #define __STATFS64_BODY \
   uint64_t f_type; \
   uint64_t f_bsize; \
@@ -54,39 +54,6 @@
   uint64_t f_flags; \
   uint64_t f_spare[4]; \
 
-#elif defined(__mips__) && defined(__LP64__)
-/* 64-bit MIPS. */
-#define __STATFS64_BODY \
-  uint64_t f_type; \
-  uint64_t f_bsize; \
-  uint64_t f_frsize; /* Fragment size - unsupported. */ \
-  uint64_t f_blocks; \
-  uint64_t f_bfree; \
-  uint64_t f_files; \
-  uint64_t f_ffree; \
-  uint64_t f_bavail; \
-  fsid_t f_fsid; \
-  uint64_t f_namelen; \
-  uint64_t f_flags; \
-  uint64_t f_spare[5]; \
-
-#elif defined(__mips__)
-/* 32-bit MIPS (corresponds to the kernel's statfs64 type). */
-#define __STATFS64_BODY \
-  uint32_t f_type; \
-  uint32_t f_bsize; \
-  uint32_t f_frsize; \
-  uint32_t __pad; \
-  uint64_t f_blocks; \
-  uint64_t f_bfree; \
-  uint64_t f_files; \
-  uint64_t f_ffree; \
-  uint64_t f_bavail; \
-  fsid_t f_fsid; \
-  uint32_t f_namelen; \
-  uint32_t f_flags; \
-  uint32_t f_spare[5]; \
-
 #else
 /* 32-bit ARM or x86 (corresponds to the kernel's statfs64 type). */
 #define __STATFS64_BODY \