1. 10 Aug, 2007 6 commits
    • Geert Uytterhoeven's avatar
      [POWERPC] PS3: Fix storage probe logic · edd2a9d1
      Geert Uytterhoeven authored
      Fix the PS3 storage probe logic to properly find device regions on cold
      startup.
      
       o Change the storage probe event mask from notify_device_ready
         to notify_region_update.
       o Improve the storage probe error handling.
       o Change ps3_storage_wait_for_device() to use a temporary variable to hold
         the buffer address.
      Signed-off-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      edd2a9d1
    • Andre Detsch's avatar
      [POWERPC] cell: Move SPU affinity init to spu_management_of_ops · f5996449
      Andre Detsch authored
      This patch moves affinity initialization code from spu_base.c to a
      new spu_management_of_ops function (init_affinity), which is empty
      in the case of PS3. This fixes a linking problem that was happening
      when compiling for PS3.
      Also, some small code style changes were made.
      Signed-off-by: default avatarAndre Detsch <adetsch@br.ibm.com>
      Signed-off-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
      Acked-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      f5996449
    • Paul Mackerras's avatar
      [POWERPC] Fix potential duplicate entry in SLB shadow buffer · edd0622b
      Paul Mackerras authored
      We were getting a duplicate entry in the SLB shadow buffer in
      slb_flush_and_rebolt() if the kernel stack was in the same segment
      as PAGE_OFFSET, which on POWER6 causes the hypervisor to terminate
      the partition with an error.  This fixes it.
      
      Also we were not creating an SLB entry (or an SLB shadow buffer
      entry) for the kernel stack on secondary CPUs when starting the
      CPU.  This isn't a major problem, since an appropriate entry will
      be created on demand, but this fixes that also for consistency.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      edd0622b
    • Jesper Juhl's avatar
      SLUB: Fix format specifier in Documentation/vm/slabinfo.c · ac078602
      Jesper Juhl authored
      There's a little problem in Documentation/vm/slabinfo.c
      The code is using "%d" in a printf() call to print an 'unsigned long'.
      This patch corrects it to use "%lu" instead.
      Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      ac078602
    • Christoph Lameter's avatar
      SLUB: Fix dynamic dma kmalloc cache creation · 1ceef402
      Christoph Lameter authored
      The dynamic dma kmalloc creation can run into trouble if a
      GFP_ATOMIC allocation is the first one performed for a certain size
      of dma kmalloc slab.
      
      - Move the adding of the slab to sysfs into a workqueue
        (sysfs does GFP_KERNEL allocations)
      - Do not call kmem_cache_destroy() (uses slub_lock)
      - Only acquire the slub_lock once and--if we cannot wait--do a trylock.
      
        This introduces a slight risk of the first kmalloc(x, GFP_DMA|GFP_ATOMIC)
        for a range of sizes failing due to another process holding the slub_lock.
        However, we only need to acquire the spinlock once in order to establish
        each power of two DMA kmalloc cache. The possible conflict is with the
        slub_lock taken during slab management actions (create / remove slab cache).
      
        It is rather typical that a driver will first fill its buffers using
        GFP_KERNEL allocations which will wait until the slub_lock can be acquired.
        Drivers will also create its slab caches first outside of an atomic
        context before starting to use atomic kmalloc from an interrupt context.
      
        If there are any failures then they will occur early after boot or when
        loading of multiple drivers concurrently. Drivers can already accomodate
        failures of GFP_ATOMIC for other reasons. Retries will then create the slab.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      1ceef402
    • Christoph Lameter's avatar
      SLUB: Remove checks for MAX_PARTIAL from kmem_cache_shrink · fcda3d89
      Christoph Lameter authored
      The MAX_PARTIAL checks were supposed to be an optimization. However, slab
      shrinking is a manually triggered process either through running slabinfo
      or by the kernel calling kmem_cache_shrink.
      
      If one really wants to shrink a slab then all operations should be done
      regardless of the size of the partial list. This also fixes an issue that
      could surface if the number of partial slabs was initially above MAX_PARTIAL
      in kmem_cache_shrink and later drops below MAX_PARTIAL through the
      elimination of empty slabs on the partial list (rare). In that case a few
      slabs may be left off the partial list (and only be put back when they
      are empty).
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      fcda3d89
  2. 09 Aug, 2007 34 commits