From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH 03/14 v2] MIPS: adapt for dma_map_ops changes Date: Mon, 13 Feb 2012 14:41:37 +0400 Message-ID: <4F38E8E1.3070004@mvista.com> References: <1324643253-3024-4-git-send-email-m.szyprowski@samsung.com> <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-sh-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Thomas Gleixner , Andrew Morton , Arnd Bergmann , Stephen Rothwell , FUJITA Tomonori , microblaze-uclinux@itee.uq.edu.au, linux-arch@vger.kernel.org, x86@kernel.org, linux-sh@vger.kernel.org, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mips@linux-mips.org, discuss@x86-64.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, Jonathan Corbet , Kyungmin Park , Andrzej Pietrasiewicz Hello. On 13-02-2012 14:35, Marek Szyprowski wrote: > From: Andrzej Pietrasiewicz > Adapt core MIPS architecture code for dma_map_ops changes: replace > alloc/free_coherent with generic alloc/free methods. > Signed-off-by: Andrzej Pietrasiewicz > [added missing changes to arch/mips/cavium-octeon/dma-octeon.c] > Signed-off-by: Marek Szyprowski > Signed-off-by: Kyungmin Park [...] > diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h > index 7aa37dd..cbd41f5 100644 > --- a/arch/mips/include/asm/dma-mapping.h > +++ b/arch/mips/include/asm/dma-mapping.h > @@ -57,25 +57,31 @@ dma_set_mask(struct device *dev, u64 mask) > extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, > enum dma_data_direction direction); > > -static inline void *dma_alloc_coherent(struct device *dev, size_t size, > - dma_addr_t *dma_handle, gfp_t gfp) > +#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) > + > +static inline void *dma_alloc_attrs(struct device *dev, size_t size, > + dma_addr_t *dma_handle, gfp_t gfp, > + struct dma_attrs *attrs) > { > void *ret; > struct dma_map_ops *ops = get_dma_ops(dev); > > - ret = ops->alloc_coherent(dev, size, dma_handle, gfp); > + ret = ops->alloc(dev, size, dma_handle, gfp, NULL); Not 'attrs' instead of NULL? > > debug_dma_alloc_coherent(dev, size, *dma_handle, ret); > > return ret; > } > > -static inline void dma_free_coherent(struct device *dev, size_t size, > - void *vaddr, dma_addr_t dma_handle) > +#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) > + > +static inline void dma_free_attrs(struct device *dev, size_t size, > + void *vaddr, dma_addr_t dma_handle, > + struct dma_attrs *attrs) > { > struct dma_map_ops *ops = get_dma_ops(dev); > > - ops->free_coherent(dev, size, vaddr, dma_handle); > + ops->free(dev, size, vaddr, dma_handle, NULL); Same here... WBR, Sergei From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Date: Mon, 13 Feb 2012 10:41:37 +0000 Subject: Re: [PATCH 03/14 v2] MIPS: adapt for dma_map_ops changes Message-Id: <4F38E8E1.3070004@mvista.com> List-Id: References: <1324643253-3024-4-git-send-email-m.szyprowski@samsung.com> <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> In-Reply-To: <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Thomas Gleixner , Andrew Morton , Arnd Bergmann , Stephen Rothwell , FUJITA Tomonori , microblaze-uclinux@itee.uq.edu.au, linux-arch@vger.kernel.org, x86@kernel.org, linux-sh@vger.kernel.org, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mips@linux-mips.org, discuss@x86-64.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, Jonathan Corbet , Kyungmin Park , Andrzej Pietrasiewicz Hello. On 13-02-2012 14:35, Marek Szyprowski wrote: > From: Andrzej Pietrasiewicz > Adapt core MIPS architecture code for dma_map_ops changes: replace > alloc/free_coherent with generic alloc/free methods. > Signed-off-by: Andrzej Pietrasiewicz > [added missing changes to arch/mips/cavium-octeon/dma-octeon.c] > Signed-off-by: Marek Szyprowski > Signed-off-by: Kyungmin Park [...] > diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h > index 7aa37dd..cbd41f5 100644 > --- a/arch/mips/include/asm/dma-mapping.h > +++ b/arch/mips/include/asm/dma-mapping.h > @@ -57,25 +57,31 @@ dma_set_mask(struct device *dev, u64 mask) > extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, > enum dma_data_direction direction); > > -static inline void *dma_alloc_coherent(struct device *dev, size_t size, > - dma_addr_t *dma_handle, gfp_t gfp) > +#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) > + > +static inline void *dma_alloc_attrs(struct device *dev, size_t size, > + dma_addr_t *dma_handle, gfp_t gfp, > + struct dma_attrs *attrs) > { > void *ret; > struct dma_map_ops *ops = get_dma_ops(dev); > > - ret = ops->alloc_coherent(dev, size, dma_handle, gfp); > + ret = ops->alloc(dev, size, dma_handle, gfp, NULL); Not 'attrs' instead of NULL? > > debug_dma_alloc_coherent(dev, size, *dma_handle, ret); > > return ret; > } > > -static inline void dma_free_coherent(struct device *dev, size_t size, > - void *vaddr, dma_addr_t dma_handle) > +#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) > + > +static inline void dma_free_attrs(struct device *dev, size_t size, > + void *vaddr, dma_addr_t dma_handle, > + struct dma_attrs *attrs) > { > struct dma_map_ops *ops = get_dma_ops(dev); > > - ops->free_coherent(dev, size, vaddr, dma_handle); > + ops->free(dev, size, vaddr, dma_handle, NULL); Same here... WBR, Sergei From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com [209.85.214.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 8602FB6F9D for ; Mon, 13 Feb 2012 21:43:02 +1100 (EST) Received: by bkcjc3 with SMTP id jc3so4048782bkc.38 for ; Mon, 13 Feb 2012 02:42:55 -0800 (PST) Message-ID: <4F38E8E1.3070004@mvista.com> Date: Mon, 13 Feb 2012 14:41:37 +0400 From: Sergei Shtylyov MIME-Version: 1.0 To: Marek Szyprowski Subject: Re: [PATCH 03/14 v2] MIPS: adapt for dma_map_ops changes References: <1324643253-3024-4-git-send-email-m.szyprowski@samsung.com> <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> In-Reply-To: <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, linux-mm@kvack.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, Stephen Rothwell , Jonathan Corbet , x86@kernel.org, Arnd Bergmann , microblaze-uclinux@itee.uq.edu.au, linaro-mm-sig@lists.linaro.org, Andrzej Pietrasiewicz , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, discuss@x86-64.org, linux-kernel@vger.kernel.org, FUJITA Tomonori , Kyungmin Park , linux-alpha@vger.kernel.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hello. On 13-02-2012 14:35, Marek Szyprowski wrote: > From: Andrzej Pietrasiewicz > Adapt core MIPS architecture code for dma_map_ops changes: replace > alloc/free_coherent with generic alloc/free methods. > Signed-off-by: Andrzej Pietrasiewicz > [added missing changes to arch/mips/cavium-octeon/dma-octeon.c] > Signed-off-by: Marek Szyprowski > Signed-off-by: Kyungmin Park [...] > diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h > index 7aa37dd..cbd41f5 100644 > --- a/arch/mips/include/asm/dma-mapping.h > +++ b/arch/mips/include/asm/dma-mapping.h > @@ -57,25 +57,31 @@ dma_set_mask(struct device *dev, u64 mask) > extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, > enum dma_data_direction direction); > > -static inline void *dma_alloc_coherent(struct device *dev, size_t size, > - dma_addr_t *dma_handle, gfp_t gfp) > +#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) > + > +static inline void *dma_alloc_attrs(struct device *dev, size_t size, > + dma_addr_t *dma_handle, gfp_t gfp, > + struct dma_attrs *attrs) > { > void *ret; > struct dma_map_ops *ops = get_dma_ops(dev); > > - ret = ops->alloc_coherent(dev, size, dma_handle, gfp); > + ret = ops->alloc(dev, size, dma_handle, gfp, NULL); Not 'attrs' instead of NULL? > > debug_dma_alloc_coherent(dev, size, *dma_handle, ret); > > return ret; > } > > -static inline void dma_free_coherent(struct device *dev, size_t size, > - void *vaddr, dma_addr_t dma_handle) > +#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) > + > +static inline void dma_free_attrs(struct device *dev, size_t size, > + void *vaddr, dma_addr_t dma_handle, > + struct dma_attrs *attrs) > { > struct dma_map_ops *ops = get_dma_ops(dev); > > - ops->free_coherent(dev, size, vaddr, dma_handle); > + ops->free(dev, size, vaddr, dma_handle, NULL); Same here... WBR, Sergei From mboxrd@z Thu Jan 1 00:00:00 1970 From: sshtylyov@mvista.com (Sergei Shtylyov) Date: Mon, 13 Feb 2012 14:41:37 +0400 Subject: [PATCH 03/14 v2] MIPS: adapt for dma_map_ops changes In-Reply-To: <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> References: <1324643253-3024-4-git-send-email-m.szyprowski@samsung.com> <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> Message-ID: <4F38E8E1.3070004@mvista.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello. On 13-02-2012 14:35, Marek Szyprowski wrote: > From: Andrzej Pietrasiewicz > Adapt core MIPS architecture code for dma_map_ops changes: replace > alloc/free_coherent with generic alloc/free methods. > Signed-off-by: Andrzej Pietrasiewicz > [added missing changes to arch/mips/cavium-octeon/dma-octeon.c] > Signed-off-by: Marek Szyprowski > Signed-off-by: Kyungmin Park [...] > diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h > index 7aa37dd..cbd41f5 100644 > --- a/arch/mips/include/asm/dma-mapping.h > +++ b/arch/mips/include/asm/dma-mapping.h > @@ -57,25 +57,31 @@ dma_set_mask(struct device *dev, u64 mask) > extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, > enum dma_data_direction direction); > > -static inline void *dma_alloc_coherent(struct device *dev, size_t size, > - dma_addr_t *dma_handle, gfp_t gfp) > +#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) > + > +static inline void *dma_alloc_attrs(struct device *dev, size_t size, > + dma_addr_t *dma_handle, gfp_t gfp, > + struct dma_attrs *attrs) > { > void *ret; > struct dma_map_ops *ops = get_dma_ops(dev); > > - ret = ops->alloc_coherent(dev, size, dma_handle, gfp); > + ret = ops->alloc(dev, size, dma_handle, gfp, NULL); Not 'attrs' instead of NULL? > > debug_dma_alloc_coherent(dev, size, *dma_handle, ret); > > return ret; > } > > -static inline void dma_free_coherent(struct device *dev, size_t size, > - void *vaddr, dma_addr_t dma_handle) > +#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) > + > +static inline void dma_free_attrs(struct device *dev, size_t size, > + void *vaddr, dma_addr_t dma_handle, > + struct dma_attrs *attrs) > { > struct dma_map_ops *ops = get_dma_ops(dev); > > - ops->free_coherent(dev, size, vaddr, dma_handle); > + ops->free(dev, size, vaddr, dma_handle, NULL); Same here... WBR, Sergei From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx203.postini.com [74.125.245.203]) by kanga.kvack.org (Postfix) with SMTP id A83D16B13F0 for ; Mon, 13 Feb 2012 05:42:57 -0500 (EST) Received: by bkty12 with SMTP id y12so5173624bkt.14 for ; Mon, 13 Feb 2012 02:42:55 -0800 (PST) Message-ID: <4F38E8E1.3070004@mvista.com> Date: Mon, 13 Feb 2012 14:41:37 +0400 From: Sergei Shtylyov MIME-Version: 1.0 Subject: Re: [PATCH 03/14 v2] MIPS: adapt for dma_map_ops changes References: <1324643253-3024-4-git-send-email-m.szyprowski@samsung.com> <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> In-Reply-To: <1329129329-25205-1-git-send-email-m.szyprowski@samsung.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Thomas Gleixner , Andrew Morton , Arnd Bergmann , Stephen Rothwell , FUJITA Tomonori , microblaze-uclinux@itee.uq.edu.au, linux-arch@vger.kernel.org, x86@kernel.org, linux-sh@vger.kernel.org, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mips@linux-mips.org, discuss@x86-64.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, Jonathan Corbet , Kyungmin Park , Andrzej Pietrasiewicz Hello. On 13-02-2012 14:35, Marek Szyprowski wrote: > From: Andrzej Pietrasiewicz > Adapt core MIPS architecture code for dma_map_ops changes: replace > alloc/free_coherent with generic alloc/free methods. > Signed-off-by: Andrzej Pietrasiewicz > [added missing changes to arch/mips/cavium-octeon/dma-octeon.c] > Signed-off-by: Marek Szyprowski > Signed-off-by: Kyungmin Park [...] > diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h > index 7aa37dd..cbd41f5 100644 > --- a/arch/mips/include/asm/dma-mapping.h > +++ b/arch/mips/include/asm/dma-mapping.h > @@ -57,25 +57,31 @@ dma_set_mask(struct device *dev, u64 mask) > extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, > enum dma_data_direction direction); > > -static inline void *dma_alloc_coherent(struct device *dev, size_t size, > - dma_addr_t *dma_handle, gfp_t gfp) > +#define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) > + > +static inline void *dma_alloc_attrs(struct device *dev, size_t size, > + dma_addr_t *dma_handle, gfp_t gfp, > + struct dma_attrs *attrs) > { > void *ret; > struct dma_map_ops *ops = get_dma_ops(dev); > > - ret = ops->alloc_coherent(dev, size, dma_handle, gfp); > + ret = ops->alloc(dev, size, dma_handle, gfp, NULL); Not 'attrs' instead of NULL? > > debug_dma_alloc_coherent(dev, size, *dma_handle, ret); > > return ret; > } > > -static inline void dma_free_coherent(struct device *dev, size_t size, > - void *vaddr, dma_addr_t dma_handle) > +#define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) > + > +static inline void dma_free_attrs(struct device *dev, size_t size, > + void *vaddr, dma_addr_t dma_handle, > + struct dma_attrs *attrs) > { > struct dma_map_ops *ops = get_dma_ops(dev); > > - ops->free_coherent(dev, size, vaddr, dma_handle); > + ops->free(dev, size, vaddr, dma_handle, NULL); Same here... WBR, Sergei -- 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