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

TOMOYO Linux Cross Reference
Linux/arch/xtensa/kernel/syscall.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/xtensa/kernel/syscall.c (Version linux-6.12-rc7) and /arch/ppc/kernel/syscall.c (Version linux-6.8.12)


  1 /*                                                  1 
  2  * arch/xtensa/kernel/syscall.c                   
  3  *                                                
  4  * This file is subject to the terms and condi    
  5  * License.  See the file "COPYING" in the mai    
  6  * for more details.                              
  7  *                                                
  8  * Copyright (C) 2001 - 2005 Tensilica Inc.       
  9  * Copyright (C) 2000 Silicon Graphics, Inc.      
 10  * Copyright (C) 1995 - 2000 by Ralf Baechle      
 11  *                                                
 12  * Joe Taylor <joe@tensilica.com, joetylr@yaho    
 13  * Marc Gauthier <marc@tensilica.com, marc@alu    
 14  * Chris Zankel <chris@zankel.net>                
 15  * Kevin Chea                                     
 16  *                                                
 17  */                                               
 18 #include <linux/uaccess.h>                        
 19 #include <asm/syscall.h>                          
 20 #include <linux/linkage.h>                        
 21 #include <linux/stringify.h>                      
 22 #include <linux/errno.h>                          
 23 #include <linux/syscalls.h>                       
 24 #include <linux/file.h>                           
 25 #include <linux/fs.h>                             
 26 #include <linux/mman.h>                           
 27 #include <linux/sched/mm.h>                       
 28 #include <linux/shm.h>                            
 29                                                   
 30 syscall_t sys_call_table[] /* FIXME __cachelin    
 31 #define __SYSCALL(nr, entry)    (syscall_t)ent    
 32 #include <asm/syscall_table.h>                    
 33 };                                                
 34                                                   
 35 #define COLOUR_ALIGN(addr, pgoff) \               
 36         ((((addr) + SHMLBA - 1) & ~(SHMLBA - 1    
 37          (((pgoff) << PAGE_SHIFT) & (SHMLBA -     
 38                                                   
 39 asmlinkage long xtensa_shmat(int shmid, char _    
 40 {                                                 
 41         unsigned long ret;                        
 42         long err;                                 
 43                                                   
 44         err = do_shmat(shmid, shmaddr, shmflg,    
 45         if (err)                                  
 46                 return err;                       
 47         return (long)ret;                         
 48 }                                                 
 49                                                   
 50 asmlinkage long xtensa_fadvise64_64(int fd, in    
 51                 unsigned long long offset, uns    
 52 {                                                 
 53         return ksys_fadvise64_64(fd, offset, l    
 54 }                                                 
 55                                                   
 56 #ifdef CONFIG_MMU                                 
 57 unsigned long arch_get_unmapped_area(struct fi    
 58                 unsigned long len, unsigned lo    
 59                 vm_flags_t vm_flags)              
 60 {                                                 
 61         struct vm_area_struct *vmm;               
 62         struct vma_iterator vmi;                  
 63                                                   
 64         if (flags & MAP_FIXED) {                  
 65                 /* We do not accept a shared m    
 66                  * cache aliasing constraints.    
 67                  */                               
 68                 if ((flags & MAP_SHARED) &&       
 69                                 ((addr - (pgof    
 70                         return -EINVAL;           
 71                 return addr;                      
 72         }                                         
 73                                                   
 74         if (len > TASK_SIZE)                      
 75                 return -ENOMEM;                   
 76         if (!addr)                                
 77                 addr = TASK_UNMAPPED_BASE;        
 78                                                   
 79         if (flags & MAP_SHARED)                   
 80                 addr = COLOUR_ALIGN(addr, pgof    
 81         else                                      
 82                 addr = PAGE_ALIGN(addr);          
 83                                                   
 84         vma_iter_init(&vmi, current->mm, addr)    
 85         for_each_vma(vmi, vmm) {                  
 86                 /* At this point:  (addr < vmm    
 87                 if (addr + len <= vm_start_gap    
 88                         break;                    
 89                                                   
 90                 addr = vmm->vm_end;               
 91                 if (flags & MAP_SHARED)           
 92                         addr = COLOUR_ALIGN(ad    
 93         }                                         
 94                                                   
 95         if (TASK_SIZE - len < addr)               
 96                 return -ENOMEM;                   
 97                                                   
 98         return addr;                              
 99 }                                                 
100 #endif                                            
101                                                   

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