From: Jan Kiszka <[email protected]> It's now always 0, for all arch, so it's obsolete. Just leave a note in mmio_cell_init why we do not need to initialize max_mmio_regions explicitly.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm/mmio.c | 5 ----- hypervisor/arch/arm64/mmio.c | 5 ----- hypervisor/arch/x86/mmio.c | 5 ----- hypervisor/include/jailhouse/mmio.h | 2 -- hypervisor/mmio.c | 2 +- 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/hypervisor/arch/arm/mmio.c b/hypervisor/arch/arm/mmio.c index c03573ba8..cdc33fc26 100644 --- a/hypervisor/arch/arm/mmio.c +++ b/hypervisor/arch/arm/mmio.c @@ -18,11 +18,6 @@ #include <asm/processor.h> #include <asm/traps.h> -unsigned int arch_mmio_count_regions(struct cell *cell) -{ - return 0; -} - /* Taken from the ARM ARM pseudocode for taking a data abort */ static void arch_inject_dabt(struct trap_context *ctx, unsigned long addr) { diff --git a/hypervisor/arch/arm64/mmio.c b/hypervisor/arch/arm64/mmio.c index 4750fdb91..bf892185a 100644 --- a/hypervisor/arch/arm64/mmio.c +++ b/hypervisor/arch/arm64/mmio.c @@ -24,11 +24,6 @@ /* AARCH64_TODO: consider merging this with the AArch32 version */ -unsigned int arch_mmio_count_regions(struct cell *cell) -{ - return 0; -} - static void arch_inject_dabt(struct trap_context *ctx, unsigned long addr) { int err __attribute__((unused)) = trace_error(-EINVAL); diff --git a/hypervisor/arch/x86/mmio.c b/hypervisor/arch/x86/mmio.c index 2eccd2bfc..d7a6c0019 100644 --- a/hypervisor/arch/x86/mmio.c +++ b/hypervisor/arch/x86/mmio.c @@ -219,8 +219,3 @@ error: inst.inst_len = 0; return inst; } - -unsigned int arch_mmio_count_regions(struct cell *cell) -{ - return 0; -} diff --git a/hypervisor/include/jailhouse/mmio.h b/hypervisor/include/jailhouse/mmio.h index a128b1e3d..0c28d5d9d 100644 --- a/hypervisor/include/jailhouse/mmio.h +++ b/hypervisor/include/jailhouse/mmio.h @@ -177,7 +177,5 @@ int mmio_subpage_register(struct cell *cell, void mmio_subpage_unregister(struct cell *cell, const struct jailhouse_memory *mem); -unsigned int arch_mmio_count_regions(struct cell *cell); - /** @} */ #endif /* !_JAILHOUSE_MMIO_H */ diff --git a/hypervisor/mmio.c b/hypervisor/mmio.c index a50012553..980850660 100644 --- a/hypervisor/mmio.c +++ b/hypervisor/mmio.c @@ -33,7 +33,7 @@ int mmio_cell_init(struct cell *cell) unsigned int n; void *pages; - cell->max_mmio_regions = arch_mmio_count_regions(cell); + /* cell is zero-initialized */; for_each_unit(unit) cell->max_mmio_regions += unit->mmio_count_regions(cell); -- 2.13.6 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
