Skip to contentSkip to conversation

SPARC: Use shorter form of "get_zeroed_page".

PATCH New Robert P. J. Day 1 participant 1 message Feb 10, 2008 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SPARC: Use shorter form of "get_zeroed_page".

---

AFIACT, this should be equivalent, no? and shorter.

arch/sparc/mm/sun4c.c +1 -3
index c0442e8..2375fe9 100644
@@ -1941,9 +1941,7 @@ static pte_t *sun4c_pte_alloc_one_kernel(struct mm_struct *mm, unsigned long add
 	if ((pte = sun4c_pte_alloc_one_fast(mm, address)) != NULL)
 		return pte;
 
-	pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (pte)
-		memset(pte, 0, PAGE_SIZE);
+	pte = (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
 	return pte;
 }
 

====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA

Home page:                                         http://crashcourse.ca
Fedora Cookbook:    http://crashcourse.ca/wiki/index.php/Fedora_Cookbook

====================================