Browse Source

powerpc/ps3: Fix system hang with GCC 5 builds

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.

Cc: stable@vger.kernel.org
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Geoff Levand 8 years ago
parent
commit
6dff5b6705
2 changed files with 1 additions and 12 deletions
  1. 0 5
      arch/powerpc/boot/ps3-head.S
  2. 1 7
      arch/powerpc/boot/ps3.c

+ 0 - 5
arch/powerpc/boot/ps3-head.S

@@ -57,11 +57,6 @@ __system_reset_overlay:
 	bctr
 	bctr
 
 
 1:
 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. */
 	/* Primary delays then goes to _zimage_start in wrapper. */
 
 
 	or	31, 31, 31 /* db16cyc */
 	or	31, 31, 31 /* db16cyc */

+ 1 - 7
arch/powerpc/boot/ps3.c

@@ -119,13 +119,12 @@ void ps3_copy_vectors(void)
 	flush_cache((void *)0x100, 512);
 	flush_cache((void *)0x100, 512);
 }
 }
 
 
-void platform_init(unsigned long null_check)
+void platform_init(void)
 {
 {
 	const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
 	const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
 	void *chosen;
 	void *chosen;
 	unsigned long ft_addr;
 	unsigned long ft_addr;
 	u64 rm_size;
 	u64 rm_size;
-	unsigned long val;
 
 
 	console_ops.write = ps3_console_write;
 	console_ops.write = ps3_console_write;
 	platform_ops.exit = ps3_exit;
 	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);
 	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);
 	((kernel_entry_t)0)(ft_addr, 0, NULL);
 
 
 	ps3_exit();
 	ps3_exit();