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

TOMOYO Linux Cross Reference
Linux/arch/s390/lib/xor.c

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/s390/lib/xor.c (Architecture alpha) and /arch/ppc/lib/xor.c (Architecture ppc)


  1 // SPDX-License-Identifier: GPL-2.0                 1 
  2 /*                                                
  3  * Optimized xor_block operation for RAID4/5      
  4  *                                                
  5  * Copyright IBM Corp. 2016                       
  6  * Author(s): Martin Schwidefsky <schwidefsky@    
  7  */                                               
  8                                                   
  9 #include <linux/types.h>                          
 10 #include <linux/export.h>                         
 11 #include <linux/raid/xor.h>                       
 12 #include <asm/xor.h>                              
 13                                                   
 14 static void xor_xc_2(unsigned long bytes, unsi    
 15                      const unsigned long * __r    
 16 {                                                 
 17         asm volatile(                             
 18                 "       larl    1,2f\n"           
 19                 "       aghi    %0,-1\n"          
 20                 "       jm      3f\n"             
 21                 "       srlg    0,%0,8\n"         
 22                 "       ltgr    0,0\n"            
 23                 "       jz      1f\n"             
 24                 "0:     xc      0(256,%1),0(%2    
 25                 "       la      %1,256(%1)\n"     
 26                 "       la      %2,256(%2)\n"     
 27                 "       brctg   0,0b\n"           
 28                 "1:     ex      %0,0(1)\n"        
 29                 "       j       3f\n"             
 30                 "2:     xc      0(1,%1),0(%2)\    
 31                 "3:\n"                            
 32                 : : "d" (bytes), "a" (p1), "a"    
 33                 : "", "1", "cc", "memory");       
 34 }                                                 
 35                                                   
 36 static void xor_xc_3(unsigned long bytes, unsi    
 37                      const unsigned long * __r    
 38                      const unsigned long * __r    
 39 {                                                 
 40         asm volatile(                             
 41                 "       larl    1,2f\n"           
 42                 "       aghi    %0,-1\n"          
 43                 "       jm      3f\n"             
 44                 "       srlg    0,%0,8\n"         
 45                 "       ltgr    0,0\n"            
 46                 "       jz      1f\n"             
 47                 "0:     xc      0(256,%1),0(%2    
 48                 "       xc      0(256,%1),0(%3    
 49                 "       la      %1,256(%1)\n"     
 50                 "       la      %2,256(%2)\n"     
 51                 "       la      %3,256(%3)\n"     
 52                 "       brctg   0,0b\n"           
 53                 "1:     ex      %0,0(1)\n"        
 54                 "       ex      %0,6(1)\n"        
 55                 "       j       3f\n"             
 56                 "2:     xc      0(1,%1),0(%2)\    
 57                 "       xc      0(1,%1),0(%3)\    
 58                 "3:\n"                            
 59                 : "+d" (bytes), "+a" (p1), "+a    
 60                 : : "", "1", "cc", "memory");     
 61 }                                                 
 62                                                   
 63 static void xor_xc_4(unsigned long bytes, unsi    
 64                      const unsigned long * __r    
 65                      const unsigned long * __r    
 66                      const unsigned long * __r    
 67 {                                                 
 68         asm volatile(                             
 69                 "       larl    1,2f\n"           
 70                 "       aghi    %0,-1\n"          
 71                 "       jm      3f\n"             
 72                 "       srlg    0,%0,8\n"         
 73                 "       ltgr    0,0\n"            
 74                 "       jz      1f\n"             
 75                 "0:     xc      0(256,%1),0(%2    
 76                 "       xc      0(256,%1),0(%3    
 77                 "       xc      0(256,%1),0(%4    
 78                 "       la      %1,256(%1)\n"     
 79                 "       la      %2,256(%2)\n"     
 80                 "       la      %3,256(%3)\n"     
 81                 "       la      %4,256(%4)\n"     
 82                 "       brctg   0,0b\n"           
 83                 "1:     ex      %0,0(1)\n"        
 84                 "       ex      %0,6(1)\n"        
 85                 "       ex      %0,12(1)\n"       
 86                 "       j       3f\n"             
 87                 "2:     xc      0(1,%1),0(%2)\    
 88                 "       xc      0(1,%1),0(%3)\    
 89                 "       xc      0(1,%1),0(%4)\    
 90                 "3:\n"                            
 91                 : "+d" (bytes), "+a" (p1), "+a    
 92                 : : "", "1", "cc", "memory");     
 93 }                                                 
 94                                                   
 95 static void xor_xc_5(unsigned long bytes, unsi    
 96                      const unsigned long * __r    
 97                      const unsigned long * __r    
 98                      const unsigned long * __r    
 99                      const unsigned long * __r    
100 {                                                 
101         asm volatile(                             
102                 "       larl    1,2f\n"           
103                 "       aghi    %0,-1\n"          
104                 "       jm      3f\n"             
105                 "       srlg    0,%0,8\n"         
106                 "       ltgr    0,0\n"            
107                 "       jz      1f\n"             
108                 "0:     xc      0(256,%1),0(%2    
109                 "       xc      0(256,%1),0(%3    
110                 "       xc      0(256,%1),0(%4    
111                 "       xc      0(256,%1),0(%5    
112                 "       la      %1,256(%1)\n"     
113                 "       la      %2,256(%2)\n"     
114                 "       la      %3,256(%3)\n"     
115                 "       la      %4,256(%4)\n"     
116                 "       la      %5,256(%5)\n"     
117                 "       brctg   0,0b\n"           
118                 "1:     ex      %0,0(1)\n"        
119                 "       ex      %0,6(1)\n"        
120                 "       ex      %0,12(1)\n"       
121                 "       ex      %0,18(1)\n"       
122                 "       j       3f\n"             
123                 "2:     xc      0(1,%1),0(%2)\    
124                 "       xc      0(1,%1),0(%3)\    
125                 "       xc      0(1,%1),0(%4)\    
126                 "       xc      0(1,%1),0(%5)\    
127                 "3:\n"                            
128                 : "+d" (bytes), "+a" (p1), "+a    
129                   "+a" (p5)                       
130                 : : "", "1", "cc", "memory");     
131 }                                                 
132                                                   
133 struct xor_block_template xor_block_xc = {        
134         .name = "xc",                             
135         .do_2 = xor_xc_2,                         
136         .do_3 = xor_xc_3,                         
137         .do_4 = xor_xc_4,                         
138         .do_5 = xor_xc_5,                         
139 };                                                
140 EXPORT_SYMBOL(xor_block_xc);                      
141                                                   

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