qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Crosthwaite <crosthwaitepeter@gmail.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>
Subject: [Qemu-devel] [PULL 07/19] cpu-defs: Move out TB_JMP defines
Date: Mon,  6 Jul 2015 14:34:56 +0200	[thread overview]
Message-ID: <1436186108-29747-8-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1436186108-29747-1-git-send-email-pbonzini@redhat.com>

From: Peter Crosthwaite <crosthwaitepeter@gmail.com>

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.

Reviewed-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Message-Id: <43ceca65a3fa240efac49aa0bf604ad0442e1710.1433052532.git.crosthwaite.peter@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 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 247829c..98b9cff 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -56,14 +56,6 @@ typedef uint64_t target_ulong;
 #error TARGET_LONG_SIZE undefined
 #endif
 
-/* 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)
 /* use a fully associative victim tlb of 8 entries */
 #define CPU_VTLB_SIZE 8
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;
-- 
2.4.3

  parent reply	other threads:[~2015-07-06 12:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 12:34 [Qemu-devel] [PULL 00/19] Multithread, multiarch, multicompiler, multi^WKVM changes for 2015-07-06 Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 01/19] qemu-common: add VEC_OR macro Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 02/19] cutils: allow compilation with icc Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 03/19] memory_mapping: Rework cpu related includes Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 04/19] cpu-defs: Move CPU_TEMP_BUF_NLONGS to tcg Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 05/19] include/exec: Move standard exceptions to cpu-all.h Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 06/19] include/exec: Move tb hash functions out Paolo Bonzini
2015-07-06 12:34 ` Paolo Bonzini [this message]
2015-07-06 12:34 ` [Qemu-devel] [PULL 08/19] Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 09/19] main-loop: use qemu_mutex_lock_iothread consistently Paolo Bonzini
2015-07-06 12:34 ` [Qemu-devel] [PULL 10/19] main-loop: introduce qemu_mutex_iothread_locked Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 11/19] memory: Add global-locking property to memory regions Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 12/19] exec: pull qemu_flush_coalesced_mmio_buffer() into address_space_rw/ld*/st* Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 13/19] memory: let address_space_rw/ld*/st* run outside the BQL Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 14/19] kvm: First step to push iothread lock out of inner run loop Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 15/19] kvm: Switch to unlocked PIO Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 16/19] acpi: mark PMTIMER as unlocked Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 17/19] kvm: Switch to unlocked MMIO Paolo Bonzini
2015-07-06 12:35 ` [Qemu-devel] [PULL 18/19] Stop including qemu-common.h in memory.h Paolo Bonzini
2015-07-06 13:02   ` Peter Maydell
2015-07-06 12:35 ` [Qemu-devel] [PULL 19/19] exec: skip MMIO regions correctly in cpu_physical_memory_write_rom_internal Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436186108-29747-8-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).