1. 30 3月, 2010 4 次提交
    • 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
    • T
      x86: don't include slab.h from arch/x86/include/asm/pgtable_32.h · 57f4c226
      Tejun Heo 提交于
      Including slab.h from x86 pgtable_32.h creates a troublesome
      dependency chain w/ ftrace enabled.  The following chain leads to
      inclusion of pgtable_32.h from define_trace.h.
      
       trace/define_trace.h
       trace/ftrace.h
       linux/ftrace_event.h
       linux/ring_buffer.h
       linux/mm.h
       asm/pgtable.h
       asm/pgtable_32.h
      
      slab.h itself defines trace hooks via
      
       linux/sl[aou]b_def.h
       linux/kmemtrace.h
       trace/events/kmem.h
      
      If slab.h is not included before define_trace.h is included, this
      leads to duplicate definitions of kmemtrace hooks or other include
      dependency problems.
      
      pgtable_32.h doesn't need slab.h to begin with.  Don't include it from
      there.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Acked-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      57f4c226
    • D
      sparc64: Properly truncate pt_regs framepointer in perf callback. · 9e8307ec
      David S. Miller 提交于
      For 32-bit processes, we save the full 64-bits of the regs in pt_regs.
      
      But unlike when the userspace actually does load and store
      instructions, the top 32-bits don't get automatically truncated by the
      cpu in kernel mode (because the kernel doesn't execute with PSTATE_AM
      address masking enabled).
      
      So we have to do it by hand.
      Reported-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9e8307ec
    • D
      frv/chris: fix lines with a missing semicolons · f7454c5d
      David Howells 提交于
      Commit b26b2d49 ("resource/PCI: align functions now return start
      of resource") added lines with missing semicolons.
      
      Add the missing semicolons to the FRV and CRIS arch code.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: linux@dominikbrodowski.net
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f7454c5d
  2. 28 3月, 2010 1 次提交
  3. 27 3月, 2010 1 次提交
  4. 26 3月, 2010 2 次提交
  5. 25 3月, 2010 2 次提交
  6. 24 3月, 2010 6 次提交
  7. 23 3月, 2010 10 次提交
  8. 22 3月, 2010 9 次提交
  9. 20 3月, 2010 3 次提交
    • R
      ARM: Update mach-types · 48edcfcf
      Russell King 提交于
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      48edcfcf
    • R
      ARM: Fix IXP23xx build error in mach/memory.h · 0372c380
      Russell King 提交于
      One to many close parens.
      
      In file included from arch/arm/include/asm/page.h:202,
                       from include/linux/mm_types.h:15,
                       from include/linux/sched.h:63,
                       from arch/arm/kernel/asm-offsets.c:13:
      arch/arm/include/asm/memory.h: In function 'virt_to_bus':
      arch/arm/include/asm/memory.h:214: error: expected ';' before ')' token
      arch/arm/include/asm/memory.h:214: error: expected statement before ')' token
      arch/arm/include/asm/memory.h: In function 'bus_to_virt':
      arch/arm/include/asm/memory.h:219: error: expected ';' before ')' token
      arch/arm/include/asm/memory.h:219: error: expected statement before ')' token
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0372c380
    • A
      x86, amd: Restrict usage of c1e_idle() · 035a02c1
      Andreas Herrmann 提交于
      Currently c1e_idle returns true for all CPUs greater than or equal to
      family 0xf model 0x40. This covers too many CPUs.
      
      Meanwhile a respective erratum for the underlying problem was filed
      (#400). This patch adds the logic to check whether erratum #400
      applies to a given CPU.
      Especially for CPUs where SMI/HW triggered C1e is not supported,
      c1e_idle() doesn't need to be used. We can check this by looking at
      the respective OSVW bit for erratum #400.
      
      Cc: <stable@kernel.org> # .32.x .33.x
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      LKML-Reference: <20100319110922.GA19614@alberich.amd.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      035a02c1
  10. 19 3月, 2010 2 次提交
    • F
      powerpc: Remove IOMMU_VMERGE config option · 191aee58
      FUJITA Tomonori 提交于
      The description says:
      
       Cause IO segments sent to a device for DMA to be merged virtually
       by the IOMMU when they happen to have been allocated contiguously.
       This doesn't add pressure to the IOMMU allocator. However, some
       drivers don't support getting large merged segments coming back
       from *_map_sg().
      
       Most drivers don't have this problem; it is safe to say Y here.
      
      It's out of date. Long ago, drivers didn't have a way to tell IOMMUs
      about their segment length limit (that is, the maximum segment length
      that they can handle). So IOMMUs merged as many segments as possible
      and gave too large segments to drivers.
      
      dma_get_max_seg_size() was introduced to solve the above
      problem. Device drives can use the API to tell IOMMU about the maximum
      segment length that they can handle. In addition, the default limit
      (64K) should be safe for everyone.
      
      So this config option seems to be unnecessary.
      
      Note that this config option just enables users to disable the virtual
      merging by default. Users can still disable the virtual merging by the
      boot parameter.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      191aee58
    • F
      powerpc: Fix swiotlb to respect the boot option · a9327296
      FUJITA Tomonori 提交于
      powerpc initializes swiotlb before parsing the kernel boot options so
      swiotlb options (e.g. specifying the swiotlb buffer size) are ignored.
      
      Any time before freeing bootmem works for swiotlb so this patch moves
      powerpc's swiotlb initialization after parsing the kernel boot
      options, mem_init (as x86 does).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Tested-by: NBecky Bruce <beckyb@kernel.crashing.org>
      Tested-by: NAlbert Herranz <albert_herranz@yahoo.es>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a9327296