From: Jan Kiszka <[email protected]> Reporting of the number of configures stream IDs does not provide any value. Rather report StreamID assignments.
Convert two unlikely error outputs into trace_error. Furthermore, report "stage-2" consistently. Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm64/smmu.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hypervisor/arch/arm64/smmu.c b/hypervisor/arch/arm64/smmu.c index f20a44f6..f17fca09 100644 --- a/hypervisor/arch/arm64/smmu.c +++ b/hypervisor/arch/arm64/smmu.c @@ -610,10 +610,8 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu) smmu->features |= ARM_SMMU_FEAT_STREAM_MATCH; size = (id >> ID0_NUMSMRG_SHIFT) & ID0_NUMSMRG_MASK; - if (size == 0) { - printk("Stream matching is supported, but no SMRs present!\n"); - return -ENODEV; - } + if (size == 0) + return trace_error(-ENODEV); /* Zero-initialised to mark as invalid */ smmu->smrs = page_alloc(&mem_pool, PAGES(size * sizeof(*smmu->smrs))); @@ -656,12 +654,10 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu) smmu->num_s2_context_banks = (id >> ID1_NUMS2CB_SHIFT) & ID1_NUMS2CB_MASK; smmu->num_context_banks = (id >> ID1_NUMCB_SHIFT) & ID1_NUMCB_MASK; - if (smmu->num_s2_context_banks > smmu->num_context_banks) { - printk("Impossible number of S2 context banks!\n"); - return -ENODEV; - } + if (smmu->num_s2_context_banks > smmu->num_context_banks) + return trace_error(-ENODEV); - printk(" %u context banks (%u stage 2 only)\n", + printk(" %u context banks (%u stage-2 only)\n", smmu->num_context_banks, smmu->num_s2_context_banks); smmu->cbs = page_alloc(&mem_pool, PAGES(smmu->num_context_banks @@ -830,6 +826,9 @@ static int arm_smmu_cell_init(struct cell *cell) return trace_error(-ret); idx = ret; + printk("Assigning StreamID 0x%x to cell \"%s\"\n", + sid, cell->config->name); + s2cr[idx].type = type; s2cr[idx].privcfg = S2CR_PRIVCFG_DEFAULT; s2cr[idx].cbndx = cfg->cbndx; @@ -843,8 +842,6 @@ static int arm_smmu_cell_init(struct cell *cell) arm_smmu_write_smr(smmu, idx); } - printk("Found %d masters\n", n); - mmio_write32(ARM_SMMU_GR0(smmu) + ARM_SMMU_GR0_TLBIVMID, cfg->vmid); ret = arm_smmu_tlb_sync_global(smmu); -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/05038bf42660279774b93e05401732af771f19a1.1601838005.git.jan.kiszka%40siemens.com.
