1. 29 3月, 2011 1 次提交
  2. 26 3月, 2011 2 次提交
  3. 07 10月, 2010 1 次提交
    • D
      Fix IRQ flag handling naming · df9ee292
      David Howells 提交于
      Fix the IRQ flag handling naming.  In linux/irqflags.h under one configuration,
      it maps:
      
      	local_irq_enable() -> raw_local_irq_enable()
      	local_irq_disable() -> raw_local_irq_disable()
      	local_irq_save() -> raw_local_irq_save()
      	...
      
      and under the other configuration, it maps:
      
      	raw_local_irq_enable() -> local_irq_enable()
      	raw_local_irq_disable() -> local_irq_disable()
      	raw_local_irq_save() -> local_irq_save()
      	...
      
      This is quite confusing.  There should be one set of names expected of the
      arch, and this should be wrapped to give another set of names that are expected
      by users of this facility.
      
      Change this to have the arch provide:
      
      	flags = arch_local_save_flags()
      	flags = arch_local_irq_save()
      	arch_local_irq_restore(flags)
      	arch_local_irq_disable()
      	arch_local_irq_enable()
      	arch_irqs_disabled_flags(flags)
      	arch_irqs_disabled()
      	arch_safe_halt()
      
      Then linux/irqflags.h wraps these to provide:
      
      	raw_local_save_flags(flags)
      	raw_local_irq_save(flags)
      	raw_local_irq_restore(flags)
      	raw_local_irq_disable()
      	raw_local_irq_enable()
      	raw_irqs_disabled_flags(flags)
      	raw_irqs_disabled()
      	raw_safe_halt()
      
      with type checking on the flags 'arguments', and then wraps those to provide:
      
      	local_save_flags(flags)
      	local_irq_save(flags)
      	local_irq_restore(flags)
      	local_irq_disable()
      	local_irq_enable()
      	irqs_disabled_flags(flags)
      	irqs_disabled()
      	safe_halt()
      
      with tracing included if enabled.
      
      The arch functions can now all be inline functions rather than some of them
      having to be macros.
      
      Signed-off-by: David Howells <dhowells@redhat.com> [X86, FRV, MN10300]
      Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [Tile]
      Signed-off-by: Michal Simek <monstr@monstr.eu> [Microblaze]
      Tested-by: Catalin Marinas <catalin.marinas@arm.com> [ARM]
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [AVR]
      Acked-by: Tony Luck <tony.luck@intel.com> [IA-64]
      Acked-by: Hirokazu Takata <takata@linux-m32r.org> [M32R]
      Acked-by: Greg Ungerer <gerg@uclinux.org> [M68K/M68KNOMMU]
      Acked-by: Ralf Baechle <ralf@linux-mips.org> [MIPS]
      Acked-by: Kyle McMartin <kyle@mcmartin.ca> [PA-RISC]
      Acked-by: Paul Mackerras <paulus@samba.org> [PowerPC]
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [S390]
      Acked-by: Chen Liqin <liqin.chen@sunplusct.com> [Score]
      Acked-by: Matt Fleming <matt@console-pimps.org> [SH]
      Acked-by: David S. Miller <davem@davemloft.net> [Sparc]
      Acked-by: Chris Zankel <chris@zankel.net> [Xtensa]
      Reviewed-by: Richard Henderson <rth@twiddle.net> [Alpha]
      Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> [H8300]
      Cc: starvik@axis.com [CRIS]
      Cc: jesper.nilsson@axis.com [CRIS]
      Cc: linux-cris-kernel@axis.com
      df9ee292
  4. 05 8月, 2010 1 次提交
  5. 13 4月, 2010 1 次提交
  6. 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
  7. 17 12月, 2009 1 次提交
  8. 04 12月, 2009 1 次提交
  9. 02 11月, 2009 1 次提交
  10. 01 10月, 2009 1 次提交
    • J
      MIPS: SMTC: Remove duplicate structure field initialization · b2651583
      Julia Lawall 提交于
      The definition of the irq_ipi structure has two initializations of the
      flags field.  This combines them.
      
      [Ralf: The issue was originally introduced by commit
      be4894196d79455f420dd7bb78be7dc73bec115c (linux-mips.org) rsp.
      033890b0 (kernel.org).  The original
      intention of the code was to initialize .flags with both flags ored together.
      The broken C code as actually implemented will be compiled by an equally
      broken gcc to use only the last initialization, that is IRQF_PERCPU
      which means this turned into an SMTC bug for 2.6.23 and newer.]
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      identifier I, s, fld;
      position p0,p;
      expression E;
      @@
      
      struct I s =@p0 { ... .fld@p = E, ...};
      
      @s@
      identifier I, s, r.fld;
      position r.p0,p;
      expression E;
      @@
      
      struct I s =@p0 { ... .fld@p = E, ...};
      
      @script:python@
      p0 << r.p0;
      fld << r.fld;
      ps << s.p;
      pr << r.p;
      @@
      
      if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column):
        cocci.print_main(fld,p0)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b2651583
  11. 24 9月, 2009 1 次提交
  12. 18 9月, 2009 1 次提交
  13. 04 8月, 2009 1 次提交
  14. 25 6月, 2009 1 次提交
  15. 17 6月, 2009 1 次提交
  16. 15 1月, 2009 1 次提交
    • M
      irq: update all arches for new irq_desc, fix · d2287f5e
      Mike Travis 提交于
      Impact: fix build errors
      
      Since the SPARSE IRQS changes redefined how the kstat irqs are
      organized, arch's must use the new accessor function:
      
      	kstat_incr_irqs_this_cpu(irq, DESC);
      
      If CONFIG_SPARSE_IRQS is set, then DESC is a pointer to the
      irq_desc which has a pointer to the kstat_irqs.  If not, then
      the .irqs field of struct kernel_stat is used instead.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d2287f5e
  17. 13 1月, 2009 1 次提交
  18. 13 12月, 2008 1 次提交
    • R
      cpumask: centralize cpu_online_map and cpu_possible_map · 98a79d6a
      Rusty Russell 提交于
      Impact: cleanup
      
      Each SMP arch defines these themselves.  Move them to a central
      location.
      
      Twists:
      1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
         CONFIG_INIT_ALL_POSSIBLE for this rather than break them.
      
      2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
         Those archs simply have phys_cpu_present_map replaced everywhere.
      
      3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
         so I just manipulate them both in sync.
      
      4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
         declarations.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NGrant Grundler <grundler@parisc-linux.org>
      Tested-by: NTony Luck <tony.luck@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Mike Travis <travis@sgi.com>
      Cc: ink@jurassic.park.msu.ru
      Cc: rmk@arm.linux.org.uk
      Cc: starvik@axis.com
      Cc: tony.luck@intel.com
      Cc: takata@linux-m32r.org
      Cc: ralf@linux-mips.org
      Cc: grundler@parisc-linux.org
      Cc: paulus@samba.org
      Cc: schwidefsky@de.ibm.com
      Cc: lethal@linux-sh.org
      Cc: wli@holomorphy.com
      Cc: davem@davemloft.net
      Cc: jdike@addtoit.com
      Cc: mingo@redhat.com
      98a79d6a
  19. 04 10月, 2008 3 次提交
  20. 26 6月, 2008 1 次提交
    • J
      mips: convert to generic helpers for IPI function calls · 2f304c0a
      Jens Axboe 提交于
      This converts mips to use the new helpers for smp_call_function() and
      friends, and adds support for smp_call_function_single(). Not tested,
      but it compiles.
      
      mips shares the same IPI for smp_call_function() and
      smp_call_function_single(), since not all mips platforms have enough
      available IPIs to support seperate setups.
      
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      2f304c0a
  21. 29 4月, 2008 2 次提交
  22. 03 2月, 2008 1 次提交
  23. 29 1月, 2008 1 次提交
  24. 30 10月, 2007 1 次提交
    • K
      [MIPS] SMTC: Allow control over TC assignment to vpe0. · be5f1f21
      Kevin D. Kissell 提交于
      Modify the SMTC initialization code to allow boot-time specification not
      only of how many VPEs and TCs to use, but also how many TCs out of the
      allowed pool are to be bound to VPE 0.  The new boot option is "vpe0tcs=N",
      where N is an integer.  Using it in combination with the existing options
      allows arbitrary assignments across the 2 VPEs of a 34K.  e.g. "maxtcs=3
       vpe0tcs=1" forces VPE0 to have 1 TC, while VPE1 has 2, and "maxtcs=4
      vpe0tcs=3" forces VPE0 to have 3 TCs, while VPE1 gets 1.  If no vpe0tcs
      option is specified, the traditional algorithm of evenly dividing TCs
      between available VPEs, with the odd "slop" going to VPE0, is retained.
      
      The reason for doing this is to allow a finer balancing of TCs which can
      handle I/O interrupts on Malta (those on VPE 0) and those which cannot.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      be5f1f21
  25. 12 10月, 2007 8 次提交
  26. 25 9月, 2007 1 次提交
  27. 27 8月, 2007 1 次提交
  28. 01 8月, 2007 2 次提交