Commit 3f52c652 authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Linus Torvalds

[PATCH] remove forget_pte() remnants

parent d5ba0bf6
...@@ -310,17 +310,6 @@ cont_copy_pmd_range: src_pmd++; ...@@ -310,17 +310,6 @@ cont_copy_pmd_range: src_pmd++;
return -ENOMEM; return -ENOMEM;
} }
/*
* Return indicates whether a page was freed so caller can adjust rss
*/
static inline void forget_pte(pte_t page)
{
if (!pte_none(page)) {
printk("forget_pte: old mapping existed!\n");
BUG();
}
}
static void zap_pte_range(mmu_gather_t *tlb, pmd_t * pmd, unsigned long address, unsigned long size) static void zap_pte_range(mmu_gather_t *tlb, pmd_t * pmd, unsigned long address, unsigned long size)
{ {
unsigned long offset; unsigned long offset;
...@@ -777,9 +766,8 @@ static inline void zeromap_pte_range(pte_t * pte, unsigned long address, ...@@ -777,9 +766,8 @@ static inline void zeromap_pte_range(pte_t * pte, unsigned long address,
end = PMD_SIZE; end = PMD_SIZE;
do { do {
pte_t zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE(address), prot)); pte_t zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE(address), prot));
pte_t oldpage = ptep_get_and_clear(pte); BUG_ON(!pte_none(*pte));
set_pte(pte, zero_pte); set_pte(pte, zero_pte);
forget_pte(oldpage);
address += PAGE_SIZE; address += PAGE_SIZE;
pte++; pte++;
} while (address && (address < end)); } while (address && (address < end));
...@@ -853,11 +841,9 @@ static inline void remap_pte_range(pte_t * pte, unsigned long address, unsigned ...@@ -853,11 +841,9 @@ static inline void remap_pte_range(pte_t * pte, unsigned long address, unsigned
end = PMD_SIZE; end = PMD_SIZE;
pfn = phys_addr >> PAGE_SHIFT; pfn = phys_addr >> PAGE_SHIFT;
do { do {
pte_t oldpage = ptep_get_and_clear(pte); BUG_ON(!pte_none(*pte));
if (!pfn_valid(pfn) || PageReserved(pfn_to_page(pfn))) if (!pfn_valid(pfn) || PageReserved(pfn_to_page(pfn)))
set_pte(pte, pfn_pte(pfn, prot)); set_pte(pte, pfn_pte(pfn, prot));
forget_pte(oldpage);
address += PAGE_SIZE; address += PAGE_SIZE;
pfn++; pfn++;
pte++; pte++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment