* Re: [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call [not found] <455171.511691268697128244.JavaMail.root@zimbra> @ 2010-03-15 23:53 ` Ari Entlich 2010-03-16 0:18 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Ari Entlich @ 2010-03-15 23:53 UTC (permalink / raw) To: Greg KH; +Cc: Greg KH, linux-kernel ----- "Greg KH" <greg@kroah.com> wrote: > So, are you happy with this in Linus's tree, or do you want it > reverted? The problems with this patch include: 1. There's at least one subtlety I overlooked - switching between X servers (i.e. from one X VT to another) still requires the cooperation of both X servers. I was assuming that KMS eliminated this. 2. It hasn't been tested at all (no X server patch exists which uses the new mode). So yes, I think it would be wise to revert it. I'll resubmit the patch (in a changed form or otherwise) when I've resolved these issues. I apologize again for being late in telling you this stuff. Ari ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call 2010-03-15 23:53 ` [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call Ari Entlich @ 2010-03-16 0:18 ` Greg KH 0 siblings, 0 replies; 7+ messages in thread From: Greg KH @ 2010-03-16 0:18 UTC (permalink / raw) To: Ari Entlich; +Cc: Greg KH, linux-kernel On Mon, Mar 15, 2010 at 07:53:10PM -0400, Ari Entlich wrote: > ----- "Greg KH" <greg@kroah.com> wrote: > > So, are you happy with this in Linus's tree, or do you want it > > reverted? > > The problems with this patch include: > 1. There's at least one subtlety I overlooked - switching between X servers > (i.e. from one X VT to another) still requires the cooperation of both > X servers. I was assuming that KMS eliminated this. > 2. It hasn't been tested at all (no X server patch exists which uses the > new mode). > > So yes, I think it would be wise to revert it. I'll resubmit the patch (in > a changed form or otherwise) when I've resolved these issues. > > I apologize again for being late in telling you this stuff. No problem, I'll go queue up the revert. thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <9842632.318001267575211703.JavaMail.root@zimbra>]
* Re: [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call [not found] <9842632.318001267575211703.JavaMail.root@zimbra> @ 2010-03-03 0:16 ` Ari Entlich 2010-03-15 20:33 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Ari Entlich @ 2010-03-03 0:16 UTC (permalink / raw) To: Greg KH; +Cc: linux-kernel ----- "Greg KH" <gregkh@suse.de> wrote: > Hm, it's been there for over a week from what I can tell, right? Hmm yes, I suppose it has. > I'll revert it after this batch goes into Linus's tree. Next time, warn > me a bit earlier :) I apologize; I would have if I had realized that you picking it up meant it was on its way to mainline. Ari ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call 2010-03-03 0:16 ` Ari Entlich @ 2010-03-15 20:33 ` Greg KH 0 siblings, 0 replies; 7+ messages in thread From: Greg KH @ 2010-03-15 20:33 UTC (permalink / raw) To: Ari Entlich; +Cc: Greg KH, linux-kernel On Tue, Mar 02, 2010 at 07:16:08PM -0500, Ari Entlich wrote: > ----- "Greg KH" <gregkh@suse.de> wrote: > > Hm, it's been there for over a week from what I can tell, right? > > Hmm yes, I suppose it has. > > > I'll revert it after this batch goes into Linus's tree. Next time, warn > > me a bit earlier :) > > I apologize; I would have if I had realized that you picking it up meant it > was on its way to mainline. So, are you happy with this in Linus's tree, or do you want it reverted? thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <14018832.317861267574035528.JavaMail.root@zimbra>]
* Re: [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call [not found] <14018832.317861267574035528.JavaMail.root@zimbra> @ 2010-03-02 23:55 ` Ari Entlich 2010-03-03 0:02 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Ari Entlich @ 2010-03-02 23:55 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: linux-kernel Hello! Could you please remove this patch from your 2.6.34 tty pull request? Andrew Morton questioned whether this should actually be used yet[1], and I responded confirming his suspicions[2]. In addition, this patch has not "been in the linux-next and -mm releases for a number of weeks now", as you suggest in your pull request. Thanks! [1] http://marc.info/?l=linux-kernel&m=126687954823617 [2] http://marc.info/?l=linux-kernel&m=126689506608539 ----- "Greg Kroah-Hartman" <gregkh@suse.de> wrote: > From: Ari Entlich <atrigent@ccs.neu.edu> > > This new VT mode (VT_PROCESS_AUTO) does everything that VT_PROCESS does > except that it doesn't wait for a VT_RELDISP ioctl before switching > away from a VT with that mode. > > [etc, etc...] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call 2010-03-02 23:55 ` Ari Entlich @ 2010-03-03 0:02 ` Greg KH 0 siblings, 0 replies; 7+ messages in thread From: Greg KH @ 2010-03-03 0:02 UTC (permalink / raw) To: Ari Entlich; +Cc: linux-kernel On Tue, Mar 02, 2010 at 06:55:20PM -0500, Ari Entlich wrote: > Hello! > > Could you please remove this patch from your 2.6.34 tty pull request? > Andrew Morton questioned whether this should actually be used yet[1], > and I responded confirming his suspicions[2]. In addition, this patch > has not "been in the linux-next and -mm releases for a number of > weeks now", as you suggest in your pull request. Hm, it's been there for over a week from what I can tell, right? I'll revert it after this batch goes into Linus's tree. Next time, warn me a bit earlier :) thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* [GIT PATCH] TTY patches for 2.6.33-git
@ 2010-03-02 23:09 Greg KH
2010-03-02 23:36 ` [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call Greg Kroah-Hartman
0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2010-03-02 23:09 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel
Here is the big tty patchset for the .34 merge window.
Please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/
These patches have been in the linux-next and -mm releases for a number of
weeks now.
Patches will be sent to the linux-kernel mailing list, if anyone wants
to see them.
thanks,
greg k-h
------------
drivers/char/cyclades.c | 16 +-
drivers/char/hvc_console.c | 2 +-
drivers/char/ip2/ip2main.c | 26 ++-
drivers/char/isicom.c | 54 ++--
drivers/char/moxa.c | 20 +-
drivers/char/mxser.c | 3 +-
drivers/char/nozomi.c | 157 +++++----
drivers/char/serial167.c | 3 +-
drivers/char/specialix.c | 2 -
drivers/char/synclink.c | 4 +-
drivers/char/synclink_gt.c | 186 ++++++-----
drivers/char/tty_buffer.c | 6 +-
drivers/char/tty_ldisc.c | 50 ++--
drivers/char/vt_ioctl.c | 39 ++-
drivers/mmc/card/sdio_uart.c | 93 ++----
drivers/parport/parport_pc.c | 6 +
drivers/serial/68328serial.c | 8 +-
drivers/serial/8250.c | 21 +-
drivers/serial/8250_pci.c | 31 ++-
drivers/serial/Kconfig | 53 ++--
drivers/serial/atmel_serial.c | 22 ++
drivers/serial/bcm63xx_uart.c | 7 +-
drivers/serial/bfin_5xx.c | 22 +-
drivers/serial/bfin_sport_uart.c | 701 +++++++++++++++++++++++++-------------
drivers/serial/bfin_sport_uart.h | 38 +--
drivers/serial/icom.c | 5 +-
drivers/serial/imx.c | 6 +-
drivers/serial/ioc3_serial.c | 3 +-
drivers/serial/jsm/jsm_driver.c | 1 +
drivers/serial/jsm/jsm_tty.c | 9 +-
drivers/serial/msm_serial.c | 6 +-
drivers/serial/timbuart.c | 7 +-
drivers/usb/serial/keyspan_pda.c | 7 +
include/linux/pci_ids.h | 3 +
include/linux/tty.h | 10 +
include/linux/vt.h | 3 +-
36 files changed, 978 insertions(+), 652 deletions(-)
---------------
Alan Cox (8):
sdio_uart: Use kfifo instead of the messy circ stuff
nozomi: Add tty_port usage
nozomi: Fix mutex handling
nozomi: Tidy up the PCI table
serial: timberdale: Remove dependancies
tty: Fix the ldisc hangup race
tty: Fix up char drivers request_room usage
tty: Keep the default buffering to sub-page units
Albin Tonnerre (1):
serial: atmel_serial: add poll_get_char and poll_put_char uart_ops
Ari Entlich (1):
tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call
Bartlomiej Zolnierkiewicz (1):
serial: cyclades: allow overriding ISA defaults also when the driver is built-in
Baruch Siach (1):
serial: imx: fix NULL dereference Oops when pdata == NULL
Ben Hutchings (1):
tty: declare MODULE_FIRMWARE in various drivers
Breno Leitao (2):
jsm: removing the uart structure and filename on error
jsm: fixing error if the driver fails to load
Graf Yang (1):
serial: bfin_5xx: need to disable DMA TX interrupt too
Ira W. Snyder (1):
serial: 8250_pci: add support for MCS9865 / SYBA 6x Serial Port Card
Jiri Slaby (3):
serial: Char: cyclades, fix compiler warning
tty: char: mxser, remove unnecessary tty test
Char: synclink, remove unnecessary checks
Joe Perches (1):
serial: isicom.c: use pr_fmt and pr_<level>
Kiros Yeh (1):
serial: add support for Korenix JetCard
Maxime Bizon (2):
serial: bcm63xx_uart: don't use kfree() on non kmalloced area.
serial: bcm63xx_uart: allow more than one uart to be registered.
Mike Frysinger (1):
serial: bfin_5xx: pull in linux/io.h for ioremap prototypes
Paul Fulghum (1):
serial: synclink_gt: dropped transmit data bugfix
Rakib Mullick (3):
tty: moxa: remove #ifdef MODULE completely.
ip2: remove #ifdef MODULE from ip2main.c
ip2: Add module parameter.
Roel Kluin (2):
serial: fix test of unsigned
hvc_console: fix test on unsigned in hvc_console_print()
Shmulik Ladkani (1):
serial: copy UART properties of UPF_FIXED_TYPE ports provisioned using early_serial_setup
Sonic Zhang (2):
serial: bfin_5xx: remove useless gpio handling with hard flow control
serial: bfin_5xx: kgdboc should accept gdb break only when it is active
Thiago Farina (1):
serial: 68328serial.c: remove BAUD_TABLE_SIZE macro
sonic zhang (1):
serial: fit blackfin uart over sport driver into common uart infrastructure
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call 2010-03-02 23:09 [GIT PATCH] TTY patches for 2.6.33-git Greg KH @ 2010-03-02 23:36 ` Greg Kroah-Hartman 0 siblings, 0 replies; 7+ messages in thread From: Greg Kroah-Hartman @ 2010-03-02 23:36 UTC (permalink / raw) To: linux-kernel; +Cc: Ari Entlich, Greg Kroah-Hartman From: Ari Entlich <atrigent@ccs.neu.edu> This new VT mode (VT_PROCESS_AUTO) does everything that VT_PROCESS does except that it doesn't wait for a VT_RELDISP ioctl before switching away from a VT with that mode. If the X server eventually uses this new mode, debugging and crash recovery should become easier. This is because even when currently in the VT of a frozen X server it would still be possible to switch out by doing SysRq-r and then CTRL-<number of a text vt>, sshing in and doing chvt <number of a text vt>, or any other method of VT switching. The general concensus on #xorg-devel seems to be that it should be safe to use this with X now that we have KMS. This also moves the VT_ACKACQ define to a more appropriate place, for clarity's sake. Signed-off-by: Ari Entlich <atrigent@ccs.neu.edu> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/char/vt_ioctl.c | 39 ++++++++++++++++++++------------------- include/linux/vt.h | 3 ++- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index 6aa1028..87778dc 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c @@ -888,7 +888,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, ret = -EFAULT; goto out; } - if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS) { + if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS && tmp.mode != VT_PROCESS_AUTO) { ret = -EINVAL; goto out; } @@ -1622,7 +1622,7 @@ static void complete_change_console(struct vc_data *vc) * telling it that it has acquired. Also check if it has died and * clean up (similar to logic employed in change_console()) */ - if (vc->vt_mode.mode == VT_PROCESS) { + if (vc->vt_mode.mode == VT_PROCESS || vc->vt_mode.mode == VT_PROCESS_AUTO) { /* * Send the signal as privileged - kill_pid() will * tell us if the process has gone or something else @@ -1682,7 +1682,7 @@ void change_console(struct vc_data *new_vc) * vt to auto control. */ vc = vc_cons[fg_console].d; - if (vc->vt_mode.mode == VT_PROCESS) { + if (vc->vt_mode.mode == VT_PROCESS || vc->vt_mode.mode == VT_PROCESS_AUTO) { /* * Send the signal as privileged - kill_pid() will * tell us if the process has gone or something else @@ -1693,27 +1693,28 @@ void change_console(struct vc_data *new_vc) */ vc->vt_newvt = new_vc->vc_num; if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) { + if(vc->vt_mode.mode == VT_PROCESS) + /* + * It worked. Mark the vt to switch to and + * return. The process needs to send us a + * VT_RELDISP ioctl to complete the switch. + */ + return; + } else { /* - * It worked. Mark the vt to switch to and - * return. The process needs to send us a - * VT_RELDISP ioctl to complete the switch. + * The controlling process has died, so we revert back to + * normal operation. In this case, we'll also change back + * to KD_TEXT mode. I'm not sure if this is strictly correct + * but it saves the agony when the X server dies and the screen + * remains blanked due to KD_GRAPHICS! It would be nice to do + * this outside of VT_PROCESS but there is no single process + * to account for and tracking tty count may be undesirable. */ - return; + reset_vc(vc); } /* - * The controlling process has died, so we revert back to - * normal operation. In this case, we'll also change back - * to KD_TEXT mode. I'm not sure if this is strictly correct - * but it saves the agony when the X server dies and the screen - * remains blanked due to KD_GRAPHICS! It would be nice to do - * this outside of VT_PROCESS but there is no single process - * to account for and tracking tty count may be undesirable. - */ - reset_vc(vc); - - /* - * Fall through to normal (VT_AUTO) handling of the switch... + * Fall through to normal (VT_AUTO and VT_PROCESS_AUTO) handling of the switch... */ } diff --git a/include/linux/vt.h b/include/linux/vt.h index d5dd0bc..778b7b2 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h @@ -27,7 +27,7 @@ struct vt_mode { #define VT_SETMODE 0x5602 /* set mode of active vt */ #define VT_AUTO 0x00 /* auto vt switching */ #define VT_PROCESS 0x01 /* process controls switching */ -#define VT_ACKACQ 0x02 /* acknowledge switch */ +#define VT_PROCESS_AUTO 0x02 /* process is notified of switching */ struct vt_stat { unsigned short v_active; /* active vt */ @@ -38,6 +38,7 @@ struct vt_stat { #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ #define VT_RELDISP 0x5605 /* release display */ +#define VT_ACKACQ 0x02 /* acknowledge switch */ #define VT_ACTIVATE 0x5606 /* make vt active */ #define VT_WAITACTIVE 0x5607 /* wait for vt active */ -- 1.7.0.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-03-16 0:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <455171.511691268697128244.JavaMail.root@zimbra>
2010-03-15 23:53 ` [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call Ari Entlich
2010-03-16 0:18 ` Greg KH
[not found] <9842632.318001267575211703.JavaMail.root@zimbra>
2010-03-03 0:16 ` Ari Entlich
2010-03-15 20:33 ` Greg KH
[not found] <14018832.317861267574035528.JavaMail.root@zimbra>
2010-03-02 23:55 ` Ari Entlich
2010-03-03 0:02 ` Greg KH
2010-03-02 23:09 [GIT PATCH] TTY patches for 2.6.33-git Greg KH
2010-03-02 23:36 ` [PATCH 34/36] tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call Greg Kroah-Hartman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox