Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Jan 2011 18:56:02 +0000 (10:56 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Jan 2011 18:56:02 +0000 (10:56 -0800)
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Fix included-by file reference comments
  x86, cpu: Only CPU features determine NX capabilities
  x86, cpu: Call verify_cpu during 32bit CPU startup
  x86, cpu: Clear XD_DISABLED flag on Intel to regain NX
  x86, cpu: Rename verify_cpu_64.S to verify_cpu.S

1  2 
arch/x86/kernel/head_32.S

  #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
  #endif
  
 +/* Number of possible pages in the lowmem region */
 +LOWMEM_PAGES = (((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT)
 +      
  /* Enough space to fit pagetables for the low memory linear map */
 -MAPPING_BEYOND_END = \
 -      PAGE_TABLE_SIZE(((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
 +MAPPING_BEYOND_END = PAGE_TABLE_SIZE(LOWMEM_PAGES) << PAGE_SHIFT
  
  /*
   * Worst-case size of the kernel mapping we need to make:
 - * the worst-case size of the kernel itself, plus the extra we need
 - * to map for the linear map.
 + * a relocatable kernel can live anywhere in lowmem, so we need to be able
 + * to map all of lowmem.
   */
 -KERNEL_PAGES = (KERNEL_IMAGE_SIZE + MAPPING_BEYOND_END)>>PAGE_SHIFT
 +KERNEL_PAGES = LOWMEM_PAGES
  
  INIT_MAP_SIZE = PAGE_TABLE_SIZE(KERNEL_PAGES) * PAGE_SIZE_asm
  RESERVE_BRK(pagetables, INIT_MAP_SIZE)
@@@ -316,6 -314,10 +316,10 @@@ ENTRY(startup_32_smp
        subl $0x80000001, %eax
        cmpl $(0x8000ffff-0x80000001), %eax
        ja 6f
+       /* Clear bogus XD_DISABLE bits */
+       call verify_cpu
        mov $0x80000001, %eax
        cpuid
        /* Execute Disable bit supported? */
@@@ -611,6 -613,8 +615,8 @@@ ignore_int
  #endif
        iret
  
+ #include "verify_cpu.S"
        __REFDATA
  .align 4
  ENTRY(initial_code)
  __PAGE_ALIGNED_BSS
        .align PAGE_SIZE_asm
  #ifdef CONFIG_X86_PAE
 -initial_pg_pmd:
 +ENTRY(initial_pg_pmd)
        .fill 1024*KPMDS,4,0
  #else
  ENTRY(initial_page_table)
        .fill 1024,4,0
  #endif
 -initial_pg_fixmap:
 +ENTRY(initial_pg_fixmap)
        .fill 1024,4,0
  ENTRY(empty_zero_page)
        .fill 4096,1,0