1. 02 3月, 2011 1 次提交
  2. 26 1月, 2011 1 次提交
    • T
      console: rename acquire/release_console_sem() to console_lock/unlock() · ac751efa
      Torben Hohn 提交于
      The -rt patches change the console_semaphore to console_mutex.  As a
      result, a quite large chunk of the patches changes all
      acquire/release_console_sem() to acquire/release_console_mutex()
      
      This commit makes things use more neutral function names which dont make
      implications about the underlying lock.
      
      The only real change is the return value of console_trylock which is
      inverted from try_acquire_console_sem()
      
      This patch also paves the way to switching console_sem from a semaphore to
      a mutex.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
      Signed-off-by: NTorben Hohn <torbenh@gmx.de>
      Cc: Thomas Gleixner <tglx@tglx.de>
      Cc: Greg KH <gregkh@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac751efa
  3. 23 1月, 2011 2 次提交
  4. 17 12月, 2010 1 次提交
  5. 05 11月, 2010 1 次提交
  6. 23 10月, 2010 1 次提交
  7. 04 9月, 2010 1 次提交
    • F
      vt: Fix console corruption on driver hand-over. · 9fc2b2d0
      Francisco Jerez 提交于
      After 02f0777a "vc_origin" is no
      longer reset to the screen buffer before calling the con_init() hook
      of the new console driver.
      
      If the old driver wasn't using a fixed scanout buffer (e.g. the case
      of vgacon) "vc_origin" may be a pointer to a VRAM location, and its
      contents aren't guaranteed to be preserved after calling con_deinit()
      on the old driver and con_init() on the new driver, i.e. the
      subsequent console resize may fill the framebuffer with garbage.
      
      It can be reproduced in the transition from vgacon to the nouveau
      framebuffer driver: in that case the legacy VGA aperture "vc_origin"
      points to becomes unreadable after fbcon_init().
      
      This patch reverts the mentioned commit. To avoid the problem it
      intended to fix, stop using "vc_scr_end" in vc_do_resize() to
      calculate how many rows we have to copy (actually the code looks
      simpler this way without the help of "vc_scr_end").
      Signed-off-by: NFrancisco Jerez <currojerez@riseup.net>
      Cc: qiaochong <qiaochong@loongson.cn>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9fc2b2d0
  8. 17 8月, 2010 2 次提交
    • J
      vt,console,kdb: preserve console_blanked while in kdb · beed5336
      Jason Wessel 提交于
      Commit b45cfba4 (vt,console,kdb:
      implement atomic console enter/leave functions) introduced the ability
      to atomically change the console mode with kernel mode setting but did
      not preserve the state of the console_blanked variable.
      
      The console_blanked variable must be restored when executing the
      con_debug_leave() or further kernel mode set changes (such as using
      chvt X) will fail to correctly set the state of console.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      beed5336
    • J
      vt: fix regression warnings from KMS merge · fed891c8
      Jason Wessel 提交于
      Fix the following new sparse warnings in vt.c introduced by the commit
      b45cfba4 (vt,console,kdb: implement
      atomic console enter/leave functions):
      
      drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static?
      drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static?
      drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static?
      drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static?
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      fed891c8
  9. 11 8月, 2010 5 次提交
  10. 10 8月, 2010 2 次提交
    • Q
      drivers/char/vt.c:vc_do_resize(): local var `end' should be unsigned long · 9e0ba741
      qiaochong 提交于
      According include/linux/console_struct.h,vc_scr_end is unsigned long.
      
      struct vc_data {
          unsigned short  vc_num;         /* Console number */
          unsigned int    vc_cols;        /* [#] Console size */
          unsigned int    vc_rows;
          unsigned int    vc_size_row;        /* Bytes per row */
          unsigned int    vc_scan_lines;      /* # of scan lines */
          unsigned long   vc_origin;      /* [!] Start of real screen */
          unsigned long   vc_scr_end;     /* [!] End of real screen */
          unsigned long   vc_visible_origin;  /* [!] Top of visible window */
          unsigned int    vc_top, vc_bottom;  /* Scrolling region */
          const struct consw *vc_sw;
          unsigned short  *vc_screenbuf;
      ...
      }
      Signed-off-by: Nqiaochong <qiaochong@loongson.cn>
      Cc: Greg KH <greg@kroah.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9e0ba741
    • Q
      drivers/char/vt.c: fix vc->vc_origin on take_over_console() · 02f0777a
      qiaochong 提交于
      kernel will die on some platform when switch from vga mode to framebuffer
      mode.  The reason of this bug is that bind_con_driver reset vc->vc_origin
      to (unsigned long)vc->vc_screenbuf.
      
      On vgacon vc->vc_origin is not releated to vc->vc_screenbuf,if set
      vc->vc_origin to vc->vc_screenbuf,kernel will die on vc_do_resize.
      
      static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
              struct vc_data *vc, unsigned int cols, unsigned int lines)
      {
          unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
          unsigned int old_cols, old_rows, old_row_size, old_screen_size;
          unsigned int new_cols, new_rows, new_row_size, new_screen_size;
          unsigned int end, user;
      ...
              end = (old_rows > new_rows) ? old_origin +
                  (old_row_size * new_rows) :
                  vc->vc_scr_end;
      
      ...
      /*
      here for a test from vgacon to framebuffer:
      old_origin=0x810814a0,end=0xb00b8fa0,vc->vc_origin=0x810814a0
      the code bellow will copy memory from 0x810814a0 to 0xb00b8fa0,
      this will cover kernel code,kernel died here.
      */
      
          while (old_origin < end) {
      
              scr_memcpyw((unsigned short *) new_origin,
                      (unsigned short *) old_origin, rlth);
              if (rrem)
                  scr_memsetw((void *)(new_origin + rlth),
                          vc->vc_video_erase_char, rrem);
              old_origin += old_row_size;
              new_origin += new_row_size;
          }
      
      ...
      }
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: Nqiaochong <qiaochong@loongson.cn>
      Cc: Greg KH <greg@kroah.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      02f0777a
  11. 05 8月, 2010 2 次提交
  12. 07 6月, 2010 1 次提交
  13. 05 6月, 2010 1 次提交
  14. 28 5月, 2010 1 次提交
  15. 09 2月, 2010 1 次提交
  16. 05 2月, 2010 1 次提交
  17. 16 12月, 2009 2 次提交
  18. 14 11月, 2009 1 次提交
  19. 20 9月, 2009 4 次提交
  20. 16 9月, 2009 1 次提交
    • D
      sparc: Kill PROM console driver. · 09d3f3f0
      David S. Miller 提交于
      Many years ago when this driver was written, it had a use, but these
      days it's nothing but trouble and distributions should not enable it
      in any situation.
      
      Pretty much every console device a sparc machine could see has a
      bonafide real driver, making the PROM console hack unnecessary.
      
      If any new device shows up, we should write a driver instead of
      depending upon this crutch to save us.  We've been able to take care
      of this even when no chip documentation exists (sunxvr500, sunxvr2500)
      so there are no excuses.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09d3f3f0
  21. 17 7月, 2009 1 次提交
  22. 13 7月, 2009 1 次提交
  23. 17 6月, 2009 1 次提交
    • D
      console: make blank timeout value a boot option · f324edc8
      Daniel Mack 提交于
      The console blank timer is currently hardcoded to 10*60 seconds which
      might be annoying on systems with no input devices attached to wake up the
      console again.  Especially during development, disabling the screen saver
      can be handy - for example when debugging the root fs mount mechanism or
      other scenarios where no userspace program could be started to do that at
      runtime from userspace.
      
      This patch defines a core_param for the variable in charge which allows
      users to entirely disable the blank feature at boot time by setting it 0.
      The value can still be overwritten at runtime using the standard ioctl
      call - this just allows to conditionally change the default.
      Signed-off-by: NDaniel Mack <daniel@caiaq.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f324edc8
  24. 12 6月, 2009 3 次提交
  25. 20 4月, 2009 1 次提交
  26. 25 3月, 2009 1 次提交
    • K
      vcs: hook sysfs devices into object lifetime instead of "binding" · 4995f8ef
      Kay Sievers 提交于
      During bootup performance tracing I noticed many occurrences of
      vca* device creation and removal, leading to the usual userspace
      uevent processing, which are, in this case, rather pointless.
      
      A simple test showing the kernel timing (not including all the
      work userspace has to do), gives us these numbers:
        $ time for i in `seq 1000`; do echo a > /dev/tty2; done
        real    0m1.142s
        user    0m0.015s
        sys     0m0.540s
      
      If we move the hook for the vcs* driver core devices from the
      tty "binding" to the vc allocation/deallocation, which is what
      the vcs* devices represent, we get the following numbers:
        $ time for i in `seq 1000`; do echo a > /dev/tty2; done
        real    0m0.152s
        user    0m0.030s
        sys     0m0.072s
      
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4995f8ef