diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/arch/s390/mm/page-states.c | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/arch/s390/mm/page-states.c')
-rw-r--r-- | ANDROID_3.4.5/arch/s390/mm/page-states.c | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/ANDROID_3.4.5/arch/s390/mm/page-states.c b/ANDROID_3.4.5/arch/s390/mm/page-states.c deleted file mode 100644 index a90d45e9..00000000 --- a/ANDROID_3.4.5/arch/s390/mm/page-states.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright IBM Corp. 2008 - * - * Guest page hinting for unused pages. - * - * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com> - */ - -#include <linux/kernel.h> -#include <linux/errno.h> -#include <linux/types.h> -#include <linux/mm.h> -#include <linux/gfp.h> -#include <linux/init.h> - -#define ESSA_SET_STABLE 1 -#define ESSA_SET_UNUSED 2 - -static int cmma_flag = 1; - -static int __init cmma(char *str) -{ - char *parm; - - parm = strstrip(str); - if (strcmp(parm, "yes") == 0 || strcmp(parm, "on") == 0) { - cmma_flag = 1; - return 1; - } - cmma_flag = 0; - if (strcmp(parm, "no") == 0 || strcmp(parm, "off") == 0) - return 1; - return 0; -} -__setup("cmma=", cmma); - -void __init cmma_init(void) -{ - register unsigned long tmp asm("0") = 0; - register int rc asm("1") = -EOPNOTSUPP; - - if (!cmma_flag) - return; - asm volatile( - " .insn rrf,0xb9ab0000,%1,%1,0,0\n" - "0: la %0,0\n" - "1:\n" - EX_TABLE(0b,1b) - : "+&d" (rc), "+&d" (tmp)); - if (rc) - cmma_flag = 0; -} - -static inline void set_page_unstable(struct page *page, int order) -{ - int i, rc; - - for (i = 0; i < (1 << order); i++) - asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" - : "=&d" (rc) - : "a" (page_to_phys(page + i)), - "i" (ESSA_SET_UNUSED)); -} - -void arch_free_page(struct page *page, int order) -{ - if (!cmma_flag) - return; - set_page_unstable(page, order); -} - -static inline void set_page_stable(struct page *page, int order) -{ - int i, rc; - - for (i = 0; i < (1 << order); i++) - asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" - : "=&d" (rc) - : "a" (page_to_phys(page + i)), - "i" (ESSA_SET_STABLE)); -} - -void arch_alloc_page(struct page *page, int order) -{ - if (!cmma_flag) - return; - set_page_stable(page, order); -} - -void arch_set_page_states(int make_stable) -{ - unsigned long flags, order, t; - struct list_head *l; - struct page *page; - struct zone *zone; - - if (!cmma_flag) - return; - if (make_stable) - drain_local_pages(NULL); - for_each_populated_zone(zone) { - spin_lock_irqsave(&zone->lock, flags); - for_each_migratetype_order(order, t) { - list_for_each(l, &zone->free_area[order].free_list[t]) { - page = list_entry(l, struct page, lru); - if (make_stable) - set_page_stable(page, order); - else - set_page_unstable(page, order); - } - } - spin_unlock_irqrestore(&zone->lock, flags); - } -} |