From: Jan Kiszka <jan.kis...@siemens.com> No need to have that inner function separately.
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- hypervisor/arch/arm64/smmu.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/hypervisor/arch/arm64/smmu.c b/hypervisor/arch/arm64/smmu.c index dc476618..2cd5157c 100644 --- a/hypervisor/arch/arm64/smmu.c +++ b/hypervisor/arch/arm64/smmu.c @@ -320,14 +320,15 @@ static void arm_smmu_write_sme(struct arm_smmu_device *smmu, int idx) } /* Wait for any pending TLB invalidations to complete */ -static int __arm_smmu_tlb_sync(struct arm_smmu_device *smmu, - void *sync, void *status) +static int arm_smmu_tlb_sync_global(struct arm_smmu_device *smmu) { + void *base = ARM_SMMU_GR0(smmu); unsigned int delay, i; - mmio_write32(sync, 0); + mmio_write32(base + ARM_SMMU_GR0_sTLBGSYNC, 0); for (delay = 1; delay < TLB_LOOP_TIMEOUT; delay *= 2) { - if (!(mmio_read32(status) & sTLBGSTATUS_GSACTIVE)) + if (!(mmio_read32(base + ARM_SMMU_GR0_sTLBGSTATUS) & + sTLBGSTATUS_GSACTIVE)) return 0; for (i = 0; i < 10 * 1000000; i++) cpu_relax(); @@ -337,17 +338,6 @@ static int __arm_smmu_tlb_sync(struct arm_smmu_device *smmu, return trace_error(-EINVAL); } -static int arm_smmu_tlb_sync_global(struct arm_smmu_device *smmu) -{ - int ret; - void *base = ARM_SMMU_GR0(smmu); - - ret = __arm_smmu_tlb_sync(smmu, base + ARM_SMMU_GR0_sTLBGSYNC, - base + ARM_SMMU_GR0_sTLBGSTATUS); - - return ret; -} - static int arm_smmu_init_context_bank(struct arm_smmu_device *smmu, struct arm_smmu_cfg *cfg, struct cell *cell) -- 2.26.2 -- 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 jailhouse-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/fee50d3d617b6ab72c4e22371adf31b394a9454b.1601023807.git.jan.kiszka%40siemens.com.