aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2016-11-29 13:47:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-09 02:32:25 -0500
commitefcb3d9442fffe6dd4d12a8c70fe9e6a5423c4df (patch)
treedea86c5dce92a8f3374c0d2f1beb12c3db18a683 /arch/powerpc/boot
parent4b23132d6cf56607626760458ff18d3a30a88bd9 (diff)
powerpc/ps3: Fix system hang with GCC 5 builds
commit 6dff5b67054e17c91bd630bcdda17cfca5aa4215 upstream. 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> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r--arch/powerpc/boot/ps3-head.S5
-rw-r--r--arch/powerpc/boot/ps3.c8
2 files changed, 1 insertions, 12 deletions
diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S
index b6fcbaf5027b..3dc44b05fb97 100644
--- a/arch/powerpc/boot/ps3-head.S
+++ b/arch/powerpc/boot/ps3-head.S
@@ -57,11 +57,6 @@ __system_reset_overlay:
57 bctr 57 bctr
58 58
591: 591:
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 /* Primary delays then goes to _zimage_start in wrapper. */ 60 /* Primary delays then goes to _zimage_start in wrapper. */
66 61
67 or 31, 31, 31 /* db16cyc */ 62 or 31, 31, 31 /* db16cyc */
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
index 4ec2d86d3c50..a05558a7e51a 100644
--- a/arch/powerpc/boot/ps3.c
+++ b/arch/powerpc/boot/ps3.c
@@ -119,13 +119,12 @@ void ps3_copy_vectors(void)
119 flush_cache((void *)0x100, 512); 119 flush_cache((void *)0x100, 512);
120} 120}
121 121
122void platform_init(unsigned long null_check) 122void platform_init(void)
123{ 123{
124 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ 124 const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
125 void *chosen; 125 void *chosen;
126 unsigned long ft_addr; 126 unsigned long ft_addr;
127 u64 rm_size; 127 u64 rm_size;
128 unsigned long val;
129 128
130 console_ops.write = ps3_console_write; 129 console_ops.write = ps3_console_write;
131 platform_ops.exit = ps3_exit; 130 platform_ops.exit = ps3_exit;
@@ -153,11 +152,6 @@ void platform_init(unsigned long null_check)
153 152
154 printf(" flat tree at 0x%lx\n\r", ft_addr); 153 printf(" flat tree at 0x%lx\n\r", ft_addr);
155 154
156 val = *(unsigned long *)0;
157
158 if (val != null_check)
159 printf("null check failed: %lx != %lx\n\r", val, null_check);
160
161 ((kernel_entry_t)0)(ft_addr, 0, NULL); 155 ((kernel_entry_t)0)(ft_addr, 0, NULL);
162 156
163 ps3_exit(); 157 ps3_exit();