diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-11 23:28:29 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-12 06:18:00 -0400 |
commit | f42613c66524c0fc890b448872169746d392f6bb (patch) | |
tree | 8ae3e638d36fd5bf1806a3ac9ae206aed3752d93 /drivers/crypto | |
parent | a308d66f144c9d5a305ceda4345bebbaf6abc43f (diff) |
linux-next: Tree for Mar 11 (powerpc build failure due to vmx crypto code)
crypto: vmx - Fix assembler perl to use _GLOBAL
Rather than doing things by hand for global symbols to deal with
different calling conventions we already have a macro _GLOBAL in
Linux to handle this.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--[-rwxr-xr-x] | drivers/crypto/vmx/aesp8-ppc.pl | 10 | ||||
-rw-r--r--[-rwxr-xr-x] | drivers/crypto/vmx/ghashp8-ppc.pl | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | drivers/crypto/vmx/ppc-xlate.pl | 29 |
3 files changed, 5 insertions, 40 deletions
diff --git a/drivers/crypto/vmx/aesp8-ppc.pl b/drivers/crypto/vmx/aesp8-ppc.pl index 3ee8979e7625..6c5c20c6108e 100755..100644 --- a/drivers/crypto/vmx/aesp8-ppc.pl +++ b/drivers/crypto/vmx/aesp8-ppc.pl | |||
@@ -85,8 +85,6 @@ Lconsts: | |||
85 | .asciz "AES for PowerISA 2.07, CRYPTOGAMS by <appro\@openssl.org>" | 85 | .asciz "AES for PowerISA 2.07, CRYPTOGAMS by <appro\@openssl.org>" |
86 | 86 | ||
87 | .globl .${prefix}_set_encrypt_key | 87 | .globl .${prefix}_set_encrypt_key |
88 | .align 5 | ||
89 | .${prefix}_set_encrypt_key: | ||
90 | Lset_encrypt_key: | 88 | Lset_encrypt_key: |
91 | mflr r11 | 89 | mflr r11 |
92 | $PUSH r11,$LRSAVE($sp) | 90 | $PUSH r11,$LRSAVE($sp) |
@@ -348,8 +346,6 @@ Lenc_key_abort: | |||
348 | .size .${prefix}_set_encrypt_key,.-.${prefix}_set_encrypt_key | 346 | .size .${prefix}_set_encrypt_key,.-.${prefix}_set_encrypt_key |
349 | 347 | ||
350 | .globl .${prefix}_set_decrypt_key | 348 | .globl .${prefix}_set_decrypt_key |
351 | .align 5 | ||
352 | .${prefix}_set_decrypt_key: | ||
353 | $STU $sp,-$FRAME($sp) | 349 | $STU $sp,-$FRAME($sp) |
354 | mflr r10 | 350 | mflr r10 |
355 | $PUSH r10,$FRAME+$LRSAVE($sp) | 351 | $PUSH r10,$FRAME+$LRSAVE($sp) |
@@ -405,8 +401,6 @@ my ($inp,$out,$key,$rounds,$idx)=map("r$_",(3..7)); | |||
405 | 401 | ||
406 | $code.=<<___; | 402 | $code.=<<___; |
407 | .globl .${prefix}_${dir}crypt | 403 | .globl .${prefix}_${dir}crypt |
408 | .align 5 | ||
409 | .${prefix}_${dir}crypt: | ||
410 | lwz $rounds,240($key) | 404 | lwz $rounds,240($key) |
411 | lis r0,0xfc00 | 405 | lis r0,0xfc00 |
412 | mfspr $vrsave,256 | 406 | mfspr $vrsave,256 |
@@ -484,8 +478,6 @@ my ($ivec,$inptail,$inpperm,$outhead,$outperm,$outmask,$keyperm)= | |||
484 | map("v$_",(4..10)); | 478 | map("v$_",(4..10)); |
485 | $code.=<<___; | 479 | $code.=<<___; |
486 | .globl .${prefix}_cbc_encrypt | 480 | .globl .${prefix}_cbc_encrypt |
487 | .align 5 | ||
488 | .${prefix}_cbc_encrypt: | ||
489 | ${UCMP}i $len,16 | 481 | ${UCMP}i $len,16 |
490 | bltlr- | 482 | bltlr- |
491 | 483 | ||
@@ -1243,8 +1235,6 @@ my $dat=$tmp; | |||
1243 | 1235 | ||
1244 | $code.=<<___; | 1236 | $code.=<<___; |
1245 | .globl .${prefix}_ctr32_encrypt_blocks | 1237 | .globl .${prefix}_ctr32_encrypt_blocks |
1246 | .align 5 | ||
1247 | .${prefix}_ctr32_encrypt_blocks: | ||
1248 | ${UCMP}i $len,1 | 1238 | ${UCMP}i $len,1 |
1249 | bltlr- | 1239 | bltlr- |
1250 | 1240 | ||
diff --git a/drivers/crypto/vmx/ghashp8-ppc.pl b/drivers/crypto/vmx/ghashp8-ppc.pl index e76a58c343c1..0a6f899839dd 100755..100644 --- a/drivers/crypto/vmx/ghashp8-ppc.pl +++ b/drivers/crypto/vmx/ghashp8-ppc.pl | |||
@@ -54,8 +54,6 @@ $code=<<___; | |||
54 | .text | 54 | .text |
55 | 55 | ||
56 | .globl .gcm_init_p8 | 56 | .globl .gcm_init_p8 |
57 | .align 5 | ||
58 | .gcm_init_p8: | ||
59 | lis r0,0xfff0 | 57 | lis r0,0xfff0 |
60 | li r8,0x10 | 58 | li r8,0x10 |
61 | mfspr $vrsave,256 | 59 | mfspr $vrsave,256 |
@@ -98,8 +96,6 @@ $code=<<___; | |||
98 | .size .gcm_init_p8,.-.gcm_init_p8 | 96 | .size .gcm_init_p8,.-.gcm_init_p8 |
99 | 97 | ||
100 | .globl .gcm_gmult_p8 | 98 | .globl .gcm_gmult_p8 |
101 | .align 5 | ||
102 | .gcm_gmult_p8: | ||
103 | lis r0,0xfff8 | 99 | lis r0,0xfff8 |
104 | li r8,0x10 | 100 | li r8,0x10 |
105 | mfspr $vrsave,256 | 101 | mfspr $vrsave,256 |
@@ -148,8 +144,6 @@ $code=<<___; | |||
148 | .size .gcm_gmult_p8,.-.gcm_gmult_p8 | 144 | .size .gcm_gmult_p8,.-.gcm_gmult_p8 |
149 | 145 | ||
150 | .globl .gcm_ghash_p8 | 146 | .globl .gcm_ghash_p8 |
151 | .align 5 | ||
152 | .gcm_ghash_p8: | ||
153 | lis r0,0xfff8 | 147 | lis r0,0xfff8 |
154 | li r8,0x10 | 148 | li r8,0x10 |
155 | mfspr $vrsave,256 | 149 | mfspr $vrsave,256 |
diff --git a/drivers/crypto/vmx/ppc-xlate.pl b/drivers/crypto/vmx/ppc-xlate.pl index f89e81429931..a59188494af8 100755..100644 --- a/drivers/crypto/vmx/ppc-xlate.pl +++ b/drivers/crypto/vmx/ppc-xlate.pl | |||
@@ -27,25 +27,13 @@ my $globl = sub { | |||
27 | /osx/ && do { $name = "_$name"; | 27 | /osx/ && do { $name = "_$name"; |
28 | last; | 28 | last; |
29 | }; | 29 | }; |
30 | /linux.*(32|64le)/ | 30 | /linux/ |
31 | && do { $ret .= ".globl $name\n"; | 31 | && do { $ret = "_GLOBAL($name)"; |
32 | $ret .= ".type $name,\@function"; | ||
33 | last; | ||
34 | }; | ||
35 | /linux.*64/ && do { $ret .= ".globl $name\n"; | ||
36 | $ret .= ".type $name,\@function\n"; | ||
37 | $ret .= ".section \".opd\",\"aw\"\n"; | ||
38 | $ret .= ".align 3\n"; | ||
39 | $ret .= "$name:\n"; | ||
40 | $ret .= ".quad .$name,.TOC.\@tocbase,0\n"; | ||
41 | $ret .= ".previous\n"; | ||
42 | |||
43 | $name = ".$name"; | ||
44 | last; | 32 | last; |
45 | }; | 33 | }; |
46 | } | 34 | } |
47 | 35 | ||
48 | $ret = ".globl $name" if (!$ret); | 36 | $ret = ".globl $name\nalign 5\n$name:" if (!$ret); |
49 | $$global = $name; | 37 | $$global = $name; |
50 | $ret; | 38 | $ret; |
51 | }; | 39 | }; |
@@ -187,6 +175,8 @@ my $mtsle = sub { | |||
187 | " .long ".sprintf "0x%X",(31<<26)|($arg<<21)|(147*2); | 175 | " .long ".sprintf "0x%X",(31<<26)|($arg<<21)|(147*2); |
188 | }; | 176 | }; |
189 | 177 | ||
178 | print "#include <asm/ppc_asm.h>\n" if $flavour =~ /linux/; | ||
179 | |||
190 | while($line=<>) { | 180 | while($line=<>) { |
191 | 181 | ||
192 | $line =~ s|[#!;].*$||; # get rid of asm-style comments... | 182 | $line =~ s|[#!;].*$||; # get rid of asm-style comments... |
@@ -200,15 +190,6 @@ while($line=<>) { | |||
200 | } | 190 | } |
201 | 191 | ||
202 | { | 192 | { |
203 | $line =~ s|(^[\.\w]+)\:\s*||; | ||
204 | my $label = $1; | ||
205 | if ($label) { | ||
206 | printf "%s:",($GLOBALS{$label} or $label); | ||
207 | printf "\n.localentry\t$GLOBALS{$label},0" if ($GLOBALS{$label} && $flavour =~ /linux.*64le/); | ||
208 | } | ||
209 | } | ||
210 | |||
211 | { | ||
212 | $line =~ s|^\s*(\.?)(\w+)([\.\+\-]?)\s*||; | 193 | $line =~ s|^\s*(\.?)(\w+)([\.\+\-]?)\s*||; |
213 | my $c = $1; $c = "\t" if ($c eq ""); | 194 | my $c = $1; $c = "\t" if ($c eq ""); |
214 | my $mnemonic = $2; | 195 | my $mnemonic = $2; |