]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] Untangle sync_icache_dcache() page size determination
authorChristoph Lameter <clameter@sgi.com>
Wed, 9 Apr 2008 20:05:41 +0000 (13:05 -0700)
committerTony Luck <tony.luck@intel.com>
Wed, 9 Apr 2008 20:05:41 +0000 (13:05 -0700)
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>
arch/ia64/mm/init.c

index a4ca657c72c6905a10f9f59be54e7bb260d2922b..da05893294b5b0930acf202f1f616f8a3b7e5f07 100644 (file)
@@ -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 */
 }