[PATCH RFC 1/7] x86: kill mk_pte_huge

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Wednesday, November 7, 2007 - 6:50 pm

It only has a single use, which can be trivially replaced.

Signed-off-by: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>

---
 arch/x86/mm/init_64.c        |    3 +--
 include/asm-x86/pgtable_64.h |    9 ---------
 2 files changed, 1 insertion(+), 11 deletions(-)

===================================================================
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -768,8 +768,7 @@ int __meminit vmemmap_populate(struct pa
 			if (!p)
 				return -ENOMEM;
 
-			entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
-			mk_pte_huge(entry);
+			entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL_LARGE);
 			set_pmd(pmd, __pmd(pte_val(entry)));
 
 			printk(KERN_DEBUG " [%lx-%lx] PMD ->%p on node %d\n",
===================================================================
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -378,15 +378,6 @@ static inline pte_t pte_clrhuge(pte_t pt
 /* page, protection -> pte */
 #define mk_pte(page, pgprot)	pfn_pte(page_to_pfn(page), (pgprot))
 
-static inline pte_t __mk_pte_huge(pte_t entry)
-{
-	unsigned long pte;
-	pte = pte_val(entry);
-	pte |= _PAGE_PRESENT | _PAGE_PSE;
-	return  __pte(pte);
-}
-#define mk_pte_huge(entry) ((entry) = __mk_pte_huge(entry))
-
 #include <linux/mm_types.h>
 static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
 					    unsigned long addr, pte_t *ptep)

-- 

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC 1/7] x86: kill mk_pte_huge, Jeremy Fitzhardinge, (Wed Nov 7, 6:50 pm)