ia64/xen-unstable

view unmodified_drivers/linux-2.6/platform-pci/xen_support.c @ 18824:0b8c6c91c5a4

pv-on-hvm drivers: build fixes for Linux 2.6.27+

Make the drivers build properly in a 2.6.27 environment as well as
against a kernel with pv-ops Xen configured on (in the latter case
more work would be needed to also make the drivers work, as there's a
large number of duplicate exports).

Portions from Charles Arnold <carnold@novell.com>.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Nov 24 11:11:20 2008 +0000 (2008-11-24)
parents 049d4baa9965
children
line source
1 /******************************************************************************
2 * support.c
3 * Xen module support functions.
4 * Copyright (C) 2004, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place - Suite 330, Boston, MA 02111-1307 USA.
18 *
19 */
21 #include <linux/module.h>
22 #include <linux/init.h>
23 #include <linux/mm.h>
24 #include <xen/evtchn.h>
25 #include <xen/interface/xen.h>
26 #include <asm/hypervisor.h>
27 #include "platform-pci.h"
29 #ifdef HAVE_XEN_PLATFORM_COMPAT_H
30 #include <xen/platform-compat.h>
31 #endif
33 #if defined (__ia64__)
34 unsigned long __hypercall(unsigned long a1, unsigned long a2,
35 unsigned long a3, unsigned long a4,
36 unsigned long a5, unsigned long cmd)
37 {
38 unsigned long __res;
39 __asm__ __volatile__ (";;\n"
40 "mov r2=%1\n"
41 "break 0x1000 ;;\n"
42 "mov %0=r8 ;;\n"
43 : "=r"(__res) : "r"(cmd) : "r2", "r8", "memory");
45 return __res;
46 }
47 EXPORT_SYMBOL(__hypercall);
49 int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count)
50 {
51 return xencomm_hypercall_grant_table_op(cmd, uop, count);
52 }
53 EXPORT_SYMBOL(HYPERVISOR_grant_table_op);
55 /* without using balloon driver on PV-on-HVM for ia64 */
56 void balloon_update_driver_allowance(long delta)
57 {
58 /* nothing */
59 }
60 EXPORT_SYMBOL_GPL(balloon_update_driver_allowance);
62 void balloon_release_driver_page(struct page *page)
63 {
64 /* nothing */
65 }
66 EXPORT_SYMBOL_GPL(balloon_release_driver_page);
67 #endif /* __ia64__ */
69 void xen_machphys_update(unsigned long mfn, unsigned long pfn)
70 {
71 BUG();
72 }
73 EXPORT_SYMBOL(xen_machphys_update);