linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iommu: amd: Simpify decoding logic for INVALID_PPR_REQUEST event
@ 2019-10-14 20:06 Suthikulpanit, Suravee
  2019-10-15 12:14 ` joro
  0 siblings, 1 reply; 2+ messages in thread
From: Suthikulpanit, Suravee @ 2019-10-14 20:06 UTC (permalink / raw)
  To: linux-kernel, iommu
  Cc: joro, Suthikulpanit, Suravee, Joerg Roedel, Hook, Gary

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>
---
 drivers/iommu/amd_iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index c1cb759..b249aa7 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -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),
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: iommu: amd: Simpify decoding logic for INVALID_PPR_REQUEST event
  2019-10-14 20:06 iommu: amd: Simpify decoding logic for INVALID_PPR_REQUEST event Suthikulpanit, Suravee
@ 2019-10-15 12:14 ` joro
  0 siblings, 0 replies; 2+ messages in thread
From: joro @ 2019-10-15 12:14 UTC (permalink / raw)
  To: Suthikulpanit, Suravee; +Cc: linux-kernel, iommu, Joerg Roedel, Hook, Gary

On Mon, Oct 14, 2019 at 08:06:19PM +0000, Suthikulpanit, Suravee wrote:
> 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>
> ---
>  drivers/iommu/amd_iommu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied for v5.5, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-15 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 20:06 iommu: amd: Simpify decoding logic for INVALID_PPR_REQUEST event Suthikulpanit, Suravee
2019-10-15 12:14 ` joro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).