Commit f058fa5b authored by Adrian Hunter's avatar Adrian Hunter Committed by Namhyung Kim

perf intel-pt: Use existing definitions of le16_to_cpu() etc

Use definitions from tools/include/linux/kernel.h
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Acked-by: default avatarIan Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20231005190451.175568-4-adrian.hunter@intel.comSigned-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent 1d2dbce9
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <string.h> #include <string.h>
#include <endian.h> #include <endian.h>
#include <byteswap.h> #include <byteswap.h>
#include <linux/kernel.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include "intel-pt-pkt-decoder.h" #include "intel-pt-pkt-decoder.h"
...@@ -17,17 +18,11 @@ ...@@ -17,17 +18,11 @@
#define BIT63 ((uint64_t)1 << 63) #define BIT63 ((uint64_t)1 << 63)
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define le16_to_cpu bswap_16
#define le32_to_cpu bswap_32
#define le64_to_cpu bswap_64
#define memcpy_le64(d, s, n) do { \ #define memcpy_le64(d, s, n) do { \
memcpy((d), (s), (n)); \ memcpy((d), (s), (n)); \
*(d) = le64_to_cpu(*(d)); \ *(d) = le64_to_cpu(*(d)); \
} while (0) } while (0)
#else #else
#define le16_to_cpu
#define le32_to_cpu
#define le64_to_cpu
#define memcpy_le64 memcpy #define memcpy_le64 memcpy
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment