Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2019 11:33:11 +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-12@freebsd.org
Subject:   svn commit: r345940 - stable/12/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201904051133.x35BXBql013466@repo.freebsd.org>

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

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/12/sys/compat/linuxkpi/common/include/linux/scatterlist.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/include/linux/scatterlist.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/scatterlist.h	Fri Apr  5 11:32:57 2019	(r345939)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/scatterlist.h	Fri Apr  5 11:33:11 2019	(r345940)
@@ -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?201904051133.x35BXBql013466>