Skip to contentSkip to conversation

crypto: vmx - rebuild generated asm when target changes

PATCH In review Nicholas Piggin 2 participants 3 messages Nov 26, 2016 – Nov 28, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: vmx - rebuild generated asm when target changes

Switching from big endian to little endian can fail to regenerate the crypto assembly properly. Switch to using standard form of kbuild dependency checking (i.e., use FORCE and if_changed).

---
 drivers/crypto/vmx/Makefile | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/crypto/vmx/Makefile +7 -5
index b47da00..16ab2a0 100644
@@ -1,6 +1,8 @@
 obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o
 vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
 
+targets += aesp8-ppc.S ghashp8-ppc.S
+
 ifdef CONFIG_CPU_LITTLE_ENDIAN
 TARGET := linux-ppc64le
 else
@@ -11,13 +13,13 @@ TARGET := linux-ppc64
 endif
 endif
 
-quiet_cmd_perl = PERL $@
+quiet_cmd_perl = PERL    $@
       cmd_perl = $(PERL) $(<) $(TARGET) > $(@)
 
-$(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl
-	$(call cmd,perl)
+$(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl FORCE
+	$(call if_changed,perl)
   
-$(src)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl
-	$(call cmd,perl)
+$(src)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl FORCE
+	$(call if_changed,perl)
 
 .PRECIOUS: $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S
Signature · 1 line
2.10.2
#2 lore raw
Quoted 5 lines · On Mon, 28 Nov 2016 13:51:36 +0530 "Naveen N. Rao"…
Quoted 4 lines · Nicholas Piggin

Switching from big endian to little endian can fail to regenerate the crypto assembly properly. Switch to using standard form of kbuild dependency checking (i.e., use FORCE and if_changed).

Quoted 8 lines
Quoted 1 line

Hi Nick,
A similar patch is already in:
https://mid.mail-archive.com/[email protected]/msg21855.html

- Naveen

Hi Naveen,

I didn't notice your patch, thanks for pointing it out.

Thanks,
Nick