linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of/dynamic: Fix test for PPC_PSERIES
@ 2015-06-04  9:34 Geert Uytterhoeven
  2015-06-04 10:57 ` Michael Ellerman
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04  9:34 UTC (permalink / raw)
  To: Grant Likely, Rob Herring, Paul Mackerras,
	Benjamin Herrenschmidt, Michael Ellerman
  Cc: devicetree, linuxppc-dev, linux-kernel, Geert Uytterhoeven

"IS_ENABLED(PPC_PSERIES)" always evaluates to false, as IS_ENABLED() is
supposed to be used with the full Kconfig symbol name, including the
"CONFIG_" prefix.

Add the missing "CONFIG_" prefix to fix this.

Fixes: a25095d451ece23b ("of: Move dynamic node fixups out of powerpc and into common code")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Did this bug cause any breakage?
If yes, the fix should go to stable (for v3.17 and later).
---
 drivers/of/dynamic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index dee658de72b3b221..1901f8870591fe30 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -226,7 +226,7 @@ void __of_attach_node(struct device_node *np)
 	phandle = __of_get_property(np, "phandle", &sz);
 	if (!phandle)
 		phandle = __of_get_property(np, "linux,phandle", &sz);
-	if (IS_ENABLED(PPC_PSERIES) && !phandle)
+	if (IS_ENABLED(CONFIG_PPC_PSERIES) && !phandle)
 		phandle = __of_get_property(np, "ibm,phandle", &sz);
 	np->phandle = (phandle && (sz >= 4)) ? be32_to_cpup(phandle) : 0;
 
-- 
1.9.1


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

* Re: of/dynamic: Fix test for PPC_PSERIES
  2015-06-04  9:34 [PATCH] of/dynamic: Fix test for PPC_PSERIES Geert Uytterhoeven
@ 2015-06-04 10:57 ` Michael Ellerman
  2015-06-05  0:43   ` Nathan Fontenot
  2015-06-05  1:44   ` Grant Likely
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Ellerman @ 2015-06-04 10:57 UTC (permalink / raw)
  To: Geert Uytterhoeven, Grant Likely, Rob Herring, Paul Mackerras,
	Benjamin Herrenschmidt
  Cc: devicetree, linuxppc-dev, linux-kernel, Geert Uytterhoeven, nfont

On Thu, 2015-04-06 at 09:34:41 UTC, Geert Uytterhoeven wrote:
> "IS_ENABLED(PPC_PSERIES)" always evaluates to false, as IS_ENABLED() is
> supposed to be used with the full Kconfig symbol name, including the
> "CONFIG_" prefix.
> 
> Add the missing "CONFIG_" prefix to fix this.
> 
> Fixes: a25095d451ece23b ("of: Move dynamic node fixups out of powerpc and into common code")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

> Did this bug cause any breakage?
> If yes, the fix should go to stable (for v3.17 and later).

Yikes. Not that I've heard of. But it's reasonably new so possibly it's not hit
distros that folks tend to run on those machines.

I'm also not clear how it would break, it could be subtle and we've not noticed.

Nathan might have more of an idea (on CC).

On my machine here everything that has an ibm,phandle also has a linux,phandle,
so we wouldn't hit that code path. But I'm not sure how representative that box
is.

cheers

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

* Re: of/dynamic: Fix test for PPC_PSERIES
  2015-06-04 10:57 ` Michael Ellerman
@ 2015-06-05  0:43   ` Nathan Fontenot
  2015-06-05  1:44   ` Grant Likely
  1 sibling, 0 replies; 4+ messages in thread
From: Nathan Fontenot @ 2015-06-05  0:43 UTC (permalink / raw)
  To: Michael Ellerman, Geert Uytterhoeven, Grant Likely, Rob Herring,
	Paul Mackerras, Benjamin Herrenschmidt
  Cc: devicetree, linuxppc-dev, linux-kernel

On 06/04/2015 05:57 AM, Michael Ellerman wrote:
> On Thu, 2015-04-06 at 09:34:41 UTC, Geert Uytterhoeven wrote:
>> "IS_ENABLED(PPC_PSERIES)" always evaluates to false, as IS_ENABLED() is
>> supposed to be used with the full Kconfig symbol name, including the
>> "CONFIG_" prefix.
>>
>> Add the missing "CONFIG_" prefix to fix this.
>>
>> Fixes: a25095d451ece23b ("of: Move dynamic node fixups out of powerpc and into common code")
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> ---
> 
>> Did this bug cause any breakage?
>> If yes, the fix should go to stable (for v3.17 and later).
> 
> Yikes. Not that I've heard of. But it's reasonably new so possibly it's not hit
> distros that folks tend to run on those machines.

I think we do have some distros that have picked this up.

> 
> I'm also not clear how it would break, it could be subtle and we've not noticed.
> 

The only place I can find that this might cause an issue is during device tree
updating that pseries does after a live migration or suspend/resume. When
removing or updating a device tree node we look up the node by ibm,phandle and
without this patch we wouldn't find these nodes.

I have not seen any issues because of this but I think pushing this to stable
would be good.

-Nathan


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

* Re: of/dynamic: Fix test for PPC_PSERIES
  2015-06-04 10:57 ` Michael Ellerman
  2015-06-05  0:43   ` Nathan Fontenot
@ 2015-06-05  1:44   ` Grant Likely
  1 sibling, 0 replies; 4+ messages in thread
From: Grant Likely @ 2015-06-05  1:44 UTC (permalink / raw)
  To: Michael Ellerman, Geert Uytterhoeven, Rob Herring,
	Paul Mackerras, Benjamin Herrenschmidt
  Cc: devicetree, linuxppc-dev, linux-kernel, Geert Uytterhoeven, nfont

On Thu,  4 Jun 2015 20:57:32 +1000 (AEST)
, Michael Ellerman <mpe@ellerman.id.au>
 wrote:
> On Thu, 2015-04-06 at 09:34:41 UTC, Geert Uytterhoeven wrote:
> > "IS_ENABLED(PPC_PSERIES)" always evaluates to false, as IS_ENABLED() is
> > supposed to be used with the full Kconfig symbol name, including the
> > "CONFIG_" prefix.
> > 
> > Add the missing "CONFIG_" prefix to fix this.
> > 
> > Fixes: a25095d451ece23b ("of: Move dynamic node fixups out of powerpc and into common code")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> 
> > Did this bug cause any breakage?
> > If yes, the fix should go to stable (for v3.17 and later).
> 
> Yikes. Not that I've heard of. But it's reasonably new so possibly it's not hit
> distros that folks tend to run on those machines.
> 
> I'm also not clear how it would break, it could be subtle and we've not noticed.
> 
> Nathan might have more of an idea (on CC).
> 
> On my machine here everything that has an ibm,phandle also has a linux,phandle,
> so we wouldn't hit that code path. But I'm not sure how representative that box
> is.
> 
> cheers

Still, an obvious bug. I've picked it up and marked for stable.

g.



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

end of thread, other threads:[~2015-06-05  1:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04  9:34 [PATCH] of/dynamic: Fix test for PPC_PSERIES Geert Uytterhoeven
2015-06-04 10:57 ` Michael Ellerman
2015-06-05  0:43   ` Nathan Fontenot
2015-06-05  1:44   ` Grant Likely

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