ARM: mm: Replace lowmem_limit with arm_lowmem_limit
Hiroshi Doyu [Fri, 13 Jul 2012 10:37:39 +0000 (13:37 +0300)]
Only for NV's enhancement part.

Change-Id: I065f377126a6cee372337567fb7241abe9d4563f
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

arch/arm/include/asm/page.h
arch/arm/mm/mmu.c
arch/arm/mm/pageattr.c

index 278c201..5838361 100644 (file)
@@ -167,8 +167,6 @@ typedef struct page *pgtable_t;
 extern int pfn_valid(unsigned long);
 #endif
 
-extern phys_addr_t lowmem_limit;
-
 #include <asm/memory.h>
 
 #endif /* !__ASSEMBLY__ */
index 7b07aac..b40aaac 100644 (file)
@@ -647,7 +647,7 @@ static void __init alloc_init_section(pud_t *pud, unsigned long addr,
                alloc_init_pte(pmd, addr, end, __phys_to_pfn(phys), type);
        }
 
-       if ((stash_phys >= PHYS_OFFSET) && (stash_phys < lowmem_limit)) {
+       if ((stash_phys >= PHYS_OFFSET) && (stash_phys < arm_lowmem_limit)) {
                update_page_count(PG_LEVEL_2M, pages_2m);
                update_page_count(PG_LEVEL_4K, pages_4k);
        }
index 49a217b..f6930e0 100644 (file)
@@ -23,6 +23,8 @@
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
 
+#include "mm.h"
+
 #ifdef CPA_DEBUG
 #define cpa_debug(x, ...)  printk(x, __VA_ARGS__)
 #else
@@ -546,7 +548,7 @@ static int split_large_page(pte_t *kpte, unsigned long address)
                set_pte_ext(&pbase[i], pfn_pte(pfn, ref_prot), ext_prot);
 
        if (address >= (unsigned long)__va(0) &&
-               address < (unsigned long)__va(lowmem_limit))
+               address < (unsigned long)__va(arm_lowmem_limit))
                split_page_count(level);
 
        /*
@@ -586,7 +588,7 @@ static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
         * on the initial value and the level returned by lookup_address().
         */
        if (within(vaddr, PAGE_OFFSET,
-                  PAGE_OFFSET + lowmem_limit)) {
+                  PAGE_OFFSET + arm_lowmem_limit)) {
                cpa->numpages = 1;
                cpa->pfn = __pa(vaddr) >> PAGE_SHIFT;
                return 0;
@@ -715,7 +717,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
        unsigned long vaddr;
        int ret;
 
-       if (cpa->pfn >= (lowmem_limit >> PAGE_SHIFT))
+       if (cpa->pfn >= (arm_lowmem_limit >> PAGE_SHIFT))
                return 0;
 
        /*
@@ -733,7 +735,7 @@ static int cpa_process_alias(struct cpa_data *cpa)
                vaddr = *cpa->vaddr;
 
        if (!(within(vaddr, PAGE_OFFSET,
-                   PAGE_OFFSET + lowmem_limit))) {
+                   PAGE_OFFSET + arm_lowmem_limit))) {
 
                alias_cpa = *cpa;
                alias_cpa.vaddr = &laddr;