aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/hp/sim
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-03-08 15:01:16 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 15:26:30 -0500
commit0745d19abc492437e601c83281287d10202ee411 (patch)
treee997b08172538284567f8fdab34989dce6c85190 /arch/ia64/hp/sim
parentfef21073af6f826510e41fc367df68383b63e1d2 (diff)
hpsim, fix SAL handling in fw-emu
The switch-cases of SAL_FREQ_BASE generate non-relocatable code. The same as for the ifs one level upper. This causes oopses early in boot because the kernel jumps to the hell instead of the offset in sal callback. So use ifs here for SAL_FREQ_BASE decision too. Isn't there any compiler directive or settings to solve that cleanly? Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/ia64/hp/sim')
-rw-r--r--arch/ia64/hp/sim/boot/fw-emu.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c
index bf6d9d8c802f..0216e28300fa 100644
--- a/arch/ia64/hp/sim/boot/fw-emu.c
+++ b/arch/ia64/hp/sim/boot/fw-emu.c
@@ -160,28 +160,19 @@ sal_emulator (long index, unsigned long in1, unsigned long in2,
160 */ 160 */
161 status = 0; 161 status = 0;
162 if (index == SAL_FREQ_BASE) { 162 if (index == SAL_FREQ_BASE) {
163 switch (in1) { 163 if (in1 == SAL_FREQ_BASE_PLATFORM)
164 case SAL_FREQ_BASE_PLATFORM:
165 r9 = 200000000; 164 r9 = 200000000;
166 break; 165 else if (in1 == SAL_FREQ_BASE_INTERVAL_TIMER) {
167
168 case SAL_FREQ_BASE_INTERVAL_TIMER:
169 /* 166 /*
170 * Is this supposed to be the cr.itc frequency 167 * Is this supposed to be the cr.itc frequency
171 * or something platform specific? The SAL 168 * or something platform specific? The SAL
172 * doc ain't exactly clear on this... 169 * doc ain't exactly clear on this...
173 */ 170 */
174 r9 = 700000000; 171 r9 = 700000000;
175 break; 172 } else if (in1 == SAL_FREQ_BASE_REALTIME_CLOCK)
176
177 case SAL_FREQ_BASE_REALTIME_CLOCK:
178 r9 = 1; 173 r9 = 1;
179 break; 174 else
180
181 default:
182 status = -1; 175 status = -1;
183 break;
184 }
185 } else if (index == SAL_SET_VECTORS) { 176 } else if (index == SAL_SET_VECTORS) {
186 ; 177 ;
187 } else if (index == SAL_GET_STATE_INFO) { 178 } else if (index == SAL_GET_STATE_INFO) {