[IA64] Untangle sync_icache_dcache() page size determination
Untangle the chaos of page size determination in this function by simply using PAGE_SIZE << compound_order(). Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
parent
5cf1f7cef1
commit
273988fa4d
1 changed files with 1 additions and 7 deletions
|
@ -58,7 +58,6 @@ __ia64_sync_icache_dcache (pte_t pte)
|
||||||
{
|
{
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
unsigned long order;
|
|
||||||
|
|
||||||
page = pte_page(pte);
|
page = pte_page(pte);
|
||||||
addr = (unsigned long) page_address(page);
|
addr = (unsigned long) page_address(page);
|
||||||
|
@ -66,12 +65,7 @@ __ia64_sync_icache_dcache (pte_t pte)
|
||||||
if (test_bit(PG_arch_1, &page->flags))
|
if (test_bit(PG_arch_1, &page->flags))
|
||||||
return; /* i-cache is already coherent with d-cache */
|
return; /* i-cache is already coherent with d-cache */
|
||||||
|
|
||||||
if (PageCompound(page)) {
|
flush_icache_range(addr, addr + (PAGE_SIZE << compound_order(page)));
|
||||||
order = compound_order(page);
|
|
||||||
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 */
|
set_bit(PG_arch_1, &page->flags); /* mark page as clean */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue