From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C30B9C433FE for ; Wed, 29 Sep 2021 08:18:52 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1BF8613D0 for ; Wed, 29 Sep 2021 08:18:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F1BF8613D0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mVUnS-00052R-WE; Wed, 29 Sep 2021 04:18:35 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (Exim 4.94.2) (envelope-from ) id 1mVUnQ-000524-AU for kernelnewbies@kernelnewbies.org; Wed, 29 Sep 2021 04:18:32 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 29 Sep 2021 17:18:27 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id 5ab5f7a661542153; Wed, 29 Sep 2021 17:18:27 +0900 DKIM-Signature: a=rsa-sha256; b=AcvvrmHdh2p1wWX6m3MBWHeNrvcQmo3swa74mltMrh6WFJ9wHoVXef/gXxAQhUkQy3pY3uOy7P qyOgEUwrUBXYoTJlm32WXtcQR2u6lO57vbHGRWGj01LPCJBCuRuaApcE/mbzmI1LIfP9P5qsjV98 izbRhPunVyx3AuMKC24DN5W7C9EK3lkMR+biQEtrVT3nlZ2NQgaY0No5ITbZ/MJJYcl5IAMvtRg8 WsVeZB7MkorUwl/5DOT/02i31DFm5DCmJy8tRr4KXmnpWzDPdmoxU14u4PO/woCf++I5RonDPlCt +QFKxWzVHDOKYbOIPmW03dkDqifa+0w4y9GlXDuw==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=YedwWGVlsAVkZ41hLVrPrlVSgR+CsmtW/GnK909kARM=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id e3e50b6c61542152; Wed, 29 Sep 2021 17:18:27 +0900 From: To: References: <007201d7b501$bf0a5880$3d1f0980$@etri.re.kr> In-Reply-To: <007201d7b501$bf0a5880$3d1f0980$@etri.re.kr> Subject: RE: does dma_alloc_coherent setup iommu page table? Date: Wed, 29 Sep 2021 17:18:25 +0900 Message-ID: <008801d7b50a$939cb4a0$bad61de0$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQI46f+y/+DBTJVFamN36gdOqr6dgKr4QJGA Content-Language: ko X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1421165753466955561==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============1421165753466955561== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0089_01D7B556.0384D1D0" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_0089_01D7B556.0384D1D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I realized the IOMMU mapping is done with dma_alloc_ or dma_map_.. It's so basic (I have read https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt ) but I forgot. Thanks! Chan Kim From: ckim@etri.re.kr Sent: Wednesday, September 29, 2021 4:15 PM To: kernelnewbies@kernelnewbies.org Subject: does dma_alloc_coherent setup iommu page table? Hello all, When the driver calls dma_alloc_coherent for a device, and if the device uses iommu, is the table entry for the iommu setup for the dma_handle? Seeing the struct device has something related to iommu, I guess so.. Any help appreciated. Thanks! Chan Kim ------=_NextPart_000_0089_01D7B556.0384D1D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I realized the IOMMU mapping is = done with dma_alloc_  or dma_map_..

It’s so basic (I have read https= ://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt ) but I = forgot.

Thanks!

Chan Kim

 

From:<= /b> = ckim@etri.re.kr <ckim@etri.re.kr>
Sent: Wednesday, = September 29, 2021 4:15 PM
To: = kernelnewbies@kernelnewbies.org
Subject: does = dma_alloc_coherent setup iommu page = table?

 

Hello all,

When the driver calls dma_alloc_coherent for a device, and = if the device uses iommu, is the table entry for the iommu setup for the = dma_handle?

Seeing the struct device has something related to iommu, I = guess so..

Any help appreciated.

Thanks!

Chan = Kim

------=_NextPart_000_0089_01D7B556.0384D1D0-- --===============1421165753466955561== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============1421165753466955561==--