From mboxrd@z Thu Jan 1 00:00:00 1970 From: KyongHo Cho Subject: Re: [Linaro-mm-sig] [PATCH 3/8] ARM: dma-mapping: use asm-generic/dma-mapping-common.h Date: Mon, 20 Jun 2011 23:33:00 +0900 Message-ID: References: <1308556213-24970-1-git-send-email-m.szyprowski@samsung.com> <1308556213-24970-4-git-send-email-m.szyprowski@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:46082 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754889Ab1FTOdB convert rfc822-to-8bit (ORCPT ); Mon, 20 Jun 2011 10:33:01 -0400 Received: by yxi11 with SMTP id 11so2097415yxi.19 for ; Mon, 20 Jun 2011 07:33:00 -0700 (PDT) In-Reply-To: <1308556213-24970-4-git-send-email-m.szyprowski@samsung.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Marek Szyprowski Cc: linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, Kyungmin Park , Russell King - ARM Linux , Joerg Roedel , Arnd Bergmann Hi. Great job. On Mon, Jun 20, 2011 at 4:50 PM, Marek Szyprowski wrote: > +static inline void set_dma_ops(struct device *dev, struct dma_map_op= s *ops) > +{ > + =A0 =A0 =A0 dev->archdata.dma_ops =3D ops; > +} > + Who calls set_dma_ops()? In the mach. initialization part? What if a device driver does not want to use arch's dma_map_ops when machine init procedure set a dma_map_ops? Even though, may arch defiens their dma_map_ops in archdata of device s= tructure, I think it is not a good idea that is device structure contains a pointer to dma_map_ops that may not be common to all devices in a board. I also think that it is better to attach and to detach dma_map_ops dyna= mically. Moreover, a mapping is not permanent in our Exynos platform because a System MMU may be turned off while runtime. DMA API must come with IOMMU API to initialize IOMMU in runtime. Regards, Cho KyongHo. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id A34E49000BD for ; Mon, 20 Jun 2011 10:33:05 -0400 (EDT) Received: by yxn22 with SMTP id 22so659734yxn.14 for ; Mon, 20 Jun 2011 07:33:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1308556213-24970-4-git-send-email-m.szyprowski@samsung.com> References: <1308556213-24970-1-git-send-email-m.szyprowski@samsung.com> <1308556213-24970-4-git-send-email-m.szyprowski@samsung.com> Date: Mon, 20 Jun 2011 23:33:00 +0900 Message-ID: Subject: Re: [Linaro-mm-sig] [PATCH 3/8] ARM: dma-mapping: use asm-generic/dma-mapping-common.h From: KyongHo Cho Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Marek Szyprowski Cc: linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, Kyungmin Park , Russell King - ARM Linux , Joerg Roedel , Arnd Bergmann Hi. Great job. On Mon, Jun 20, 2011 at 4:50 PM, Marek Szyprowski wrote: > +static inline void set_dma_ops(struct device *dev, struct dma_map_ops *o= ps) > +{ > + =A0 =A0 =A0 dev->archdata.dma_ops =3D ops; > +} > + Who calls set_dma_ops()? In the mach. initialization part? What if a device driver does not want to use arch's dma_map_ops when machine init procedure set a dma_map_ops? Even though, may arch defiens their dma_map_ops in archdata of device struc= ture, I think it is not a good idea that is device structure contains a pointer to dma_map_ops that may not be common to all devices in a board. I also think that it is better to attach and to detach dma_map_ops dynamica= lly. Moreover, a mapping is not permanent in our Exynos platform because a System MMU may be turned off while runtime. DMA API must come with IOMMU API to initialize IOMMU in runtime. Regards, Cho KyongHo. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: pullip.cho@samsung.com (KyongHo Cho) Date: Mon, 20 Jun 2011 23:33:00 +0900 Subject: [Linaro-mm-sig] [PATCH 3/8] ARM: dma-mapping: use asm-generic/dma-mapping-common.h In-Reply-To: <1308556213-24970-4-git-send-email-m.szyprowski@samsung.com> References: <1308556213-24970-1-git-send-email-m.szyprowski@samsung.com> <1308556213-24970-4-git-send-email-m.szyprowski@samsung.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi. Great job. On Mon, Jun 20, 2011 at 4:50 PM, Marek Szyprowski wrote: > +static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) > +{ > + ? ? ? dev->archdata.dma_ops = ops; > +} > + Who calls set_dma_ops()? In the mach. initialization part? What if a device driver does not want to use arch's dma_map_ops when machine init procedure set a dma_map_ops? Even though, may arch defiens their dma_map_ops in archdata of device structure, I think it is not a good idea that is device structure contains a pointer to dma_map_ops that may not be common to all devices in a board. I also think that it is better to attach and to detach dma_map_ops dynamically. Moreover, a mapping is not permanent in our Exynos platform because a System MMU may be turned off while runtime. DMA API must come with IOMMU API to initialize IOMMU in runtime. Regards, Cho KyongHo.