stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* powerpc/ps3: Fix system hang with GCC 5 builds
@ 2016-11-29 18:47 Geoff Levand
  2016-11-29 19:01 ` Greg KH
  2016-12-03 11:28 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Geoff Levand @ 2016-11-29 18:47 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: stable, linuxppc-dev

GCC 5 generates different code for this bootwrapper null check
that causes the PS3 to hang very early in its bootup.  This
check is of limited value, so just get rid of it.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
  arch/powerpc/boot/ps3-head.S | 5 -----
  arch/powerpc/boot/ps3.c      | 8 +-------
  2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S
index b6fcbaf..3dc44b0 100644
--- a/arch/powerpc/boot/ps3-head.S
+++ b/arch/powerpc/boot/ps3-head.S
@@ -57,11 +57,6 @@ __system_reset_overlay:
  	bctr
  
  1:
-	/* Save the value at addr zero for a null pointer write check later. */
-
-	li	r4, 0
-	lwz	r3, 0(r4)
-
  	/* Primary delays then goes to _zimage_start in wrapper. */
  
  	or	31, 31, 31 /* db16cyc */
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
index 4ec2d86..a05558a 100644
--- a/arch/powerpc/boot/ps3.c
+++ b/arch/powerpc/boot/ps3.c
@@ -119,13 +119,12 @@ void ps3_copy_vectors(void)
  	flush_cache((void *)0x100, 512);
  }
  
-void platform_init(unsigned long null_check)
+void platform_init(void)
  {
  	const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
  	void *chosen;
  	unsigned long ft_addr;
  	u64 rm_size;
-	unsigned long val;
  
  	console_ops.write = ps3_console_write;
  	platform_ops.exit = ps3_exit;
@@ -153,11 +152,6 @@ void platform_init(unsigned long null_check)
  
  	printf(" flat tree at 0x%lx\n\r", ft_addr);
  
-	val = *(unsigned long *)0;
-
-	if (val != null_check)
-		printf("null check failed: %lx != %lx\n\r", val, null_check);
-
  	((kernel_entry_t)0)(ft_addr, 0, NULL);
  
  	ps3_exit();
-- 
2.7.4


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

* Re: powerpc/ps3: Fix system hang with GCC 5 builds
  2016-11-29 18:47 powerpc/ps3: Fix system hang with GCC 5 builds Geoff Levand
@ 2016-11-29 19:01 ` Greg KH
  2016-12-03 11:28 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-11-29 19:01 UTC (permalink / raw)
  To: Geoff Levand; +Cc: Michael Ellerman, stable, linuxppc-dev

On Tue, Nov 29, 2016 at 10:47:32AM -0800, Geoff Levand wrote:
> GCC 5 generates different code for this bootwrapper null check
> that causes the PS3 to hang very early in its bootup.  This
> check is of limited value, so just get rid of it.
> 
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
>  arch/powerpc/boot/ps3-head.S | 5 -----
>  arch/powerpc/boot/ps3.c      | 8 +-------
>  2 files changed, 1 insertion(+), 12 deletions(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read Documentation/stable_kernel_rules.txt
for how to do this properly.

</formletter>

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

* Re: powerpc/ps3: Fix system hang with GCC 5 builds
  2016-11-29 18:47 powerpc/ps3: Fix system hang with GCC 5 builds Geoff Levand
  2016-11-29 19:01 ` Greg KH
@ 2016-12-03 11:28 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2016-12-03 11:28 UTC (permalink / raw)
  To: Geoff Levand; +Cc: linuxppc-dev, stable

On Tue, 2016-11-29 at 18:47:32 UTC, Geoff Levand wrote:
> GCC 5 generates different code for this bootwrapper null check
> that causes the PS3 to hang very early in its bootup.  This
> check is of limited value, so just get rid of it.
> 
> Signed-off-by: Geoff Levand <geoff@infradead.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/6dff5b67054e17c91bd630bcdda17c

cheers

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

end of thread, other threads:[~2016-12-03 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 18:47 powerpc/ps3: Fix system hang with GCC 5 builds Geoff Levand
2016-11-29 19:01 ` Greg KH
2016-12-03 11:28 ` 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).