ia64/xen-unstable
changeset 14796:e1580c3bb75a
[IA64] Fix PV-on-HVM driver
xen-platform-pci fails to load w/ undefined symbols for some of the
sched_op hypercalls in machine_reboot.c. This adds them to xencomm
mini to allow them to be called from modules.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
xen-platform-pci fails to load w/ undefined symbols for some of the
sched_op hypercalls in machine_reboot.c. This adds them to xencomm
mini to allow them to be called from modules.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author | Alex Williamson <alex.williamson@hp.com> |
---|---|
date | Wed Apr 11 23:15:30 2007 -0600 (2007-04-11) |
parents | e4bd31a66a2e |
children | acf561f90822 |
files | linux-2.6-xen-sparse/arch/ia64/xen/xcom_mini.c linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_mini.c Wed Apr 11 22:46:10 2007 -0600 1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_mini.c Wed Apr 11 23:15:30 2007 -0600 1.3 @@ -418,3 +418,39 @@ xencomm_mini_hypercall_perfmon_op(unsign 1.4 return xencomm_arch_hypercall_perfmon_op(cmd, desc, count); 1.5 } 1.6 EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_perfmon_op); 1.7 + 1.8 +int 1.9 +xencomm_mini_hypercall_sched_op(int cmd, void *arg) 1.10 +{ 1.11 + int rc, nbr_area = 2; 1.12 + struct xencomm_mini xc_area[2]; 1.13 + struct xencomm_handle *desc; 1.14 + unsigned int argsize; 1.15 + 1.16 + switch (cmd) { 1.17 + case SCHEDOP_yield: 1.18 + case SCHEDOP_block: 1.19 + argsize = 0; 1.20 + break; 1.21 + case SCHEDOP_shutdown: 1.22 + argsize = sizeof(sched_shutdown_t); 1.23 + break; 1.24 + case SCHEDOP_poll: 1.25 + argsize = sizeof(sched_poll_t); 1.26 + break; 1.27 + case SCHEDOP_remote_shutdown: 1.28 + argsize = sizeof(sched_remote_shutdown_t); 1.29 + break; 1.30 + 1.31 + default: 1.32 + printk("%s: unknown sched op %d\n", __func__, cmd); 1.33 + return -ENOSYS; 1.34 + } 1.35 + 1.36 + rc = xencomm_create_mini(xc_area, &nbr_area, arg, argsize, &desc); 1.37 + if (rc) 1.38 + return rc; 1.39 + 1.40 + return xencomm_arch_hypercall_sched_op(cmd, desc); 1.41 +} 1.42 +EXPORT_SYMBOL_GPL(xencomm_mini_hypercall_sched_op);
2.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h Wed Apr 11 22:46:10 2007 -0600 2.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h Wed Apr 11 23:15:30 2007 -0600 2.3 @@ -64,7 +64,6 @@ extern start_info_t *xen_start_info; 2.4 2.5 void force_evtchn_callback(void); 2.6 2.7 -#ifndef CONFIG_VMX_GUEST 2.8 /* Turn jiffies into Xen system time. XXX Implement me. */ 2.9 #define jiffies_to_st(j) 0 2.10 2.11 @@ -116,6 +115,7 @@ HYPERVISOR_poll( 2.12 return rc; 2.13 } 2.14 2.15 +#ifndef CONFIG_VMX_GUEST 2.16 // for drivers/xen/privcmd/privcmd.c 2.17 #define machine_to_phys_mapping 0 2.18 struct vm_area_struct;