aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memattrs.h3
-rw-r--r--include/exec/tswap.h83
2 files changed, 4 insertions, 82 deletions
diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h
index 8db1d30..52ee955 100644
--- a/include/exec/memattrs.h
+++ b/include/exec/memattrs.h
@@ -54,6 +54,9 @@ typedef struct MemTxAttrs {
*/
unsigned int pid:8;
+ /* PCI - IOMMU operations, see PCIAddressType */
+ unsigned int address_type:1;
+
/*
* Bus masters which don't specify any attributes will get this
* (via the MEMTXATTRS_UNSPECIFIED constant), so that we can
diff --git a/include/exec/tswap.h b/include/exec/tswap.h
index 49511f2..72219e2 100644
--- a/include/exec/tswap.h
+++ b/include/exec/tswap.h
@@ -9,18 +9,7 @@
#define TSWAP_H
#include "qemu/bswap.h"
-
-/**
- * target_big_endian:
- * Returns true if the (default) endianness of the target is big endian,
- * false otherwise. Common code should normally never need to know about the
- * endianness of the target, so please do *not* use this function unless you
- * know very well what you are doing!
- */
-bool target_big_endian(void);
-#ifdef COMPILING_PER_TARGET
-#define target_big_endian() TARGET_BIG_ENDIAN
-#endif
+#include "qemu/target-info.h"
/*
* If we're in target-specific code, we can hard-code the swapping
@@ -80,74 +69,4 @@ static inline void tswap64s(uint64_t *s)
}
}
-/* Return ld{word}_{le,be}_p following target endianness. */
-#define LOAD_IMPL(word, args...) \
-do { \
- if (target_big_endian()) { \
- return glue(glue(ld, word), _be_p)(args); \
- } else { \
- return glue(glue(ld, word), _le_p)(args); \
- } \
-} while (0)
-
-static inline int lduw_p(const void *ptr)
-{
- LOAD_IMPL(uw, ptr);
-}
-
-static inline int ldsw_p(const void *ptr)
-{
- LOAD_IMPL(sw, ptr);
-}
-
-static inline int ldl_p(const void *ptr)
-{
- LOAD_IMPL(l, ptr);
-}
-
-static inline uint64_t ldq_p(const void *ptr)
-{
- LOAD_IMPL(q, ptr);
-}
-
-static inline uint64_t ldn_p(const void *ptr, int sz)
-{
- LOAD_IMPL(n, ptr, sz);
-}
-
-#undef LOAD_IMPL
-
-/* Call st{word}_{le,be}_p following target endianness. */
-#define STORE_IMPL(word, args...) \
-do { \
- if (target_big_endian()) { \
- glue(glue(st, word), _be_p)(args); \
- } else { \
- glue(glue(st, word), _le_p)(args); \
- } \
-} while (0)
-
-
-static inline void stw_p(void *ptr, uint16_t v)
-{
- STORE_IMPL(w, ptr, v);
-}
-
-static inline void stl_p(void *ptr, uint32_t v)
-{
- STORE_IMPL(l, ptr, v);
-}
-
-static inline void stq_p(void *ptr, uint64_t v)
-{
- STORE_IMPL(q, ptr, v);
-}
-
-static inline void stn_p(void *ptr, int sz, uint64_t v)
-{
- STORE_IMPL(n, ptr, sz, v);
-}
-
-#undef STORE_IMPL
-
#endif /* TSWAP_H */