| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2009-08-15 09:57:57 +09:00
										 |  |  |  * arch/sh/mm/nommu.c | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2009-08-15 09:57:57 +09:00
										 |  |  |  * Various helper routines and stubs for MMUless SH. | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2009-08-15 09:57:57 +09:00
										 |  |  |  * Copyright (C) 2002 - 2009 Paul Mundt | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Released under the terms of the GNU GPL v2.0. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #include <linux/kernel.h>
 | 
					
						
							| 
									
										
										
										
											2009-08-15 09:57:57 +09:00
										 |  |  | #include <linux/init.h>
 | 
					
						
							|  |  |  | #include <linux/string.h>
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | #include <linux/mm.h>
 | 
					
						
							| 
									
										
										
										
											2007-12-17 10:52:11 +09:00
										 |  |  | #include <asm/pgtable.h>
 | 
					
						
							| 
									
										
										
										
											2008-09-04 18:53:58 +09:00
										 |  |  | #include <asm/tlbflush.h>
 | 
					
						
							| 
									
										
										
										
											2009-08-15 09:57:57 +09:00
										 |  |  | #include <asm/page.h>
 | 
					
						
							|  |  |  | #include <asm/uaccess.h>
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * Nothing too terribly exciting here .. | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2009-08-15 09:57:57 +09:00
										 |  |  | void copy_page(void *to, void *from) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	memcpy(to, from, PAGE_SIZE); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	memcpy(to, from, n); | 
					
						
							|  |  |  | 	return 0; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | __kernel_size_t __clear_user(void *to, __kernel_size_t n) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	memset(to, 0, n); | 
					
						
							|  |  |  | 	return 0; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-25 19:28:54 +09:00
										 |  |  | void local_flush_tlb_all(void) | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-25 19:28:54 +09:00
										 |  |  | void local_flush_tlb_mm(struct mm_struct *mm) | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-25 19:28:54 +09:00
										 |  |  | void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 			    unsigned long end) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-25 19:28:54 +09:00
										 |  |  | void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-25 19:28:54 +09:00
										 |  |  | void local_flush_tlb_one(unsigned long asid, unsigned long page) | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-12-25 19:28:54 +09:00
										 |  |  | void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-16 14:53:01 +09:00
										 |  |  | void __flush_tlb_global(void) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-29 00:12:17 +09:00
										 |  |  | void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-08-15 09:19:19 +09:00
										 |  |  | void __init kmap_coherent_init(void) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void *kmap_coherent(struct page *page, unsigned long addr) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | 	return NULL; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-03 17:21:10 +09:00
										 |  |  | void kunmap_coherent(void *kvaddr) | 
					
						
							| 
									
										
										
										
											2009-08-15 09:19:19 +09:00
										 |  |  | { | 
					
						
							|  |  |  | 	BUG(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-12-17 10:52:11 +09:00
										 |  |  | void __init page_table_range_init(unsigned long start, unsigned long end, | 
					
						
							|  |  |  | 				  pgd_t *pgd_base) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2007-12-18 09:43:35 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2010-01-06 14:45:14 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | void pgtable_cache_init(void) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } |