hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [04/50] [abbrv] hadoop git commit: HADOOP-11484. hadoop-mapreduce-client-nativetask fails to build on ARM AARCH64 due to x86 asm statements (Edward Nevill via Colin P. McCabe)
Date Tue, 27 Jan 2015 18:40:22 GMT
HADOOP-11484. hadoop-mapreduce-client-nativetask fails to build on ARM AARCH64 due to x86 asm
statements (Edward Nevill via Colin P. McCabe)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/220a49de
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/220a49de
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/220a49de

Branch: refs/heads/YARN-2928
Commit: 220a49de479a632068ad37f11c6cdd17327dacd9
Parents: 07b0806
Author: Colin Patrick Mccabe <cmccabe@cloudera.com>
Authored: Wed Jan 21 11:24:09 2015 -0800
Committer: Colin Patrick Mccabe <cmccabe@cloudera.com>
Committed: Wed Jan 21 11:24:09 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                  | 3 +++
 .../src/main/native/src/lib/primitives.h                     | 8 ++++++++
 .../src/main/native/src/util/Checksum.cc                     | 5 +++++
 3 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/220a49de/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 1801d2f..3bd67fe 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -753,6 +753,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7610. Fix removal of dynamically added DN volumes (Lei (Eddy) Xu via
     Colin P. McCabe)
 
+    HADOOP-11484. hadoop-mapreduce-client-nativetask fails to build on ARM
+    AARCH64 due to x86 asm statements (Edward Nevill via Colin P. McCabe)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/220a49de/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
index 4c0c1a7..3bf5f76 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h
@@ -97,11 +97,18 @@ inline void simple_memcpy(void * dest, const void * src, size_t len) {
  * little-endian to big-endian or vice versa
  */
 inline uint32_t bswap(uint32_t val) {
+#ifdef __aarch64__
+  __asm__("rev %w[dst], %w[src]" : [dst]"=r"(val) : [src]"r"(val));
+#else
   __asm__("bswap %0" : "=r" (val) : "0" (val));
+#endif
   return val;
 }
 
 inline uint64_t bswap64(uint64_t val) {
+#ifdef __aarch64__
+  __asm__("rev %[dst], %[src]" : [dst]"=r"(val) : [src]"r"(val));
+#else
 #ifdef __X64
   __asm__("bswapq %0" : "=r" (val) : "0" (val));
 #else
@@ -115,6 +122,7 @@ inline uint64_t bswap64(uint64_t val) {
   return (lower << 32) + higher;
 
 #endif
+#endif
   return val;
 }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/220a49de/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
index 191e093..be800c5 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc
@@ -579,6 +579,11 @@ const uint32_t CRC32C_T8_7[256] = {0x00000000, 0x493C7D27, 0x9278FA4E,
0xDB44876
     0xCF56CE31, 0x14124958, 0x5D2E347F, 0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8, 0xC451B7CC,
     0x8D6DCAEB, 0x56294D82, 0x1F1530A5};
 
+#ifdef __aarch64__
+// Awaiting HW implementation
+#define SOFTWARE_CRC
+#endif
+
 #ifndef SOFTWARE_CRC
 #define USE_HARDWARE_CRC32C 1
 #endif


Mime
View raw message