1. 16 Dec, 2008 3 commits
    • Ingo Molnar's avatar
      x86, mm: limit MAXMEM on 64-bit · b6fd6f26
      Ingo Molnar authored
      on 64-bit x86 the physical memory limit is controlled by the sparsemem
      bits - which are 44 bits right now. But MAXMEM (the max pfn number
      e820 parsing will allow to enter our sizing routines) is set to
      0x00003fffffffffff, i.e. 46 bits - that's too large because it overlaps
      into the vmalloc range.
      
      So couple MAXMEM to MAX_PHYSMEM_BITS, and add a comment that the
      maximum of MAX_PHYSMEM_BITS is 45 bits.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b6fd6f26
    • Jan Beulich's avatar
      x86, 32-bit: improve lazy TLB handling code · cfc31983
      Jan Beulich authored
      Impact: micro-optimize the 32-bit TLB flush code
      
      Use the faster x86_{read,write}_percpu() accessors here.
      Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      cfc31983
    • Jan Beulich's avatar
      x86: consolidate __swp_XXX() macros · 1796316a
      Jan Beulich authored
      Impact: cleanup, code robustization
      
      The __swp_...() macros silently relied upon which bits are used for
      _PAGE_FILE and _PAGE_PROTNONE. After having changed _PAGE_PROTNONE in
      our Xen kernel to no longer overlap _PAGE_PAT, live locks and crashes
      were reported that could have been avoided if these macros properly
      used the symbolic constants. Since, as pointed out earlier, for Xen
      Dom0 support mainline likewise will need to eliminate the conflict
      between _PAGE_PAT and _PAGE_PROTNONE, this patch does all the necessary
      adjustments, plus it introduces a mechanism to check consistency
      between MAX_SWAPFILES_SHIFT and the actual encoding macros.
      
      This also fixes a latent bug in that x86-64 used a 6-bit mask in
      __swp_type(), and if MAX_SWAPFILES_SHIFT was increased beyond 5 in (the
      seemingly unrelated) linux/swap.h, this would have resulted in a
      collision with _PAGE_FILE.
      
      Non-PAE 32-bit code gets similarly adjusted for its pte_to_pgoff() and
      pgoff_to_pte() calculations.
      Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      1796316a
  2. 12 Dec, 2008 3 commits
  3. 10 Dec, 2008 34 commits