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: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
Suthikulpanit, Suravee 2019-10-14 20:06:19 +00:00 committed by Joerg Roedel
parent be62dbf554
commit 470eb3b311
1 changed files with 1 additions and 2 deletions

View File

@ -617,8 +617,7 @@ retry:
pasid, address, flags); pasid, address, flags);
break; break;
case EVENT_TYPE_INV_PPR_REQ: case EVENT_TYPE_INV_PPR_REQ:
pasid = ((event[0] >> 16) & 0xFFFF) pasid = PPR_PASID(*((u64 *)__evt));
| ((event[1] << 6) & 0xF0000);
tag = event[1] & 0x03FF; 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", 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), PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),