Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2019 11:32:57 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r345939 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201904051132.x35BWv4d013385@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Apr  5 11:32:57 2019
New Revision: 345939
URL: https://svnweb.freebsd.org/changeset/base/345939

Log:
  MFC r345109:
  Implement sg_virt() function in the LinuxKPI.
  
  Submitted by:		Johannes Lundberg <johalun0@gmail.com>
  Sponsored by:		Limelight Networks
  Sponsored by:		Mellanox Technologies

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h	Fri Apr  5 11:31:52 2019	(r345938)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/scatterlist.h	Fri Apr  5 11:32:57 2019	(r345939)
@@ -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?201904051132.x35BWv4d013385>