1. 26 9月, 2006 2 次提交
    • J
      [PATCH] uml: SIGIO cleanups · 19bdf040
      Jeff Dike 提交于
      - Various cleanups in the sigio code.
      
      - Removed explicit zero-initializations of a few structures.
      
      - Improved some error messages.
      
      - An API change - there was an asymmetry between reactivate_fd calling
        maybe_sigio_broken, which goes through all the machinery of figuring out if
        a file descriptor supports SIGIO and applying the workaround to it if not,
        and deactivate_fd, which just turns off the descriptor.
      
        This is changed so that only activate_fd calls maybe_sigio_broken, when
        the descriptor is first seen.  reactivate_fd now calls add_sigio_fd, which
        is symmetric with ignore_sigio_fd.
      
        This removes a recursion which makes a critical section look more critical
        than it really was, obsoleting a big comment to that effect.  This requires
        keeping track of all descriptors which are getting the SIGIO treatment, not
        just the ones being polled at any given moment, so that reactivate_fd,
        through add_sigio_fd, doesn't try to tell the SIGIO thread about descriptors
        it doesn't care about.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      19bdf040
    • J
      [PATCH] uml: Use klibc setjmp/longjmp · 13c06be3
      Jeff Dike 提交于
      This patch adds an implementation of setjmp and longjmp to UML, allowing
      access to the inside of a jmpbuf without needing the access macros formerly
      provided by libc.
      
      The implementation is stolen from klibc.  I copy the relevant files into
      arch/um.  I have another patch which avoids the copying, but requires klibc be
      in the tree.
      
      setjmp and longjmp users required some tweaking.  Includes of <setjmp.h> were
      removed and includes of the UML longjmp.h were added where necessary.  There
      are also replacements of siglongjmp with UML_LONGJMP which I somehow missed
      earlier.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      13c06be3
  2. 15 7月, 2006 2 次提交
  3. 11 7月, 2006 9 次提交
  4. 01 7月, 2006 1 次提交
  5. 27 6月, 2006 1 次提交
  6. 26 6月, 2006 1 次提交
  7. 06 6月, 2006 1 次提交
  8. 20 4月, 2006 2 次提交
  9. 11 4月, 2006 2 次提交
  10. 01 4月, 2006 7 次提交
  11. 28 3月, 2006 5 次提交
  12. 25 2月, 2006 2 次提交
  13. 08 2月, 2006 1 次提交
  14. 02 2月, 2006 1 次提交
  15. 19 1月, 2006 3 次提交
    • P
      [PATCH] uml: avoid malloc to sleep in atomic sections · b6316293
      Paolo 'Blaisorblade' Giarrusso 提交于
      Ugly trick to help make malloc not sleeping - we can't do anything else.  But
      this is not yet optimal, since spinlock don't trigger in_atomic() when
      preemption is disabled.
      
      Also, even if ugly, this was already used in one place, and was even more
      bogus.  Fix it.
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b6316293
    • J
      [PATCH] uml: use setjmp/longjmp instead of sigsetjmp/siglongjmp · c83d4635
      Jeff Dike 提交于
      Now that we are doing soft interrupts, there's no point in using sigsetjmp and
      siglongjmp.  Using setjmp and longjmp saves a sigprocmask on every jump.
      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>
      c83d4635
    • J
      [PATCH] uml: implement soft interrupts · 1d7173ba
      Jeff Dike 提交于
      This patch implements soft interrupts.  Interrupt enabling and disabling no
      longer map to sigprocmask.  Rather, a flag is set indicating whether
      interrupts may be handled.  If a signal comes in and interrupts are marked as
      OK, then it is handled normally.  If interrupts are marked as off, then the
      signal handler simply returns after noting that a signal needs handling.  When
      interrupts are enabled later on, this pending signals flag is checked, and the
      IRQ handlers are called at that point.
      
      The point of this is to reduce the cost of local_irq_save et al, since they
      are very much more common than the signals that they are enabling and
      disabling.  Soft interrupts produce a speed-up of ~25% on a kernel build.
      
      Subtleties -
      
          UML uses sigsetjmp/siglongjmp to switch contexts.  sigsetjmp has been
          wrapped in a save_flags-like macro which remembers the interrupt state at
          setjmp time, and restores it when it is longjmp-ed back to.
      
          The enable_signals function has to loop because the IRQ handler
          disables interrupts before returning.  enable_signals has to return with
          signals enabled, and signals may come in between the disabling and the
          return to enable_signals.  So, it loops for as long as there are pending
          signals, ensuring that signals are enabled when it finally returns, and
          that there are no pending signals that need to be dealt with.
      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>
      1d7173ba