From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: walt <w41ter@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: commit a802dd0e breaks console keyboard input
Date: Fri, 24 Oct 2008 13:07:42 +0200 [thread overview]
Message-ID: <20081024110742.GD4620@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <49011234.7090902@gmail.com>
On Thu, Oct 23, 2008 at 05:09:24PM -0700, walt wrote:
> Hi team,
>
> commit a802dd0eb5fc97a50cf1abb1f788a8f6cc5db635
> Author: Heiko Carstens <heiko.carstens@de.ibm.com>
> Date: Mon Oct 13 23:50:08 2008 +0200
>
> Call init_workqueues before pre smp initcalls.
>
> This commit causes the console login prompt to ignore my keystrokes
> so I'm unable to log in (though ssh works fine). Oddly, if I hit
> ctrl-alt-delete the machine does reboot, but no other keystrokes
> appear on the screen or have any effect that I can detect.
>
> No surprise that this problem appears only on my dual-core amd64
> machine, while the k7 single processor machine works normally.
>
> I've not seen anyone else complaining on the linux list, so maybe
> this is a BIOS bug on the affected machine? It's an ECS mobo with
> a GeForce6100PM-M2 chipset, and I use a ps/2 keyboard.
Could you try the patch below and see if it makes any difference?
Thanks!
---
include/linux/stop_machine.h | 16 +++++++++++-----
init/main.c | 3 +--
kernel/stop_machine.c | 8 ++++++++
3 files changed, 20 insertions(+), 7 deletions(-)
Index: linux-2.6/include/linux/stop_machine.h
===================================================================
--- linux-2.6.orig/include/linux/stop_machine.h
+++ linux-2.6/include/linux/stop_machine.h
@@ -8,6 +8,16 @@
#include <linux/cpumask.h>
#include <asm/system.h>
+static inline int stop_machine_simple(int (*fn)(void *), void *data,
+ const cpumask_t *cpus)
+{
+ int ret;
+ local_irq_disable();
+ ret = fn(data);
+ local_irq_enable();
+ return ret;
+}
+
#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP)
/**
@@ -40,11 +50,7 @@ int __stop_machine(int (*fn)(void *), vo
static inline int stop_machine(int (*fn)(void *), void *data,
const cpumask_t *cpus)
{
- int ret;
- local_irq_disable();
- ret = fn(data);
- local_irq_enable();
- return ret;
+ return stop_machine_simple(fn, data, cpus);
}
#endif /* CONFIG_SMP */
#endif /* _LINUX_STOP_MACHINE */
Index: linux-2.6/kernel/stop_machine.c
===================================================================
--- linux-2.6.orig/kernel/stop_machine.c
+++ linux-2.6/kernel/stop_machine.c
@@ -43,6 +43,7 @@ static struct workqueue_struct *stop_mac
static struct stop_machine_data active, idle;
static const cpumask_t *active_cpus;
static void *stop_machine_work;
+static int sm_initialized;
static void set_state(enum stopmachine_state newstate)
{
@@ -114,6 +115,10 @@ int __stop_machine(int (*fn)(void *), vo
struct work_struct *sm_work;
int i;
+ WARN_ON_ONCE(!sm_initialized);
+ if (num_online_cpus() == 1)
+ return stop_machine_simple(fn, data, cpus);
+
/* Set up initial state. */
mutex_lock(&lock);
num_threads = num_online_cpus();
@@ -157,7 +162,10 @@ EXPORT_SYMBOL_GPL(stop_machine);
static int __init stop_machine_init(void)
{
stop_machine_wq = create_rt_workqueue("kstop");
+ BUG_ON(!stop_machine_wq);
stop_machine_work = alloc_percpu(struct work_struct);
+ BUG_ON(!stop_machine_work);
+ sm_initialized = 1;
return 0;
}
early_initcall(stop_machine_init);
Index: linux-2.6/init/main.c
===================================================================
--- linux-2.6.orig/init/main.c
+++ linux-2.6/init/main.c
@@ -851,10 +851,9 @@ static int __init kernel_init(void * unu
cad_pid = task_pid(current);
- init_workqueues();
-
smp_prepare_cpus(setup_max_cpus);
+ init_workqueues();
do_pre_smp_initcalls();
start_boot_trace();
next prev parent reply other threads:[~2008-10-24 11:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 0:09 commit a802dd0e breaks console keyboard input walt
2008-10-24 7:28 ` Heiko Carstens
2008-10-24 11:07 ` Heiko Carstens [this message]
2008-10-24 12:52 ` w41ter
2008-10-24 19:44 ` Heiko Carstens
2008-10-24 23:13 ` walt
2008-10-25 14:16 ` Heiko Carstens
2008-10-25 18:48 ` Hugh Dickins
2008-10-25 20:36 ` walt
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=20081024110742.GD4620@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=w41ter@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.