* [PATCH 2.6.15-rc3] Fix missing pfn variables caused by vm changes
@ 2005-11-29 19:45 Ben Collins
2005-11-30 13:58 ` Russell King
0 siblings, 1 reply; 2+ messages in thread
From: Ben Collins @ 2005-11-29 19:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Linus Torvalds
I image this showed up because of "unused var..." when the changes
occured, because flush_cache_page() is a noop in most places. This showed
up for me on parisc however, where flush_cache_page() is a real function.
diff --git a/mm/memory.c b/mm/memory.c
index 6c1eac9..74839b3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1345,7 +1345,7 @@ static int do_wp_page(struct mm_struct *
int reuse = can_share_swap_page(old_page);
unlock_page(old_page);
if (reuse) {
- flush_cache_page(vma, address, pfn);
+ flush_cache_page(vma, address, pte_pfn(orig_pte));
entry = pte_mkyoung(orig_pte);
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
ptep_set_access_flags(vma, address, page_table, entry, 1);
@@ -1389,7 +1389,7 @@ gotten:
}
} else
inc_mm_counter(mm, anon_rss);
- flush_cache_page(vma, address, pfn);
+ flush_cache_page(vma, address, pte_pfn(orig_pte));
entry = mk_pte(new_page, vma->vm_page_prot);
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
ptep_establish(vma, address, page_table, entry);
diff --git a/mm/rmap.c b/mm/rmap.c
index 491ac35..f853c6d 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -641,7 +641,7 @@ static void try_to_unmap_cluster(unsigne
continue;
/* Nuke the page table entry. */
- flush_cache_page(vma, address, pfn);
+ flush_cache_page(vma, address, pte_pfn(*pte));
pteval = ptep_clear_flush(vma, address, pte);
/* If nonlinear, store the file page offset in the pte. */
--
Ubuntu - http://www.ubuntu.com/
Debian - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
SwissDisk - http://www.swissdisk.com/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.15-rc3] Fix missing pfn variables caused by vm changes
2005-11-29 19:45 [PATCH 2.6.15-rc3] Fix missing pfn variables caused by vm changes Ben Collins
@ 2005-11-30 13:58 ` Russell King
0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2005-11-30 13:58 UTC (permalink / raw)
To: Ben Collins; +Cc: linux-kernel, Linus Torvalds
On Tue, Nov 29, 2005 at 11:45:26AM -0800, Ben Collins wrote:
> I image this showed up because of "unused var..." when the changes
> occured, because flush_cache_page() is a noop in most places. This showed
> up for me on parisc however, where flush_cache_page() is a real function.
This also fixes ARM, thanks.
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
> diff --git a/mm/memory.c b/mm/memory.c
> index 6c1eac9..74839b3 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -1345,7 +1345,7 @@ static int do_wp_page(struct mm_struct *
> int reuse = can_share_swap_page(old_page);
> unlock_page(old_page);
> if (reuse) {
> - flush_cache_page(vma, address, pfn);
> + flush_cache_page(vma, address, pte_pfn(orig_pte));
> entry = pte_mkyoung(orig_pte);
> entry = maybe_mkwrite(pte_mkdirty(entry), vma);
> ptep_set_access_flags(vma, address, page_table, entry, 1);
> @@ -1389,7 +1389,7 @@ gotten:
> }
> } else
> inc_mm_counter(mm, anon_rss);
> - flush_cache_page(vma, address, pfn);
> + flush_cache_page(vma, address, pte_pfn(orig_pte));
> entry = mk_pte(new_page, vma->vm_page_prot);
> entry = maybe_mkwrite(pte_mkdirty(entry), vma);
> ptep_establish(vma, address, page_table, entry);
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 491ac35..f853c6d 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -641,7 +641,7 @@ static void try_to_unmap_cluster(unsigne
> continue;
>
> /* Nuke the page table entry. */
> - flush_cache_page(vma, address, pfn);
> + flush_cache_page(vma, address, pte_pfn(*pte));
> pteval = ptep_clear_flush(vma, address, pte);
>
> /* If nonlinear, store the file page offset in the pte. */
>
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-30 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-29 19:45 [PATCH 2.6.15-rc3] Fix missing pfn variables caused by vm changes Ben Collins
2005-11-30 13:58 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox