summaryrefslogtreecommitdiffstats
path: root/arch/tile/mm/homecache.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 13:56:44 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 13:56:44 +0100
commit4045407fd7740642b18bc802e8bab064e79a61e5 (patch)
tree9412a38886bfad562bc5897c6e4c23bb88703204 /arch/tile/mm/homecache.c
parentMerge branch 'restart-cleanup' into restart (diff)
parentMerge branch 'for-russell' of git://hansjkoch.de/git/linux-tcc into HEAD (diff)
downloadlinux-4045407fd7740642b18bc802e8bab064e79a61e5.tar.xz
linux-4045407fd7740642b18bc802e8bab064e79a61e5.zip
Merge branch 'restart-cleanup' into restart
Conflicts: arch/arm/kernel/setup.c
Diffstat (limited to 'arch/tile/mm/homecache.c')
-rw-r--r--arch/tile/mm/homecache.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/tile/mm/homecache.c b/arch/tile/mm/homecache.c
index cbe6f4f9eca3..1cc6ae477c98 100644
--- a/arch/tile/mm/homecache.c
+++ b/arch/tile/mm/homecache.c
@@ -449,9 +449,12 @@ void homecache_free_pages(unsigned long addr, unsigned int order)
VM_BUG_ON(!virt_addr_valid((void *)addr));
page = virt_to_page((void *)addr);
if (put_page_testzero(page)) {
- int pages = (1 << order);
homecache_change_page_home(page, order, initial_page_home());
- while (pages--)
- __free_page(page++);
+ if (order == 0) {
+ free_hot_cold_page(page, 0);
+ } else {
+ init_page_count(page);
+ __free_pages(page, order);
+ }
}
}