Thread (27 messages) 27 messages, 6 authors, 2017-01-12

Re: [PATCH 2/9] Move dma_ops from archdata into struct device

From: Greg Kroah-Hartman <hidden>
Date: 2017-01-11 06:46:07
Also in: linux-alpha, linux-iommu, linux-mips, linuxppc-dev

On Tue, Jan 10, 2017 at 04:56:41PM -0800, Bart Van Assche wrote:
Several RDMA drivers, e.g. drivers/infiniband/hw/qib, use the CPU to
transfer data between memory and PCIe adapter. Because of performance
reasons it is important that the CPU cache is not flushed when such
drivers transfer data. Make this possible by allowing these drivers to
override the dma_map_ops pointer. Additionally, introduce the function
set_dma_ops() that will be used by a later patch in this series.

Signed-off-by: Bart Van Assche <redacted>
Cc: Greg Kroah-Hartman <redacted>
Cc: Aurelien Jacquiot <redacted>
Cc: Catalin Marinas <redacted>
Cc: Chris Zankel <redacted>
Cc: David Howells <redacted>
Cc: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Fenghua Yu <redacted>
Cc: Geert Uytterhoeven <redacted>
Cc: Geoff Levand <redacted>
Cc: H. Peter Anvin <redacted>
Cc: Haavard Skinnemoen <redacted>
Cc: Hans-Christian Egtvedt <redacted>
Cc: Helge Deller <redacted>
Cc: Ingo Molnar <redacted>
Cc: James E.J. Bottomley <redacted>
Cc: Jesper Nilsson <redacted>
Cc: Joerg Roedel <redacted>
Cc: Jon Mason <redacted>
Cc: Jonas Bonn <redacted>
Cc: Ley Foon Tan <redacted>
Cc: Mark Salter <redacted>
Cc: Max Filippov <redacted>
Cc: Mikael Starvik <redacted>
Cc: Muli Ben-Yehuda <redacted>
Cc: Rich Felker <redacted>
Cc: Russell King <redacted>
Cc: Stafford Horne <redacted>
Cc: Stefan Kristiansson <redacted>
Cc: Thomas Gleixner <redacted>
Cc: Tony Luck <redacted>
Cc: Will Deacon <redacted>
Cc: x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: Yoshinori Sato <redacted>
Cc: adi-buildroot-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: linux-alpha-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-am33-list-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ@public.gmane.org
Cc: linux-cris-kernel-VrBV9hrLPhE@public.gmane.org
Cc: linux-hexagon-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-m68k-cunTk1MwBs8S/qaLPR03pWD2FQJk+8+b@public.gmane.org
Cc: linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org
Cc: linux-parisc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-xtensa-PjhNF2WwrV/0Sa2dR60CXw@public.gmane.org
Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: nios2-dev-g9ZBwUv/Ih/yUk5EbOjzuce+I+R0W71w@public.gmane.org
Cc: openrisc-cunTk1MwBs9a3B2Vnqf2dGD2FQJk+8+b@public.gmane.org
Cc: sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: uclinux-h8-devel-5NWGOfrQmneRv+LV9MX5uooqe+aC9MnS@public.gmane.org
That's a crazy cc: list, you should break this up into smaller pieces,
otherwise it's going to bounce...
quoted hunk ↗ jump to hunk
diff --git a/include/linux/device.h b/include/linux/device.h
index 491b4c0ca633..c7cb225d36b0 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -885,6 +885,8 @@ struct dev_links_info {
  * a higher-level representation of the device.
  */
 struct device {
+	const struct dma_map_ops *dma_ops; /* See also get_dma_ops() */
+
 	struct device		*parent;
 
 	struct device_private	*p;
Why not put this new pointer down with the other dma fields in this
structure?  Any specific reason it needs to be first?

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help