From patchwork Tue May 28 14:05:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime MERE X-Patchwork-Id: 13676836 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2894EC25B7C for ; Tue, 28 May 2024 14:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=kZPX02y1RrX+7xxFqmJCYOMDp2WlsvjFVHO5JhkRLY0=; b=1q3IAtMnv93Rc5 fauH1W/idDJc8j5cXmmAlXFsIhCw2jf8gOE9DXteI+WSxB/hCyY9zJc4U/df8lUmBD5ebCqbGm29V pBy/norwjuxC1qxIhzXvUeY/Kn49cdIvCqGAHp4cid7d1fRS4FyzJ1R6syq76WH3qr+pZoPbzmKh2 dc/ee6D90HnTdo6KpWAq7QMoxkv4+xU/WORYfD+77wo13k0bZPNkCtOcVvuYLBsNMlwUhoEYw2ghI KTSBpKcIAUeUq/QnmuX0QR3tUuCRu1xDA3pSp+769cQynuHG2d8scMFuvDGx9ack07Wd5s2MYl91g RY2ZGG6qlGERzUEn5VlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBxTu-00000000w8p-2dr9; Tue, 28 May 2024 14:07:14 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBxTr-00000000w7D-1NjP for linux-arm-kernel@lists.infradead.org; Tue, 28 May 2024 14:07:12 +0000 Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44SDR8wI010710; Tue, 28 May 2024 16:06:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=selector1; bh=TBFeaRVOwuBL7TVI4j/ZaW iGYwaVC/tbXpkAWdf9bPE=; b=ziBpEmvrFGtLYCAW9omokSfNYI19n7bX+cEdn7 YEKS4p4/e4uhugDPPzE1ujj9T/k1YTL0+PpvTKZKkyNl2bbVbdNd7VAOhEHlU7rQ umPo475zPwDUNYyZFuBwPGv6sUPfjz06aqViiYOjAIlAcuS9qfPKIEyPEA+C4yDb TqebbY8I25yIaZvU2hd26huTcVYfP5K0H7XqtWrDwLWlfS/Dg91uMkUH/CgYtG8n EOHHry/S2RL3PZ0zXcD5yfzT52HvFgjn6Twd4Mo1GINxxCwlbIaJxr+dKTqknfO9 kq6D5f6SYNCIfBRaiR5PBMbGwBm9NFSRfhA95rY324fyXkgQ== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3ybsj0jdd7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 16:06:51 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id BD71D40045; Tue, 28 May 2024 16:06:47 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id ADC2A21B53C; Tue, 28 May 2024 16:06:10 +0200 (CEST) Received: from localhost (10.48.86.103) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 28 May 2024 16:06:10 +0200 From: Maxime MERE To: Herbert Xu , "David S . Miller" , Maxime Coquelin , Alexandre Torgue CC: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , , , , , =?utf-8?b?TWF4aW1lIE3DqXLDqQ==?= Subject: [PATCH v3 0/4] crypto: stm32/cryp - Improve stm32-cryp driver Date: Tue, 28 May 2024 16:05:44 +0200 Message-ID: <20240528140548.1632562-1-maxime.mere@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.48.86.103] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-28_10,2024-05-28_01,2024-05-17_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240528_070711_686427_B77B95C3 X-CRM114-Status: GOOD ( 10.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Maxime Méré This series of patches mainly aims to improve the usage of DMA with the CRYP peripheral of the STM32 MPU series. The other two patches are needed to enhance the driver's visibility for ST platforms. This patchset version 3 addresses the issues identified by Herbert. The code that raised a warning was in fact useless as there is already an overflow check in the "stm32_cryp_dma_check" function so I removed it. I've also added a new patch that correct a spinlock recursion warning. Maxime Méré (4): crypto: stm32/cryp - use dma when possible. crypto: stm32/cryp - increase priority crypto: stm32/cryp - add CRYPTO_ALG_KERN_DRIVER_ONLY flag crypto: stm32/cryp - call finalize with bh disabled drivers/crypto/stm32/stm32-cryp.c | 719 ++++++++++++++++++++++++++++-- 1 file changed, 674 insertions(+), 45 deletions(-)