diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-02-04 10:48:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-04 10:48:10 -0500 |
commit | 7b610eec7a06ede64f71459e7f412dfd96f4cc5e (patch) | |
tree | 1fac616dd1a8bf7426b728e0c60212c5734386c9 /arch/x86/mm/pageattr.c | |
parent | 87f7f8fe328388a1430a4c27cbe684f3925fd8a5 (diff) |
x86: cpa, micro-optimization
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r-- | arch/x86/mm/pageattr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 4f033505127e..bb55a78dcd62 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -237,6 +237,7 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) | |||
237 | if (!SHARED_KERNEL_PMD) { | 237 | if (!SHARED_KERNEL_PMD) { |
238 | struct page *page; | 238 | struct page *page; |
239 | 239 | ||
240 | address = __pa(address); | ||
240 | list_for_each_entry(page, &pgd_list, lru) { | 241 | list_for_each_entry(page, &pgd_list, lru) { |
241 | pgd_t *pgd; | 242 | pgd_t *pgd; |
242 | pud_t *pud; | 243 | pud_t *pud; |
@@ -351,7 +352,7 @@ out_unlock: | |||
351 | 352 | ||
352 | static int split_large_page(pte_t *kpte, unsigned long address) | 353 | static int split_large_page(pte_t *kpte, unsigned long address) |
353 | { | 354 | { |
354 | unsigned long flags, addr, pfn, pfninc = 1; | 355 | unsigned long flags, pfn, pfninc = 1; |
355 | gfp_t gfp_flags = GFP_KERNEL; | 356 | gfp_t gfp_flags = GFP_KERNEL; |
356 | unsigned int i, level; | 357 | unsigned int i, level; |
357 | pte_t *pbase, *tmp; | 358 | pte_t *pbase, *tmp; |
@@ -374,8 +375,6 @@ static int split_large_page(pte_t *kpte, unsigned long address) | |||
374 | if (tmp != kpte) | 375 | if (tmp != kpte) |
375 | goto out_unlock; | 376 | goto out_unlock; |
376 | 377 | ||
377 | address = __pa(address); | ||
378 | addr = address & PMD_PAGE_MASK; | ||
379 | pbase = (pte_t *)page_address(base); | 378 | pbase = (pte_t *)page_address(base); |
380 | #ifdef CONFIG_X86_32 | 379 | #ifdef CONFIG_X86_32 |
381 | paravirt_alloc_pt(&init_mm, page_to_pfn(base)); | 380 | paravirt_alloc_pt(&init_mm, page_to_pfn(base)); |
@@ -386,7 +385,6 @@ static int split_large_page(pte_t *kpte, unsigned long address) | |||
386 | if (level == PG_LEVEL_1G) { | 385 | if (level == PG_LEVEL_1G) { |
387 | pfninc = PMD_PAGE_SIZE >> PAGE_SHIFT; | 386 | pfninc = PMD_PAGE_SIZE >> PAGE_SHIFT; |
388 | pgprot_val(ref_prot) |= _PAGE_PSE; | 387 | pgprot_val(ref_prot) |= _PAGE_PSE; |
389 | addr &= PUD_PAGE_MASK; | ||
390 | } | 388 | } |
391 | #endif | 389 | #endif |
392 | 390 | ||