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

TOMOYO Linux Cross Reference
Linux/arch/sparc/include/asm/mman.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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/sparc/include/asm/mman.h (Version linux-6.11-rc3) and /arch/i386/include/asm-i386/mman.h (Version linux-4.16.18)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #ifndef __SPARC_MMAN_H__                          
  3 #define __SPARC_MMAN_H__                          
  4                                                   
  5 #include <uapi/asm/mman.h>                        
  6                                                   
  7 #ifndef __ASSEMBLY__                              
  8 #define arch_mmap_check(addr,len,flags) sparc_    
  9 int sparc_mmap_check(unsigned long addr, unsig    
 10                                                   
 11 #ifdef CONFIG_SPARC64                             
 12 #include <asm/adi_64.h>                           
 13                                                   
 14 static inline void ipi_set_tstate_mcde(void *a    
 15 {                                                 
 16         struct mm_struct *mm = arg;               
 17                                                   
 18         /* Set TSTATE_MCDE for the task using     
 19          * enabled on if the task is running.     
 20          * automatically at the next context s    
 21          */                                       
 22         if (current->mm == mm) {                  
 23                 struct pt_regs *regs;             
 24                                                   
 25                 regs = task_pt_regs(current);     
 26                 regs->tstate |= TSTATE_MCDE;      
 27         }                                         
 28 }                                                 
 29                                                   
 30 #define arch_calc_vm_prot_bits(prot, pkey) spa    
 31 static inline unsigned long sparc_calc_vm_prot    
 32 {                                                 
 33         if (adi_capable() && (prot & PROT_ADI)    
 34                 struct pt_regs *regs;             
 35                                                   
 36                 if (!current->mm->context.adi)    
 37                         regs = task_pt_regs(cu    
 38                         regs->tstate |= TSTATE    
 39                         current->mm->context.a    
 40                         on_each_cpu_mask(mm_cp    
 41                                          ipi_s    
 42                 }                                 
 43                 return VM_SPARC_ADI;              
 44         } else {                                  
 45                 return 0;                         
 46         }                                         
 47 }                                                 
 48                                                   
 49 #define arch_validate_prot(prot, addr) sparc_v    
 50 static inline int sparc_validate_prot(unsigned    
 51 {                                                 
 52         if (prot & ~(PROT_READ | PROT_WRITE |     
 53                 return 0;                         
 54         return 1;                                 
 55 }                                                 
 56                                                   
 57 #define arch_validate_flags(vm_flags) arch_val    
 58 /* arch_validate_flags() - Ensure combination     
 59  *      VMA.                                      
 60  */                                               
 61 static inline bool arch_validate_flags(unsigne    
 62 {                                                 
 63         /* If ADI is being enabled on this VMA    
 64          * capability on the platform and ensu    
 65          * for ADI                                
 66          */                                       
 67         if (vm_flags & VM_SPARC_ADI) {            
 68                 if (!adi_capable())               
 69                         return false;             
 70                                                   
 71                 /* ADI can not be enabled on P    
 72                 if (vm_flags & (VM_PFNMAP | VM    
 73                         return false;             
 74                                                   
 75                 /* Mergeable pages can become     
 76                  * if ADI is enabled on them e    
 77                  * have identical data on them    
 78                  * because ADI enabled pages w    
 79                  * data may still not have ide    
 80                  * tags on them. Disallow ADI     
 81                  * pages.                         
 82                  */                               
 83                 if (vm_flags & VM_MERGEABLE)      
 84                         return false;             
 85         }                                         
 86         return true;                              
 87 }                                                 
 88 #endif /* CONFIG_SPARC64 */                       
 89                                                   
 90 #endif /* __ASSEMBLY__ */                         
 91 #endif /* __SPARC_MMAN_H__ */                     
 92                                                   

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