* Re: [RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1464881987-13203-3-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-06-03 7:17 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXWMf7Dt77wSUj8NytQqb99jzDiAz46kJkAEz+6BX3Uvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2016-06-03 7:17 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linux MIPS Mailing List, Aurelien Jacquiot,
Benjamin Herrenschmidt, Will Deacon, DRI Development,
Paul Mackerras,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Michael Ellerman, Linux-sh list, James E.J. Bottomley,
Christoph Hellwig, Catalin Marinas,
xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, Matt Turner,
uclinux-h8-devel-5NWGOfrQmneRv+LV9MX5uooqe+aC9MnS, James Hogan,
adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Thomas Gleixner,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Krzysztof,
On Thu, Jun 2, 2016 at 5:39 PM, Krzysztof Kozlowski
<k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> --- a/include/linux/dma-mapping.h
> +++ b/include/linux/dma-mapping.h
> @@ -5,13 +5,25 @@
> +/**
> + * List of possible attributes associated with a DMA mapping. The semantics
> + * of each attribute should be defined in Documentation/DMA-attributes.txt.
> + */
> +#define DMA_ATTR_WRITE_BARRIER (1UL << 1)
Any particular reason they start at 2, not 1?
> +#define DMA_ATTR_WEAK_ORDERING (1UL << 2)
> +#define DMA_ATTR_WRITE_COMBINE (1UL << 3)
> +#define DMA_ATTR_NON_CONSISTENT (1UL << 4)
> +#define DMA_ATTR_NO_KERNEL_MAPPING (1UL << 5)
> +#define DMA_ATTR_SKIP_CPU_SYNC (1UL << 6)
> +#define DMA_ATTR_FORCE_CONTIGUOUS (1UL << 7)
> +#define DMA_ATTR_ALLOC_SINGLE_PAGES (1UL << 8)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v3 29/45] m68k: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1464881987-13203-30-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2016-06-03 7:18 ` Geert Uytterhoeven
0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2016-06-03 7:18 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linux MIPS Mailing List, Aurelien Jacquiot,
Benjamin Herrenschmidt, Will Deacon, DRI Development,
Paul Mackerras,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Michael Ellerman, Linux-sh list, James E.J. Bottomley,
Christoph Hellwig, Catalin Marinas,
xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, Matt Turner,
uclinux-h8-devel-5NWGOfrQmneRv+LV9MX5uooqe+aC9MnS, James Hogan,
adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Thomas Gleixner,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Thu, Jun 2, 2016 at 5:39 PM, Krzysztof Kozlowski
<k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> Split out subsystem specific changes for easier reviews. This will be
> squashed with main commit.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Looks good.
Acked-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs
[not found] ` <CAMuHMdXWMf7Dt77wSUj8NytQqb99jzDiAz46kJkAEz+6BX3Uvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-06-03 7:50 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2016-06-03 7:50 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux MIPS Mailing List, Aurelien Jacquiot,
Benjamin Herrenschmidt, Will Deacon, DRI Development,
Paul Mackerras,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Michael Ellerman, Linux-sh list, James E.J. Bottomley,
Christoph Hellwig, Catalin Marinas,
xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, Matt Turner,
uclinux-h8-devel-5NWGOfrQmneRv+LV9MX5uooqe+aC9MnS, James Hogan,
adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Thomas Gleixner,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 06/03/2016 09:17 AM, Geert Uytterhoeven wrote:
> Hi Krzysztof,
>
> On Thu, Jun 2, 2016 at 5:39 PM, Krzysztof Kozlowski
> <k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
>> --- a/include/linux/dma-mapping.h
>> +++ b/include/linux/dma-mapping.h
>> @@ -5,13 +5,25 @@
>
>> +/**
>> + * List of possible attributes associated with a DMA mapping. The semantics
>> + * of each attribute should be defined in Documentation/DMA-attributes.txt.
>> + */
>> +#define DMA_ATTR_WRITE_BARRIER (1UL << 1)
>
> Any particular reason they start at 2, not 1?
No reason. I'll fix this in next version (and trim Cc-list). Anyway the
values of constants won't match old ones but that should not be problem
(unless they are hard-coded somewhere).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v3 10/45] cris: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1464881987-13203-11-git-send-email-k.kozlowski@samsung.com>
@ 2016-06-03 7:52 ` Jesper Nilsson
0 siblings, 0 replies; 6+ messages in thread
From: Jesper Nilsson @ 2016-06-03 7:52 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Henderson, Ivan Kokshaysky, Matt Turner, Vineet Gupta,
Russell King, Stefano Stabellini, Catalin Marinas, Will Deacon,
Haavard Skinnemoen, Hans-Christian Egtvedt, Steven Miao,
Mark Salter, Aurelien Jacquiot, Mikael Starvik, Jesper Nilsson,
Yoshinori Sato, Richard Kuo, Tony Luck, Fenghua Yu, Konrad
On Thu, Jun 02, 2016 at 05:39:12PM +0200, Krzysztof Kozlowski wrote:
> Split out subsystem specific changes for easier reviews. This will be
> squashed with main commit.
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v3 07/45] avr32: dma-mapping: Use unsigned long for dma_attrs
[not found] ` <1464881987-13203-8-git-send-email-k.kozlowski@samsung.com>
@ 2016-06-06 6:43 ` Hans-Christian Noren Egtvedt
0 siblings, 0 replies; 6+ messages in thread
From: Hans-Christian Noren Egtvedt @ 2016-06-06 6:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Henderson, Ivan Kokshaysky, Matt Turner, Vineet Gupta,
Russell King, Stefano Stabellini, Catalin Marinas, Will Deacon,
Haavard Skinnemoen, Steven Miao, Mark Salter, Aurelien Jacquiot,
Mikael Starvik, Jesper Nilsson, Yoshinori Sato, Richard Kuo,
Tony Luck, Fenghua Yu, Konrad Rzeszutek Wilk, Geert
Around Thu 02 Jun 2016 17:39:09 +0200 or thereabout, Krzysztof Kozlowski wrote:
> Split out subsystem specific changes for easier reviews. This will be
> squashed with main commit.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
> ---
> arch/avr32/mm/dma-coherent.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c
> index 92cf1fb2b3e6..fc51f4421933 100644
> --- a/arch/avr32/mm/dma-coherent.c
> +++ b/arch/avr32/mm/dma-coherent.c
> @@ -99,7 +99,7 @@ static void __dma_free(struct device *dev, size_t size,
> }
>
> static void *avr32_dma_alloc(struct device *dev, size_t size,
> - dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs)
> + dma_addr_t *handle, gfp_t gfp, unsigned long attrs)
> {
> struct page *page;
> dma_addr_t phys;
> @@ -119,7 +119,7 @@ static void *avr32_dma_alloc(struct device *dev, size_t size,
> }
>
> static void avr32_dma_free(struct device *dev, size_t size,
> - void *cpu_addr, dma_addr_t handle, struct dma_attrs *attrs)
> + void *cpu_addr, dma_addr_t handle, unsigned long attrs)
> {
> struct page *page;
>
> @@ -142,7 +142,7 @@ static void avr32_dma_free(struct device *dev, size_t size,
>
> static dma_addr_t avr32_dma_map_page(struct device *dev, struct page *page,
> unsigned long offset, size_t size,
> - enum dma_data_direction direction, struct dma_attrs *attrs)
> + enum dma_data_direction direction, unsigned long attrs)
> {
> void *cpu_addr = page_address(page) + offset;
>
> @@ -152,7 +152,7 @@ static dma_addr_t avr32_dma_map_page(struct device *dev, struct page *page,
>
> static int avr32_dma_map_sg(struct device *dev, struct scatterlist *sglist,
> int nents, enum dma_data_direction direction,
> - struct dma_attrs *attrs)
> + unsigned long attrs)
> {
> int i;
> struct scatterlist *sg;
--
mvh
Hans-Christian Noren Egtvedt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v3 44/45] dma-mapping: Remove dma_get_attr
[not found] ` <1464881987-13203-45-git-send-email-k.kozlowski@samsung.com>
@ 2016-06-06 6:45 ` Hans-Christian Noren Egtvedt
0 siblings, 0 replies; 6+ messages in thread
From: Hans-Christian Noren Egtvedt @ 2016-06-06 6:45 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Henderson, Ivan Kokshaysky, Matt Turner, Vineet Gupta,
Russell King, Stefano Stabellini, Catalin Marinas, Will Deacon,
Haavard Skinnemoen, Steven Miao, Mark Salter, Aurelien Jacquiot,
Mikael Starvik, Jesper Nilsson, Yoshinori Sato, Richard Kuo,
Tony Luck, Fenghua Yu, Konrad Rzeszutek Wilk, Geert
Around Thu 02 Jun 2016 17:39:46 +0200 or thereabout, Krzysztof Kozlowski wrote:
> After switching DMA attributes to unsigned long it is easier to just
> compare the bits.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
> Documentation/DMA-API.txt | 4 +--
> arch/arc/mm/dma.c | 4 +--
> arch/arm/mm/dma-mapping.c | 36 ++++++++++++--------------
> arch/arm/xen/mm.c | 4 +--
> arch/arm64/mm/dma-mapping.c | 10 +++----
> arch/avr32/mm/dma-coherent.c | 4 +--
For the AVR32 related change
Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
> arch/ia64/sn/pci/pci_dma.c | 10 ++-----
> arch/metag/kernel/dma.c | 2 +-
> arch/mips/mm/dma-default.c | 6 ++---
> arch/openrisc/kernel/dma.c | 4 +--
> arch/parisc/kernel/pci-dma.c | 2 +-
> arch/powerpc/platforms/cell/iommu.c | 10 +++----
> drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +-
> drivers/iommu/dma-iommu.c | 2 +-
> drivers/media/v4l2-core/videobuf2-dma-contig.c | 2 +-
> include/linux/dma-mapping.h | 13 ----------
> 16 files changed, 46 insertions(+), 69 deletions(-)
<snipp non-AVR32>
> diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c
> index fc51f4421933..58610d0df7ed 100644
> --- a/arch/avr32/mm/dma-coherent.c
> +++ b/arch/avr32/mm/dma-coherent.c
> @@ -109,7 +109,7 @@ static void *avr32_dma_alloc(struct device *dev, size_t size,
> return NULL;
> phys = page_to_phys(page);
>
> - if (dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) {
> + if (attrs & DMA_ATTR_WRITE_COMBINE) {
> /* Now, map the page into P3 with write-combining turned on */
> *handle = phys;
> return __ioremap(phys, size, _PAGE_BUFFER);
> @@ -123,7 +123,7 @@ static void avr32_dma_free(struct device *dev, size_t size,
> {
> struct page *page;
>
> - if (dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs)) {
> + if (attrs & DMA_ATTR_WRITE_COMBINE) {
> iounmap(cpu_addr);
>
> page = phys_to_page(handle);
<snipp non-AVR32>
--
mvh
Hans-Christian Noren Egtvedt
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-06 6:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1464881987-13203-1-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1464881987-13203-3-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1464881987-13203-3-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-06-03 7:17 ` [RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs Geert Uytterhoeven
[not found] ` <CAMuHMdXWMf7Dt77wSUj8NytQqb99jzDiAz46kJkAEz+6BX3Uvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-03 7:50 ` Krzysztof Kozlowski
[not found] ` <1464881987-13203-30-git-send-email-k.kozlowski@samsung.com>
[not found] ` <1464881987-13203-30-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-06-03 7:18 ` [RFC v3 29/45] m68k: " Geert Uytterhoeven
[not found] ` <1464881987-13203-11-git-send-email-k.kozlowski@samsung.com>
2016-06-03 7:52 ` [RFC v3 10/45] cris: " Jesper Nilsson
[not found] ` <1464881987-13203-8-git-send-email-k.kozlowski@samsung.com>
2016-06-06 6:43 ` [RFC v3 07/45] avr32: " Hans-Christian Noren Egtvedt
[not found] ` <1464881987-13203-45-git-send-email-k.kozlowski@samsung.com>
2016-06-06 6:45 ` [RFC v3 44/45] dma-mapping: Remove dma_get_attr Hans-Christian Noren Egtvedt
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).