aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg/tb-maint.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2022-12-09 10:36:49 +0100
committerRichard Henderson <richard.henderson@linaro.org>2022-12-20 17:11:12 -0800
commit811242654934bd4613634235ef6a8219792ab088 (patch)
tree207e418855c7c39dc7ad3b8e770377a7b3373aba /accel/tcg/tb-maint.c
parentf349e92e8edc66b6d4cfc4a0981da6d510fef683 (diff)
accel/tcg: Restrict page_collection structure to system TB maintainance
Only the system emulation part of TB maintainance uses the page_collection structure. Restrict its declaration (and the functions requiring it) to tb-maint.c. Convert the 'len' argument of tb_invalidate_phys_page_fast__locked() from signed to unsigned. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20221209093649.43738-6-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg/tb-maint.c')
-rw-r--r--accel/tcg/tb-maint.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c
index d557013f00..1b8e860647 100644
--- a/accel/tcg/tb-maint.c
+++ b/accel/tcg/tb-maint.c
@@ -513,8 +513,8 @@ static gint tb_page_addr_cmp(gconstpointer ap, gconstpointer bp, gpointer udata)
* intersecting TBs.
* Locking order: acquire locks in ascending order of page index.
*/
-struct page_collection *
-page_collection_lock(tb_page_addr_t start, tb_page_addr_t end)
+static struct page_collection *page_collection_lock(tb_page_addr_t start,
+ tb_page_addr_t end)
{
struct page_collection *set = g_malloc(sizeof(*set));
tb_page_addr_t index;
@@ -558,7 +558,7 @@ page_collection_lock(tb_page_addr_t start, tb_page_addr_t end)
return set;
}
-void page_collection_unlock(struct page_collection *set)
+static void page_collection_unlock(struct page_collection *set)
{
/* entries are unlocked and freed via page_entry_destroy */
g_tree_destroy(set->tree);
@@ -1186,9 +1186,9 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end)
/*
* Call with all @pages in the range [@start, @start + len[ locked.
*/
-void tb_invalidate_phys_page_fast__locked(struct page_collection *pages,
- tb_page_addr_t start, int len,
- uintptr_t retaddr)
+static void tb_invalidate_phys_page_fast__locked(struct page_collection *pages,
+ tb_page_addr_t start,
+ unsigned len, uintptr_t ra)
{
PageDesc *p;
@@ -1198,8 +1198,7 @@ void tb_invalidate_phys_page_fast__locked(struct page_collection *pages,
}
assert_page_locked(p);
- tb_invalidate_phys_page_range__locked(pages, p, start, start + len,
- retaddr);
+ tb_invalidate_phys_page_range__locked(pages, p, start, start + len, ra);
}
/*