Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Geoff Levand and committed by
Michael Ellerman
6dff5b67 76ffb578

+1 -12
-5
arch/powerpc/boot/ps3-head.S
··· 57 57 bctr 58 58 59 59 1: 60 - /* Save the value at addr zero for a null pointer write check later. */ 61 - 62 - li r4, 0 63 - lwz r3, 0(r4) 64 - 65 60 /* Primary delays then goes to _zimage_start in wrapper. */ 66 61 67 62 or 31, 31, 31 /* db16cyc */
+1 -7
arch/powerpc/boot/ps3.c
··· 119 119 flush_cache((void *)0x100, 512); 120 120 } 121 121 122 - void platform_init(unsigned long null_check) 122 + void platform_init(void) 123 123 { 124 124 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ 125 125 void *chosen; 126 126 unsigned long ft_addr; 127 127 u64 rm_size; 128 - unsigned long val; 129 128 130 129 console_ops.write = ps3_console_write; 131 130 platform_ops.exit = ps3_exit; ··· 151 152 ps3_copy_vectors(); 152 153 153 154 printf(" flat tree at 0x%lx\n\r", ft_addr); 154 - 155 - val = *(unsigned long *)0; 156 - 157 - if (val != null_check) 158 - printf("null check failed: %lx != %lx\n\r", val, null_check); 159 155 160 156 ((kernel_entry_t)0)(ft_addr, 0, NULL); 161 157