summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-08-06 17:07:21 +0000
committerjhb <jhb@FreeBSD.org>2015-08-06 17:07:21 +0000
commit47d8edd4b121329407d2a2fed5d81c6c5cdc4adc (patch)
treeaf8467699e9788d5a32ed66163b3044f9801685a /sys/dev/xen
parent3fab33edd0332263171c2527b0e575cb6e6850c5 (diff)
downloadFreeBSD-src-47d8edd4b121329407d2a2fed5d81c6c5cdc4adc.zip
FreeBSD-src-47d8edd4b121329407d2a2fed5d81c6c5cdc4adc.tar.gz
Remove some more vestiges of the Xen PV domu support. Specifically,
use vtophys() directly instead of vtomach() and retire the no-longer-used headers <machine/xenfunc.h> and <machine/xenvar.h>. Reported by: bde (stale bits in <machine/xenfunc.h>) Reviewed by: royger (earlier version) Differential Revision: https://reviews.freebsd.org/D3266
Diffstat (limited to 'sys/dev/xen')
-rw-r--r--sys/dev/xen/balloon/balloon.c2
-rw-r--r--sys/dev/xen/blkfront/blkfront.c5
-rw-r--r--sys/dev/xen/control/control.c3
-rw-r--r--sys/dev/xen/netback/netback.c4
-rw-r--r--sys/dev/xen/netfront/netfront.c6
-rw-r--r--sys/dev/xen/pcifront/pcifront.c2
6 files changed, 6 insertions, 16 deletions
diff --git a/sys/dev/xen/balloon/balloon.c b/sys/dev/xen/balloon/balloon.c
index a6036d8..773644f 100644
--- a/sys/dev/xen/balloon/balloon.c
+++ b/sys/dev/xen/balloon/balloon.c
@@ -49,8 +49,6 @@ __FBSDID("$FreeBSD$");
#include <xen/features.h>
#include <xen/xenstore/xenstorevar.h>
-#include <machine/xen/xenvar.h>
-
static MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver");
/* Convert from KB (as fetched from xenstore) to number of PAGES */
diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c
index 312a077..5ff9d38 100644
--- a/sys/dev/xen/blkfront/blkfront.c
+++ b/sys/dev/xen/blkfront/blkfront.c
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <xen/xenbus/xenbusvar.h>
#include <machine/_inttypes.h>
-#include <machine/xen/xenvar.h>
#include <geom/geom_disk.h>
@@ -762,7 +761,7 @@ xbd_alloc_ring(struct xbd_softc *sc)
i++, sring_page_addr += PAGE_SIZE) {
error = xenbus_grant_ring(sc->xbd_dev,
- (vtomach(sring_page_addr) >> PAGE_SHIFT),
+ (vtophys(sring_page_addr) >> PAGE_SHIFT),
&sc->xbd_ring_ref[i]);
if (error) {
xenbus_dev_fatal(sc->xbd_dev, error,
@@ -1305,7 +1304,7 @@ xbd_connect(struct xbd_softc *sc)
for (j = 0; j < sc->xbd_max_request_indirectpages; j++) {
if (gnttab_grant_foreign_access(
xenbus_get_otherend_id(sc->xbd_dev),
- (vtomach(indirectpages) >> PAGE_SHIFT) + j,
+ (vtophys(indirectpages) >> PAGE_SHIFT) + j,
1 /* grant read-only access */,
&cm->cm_indirectionrefs[j]))
break;
diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c
index 2a0d459..219a395 100644
--- a/sys/dev/xen/control/control.c
+++ b/sys/dev/xen/control/control.c
@@ -145,9 +145,6 @@ __FBSDID("$FreeBSD$");
#include <xen/xenbus/xenbusvar.h>
-#include <machine/xen/xenvar.h>
-#include <machine/xen/xenfunc.h>
-
/*--------------------------- Forward Declarations --------------------------*/
/** Function signature for shutdown event handlers. */
typedef void (xctrl_shutdown_handler_t)(void);
diff --git a/sys/dev/xen/netback/netback.c b/sys/dev/xen/netback/netback.c
index 2233084..c58b324 100644
--- a/sys/dev/xen/netback/netback.c
+++ b/sys/dev/xen/netback/netback.c
@@ -87,8 +87,6 @@ __FBSDID("$FreeBSD$");
#include <xen/interface/io/netif.h>
#include <xen/xenbus/xenbusvar.h>
-#include <machine/xen/xenvar.h>
-
/*--------------------------- Compile-time Tunables --------------------------*/
/*---------------------------------- Macros ----------------------------------*/
@@ -132,7 +130,7 @@ static MALLOC_DEFINE(M_XENNETBACK, "xnb", "Xen Net Back Driver Data");
req < rsp ? req : rsp; \
})
-#define virt_to_mfn(x) (vtomach(x) >> PAGE_SHIFT)
+#define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT)
#define virt_to_offset(x) ((x) & (PAGE_SIZE - 1))
/**
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index 3eac25d..2f972b8 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -86,8 +86,6 @@ __FBSDID("$FreeBSD$");
#include <xen/interface/io/netif.h>
#include <xen/xenbus/xenbusvar.h>
-#include <machine/xen/xenvar.h>
-
#include "xenbus_if.h"
/* Features supported by all backends. TSO and LRO can be negotiated */
@@ -190,7 +188,7 @@ static int xennet_get_responses(struct netfront_info *np,
struct netfront_rx_info *rinfo, RING_IDX rp, RING_IDX *cons,
struct mbuf **list, int *pages_flipped_p);
-#define virt_to_mfn(x) (vtomach(x) >> PAGE_SHIFT)
+#define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT)
#define INVALID_P2M_ENTRY (~0UL)
@@ -901,7 +899,7 @@ refill:
req->gref = ref;
sc->rx_pfn_array[i] =
- vtomach(mtod(m_new,vm_offset_t)) >> PAGE_SHIFT;
+ vtophys(mtod(m_new,vm_offset_t)) >> PAGE_SHIFT;
}
KASSERT(i, ("no mbufs processed")); /* should have returned earlier */
diff --git a/sys/dev/xen/pcifront/pcifront.c b/sys/dev/xen/pcifront/pcifront.c
index 1613e0a..1730bf8 100644
--- a/sys/dev/xen/pcifront/pcifront.c
+++ b/sys/dev/xen/pcifront/pcifront.c
@@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$");
#define INVALID_GRANT_REF (0)
#define INVALID_EVTCHN (-1)
-#define virt_to_mfn(x) (vtomach(x) >> PAGE_SHIFT)
+#define virt_to_mfn(x) (vtophys(x) >> PAGE_SHIFT)
struct pcifront_device {
STAILQ_ENTRY(pcifront_device) next;
OpenPOWER on IntegriCloud