]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Add isa_defs for MIPS
authorYunQiang Su <syq@debian.org>
Sat, 28 May 2016 12:33:15 +0000 (20:33 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 31 May 2016 16:05:40 +0000 (09:05 -0700)
GCC for MIPS only defines _LP64 when 64bit,
while no _ILP32 defined when 32bit.

Signed-off-by: YunQiang Su <syq@debian.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4712

lib/libefi/rdwr_efi.c
lib/libspl/include/sys/isa_defs.h

index 67de216c03c30918b6934220c09abd25ea341840..7a7a4b4b73d0642a13e6b4d2cc124d931dc68e42 100644 (file)
@@ -154,7 +154,8 @@ struct dk_map2  default_vtoc_map[NDKMAP] = {
 #if defined(_SUNOS_VTOC_16)
 
 #if defined(i386) || defined(__amd64) || defined(__arm) || \
-    defined(__powerpc) || defined(__sparc) || defined(__s390__)
+    defined(__powerpc) || defined(__sparc) || defined(__s390__) || \
+    defined(__mips__)
        {       V_BOOT,         V_UNMNT },              /* i - 8 */
        {       V_ALTSCTR,      0       },              /* j - 9 */
 
index 61f4cd96a93d0476da4f1a336d8de9a62f9ff309..3bca5cf02e1b898f909867ad3edba4370d27075d 100644 (file)
@@ -172,7 +172,28 @@ extern "C" {
 #define        _BIG_ENDIAN
 #define        _SUNOS_VTOC_16
 
-#else /* Currently x86_64, i386, arm, powerpc, s390, and sparc are supported */
+/* MIPS arch specific defines */
+#elif defined(__mips__)
+
+#if defined(__MIPSEB__)
+#define        _BIG_ENDIAN
+#elif defined(__MIPSEL__)
+#define        _LITTLE_ENDIAN
+#else
+#error MIPS no endian specified
+#endif
+
+#ifndef _LP64
+#define        _ILP32
+#endif
+
+#define        _SUNOS_VTOC_16
+
+#else
+/*
+ * Currently supported:
+ * x86_64, i386, arm, powerpc, s390, sparc, and mips
+ */
 #error "Unsupported ISA type"
 #endif