[SRU][Zesty][PATCH 0/1] powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[SRU][Zesty][PATCH 0/1] powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

Joseph Salisbury-3
BugLink: http://bugs.launchpad.net/bugs/1702768

== SRU Justification ==
A stack trace is generated when enabling SRIOV on power.  This bug was introduced
by commit 4c3b89effc28 in v4.12-rc1.  However, the bug made its way into Zesty
via bug 1690412.  This bug is fixed by mainline commit 377aa6b0efba, which was added
in v4.12-rc6.


== Fix ==
commit 377aa6b0efbaa29cfeecd8b9244641217f9544ca
Author: Alistair Popple <[hidden email]>
Date:   Wed Jun 14 14:47:50 2017 +1000

    powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node


== Regression Potential ==
This fix is specific to power, so low risk for regression.

== Test Case ==
A test kernel was built with this patch and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.

Alistair Popple (1):
  powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no
    of_node

 arch/powerpc/platforms/powernv/npu-dma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[SRU][Zesty][PATCH 1/1] powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

Joseph Salisbury-3
From: Alistair Popple <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1702768

Commit 4c3b89effc28 ("powerpc/powernv: Add sanity checks to
pnv_pci_get_{gpu|npu}_dev") introduced explicit warnings in
pnv_pci_get_npu_dev() when a PCIe device has no associated device-tree
node. However not all PCIe devices have an of_node and
pnv_pci_get_npu_dev() gets indirectly called at least once for every
PCIe device in the system. This results in spurious WARN_ON()'s so
remove it.

The same situation should not exist for pnv_pci_get_gpu_dev() as any
NPU based PCIe device requires a device-tree node.

Fixes: 4c3b89effc28 ("powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev")
Reported-by: Alexey Kardashevskiy <[hidden email]>
Signed-off-by: Alistair Popple <[hidden email]>
Signed-off-by: Michael Ellerman <[hidden email]>
(cherry picked from commit 377aa6b0efbaa29cfeecd8b9244641217f9544ca)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 arch/powerpc/platforms/powernv/npu-dma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c
index 3184c9e..c10ad16 100644
--- a/arch/powerpc/platforms/powernv/npu-dma.c
+++ b/arch/powerpc/platforms/powernv/npu-dma.c
@@ -75,7 +75,8 @@ struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index)
  if (WARN_ON(!gpdev))
  return NULL;
 
- if (WARN_ON(!gpdev->dev.of_node))
+ /* Not all PCI devices have device-tree nodes */
+ if (!gpdev->dev.of_node)
  return NULL;
 
  /* Get assoicated PCI device */
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ACK/cmnt: [SRU][Zesty][PATCH 1/1] powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

Stefan Bader-2
On 12.07.2017 15:47, Joseph Salisbury wrote:

> From: Alistair Popple <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1702768
>
> Commit 4c3b89effc28 ("powerpc/powernv: Add sanity checks to
> pnv_pci_get_{gpu|npu}_dev") introduced explicit warnings in
> pnv_pci_get_npu_dev() when a PCIe device has no associated device-tree
> node. However not all PCIe devices have an of_node and
> pnv_pci_get_npu_dev() gets indirectly called at least once for every
> PCIe device in the system. This results in spurious WARN_ON()'s so
> remove it.
>
> The same situation should not exist for pnv_pci_get_gpu_dev() as any
> NPU based PCIe device requires a device-tree node.
>
> Fixes: 4c3b89effc28 ("powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev")
> Reported-by: Alexey Kardashevskiy <[hidden email]>
> Signed-off-by: Alistair Popple <[hidden email]>
> Signed-off-by: Michael Ellerman <[hidden email]>
> (cherry picked from commit 377aa6b0efbaa29cfeecd8b9244641217f9544ca)
> Signed-off-by: Joseph Salisbury <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---

SRU justification should be added to bug report. Otherwise ok.

-Stefan

>  arch/powerpc/platforms/powernv/npu-dma.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c
> index 3184c9e..c10ad16 100644
> --- a/arch/powerpc/platforms/powernv/npu-dma.c
> +++ b/arch/powerpc/platforms/powernv/npu-dma.c
> @@ -75,7 +75,8 @@ struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index)
>   if (WARN_ON(!gpdev))
>   return NULL;
>  
> - if (WARN_ON(!gpdev->dev.of_node))
> + /* Not all PCI devices have device-tree nodes */
> + if (!gpdev->dev.of_node)
>   return NULL;
>  
>   /* Get assoicated PCI device */
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

NAK: [SRU][Zesty][PATCH 1/1] powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

Seth Forshee
In reply to this post by Joseph Salisbury-3
On Wed, Jul 12, 2017 at 09:47:54AM -0400, Joseph Salisbury wrote:

> From: Alistair Popple <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1702768
>
> Commit 4c3b89effc28 ("powerpc/powernv: Add sanity checks to
> pnv_pci_get_{gpu|npu}_dev") introduced explicit warnings in
> pnv_pci_get_npu_dev() when a PCIe device has no associated device-tree
> node. However not all PCIe devices have an of_node and
> pnv_pci_get_npu_dev() gets indirectly called at least once for every
> PCIe device in the system. This results in spurious WARN_ON()'s so
> remove it.
>
> The same situation should not exist for pnv_pci_get_gpu_dev() as any
> NPU based PCIe device requires a device-tree node.
>
> Fixes: 4c3b89effc28 ("powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev")
> Reported-by: Alexey Kardashevskiy <[hidden email]>
> Signed-off-by: Alistair Popple <[hidden email]>
> Signed-off-by: Michael Ellerman <[hidden email]>
> (cherry picked from commit 377aa6b0efbaa29cfeecd8b9244641217f9544ca)
> Signed-off-by: Joseph Salisbury <[hidden email]>

This patch was already sent/applied for another bug report:

https://lists.ubuntu.com/archives/kernel-team/2017-June/085279.html

So this bug probably should just be duped to the one there.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: NAK: [SRU][Zesty][PATCH 1/1] powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

Joseph Salisbury-3
On 07/12/2017 10:55 AM, Seth Forshee wrote:

> On Wed, Jul 12, 2017 at 09:47:54AM -0400, Joseph Salisbury wrote:
>> From: Alistair Popple <[hidden email]>
>>
>> BugLink: http://bugs.launchpad.net/bugs/1702768
>>
>> Commit 4c3b89effc28 ("powerpc/powernv: Add sanity checks to
>> pnv_pci_get_{gpu|npu}_dev") introduced explicit warnings in
>> pnv_pci_get_npu_dev() when a PCIe device has no associated device-tree
>> node. However not all PCIe devices have an of_node and
>> pnv_pci_get_npu_dev() gets indirectly called at least once for every
>> PCIe device in the system. This results in spurious WARN_ON()'s so
>> remove it.
>>
>> The same situation should not exist for pnv_pci_get_gpu_dev() as any
>> NPU based PCIe device requires a device-tree node.
>>
>> Fixes: 4c3b89effc28 ("powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev")
>> Reported-by: Alexey Kardashevskiy <[hidden email]>
>> Signed-off-by: Alistair Popple <[hidden email]>
>> Signed-off-by: Michael Ellerman <[hidden email]>
>> (cherry picked from commit 377aa6b0efbaa29cfeecd8b9244641217f9544ca)
>> Signed-off-by: Joseph Salisbury <[hidden email]>
> This patch was already sent/applied for another bug report:
>
> https://lists.ubuntu.com/archives/kernel-team/2017-June/085279.html
>
> So this bug probably should just be duped to the one there.

Thanks, Seth.  I'll dupe it.


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Loading...