summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorZhang Yanmin <yanmin.zhang@intel.com>2007-10-19 01:52:21 +0200
committerAdrian Bunk <bunk@kernel.org>2007-10-19 01:52:21 +0200
commitf7ce644b409f1b28648ac457dd9545f93bff37f7 (patch)
tree43ba4563ca8b4fc26129e7c11c9ad776ddc5d68d /arch
parentd289a630aa101eb5d168f054c96298c87673408e (diff)
[IA64] lazy_mmu_prot_update needs to be aware of huge pages
Function lazy_mmu_prot_update is also used on huge pages when it is called by set_huge_ptep_writable, but it isn't aware of huge pages. Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com> Acked-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/mm/init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index b38b6d213c15..4eb6e7e61fbd 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -109,6 +109,7 @@ lazy_mmu_prot_update (pte_t pte)
{
unsigned long addr;
struct page *page;
+ unsigned long order;
if (!pte_exec(pte))
return; /* not an executable page... */
@@ -119,7 +120,12 @@ lazy_mmu_prot_update (pte_t pte)
if (test_bit(PG_arch_1, &page->flags))
return; /* i-cache is already coherent with d-cache */
- flush_icache_range(addr, addr + PAGE_SIZE);
+ if (PageCompound(page)) {
+ order = (unsigned long) (page[1].lru.prev);
+ flush_icache_range(addr, addr + (1UL << order << PAGE_SHIFT));
+ }
+ else
+ flush_icache_range(addr, addr + PAGE_SIZE);
set_bit(PG_arch_1, &page->flags); /* mark page as clean */
}