Commit a0fe14d7 authored by Alex Williamson's avatar Alex Williamson Committed by Joerg Roedel

iommu/vt-d: Improve fault handler error messages

Remove new line in error logs, avoid duplicate and explicit pr_fmt.
Suggested-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Fixes: 0ac2491f ('x86, dmar: move page fault handling code to dmar.c')
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent c43fce4e
...@@ -1579,18 +1579,14 @@ static int dmar_fault_do_one(struct intel_iommu *iommu, int type, ...@@ -1579,18 +1579,14 @@ static int dmar_fault_do_one(struct intel_iommu *iommu, int type,
reason = dmar_get_fault_reason(fault_reason, &fault_type); reason = dmar_get_fault_reason(fault_reason, &fault_type);
if (fault_type == INTR_REMAP) if (fault_type == INTR_REMAP)
pr_err("INTR-REMAP: Request device [[%02x:%02x.%d] " pr_err("[INTR-REMAP] Request device [%02x:%02x.%d] fault index %llx [fault reason %02d] %s\n",
"fault index %llx\n" source_id >> 8, PCI_SLOT(source_id & 0xFF),
"INTR-REMAP:[fault reason %02d] %s\n",
(source_id >> 8), PCI_SLOT(source_id & 0xFF),
PCI_FUNC(source_id & 0xFF), addr >> 48, PCI_FUNC(source_id & 0xFF), addr >> 48,
fault_reason, reason); fault_reason, reason);
else else
pr_err("DMAR:[%s] Request device [%02x:%02x.%d] " pr_err("[%s] Request device [%02x:%02x.%d] fault addr %llx [fault reason %02d] %s\n",
"fault addr %llx \n" type ? "DMA Read" : "DMA Write",
"DMAR:[fault reason %02d] %s\n", source_id >> 8, PCI_SLOT(source_id & 0xFF),
(type ? "DMA Read" : "DMA Write"),
(source_id >> 8), PCI_SLOT(source_id & 0xFF),
PCI_FUNC(source_id & 0xFF), addr, fault_reason, reason); PCI_FUNC(source_id & 0xFF), addr, fault_reason, reason);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment