diff options
| author | Peter Maydell | 2022-02-08 21:08:55 +0100 |
|---|---|---|
| committer | Peter Maydell | 2022-02-21 14:30:20 +0100 |
| commit | ad768e6f2a3397ec88ae874ad743df5d7c8c1936 (patch) | |
| tree | f34e909ce9b700b1033830c389642e0105195936 /include | |
| parent | include: Move QEMU_MAP_* constants to mmap-alloc.h (diff) | |
| download | qemu-ad768e6f2a3397ec88ae874ad743df5d7c8c1936.tar.gz qemu-ad768e6f2a3397ec88ae874ad743df5d7c8c1936.tar.xz qemu-ad768e6f2a3397ec88ae874ad743df5d7c8c1936.zip | |
include: Move qemu_[id]cache_* declarations to new qemu/cacheinfo.h
The qemu_icache_linesize, qemu_icache_linesize_log,
qemu_dcache_linesize, and qemu_dcache_linesize_log variables are not
used in many files. Move them out of osdep.h to a new
qemu/cacheinfo.h, and document them.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220208200856.3558249-5-peter.maydell@linaro.org
Diffstat (limited to 'include')
| -rw-r--r-- | include/qemu/cacheinfo.h | 21 | ||||
| -rw-r--r-- | include/qemu/osdep.h | 5 |
2 files changed, 21 insertions, 5 deletions
diff --git a/include/qemu/cacheinfo.h b/include/qemu/cacheinfo.h new file mode 100644 index 0000000000..019a157ea0 --- /dev/null +++ b/include/qemu/cacheinfo.h @@ -0,0 +1,21 @@ +/* + * QEMU host cacheinfo information + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef QEMU_CACHEINFO_H +#define QEMU_CACHEINFO_H + +/* + * These variables represent our best guess at the host icache and + * dcache sizes, expressed both as the size in bytes and as the + * base-2 log of the size in bytes. They are initialized at startup + * (via an attribute 'constructor' function). + */ +extern int qemu_icache_linesize; +extern int qemu_icache_linesize_log; +extern int qemu_dcache_linesize; +extern int qemu_dcache_linesize_log; + +#endif diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 165448b12f..61808edc69 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -616,11 +616,6 @@ pid_t qemu_fork(Error **errp); extern uintptr_t qemu_real_host_page_size; extern intptr_t qemu_real_host_page_mask; -extern int qemu_icache_linesize; -extern int qemu_icache_linesize_log; -extern int qemu_dcache_linesize; -extern int qemu_dcache_linesize_log; - /* * After using getopt or getopt_long, if you need to parse another set * of options, then you must reset optind. Unfortunately the way to |
