Skip to content

Commit f42613c

Browse files
committed
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>
1 parent a308d66 commit f42613c

File tree

3 files changed

+5
-40
lines changed

3 files changed

+5
-40
lines changed

drivers/crypto/vmx/aesp8-ppc.pl

100755100644
Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@
8585
.asciz "AES for PowerISA 2.07, CRYPTOGAMS by <appro\@openssl.org>"
8686
8787
.globl .${prefix}_set_encrypt_key
88-
.align 5
89-
.${prefix}_set_encrypt_key:
9088
Lset_encrypt_key:
9189
mflr r11
9290
$PUSH r11,$LRSAVE($sp)
@@ -348,8 +346,6 @@
348346
.size .${prefix}_set_encrypt_key,.-.${prefix}_set_encrypt_key
349347
350348
.globl .${prefix}_set_decrypt_key
351-
.align 5
352-
.${prefix}_set_decrypt_key:
353349
$STU $sp,-$FRAME($sp)
354350
mflr r10
355351
$PUSH r10,$FRAME+$LRSAVE($sp)
@@ -405,8 +401,6 @@ ()
405401

406402
$code.=<<___;
407403
.globl .${prefix}_${dir}crypt
408-
.align 5
409-
.${prefix}_${dir}crypt:
410404
lwz $rounds,240($key)
411405
lis r0,0xfc00
412406
mfspr $vrsave,256
@@ -484,8 +478,6 @@ ()
484478
map("v$_",(4..10));
485479
$code.=<<___;
486480
.globl .${prefix}_cbc_encrypt
487-
.align 5
488-
.${prefix}_cbc_encrypt:
489481
${UCMP}i $len,16
490482
bltlr-
491483
@@ -1243,8 +1235,6 @@ ()
12431235

12441236
$code.=<<___;
12451237
.globl .${prefix}_ctr32_encrypt_blocks
1246-
.align 5
1247-
.${prefix}_ctr32_encrypt_blocks:
12481238
${UCMP}i $len,1
12491239
bltlr-
12501240

drivers/crypto/vmx/ghashp8-ppc.pl

100755100644
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@
5454
.text
5555
5656
.globl .gcm_init_p8
57-
.align 5
58-
.gcm_init_p8:
5957
lis r0,0xfff0
6058
li r8,0x10
6159
mfspr $vrsave,256
@@ -98,8 +96,6 @@
9896
.size .gcm_init_p8,.-.gcm_init_p8
9997
10098
.globl .gcm_gmult_p8
101-
.align 5
102-
.gcm_gmult_p8:
10399
lis r0,0xfff8
104100
li r8,0x10
105101
mfspr $vrsave,256
@@ -148,8 +144,6 @@
148144
.size .gcm_gmult_p8,.-.gcm_gmult_p8
149145
150146
.globl .gcm_ghash_p8
151-
.align 5
152-
.gcm_ghash_p8:
153147
lis r0,0xfff8
154148
li r8,0x10
155149
mfspr $vrsave,256

drivers/crypto/vmx/ppc-xlate.pl

100755100644
Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,13 @@
2727
/osx/ && do { $name = "_$name";
2828
last;
2929
};
30-
/linux.*(32|64le)/
31-
&& do { $ret .= ".globl $name\n";
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";
30+
/linux/
31+
&& do { $ret = "_GLOBAL($name)";
4432
last;
4533
};
4634
}
4735

48-
$ret = ".globl $name" if (!$ret);
36+
$ret = ".globl $name\nalign 5\n$name:" if (!$ret);
4937
$$global = $name;
5038
$ret;
5139
};
@@ -187,6 +175,8 @@ sub vcrypto_op {
187175
" .long ".sprintf "0x%X",(31<<26)|($arg<<21)|(147*2);
188176
};
189177

178+
print "#include <asm/ppc_asm.h>\n" if $flavour =~ /linux/;
179+
190180
while($line=<>) {
191181

192182
$line =~ s|[#!;].*$||; # get rid of asm-style comments...
@@ -199,15 +189,6 @@ sub vcrypto_op {
199189
$line =~ s|\bL(\w+)|\.L$1|g if ($dotinlocallabels);
200190
}
201191

202-
{
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-
211192
{
212193
$line =~ s|^\s*(\.?)(\w+)([\.\+\-]?)\s*||;
213194
my $c = $1; $c = "\t" if ($c eq "");

0 commit comments

Comments
 (0)