* [PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported
@ 2016-11-16 1:12 Russell Currey
2016-11-16 1:22 ` Gavin Shan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell Currey @ 2016-11-16 1:12 UTC (permalink / raw)
To: linuxppc-dev; +Cc: gwshan, alistair, Russell Currey
Whenever a PE is initialised in powernv, opal_pci_eeh_freeze_clear() is
called. This is to remove any existing freeze, and has no negative side
effects if the PE is already in an unfrozen state. On PHB backends that
don't support this operation and return OPAL_UNSUPPORTED, this creates a
scary and misleading warning message.
Skip the warning message on init if OPAL_UNSUPPORTED is returned.
As far as I'm aware, this currently only affects NPUs.
Fixes: 313483d ("powerpc/powernv: Unfreeze PE on allocation")
Signed-off-by: Russell Currey <ruscur@russell.cc>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index d4b33dd..dcdfee0 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -145,7 +145,7 @@ static struct pnv_ioda_pe *pnv_ioda_init_pe(struct pnv_phb *phb, int pe_no)
*/
rc = opal_pci_eeh_freeze_clear(phb->opal_id, pe_no,
OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
- if (rc != OPAL_SUCCESS)
+ if (rc != OPAL_SUCCESS && rc != OPAL_UNSUPPORTED)
pr_warn("%s: Error %lld unfreezing PHB#%d-PE#%d\n",
__func__, rc, phb->hose->global_number, pe_no);
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported
2016-11-16 1:12 [PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported Russell Currey
@ 2016-11-16 1:22 ` Gavin Shan
2016-11-16 3:10 ` Andrew Donnellan
2016-11-25 0:04 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Gavin Shan @ 2016-11-16 1:22 UTC (permalink / raw)
To: Russell Currey; +Cc: linuxppc-dev, gwshan, alistair
On Wed, Nov 16, 2016 at 12:12:26PM +1100, Russell Currey wrote:
>Whenever a PE is initialised in powernv, opal_pci_eeh_freeze_clear() is
>called. This is to remove any existing freeze, and has no negative side
>effects if the PE is already in an unfrozen state. On PHB backends that
>don't support this operation and return OPAL_UNSUPPORTED, this creates a
>scary and misleading warning message.
>
>Skip the warning message on init if OPAL_UNSUPPORTED is returned.
>
>As far as I'm aware, this currently only affects NPUs.
>
>Fixes: 313483d ("powerpc/powernv: Unfreeze PE on allocation")
>Signed-off-by: Russell Currey <ruscur@russell.cc>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>---
> arch/powerpc/platforms/powernv/pci-ioda.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
>index d4b33dd..dcdfee0 100644
>--- a/arch/powerpc/platforms/powernv/pci-ioda.c
>+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
>@@ -145,7 +145,7 @@ static struct pnv_ioda_pe *pnv_ioda_init_pe(struct pnv_phb *phb, int pe_no)
> */
> rc = opal_pci_eeh_freeze_clear(phb->opal_id, pe_no,
> OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
>- if (rc != OPAL_SUCCESS)
>+ if (rc != OPAL_SUCCESS && rc != OPAL_UNSUPPORTED)
> pr_warn("%s: Error %lld unfreezing PHB#%d-PE#%d\n",
> __func__, rc, phb->hose->global_number, pe_no);
>
>--
>2.10.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported
2016-11-16 1:12 [PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported Russell Currey
2016-11-16 1:22 ` Gavin Shan
@ 2016-11-16 3:10 ` Andrew Donnellan
2016-11-25 0:04 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Donnellan @ 2016-11-16 3:10 UTC (permalink / raw)
To: Russell Currey, linuxppc-dev; +Cc: alistair, gwshan
On 16/11/16 12:12, Russell Currey wrote:
> Whenever a PE is initialised in powernv, opal_pci_eeh_freeze_clear() is
> called. This is to remove any existing freeze, and has no negative side
> effects if the PE is already in an unfrozen state. On PHB backends that
> don't support this operation and return OPAL_UNSUPPORTED, this creates a
> scary and misleading warning message.
>
> Skip the warning message on init if OPAL_UNSUPPORTED is returned.
>
> As far as I'm aware, this currently only affects NPUs.
>
> Fixes: 313483d ("powerpc/powernv: Unfreeze PE on allocation")
> Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc/powernv: Don't warn on PE init if unfreeze is unsupported
2016-11-16 1:12 [PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported Russell Currey
2016-11-16 1:22 ` Gavin Shan
2016-11-16 3:10 ` Andrew Donnellan
@ 2016-11-25 0:04 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2016-11-25 0:04 UTC (permalink / raw)
To: Russell Currey, linuxppc-dev; +Cc: alistair, gwshan, Russell Currey
On Wed, 2016-11-16 at 01:12:26 UTC, Russell Currey wrote:
> Whenever a PE is initialised in powernv, opal_pci_eeh_freeze_clear() is
> called. This is to remove any existing freeze, and has no negative side
> effects if the PE is already in an unfrozen state. On PHB backends that
> don't support this operation and return OPAL_UNSUPPORTED, this creates a
> scary and misleading warning message.
>
> Skip the warning message on init if OPAL_UNSUPPORTED is returned.
>
> As far as I'm aware, this currently only affects NPUs.
>
> Fixes: 313483d ("powerpc/powernv: Unfreeze PE on allocation")
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/d4791db527bf397c84c9956c3ece96
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-25 0:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 1:12 [PATCH] powerpc/powernv: Don't warn on PE init if unfreeze is unsupported Russell Currey
2016-11-16 1:22 ` Gavin Shan
2016-11-16 3:10 ` Andrew Donnellan
2016-11-25 0:04 ` Michael Ellerman
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).