[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 13/34] cpu-defs: Move out TB_JMP defines
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC v2 13/34] cpu-defs: Move out TB_JMP defines |
Date: |
Sat, 30 May 2015 23:11:46 -0700 |
These are not Architecture specific in any way so move them out of
cpu-defs.h. tb-hash.h is an appropriate place as a leading user and
their strong relationship to TB hashing and caching.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
include/exec/cpu-defs.h | 8 --------
include/exec/tb-hash.h | 8 ++++++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index 1c52d2a..a1c418f 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -34,14 +34,6 @@
#include "exec/target-long.h"
-/* Only the bottom TB_JMP_PAGE_BITS of the jump cache hash bits vary for
- addresses on the same page. The top bits are the same. This allows
- TLB invalidation to quickly clear a subset of the hash table. */
-#define TB_JMP_PAGE_BITS (TB_JMP_CACHE_BITS / 2)
-#define TB_JMP_PAGE_SIZE (1 << TB_JMP_PAGE_BITS)
-#define TB_JMP_ADDR_MASK (TB_JMP_PAGE_SIZE - 1)
-#define TB_JMP_PAGE_MASK (TB_JMP_CACHE_SIZE - TB_JMP_PAGE_SIZE)
-
#if !defined(CONFIG_USER_ONLY)
#define CPU_TLB_BITS 8
#define CPU_TLB_SIZE (1 << CPU_TLB_BITS)
diff --git a/include/exec/tb-hash.h b/include/exec/tb-hash.h
index e0bd786..0f4e8a0 100644
--- a/include/exec/tb-hash.h
+++ b/include/exec/tb-hash.h
@@ -20,6 +20,14 @@
#ifndef EXEC_TB_HASH
#define EXEC_TB_HASH
+/* Only the bottom TB_JMP_PAGE_BITS of the jump cache hash bits vary for
+ addresses on the same page. The top bits are the same. This allows
+ TLB invalidation to quickly clear a subset of the hash table. */
+#define TB_JMP_PAGE_BITS (TB_JMP_CACHE_BITS / 2)
+#define TB_JMP_PAGE_SIZE (1 << TB_JMP_PAGE_BITS)
+#define TB_JMP_ADDR_MASK (TB_JMP_PAGE_SIZE - 1)
+#define TB_JMP_PAGE_MASK (TB_JMP_CACHE_SIZE - TB_JMP_PAGE_SIZE)
+
static inline unsigned int tb_jmp_cache_hash_page(target_ulong pc)
{
target_ulong tmp;
--
1.9.1
- [Qemu-devel] [RFC v2 03/34] Makefile.target: Introduce arch-obj, (continued)
- [Qemu-devel] [RFC v2 03/34] Makefile.target: Introduce arch-obj, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 04/34] cpu-exec: Migrate some generic fns to cpus.c, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 05/34] translate: Listify tcg_exec_init, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 06/34] cpu-common: Define tb_page_addr_t for everyone, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 08/34] translate-all: Move tcg_handle_interrupt to -common, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 09/34] include/exec: Move standard exceptions to cpu-all.h, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 10/34] include/exec: Split target_long def to new header, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 11/34] include/exec: Move cputlb exec.c defs out, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 12/34] include/exec: Move tb hash functions out, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 13/34] cpu-defs: Move out TB_JMP defines,
Peter Crosthwaite <=
- [Qemu-devel] [RFC v2 14/34] cpu-defs: Allow multiple inclusions, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 15/34] HACK: monitor: Comment out TCG profile ops, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 16/34] HACK: Disable list_cpus, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 17/34] HACK: globalise TCG page size variables, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 18/34] HACK: monitor: uninclude cpu_ldst, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 19/34] HACK: disas: Defeature print_target_address, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 20/34] HACK: exec: comment out use of cpu_get_tb_cpu_from_state, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 22/34] microblaze: enable multi-arch, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 23/34] arm: cpu: static inline cpu_arm_init, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely, Peter Crosthwaite, 2015/05/31