]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: CPA: fix gbpages support in try_preserve_large_page
authorAndi Kleen <ak@suse.de>
Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)
[ mingo@elte.hu: while gbpages cannot be enabled on mainline currently,
  keep the code uptodate and this fix is easy enough. ]

Use correct page sizes and masks for GB pages in try_preserve_large_page()

This prevents a boot hang on a GB capable system with CONFIG_DIRECT_GBPAGES
enabled.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/mm/pageattr.c

index 440210a2277d3d6a710dcb713792e377f8306d89..bd61ed13f9cf5a1c13b2e7a052e5bc009001866d 100644 (file)
@@ -275,8 +275,8 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
                break;
 #ifdef CONFIG_X86_64
        case PG_LEVEL_1G:
-               psize = PMD_PAGE_SIZE;
-               pmask = PMD_PAGE_MASK;
+               psize = PUD_PAGE_SIZE;
+               pmask = PUD_PAGE_MASK;
                break;
 #endif
        default: