1. 01 8月, 2008 1 次提交
  2. 31 7月, 2008 1 次提交
  3. 29 7月, 2008 2 次提交
  4. 27 7月, 2008 6 次提交
    • J
      lib: generic show_mem() · 454c63b0
      Johannes Weiner 提交于
      This implements a platform-independent version of show_mem().
      Signed-off-by: NJohannes Weiner <hannes@saeurebad.de>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Bryan Wu <cooloney@kernel.org>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Mikael Starvik <starvik@axis.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      454c63b0
    • R
      task_current_syscall · bbc69863
      Roland McGrath 提交于
      This adds the new function task_current_syscall() on machines where the
      asm/syscall.h interface is supported (CONFIG_HAVE_ARCH_TRACEHOOK).  It's
      exported for modules to use in the future.  This function safely samples
      the state of a blocked thread to collect what system call it is blocked
      in, and the six system call argument registers.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bbc69863
    • A
      Use WARN() in lib/ · 5cd2b459
      Arjan van de Ven 提交于
      Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
      part of the warning section for better reporting/collection.  In addition, one
      of the if() clauses collapes into the WARN() entirely now.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5cd2b459
    • A
      SL*B: drop kmem cache argument from constructor · 51cc5068
      Alexey Dobriyan 提交于
      Kmem cache passed to constructor is only needed for constructors that are
      themselves multiplexeres.  Nobody uses this "feature", nor does anybody uses
      passed kmem cache in non-trivial way, so pass only pointer to object.
      
      Non-trivial places are:
      	arch/powerpc/mm/init_64.c
      	arch/powerpc/mm/hugetlbpage.c
      
      This is flag day, yes.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Acked-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Acked-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Matt Mackall <mpm@selenic.com>
      [akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c]
      [akpm@linux-foundation.org: fix mm/slab.c]
      [akpm@linux-foundation.org: fix ubifs]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      51cc5068
    • N
      radix-tree: add gang_lookup_slot, gang_lookup_slot_tag · 47feff2c
      Nick Piggin 提交于
      Introduce gang_lookup_slot() and gang_lookup_slot_tag() functions, which
      are used by lockless pagecache.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Reviewed-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      47feff2c
    • F
      dma-mapping: add the device argument to dma_mapping_error() · 8d8bb39b
      FUJITA Tomonori 提交于
      Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
      architecture does:
      
      This enables us to cleanly fix the Calgary IOMMU issue that some devices
      are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).
      
      I think that per-device dma_mapping_ops support would be also helpful for
      KVM people to support PCI passthrough but Andi thinks that this makes it
      difficult to support the PCI passthrough (see the above thread).  So I
      CC'ed this to KVM camp.  Comments are appreciated.
      
      A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
      pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
      NULL, the system-wide dma_ops pointer is used as before.
      
      If it's useful for KVM people, I plan to implement a mechanism to register
      a hook called when a new pci (or dma capable) device is created (it works
      with hot plugging).  It enables IOMMUs to set up an appropriate
      dma_mapping_ops per device.
      
      The major obstacle is that dma_mapping_error doesn't take a pointer to the
      device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
      device.  Note all the POWER IOMMUs use the same dma_mapping_error function
      so this is not a problem for POWER but x86 IOMMUs use different
      dma_mapping_error functions.
      
      The first patch adds the device argument to dma_mapping_error.  The patch
      is trivial but large since it touches lots of drivers and dma-mapping.h in
      all the architecture.
      
      This patch:
      
      dma_mapping_error() doesn't take a pointer to the device unlike other DMA
      operations.  So we can't have dma_mapping_ops per device.
      
      Note that POWER already has dma_mapping_ops per device but all the POWER
      IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
      argument.
      
      [akpm@linux-foundation.org: fix sge]
      [akpm@linux-foundation.org: fix svc_rdma]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix bnx2x]
      [akpm@linux-foundation.org: fix s2io]
      [akpm@linux-foundation.org: fix pasemi_mac]
      [akpm@linux-foundation.org: fix sdhci]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix sparc]
      [akpm@linux-foundation.org: fix ibmvscsi]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Avi Kivity <avi@qumranet.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d8bb39b
  5. 26 7月, 2008 15 次提交
  6. 25 7月, 2008 3 次提交
    • D
      rtc: BCD codeshrink · d3de851a
      David Brownell 提交于
      This updates <linux/bcd.h> to define the key routines as constant
      functions, which the macros will then call.  Newer code can now call
      bcd2bin() instead of SCREAMING BCD2BIN() TO THE FOUR WINDS.
      
      This lets each driver shrink their codespace by using N function calls to
      a single (global) copy of those routines, instead of N inlined copies of
      these functions per driver.
      
      These routines aren't used in speed-critical code.  Almost all callers are
      in the RTC framework.  Typical per-driver savings is near 300 bytes.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NAdrian Bunk <bunk@kernel.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d3de851a
    • F
      add a helper function to test if an object is on the stack · 8b05c7e6
      FUJITA Tomonori 提交于
      lib/debugobjects.c has a function to test if an object is on the stack.
      The block layer and ide needs it (they need to avoid DMA from/to stack
      buffers).  This patch moves the function to include/linux/sched.h so that
      everyone can use it.
      
      lib/debugobjects.c uses current->stack but this patch uses a
      task_stack_page() accessor, which is a preferable way to access the stack.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8b05c7e6
    • M
      mm: add a basic debugging framework for memory initialisation · 6b74ab97
      Mel Gorman 提交于
      Boot initialisation is very complex, with significant numbers of
      architecture-specific routines, hooks and code ordering.  While significant
      amounts of the initialisation is architecture-independent, it trusts the data
      received from the architecture layer.  This is a mistake, and has resulted in
      a number of difficult-to-diagnose bugs.
      
      This patchset adds some validation and tracing to memory initialisation.  It
      also introduces a few basic defensive measures.  The validation code can be
      explicitly disabled for embedded systems.
      
      This patch:
      
      Add additional debugging and verification code for memory initialisation.
      
      Once enabled, the verification checks are always run and when required
      additional debugging information may be outputted via a mminit_loglevel=
      command-line parameter.
      
      The verification code is placed in a new file mm/mm_init.c.  Ideally other mm
      initialisation code will be moved here over time.
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6b74ab97
  7. 24 7月, 2008 1 次提交
  8. 23 7月, 2008 1 次提交
    • T
      sg: reimplement sg mapping iterator · 137d3edb
      Tejun Heo 提交于
      This is alternative implementation of sg content iterator introduced
      by commit 83e7d317... from Pierre Ossman in next-20080716.  As there's
      already an sg iterator which iterates over sg entries themselves, name
      this sg_mapping_iterator.
      
      Slightly edited description from the original implementation follows.
      
      Iteration over a sg list is not that trivial when you take into
      account that memory pages might have to be mapped before being used.
      Unfortunately, that means that some parts of the kernel restrict
      themselves to directly accesible memory just to not have to deal with
      the mess.
      
      This patch adds a simple iterator system that allows any code to
      easily traverse an sg list and not have to deal with all the details.
      The user can decide to consume part of the iteration.  Also, iteration
      can be stopped and resumed later if releasing the kmap between
      iteration steps is necessary.  These features are useful to implement
      piecemeal sg copying for interrupt drive PIO for example.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      137d3edb
  9. 22 7月, 2008 4 次提交
  10. 19 7月, 2008 2 次提交
  11. 17 7月, 2008 2 次提交
    • I
      ftrace: do not trace library functions · 2464a609
      Ingo Molnar 提交于
      make function tracing more robust: do not trace library functions.
      
      We've already got a sizable list of exceptions:
      
       ifdef CONFIG_FTRACE
       # Do not profile string.o, since it may be used in early boot or vdso
       CFLAGS_REMOVE_string.o = -pg
       # Also do not profile any debug utilities
       CFLAGS_REMOVE_spinlock_debug.o = -pg
       CFLAGS_REMOVE_list_debug.o = -pg
       CFLAGS_REMOVE_debugobjects.o = -pg
       CFLAGS_REMOVE_find_next_bit.o = -pg
       CFLAGS_REMOVE_cpumask.o = -pg
       CFLAGS_REMOVE_bitmap.o = -pg
       endif
      
      ... and the pattern has been that random library functionality showed
      up in ftrace's critical path (outside of its recursion check), causing
      hard to debug lockups.
      
      So be a bit defensive about it and exclude all lib/*.o functions by
      default. It's not that they are overly interesting for tracing purposes
      anyway. Specific ones can still be traced, in an opt-in manner.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2464a609
    • I
      ftrace: fix lockup with MAXSMP · 9fa11137
      Ingo Molnar 提交于
      MAXSMP brings in lots of use of various bitops in smp_processor_id()
      and friends - causing ftrace to lock up during bootup:
      
        calling  anon_inode_init+0x0/0x130
        initcall anon_inode_init+0x0/0x130 returned 0 after 0 msecs
        calling  acpi_event_init+0x0/0x57
        [ hard hang ]
      
      So exclude the bitops facilities from tracing.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9fa11137
  12. 12 7月, 2008 2 次提交