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

TOMOYO Linux Cross Reference
Linux/arch/arm/mm/copypage-v4wt.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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm/mm/copypage-v4wt.c (Version linux-6.12-rc7) and /arch/m68k/mm/copypage-v4wt.c (Version linux-4.15.18)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  *  linux/arch/arm/mm/copypage-v4wt.S             
  4  *                                                
  5  *  Copyright (C) 1995-1999 Russell King          
  6  *                                                
  7  *  This is for CPUs with a writethrough cache    
  8  *  the only supported cache operation.           
  9  */                                               
 10 #include <linux/init.h>                           
 11 #include <linux/highmem.h>                        
 12                                                   
 13 /*                                                
 14  * ARMv4 optimised copy_user_highpage             
 15  *                                                
 16  * Since we have writethrough caches, we don't    
 17  * dirty data in the cache.  However, we do ha    
 18  * subsequent reads are up to date.               
 19  */                                               
 20 static void v4wt_copy_user_page(void *kto, con    
 21 {                                                 
 22         int tmp;                                  
 23                                                   
 24         asm volatile ("\                          
 25         .syntax unified\n\                        
 26         ldmia   %1!, {r3, r4, ip, lr}             
 27 1:      stmia   %0!, {r3, r4, ip, lr}             
 28         ldmia   %1!, {r3, r4, ip, lr}             
 29         stmia   %0!, {r3, r4, ip, lr}             
 30         ldmia   %1!, {r3, r4, ip, lr}             
 31         stmia   %0!, {r3, r4, ip, lr}             
 32         ldmia   %1!, {r3, r4, ip, lr}             
 33         subs    %2, %2, #1                        
 34         stmia   %0!, {r3, r4, ip, lr}             
 35         ldmiane %1!, {r3, r4, ip, lr}             
 36         bne     1b                                
 37         mcr     p15, 0, %2, c7, c7, 0             
 38         : "+&r" (kto), "+&r" (kfrom), "=&r" (t    
 39         : "2" (PAGE_SIZE / 64)                    
 40         : "r3", "r4", "ip", "lr");                
 41 }                                                 
 42                                                   
 43 void v4wt_copy_user_highpage(struct page *to,     
 44         unsigned long vaddr, struct vm_area_st    
 45 {                                                 
 46         void *kto, *kfrom;                        
 47                                                   
 48         kto = kmap_atomic(to);                    
 49         kfrom = kmap_atomic(from);                
 50         v4wt_copy_user_page(kto, kfrom);          
 51         kunmap_atomic(kfrom);                     
 52         kunmap_atomic(kto);                       
 53 }                                                 
 54                                                   
 55 /*                                                
 56  * ARMv4 optimised clear_user_page                
 57  *                                                
 58  * Same story as above.                           
 59  */                                               
 60 void v4wt_clear_user_highpage(struct page *pag    
 61 {                                                 
 62         void *ptr, *kaddr = kmap_atomic(page);    
 63         asm volatile("\                           
 64         mov     r1, %2                            
 65         mov     r2, #0                            
 66         mov     r3, #0                            
 67         mov     ip, #0                            
 68         mov     lr, #0                            
 69 1:      stmia   %0!, {r2, r3, ip, lr}             
 70         stmia   %0!, {r2, r3, ip, lr}             
 71         stmia   %0!, {r2, r3, ip, lr}             
 72         stmia   %0!, {r2, r3, ip, lr}             
 73         subs    r1, r1, #1                        
 74         bne     1b                                
 75         mcr     p15, 0, r2, c7, c7, 0             
 76         : "=r" (ptr)                              
 77         : "" (kaddr), "I" (PAGE_SIZE / 64)        
 78         : "r1", "r2", "r3", "ip", "lr");          
 79         kunmap_atomic(kaddr);                     
 80 }                                                 
 81                                                   
 82 struct cpu_user_fns v4wt_user_fns __initdata =    
 83         .cpu_clear_user_highpage = v4wt_clear_    
 84         .cpu_copy_user_highpage = v4wt_copy_us    
 85 };                                                
 86                                                   

~ [ 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