summary refs log tree commit diff stats
path: root/include/qemu
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@amazon.com>2013-12-06 12:57:21 -0800
committerAnthony Liguori <aliguori@amazon.com>2013-12-06 12:57:21 -0800
commitcdac7a7184065467ba45ec83a9abfeeae060ce4b (patch)
tree1d7d262492874f0945716da1d85c5cb01c6d48e8 /include/qemu
parenta55d121f4a932dcd19eb8164804cc98d5ea88e72 (diff)
parent0b959cf5e4cce08ed96bd7832447e1543cd3622f (diff)
downloadfocaccia-qemu-cdac7a7184065467ba45ec83a9abfeeae060ce4b.tar.gz
focaccia-qemu-cdac7a7184065467ba45ec83a9abfeeae060ce4b.zip
Merge remote-tracking branch 'rth/auxv-2' into staging
# By Richard Henderson
# Via Richard Henderson
* rth/auxv-2:
  linux-user: Use qemu_getauxval for AT_EXECFD
  util: Use qemu_getauxval in linux qemu_cache_utils_init
  tcg-s390: Use qemu_getauxval in query_facilities
  tcg-arm: Use qemu_getauxval
  tcg-ppc64: Use qemu_getauxval
  osdep: Create qemu_getauxval and qemu_init_auxval

Message-id: 1385757754-10702-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/cache-utils.h4
-rw-r--r--include/qemu/osdep.h25
2 files changed, 27 insertions, 2 deletions
diff --git a/include/qemu/cache-utils.h b/include/qemu/cache-utils.h
index 2c57f78fc1..211245bea0 100644
--- a/include/qemu/cache-utils.h
+++ b/include/qemu/cache-utils.h
@@ -12,7 +12,7 @@ struct qemu_cache_conf {
 
 extern struct qemu_cache_conf qemu_cache_conf;
 
-void qemu_cache_utils_init(char **envp);
+void qemu_cache_utils_init(void);
 
 /* mildly adjusted code from tcg-dyngen.c */
 static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
@@ -38,7 +38,7 @@ static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
 }
 
 #else
-#define qemu_cache_utils_init(envp) do { (void) (envp); } while (0)
+#define qemu_cache_utils_init() do { } while (0)
 #endif
 
 #endif /* QEMU_CACHE_UTILS_H */
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 26136f16ec..b3e2b6d8ea 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -215,4 +215,29 @@ bool fips_get_state(void);
  */
 char *qemu_get_local_state_pathname(const char *relative_pathname);
 
+/**
+ * qemu_getauxval:
+ * @type: the auxiliary vector key to lookup
+ *
+ * Search the auxiliary vector for @type, returning the value
+ * or 0 if @type is not present.
+ */
+#if defined(CONFIG_GETAUXVAL) || defined(__linux__)
+unsigned long qemu_getauxval(unsigned long type);
+#else
+static inline unsigned long qemu_getauxval(unsigned long type) { return 0; }
+#endif
+
+/**
+ * qemu_init_auxval:
+ * @envp: the third argument to main
+ *
+ * If supported and required, locate the auxiliary vector at program startup.
+ */
+#if defined(CONFIG_GETAUXVAL) || !defined(__linux__)
+static inline void qemu_init_auxval(char **envp) { }
+#else
+void qemu_init_auxval(char **envp);
+#endif
+
 #endif