aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2011-12-19 07:46:35 -0500
committerMichal Simek <monstr@monstr.eu>2012-03-23 04:28:10 -0400
commit83a92529c1789f86481190743a6bb09f31ec39a8 (patch)
tree04e451b84770b08eceb5e483fb2c79a4d7f3c0c2 /arch/microblaze/include
parent4e2e4124b7fe68b28e9f759b7ecc0ec16307fce6 (diff)
microblaze: mm: Fix lowmem max memory size limits
Use CONFIG_LOWMEM_SIZE if system has larger ram size. For system with larger ram size, enable HIGMEM support. Also setup limitation for memblock and use memblock allocation in lowmem region. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r--arch/microblaze/include/asm/page.h1
-rw-r--r--arch/microblaze/include/asm/pgtable.h3
-rw-r--r--arch/microblaze/include/asm/uaccess.h2
3 files changed, 2 insertions, 4 deletions
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
index a25e6b5e2ad4..665f29330ce1 100644
--- a/arch/microblaze/include/asm/page.h
+++ b/arch/microblaze/include/asm/page.h
@@ -135,7 +135,6 @@ extern unsigned long min_low_pfn;
135extern unsigned long max_pfn; 135extern unsigned long max_pfn;
136 136
137extern unsigned long memory_start; 137extern unsigned long memory_start;
138extern unsigned long memory_end;
139extern unsigned long memory_size; 138extern unsigned long memory_size;
140 139
141extern int page_is_ram(unsigned long pfn); 140extern int page_is_ram(unsigned long pfn);
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h
index b2af42311a12..d8f2c3c68d38 100644
--- a/arch/microblaze/include/asm/pgtable.h
+++ b/arch/microblaze/include/asm/pgtable.h
@@ -94,8 +94,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
94/* Start and end of the vmalloc area. */ 94/* Start and end of the vmalloc area. */
95/* Make sure to map the vmalloc area above the pinned kernel memory area 95/* Make sure to map the vmalloc area above the pinned kernel memory area
96 of 32Mb. */ 96 of 32Mb. */
97#define VMALLOC_START (CONFIG_KERNEL_START + \ 97#define VMALLOC_START (CONFIG_KERNEL_START + CONFIG_LOWMEM_SIZE)
98 max(32 * 1024 * 1024UL, memory_size))
99#define VMALLOC_END ioremap_bot 98#define VMALLOC_END ioremap_bot
100 99
101#endif /* __ASSEMBLY__ */ 100#endif /* __ASSEMBLY__ */
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 072b0077abf9..ef25f7538d4a 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -80,7 +80,7 @@ extern unsigned long search_exception_table(unsigned long);
80static inline int ___range_ok(unsigned long addr, unsigned long size) 80static inline int ___range_ok(unsigned long addr, unsigned long size)
81{ 81{
82 return ((addr < memory_start) || 82 return ((addr < memory_start) ||
83 ((addr + size) > memory_end)); 83 ((addr + size - 1) > (memory_start + memory_size - 1)));
84} 84}
85 85
86#define __range_ok(addr, size) \ 86#define __range_ok(addr, size) \