2 * machine_specific_* - Hooks for machine specific setup.
5 * This is included late in kernel/setup.c so that it can make
6 * use of all of the static functions.
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)
18 struct callback_register event = {
19 .type = CALLBACKTYPE_event,
20 .address = (unsigned long) hypervisor_callback,
22 struct callback_register failsafe = {
23 .type = CALLBACKTYPE_failsafe,
24 .address = (unsigned long)failsafe_callback,
26 struct callback_register syscall = {
27 .type = CALLBACKTYPE_syscall,
28 .address = (unsigned long)system_call,
30 #ifdef CONFIG_X86_LOCAL_APIC
31 struct callback_register nmi_cb = {
32 .type = CALLBACKTYPE_nmi,
33 .address = (unsigned long)nmi,
37 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &event);
39 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &failsafe);
41 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &syscall);
43 ret = HYPERVISOR_set_callbacks(
49 #ifdef CONFIG_X86_LOCAL_APIC
50 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &nmi_cb);
52 struct xennmi_callback cb;
54 cb.handler_address = nmi_cb.address;
55 HYPERVISOR_nmi_op(XENNMI_register_callback, &cb);