From: Mikulas Patocka <mpatocka@redhat.com>
To: Jiri Slaby <jslaby@suse.cz>, Guy Martin <gmsof@tuxicoman.be>,
Linus Torvalds <torvalds@linux-foundation.org>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Revert 5dd5bc40f3b6e0ccdaad948dbadc94ad0906cb25
Date: Fri, 4 May 2012 23:04:40 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.1205042259000.18896@file.rdu.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1205042250130.18896@file.rdu.redhat.com>
Hi
This patch reverts commit 5dd5bc40f3b6e0ccdaad948dbadc94ad0906cb25.
The commit 5dd5bc40f3b6e0ccdaad948dbadc94ad0906cb25 causes system lockup
when pdc is used as a boot console.
The kernel boots, but it locks up when transferring control to userspace
--- the message "INIT: version 2.86 booting" is not printed and the
computer halts. With the patch reverted, the system starts normally on
pdc.
Mikulas
---
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 4f00459..d14e20f 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -92,11 +92,10 @@ static int pdc_console_setup(struct console *co, char *options)
static void pdc_console_poll(unsigned long unused);
static DEFINE_TIMER(pdc_console_timer, pdc_console_poll, 0, 0);
-static struct tty_port tty_port;
static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
{
- tty_port_tty_set(&tty_port, tty);
+
mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
return 0;
@@ -104,10 +103,8 @@ static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
static void pdc_console_tty_close(struct tty_struct *tty, struct file *filp)
{
- if (!tty->count) {
+ if (!tty->count)
del_timer_sync(&pdc_console_timer);
- tty_port_tty_set(&tty_port, NULL);
- }
}
static int pdc_console_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
@@ -126,6 +123,8 @@ static int pdc_console_tty_chars_in_buffer(struct tty_struct *tty)
return 0; /* no buffer */
}
+static struct tty_driver *pdc_console_tty_driver;
+
static const struct tty_operations pdc_console_tty_ops = {
.open = pdc_console_tty_open,
.close = pdc_console_tty_close,
@@ -136,8 +135,10 @@ static const struct tty_operations pdc_console_tty_ops = {
static void pdc_console_poll(unsigned long unused)
{
+
int data, count = 0;
- struct tty_struct *tty = tty_port_tty_get(&tty_port);
+
+ struct tty_struct *tty = pdc_console_tty_driver->ttys[0];
if (!tty)
return;
@@ -153,14 +154,10 @@ static void pdc_console_poll(unsigned long unused)
if (count)
tty_flip_buffer_push(tty);
- tty_kref_put(tty);
-
if (pdc_cons.flags & CON_ENABLED)
mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
}
-static struct tty_driver *pdc_console_tty_driver;
-
static int __init pdc_console_tty_driver_init(void)
{
int err;
@@ -185,8 +182,6 @@ static int __init pdc_console_tty_driver_init(void)
printk(KERN_INFO "The PDC console driver is still registered, removing CON_BOOT flag\n");
pdc_cons.flags &= ~CON_BOOT;
- tty_port_init(&tty_port);
-
pdc_console_tty_driver = alloc_tty_driver(1);
if (!pdc_console_tty_driver)
next prev parent reply other threads:[~2012-05-05 3:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-05 2:58 [PATCH] Fix compile failure on PA-RISC Mikulas Patocka
2012-05-05 3:04 ` Mikulas Patocka [this message]
2012-05-05 7:39 ` [PATCH] Revert 5dd5bc40f3b6e0ccdaad948dbadc94ad0906cb25 Jiri Slaby
2012-05-05 18:44 ` Mikulas Patocka
2012-05-05 20:49 ` [PATCH 1/1] TTY: pdc_cons, fix regression in close Jiri Slaby
2012-05-05 6:55 ` [PATCH] Fix compile failure on PA-RISC Rolf Eike Beer
2012-05-05 17:09 ` Linus Torvalds
2012-05-05 18:55 ` Mikulas Patocka
2012-05-05 20:09 ` John David Anglin
2012-05-05 21:24 ` Helge Deller
2012-05-06 7:57 ` James Bottomley
2012-05-05 10:58 ` Alan Cox
2012-05-05 18:53 ` Mikulas Patocka
2012-05-05 18:55 ` Linus Torvalds
2012-05-05 22:00 ` Rolf Eike Beer
2012-05-09 3:20 ` Mikulas Patocka
2012-05-09 12:01 ` Alan Cox
2012-05-09 17:51 ` Linus Torvalds
2012-05-10 9:24 ` Geert Uytterhoeven
2012-05-06 12:24 ` Alan Cox
2012-05-09 17:38 ` Grant Grundler
2012-05-10 11:40 ` Alan Cox
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=Pine.LNX.4.64.1205042259000.18896@file.rdu.redhat.com \
--to=mpatocka@redhat.com \
--cc=deller@gmx.de \
--cc=gmsof@tuxicoman.be \
--cc=jejb@parisc-linux.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®