aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-02-10 00:51:29 -0500
committerPaul Mackerras <paulus@samba.org>2006-02-10 00:51:29 -0500
commitd6d93856cb90eeb07062ad938bd26f554bf1b9b9 (patch)
treeeeec5011a42f38d3dfe7b61788b7ac1cc890edeb /arch/mips/mm
parent8f75015f33c3005e0bbf83ffc0d5e0b4262cc03d (diff)
parentad71f123a9e9b809f6c829db1222ce0423a1153c (diff)
Merge ../powerpc-merge
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/c-r4k.c7
-rw-r--r--arch/mips/mm/cache.c5
-rw-r--r--arch/mips/mm/init.c16
3 files changed, 21 insertions, 7 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 422b55fab07a..e51c38cef88e 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -464,8 +464,8 @@ static void r4k_flush_data_cache_page(unsigned long addr)
464} 464}
465 465
466struct flush_icache_range_args { 466struct flush_icache_range_args {
467 unsigned long __user start; 467 unsigned long start;
468 unsigned long __user end; 468 unsigned long end;
469}; 469};
470 470
471static inline void local_r4k_flush_icache_range(void *args) 471static inline void local_r4k_flush_icache_range(void *args)
@@ -528,8 +528,7 @@ static inline void local_r4k_flush_icache_range(void *args)
528 } 528 }
529} 529}
530 530
531static void r4k_flush_icache_range(unsigned long __user start, 531static void r4k_flush_icache_range(unsigned long start, unsigned long end)
532 unsigned long __user end)
533{ 532{
534 struct flush_icache_range_args args; 533 struct flush_icache_range_args args;
535 534
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 314701a66b13..591c22b080e4 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -25,8 +25,7 @@ void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start,
25 unsigned long end); 25 unsigned long end);
26void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, 26void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
27 unsigned long pfn); 27 unsigned long pfn);
28void (*flush_icache_range)(unsigned long __user start, 28void (*flush_icache_range)(unsigned long start, unsigned long end);
29 unsigned long __user end);
30void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page); 29void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page);
31 30
32/* MIPS specific cache operations */ 31/* MIPS specific cache operations */
@@ -53,7 +52,7 @@ EXPORT_SYMBOL(_dma_cache_inv);
53 * We could optimize the case where the cache argument is not BCACHE but 52 * We could optimize the case where the cache argument is not BCACHE but
54 * that seems very atypical use ... 53 * that seems very atypical use ...
55 */ 54 */
56asmlinkage int sys_cacheflush(unsigned long __user addr, 55asmlinkage int sys_cacheflush(unsigned long addr,
57 unsigned long bytes, unsigned int cache) 56 unsigned long bytes, unsigned int cache)
58{ 57{
59 if (bytes == 0) 58 if (bytes == 0)
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 4ee91c9a556f..0ff9a348b843 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -24,6 +24,7 @@
24#include <linux/bootmem.h> 24#include <linux/bootmem.h>
25#include <linux/highmem.h> 25#include <linux/highmem.h>
26#include <linux/swap.h> 26#include <linux/swap.h>
27#include <linux/proc_fs.h>
27 28
28#include <asm/bootinfo.h> 29#include <asm/bootinfo.h>
29#include <asm/cachectl.h> 30#include <asm/cachectl.h>
@@ -200,6 +201,11 @@ static inline int page_is_ram(unsigned long pagenr)
200 return 0; 201 return 0;
201} 202}
202 203
204static struct kcore_list kcore_mem, kcore_vmalloc;
205#ifdef CONFIG_64BIT
206static struct kcore_list kcore_kseg0;
207#endif
208
203void __init mem_init(void) 209void __init mem_init(void)
204{ 210{
205 unsigned long codesize, reservedpages, datasize, initsize; 211 unsigned long codesize, reservedpages, datasize, initsize;
@@ -249,6 +255,16 @@ void __init mem_init(void)
249 datasize = (unsigned long) &_edata - (unsigned long) &_etext; 255 datasize = (unsigned long) &_edata - (unsigned long) &_etext;
250 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; 256 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
251 257
258#ifdef CONFIG_64BIT
259 if ((unsigned long) &_text > (unsigned long) CKSEG0)
260 /* The -4 is a hack so that user tools don't have to handle
261 the overflow. */
262 kclist_add(&kcore_kseg0, (void *) CKSEG0, 0x80000000 - 4);
263#endif
264 kclist_add(&kcore_mem, __va(0), max_low_pfn << PAGE_SHIFT);
265 kclist_add(&kcore_vmalloc, (void *)VMALLOC_START,
266 VMALLOC_END-VMALLOC_START);
267
252 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, " 268 printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
253 "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n", 269 "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n",
254 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), 270 (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),