1. 31 7月, 2008 1 次提交
  2. 09 5月, 2008 1 次提交
  3. 28 4月, 2008 1 次提交
  4. 06 2月, 2008 3 次提交
  5. 20 10月, 2007 1 次提交
  6. 17 10月, 2007 2 次提交
    • J
      uml: console tidying · 2f8a2dc2
      Jeff Dike 提交于
      Tidy line.c:
      	The includes are more minimal
      	Lots of style fixes
      	All the printks have severities
      	Removed some commented-out code
      	Deleted a useless printk when ioctl is called
      	Fixed some whitespace damage
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f8a2dc2
    • J
      uml: fix console writing bugs · c59dbcad
      Jeff Dike 提交于
      The previous console cleanup patch switched generic_read and generic_write
      from calling os_{read,write}_file to calling read and write directly.  Because
      the calling convention is different, they now need to get any error from errno
      rather than the return value.  I did this for generic_read, but forgot about
      generic_write.
      
      While chasing some output corruption, I noticed that line_write was
      unnecessarily calling flush_buffer, and deleted it.  I don't understand why,
      but the corruption disappeared.  This is unneeded because there already is a
      perfectly good mechanism for finding out when the host output device has some
      room to write data - there is an interrupt that comes in when writes can
      happen again.  line_write calling flush_buffer seemed to just be an attempt to
      opportunistically get some data out to the host.
      
      I also made write_chan short-circuit calling into the host-level code for
      zero-length writes.  Calling libc write with a length of zero conflated write
      not being able to write anything with asking it not to write anything.  Better
      to just cut it off as soon as possible.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c59dbcad
  7. 17 7月, 2007 2 次提交
    • J
      uml: SIGIO support cleanup · 42a359e3
      Jeff Dike 提交于
      Cleanup of the SIGWINCH support.
      
      Some code and comment reformatting.
      
      The stack used for SIGWINCH threads was leaked.  This is now fixed by storing
      it with the pid and other information, and freeing it when the thread is
      killed.
      
      If something goes wrong with a WIGWINCH thread, and this is discovered in the
      interrupt handler, the winch record would leak.  It is now freed, except that
      the IRQ isn't freed.  This is hard to do from interrupt context.  This has the
      side-effect that the IRQ system maintains a reference to the freed structure,
      but that shouldn't cause a problem since the descriptor is disabled.
      
      register_winch_irq is now much better about cleaning up after an
      initialization failure.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      42a359e3
    • J
      uml: handle errors on opening host side of consoles · d14ad81f
      Jeff Dike 提交于
      If the host side of a console can't be opened, this will now produce visible
      error messages.
      
      enable_chan now returns a status and this is passed up to con_open and
      ssl_open, which will complain if anything went wrong.
      
      The default host device for the serial line driver is now a pts device rather
      than a pty device since lots of hosts have LEGACY_PTYS disabled.  This had
      always been failing on such hosts, but silently.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d14ad81f
  8. 09 6月, 2007 1 次提交
  9. 08 5月, 2007 1 次提交
  10. 08 3月, 2007 1 次提交
  11. 13 2月, 2007 1 次提交
  12. 12 2月, 2007 4 次提交
    • J
      [PATCH] uml: fix previous console locking · c6256c68
      Jeff Dike 提交于
      Eliminate the open_mutex after complaints from Blaisorblade.  It turns out
      that the tty count provides the information needed to tell whether we are the
      first opener or last closer.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c6256c68
    • J
      [PATCH] uml: console locking commentary and code cleanup · d5c9ffc6
      Jeff Dike 提交于
      Remove the last vestiges of devfs from console registration.  Change the name
      of the function, plus remove a couple of unused fields from the line_driver
      structure.
      
      struct lines is no longer needed, all traces of it are gone.
      
      The only way that I can see to mark a structure as being almost-const is to
      individually const the fields.  This is the case for the line_driver
      structure, which has only one modifiable field - a list_head in a
      sub-structure.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d5c9ffc6
    • J
      [PATCH] uml: return hotplug errors to host · f28169d2
      Jeff Dike 提交于
      I noticed that errors happening while hotplugging devices from the host were
      never returned back to the mconsole client.  In some cases, success was
      returned instead of even an information-free error.
      
      This patch cleans that up by having the low-level configuration code pass back
      an error string along with an error code.  At the top level, which knows
      whether it is early boot time or responding to an mconsole request, the string
      is printk'd or returned to the mconsole client.
      
      There are also whitespace and trivial code cleanups in the surrounding code.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f28169d2
    • J
      [PATCH] uml: console locking fixes · d79a5809
      Jeff Dike 提交于
      Clean up the console driver locking.  There are various problems here,
      including sleeping under a spinlock and spinlock recursion, some of which are
      fixed here.  This patch deals with the locking involved with opens and closes.
       The problem is that an mconsole request to change a console's configuration
      can race with an open.  Changing a configuration should only be done when a
      console isn't opened.  Also, an open must be looking at a stable
      configuration.  In addition, a get configuration request must observe the same
      locking since it must also see a stable configuration.  With the old locking,
      it was possible for this to hang indefinitely in some cases because open would
      block for a long time waiting for a connection from the host while holding the
      lock needed by the mconsole request.
      
      As explained in the long comment, this is fixed by adding a spinlock for the
      use count and configuration and a mutex for the actual open and close.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d79a5809
  13. 09 12月, 2006 1 次提交
    • A
      [PATCH] tty: switch to ktermios · 606d099c
      Alan Cox 提交于
      This is the grungy swap all the occurrences in the right places patch that
      goes with the updates.  At this point we have the same functionality as
      before (except that sgttyb() returns speeds not zero) and are ready to
      begin turning new stuff on providing nobody reports lots of bugs
      
      If you are a tty driver author converting an out of tree driver the only
      impact should be termios->ktermios name changes for the speed/property
      setting functions from your upper layers.
      
      If you are implementing your own TCGETS function before then your driver
      was broken already and its about to get a whole lot more painful for you so
      please fix it 8)
      
      Also fill in c_ispeed/ospeed on init for most devices, although the current
      code will do this for you anyway but I'd like eventually to lose that extra
      paranoia
      
      [akpm@osdl.org: bluetooth fix]
      [mp3@de.ibm.com: sclp fix]
      [mp3@de.ibm.com: warning fix for tty3270]
      [hugh@veritas.com: fix tty_ioctl powerpc build]
      [jdike@addtoit.com: uml: fix ->set_termios declaration]
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NMartin Peschke <mp3@de.ibm.com>
      Acked-by: NPeter Oberparleiter <oberpar@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      606d099c
  14. 08 12月, 2006 1 次提交
  15. 09 10月, 2006 1 次提交
  16. 04 10月, 2006 1 次提交
    • M
      Attack of "the the"s in arch · 4b3f686d
      Matt LaPlante 提交于
      The patch below corrects multiple occurances of "the the"
      typos across several files, both in source comments and KConfig files.
      There is no actual code changed, only text.  Note this only affects the /arch
      directory, and I believe I could find many more elsewhere. :)
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      4b3f686d
  17. 02 10月, 2006 1 次提交
    • J
      [PATCH] const struct tty_operations · b68e31d0
      Jeff Dike 提交于
      As part of an SMP cleanliness pass over UML, I consted a bunch of
      structures in order to not have to document their locking.  One of these
      structures was a struct tty_operations.  In order to const it in UML
      without introducing compiler complaints, the declaration of
      tty_set_operations needs to be changed, and then all of its callers need to
      be fixed.
      
      This patch declares all struct tty_operations in the tree as const.  In all
      cases, they are static and used only as input to tty_set_operations.  As an
      extra check, I ran an i386 allyesconfig build which produced no extra
      warnings.
      
      53 drivers are affected.  I checked the history of a bunch of them, and in
      most cases, there have been only a handful of maintenance changes in the
      last six months.  serial_core.c was the busiest one that I looked at.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b68e31d0
  18. 27 9月, 2006 1 次提交
  19. 03 7月, 2006 1 次提交
  20. 27 6月, 2006 2 次提交
  21. 02 2月, 2006 1 次提交
  22. 07 1月, 2006 11 次提交
    • J
      [PATCH] uml: SIGWINCH handling cleanup · e464bf2b
      Jeff Dike 提交于
      Code cleanup - unregister_winch and winch_cleanup had some duplicate code.
      This is now abstracted out into free_winch.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e464bf2b
    • J
      [PATCH] uml: umid cleanup · 7eebe8a9
      Jeff Dike 提交于
      This patch cleans up the umid code:
      
      - The only_if_set argument to get_umid is gone.
      
      - get_umid returns an empty string rather than NULL if there is no umid.
      
      - umid_is_random is gone since its users went away.
      
      - Some printfs were turned into printks because the code runs late enough
        that printk is working.
      
      - Error paths were cleaned up.
      
      - Some functions now return an error and let the caller print the error
        message rather than printing it themselves.  This eliminates the practice of
        passing a pointer to printf or printk in, depending on where in the boot
        process we are.
      
      - Major tidying of not_dead_yet - mostly error path cleanup, plus a comment
        explaining why it doesn't react to errors the way you might expect.
      
      - Calls to os_* interfaces that were moved under os are changed back to
        their native libc forms.
      
      - snprintf, strlcpy, and their bounds-checking friends are used more often,
        replacing by-hand bounds checking in some places.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7eebe8a9
    • J
      [PATCH] uml: Add throttling to console driver · e4dcee80
      Jeff Dike 提交于
      This patch adds support for throttling and unthrottling input when the tty
      driver can't handle it.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e4dcee80
    • J
      [PATCH] uml: Simplify console opening/closing and irq registration · 165dc591
      Jeff Dike 提交于
      This patch simplifies the opening and closing of host console devices and the
      registration and deregistration of IRQs.  The intent is to make it obvious
      that an IRQ can't exist without an open file descriptor.
      
      chan_enable will now open the channel, and when both opening and IRQ
      registration are desired, this should be used.  Opening only is done for the
      initial console, so that interface still needs to exist.
      
      The free_irqs_later interface is now gone.  It was intended to avoid freeing
      an IRQ while it was being processed.  It did this, but it didn't eliminate the
      possiblity of free_irq being called from an interrupt, which is bad.  In its
      place is a list of irqs to be freed, which is processed by the signal handler
      just before exiting.  close_one_chan now disables irqs.
      
      When a host device disappears, it is just closed, and that disables IRQs.
      
      The device id registered with the IRQ is now the chan structure, not the tty.
      This is because the interrupt arrives on a descriptor associated with the
      channel.  This caused equivalent changes in the arguments to line_timer_cb.
      line_disable is gone since it is not used any more.
      
      The count field in the line structure is gone.  tty->count is used instead.
      
      The complicated logic in sigio_handler with freeing IRQs when necessary and
      making sure its idea of the next irq is correct is now much simpler.  The irq
      list can't be rearranged underneath it, so it is now a simple list walk.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      165dc591
    • J
      [PATCH] uml: move console configuration · 1f80171e
      Jeff Dike 提交于
      This patch changes when console devices are configured in order to prepare the
      ground for the next patch.
      
      parse_chan_pair is now done earlier, when initcalls are run, rather than when
      the device is opened.
      
      When a host device disappears, the channel list is closed, but not freed.
      This is required by the previous change.  line_config now takes the options
      structure as an argument, and line_open doesn't.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1f80171e
    • J
      [PATCH] uml: line_setup interface change · 418e55d4
      Jeff Dike 提交于
      line_setup is changed to return the device which it set up, rather than just
      success or failure.  This will be important in the line-config patch.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      418e55d4
    • J
      [PATCH] uml: Add static initializations and declarations · 9010772c
      Jeff Dike 提交于
      Some structure fields were being dynamically initialized when they could be
      initialized at compile-time instead.  This also makes some declarations static
      (in the C sense).
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9010772c
    • J
      [PATCH] uml: Move mconsole support out of generic code · d571cd18
      Jeff Dike 提交于
      A bit of restructuring which eliminates the all_allowed argument (which is
      mconsole-specific) to line_setup.  That logic is moved to the mconsole
      callback.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d571cd18
    • J
      [PATCH] uml: Remove unneeded structure field · 88890b88
      Jeff Dike 提交于
      This removes a structure field which turned out to be pointless, and
      references to it.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      88890b88
    • J
      [PATCH] uml: Formatting changes · d50084a2
      Jeff Dike 提交于
      This patch makes a bunch of non-functional changes -
          return(foo); becomes return foo;
          some statements are broken across lines for readability
          some trailing whitespace is cleaned up
          open_one_chan took four arguments, three of which could be
             deduced from the first.  Accordingly, they were eliminated.
          some examples of "} else {" had a newline added
          some whitespace cleanup in the indentation
          lines_init got some control flow cleanup
          some long lines were broken
          removed another emacs-specific C formatting comment
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d50084a2
    • J
      [PATCH] uml: use kstrdup · 970d6e3a
      Jeff Dike 提交于
      There were a bunch of calls to uml_strdup dating from before kstrdup was
      introduced.  This changes those calls.  It doesn't eliminate the definition
      since there is still a couple of calls in userspace code (which should
      probably call the libc strdup).
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      970d6e3a