iommu/vt-d: Drop "0x" prefix from PCI bus & device addresses
Subsystems (2)
PATCH 1/1 iommu/vt-d: Drop "0x" prefix from PCI bus & device addresses
From: Bjorn Helgaas <[email protected]>
719a19335692 ("iommu/vt-d: Tweak the description of a DMA fault") changed the DMA fault reason from hex to decimal. It also added "0x" prefixes to the PCI bus/device, e.g.,
- DMAR: [INTR-REMAP] Request device [00:00.5]
+ DMAR: [INTR-REMAP] Request device [0x00:0x00.5]
These no longer match dev_printk() and other similar messages in dmar_match_pci_path() and dmar_acpi_insert_dev_scope().
Drop the "0x" prefixes from the bus and device addresses.
--- drivers/iommu/intel/dmar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iommu/intel/dmar.c +3 -3
@@ -1944,18 +1944,18 @@ static int dmar_fault_do_one(struct intel_iommu *iommu, int type, reason =dmar_get_fault_reason (fault_reason, &fault_type);if (fault_type ==INTR_REMAP ) -pr_err ("[INTR-REMAP] Request device [0x%02x:0x%02x.%d] fault index 0x%llx [fault reason 0x%02x] %s\n" , +pr_err ("[INTR-REMAP] Request device [%02x:%02x.%d] fault index 0x%llx [fault reason 0x%02x] %s\n" , source_id >>8 ,PCI_SLOT (source_id &0xFF ),PCI_FUNC (source_id &0xFF ), addr >>48 , fault_reason, reason);else if (pasid ==INVALID_IOASID ) -pr_err ("[%s NO_PASID] Request device [0x%02x:0x%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n" , +pr_err ("[%s NO_PASID] Request device [%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n" , type ?"DMA Read" :"DMA Write" , source_id >>8 ,PCI_SLOT (source_id &0xFF ),PCI_FUNC (source_id &0xFF ), addr, fault_reason, reason);else - pr_err("[%s PASID 0x%x] Request device [0x%02x:0x%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n", + pr_err("[%s PASID 0x%x] Request device [%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n", type ? "DMA Read" : "DMA Write", pasid, source_id >> 8, PCI_SLOT(source_id & 0xFF), PCI_FUNC(source_id & 0xFF), addr,
Signature · 1 line
2.25.1
Lu Baolu
maintainerHi Bjorn,
Quoted 9 lines · Bjorn Helgaas
From: Bjorn Helgaas <[email protected]>
719a19335692("iommu/vt-d: Tweak the description of a DMA fault") changed the DMA fault reason from hex to decimal. It also added "0x" prefixes to the PCI bus/device, e.g.,- DMAR: [INTR-REMAP] Request device [00:00.5]
+ DMAR: [INTR-REMAP] Request device [0x00:0x00.5]
Quoted 7 lines
These no longer match
dev_printk()and other similar messages indmar_match_pci_path()anddmar_acpi_insert_dev_scope().Drop the "0x" prefixes from the bus and device addresses.
Fixes 719a19335692 ("iommu/vt-d: Tweak the description of a DMA fault")Signed-off-by Bjorn Helgaas <[email protected]>
Thank you for this fix. I have queued it for v5.15.
Best regards,
baolu
Quoted 21 lines
--- drivers/iommu/intel/dmar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/iommu/intel/dmar.c +2
-2@@ -1944,18 +1944,18 @@ static int dmar_fault_do_one(struct intel_iommu *iommu, int type, reason =dmar_get_fault_reason (fault_reason, &fault_type);if (fault_type ==INTR_REMAP ) -pr_err ("[INTR-REMAP] Request device [0x%02x:0x%02x.%d] fault index 0x%llx [fault reason 0x%02x] %s\n" , +pr_err ("[INTR-REMAP] Request device [%02x:%02x.%d] fault index 0x%llx [fault reason 0x%02x] %s\n" , source_id >>8 ,PCI_SLOT (source_id &0xFF ),PCI_FUNC (source_id &0xFF ), addr >>48 , fault_reason, reason);else if (pasid ==INVALID_IOASID ) - pr_err("[%s NO_PASID] Request device [0x%02x:0x%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n", + pr_err("[%s NO_PASID] Request device [%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n",
drivers/iommu/intel/dmar.c static int dmar_fault_do_one(struct intel_iommu *iommu, int type, · line 1961
Quoted 10 lines
drivers/iommu/intel/dmar.c +1
-1type ?"DMA Read" :"DMA Write" , source_id >>8 ,PCI_SLOT (source_id &0xFF ),PCI_FUNC (source_id &0xFF ), addr, fault_reason, reason); else - pr_err("[%s PASID 0x%x] Request device [0x%02x:0x%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n", + pr_err("[%s PASID 0x%x] Request device [%02x:%02x.%d] fault addr 0x%llx [fault reason 0x%02x] %s\n", type ?"DMA Read" :"DMA Write" , pasid, source_id >>8 ,PCI_SLOT (source_id &0xFF ), PCI_FUNC(source_id & 0xFF), addr,
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu