1. 09 7月, 2008 31 次提交
  2. 08 7月, 2008 9 次提交
    • B
      x86: use FIRMWARE_MEMMAP on x86/E820 · 5dfcf14d
      Bernhard Walle 提交于
      This patch uses the /sys/firmware/memmap interface provided in the last patch
      on the x86 architecture when E820 is used. The patch copies the E820
      memory map very early, and registers the E820 map afterwards via
      firmware_map_add_early().
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Acked-by: NGreg KH <gregkh@suse.de>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: kexec@lists.infradead.org
      Cc: yhlu.kernel@gmail.com
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5dfcf14d
    • B
      sysfs: add /sys/firmware/memmap · 69ac9cd6
      Bernhard Walle 提交于
      This patch adds /sys/firmware/memmap interface that represents the BIOS
      (or Firmware) provided memory map. The tree looks like:
      
          /sys/firmware/memmap/0/start   (hex number)
                                 end     (hex number)
                                 type    (string)
          ...                 /1/start
                                 end
                                 type
      
      With the following shell snippet one can print the memory map in the same form
      the kernel prints itself when booting on x86 (the E820 map).
      
        --------- 8< --------------------------
          #!/bin/sh
          cd /sys/firmware/memmap
          for dir in * ; do
              start=$(cat $dir/start)
              end=$(cat $dir/end)
              type=$(cat $dir/type)
              printf "%016x-%016x (%s)\n" $start $[ $end +1] "$type"
          done
        --------- >8 --------------------------
      
      That patch only provides the needed interface:
      
       1. The sysfs interface.
       2. The structure and enumeration definition.
       3. The function firmware_map_add() and firmware_map_add_early()
          that should be called from architecture code (E820/EFI, for
          example) to add the contents to the interface.
      
      If the kernel is compiled without CONFIG_FIRMWARE_MEMMAP, the interface does
      nothing without cluttering the architecture-specific code with #ifdef's.
      
      The purpose of the new interface is kexec: While /proc/iomem represents
      the *used* memory map (e.g. modified via kernel parameters like 'memmap'
      and 'mem'), the /sys/firmware/memmap tree represents the unmodified memory
      map provided via the firmware. So kexec can:
      
       - use the original memory map for rebooting,
       - use the /proc/iomem for setting up the ELF core headers for kdump
         case that should only represent the memory of the system.
      
      The patch has been tested on i386 and x86_64.
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Acked-by: NGreg KH <gregkh@suse.de>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: kexec@lists.infradead.org
      Cc: yhlu.kernel@gmail.com
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      69ac9cd6
    • Y
      x86: remove acpi_srat config v2 · 6247943d
      Yinghai Lu 提交于
      use ACPI_NUMA directly
      
      and move srat_32.c to mm/
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6247943d
    • Y
      x86: remove have_arch_parse_srat -v2 · 698839fe
      Yinghai Lu 提交于
      we already have the same srat handling interface for 32bit.
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      698839fe
    • I
      printk: export console_drivers · a29d1cfe
      Ingo Molnar 提交于
      this symbol is needed by drivers/video/xen-fbfront.ko.
      
      [ cherry-picked from tip/core/printk ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a29d1cfe
    • J
      x86/cpa: use an undefined PTE bit for testing CPA · 5a654ba7
      Jeremy Fitzhardinge 提交于
      Rather than using _PAGE_GLOBAL - which not all CPUs support - to test
      CPA, use one of the reserved-for-software-use PTE flags instead.  This
      allows CPA testing to work on CPUs which don't support PGD.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5a654ba7
    • J
      x86_32: remove __PAGE_KERNEL(_EXEC) · ef5e94af
      Jeremy Fitzhardinge 提交于
      From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      
      Older x86-32 processors do not support global mappings (PGD), so must
      only use it if the processor supports it.
      
      The _PAGE_KERNEL* flags always have _PAGE_KERNEL set, since logically
      we always want it set.
      
      This is OK even on processors which do not support PGD, since all
      _PAGE flags are masked with __supported_pte_mask before being turned
      into a real in-pagetable pte.  On 32-bit systems, __supported_pte_mask
      is initialized to not contain _PAGE_GLOBAL, and it is then added if
      the CPU is found to support it.
      
      The x86-32 code used to use __PAGE_KERNEL/__PAGE_KERNEL_EXEC for this
      purpose, but they're now redundant and can be removed.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ef5e94af
    • J
      x86: always set _PAGE_GLOBAL in _PAGE_KERNEL* flags · 8490638c
      Jeremy Fitzhardinge 提交于
      Consistently set _PAGE_GLOBAL in _PAGE_KERNEL flags.  This makes 32-
      and 64-bit code consistent, and removes some special cases where
      __PAGE_KERNEL* did not have _PAGE_GLOBAL set, causing confusion as a
      result of the inconsistencies.
      
      This patch only affects x86-64, which generally always supports PGD.
      The x86-32 patch is next.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8490638c
    • J
      x86_64/setup: unconditionally populate the pgd · 574977a2
      Jeremy Fitzhardinge 提交于
      When allocating a new pud, unconditionally populate the pgd (why did
      we bother to create a new pud if we weren't going to populate it?).
      
      This will only happen if the pgd slot was empty, since any existing
      pud will be reused.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      574977a2