1. 10 2月, 2008 1 次提交
    • I
      x86: construct 32-bit boot time page tables in native format. · 551889a6
      Ian Campbell 提交于
      Specifically the boot time page tables in a CONFIG_X86_PAE=y enabled
      kernel are in PAE format.
      
      early_ioremap is updated to use the standard page table accessors.
      
      Clear any mappings beyond max_low_pfn from the boot page tables in
      native_pagetable_setup_start because the initial mappings can extend
      beyond the range of physical memory and into the vmalloc area.
      
      Derived from patches by Eric Biederman and H. Peter Anvin.
      
      [ jeremy@goop.org: PAE swapper_pg_dir needs to be page-sized fix ]
      Signed-off-by: NIan Campbell <ijc@hellion.org.uk>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Mika Penttilä <mika.penttila@kolumbus.fi>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      551889a6
  2. 04 2月, 2008 1 次提交
  3. 02 2月, 2008 1 次提交
  4. 30 1月, 2008 22 次提交
  5. 15 1月, 2008 1 次提交
    • I
      x86: fix boot crash on HIGHMEM4G && SPARSEMEM · 23be8c7d
      Ingo Molnar 提交于
      Denys Fedoryshchenko reported a bootup crash when he upgraded
      his system from 3GB to 4GB RAM:
      
         http://lkml.org/lkml/2008/1/7/9
      
      the bug is due to HIGHMEM4G && SPARSEMEM kernels making pfn_to_page()
      to return an invalid pointer when the pfn is in a memory hole. The
      256 MB PCI aperture at the end of RAM was not mapped by sparsemem,
      and hence the pfn was not valid. But set_highmem_pages_init() iterated
      this range without checking the pfn's validity first.
      
      this bug was probably present in the sparsemem code ever since sparsemem
      has been introduced in v2.6.13. It was masked due to HIGHMEM64G using
      larger memory regions in sparsemem_32.h:
      
       #ifdef CONFIG_X86_PAE
       #define SECTION_SIZE_BITS       30
       #define MAX_PHYSADDR_BITS       36
       #define MAX_PHYSMEM_BITS        36
       #else
       #define SECTION_SIZE_BITS       26
       #define MAX_PHYSADDR_BITS       32
       #define MAX_PHYSMEM_BITS        32
       #endif
      
      which creates 1GB sparsemem regions instead of 64MB sparsemem regions.
      So in practice we only ever created true sparsemem holes on x86 with
      HIGHMEM4G - but that was rarely used by distros.
      
      ( btw., we could probably save 2MB of mem_map[]s on X86_PAE if we reduced
        the sparsemem region size to 256 MB. )
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      23be8c7d
  6. 18 10月, 2007 1 次提交
    • I
      x86: fix CONFIG_PAGEALLOC related boot hangs/OOMs · 509a80c4
      Ingo Molnar 提交于
      if CONFIG_PAGEALLOC is enabled then X86_FEATURE_PSE is disabled and all
      the kernel physical RAM pagetables are set up as 4K pages. This is
      needed so that CONFIG_PAGEALLOC can do finegrained mapping and unmapping
      of pages.
      
      as a side-effect though, the total size of memory allocated as kernel
      pagetables increases significantly. All these pagetables are allocated
      via alloc_bootmem_low_pages(), straight out of the lowmem DMA pool. If
      the system has enough RAM and a large kernel image then almost all of
      the 16 MB lowmem DMA pool is allocated to the image and to pagetables -
      leaving no space for __GFP_DMA allocations.
      
      this results in drivers failing and the bootup hanging:
      
       swapper invoked oom-killer: gfp_mask=0x80d1, order=0, oomkilladj=0
        [<4015059f>] out_of_memory+0x17f/0x1c0
        [<40151f3c>] __alloc_pages+0x37c/0x3a0
        [<40168cd7>] slob_new_page+0x37/0x50
        [<40168dff>] slob_alloc+0x10f/0x190
        [<40169010>] __kmalloc_node+0x80/0x90
        [<405a17e3>] scsi_host_alloc+0x33/0x2c0
        [<405a1a82>] scsi_register+0x12/0x60
        [<40d5889e>] aha1542_detect+0x9e/0x940
        [<405c5ba5>] ultrastor_detect+0x265/0x5f0
        [<401352f5>] getnstimeofday+0x35/0xf0
        [<40d58751>] init_this_scsi_driver+0x41/0xf0
        [<40d0b856>] kernel_init+0x136/0x310
        [<40d58710>] init_this_scsi_driver+0x0/0xf0
        [<40d0b720>] kernel_init+0x0/0x310
        [<40105547>] kernel_thread_helper+0x7/0x10
        =======================
      
      the fix is to first allocate from above the DMA pool, and if that fails
      (for example due to it being a machine with less than 16 MB of RAM),
      allocate from the DMA pool as a fallback.
      
      With this fix applied i was able to boot a PAGEALLOC=y kernel that would
      hang before.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      509a80c4
  7. 17 10月, 2007 2 次提交
    • J
      remove dead code in pgtable_cache_init · 4f817847
      Jeremy Fitzhardinge 提交于
      The conversion from using a slab cache to quicklist left some residual
      dead code.
      
      I note that in the conversion it now always allocates a whole page for
      the pgd, rather than the 32 bytes needed for a PAE pgd.  Was this
      intended?
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      4f817847
    • K
      fix memory hot remove not configured case. · 48e94196
      KAMEZAWA Hiroyuki 提交于
      Now, arch dependent code around CONFIG_MEMORY_HOTREMOVE is a mess.
      This patch cleans up them. This is against 2.6.23-rc6-mm1.
      
       - fix compile failure on ia64/ CONFIG_MEMORY_HOTPLUG && !CONFIG_MEMORY_HOTREMOVE case.
       - For !CONFIG_MEMORY_HOTREMOVE, add generic no-op remove_memory(),
         which returns -EINVAL.
       - removed remove_pages() only used in powerpc.
       - removed no-op remove_memory() in i386, sh, sparc64, x86_64.
      
       - only powerpc returns -ENOSYS at memory hot remove(no-op). changes it
         to return -EINVAL.
      
      Note:
      Currently, only ia64 supports CONFIG_MEMORY_HOTREMOVE. I welcome other
      archs if there are requirements and testers.
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      48e94196
  8. 11 10月, 2007 2 次提交
  9. 30 7月, 2007 1 次提交
  10. 27 7月, 2007 1 次提交
  11. 25 7月, 2007 1 次提交
  12. 23 7月, 2007 1 次提交
    • A
      x86: Fix alternatives and kprobes to remap write-protected kernel text · 19d36ccd
      Andi Kleen 提交于
      Reenable kprobes and alternative patching when the kernel text is write
      protected by DEBUG_RODATA
      
      Add a general utility function to change write protected text.  The new
      function remaps the code using vmap to write it and takes care of CPU
      synchronization.  It also does CLFLUSH to make icache recovery faster.
      
      There are some limitations on when the function can be used, see the
      comment.
      
      This is a newer version that also changes the paravirt_ops code.
      text_poke also supports multi byte patching now.
      
      Contains bug fixes from Zach Amsden and suggestions from Mathieu
      Desnoyers.
      
      Cc: Jan Beulich <jbeulich@novell.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>
      Cc: Zach Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      19d36ccd
  13. 22 7月, 2007 1 次提交
  14. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  15. 18 7月, 2007 2 次提交
  16. 22 6月, 2007 1 次提交