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

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/vpe.h

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/mips/include/asm/vpe.h (Architecture mips) and /arch/sparc64/include/asm-sparc64/vpe.h (Architecture sparc64)


  1 /*                                                  1 
  2  * This file is subject to the terms and condi    
  3  * License.  See the file "COPYING" in the mai    
  4  * for more details.                              
  5  *                                                
  6  * Copyright (C) 2005 MIPS Technologies, Inc.     
  7  * Copyright (C) 2013 Imagination Technologies    
  8  */                                               
  9 #ifndef _ASM_VPE_H                                
 10 #define _ASM_VPE_H                                
 11                                                   
 12 #include <linux/init.h>                           
 13 #include <linux/list.h>                           
 14 #include <linux/smp.h>                            
 15 #include <linux/spinlock.h>                       
 16                                                   
 17 #define VPE_MODULE_NAME "vpe"                     
 18 #define VPE_MODULE_MINOR 1                        
 19                                                   
 20 /* grab the likely amount of memory we will ne    
 21 #ifdef CONFIG_MIPS_VPE_LOADER_TOM                 
 22 #define P_SIZE (2 * 1024 * 1024)                  
 23 #else                                             
 24 /* add an overhead to the max kmalloc size for    
 25 #define P_SIZE (256 * 1024)                       
 26 #endif                                            
 27                                                   
 28 #define MAX_VPES 16                               
 29                                                   
 30 static inline int aprp_cpu_index(void)            
 31 {                                                 
 32         extern int tclimit;                       
 33         return tclimit;                           
 34 }                                                 
 35                                                   
 36 enum vpe_state {                                  
 37         VPE_STATE_UNUSED = 0,                     
 38         VPE_STATE_INUSE,                          
 39         VPE_STATE_RUNNING                         
 40 };                                                
 41                                                   
 42 enum tc_state {                                   
 43         TC_STATE_UNUSED = 0,                      
 44         TC_STATE_INUSE,                           
 45         TC_STATE_RUNNING,                         
 46         TC_STATE_DYNAMIC                          
 47 };                                                
 48                                                   
 49 struct vpe {                                      
 50         enum vpe_state state;                     
 51                                                   
 52         /* (device) minor associated with this    
 53         int minor;                                
 54                                                   
 55         /* elfloader stuff */                     
 56         void *load_addr;                          
 57         unsigned long len;                        
 58         char *pbuffer;                            
 59         unsigned long plen;                       
 60                                                   
 61         unsigned long __start;                    
 62                                                   
 63         /* tc's associated with this vpe */       
 64         struct list_head tc;                      
 65                                                   
 66         /* The list of vpe's */                   
 67         struct list_head list;                    
 68                                                   
 69         /* shared symbol address */               
 70         void *shared_ptr;                         
 71                                                   
 72         /* the list of who wants to know when     
 73         struct list_head notify;                  
 74                                                   
 75         unsigned int ntcs;                        
 76 };                                                
 77                                                   
 78 struct tc {                                       
 79         enum tc_state state;                      
 80         int index;                                
 81                                                   
 82         struct vpe *pvpe;       /* parent VPE     
 83         struct list_head tc;    /* The list of    
 84         struct list_head list;  /* The global     
 85 };                                                
 86                                                   
 87 struct vpe_notifications {                        
 88         void (*start)(int vpe);                   
 89         void (*stop)(int vpe);                    
 90                                                   
 91         struct list_head list;                    
 92 };                                                
 93                                                   
 94 struct vpe_control {                              
 95         spinlock_t vpe_list_lock;                 
 96         struct list_head vpe_list;      /* Vir    
 97         spinlock_t tc_list_lock;                  
 98         struct list_head tc_list;       /* Thr    
 99 };                                                
100                                                   
101 extern struct vpe_control vpecontrol;             
102 extern const struct file_operations vpe_fops;     
103                                                   
104 int vpe_notify(int index, struct vpe_notificat    
105                                                   
106 void *vpe_get_shared(int index);                  
107                                                   
108 struct vpe *get_vpe(int minor);                   
109 struct tc *get_tc(int index);                     
110 struct vpe *alloc_vpe(int minor);                 
111 struct tc *alloc_tc(int index);                   
112 void release_vpe(struct vpe *v);                  
113                                                   
114 void *alloc_progmem(unsigned long len);           
115 void release_progmem(void *ptr);                  
116                                                   
117 int vpe_run(struct vpe *v);                       
118 void cleanup_tc(struct tc *tc);                   
119                                                   
120 int __init vpe_module_init(void);                 
121 void __exit vpe_module_exit(void);                
122 #endif /* _ASM_VPE_H */                           
123                                                   

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