1. 02 8月, 2012 1 次提交
  2. 22 5月, 2012 2 次提交
  3. 02 11月, 2011 1 次提交
  4. 25 3月, 2011 2 次提交
  5. 15 2月, 2011 3 次提交
  6. 27 10月, 2010 1 次提交
  7. 24 9月, 2010 1 次提交
  8. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  9. 15 12月, 2009 1 次提交
  10. 12 10月, 2009 1 次提交
  11. 17 6月, 2009 1 次提交
  12. 11 1月, 2009 1 次提交
    • Y
      sparseirq: use kstat_irqs_cpu instead · dee4102a
      Yinghai Lu 提交于
      Impact: build fix
      
      Ingo Molnar wrote:
      
      > tip/arch/blackfin/kernel/irqchip.c: In function 'show_interrupts':
      > tip/arch/blackfin/kernel/irqchip.c:85: error: 'struct kernel_stat' has no member named 'irqs'
      > make[2]: *** [arch/blackfin/kernel/irqchip.o] Error 1
      > make[2]: *** Waiting for unfinished jobs....
      >
      
      So could move kstat_irqs array to irq_desc struct.
      
      (s390, m68k, sparc) are not touched yet, because they don't support genirq
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dee4102a
  13. 25 7月, 2008 1 次提交
  14. 06 2月, 2008 1 次提交
  15. 15 11月, 2007 1 次提交
  16. 20 10月, 2007 1 次提交
  17. 17 10月, 2007 3 次提交
    • J
      uml: style fixes pass 3 · ba180fd4
      Jeff Dike 提交于
      Formatting changes in the files which have been changed in the course
      of folding foo_skas functions into their callers.  These include:
      	copyright updates
      	header file trimming
      	style fixes
      	adding severity to printks
      
      These changes should be entirely non-functional.
      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>
      ba180fd4
    • J
      uml: remove code made redundant by CHOOSE_MODE removal · 77bf4400
      Jeff Dike 提交于
      This patch makes a number of simplifications enabled by the removal of
      CHOOSE_MODE.  There were lots of functions that looked like
      
      	int foo(args){
      		foo_skas(args);
      	}
      
      The bodies of foo_skas are now folded into foo, and their declarations (and
      sometimes entire header files) are deleted.
      
      In addition, the union uml_pt_regs, which was a union between the tt and skas
      register formats, is now a struct, with the tt-mode arm of the union being
      removed.
      
      It turns out that usr2_handler was unused, so it is gone.
      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>
      77bf4400
    • J
      uml: throw out CONFIG_MODE_TT · 42fda663
      Jeff Dike 提交于
      This patchset throws out tt mode, which has been non-functional for a while.
      
      This is done in phases, interspersed with code cleanups on the affected files.
      
      The removal is done as follows:
      	remove all code, config options, and files which depend on
      CONFIG_MODE_TT
      	get rid of the CHOOSE_MODE macro, which decided whether to
      call tt-mode or skas-mode code, and replace invocations with their
      skas portions
      	replace all now-trivial procedures with their skas equivalents
      
      There are now a bunch of now-redundant pieces of data structures, including
      mode-specific pieces of the thread structure, pt_regs, and mm_context.  These
      are all replaced with their skas-specific contents.
      
      As part of the ongoing style compliance project, I made a style pass over all
      files that were changed.  There are three such patches, one for each phase,
      covering the files affected by that phase but no later ones.
      
      I noticed that we weren't freeing the LDT state associated with a process when
      it exited, so that's fixed in one of the later patches.
      
      The last patch is a tidying patch which I've had for a while, but which caused
      inexplicable crashes under tt mode.  Since that is no longer a problem, this
      can now go in.
      
      This patch:
      
      Start getting rid of tt mode support.
      
      This patch throws out CONFIG_MODE_TT and all config options, code, and files
      which depend on it.
      
      CONFIG_MODE_SKAS is gone and everything that depends on it is included
      unconditionally.
      
      The few changed lines are in re-written Kconfig help, lines which needed
      something skas-related removed from them, and a few more which weren't
      strictly deletions.
      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>
      42fda663
  18. 20 9月, 2007 1 次提交
    • J
      uml: fix irqstack crash · 508a9274
      Jeff Dike 提交于
      This patch fixes a crash caused by an interrupt coming in when an IRQ stack
      is being torn down.  When this happens, handle_signal will loop, setting up
      the IRQ stack again because the tearing down had finished, and handling
      whatever signals had come in.
      
      However, to_irq_stack returns a mask of pending signals to be handled, plus
      bit zero is set if the IRQ stack was already active, and thus shouldn't be
      torn down.  This causes a problem because when handle_signal goes around
      the loop, sig will be zero, and to_irq_stack will duly set bit zero in the
      returned mask, faking handle_signal into believing that it shouldn't tear
      down the IRQ stack and return thread_info pointers back to their original
      values.
      
      This will eventually cause a crash, as the IRQ stack thread_info will
      continue pointing to the original task_struct and an interrupt will look
      into it after it has been freed.
      
      The fix is to stop passing a signal number into to_irq_stack.  Rather, the
      pending signals mask is initialized beforehand with the bit for sig already
      set.  References to sig in to_irq_stack can be replaced with references to
      the mask.
      
      [akpm@linux-foundation.org: use UL]
      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>
      508a9274
  19. 17 7月, 2007 1 次提交
    • J
      uml: Eliminate kernel allocator wrappers · e4c4bf99
      Jeff Dike 提交于
      UML had two wrapper procedures for kmalloc, um_kmalloc and um_kmalloc_atomic
      because the flag constants weren't available in userspace code.
      kern_constants.h had made kernel constants available for a long time, so there
      is no need for these wrappers any more.  Rather, userspace code calls kmalloc
      directly with the userspace versions of the gfp flags.
      
      kmalloc isn't a real procedure, so I had to essentially copy the inline
      wrapper around __kmalloc.
      
      vmalloc also had its own wrapper for no good reason.  This is now gone.
      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>
      e4c4bf99
  20. 11 5月, 2007 2 次提交
    • J
      uml: iRQ stacks · c14b8494
      Jeff Dike 提交于
      Add a separate IRQ stack.  This differs from i386 in having the entire
      interrupt run on a separate stack rather than starting on the normal kernel
      stack and switching over once some preparation has been done.  The underlying
      mechanism, is of course, sigaltstack.
      
      Another difference is that interrupts that happen in userspace are handled on
      the normal kernel stack.  These cause a wait wakeup instead of a signal
      delivery so there is no point in trying to switch stacks for these.  There's
      no other stuff on the stack, so there is no extra stack consumption.
      
      This quirk makes it possible to have the entire interrupt run on a separate
      stack - process preemption (and calls to schedule()) happens on a normal
      kernel stack.  If we enable CONFIG_PREEMPT, this will need to be rethought.
      
      The IRQ stack for CPU 0 is declared in the same way as the initial kernel
      stack.  IRQ stacks for other CPUs will be allocated dynamically.
      
      An extra field was added to the thread_info structure.  When the active
      thread_info is copied to the IRQ stack, the real_thread field points back to
      the original stack.  This makes it easy to tell where to copy the thread_info
      struct back to when the interrupt is finished.  It also serves as a marker of
      a nested interrupt.  It is NULL for the first interrupt on the stack, and
      non-NULL for any nested interrupts.
      
      Care is taken to behave correctly if a second interrupt comes in when the
      thread_info structure is being set up or taken down.  I could just disable
      interrupts here, but I don't feel like giving up any of the performance gained
      by not flipping signals on and off.
      
      If an interrupt comes in during these critical periods, the handler can't run
      because it has no idea what shape the stack is in.  So, it sets a bit for its
      signal in a global mask and returns.  The outer handler will deal with this
      signal itself.
      
      Atomicity is had with xchg.  A nested interrupt that needs to bail out will
      xchg its signal mask into pending_mask and repeat in case yet another
      interrupt hit at the same time, until the mask stabilizes.
      
      The outermost interrupt will set up the thread_info and xchg a zero into
      pending_mask when it is done.  At this point, nested interrupts will look at
      ->real_thread and see that no setup needs to be done.  They can just continue
      normally.
      
      Similar care needs to be taken when exiting the outer handler.  If another
      interrupt comes in while it is copying the thread_info, it will drop a bit
      into pending_mask.  The outer handler will check this and if it is non-zero,
      will loop, set up the stack again, and handle the interrupt.
      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>
      c14b8494
    • J
      uml: tidy IRQ code · 2ea5bc5e
      Jeff Dike 提交于
      Some tidying of the irq code before introducing irq stacks.  Mostly
      style fixes, but the timer handler calls the timer code directly
      rather than going through the generic sig_handler_common_skas.
      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>
      2ea5bc5e
  21. 08 5月, 2007 2 次提交
  22. 08 3月, 2007 1 次提交
  23. 12 2月, 2007 1 次提交
  24. 21 10月, 2006 1 次提交
  25. 09 10月, 2006 2 次提交
  26. 06 10月, 2006 1 次提交
  27. 04 10月, 2006 1 次提交
  28. 26 9月, 2006 1 次提交
    • 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
  29. 11 7月, 2006 3 次提交