From patchwork Sat Nov 26 04:24:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9448235 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 22A5E60778 for ; Sat, 26 Nov 2016 04:25:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 151A927AB2 for ; Sat, 26 Nov 2016 04:25:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 098BB27A98; Sat, 26 Nov 2016 04:25:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1C2727A98 for ; Sat, 26 Nov 2016 04:25:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753231AbcKZEZ1 (ORCPT ); Fri, 25 Nov 2016 23:25:27 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34268 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753053AbcKZEZT (ORCPT ); Fri, 25 Nov 2016 23:25:19 -0500 Received: by mail-pg0-f68.google.com with SMTP id e9so7095314pgc.1 for ; Fri, 25 Nov 2016 20:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=M88guqnAd1L47JNVCMEcxt7At9QQ+ox3nP4TIN6a/AI=; b=nVTIp4/HjtJVoNKPkzjonGBYbbp/RhzCojuw8gCgz3R2oqujFeE1mAp+vEzUYSZAGr zBI0P6ozz69jqxOxxYzYX4t5kaQc/y7tcE5YpQiLWrOFa9JtzQG/lbS15e2scxW0QoA/ Aqx1NRg0yalpJXstSorLElmmEzCjJ/KWApQ30t8I0a7tYR2pWA1+I7hV8PjX7kD3w5TB ENlVup7Kw+XuG6Tq3i+rLlh1ROoYRhLugIczDR7KfJ2DaNrOu/FoBLIHX44l/gOzfMpa wM1NRQ+1QYE34TBqbJn081XgLUd2Eb1AI5rw4dpPMrZb0/BPN+yaztL4Eoz5SefDCph4 tiWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=M88guqnAd1L47JNVCMEcxt7At9QQ+ox3nP4TIN6a/AI=; b=iofDCQB4rkHArnghzgZU+4MGooUugEJhqy6RivHgDGHxkM0b+xVqP9Kvb0dO9Q0OU+ +Gf6euMdvHBr2eELpi+P1RX+BjGsSVIGvKRxoYsyJgmONCyPwIKM+O6H5BY7wutxG1hL cDcnovY7rar57e6sbsdDx4lTCTsXkiFkcTtoANCzy1drVCrKoaNfbjIweDhjvGhK96Ov FneQU3Vyag+pjVpeG821uLB2LQrEaQb+GHTOmcPZrpw4FhyXi8Td02rQIze5XRnpTMBM 4SZkOtJFKFD1iCFwfgULilAEyj94p9tY4zyMjj9SLFRyr+ebj1fRwjbDKjhBKch7moet bVyA== X-Gm-Message-State: AKaTC01dmwqwybFCfDKMmSC5yKnTN2b3utIbpbvomWJr4V5wWy9NtirzDQN3Q+tghTd0eA== X-Received: by 10.99.247.69 with SMTP id f5mr20753816pgk.81.1480134318789; Fri, 25 Nov 2016 20:25:18 -0800 (PST) Received: from roar.local0.net (27-33-21-189.tpgi.com.au. [27.33.21.189]) by smtp.gmail.com with ESMTPSA id b12sm68654439pfb.78.2016.11.25.20.25.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 20:25:17 -0800 (PST) From: Nicholas Piggin To: Herbert Xu Cc: Nicholas Piggin , "Leonidas S . Barbosa" , Paulo Flabiano Smorigo , linux-crypto@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] crypto: vmx - rebuild generated asm when target changes Date: Sat, 26 Nov 2016 15:24:59 +1100 Message-Id: <20161126042459.1964-1-npiggin@gmail.com> X-Mailer: git-send-email 2.10.2 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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). Signed-off-by: Nicholas Piggin --- drivers/crypto/vmx/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile index b47da00..16ab2a0 100644 --- a/drivers/crypto/vmx/Makefile +++ b/drivers/crypto/vmx/Makefile @@ -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