diff options
author | dfr <dfr@FreeBSD.org> | 2009-04-01 17:06:28 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2009-04-01 17:06:28 +0000 |
commit | df0ed71781b42b3334d3cf4200cf60ae4eb0ec19 (patch) | |
tree | 5494350917ada193418eaf287c32a9c53171fa67 /sys/dev/xen | |
parent | ce3adf17d25ae823e1c74998576355f7da16fe40 (diff) | |
download | FreeBSD-src-df0ed71781b42b3334d3cf4200cf60ae4eb0ec19.zip FreeBSD-src-df0ed71781b42b3334d3cf4200cf60ae4eb0ec19.tar.gz |
Fix the Xen build for i386 PV mode.
Diffstat (limited to 'sys/dev/xen')
-rw-r--r-- | sys/dev/xen/balloon/balloon.c | 8 | ||||
-rw-r--r-- | sys/dev/xen/console/console.c | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/xen/balloon/balloon.c b/sys/dev/xen/balloon/balloon.c index c23433c..6948173 100644 --- a/sys/dev/xen/balloon/balloon.c +++ b/sys/dev/xen/balloon/balloon.c @@ -167,6 +167,8 @@ minimum_target(void) { #ifdef XENHVM #define max_pfn physmem +#else +#define max_pfn HYPERVISOR_shared_info->arch.max_pfn #endif unsigned long min_pages, curr_pages = current_target(); @@ -256,6 +258,7 @@ increase_reservation(unsigned long nr_pages) set_phys_to_machine(pfn, frame_list[i]); +#if 0 #ifndef XENHVM /* Link back into the page tables if not highmem. */ if (pfn < max_low_pfn) { @@ -268,6 +271,7 @@ increase_reservation(unsigned long nr_pages) ("HYPERVISOR_update_va_mapping failed")); } #endif +#endif /* Relinquish the page back to the allocator. */ vm_page_unwire(page, 0); @@ -447,6 +451,9 @@ balloon_init(void *arg) { #ifndef XENHVM vm_page_t page; + unsigned long pfn; + +#define max_pfn HYPERVISOR_shared_info->arch.max_pfn #endif if (!is_running_on_xen()) @@ -477,6 +484,7 @@ balloon_init(void *arg) page = PHYS_TO_VM_PAGE(pfn << PAGE_SHIFT); balloon_append(page); } +#undef max_pfn #endif target_watch.callback = watch_target; diff --git a/sys/dev/xen/console/console.c b/sys/dev/xen/console/console.c index 0634dad..ac8ebac 100644 --- a/sys/dev/xen/console/console.c +++ b/sys/dev/xen/console/console.c @@ -225,7 +225,6 @@ static int xc_attach(device_t dev) { int error; - struct xc_softc *sc = (struct xc_softc *)device_get_softc(dev); if (xen_start_info->flags & SIF_INITDOMAIN) { xc_consdev.cn_putc = xccnputc_dom0; @@ -247,7 +246,7 @@ xc_attach(device_t dev) 0, "console", NULL, - xencons_priv_interrupt, + xencons_priv_interrupt, NULL, INTR_TYPE_TTY, NULL); KASSERT(error >= 0, ("can't register console interrupt")); |