lkml.org 
[lkml]   [2001]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [BUG] freeze Alpha ES40 SMP 2.4.4.ac3, another TCP/IP Problem ? ( was 2.4.4 kernel crash , possibly tcp related )
On Thu, May 03, 2001 at 06:46:10PM +0200, Andrea Arcangeli wrote:
> as well. The only annoying thing is that UP kernel compiles seems not to
> boot but I hope that will be fixed soon too.

Ok I spotted and fixed that bug that forbidden my tree to boot with UP
compiles on alpha. The bug is that the SCHED_YIELD handling was broken
on alpha UP, this is the fix:

--- 2.4.5pre1aa1/arch/alpha/kernel/entry.S.~1~ Thu May 3 18:22:13 2001
+++ 2.4.5pre1aa1/arch/alpha/kernel/entry.S Thu May 3 19:18:16 2001
@@ -709,16 +709,14 @@
br restore_all
.end entSys

-#ifdef CONFIG_SMP
- .globl ret_from_smp_fork
+ .globl ret_from_fork
.align 3
-.ent ret_from_smp_fork
-ret_from_smp_fork:
+.ent ret_from_fork
+ret_from_fork:
lda $26,ret_from_sys_call
mov $17,$16
jsr $31,schedule_tail
-.end ret_from_smp_fork
-#endif /* CONFIG_SMP */
+.end ret_from_fork

.align 3
.ent reschedule
--- 2.4.5pre1aa1/arch/alpha/kernel/process.c.~1~ Thu May 3 18:22:09 2001
+++ 2.4.5pre1aa1/arch/alpha/kernel/process.c Thu May 3 19:15:41 2001
@@ -306,7 +306,7 @@
struct task_struct * p, struct pt_regs * regs)
{
extern void ret_from_sys_call(void);
- extern void ret_from_smp_fork(void);
+ extern void ret_from_fork(void);

struct pt_regs * childregs;
struct switch_stack * childstack, *stack;
@@ -325,11 +325,7 @@
stack = ((struct switch_stack *) regs) - 1;
childstack = ((struct switch_stack *) childregs) - 1;
*childstack = *stack;
-#ifdef CONFIG_SMP
- childstack->r26 = (unsigned long) ret_from_smp_fork;
-#else
- childstack->r26 = (unsigned long) ret_from_sys_call;
-#endif
+ childstack->r26 = (unsigned long) ret_from_fork;
p->thread.usp = usp;
p->thread.ksp = (unsigned long) childstack;
p->thread.pal_flags = 1; /* set FEN, clear everything else */

(SCHED_YIELD of the previous task is cleared by __schedule_tail, it
wasn't cleared so a non running task had a SCHED_YIELD set and it was
deadlocking, this can explain many malfunction of UP alpha kernels)
I never noticed so far because I always compiled it SMP.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.033 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site