Lines Matching refs:cfi
409 struct arm_smmu_context_fault_info *cfi) in arm_smmu_read_context_fault_info() argument
411 cfi->iova = arm_smmu_cb_readq(smmu, idx, ARM_SMMU_CB_FAR); in arm_smmu_read_context_fault_info()
412 cfi->fsr = arm_smmu_cb_read(smmu, idx, ARM_SMMU_CB_FSR); in arm_smmu_read_context_fault_info()
413 cfi->fsynr = arm_smmu_cb_read(smmu, idx, ARM_SMMU_CB_FSYNR0); in arm_smmu_read_context_fault_info()
414 cfi->cbfrsynra = arm_smmu_gr1_read(smmu, ARM_SMMU_GR1_CBFRSYNRA(idx)); in arm_smmu_read_context_fault_info()
418 const struct arm_smmu_context_fault_info *cfi) in arm_smmu_print_context_fault_info() argument
422 cfi->fsr, cfi->iova, cfi->fsynr, cfi->cbfrsynra, idx); in arm_smmu_print_context_fault_info()
425 cfi->fsr, in arm_smmu_print_context_fault_info()
426 (cfi->fsr & ARM_SMMU_CB_FSR_MULTI) ? "MULTI " : "", in arm_smmu_print_context_fault_info()
427 (cfi->fsr & ARM_SMMU_CB_FSR_SS) ? "SS " : "", in arm_smmu_print_context_fault_info()
428 (u32)FIELD_GET(ARM_SMMU_CB_FSR_FORMAT, cfi->fsr), in arm_smmu_print_context_fault_info()
429 (cfi->fsr & ARM_SMMU_CB_FSR_UUT) ? " UUT" : "", in arm_smmu_print_context_fault_info()
430 (cfi->fsr & ARM_SMMU_CB_FSR_ASF) ? " ASF" : "", in arm_smmu_print_context_fault_info()
431 (cfi->fsr & ARM_SMMU_CB_FSR_TLBLKF) ? " TLBLKF" : "", in arm_smmu_print_context_fault_info()
432 (cfi->fsr & ARM_SMMU_CB_FSR_TLBMCF) ? " TLBMCF" : "", in arm_smmu_print_context_fault_info()
433 (cfi->fsr & ARM_SMMU_CB_FSR_EF) ? " EF" : "", in arm_smmu_print_context_fault_info()
434 (cfi->fsr & ARM_SMMU_CB_FSR_PF) ? " PF" : "", in arm_smmu_print_context_fault_info()
435 (cfi->fsr & ARM_SMMU_CB_FSR_AFF) ? " AFF" : "", in arm_smmu_print_context_fault_info()
436 (cfi->fsr & ARM_SMMU_CB_FSR_TF) ? " TF" : "", in arm_smmu_print_context_fault_info()
437 cfi->cbfrsynra); in arm_smmu_print_context_fault_info()
440 cfi->fsynr, in arm_smmu_print_context_fault_info()
441 (u32)FIELD_GET(ARM_SMMU_CB_FSYNR0_S1CBNDX, cfi->fsynr), in arm_smmu_print_context_fault_info()
442 (cfi->fsynr & ARM_SMMU_CB_FSYNR0_AFR) ? " AFR" : "", in arm_smmu_print_context_fault_info()
443 (cfi->fsynr & ARM_SMMU_CB_FSYNR0_PTWF) ? " PTWF" : "", in arm_smmu_print_context_fault_info()
444 (cfi->fsynr & ARM_SMMU_CB_FSYNR0_NSATTR) ? " NSATTR" : "", in arm_smmu_print_context_fault_info()
445 (cfi->fsynr & ARM_SMMU_CB_FSYNR0_IND) ? " IND" : "", in arm_smmu_print_context_fault_info()
446 (cfi->fsynr & ARM_SMMU_CB_FSYNR0_PNU) ? " PNU" : "", in arm_smmu_print_context_fault_info()
447 (cfi->fsynr & ARM_SMMU_CB_FSYNR0_WNR) ? " WNR" : "", in arm_smmu_print_context_fault_info()
448 (u32)FIELD_GET(ARM_SMMU_CB_FSYNR0_PLVL, cfi->fsynr)); in arm_smmu_print_context_fault_info()
453 struct arm_smmu_context_fault_info cfi; in arm_smmu_context_fault() local
461 arm_smmu_read_context_fault_info(smmu, idx, &cfi); in arm_smmu_context_fault()
463 if (!(cfi.fsr & ARM_SMMU_CB_FSR_FAULT)) in arm_smmu_context_fault()
466 ret = report_iommu_fault(&smmu_domain->domain, NULL, cfi.iova, in arm_smmu_context_fault()
467 cfi.fsynr & ARM_SMMU_CB_FSYNR0_WNR ? IOMMU_FAULT_WRITE : IOMMU_FAULT_READ); in arm_smmu_context_fault()
470 arm_smmu_print_context_fault_info(smmu, idx, &cfi); in arm_smmu_context_fault()
472 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_FSR, cfi.fsr); in arm_smmu_context_fault()