misc: mic: SCIF remote memory map/unmap interface
authorSudeep Dutt <sudeep.dutt@intel.com>
Wed, 30 Sep 2015 01:15:55 +0000 (18:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 11:54:54 +0000 (12:54 +0100)
commitf1a2d865e78d00a4b6d364a8e341b6ebe4f10228
tree15f7765db8a71d53251d9619f2ee0cb3e2840959
parent168ef015ca053e34c1d66c61c3c3f2cbaadbb20a
misc: mic: SCIF remote memory map/unmap interface

This patch implements the SCIF mmap/munmap interface. A similar
capability is provided to kernel clients via the
scif_get_pages()/scif_put_pages() APIs. The SCIF mmap interface
queries to check if a window is valid and then remaps the local
virtual address to the remote physical pages. These mappings are
subsequently destroyed upon receipt of the VMA close operation or
scif_get_pages().  This functionality allows SCIF users to directly
access remote memory without any driver interaction once the mappings
are created thereby providing bare-metal PCIe latency. These mappings
are zapped to avoid RMA accesses from user space, if a Coprocessor is
reset.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mic/scif/scif_mmap.c [new file with mode: 0644]