summaryrefslogtreecommitdiffstats
path: root/arch/ia64/mm
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-09 13:05:41 -0700
committerTony Luck <tony.luck@intel.com>2008-04-09 13:05:41 -0700
commit273988fa4dffd1b1e6deb3de18b979a44e9d8732 (patch)
treef28645f5d5a5432bf0cd3f91318ce4709830f196 /arch/ia64/mm
parent5cf1f7cef1c67b5c81736f00e81a2890e07041b9 (diff)
downloadblackbird-op-linux-273988fa4dffd1b1e6deb3de18b979a44e9d8732.tar.gz
blackbird-op-linux-273988fa4dffd1b1e6deb3de18b979a44e9d8732.zip
[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>
Diffstat (limited to 'arch/ia64/mm')
-rw-r--r--arch/ia64/mm/init.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index a4ca657c72c6..da05893294b5 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -58,7 +58,6 @@ __ia64_sync_icache_dcache (pte_t pte)
{
unsigned long addr;
struct page *page;
- unsigned long order;
page = pte_page(pte);
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))
return; /* i-cache is already coherent with d-cache */
- if (PageCompound(page)) {
- order = compound_order(page);
- flush_icache_range(addr, addr + (1UL << order << PAGE_SHIFT));
- }
- else
- flush_icache_range(addr, addr + PAGE_SIZE);
+ flush_icache_range(addr, addr + (PAGE_SIZE << compound_order(page)));
set_bit(PG_arch_1, &page->flags); /* mark page as clean */
}
OpenPOWER on IntegriCloud