Commit 1493f8b6 authored by Anton Blanchard's avatar Anton Blanchard

hvc_console: stop HVC console while xmon is running

parent 5e051f29
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define skipbl xmon_skipbl #define skipbl xmon_skipbl
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static unsigned long cpus_in_xmon = 0; unsigned long cpus_in_xmon = 0;
static unsigned long got_xmon = 0; static unsigned long got_xmon = 0;
static volatile int take_xmon = -1; static volatile int take_xmon = -1;
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
......
...@@ -227,6 +227,8 @@ static void hvc_poll(int index) ...@@ -227,6 +227,8 @@ static void hvc_poll(int index)
spin_unlock_irqrestore(&hp->lock, flags); spin_unlock_irqrestore(&hp->lock, flags);
} }
extern unsigned long cpus_in_xmon;
int khvcd(void *unused) int khvcd(void *unused)
{ {
int i; int i;
...@@ -237,8 +239,10 @@ int khvcd(void *unused) ...@@ -237,8 +239,10 @@ int khvcd(void *unused)
sigfillset(&current->blocked); sigfillset(&current->blocked);
for (;;) { for (;;) {
for (i = 0; i < MAX_NR_HVC_CONSOLES; ++i) if (!cpus_in_xmon) {
hvc_poll(i); for (i = 0; i < MAX_NR_HVC_CONSOLES; ++i)
hvc_poll(i);
}
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(TIMEOUT); schedule_timeout(TIMEOUT);
} }
......
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