linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized
@ 2017-09-07  6:35 Benjamin Herrenschmidt
  2017-09-14  1:11 ` Russell Currey
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2017-09-07  6:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Russell Currey

Otherwise we end up not yet having computed the right
diag data size on powernv where EEH initialization
is delayed, thus causing memory corruption later on
when calling OPAL.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/eeh.c     |  4 ++++
 arch/powerpc/kernel/eeh_dev.c | 18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 63992b2d8e15..f27eecd5ec7f 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -1018,6 +1018,10 @@ int eeh_init(void)
 	} else if ((ret = eeh_ops->init()))
 		return ret;
 
+	/* Initialize PHB PEs */
+	list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
+		eeh_dev_phb_init_dynamic(hose);
+
 	/* Initialize EEH event */
 	ret = eeh_event_init();
 	if (ret)
diff --git a/arch/powerpc/kernel/eeh_dev.c b/arch/powerpc/kernel/eeh_dev.c
index d6b2ca70d14d..0820b73288c0 100644
--- a/arch/powerpc/kernel/eeh_dev.c
+++ b/arch/powerpc/kernel/eeh_dev.c
@@ -83,21 +83,3 @@ void eeh_dev_phb_init_dynamic(struct pci_controller *phb)
 	/* EEH PE for PHB */
 	eeh_phb_pe_create(phb);
 }
-
-/**
- * eeh_dev_phb_init - Create EEH devices for devices included in existing PHBs
- *
- * Scan all the existing PHBs and create EEH devices for their OF
- * nodes and their children OF nodes
- */
-static int __init eeh_dev_phb_init(void)
-{
-	struct pci_controller *phb, *tmp;
-
-	list_for_each_entry_safe(phb, tmp, &hose_list, list_node)
-		eeh_dev_phb_init_dynamic(phb);
-
-	return 0;
-}
-
-core_initcall(eeh_dev_phb_init);

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

* Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized
  2017-09-07  6:35 [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized Benjamin Herrenschmidt
@ 2017-09-14  1:11 ` Russell Currey
  2017-09-20 10:59 ` Michael Ellerman
  2017-09-22  1:03 ` [1/2] " Michael Ellerman
  2 siblings, 0 replies; 7+ messages in thread
From: Russell Currey @ 2017-09-14  1:11 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev

On Thu, 2017-09-07 at 16:35 +1000, Benjamin Herrenschmidt wrote:
> Otherwise we end up not yet having computed the right
> diag data size on powernv where EEH initialization
> is delayed, thus causing memory corruption later on
> when calling OPAL.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Russell Currey <ruscur@russell.cc>

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

* Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized
  2017-09-07  6:35 [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized Benjamin Herrenschmidt
  2017-09-14  1:11 ` Russell Currey
@ 2017-09-20 10:59 ` Michael Ellerman
  2017-09-20 13:00   ` Benjamin Herrenschmidt
  2017-09-21  2:19   ` Russell Currey
  2017-09-22  1:03 ` [1/2] " Michael Ellerman
  2 siblings, 2 replies; 7+ messages in thread
From: Michael Ellerman @ 2017-09-20 10:59 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev; +Cc: Russell Currey

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> Otherwise we end up not yet having computed the right
> diag data size on powernv where EEH initialization
> is delayed, thus causing memory corruption later on
> when calling OPAL.

When did this break? Do we have a commit we can tag with Fixes: ?
Stable?

I assume we want to merge this ASAP as a fix, I think I can safely take
this without patch 2?

cheers

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

* Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized
  2017-09-20 10:59 ` Michael Ellerman
@ 2017-09-20 13:00   ` Benjamin Herrenschmidt
  2017-09-21  2:19   ` Russell Currey
  1 sibling, 0 replies; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2017-09-20 13:00 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: Russell Currey

On Wed, 2017-09-20 at 20:59 +1000, Michael Ellerman wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> 
> > Otherwise we end up not yet having computed the right
> > diag data size on powernv where EEH initialization
> > is delayed, thus causing memory corruption later on
> > when calling OPAL.
> 
> When did this break? Do we have a commit we can tag with Fixes: ?
> Stable?
> 
> I assume we want to merge this ASAP as a fix, I think I can safely take
> this without patch 2?

Russell, can you help Michael with that ? I don't even remember what's
in patch 2 :)

Cheers,
Ben.

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

* Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized
  2017-09-20 10:59 ` Michael Ellerman
  2017-09-20 13:00   ` Benjamin Herrenschmidt
@ 2017-09-21  2:19   ` Russell Currey
  2017-09-21  4:57     ` Michael Ellerman
  1 sibling, 1 reply; 7+ messages in thread
From: Russell Currey @ 2017-09-21  2:19 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev

On Wed, 2017-09-20 at 20:59 +1000, Michael Ellerman wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> 
> > Otherwise we end up not yet having computed the right
> > diag data size on powernv where EEH initialization
> > is delayed, thus causing memory corruption later on
> > when calling OPAL.
> 
> When did this break? Do we have a commit we can tag with Fixes: ?
> Stable?
> 
> I assume we want to merge this ASAP as a fix, I think I can safely take
> this without patch 2?
> 
> cheers

Yes it should be merged ASAP as a fix, and fixes
5cb1f8fdddb7475f38ea9fba48da17c002eec90b.

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

* Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized
  2017-09-21  2:19   ` Russell Currey
@ 2017-09-21  4:57     ` Michael Ellerman
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2017-09-21  4:57 UTC (permalink / raw)
  To: Russell Currey, Benjamin Herrenschmidt, linuxppc-dev

Russell Currey <ruscur@russell.cc> writes:

> On Wed, 2017-09-20 at 20:59 +1000, Michael Ellerman wrote:
>> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>> 
>> > Otherwise we end up not yet having computed the right
>> > diag data size on powernv where EEH initialization
>> > is delayed, thus causing memory corruption later on
>> > when calling OPAL.
>> 
>> When did this break? Do we have a commit we can tag with Fixes: ?
>> Stable?
>> 
>> I assume we want to merge this ASAP as a fix, I think I can safely take
>> this without patch 2?
>> 
>> cheers
>
> Yes it should be merged ASAP as a fix, and fixes
> 5cb1f8fdddb7475f38ea9fba48da17c002eec90b.

Thanks. I've put patch 1 in fixes-test.

cheers

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

* Re: [1/2] powerpc/eeh: Create PHB PEs after EEH is initialized
  2017-09-07  6:35 [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized Benjamin Herrenschmidt
  2017-09-14  1:11 ` Russell Currey
  2017-09-20 10:59 ` Michael Ellerman
@ 2017-09-22  1:03 ` Michael Ellerman
  2 siblings, 0 replies; 7+ messages in thread
From: Michael Ellerman @ 2017-09-22  1:03 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev; +Cc: Russell Currey

On Thu, 2017-09-07 at 06:35:40 UTC, Benjamin Herrenschmidt wrote:
> Otherwise we end up not yet having computed the right
> diag data size on powernv where EEH initialization
> is delayed, thus causing memory corruption later on
> when calling OPAL.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Acked-by: Russell Currey <ruscur@russell.cc>

Patch 1 applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/3e77adeea3c5393c9b624832f65441

cheers

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

end of thread, other threads:[~2017-09-22  1:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07  6:35 [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized Benjamin Herrenschmidt
2017-09-14  1:11 ` Russell Currey
2017-09-20 10:59 ` Michael Ellerman
2017-09-20 13:00   ` Benjamin Herrenschmidt
2017-09-21  2:19   ` Russell Currey
2017-09-21  4:57     ` Michael Ellerman
2017-09-22  1:03 ` [1/2] " 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).