LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] iommu/amd: print out "tag" in INVALID_PPR_REQUEST
@ 2019-05-06  4:11 Qian Cai
  2019-05-07 13:47 ` Gary R Hook
  0 siblings, 1 reply; 4+ messages in thread
From: Qian Cai @ 2019-05-06  4:11 UTC (permalink / raw)
  To: jroedel; +Cc: gary.hook, iommu, linux-kernel, Qian Cai

The commit e7f63ffc1bf1 ("iommu/amd: Update logging information for new
event type") introduced a variable "tag" but had never used it which
generates a warning below,

drivers/iommu/amd_iommu.c: In function 'iommu_print_event':
drivers/iommu/amd_iommu.c:567:33: warning: variable 'tag' set but not
used [-Wunused-but-set-variable]
  int type, devid, pasid, flags, tag;
                                 ^~~
so just use it during the logging.

Signed-off-by: Qian Cai <cai@lca.pw>
---
 drivers/iommu/amd_iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index f7cdd2ab7f11..52f41369c5b3 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -631,9 +631,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
 		pasid = ((event[0] >> 16) & 0xFFFF)
 			| ((event[1] << 6) & 0xF0000);
 		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]\n",
+		dev_err(dev, "Event logged [INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x tag=0x%04x address=0x%llx flags=0x%04x]\n",
 			PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
-			pasid, address, flags);
+			pasid, tag, address, flags);
 		break;
 	default:
 		dev_err(dev, "Event logged [UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",
-- 
2.20.1 (Apple Git-117)


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

* Re: [PATCH] iommu/amd: print out "tag" in INVALID_PPR_REQUEST
  2019-05-06  4:11 [PATCH] iommu/amd: print out "tag" in INVALID_PPR_REQUEST Qian Cai
@ 2019-05-07 13:47 ` Gary R Hook
  2019-05-14 14:55   ` Qian Cai
  0 siblings, 1 reply; 4+ messages in thread
From: Gary R Hook @ 2019-05-07 13:47 UTC (permalink / raw)
  To: Qian Cai, jroedel; +Cc: Hook, Gary, iommu, linux-kernel

On 5/5/19 11:11 PM, Qian Cai wrote:
> [CAUTION: External Email]
> 
> The commit e7f63ffc1bf1 ("iommu/amd: Update logging information for new
> event type") introduced a variable "tag" but had never used it which
> generates a warning below,
> 
> drivers/iommu/amd_iommu.c: In function 'iommu_print_event':
> drivers/iommu/amd_iommu.c:567:33: warning: variable 'tag' set but not
> used [-Wunused-but-set-variable]
>    int type, devid, pasid, flags, tag;
>                                   ^~~
> so just use it during the logging.
> 
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
>   drivers/iommu/amd_iommu.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index f7cdd2ab7f11..52f41369c5b3 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -631,9 +631,9 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt)
>                  pasid = ((event[0] >> 16) & 0xFFFF)
>                          | ((event[1] << 6) & 0xF0000);
>                  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]\n",
> +               dev_err(dev, "Event logged [INVALID_PPR_REQUEST device=%02x:%02x.%x pasid=0x%05x tag=0x%04x address=0x%llx flags=0x%04x]\n",
>                          PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid),
> -                       pasid, address, flags);
> +                       pasid, tag, address, flags);
>                  break;
>          default:
>                  dev_err(dev, "Event logged [UNKNOWN event[0]=0x%08x event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",

I did manage to overlook that variable when I posted the original patch. 
But it looks to me like 41e59a41fc5d1 (iommu tree) already fixed this... 
I'm not sure why it never got pushed to the main tree.

grh


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

* Re: [PATCH] iommu/amd: print out "tag" in INVALID_PPR_REQUEST
  2019-05-07 13:47 ` Gary R Hook
@ 2019-05-14 14:55   ` Qian Cai
  2019-05-28 13:37     ` jroedel
  0 siblings, 1 reply; 4+ messages in thread
From: Qian Cai @ 2019-05-14 14:55 UTC (permalink / raw)
  To: Gary R Hook, jroedel; +Cc: Hook, Gary, iommu, linux-kernel

On Tue, 2019-05-07 at 13:47 +0000, Gary R Hook wrote:
> On 5/5/19 11:11 PM, Qian Cai wrote:
> > [CAUTION: External Email]
> > 
> > The commit e7f63ffc1bf1 ("iommu/amd: Update logging information for new
> > event type") introduced a variable "tag" but had never used it which
> > generates a warning below,
> > 
> > drivers/iommu/amd_iommu.c: In function 'iommu_print_event':
> > drivers/iommu/amd_iommu.c:567:33: warning: variable 'tag' set but not
> > used [-Wunused-but-set-variable]
> >    int type, devid, pasid, flags, tag;
> >                                   ^~~
> > so just use it during the logging.
> > 
> > Signed-off-by: Qian Cai <cai@lca.pw>
> > ---
> >   drivers/iommu/amd_iommu.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> > index f7cdd2ab7f11..52f41369c5b3 100644
> > --- a/drivers/iommu/amd_iommu.c
> > +++ b/drivers/iommu/amd_iommu.c
> > @@ -631,9 +631,9 @@ static void iommu_print_event(struct amd_iommu *iommu,
> > void *__evt)
> >                  pasid = ((event[0] >> 16) & 0xFFFF)
> >                          | ((event[1] << 6) & 0xF0000);
> >                  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]\n",
> > +               dev_err(dev, "Event logged [INVALID_PPR_REQUEST
> > device=%02x:%02x.%x pasid=0x%05x tag=0x%04x address=0x%llx flags=0x%04x]\n",
> >                          PCI_BUS_NUM(devid), PCI_SLOT(devid),
> > PCI_FUNC(devid),
> > -                       pasid, address, flags);
> > +                       pasid, tag, address, flags);
> >                  break;
> >          default:
> >                  dev_err(dev, "Event logged [UNKNOWN event[0]=0x%08x
> > event[1]=0x%08x event[2]=0x%08x event[3]=0x%08x\n",
> 
> I did manage to overlook that variable when I posted the original patch. 
> But it looks to me like 41e59a41fc5d1 (iommu tree) already fixed this... 
> I'm not sure why it never got pushed to the main tree.

Jroedel, I am wondering what the plan for 41e59a41fc5d1 (iommu tree) or this
patch to be pushed to the linux-next or mainline...

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

* Re: [PATCH] iommu/amd: print out "tag" in INVALID_PPR_REQUEST
  2019-05-14 14:55   ` Qian Cai
@ 2019-05-28 13:37     ` jroedel
  0 siblings, 0 replies; 4+ messages in thread
From: jroedel @ 2019-05-28 13:37 UTC (permalink / raw)
  To: Qian Cai; +Cc: Gary R Hook, Hook, Gary, iommu, linux-kernel

On Tue, May 14, 2019 at 10:55:46AM -0400, Qian Cai wrote:
> Jroedel, I am wondering what the plan for 41e59a41fc5d1 (iommu tree) or this
> patch to be pushed to the linux-next or mainline...

Looks like I applied that patch directly to the master branch, which is
not what goes upstream. I cherry-picked it to x86/amd, so it will go
upstream for v5.3.


Regards,

	Joerg

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

end of thread, other threads:[~2019-05-28 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06  4:11 [PATCH] iommu/amd: print out "tag" in INVALID_PPR_REQUEST Qian Cai
2019-05-07 13:47 ` Gary R Hook
2019-05-14 14:55   ` Qian Cai
2019-05-28 13:37     ` jroedel

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).