ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h @ 9618:db44b783fe09

Cleanups to do_callback_op() new hypercall changeset.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 06 17:25:24 2006 +0100 (2006-04-06)
parents 67de34c062b5
children 93cffd2ea6a9
line source
1 /**
2 * machine_specific_* - Hooks for machine specific setup.
3 *
4 * Description:
5 * This is included late in kernel/setup.c so that it can make
6 * use of all of the static functions.
7 **/
9 #include <xen/interface/callback.h>
11 extern void hypervisor_callback(void);
12 extern void failsafe_callback(void);
13 extern void nmi(void);
15 static void __init machine_specific_arch_setup(void)
16 {
17 struct callback_register event = {
18 .type = CALLBACKTYPE_event,
19 .address = (unsigned long) hypervisor_callback,
20 };
21 struct callback_register failsafe = {
22 .type = CALLBACKTYPE_failsafe,
23 .address = (unsigned long)failsafe_callback,
24 };
25 struct callback_register syscall = {
26 .type = CALLBACKTYPE_syscall,
27 .address = (unsigned long)system_call,
28 };
29 #ifdef CONFIG_X86_LOCAL_APIC
30 struct xennmi_callback cb;
31 #endif
33 HYPERVISOR_callback_op(CALLBACKOP_register, &event);
34 HYPERVISOR_callback_op(CALLBACKOP_register, &failsafe);
35 HYPERVISOR_callback_op(CALLBACKOP_register, &syscall);
37 #ifdef CONFIG_X86_LOCAL_APIC
38 cb.handler_address = (unsigned long)&nmi;
39 HYPERVISOR_nmi_op(XENNMI_register_callback, &cb);
40 #endif
41 }