Date: Wed, 13 Mar 2019 19:31:34 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345109 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201903131931.x2DJVYlY012135@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Mar 13 19:31:33 2019 New Revision: 345109 URL: https://svnweb.freebsd.org/changeset/base/345109 Log: Implement sg_virt() function in the LinuxKPI. Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Modified: head/sys/compat/linuxkpi/common/include/linux/scatterlist.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Mar 13 19:30:40 2019 (r345108) +++ head/sys/compat/linuxkpi/common/include/linux/scatterlist.h Wed Mar 13 19:31:33 2019 (r345109) @@ -137,6 +137,13 @@ sg_phys(struct scatterlist *sg) return (VM_PAGE_TO_PHYS(sg_page(sg)) + sg->offset); } +static inline void * +sg_virt(struct scatterlist *sg) +{ + + return ((void *)((unsigned long)page_address(sg_page(sg)) + sg->offset)); +} + static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903131931.x2DJVYlY012135>