From: James Bottomley <James.Bottomley@steeleye.com>
To: Arjan van de Ven <arjanv@redhat.com>,
Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix 4k irqstacks on x86 (and add voyager support)
Date: 15 Apr 2004 10:17:45 -0500 [thread overview]
Message-ID: <1082042268.2166.2.camel@mulgrave> (raw)
There's a bug in the x86 code in that it sets the boot CPU to zero.
This isn't correct since some subarch's use physically indexed CPUs.
However, subarchs have either set the boot cpu before irq_INIT() (or
just inherited the default zero from INIT_THREAD_INFO()), so it's safe
to believe current_thread_info()->cpu about the boot cpu.
James
===== arch/i386/kernel/i8259.c 1.28 vs edited =====
--- 1.28/arch/i386/kernel/i8259.c Mon Apr 12 12:54:45 2004
+++ edited/arch/i386/kernel/i8259.c Thu Apr 15 09:59:27 2004
@@ -445,6 +445,5 @@
if (boot_cpu_data.hard_math && !cpu_has_fpu)
setup_irq(FPU_IRQ, &fpu_irq);
- current_thread_info()->cpu = 0;
- irq_ctx_init(0);
+ irq_ctx_init(current_thread_info()->cpu);
}
===== arch/i386/mach-voyager/voyager_smp.c 1.19 vs edited =====
--- 1.19/arch/i386/mach-voyager/voyager_smp.c Sun Mar 14 05:23:02 2004
+++ edited/arch/i386/mach-voyager/voyager_smp.c Thu Apr 15 09:52:49 2004
@@ -599,12 +599,10 @@
idle->thread.eip = (unsigned long) start_secondary;
unhash_process(idle);
/* init_tasks (in sched.c) is indexed logically */
-#if 0
- // for AC kernels
- stack_start.esp = (THREAD_SIZE + (__u8 *)TSK_TO_KSTACK(idle));
-#else
- stack_start.esp = (void *) (1024 + PAGE_SIZE + (char *)idle->thread_info);
-#endif
+ stack_start.esp = (void *) idle->thread.esp;
+
+ irq_ctx_init(cpu);
+
/* Note: Don't modify initial ss override */
VDEBUG(("VOYAGER SMP: Booting CPU%d at 0x%lx[%x:%x], stack %p\n", cpu,
(unsigned long)hijack_source.val, hijack_source.idt.Segment,
===== arch/i386/mach-voyager/voyager_thread.c 1.3 vs edited =====
--- 1.3/arch/i386/mach-voyager/voyager_thread.c Wed Feb 12 21:35:38 2003
+++ edited/arch/i386/mach-voyager/voyager_thread.c Thu Apr 15 09:11:35 2004
@@ -135,7 +135,7 @@
init_timer(&wakeup_timer);
sigfillset(¤t->blocked);
- current->tty = NULL; /* get rid of controlling tty */
+ current->signal->tty = NULL;
printk(KERN_NOTICE "Voyager starting monitor thread\n");
next reply other threads:[~2004-04-15 15:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-15 15:17 James Bottomley [this message]
2004-04-15 15:29 ` [PATCH] fix 4k irqstacks on x86 (and add voyager support) Zwane Mwaikambo
2004-04-15 15:33 ` James Bottomley
2004-04-15 16:16 ` Zwane Mwaikambo
2004-04-15 16:18 ` James Bottomley
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=1082042268.2166.2.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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