From: Andrea Arcangeli <andrea@suse.de>
To: "David S. Miller" <davem@redhat.com>
Cc: mathijs@knoware.nl, jgarzik@mandrakesoft.com,
linux-kernel@vger.kernel.org, torvalds@transmeta.com,
kuznet@ms2.inr.ac.ru, Thorsten Kukuk <kukuk@suse.de>
Subject: Re: [PATCH] fix loop with disabled tasklets
Date: Mon, 12 Nov 2001 15:20:44 +0100 [thread overview]
Message-ID: <20011112152044.V1381@athlon.random> (raw)
In-Reply-To: <20011110152845.8328F231A4@brand.mmohlmann.demon.nl> <20011110173751.C1381@athlon.random> <20011112021142.O1381@athlon.random> <20011112.000305.45744181.davem@redhat.com> <20011112150452.S1381@athlon.random>
In-Reply-To: <20011112150452.S1381@athlon.random>; from andrea@suse.de on Mon, Nov 12, 2001 at 03:04:52PM +0100
On Mon, Nov 12, 2001 at 03:04:52PM +0100, Andrea Arcangeli wrote:
> On Mon, Nov 12, 2001 at 12:03:05AM -0800, David S. Miller wrote:
> > From: Andrea Arcangeli <andrea@suse.de>
> > Date: Mon, 12 Nov 2001 02:11:42 +0100
> >
> > I'm just guessing: the scheduler isn't yet functional when
> > spawn_ksoftirqd is called.
> >
> > The scheduler is fully functional, this isn't what is going wrong.
>
> check ret_from_fork path, sparc32 scheduler is broken and this is why it
> deadlocks at boot, it has nothing to do with the softirq code, softirq
> code is innocent and it only get bitten by the sparc32 bug.
real fix looks like this (no idea what PSR_PIL means so not sure if this
really works on UP but certainly the sched_yield breakage is fixed now
and it won't deadlock in the softirq code any longer):
--- 2.4.15pre2aa1/arch/sparc/kernel/entry.S.~1~ Sat Feb 10 02:34:05 2001
+++ 2.4.15pre2aa1/arch/sparc/kernel/entry.S Mon Nov 12 15:17:32 2001
@@ -1466,8 +1466,7 @@
b C_LABEL(ret_sys_call)
ld [%sp + REGWIN_SZ + PT_I0], %o0
-#ifdef CONFIG_SMP
- .globl C_LABEL(ret_from_smpfork)
+ .globl C_LABEL(ret_from_fork)
C_LABEL(ret_from_smpfork):
wr %l0, PSR_ET, %psr
WRITE_PAUSE
@@ -1475,7 +1474,6 @@
mov %g3, %o0
b C_LABEL(ret_sys_call)
ld [%sp + REGWIN_SZ + PT_I0], %o0
-#endif
/* Linux native and SunOS system calls enter here... */
.align 4
--- 2.4.15pre2aa1/arch/sparc/kernel/process.c.~1~ Thu Oct 11 10:41:52 2001
+++ 2.4.15pre2aa1/arch/sparc/kernel/process.c Mon Nov 12 15:18:21 2001
@@ -455,11 +455,7 @@
* allocate the task_struct and kernel stack in
* do_fork().
*/
-#ifdef CONFIG_SMP
-extern void ret_from_smpfork(void);
-#else
-extern void ret_from_syscall(void);
-#endif
+extern void ret_from_smp(void);
int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
unsigned long unused,
@@ -493,13 +489,8 @@
copy_regwin(new_stack, (((struct reg_window *) regs) - 1));
p->thread.ksp = (unsigned long) new_stack;
-#ifdef CONFIG_SMP
p->thread.kpc = (((unsigned long) ret_from_smpfork) - 0x8);
p->thread.kpsr = current->thread.fork_kpsr | PSR_PIL;
-#else
- p->thread.kpc = (((unsigned long) ret_from_syscall) - 0x8);
- p->thread.kpsr = current->thread.fork_kpsr;
-#endif
p->thread.kwim = current->thread.fork_kwim;
/* This is used for sun4c only */
Andrea
next prev parent reply other threads:[~2001-11-12 14:21 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-10 12:21 [PATCH] fix loop with disabled tasklets Mathijs Mohlmann
2001-11-10 13:37 ` David S. Miller
2001-11-10 15:03 ` Andrea Arcangeli
2001-11-10 15:29 ` Mathijs Mohlmann
2001-11-10 16:02 ` Alan Cox
2001-11-10 16:37 ` Andrea Arcangeli
2001-11-12 1:11 ` Andrea Arcangeli
2001-11-12 7:42 ` Mathijs Mohlmann
2001-11-12 7:59 ` David S. Miller
2001-11-12 14:03 ` Andrea Arcangeli
2001-11-12 13:57 ` Andrea Arcangeli
2001-11-12 8:03 ` David S. Miller
2001-11-12 14:04 ` Andrea Arcangeli
2001-11-12 14:20 ` Andrea Arcangeli [this message]
2001-11-12 17:10 ` Thorsten Kukuk
2001-11-12 19:03 ` Mathijs Mohlmann
2001-11-11 2:32 ` Mathijs Mohlmann
-- strict thread matches above, loose matches on Subject: below --
2001-11-11 15:56 Momchil Velikov
2001-11-12 7:46 ` Mathijs Mohlmann
2001-11-12 8:00 ` David S. Miller
2001-11-12 8:07 ` Momchil Velikov
2001-11-12 9:11 ` Mathijs Mohlmann
2001-11-12 9:41 ` Momchil Velikov
2001-11-12 9:54 ` Mathijs Mohlmann
2001-11-12 15:33 Petr Vandrovec
2001-11-12 14:48 ` Andrea Arcangeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011112152044.V1381@athlon.random \
--to=andrea@suse.de \
--cc=davem@redhat.com \
--cc=jgarzik@mandrakesoft.com \
--cc=kukuk@suse.de \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mathijs@knoware.nl \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox