1. 17 Apr, 2008 7 commits
  2. 16 Apr, 2008 26 commits
  3. 15 Apr, 2008 7 commits
    • Josh Boyer's avatar
      [POWERPC] 4xx: Reorganize 4xx defconfigs · 975386ee
      Josh Boyer authored
      Board specific defconfigs are useful, however with the ability to do
      multi-board defconfigs they aren't needed in the top level configs directory.
      
      Move the 4xx board specific defconfigs to individual directories under
      arch/powerpc/configs.
      Signed-off-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
      975386ee
    • Paul Mackerras's avatar
      [LMB] Restructure allocation loops to avoid unsigned underflow · d9024df0
      Paul Mackerras authored
      There is a potential bug in __lmb_alloc_base where we subtract `size'
      from the base address of a reserved region without checking whether
      the subtraction could wrap around and produce a very large unsigned
      value.  In fact it probably isn't possible to hit the bug in practice
      since it would only occur in the situation where we can't satisfy the
      allocation request and there is a reserved region starting at 0.
      
      This fixes the potential bug by breaking out of the loop when we get
      to the point where the base of the reserved region is less than the
      size requested.  This also restructures the loop to be a bit easier to
      follow.
      
      The same logic got copied into lmb_alloc_nid_unreserved, so this makes
      a similar change there.  Here the bug is more likely to be hit because
      the outer loop  (in lmb_alloc_nid) goes through the memory regions in
      increasing order rather than decreasing order as __lmb_alloc_base
      does, and we are therefore more likely to hit the case where we are
      testing against a reserved region with a base address of 0.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      d9024df0
    • Paul Mackerras's avatar
      [LMB] Fix some whitespace and other formatting issues, use pr_debug · 300613e5
      Paul Mackerras authored
      This makes no semantic changes.  It fixes the whitespace and formatting
      a bit, gets rid of a local DBG macro and uses the equivalent pr_debug
      instead, and restructures one while loop that had a function call and
      assignment in the condition to be a bit more readable.  Some comments
      about functions being called with relocation disabled were also removed
      as they would just be confusing to most readers now that the code is
      in lib/.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      300613e5
    • David S. Miller's avatar
      [LMB] Add lmb_alloc_nid() · c50f68c8
      David S. Miller authored
      A variant of lmb_alloc() that tries to allocate memory on a specified
      NUMA node 'nid' but falls back to normal lmb_alloc() if that fails.
      
      The caller provides a 'nid_range' function pointer which assists the
      allocator.  It is given args 'start', 'end', and pointer to integer
      'this_nid'.
      
      It places at 'this_nid' the NUMA node id that corresponds to 'start',
      and returns the end address within 'start' to 'end' at which memory
      assosciated with 'nid' ends.
      
      This callback allows a platform to use lmb_alloc_nid() in just
      about any context, even ones in which early_pfn_to_nid() might
      not be working yet.
      
      This function will be used by the NUMA setup code on sparc64, and also
      it can be used by powerpc, replacing it's hand crafted
      "careful_allocation()" function in arch/powerpc/mm/numa.c
      
      If x86 ever converts it's NUMA support over to using the LMB helpers,
      it can use this too as it has something entirely similar.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      c50f68c8
    • Stephen Rothwell's avatar
    • Stephen Rothwell's avatar
      [POWERPC] remove include of asm/of_device.h from pmi.h · 98245c16
      Stephen Rothwell authored
      pmi.h does not diectly reference anything in of_device.h and of the two
      files that include asm/pmi.h, one includes of_device.h and the other
      includes of_platform.h (which includes of_device.h).
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      98245c16
    • Stephen Rothwell's avatar