summaryrefslogtreecommitdiffstats
path: root/serial-console-rt-support-fixup.patch
blob: c222b7c7e3b3e6786a245892701db5f28c110f0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From b533b311dd8e97870f70b3c48515ed720288f13c Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:30:32 -0500
Subject: [PATCH] serial/console: rt support fixup

commit d4ea9d10593e414eba0d5ddc26370801b1a7fdbb in tip.

The serial console printk path grew a new spinlock - which is rather
heavy - so instead of converting it to raw, use the sysrq/oops path
of only taking the lock if we can, on PREEMPT_RT.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/serial/8250.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c1d31e4..cfa2703 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2771,7 +2771,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
 
 	touch_nmi_watchdog();
 
-	if (up->port.sysrq || oops_in_progress)
+	if (up->port.sysrq || oops_in_progress || preempt_rt())
 		locked = spin_trylock_irqsave(&up->port.lock, flags);
 	else
 		spin_lock_irqsave(&up->port.lock, flags);
-- 
1.7.0.4