Skip to content

Commit

Permalink
[IA64] lazy_mmu_prot_update needs to be aware of huge pages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang, Yanmin authored and Tony Luck committed Mar 27, 2006
1 parent 64bc043 commit 5e48521
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/ia64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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... */
Expand All @@ -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 */
}

Expand Down

0 comments on commit 5e48521

Please sign in to comment.