1. 18 Feb, 2008 6 commits
    • Rusty Russell's avatar
      x86: fix lguest build failure · f6c540cd
      Rusty Russell authored
      drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): 
      	undefined reference to `LGUEST_PAGES_regs_trapnum'
      
      This problem was caused by asm-offsets.c only having the offsets when
      lguest *guest* support was set, not lguest host (host support used to
      imply guest support, so now they're separate these bugs come out).
      
      Lguest guest support and host support are separate config options:
      they used to be tied together. Sort out which parts of asm-offsets are
      needed for Guest and Host.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      f6c540cd
    • Yinghai Lu's avatar
      x86: reenable support for system without on node0 · b7ad149d
      Yinghai Lu authored
      One system doesn't have RAM for node0 installed.
      
      SRAT: PXM 0 -> APIC 0 -> Node 0
      SRAT: PXM 0 -> APIC 1 -> Node 0
      SRAT: PXM 1 -> APIC 2 -> Node 1
      SRAT: PXM 1 -> APIC 3 -> Node 1
      SRAT: Node 1 PXM 1 0-a0000
      SRAT: Node 1 PXM 1 0-dd000000
      SRAT: Node 1 PXM 1 0-123000000
      ACPI: SLIT: nodes = 2
       10 13
       13 10
      mapped APIC to ffffffffff5fb000 (        fee00000)
      Bootmem setup node 1 0000000000000000-0000000123000000
        NODE_DATA [000000000000e000 - 0000000000014fff]
        bootmap [0000000000015000 -  00000000000395ff] pages 25
      Could not find start_pfn for node 0
      Pid: 0, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #14
      
      Call Trace:
       [<ffffffff80bab498>] free_area_init_node+0x22/0x381
       [<ffffffff8045ffc5>] generic_swap+0x0/0x17
       [<ffffffff80bab0cc>] find_zone_movable_pfns_for_nodes+0x54/0x271
       [<ffffffff80baba5f>] free_area_init_nodes+0x239/0x287
       [<ffffffff80ba6311>] paging_init+0x46/0x4c
       [<ffffffff80b9dda5>] setup_arch+0x3c3/0x44e
       [<ffffffff80b978be>] start_kernel+0x6f/0x2c7
       [<ffffffff80b971cc>] _sinittext+0x1cc/0x1d3
      
      This happens because node 0 is not online, but the node state in
      mm/page_alloc.c has node 0 set.
      
              nodemask_t node_states[NR_NODE_STATES] __read_mostly = {
                      [N_POSSIBLE] = NODE_MASK_ALL,
                      [N_ONLINE] = { { [0] = 1UL } },
      
      So we need to clear node_online_map before initializing the memory.
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@sun.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      b7ad149d
    • Thomas Gleixner's avatar
      x86: CPA: avoid double checking of alias ranges · f34b439f
      Thomas Gleixner authored
      When the CPA code is called with an virtual address in the range of
      the direct mapping or the high alias then we do not need to run
      through the alias check for this range.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f34b439f
    • Thomas Gleixner's avatar
      x86: CPA no alias checking for _NX · af96e443
      Thomas Gleixner authored
      NX settings are not required to be consistent across alias mappings.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      af96e443
    • Thomas Gleixner's avatar
      x86: zap invalid and unused pmds in early boot · 31eedd82
      Thomas Gleixner authored
      The early boot code maps KERNEL_TEXT_SIZE (currently 40MB) starting
      from __START_KERNEL_map. The kernel itself only needs _text to _end
      mapped in the high alias. On relocatible kernels the ASM setup code
      adjusts the compile time created high mappings to the relocation. This
      creates invalid pmd entries for negative offsets:
      
      0xffffffff80000000 -> pmd entry: ffffffffff2001e3
      It points outside of the physical address space and is marked present.
      
      This starts at the virtual address __START_KERNEL_map and goes up to
      the point where the first valid physical address (0x0) is mapped.
      
      Zap the mappings before _text and after _end right away in early
      boot. This removes also the invalid entries.
      
      Furthermore it simplifies the range check for high aliases.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      31eedd82
    • Thomas Gleixner's avatar
      x86: CPA, fix alias checks · c31c7d48
      Thomas Gleixner authored
      c_p_a() did not discover all aliases correctly. (such as when called
      on vmalloc()-ed areas or ioremap()-ed areas)
      
      Push the alias checks to the lower, physical level and consistently
      discover all aliases that might exist: the low direct mappings and
      the high linear kernel-text mappings (on 64-bit).
      
      Thanks to Andi Kleen for pointing out that this was buggy.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c31c7d48
  2. 15 Feb, 2008 34 commits