From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/7] common: dma-mapping: change alloc/free_coherent method to more generic alloc/free_attrs
Date: Mon, 5 Sep 2011 12:43:52 +0200 [thread overview]
Message-ID: <20110905104352.GD5203@8bytes.org> (raw)
In-Reply-To: <1314971599-14428-7-git-send-email-m.szyprowski@samsung.com>
On Fri, Sep 02, 2011 at 03:53:18PM +0200, Marek Szyprowski wrote:
> struct dma_map_ops {
> - void* (*alloc_coherent)(struct device *dev, size_t size,
> - dma_addr_t *dma_handle, gfp_t gfp);
> - void (*free_coherent)(struct device *dev, size_t size,
> - void *vaddr, dma_addr_t dma_handle);
> + void* (*alloc)(struct device *dev, size_t size,
> + dma_addr_t *dma_handle, gfp_t gfp,
> + struct dma_attrs *attrs);
> + void (*free)(struct device *dev, size_t size,
> + void *vaddr, dma_addr_t dma_handle,
> + struct dma_attrs *attrs);
> + int (*mmap)(struct device *, struct vm_area_struct *,
> + void *, dma_addr_t, size_t, struct dma_attrs *attrs);
> +
> dma_addr_t (*map_page)(struct device *dev, struct page *page,
> unsigned long offset, size_t size,
> enum dma_data_direction dir,
> --
> 1.7.1.569.g6f426
This needs conversion of all drivers implementing dma_map_ops or you
will break a lot of architectures. A better approach is to keep
*_coherent and implement alloc/free/mmap side-by-side until all drivers
are converted.
Also I miss some documentation about the new call-backs.
Joerg
next prev parent reply other threads:[~2011-09-05 10:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 13:53 [PATCH/RFC 0/8 v2] ARM: DMA-mapping framework redesign Marek Szyprowski
2011-09-02 13:53 ` [PATCH 1/7] ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops Marek Szyprowski
2011-09-02 13:53 ` [PATCH 2/7] ARM: dma-mapping: use asm-generic/dma-mapping-common.h Marek Szyprowski
2011-09-02 13:53 ` [PATCH 3/7] ARM: dma-mapping: implement dma sg methods on top of any generic dma ops Marek Szyprowski
2011-09-02 13:53 ` [PATCH 4/7] ARM: dma-mapping: move all dma bounce code to separate dma ops structure Marek Szyprowski
2011-09-02 13:53 ` [PATCH 5/7] ARM: dma-mapping: remove redundant code and cleanup Marek Szyprowski
2011-09-02 13:53 ` [PATCH 6/7] common: dma-mapping: change alloc/free_coherent method to more generic alloc/free_attrs Marek Szyprowski
2011-09-05 10:43 ` Joerg Roedel [this message]
2011-09-22 14:00 ` Marek Szyprowski
2011-09-02 13:53 ` [PATCH 7/7] ARM: dma-mapping: use alloc, mmap, free from dma_ops Marek Szyprowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110905104352.GD5203@8bytes.org \
--to=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).