]> granicus.if.org Git - zfs/commitdiff
Define the needed ISA types for Sparc
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 7 Jan 2014 22:14:33 +0000 (23:14 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 9 Jan 2014 23:49:59 +0000 (15:49 -0800)
Add the minimum required ISA types to support the Sparc
architecture.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: marku89 <mar42@kola.li>
Issue #1700

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

index a6dec404bcdca89cf660707006b1b77c57acd7a9..2807fb0702b87c9c3ed53d6b6b3fcf90b1c52cc9 100644 (file)
@@ -87,7 +87,8 @@ struct dk_map2  default_vtoc_map[NDKMAP] = {
 
 #if defined(_SUNOS_VTOC_16)
 
-#if defined(i386) || defined(__amd64) || defined(__arm) || defined(__powerpc)
+#if defined(i386) || defined(__amd64) || defined(__arm) || \
+    defined(__powerpc) || defined(__sparc)
        {       V_BOOT,         V_UNMNT },              /* i - 8 */
        {       V_ALTSCTR,      0       },              /* j - 9 */
 
index 7c5df7737a9ec250b55eb4db4bf4678963658eb9..446dbfc370d8bf75a5d8902cd3f6898262673c82 100644 (file)
@@ -121,7 +121,35 @@ extern "C" {
 
 #define        _SUNOS_VTOC_16
 
-#else /* Currently only x86_64, i386, arm, and powerpc arches supported */
+/* sparc arch specific defines */
+#elif defined(__sparc) || defined(__sparc__)
+
+#if !defined(__sparc)
+#define        __sparc
+#endif
+
+#if !defined(__sparc__)
+#define        __sparc__
+#endif
+
+#define        _BIG_ENDIAN
+#define        _SUNOS_VTOC_16
+
+/* sparc64 arch specific defines */
+#elif defined(__sparc64) || defined(__sparc64__)
+
+#if !defined(__sparc64)
+#define        __sparc64
+#endif
+
+#if !defined(__sparc64__)
+#define        __sparc64__
+#endif
+
+#define        _BIG_ENDIAN
+#define        _SUNOS_VTOC_16
+
+#else /* Currently x86_64, i386, arm, powerpc, and sparc are supported */
 #error "Unsupported ISA type"
 #endif