From patchwork Mon Aug 8 17:04:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 9268829 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 57317607D6 for ; Mon, 8 Aug 2016 17:04:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 457BE1FE7B for ; Mon, 8 Aug 2016 17:04:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37B4627569; Mon, 8 Aug 2016 17:04:54 +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_SIGNED, 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 B204A1FE7B for ; Mon, 8 Aug 2016 17:04:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752355AbcHHREx (ORCPT ); Mon, 8 Aug 2016 13:04:53 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:57482 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752313AbcHHREw (ORCPT ); Mon, 8 Aug 2016 13:04:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Date:Sender:Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References:In-Reply-To; bh=qyPTUqdYrmJvXsDTuGwR7jo62q6c3jg6jElO8Ov/ki0=; b=ou0NNFU+uVakgVtAgAeF8hnJAuBTbsEVCPCQT3LMMs8x6dCinnehcIkWQnYHht7qtFbFYNMNWFUXy5SnRIShyAMjn1KgqqF/2xGXdR6Sphe+8sB9ObUUfZgxwo8vSaDvWJTQlkInYhhhjyMcxeAtOmM18rsNt5SzVtSr/EBlfVI=; Received: from e0022681537dd.dyn.armlinux.org.uk ([2001:4d48:ad52:3201:222:68ff:fe15:37dd]:45338 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bWnyq-00057Z-Jn; Mon, 08 Aug 2016 18:04:48 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bWnyp-0002Vf-MD; Mon, 08 Aug 2016 18:04:47 +0100 In-Reply-To: <20160808170400.GC1041@n2100.armlinux.org.uk> References: <20160808170400.GC1041@n2100.armlinux.org.uk> From: Russell King To: Fabio Estevam , Herbert Xu Cc: "David S. Miller" , linux-crypto@vger.kernel.org Subject: [PATCH 04/11] crypto: caam: mark the hardware descriptor as cache line aligned MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Mon, 08 Aug 2016 18:04:47 +0100 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 Mark the hardware descriptor as being cache line aligned; on DMA incoherent architectures, the hardware descriptor should sit in a separate cache line from the CPU accessed data to avoid polluting the caches. Signed-off-by: Russell King --- drivers/crypto/caam/caamhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index ce9c1bc23795..e9c52cbf9a41 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -604,7 +604,7 @@ struct ahash_edesc { int src_nents; int sec4_sg_bytes; struct sec4_sg_entry *sec4_sg; - u32 hw_desc[DESC_JOB_IO_LEN / sizeof(u32)]; + u32 hw_desc[DESC_JOB_IO_LEN / sizeof(u32)] ____cacheline_aligned; }; static inline void ahash_unmap(struct device *dev,