From: Stefan Hajnoczi <stefanha@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 8/9] exec: make some functions static
Date: Thu, 1 Nov 2012 20:05:53 +0100 [thread overview]
Message-ID: <1351796754-21703-15-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1351796754-21703-1-git-send-email-stefanha@redhat.com>
From: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
cpu-common.h | 5 -----
exec-all.h | 2 --
exec.c | 15 +++++++++------
memory-internal.h | 2 --
4 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/cpu-common.h b/cpu-common.h
index 5f93089..d2fbafa 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -39,10 +39,6 @@ typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr);
void qemu_ram_remap(ram_addr_t addr, ram_addr_t length);
/* This should only be used for ram local to a device. */
void *qemu_get_ram_ptr(ram_addr_t addr);
-void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size);
-/* Same but slower, to use for migration, where the order of
- * RAMBlocks must not change. */
-void *qemu_safe_ram_ptr(ram_addr_t addr);
void qemu_put_ram_ptr(void *addr);
/* This should not be used by devices. */
int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr);
@@ -67,7 +63,6 @@ void *cpu_physical_memory_map(hwaddr addr,
void cpu_physical_memory_unmap(void *buffer, hwaddr len,
int is_write, hwaddr access_len);
void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque));
-void cpu_unregister_map_client(void *cookie);
bool cpu_physical_memory_is_io(hwaddr phys_addr);
diff --git a/exec-all.h b/exec-all.h
index 2ea0e4f..8db47f5 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -194,8 +194,6 @@ static inline unsigned int tb_phys_hash_func(tb_page_addr_t pc)
void tb_free(TranslationBlock *tb);
void tb_flush(CPUArchState *env);
-void tb_link_page(TranslationBlock *tb,
- tb_page_addr_t phys_pc, tb_page_addr_t phys_page2);
void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr);
extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
diff --git a/exec.c b/exec.c
index b0ed593..42cc097 100644
--- a/exec.c
+++ b/exec.c
@@ -188,9 +188,12 @@ static unsigned phys_map_nodes_nb, phys_map_nodes_nb_alloc;
static void io_mem_init(void);
static void memory_map_init(void);
+static void *qemu_safe_ram_ptr(ram_addr_t addr);
static MemoryRegion io_mem_watch;
#endif
+static void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,
+ tb_page_addr_t phys_page2);
/* statistics */
static int tb_flush_count;
@@ -1349,8 +1352,8 @@ static inline void tb_alloc_page(TranslationBlock *tb,
/* add a new TB and link it to the physical page tables. phys_page2 is
(-1) to indicate that only one page contains the TB. */
-void tb_link_page(TranslationBlock *tb,
- tb_page_addr_t phys_pc, tb_page_addr_t phys_page2)
+static void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc,
+ tb_page_addr_t phys_page2)
{
unsigned int h;
TranslationBlock **ptb;
@@ -1859,7 +1862,7 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end,
}
}
-int cpu_physical_memory_set_dirty_tracking(int enable)
+static int cpu_physical_memory_set_dirty_tracking(int enable)
{
int ret = 0;
in_migration = enable;
@@ -2741,7 +2744,7 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
/* Return a host pointer to ram allocated with qemu_ram_alloc.
* Same as qemu_get_ram_ptr but avoid reordering ramblocks.
*/
-void *qemu_safe_ram_ptr(ram_addr_t addr)
+static void *qemu_safe_ram_ptr(ram_addr_t addr)
{
RAMBlock *block;
@@ -2771,7 +2774,7 @@ void *qemu_safe_ram_ptr(ram_addr_t addr)
/* Return a host pointer to guest's ram. Similar to qemu_get_ram_ptr
* but takes a size argument */
-void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size)
+static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size)
{
if (*size == 0) {
return NULL;
@@ -3519,7 +3522,7 @@ void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque))
return client;
}
-void cpu_unregister_map_client(void *_client)
+static void cpu_unregister_map_client(void *_client)
{
MapClient *client = (MapClient *)_client;
diff --git a/memory-internal.h b/memory-internal.h
index 1c34b97..1da2400 100644
--- a/memory-internal.h
+++ b/memory-internal.h
@@ -55,8 +55,6 @@ struct MemoryRegionSection;
void qemu_register_coalesced_mmio(hwaddr addr, ram_addr_t size);
void qemu_unregister_coalesced_mmio(hwaddr addr, ram_addr_t size);
-int cpu_physical_memory_set_dirty_tracking(int enable);
-
#define VGA_DIRTY_FLAG 0x01
#define CODE_DIRTY_FLAG 0x02
#define MIGRATION_DIRTY_FLAG 0x08
--
1.7.12.1
next prev parent reply other threads:[~2012-11-01 19:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 19:05 [Qemu-devel] [PULL 1.3 0/9] Trivial patches for 20 October to 1 November 2012 Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 1/9] cadence_uart: More debug information Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 1/6] ui/vnc: Only report/use TIGHT_PNG encoding if enabled Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 2/9] m68k: Return semihosting errno values correctly Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 2/6] targphys.h: Don't define target_phys_addr_t for user-mode emulators Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 3/6] target-arm/neon_helper: Remove obsolete FIXME comment Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 3/9] target-sparc: make do_unaligned_access static Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 4/6] configure: Remove unused parameters from main function Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 4/9] vl.c: add missing static Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 5/6] net/tap-win32: Fix compiler warning caused by missing include statement Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 5/9] vnc: add missing static Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 6/9] ppc: " Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 6/6] ui/vnc-jobs.c: Fix minor typos in comments Stefan Hajnoczi
2012-11-01 19:05 ` [Qemu-devel] [PATCH 7/9] target-ppc: make some functions static Stefan Hajnoczi
2012-11-01 19:05 ` Stefan Hajnoczi [this message]
2012-11-01 19:05 ` [Qemu-devel] [PATCH 9/9] pc: Drop redundant test for ROM memory region Stefan Hajnoczi
2012-11-03 15:19 ` [Qemu-devel] [PULL 1.3 0/9] Trivial patches for 20 October to 1 November 2012 Blue Swirl
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=1351796754-21703-15-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@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).