27 Jul, 2011

1 commit

  • Don't force output if you intend to reboot immediately.

    In this patch, I'm disabling the functionality enabled by
    vc->vc_panic_force_write if panic_timeout < 0 (i.e. no timeout).
    vc_panic_force_write is only enabled for fb video consoles if the
    FBINFO_CAN_FORCE_OUTPUT flag is set.

    For our application, we're using ram_oops to preserved the panic in
    memory. We want to reliably, and as fast as possible, machine_restart.
    The vc_panic_force_write flag results in a bunch of graphics driver code
    to be invoked which slows down restart and decreases reliability. Since
    we're already storing the panic in RAM and are going to reboot
    immediately, there is no benefit in mode switching back to the vc in
    order to display the panic output. The log buffer will get flushed by
    the console_unblank() call so remote management consoles should see all
    output.

    Signed-off-by: Mandeep Singh Baines
    Cc: Huang Ying
    Cc: Andi Kleen
    Cc: Hugh Dickins
    Cc: Olaf Hering
    Cc: Jesse Barnes
    Cc: Dave Airlie
    Cc: Greg Kroah-Hartman
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mandeep Singh Baines
     

18 Feb, 2011

1 commit

  • seems there's no longer need for using con_buf/conf_buf_mtx
    as vcs_read/vcs_write buffer for user's data.

    The do_con_write function, that was the other user of this,
    is currently using its own kmalloc-ed buffer.

    Not sure when this got changed, as I was able to find this code
    in 2.6.9, but it's already gone as far as current git history
    goes - 2.6.12-rc2.

    AFAICS there's a behaviour change with the current change.
    The lseek is not completely mutually exclusive with the
    vcs_read/vcs_write - the file->f_pos might get updated
    via lseek callback during the vcs_read/vcs_write processing.

    I tried to find out if the prefered behaviour is to keep
    this in sync within read/write/lseek functions, but I did
    not find any pattern on different places.

    I guess if user end up calling write/lseek from different
    threads she should know what she's doing. If needed we
    could use dedicated fd mutex/buffer.

    Signed-off-by: Jiri Olsa
    Signed-off-by: Greg Kroah-Hartman

    Jiri Olsa
     

11 Aug, 2010

2 commits

  • Using:

    gcc (GCC) 4.5.0 20100610 (prerelease)

    with CONFIG_CONSOLE_TRANSLATIONS=n, the following warnings are seen:

    drivers/char/vt_ioctl.c: In function ‘vt_ioctl’:
    drivers/char/vt_ioctl.c:1309:4: warning: statement with no effect
    drivers/char/vt.c: In function ‘vc_allocate’:
    drivers/char/vt.c:774:3: warning: statement with no effect
    drivers/video/console/vgacon.c: In function ‘vgacon_init’:
    drivers/video/console/vgacon.c:587:3: warning: statement with no effect
    drivers/video/console/vgacon.c: In function ‘vgacon_deinit’:
    drivers/video/console/vgacon.c:606:2: warning: statement with no effect
    drivers/video/console/fbcon.c: In function ‘fbcon_init’:
    drivers/video/console/fbcon.c:1087:3: warning: statement with no effect
    drivers/video/console/fbcon.c:1089:3: warning: statement with no effect
    drivers/video/console/fbcon.c: In function ‘fbcon_set_disp’:
    drivers/video/console/fbcon.c:1369:3: warning: statement with no effect
    drivers/video/console/fbcon.c:1371:3: warning: statement with no effect

    This is because several functions in include/linux/vt_kern.h are
    defined to (0). Convert them to static inline functions to
    silence the warnings and gain a bit of type safety.

    Signed-off-by: Kevin Winchester
    Signed-off-by: Greg Kroah-Hartman

    Kevin Winchester
     
  • Jesse's initial patch commit said:

    "At panic time (i.e. when oops_in_progress is set) we should try a bit
    harder to update the screen and make sure output gets to the VT, since
    some drivers are capable of flipping back to it.

    So make sure we try to unblank and update the display if called from a
    panic context."

    I've enhanced this to add a flag to the vc that console layer can set to
    indicate they want this behaviour to occur. This also adds support to
    fbcon for that flag and adds an fb flag for drivers to indicate they want
    to use the support. It enables this for KMS drivers.

    Signed-off-by: Dave Airlie
    Signed-off-by: Jesse Barnes
    Acked-by: James Simmons
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Jesse Barnes
     

14 Nov, 2009

1 commit


20 Sep, 2009

3 commits

  • We have vt_kern.h for this

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • In the past someone gratuitiously borrowed chunks of kernel internal vt
    code and dumped them in kernel/power. They have all sorts of deep relations
    with the vt code so put them in the vt tree instead

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • This is needed and requested in various forms for ConsoleKit, screenblank
    handling and the like so do the job with a single interface. Also build the
    interface so that unlike VT_WAITACTIVE and friends it won't miss events.

    FIXME: Should this be a waitactive ioctl or a new device file you can poll
    and read events from. We need the code anyway to fix up the existing broken
    wait for console switch logic but the ConsoleKit people would prefer the
    new device to the ioctl we have here

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

14 Oct, 2008

1 commit


16 Aug, 2008

1 commit

  • This moves it to being a tty operation. That removes special cases and now
    also means that resize can be picked up by um and other non vt consoles
    which may have a resize operation.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

03 Aug, 2008

1 commit


02 Aug, 2008

1 commit

  • This fixes a bug in operator precedence in the newly introduced vc_translate
    macro. Without this fix, the translation of some characters on the
    kernel console is garbled.

    This patch was copied to the e-mail list previously for testing. Now,
    all reports confirm that it works, so this is an official post for
    application.

    Signed-off-by: Tim Bird
    Signed-off-by: David Woodhouse

    Tim Bird
     

04 Jun, 2008

1 commit

  • By turning off the new CONSOLE_TRANSLATIONS option and dropping the
    associated code and tables from the kernel, we can save about 7KiB.

    Taken from linux-tiny project by Tim Bird and mangled further by dwmw2.

    Signed-off-by: Tim Bird
    Signed-off-by: David Woodhouse

    David Woodhouse
     

07 Feb, 2008

1 commit


17 Oct, 2007

1 commit

  • As of now, the kernel defaults to non-unicode and XLATE for the keyboard.
    We've been changing this in Fedora, but that requires patching the defaults
    in the kernel.

    The attached introduces CONFIG_VT_UNICODE, which sets the console in
    unicode mode by default on boot, including both the virtual terminal and
    the keyboard driver.

    Signed-off-by: Bill Nottingham
    Cc: Samuel Thibault
    Cc: Dmitry Torokhov
    Cc: Jiri Kosina
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bill Nottingham
     

18 Jul, 2007

2 commits

  • - add comment for unbind_con_driver().
    - bind_con_driver() is made private again

    Signed-off-by: Jesse Barnes
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesse Barnes
     
  • Allow fbcon to select the primary display adapter using the
    fb_is_primary_device() arch-specific helper. If a a primary adapter is
    detected, fbcon will unbind the old adapter from the VT layer, then rebind
    using the new adapter. This requires that bind_/unbind_con_driver() be made
    public.

    Because this feature may produce unexpected behavior (from the user's POV),
    this must be explicitly enabled in Kconfig.

    [akpm@linux-foundation.org: export unbind_con_driver]
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     

09 May, 2007

1 commit


17 Mar, 2007

1 commit

  • When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the
    SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or
    until the task is interrupted. This patch tests if a console switch can
    occur in set_console() and returns early if a console switch is not
    possible.

    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Andrew Johnson
    Acked-by: Pavel Machek
    Cc: "Antonino A. Daplas"
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Johnson
     

02 Oct, 2006

1 commit

  • This is such a rare path it took me a while to figure out how to test
    this after soring out the locking.

    This patch does several things.
    - The variables used are moved into a structure and declared in vt_kern.h
    - A spinlock is added so we don't have SMP races updating the values.
    - Instead of raw pid_t value a struct_pid is used to guard against
    pid wrap around issues, if the daemon to spawn a new console dies.

    Signed-off-by: Eric W. Biederman
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

30 Sep, 2006

1 commit

  • The current kernel serializes console resizes but does not serialize the
    resize against the tty structure updates. This means that while two
    parallel resizes cannot mess up the console you can get incorrect results
    reported.

    Secondly while doing this I added vc_lock_resize() to lock and resize the
    console. This leaves all knowledge of the console_sem in the vt/console
    driver and kicks it out of the tty layer, which is good

    Thirdly while doing this I decided I couldn't stand "disallocate" any
    longer so I switched it to "deallocate".

    Signed-off-by: Alan Cox
    Cc: Paul Fulghum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

11 Jul, 2006

1 commit

  • MAX_NR_CONSOLES, fg_console, want_console and last_console are more of a
    function of the VT layer than the TTY one. Moving these to vt.h and vt_kern.h
    allows all of the framebuffer and VT console drivers to remove their
    dependency on tty.h.

    [akpm@osdl.org: fix alpha build]
    Signed-off-by: Jon Smirl
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon Smirl
     

21 Jun, 2006

1 commit

  • * git://git.infradead.org/hdrcleanup-2.6: (63 commits)
    [S390] __FD_foo definitions.
    Switch to __s32 types in joystick.h instead of C99 types for consistency.
    Add to headers included for userspace in
    Move inclusion of out of user scope in asm-x86_64/mtrr.h
    Remove struct fddi_statistics from user view in
    Move user-visible parts of drivers/s390/crypto/z90crypt.h to include/asm-s390
    Revert include/media changes: Mauro says those ioctls are only used in-kernel(!)
    Include and use __uXX types in
    Use __uXX types in , include too
    Remove private struct dx_hash_info from public view in
    Include and use __uXX types in
    Use __uXX types in for struct divert_blk et al.
    Use __u32 for elf_addr_t in , not u32. It's user-visible.
    Remove PPP_FCS from user view in , remove __P mess entirely
    Use __uXX types in user-visible structures in
    Don't use 'u32' in user-visible struct ip_conntrack_old_tuple.
    Use __uXX types for S390 DASD volume label definitions which are user-visible
    S390 BIODASDREADCMB ioctl should use __u64 not u64 type.
    Remove unneeded inclusion of from
    Fix private integer types used in V4L2 ioctls.
    ...

    Manually resolve conflict in include/linux/mtd/physmap.h

    Linus Torvalds
     

01 Jun, 2006

1 commit

  • From: Andrew Morton

    Revert commit ff4da2e262d2509fe1bacff70dd00934be569c66.

    It broke APM suspend, probably because APM doesn't switch back to a VT
    when suspending.

    Tracked down by Matt Mackall

    Rafael sayeth:
    "It only fixed the theoretical issue that a quick-handed user could
    switch to X after processes have been frozen and before the devices
    are suspended.

    With the current userland suspend tools it shouldn't be necessary."

    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

26 Apr, 2006

1 commit


23 Mar, 2006

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds