Skip to content

Commit 55c4816

Browse files
committed
[ot] system: memory: remove unused mtree_print_as_{flatview,simple} APIs
Signed-off-by: James Wainwright <james.wainwright@lowrisc.org>
1 parent e8835b7 commit 55c4816

File tree

2 files changed

+2
-41
lines changed

2 files changed

+2
-41
lines changed

include/system/memory.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,9 +2678,6 @@ bool memory_global_dirty_log_start(unsigned int flags, Error **errp);
26782678
void memory_global_dirty_log_stop(unsigned int flags);
26792679

26802680
void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled);
2681-
void mtree_print_as_flatview(AddressSpace *as, bool dispatch_tree, bool owner);
2682-
void mtree_print_as_simple(AddressSpace *as, bool dispatch_tree, bool owner,
2683-
bool disabled);
26842681

26852682
bool memory_region_access_valid(MemoryRegion *mr, hwaddr addr,
26862683
unsigned size, bool is_write,

system/memory.c

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3581,38 +3581,6 @@ static void mtree_print_flatview(gpointer key, gpointer value,
35813581
qemu_printf("\n");
35823582
}
35833583

3584-
void mtree_print_as_flatview(AddressSpace *as, bool dispatch_tree, bool owner)
3585-
{
3586-
struct FlatViewInfo fvi = {
3587-
.counter = 0,
3588-
.dispatch_tree = dispatch_tree,
3589-
.owner = owner,
3590-
};
3591-
3592-
FlatView *view = address_space_get_flatview(as);
3593-
AccelClass *ac = ACCEL_GET_CLASS(current_accel());
3594-
if (ac->has_memory) {
3595-
fvi.ac = ac;
3596-
}
3597-
3598-
GArray *ases = g_array_new(false, false, sizeof(as));
3599-
g_array_append_val(ases, as);
3600-
3601-
mtree_print_flatview(view, ases, &fvi);
3602-
3603-
g_array_free(ases, false);
3604-
}
3605-
3606-
static void mtree_info_as(bool dispatch_tree, bool owner, bool disabled,
3607-
AddressSpace *sas);
3608-
3609-
void mtree_print_as_simple(AddressSpace *as, bool dispatch_tree, bool owner,
3610-
bool disabled)
3611-
{
3612-
mtree_info_as(dispatch_tree, owner, disabled, as);
3613-
}
3614-
3615-
36163584
static gboolean mtree_info_flatview_free(gpointer key, gpointer value,
36173585
gpointer user_data)
36183586
{
@@ -3706,8 +3674,7 @@ static gboolean mtree_info_as_free(gpointer key, gpointer value,
37063674
return true;
37073675
}
37083676

3709-
static void mtree_info_as(bool dispatch_tree, bool owner, bool disabled,
3710-
AddressSpace *sas)
3677+
static void mtree_info_as(bool dispatch_tree, bool owner, bool disabled)
37113678
{
37123679
MemoryRegionListHead ml_head;
37133680
MemoryRegionList *ml, *ml2;
@@ -3723,9 +3690,6 @@ static void mtree_info_as(bool dispatch_tree, bool owner, bool disabled,
37233690
QTAILQ_INIT(&ml_head);
37243691

37253692
QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
3726-
if (sas && as != sas) {
3727-
continue;
3728-
}
37293693
/* Create hashtable, key=AS root MR, value = list of AS */
37303694
as_same_root_mr_list = g_hash_table_lookup(views, as->root);
37313695
as_same_root_mr_list = g_slist_insert_sorted(as_same_root_mr_list, as,
@@ -3755,7 +3719,7 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner, bool disabled)
37553719
if (flatview) {
37563720
mtree_info_flatview(dispatch_tree, owner);
37573721
} else {
3758-
mtree_info_as(dispatch_tree, owner, disabled, NULL);
3722+
mtree_info_as(dispatch_tree, owner, disabled);
37593723
}
37603724
}
37613725

0 commit comments

Comments
 (0)