[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [RFC v3 15/45] drm/nouveau: dma-mapping: Use unsigned long for dma_attrs
- To: Richard Henderson <rth@xxxxxxxxxxx>, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will.deacon@xxxxxxx>, Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>, Hans-Christian Egtvedt <egtvedt@xxxxxxxxxxxx>, Steven Miao <realmz6@xxxxxxxxx>, Mark Salter <msalter@xxxxxxxxxx>, Aurelien Jacquiot <a-jacquiot@xxxxxx>, Mikael Starvik <starvik@xxxxxxxx>, Jesper Nilsson <jesper.nilsson@xxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Richard Kuo <rkuo@xxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, James Hogan <james.hogan@xxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Ley Foon Tan <lftan@xxxxxxxxxx>, Jonas Bonn <jonas@xxxxxxxxxxxx>, "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Olof Johansson <olof@xxxxxxxxx>, Geoff Levand <geoff@xxxxxxxxxxxxx>, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, x86@xxxxxxxxxx, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, David Vrabel <david.vrabel@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Muli Ben-Yehuda <muli@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, adi-buildroot-devel@xxxxxxxxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx, uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxxxxxxx, linux-metag@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linux-am33-list@xxxxxxxxxx, nios2-dev@xxxxxxxxxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, discuss@xxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx, linux-mediatek@xxxxxxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, freedreno@xxxxxxxxxxxxxxxxxxxxx, nouveau@xxxxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, linux-omap@xxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx
- From: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
- Date: Thu, 02 Jun 2016 17:39:17 +0200
- Cc: hch@xxxxxxxxxxxxx, Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>, Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
- Delivery-date: Thu, 02 Jun 2016 15:41:15 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
---
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index 6b8f2a19b2d9..a6a7fa0d7679 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -109,7 +109,7 @@ struct gk20a_instmem {
u16 iommu_bit;
/* Only used by DMA API */
- struct dma_attrs attrs;
+ unsigned long attrs;
};
#define gk20a_instmem(p) container_of((p), struct gk20a_instmem, base)
@@ -293,7 +293,7 @@ gk20a_instobj_dtor_dma(struct nvkm_memory *memory)
goto out;
dma_free_attrs(dev, node->base.mem.size << PAGE_SHIFT, node->base.vaddr,
- node->handle, &imem->attrs);
+ node->handle, imem->attrs);
out:
return node;
@@ -386,7 +386,7 @@ gk20a_instobj_ctor_dma(struct gk20a_instmem *imem, u32
npages, u32 align,
node->base.vaddr = dma_alloc_attrs(dev, npages << PAGE_SHIFT,
&node->handle, GFP_KERNEL,
- &imem->attrs);
+ imem->attrs);
if (!node->base.vaddr) {
nvkm_error(subdev, "cannot allocate DMA memory\n");
return -ENOMEM;
@@ -597,10 +597,9 @@ gk20a_instmem_new(struct nvkm_device *device, int index,
nvkm_info(&imem->base.subdev, "using IOMMU\n");
} else {
- init_dma_attrs(&imem->attrs);
- dma_set_attr(DMA_ATTR_NON_CONSISTENT, &imem->attrs);
- dma_set_attr(DMA_ATTR_WEAK_ORDERING, &imem->attrs);
- dma_set_attr(DMA_ATTR_WRITE_COMBINE, &imem->attrs);
+ imem->attrs = DMA_ATTR_NON_CONSISTENT |
+ DMA_ATTR_WEAK_ORDERING |
+ DMA_ATTR_WRITE_COMBINE;
nvkm_info(&imem->base.subdev, "using DMA API\n");
}
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|