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

TOMOYO Linux Cross Reference
Linux/include/misc/cxllib.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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 /include/misc/cxllib.h (Version linux-6.11.5) and /include/misc/cxllib.h (Version linux-2.6.32.71)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 
  2 /*                                                
  3  * Copyright 2017 IBM Corp.                       
  4  */                                               
  5                                                   
  6 #ifndef _MISC_CXLLIB_H                            
  7 #define _MISC_CXLLIB_H                            
  8                                                   
  9 #include <linux/pci.h>                            
 10 #include <asm/reg.h>                              
 11                                                   
 12 /*                                                
 13  * cxl driver exports a in-kernel 'library' AP    
 14  * other drivers to help interacting with an I    
 15  */                                               
 16                                                   
 17 /*                                                
 18  * tells whether capi is supported on the PCIe    
 19  * device is seated                               
 20  *                                                
 21  * Input:                                         
 22  *      dev: device whose slot needs to be che    
 23  *      flags: 0 for the time being               
 24  */                                               
 25 bool cxllib_slot_is_supported(struct pci_dev *    
 26                                                   
 27                                                   
 28 /*                                                
 29  * Returns the configuration parameters to be     
 30  *                                                
 31  * Input:                                         
 32  *      dev: device, used to find PHB             
 33  * Output:                                        
 34  *      struct cxllib_xsl_config:                 
 35  *              version                           
 36  *              capi BAR address, i.e. 0x20000    
 37  *              capi BAR size                     
 38  *              data send control (XSL_DSNCTL)    
 39  *              dummy read address (XSL_DRA)      
 40  */                                               
 41 #define CXL_XSL_CONFIG_VERSION1         1         
 42 struct cxllib_xsl_config {                        
 43         u32     version;     /* format version    
 44         u32     log_bar_size;/* log size of th    
 45         u64     bar_addr;    /* address of the    
 46         u64     dsnctl;      /* matches defini    
 47         u64     dra;         /* real address t    
 48 };                                                
 49                                                   
 50 int cxllib_get_xsl_config(struct pci_dev *dev,    
 51                                                   
 52                                                   
 53 /*                                                
 54  * Activate capi for the pci host bridge assoc    
 55  * Can be extended to deactivate once we know     
 56  * Device must be ready to accept messages fro    
 57  * respond accordingly (TLB invalidates, ...)     
 58  *                                                
 59  * PHB is switched to capi mode through calls     
 60  * CAPP snooping is activated                     
 61  *                                                
 62  * Input:                                         
 63  *      dev: device whose PHB should switch mo    
 64  *      mode: mode to switch to i.e. CAPI or P    
 65  *      flags: options related to the mode        
 66  */                                               
 67 enum cxllib_mode {                                
 68         CXL_MODE_CXL,                             
 69         CXL_MODE_PCI,                             
 70 };                                                
 71                                                   
 72 #define CXL_MODE_NO_DMA       0                   
 73 #define CXL_MODE_DMA_TVT0     1                   
 74 #define CXL_MODE_DMA_TVT1     2                   
 75                                                   
 76 int cxllib_switch_phb_mode(struct pci_dev *dev    
 77                         unsigned long flags);     
 78                                                   
 79                                                   
 80 /*                                                
 81  * Set the device for capi DMA.                   
 82  * Define its dma_ops and dma offset so that a    
 83  *                                                
 84  * Input:                                         
 85  *      dev: device to set                        
 86  *      flags: options. CXL_MODE_DMA_TVT1 shou    
 87  */                                               
 88 int cxllib_set_device_dma(struct pci_dev *dev,    
 89                                                   
 90                                                   
 91 /*                                                
 92  * Get the Process Element structure for the g    
 93  *                                                
 94  * Input:                                         
 95  *    task: task_struct for the context of the    
 96  *    translation_mode: whether addresses shou    
 97  * Output:                                        
 98  *    attr: attributes to fill up the Process     
 99  */                                               
100 struct cxllib_pe_attributes {                     
101         u64 sr;                                   
102         u32 lpid;                                 
103         u32 tid;                                  
104         u32 pid;                                  
105 };                                                
106 #define CXL_TRANSLATED_MODE 0                     
107 #define CXL_REAL_MODE 1                           
108                                                   
109 int cxllib_get_PE_attributes(struct task_struc    
110              unsigned long translation_mode, s    
111                                                   
112                                                   
113 /*                                                
114  * Handle memory fault.                           
115  * Fault in all the pages of the specified buf    
116  * provided in ‘flags’                        
117  *                                                
118  * Shouldn't be called from interrupt context     
119  *                                                
120  * Input:                                         
121  *      mm: struct mm for the thread faulting     
122  *      addr: base address of the buffer to pa    
123  *      size: size of the buffer to page in       
124  *      flags: permission requested (DSISR_ISS    
125  */                                               
126 int cxllib_handle_fault(struct mm_struct *mm,     
127                                                   
128                                                   
129 #endif /* _MISC_CXLLIB_H */                       
130                                                   

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