Skip to content
Snippets Groups Projects
  1. Aug 01, 2008
  2. Jul 30, 2008
  3. Jul 29, 2008
  4. Jul 28, 2008
  5. Jul 26, 2008
    • Johannes Weiner's avatar
      lib: generic show_mem() · 454c63b0
      Johannes Weiner authored
      
      This implements a platform-independent version of show_mem().
      
      Signed-off-by: default avatarJohannes 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      454c63b0
    • Roland McGrath's avatar
      task_current_syscall · bbc69863
      Roland McGrath authored
      
      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: default avatarRoland McGrath <roland@redhat.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Reviewed-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bbc69863
    • Arjan van de Ven's avatar
      Use WARN() in lib/ · 5cd2b459
      Arjan van de Ven authored
      
      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: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5cd2b459
    • Alexey Dobriyan's avatar
      SL*B: drop kmem cache argument from constructor · 51cc5068
      Alexey Dobriyan authored
      
      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: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Acked-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Acked-by: default avatarChristoph 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51cc5068
    • Nicholas Piggin's avatar
      radix-tree: add gang_lookup_slot, gang_lookup_slot_tag · 47feff2c
      Nicholas Piggin authored
      
      Introduce gang_lookup_slot() and gang_lookup_slot_tag() functions, which
      are used by lockless pagecache.
      
      Signed-off-by: default avatarNick 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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      47feff2c
    • FUJITA Tomonori's avatar
      dma-mapping: add the device argument to dma_mapping_error() · 8d8bb39b
      FUJITA Tomonori authored
      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: default avatarFUJITA 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8d8bb39b
    • Mike Travis's avatar
      cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpu · 0bc3cc03
      Mike Travis authored
      
        * Replace previous instances of the cpumask_of_cpu_ptr* macros
          with a the new (lvalue capable) generic cpumask_of_cpu().
      
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jack Steiner <steiner@sgi.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0bc3cc03
    • Joerg Roedel's avatar
      iommu: add iommu_num_pages helper function · 3bc9f79e
      Joerg Roedel authored
      
      Calculating the number of pages from given address and length numbers is a task
      required in multiple IOMMU implementations. So implement this as a generic
      function into the IOMMU helper code.
      
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      Cc: iommu@lists.linux-foundation.org
      Cc: bhavna.sarathy@amd.com
      Cc: robert.richter@amd.com
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3bc9f79e
  6. Jul 25, 2008
  7. Jul 24, 2008
    • David Brownell's avatar
      rtc: BCD codeshrink · d3de851a
      David Brownell authored
      
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: default avatarAdrian Bunk <bunk@kernel.org>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d3de851a
    • FUJITA Tomonori's avatar
      add a helper function to test if an object is on the stack · 8b05c7e6
      FUJITA Tomonori authored
      
      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: default avatarFUJITA 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8b05c7e6
    • Mel Gorman's avatar
      mm: add a basic debugging framework for memory initialisation · 6b74ab97
      Mel Gorman authored
      
      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: default avatarMel 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6b74ab97
  8. Jul 23, 2008
    • Jason Wessel's avatar
      kgdb: remove unused HAVE_ARCH_KGDB_SHADOW_INFO config variable · 68afab1c
      Jason Wessel authored
      
      Remove HAVE_ARCH_KGDB_SHADOW_INFO because it does not
      exist anywhere in the kernel mainline sources
      
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      68afab1c
    • Tejun Heo's avatar
      sg: reimplement sg mapping iterator · 137d3edb
      Tejun Heo authored
      
      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: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      137d3edb
  9. Jul 22, 2008
  10. Jul 18, 2008
  11. Jul 17, 2008
    • Ingo Molnar's avatar
      ftrace: do not trace library functions · 2464a609
      Ingo Molnar authored
      
      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: default avatarIngo Molnar <mingo@elte.hu>
      2464a609
    • Ingo Molnar's avatar
      ftrace: fix lockup with MAXSMP · 9fa11137
      Ingo Molnar authored
      
      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: default avatarIngo Molnar <mingo@elte.hu>
      9fa11137
  12. Jul 12, 2008
  13. Jul 11, 2008
    • Mingming Cao's avatar
      percpu_counter: new function percpu_counter_sum_and_set · e8ced39d
      Mingming Cao authored
      
      Delayed allocation need to check free blocks at every write time.
      percpu_counter_read_positive() is not quit accurate. delayed
      allocation need a more accurate accounting, but using
      percpu_counter_sum_positive() is frequently is quite expensive.
      
      This patch added a new function to update center counter when sum
      per-cpu counter, to increase the accurate rate for next
      percpu_counter_read() and require less calling expensive
      percpu_counter_sum().
      
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      e8ced39d
Loading