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

TOMOYO Linux Cross Reference
Linux/include/linux/async_tx.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 /include/linux/async_tx.h (Version linux-6.12-rc7) and /include/linux/async_tx.h (Version policy-sample)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 
  2 /*                                                
  3  * Copyright © 2006, Intel Corporation.          
  4  */                                               
  5 #ifndef _ASYNC_TX_H_                              
  6 #define _ASYNC_TX_H_                              
  7 #include <linux/dmaengine.h>                      
  8 #include <linux/spinlock.h>                       
  9 #include <linux/interrupt.h>                      
 10                                                   
 11 /* on architectures without dma-mapping capabi    
 12  * that the asynchronous path compiles away       
 13  */                                               
 14 #ifdef CONFIG_HAS_DMA                             
 15 #define __async_inline                            
 16 #else                                             
 17 #define __async_inline __always_inline            
 18 #endif                                            
 19                                                   
 20 /**                                               
 21  * dma_chan_ref - object used to manage dma ch    
 22  *   dmaengine core.                              
 23  * @chan - the channel being tracked              
 24  * @node - node for the channel to be placed o    
 25  * @rcu - for list_del_rcu                        
 26  * @count - number of times this channel is li    
 27  *      (for channels with multiple capabiitie    
 28  */                                               
 29 struct dma_chan_ref {                             
 30         struct dma_chan *chan;                    
 31         struct list_head node;                    
 32         struct rcu_head rcu;                      
 33         atomic_t count;                           
 34 };                                                
 35                                                   
 36 /**                                               
 37  * async_tx_flags - modifiers for the async_*     
 38  * @ASYNC_TX_XOR_ZERO_DST: this flag must be u    
 39  * destination address is not a source.  The a    
 40  * implicitly, the synchronous case needs to z    
 41  * @ASYNC_TX_XOR_DROP_DST: this flag must be u    
 42  * also one of the source addresses.  In the s    
 43  * address is an implied source, whereas the a    
 44  * as a source.  The destination address must     
 45  * array.                                         
 46  * @ASYNC_TX_ACK: immediately ack the descript    
 47  * dependency chain                               
 48  * @ASYNC_TX_FENCE: specify that the next oper    
 49  * chain uses this operation's result as an in    
 50  * @ASYNC_TX_PQ_XOR_DST: do not overwrite the     
 51  * input data. Required for rmw case.             
 52  */                                               
 53 enum async_tx_flags {                             
 54         ASYNC_TX_XOR_ZERO_DST    = (1 << 0),      
 55         ASYNC_TX_XOR_DROP_DST    = (1 << 1),      
 56         ASYNC_TX_ACK             = (1 << 2),      
 57         ASYNC_TX_FENCE           = (1 << 3),      
 58         ASYNC_TX_PQ_XOR_DST      = (1 << 4),      
 59 };                                                
 60                                                   
 61 /**                                               
 62  * struct async_submit_ctl - async_tx submissi    
 63  * @flags: submission modifiers                   
 64  * @depend_tx: parent dependency of the curren    
 65  * @cb_fn: callback routine to run at operatio    
 66  * @cb_param: parameter for the callback routi    
 67  * @scribble: caller provided space for dma/pa    
 68  */                                               
 69 struct async_submit_ctl {                         
 70         enum async_tx_flags flags;                
 71         struct dma_async_tx_descriptor *depend    
 72         dma_async_tx_callback cb_fn;              
 73         void *cb_param;                           
 74         void *scribble;                           
 75 };                                                
 76                                                   
 77 #if defined(CONFIG_DMA_ENGINE) && !defined(CON    
 78 #define async_tx_issue_pending_all dma_issue_p    
 79                                                   
 80 /**                                               
 81  * async_tx_issue_pending - send pending descr    
 82  * @tx: descriptor handle to retrieve hardware    
 83  *                                                
 84  * Note: any dependent operations will have al    
 85  * async_tx_channel_switch, or (in the case of    
 86  * be already pending on this channel.            
 87  */                                               
 88 static inline void async_tx_issue_pending(stru    
 89 {                                                 
 90         if (likely(tx)) {                         
 91                 struct dma_chan *chan = tx->ch    
 92                 struct dma_device *dma = chan-    
 93                                                   
 94                 dma->device_issue_pending(chan    
 95         }                                         
 96 }                                                 
 97 #ifdef CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNEL      
 98 #include <asm/async_tx.h>                         
 99 #else                                             
100 #define async_tx_find_channel(dep, type, dst,     
101          __async_tx_find_channel(dep, type)       
102 struct dma_chan *                                 
103 __async_tx_find_channel(struct async_submit_ct    
104                         enum dma_transaction_t    
105 #endif /* CONFIG_ARCH_HAS_ASYNC_TX_FIND_CHANNE    
106 #else                                             
107 static inline void async_tx_issue_pending_all(    
108 {                                                 
109         do { } while (0);                         
110 }                                                 
111                                                   
112 static inline void async_tx_issue_pending(stru    
113 {                                                 
114         do { } while (0);                         
115 }                                                 
116                                                   
117 static inline struct dma_chan *                   
118 async_tx_find_channel(struct async_submit_ctl     
119                       enum dma_transaction_typ    
120                       int dst_count, struct pa    
121                       size_t len)                 
122 {                                                 
123         return NULL;                              
124 }                                                 
125 #endif                                            
126                                                   
127 /**                                               
128  * async_tx_sync_epilog - actions to take if a    
129  * @cb_fn: function to call when the transacti    
130  * @cb_fn_param: parameter to pass to the call    
131  */                                               
132 static inline void                                
133 async_tx_sync_epilog(struct async_submit_ctl *    
134 {                                                 
135         if (submit->cb_fn)                        
136                 submit->cb_fn(submit->cb_param    
137 }                                                 
138                                                   
139 typedef union {                                   
140         unsigned long addr;                       
141         struct page *page;                        
142         dma_addr_t dma;                           
143 } addr_conv_t;                                    
144                                                   
145 static inline void                                
146 init_async_submit(struct async_submit_ctl *arg    
147                   struct dma_async_tx_descript    
148                   dma_async_tx_callback cb_fn,    
149                   addr_conv_t *scribble)          
150 {                                                 
151         args->flags = flags;                      
152         args->depend_tx = tx;                     
153         args->cb_fn = cb_fn;                      
154         args->cb_param = cb_param;                
155         args->scribble = scribble;                
156 }                                                 
157                                                   
158 void async_tx_submit(struct dma_chan *chan, st    
159                      struct async_submit_ctl *    
160                                                   
161 struct dma_async_tx_descriptor *                  
162 async_xor(struct page *dest, struct page **src    
163           int src_cnt, size_t len, struct asyn    
164                                                   
165 struct dma_async_tx_descriptor *                  
166 async_xor_offs(struct page *dest, unsigned int    
167                 struct page **src_list, unsign    
168                 int src_cnt, size_t len, struc    
169                                                   
170 struct dma_async_tx_descriptor *                  
171 async_xor_val(struct page *dest, struct page *    
172               int src_cnt, size_t len, enum su    
173               struct async_submit_ctl *submit)    
174                                                   
175 struct dma_async_tx_descriptor *                  
176 async_xor_val_offs(struct page *dest, unsigned    
177                 struct page **src_list, unsign    
178                 int src_cnt, size_t len, enum     
179                 struct async_submit_ctl *submi    
180                                                   
181 struct dma_async_tx_descriptor *                  
182 async_memcpy(struct page *dest, struct page *s    
183              unsigned int src_offset, size_t l    
184              struct async_submit_ctl *submit);    
185                                                   
186 struct dma_async_tx_descriptor *async_trigger_    
187                                                   
188 struct dma_async_tx_descriptor *                  
189 async_gen_syndrome(struct page **blocks, unsig    
190                    size_t len, struct async_su    
191                                                   
192 struct dma_async_tx_descriptor *                  
193 async_syndrome_val(struct page **blocks, unsig    
194                    size_t len, enum sum_check_    
195                    unsigned int s_off, struct     
196                                                   
197 struct dma_async_tx_descriptor *                  
198 async_raid6_2data_recov(int src_num, size_t by    
199                         struct page **ptrs, un    
200                         struct async_submit_ct    
201                                                   
202 struct dma_async_tx_descriptor *                  
203 async_raid6_datap_recov(int src_num, size_t by    
204                         struct page **ptrs, un    
205                         struct async_submit_ct    
206                                                   
207 void async_tx_quiesce(struct dma_async_tx_desc    
208 #endif /* _ASYNC_TX_H_ */                         
209                                                   

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