Commit 1b978fff authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Richard Henderson

[PATCH] alpha: context switch fixes

- Fix argument order for cmpbge in non-ev67 __ffs(). This caused a machine
  check in PAL mode early on boot, apparently in swpctx.
- Sync up ret_from_fork with i386. This fixes "Badness in context_switch .."
  flood on UP.

Ivan.
parent ca5672fb
...@@ -591,7 +591,6 @@ alpha_switch_to: ...@@ -591,7 +591,6 @@ alpha_switch_to:
*/ */
.globl ret_from_fork .globl ret_from_fork
#if CONFIG_SMP || CONFIG_PREEMPT
.align 4 .align 4
.ent ret_from_fork .ent ret_from_fork
ret_from_fork: ret_from_fork:
...@@ -599,9 +598,6 @@ ret_from_fork: ...@@ -599,9 +598,6 @@ ret_from_fork:
mov $17, $16 mov $17, $16
jmp $31, schedule_tail jmp $31, schedule_tail
.end ret_from_fork .end ret_from_fork
#else
ret_from_fork = ret_from_sys_call
#endif
/* /*
* kernel_thread(fn, arg, clone_flags) * kernel_thread(fn, arg, clone_flags)
......
...@@ -288,7 +288,7 @@ static inline unsigned long __ffs(unsigned long word) ...@@ -288,7 +288,7 @@ static inline unsigned long __ffs(unsigned long word)
#else #else
unsigned long bits, qofs, bofs; unsigned long bits, qofs, bofs;
bits = __kernel_cmpbge(word, 0); bits = __kernel_cmpbge(0, word);
qofs = ffz_b(bits); qofs = ffz_b(bits);
bits = __kernel_extbl(word, qofs); bits = __kernel_extbl(word, qofs);
bofs = ffz_b(~bits); bofs = ffz_b(~bits);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment