Page MenuHomeFreeBSD

D3266.id.diff
No OneTemporary

D3266.id.diff

Index: head/sys/amd64/include/xen/xenfunc.h
===================================================================
--- head/sys/amd64/include/xen/xenfunc.h
+++ head/sys/amd64/include/xen/xenfunc.h
@@ -1,73 +0,0 @@
-/*-
- * Copyright (c) 2004, 2005 Kip Macy
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _XEN_XENFUNC_H_
-#define _XEN_XENFUNC_H_
-
-#include <machine/xen/xenvar.h>
-
-#define BKPT __asm__("int3");
-#define XPQ_CALL_DEPTH 5
-#define XPQ_CALL_COUNT 2
-#define PG_PRIV PG_AVAIL3
-typedef struct {
- unsigned long pt_ref;
- unsigned long pt_eip[XPQ_CALL_COUNT][XPQ_CALL_DEPTH];
-} pteinfo_t;
-
-extern pteinfo_t *pteinfo_list;
-#ifdef XENDEBUG_LOW
-#define __PRINTK(x) printk x
-#else
-#define __PRINTK(x)
-#endif
-
-char *xen_setbootenv(char *cmd_line);
-
-int xen_boothowto(char *envp);
-
-void _xen_machphys_update(vm_paddr_t, vm_paddr_t, char *file, int line);
-
-#ifdef INVARIANTS
-#define xen_machphys_update(a, b) _xen_machphys_update((a), (b), __FILE__, __LINE__)
-#else
-#define xen_machphys_update(a, b) _xen_machphys_update((a), (b), NULL, 0)
-#endif
-
-extern struct mtx balloon_lock;
-#if 0
-#define balloon_lock(__flags) mtx_lock_irqsave(&balloon_lock, __flags)
-#define balloon_unlock(__flags) mtx_unlock_irqrestore(&balloon_lock, __flags)
-#else
-#define balloon_lock(__flags) __flags = 1
-#define balloon_unlock(__flags) __flags = 0
-#endif
-
-
-
-#endif /* _XEN_XENFUNC_H_ */
Index: head/sys/amd64/include/xen/xenvar.h
===================================================================
--- head/sys/amd64/include/xen/xenvar.h
+++ head/sys/amd64/include/xen/xenvar.h
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 2008 Kip Macy
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef XENVAR_H_
-#define XENVAR_H_
-#define XBOOTUP 0x1
-#define XPMAP 0x2
-extern int xendebug_flags;
-#ifndef NOXENDEBUG
-#define XENPRINTF printk
-#else
-#define XENPRINTF printf
-#endif
-#include <xen/features.h>
-
-#if 0
-#define TRACE_ENTER XENPRINTF("(file=%s, line=%d) entered %s\n", __FILE__, __LINE__, __FUNCTION__)
-#define TRACE_EXIT XENPRINTF("(file=%s, line=%d) exiting %s\n", __FILE__, __LINE__, __FUNCTION__)
-#define TRACE_DEBUG(argflags, _f, _a...) \
-if (xendebug_flags & argflags) XENPRINTF("(file=%s, line=%d) " _f "\n", __FILE__, __LINE__, ## _a);
-#else
-#define TRACE_ENTER
-#define TRACE_EXIT
-#define TRACE_DEBUG(argflags, _f, _a...)
-#endif
-
-#define vtomach(va) pmap_kextract((vm_offset_t) (va))
-
-void xpq_init(void);
-
-int xen_create_contiguous_region(vm_page_t pages, int npages);
-
-void xen_destroy_contiguous_region(void * addr, int npages);
-
-#endif
Index: head/sys/dev/xen/balloon/balloon.c
===================================================================
--- head/sys/dev/xen/balloon/balloon.c
+++ head/sys/dev/xen/balloon/balloon.c
@@ -49,8 +49,6 @@
#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 */
Index: head/sys/dev/xen/blkfront/blkfront.c
===================================================================
--- head/sys/dev/xen/blkfront/blkfront.c
+++ head/sys/dev/xen/blkfront/blkfront.c
@@ -60,7 +60,6 @@
#include <xen/xenbus/xenbusvar.h>
#include <machine/_inttypes.h>
-#include <machine/xen/xenvar.h>
#include <geom/geom_disk.h>
@@ -762,7 +761,7 @@
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 @@
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;
Index: head/sys/dev/xen/control/control.c
===================================================================
--- head/sys/dev/xen/control/control.c
+++ head/sys/dev/xen/control/control.c
@@ -145,9 +145,6 @@
#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);
Index: head/sys/dev/xen/netback/netback.c
===================================================================
--- head/sys/dev/xen/netback/netback.c
+++ head/sys/dev/xen/netback/netback.c
@@ -87,8 +87,6 @@
#include <xen/interface/io/netif.h>
#include <xen/xenbus/xenbusvar.h>
-#include <machine/xen/xenvar.h>
-
/*--------------------------- Compile-time Tunables --------------------------*/
/*---------------------------------- Macros ----------------------------------*/
@@ -132,7 +130,7 @@
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))
/**
Index: head/sys/dev/xen/netfront/netfront.c
===================================================================
--- head/sys/dev/xen/netfront/netfront.c
+++ head/sys/dev/xen/netfront/netfront.c
@@ -86,8 +86,6 @@
#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 @@
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 @@
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 */
Index: head/sys/dev/xen/pcifront/pcifront.c
===================================================================
--- head/sys/dev/xen/pcifront/pcifront.c
+++ head/sys/dev/xen/pcifront/pcifront.c
@@ -78,7 +78,7 @@
#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;
Index: head/sys/i386/include/xen/xenfunc.h
===================================================================
--- head/sys/i386/include/xen/xenfunc.h
+++ head/sys/i386/include/xen/xenfunc.h
@@ -1,81 +0,0 @@
-/*-
- * Copyright (c) 2004, 2005 Kip Macy
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _XEN_XENFUNC_H_
-#define _XEN_XENFUNC_H_
-
-#include <xen/xen-os.h>
-#include <xen/hypervisor.h>
-
-#include <vm/pmap.h>
-
-#include <machine/segments.h>
-
-#include <sys/pcpu.h>
-#define BKPT __asm__("int3");
-#define XPQ_CALL_DEPTH 5
-#define XPQ_CALL_COUNT 2
-#define PG_PRIV PG_AVAIL3
-typedef struct {
- unsigned long pt_ref;
- unsigned long pt_eip[XPQ_CALL_COUNT][XPQ_CALL_DEPTH];
-} pteinfo_t;
-
-extern pteinfo_t *pteinfo_list;
-#ifdef XENDEBUG_LOW
-#define __PRINTK(x) printk x
-#else
-#define __PRINTK(x)
-#endif
-
-char *xen_setbootenv(char *cmd_line);
-
-int xen_boothowto(char *envp);
-
-void _xen_machphys_update(vm_paddr_t, vm_paddr_t, char *file, int line);
-
-#ifdef INVARIANTS
-#define xen_machphys_update(a, b) _xen_machphys_update((a), (b), __FILE__, __LINE__)
-#else
-#define xen_machphys_update(a, b) _xen_machphys_update((a), (b), NULL, 0)
-#endif
-
-void xen_update_descriptor(union descriptor *, union descriptor *);
-
-extern struct mtx balloon_lock;
-#if 0
-#define balloon_lock(__flags) mtx_lock_irqsave(&balloon_lock, __flags)
-#define balloon_unlock(__flags) mtx_unlock_irqrestore(&balloon_lock, __flags)
-#else
-#define balloon_lock(__flags) __flags = 1
-#define balloon_unlock(__flags) __flags = 0
-#endif
-
-
-
-#endif /* _XEN_XENFUNC_H_ */
Index: head/sys/i386/include/xen/xenvar.h
===================================================================
--- head/sys/i386/include/xen/xenvar.h
+++ head/sys/i386/include/xen/xenvar.h
@@ -1,36 +0,0 @@
-/*-
- * Copyright (c) 2008 Kip Macy
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef XENVAR_H_
-#define XENVAR_H_
-
-#include <xen/features.h>
-
-#define vtomach(va) pmap_kextract((vm_offset_t) (va))
-
-#endif
Index: head/sys/x86/xen/xen_intr.c
===================================================================
--- head/sys/x86/xen/xen_intr.c
+++ head/sys/x86/xen/xen_intr.c
@@ -57,7 +57,6 @@
#include <machine/xen/synch_bitops.h>
#include <machine/xen/xen-os.h>
-#include <machine/xen/xenvar.h>
#include <xen/hypervisor.h>
#include <xen/xen_intr.h>

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 28, 11:50 PM (3 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30498737
Default Alt Text
D3266.id.diff (13 KB)

Event Timeline