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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 650B1C6FD19 for ; Mon, 13 Mar 2023 07:52:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjCMHwA (ORCPT ); Mon, 13 Mar 2023 03:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbjCMHvi (ORCPT ); Mon, 13 Mar 2023 03:51:38 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8473521F4 for ; Mon, 13 Mar 2023 00:51:31 -0700 (PDT) Received: from SHSend.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by SHSQR01.spreadtrum.com with ESMTP id 32D7pAWI066429; Mon, 13 Mar 2023 15:51:10 +0800 (+08) (envelope-from Chunyan.Zhang@unisoc.com) Received: from ubt.spreadtrum.com (10.0.74.87) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 13 Mar 2023 15:51:05 +0800 From: Chunyan Zhang To: Joerg Roedel , Will Deacon , "Robin Murphy" CC: , Baolu Lu , Baolin Wang , Orson Zhai , "Chunyan Zhang" , Chunyan Zhang , LKML Subject: [PATCH V3 0/2] Add reattaching support and fix memory leak issue Date: Mon, 13 Mar 2023 15:50:15 +0800 Message-ID: <20230313075017.668204-1-chunyan.zhang@unisoc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.0.74.87] X-ClientProxiedBy: SHCAS01.spreadtrum.com (10.0.1.201) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com 32D7pAWI066429 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org V3: * Split into two patches; * Added support reattching an existing domain; * Release DMA buffer only when domain freed. V2: https://lkml.org/lkml/2023/3/7/1717 * Added some comment in sprd_iommu_attach_device() for the reason of calling sprd_iommu_cleanup(). V1: https://lkml.org/lkml/2023/2/10/198 Chunyan Zhang (2): iommu: sprd: release dma buffer to avoid memory leak iommu: sprd: Add support for reattaching an existing domain drivers/iommu/sprd-iommu.c | 54 +++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 13 deletions(-) -- 2.25.1