Skip to content

Commit

Permalink
iommu/amd: Simpify decoding logic for INVALID_PPR_REQUEST event
Browse files Browse the repository at this point in the history
Reuse existing macro to simplify the code and improve readability.

Cc: Joerg Roedel <[email protected]>
Cc: Gary R Hook <[email protected]>
Signed-off-by: Suravee Suthikulpanit <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
ssuthiku-amd authored and joergroedel committed Oct 15, 2019
1 parent be62dbf commit 470eb3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 470eb3b

Please sign in to comment.