Commit 470eb3b3 authored by Suthikulpanit, Suravee's avatar Suthikulpanit, Suravee Committed by Joerg Roedel

iommu/amd: Simpify decoding logic for INVALID_PPR_REQUEST event

Reuse existing macro to simplify the code and improve readability.

Cc: Joerg Roedel <jroedel@suse.de>
Cc: Gary R Hook <gary.hook@amd.com>
Signed-off-by: default avatarSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent be62dbf5
......@@ -617,8 +617,7 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
pasid, address, flags);
break;
case EVENT_TYPE_INV_PPR_REQ:
pasid = ((event[0] >> 16) & 0xFFFF)
| ((event[1] << 6) & 0xF0000);
pasid = PPR_PASID(*((u64 *)__evt));
tag = event[1] & 0x03FF;
dev_err(dev, "Event logged [INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x address=0x%llx flags=0x%04x tag=0x%03x]\n",
PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
......
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