~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/mm/sun3mmu.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/m68k/mm/sun3mmu.c (Version linux-6.12-rc7) and /arch/sparc64/mm/sun3mmu.c (Version linux-6.11.7)


  1 // SPDX-License-Identifier: GPL-2.0                 1 
  2 /*                                                
  3  * linux/arch/m68k/mm/sun3mmu.c                   
  4  *                                                
  5  * Implementations of mm routines specific to     
  6  *                                                
  7  * Moved here 8/20/1999 Sam Creasey               
  8  *                                                
  9  */                                               
 10                                                   
 11 #include <linux/signal.h>                         
 12 #include <linux/sched.h>                          
 13 #include <linux/mm.h>                             
 14 #include <linux/swap.h>                           
 15 #include <linux/kernel.h>                         
 16 #include <linux/string.h>                         
 17 #include <linux/types.h>                          
 18 #include <linux/init.h>                           
 19 #include <linux/memblock.h>                       
 20                                                   
 21 #include <asm/setup.h>                            
 22 #include <linux/uaccess.h>                        
 23 #include <asm/page.h>                             
 24 #include <asm/machdep.h>                          
 25 #include <asm/io.h>                               
 26                                                   
 27 #include "../sun3/sun3.h"                         
 28                                                   
 29 const char bad_pmd_string[] = "Bad pmd in pte_    
 30                                                   
 31 extern unsigned long num_pages;                   
 32                                                   
 33 /* For the sun3 we try to follow the i386 pagi    
 34 /* start_mem and end_mem have PAGE_OFFSET adde    
 35 /* now sets up tables using sun3 PTEs rather t    
 36 void __init paging_init(void)                     
 37 {                                                 
 38         pgd_t * pg_dir;                           
 39         pte_t * pg_table;                         
 40         int i;                                    
 41         unsigned long address;                    
 42         unsigned long next_pgtable;               
 43         unsigned long bootmem_end;                
 44         unsigned long max_zone_pfn[MAX_NR_ZONE    
 45         unsigned long size;                       
 46                                                   
 47         empty_zero_page = memblock_alloc(PAGE_    
 48         if (!empty_zero_page)                     
 49                 panic("%s: Failed to allocate     
 50                       __func__, PAGE_SIZE, PAG    
 51                                                   
 52         address = PAGE_OFFSET;                    
 53         pg_dir = swapper_pg_dir;                  
 54         memset (swapper_pg_dir, 0, sizeof (swa    
 55         memset (kernel_pg_dir,  0, sizeof (ker    
 56                                                   
 57         size = num_pages * sizeof(pte_t);         
 58         size = (size + PAGE_SIZE) & ~(PAGE_SIZ    
 59                                                   
 60         next_pgtable = (unsigned long)memblock    
 61         if (!next_pgtable)                        
 62                 panic("%s: Failed to allocate     
 63                       __func__, size, PAGE_SIZ    
 64         bootmem_end = (next_pgtable + size + P    
 65                                                   
 66         /* Map whole memory from PAGE_OFFSET (    
 67         pg_dir += PAGE_OFFSET >> PGDIR_SHIFT;     
 68                                                   
 69         while (address < (unsigned long)high_m    
 70                 pg_table = (pte_t *) __pa (nex    
 71                 next_pgtable += PTRS_PER_PTE *    
 72                 pgd_val(*pg_dir) = (unsigned l    
 73                 pg_dir++;                         
 74                                                   
 75                 /* now change pg_table to kern    
 76                 pg_table = (pte_t *) __va ((un    
 77                 for (i=0; i<PTRS_PER_PTE; ++i,    
 78                         pte_t pte = pfn_pte(vi    
 79                         if (address >= (unsign    
 80                                 pte_val (pte)     
 81                         set_pte (pg_table, pte    
 82                         address += PAGE_SIZE;     
 83                 }                                 
 84         }                                         
 85                                                   
 86         mmu_emu_init(bootmem_end);                
 87                                                   
 88         current->mm = NULL;                       
 89                                                   
 90         /* memory sizing is a hack stolen from    
 91         max_zone_pfn[ZONE_DMA] = ((unsigned lo    
 92                                                   
 93         /* I really wish I knew why the follow    
 94         free_area_init(max_zone_pfn);             
 95                                                   
 96                                                   
 97 }                                                 
 98                                                   
 99 static const pgprot_t protection_map[16] = {      
100         [VM_NONE]                                 
101         [VM_READ]                                 
102         [VM_WRITE]                                
103         [VM_WRITE | VM_READ]                      
104         [VM_EXEC]                                 
105         [VM_EXEC | VM_READ]                       
106         [VM_EXEC | VM_WRITE]                      
107         [VM_EXEC | VM_WRITE | VM_READ]            
108         [VM_SHARED]                               
109         [VM_SHARED | VM_READ]                     
110         [VM_SHARED | VM_WRITE]                    
111         [VM_SHARED | VM_WRITE | VM_READ]          
112         [VM_SHARED | VM_EXEC]                     
113         [VM_SHARED | VM_EXEC | VM_READ]           
114         [VM_SHARED | VM_EXEC | VM_WRITE]          
115         [VM_SHARED | VM_EXEC | VM_WRITE | VM_R    
116 };                                                
117 DECLARE_VM_GET_PAGE_PROT                          
118                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php