diff options
Diffstat (limited to 'arch/i386/kernel/vmi.c')
-rw-r--r-- | arch/i386/kernel/vmi.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c index 0df0b2cd3617..0fae15dee765 100644 --- a/arch/i386/kernel/vmi.c +++ b/arch/i386/kernel/vmi.c | |||
@@ -77,6 +77,9 @@ static struct { | |||
77 | extern struct paravirt_patch __start_parainstructions[], | 77 | extern struct paravirt_patch __start_parainstructions[], |
78 | __stop_parainstructions[]; | 78 | __stop_parainstructions[]; |
79 | 79 | ||
80 | /* Cached VMI operations */ | ||
81 | struct vmi_timer_ops vmi_timer_ops; | ||
82 | |||
80 | /* | 83 | /* |
81 | * VMI patching routines. | 84 | * VMI patching routines. |
82 | */ | 85 | */ |
@@ -235,18 +238,6 @@ static void vmi_nop(void) | |||
235 | { | 238 | { |
236 | } | 239 | } |
237 | 240 | ||
238 | /* For NO_IDLE_HZ, we stop the clock when halting the kernel */ | ||
239 | static fastcall void vmi_safe_halt(void) | ||
240 | { | ||
241 | int idle = vmi_stop_hz_timer(); | ||
242 | vmi_ops.halt(); | ||
243 | if (idle) { | ||
244 | local_irq_disable(); | ||
245 | vmi_account_time_restart_hz_timer(); | ||
246 | local_irq_enable(); | ||
247 | } | ||
248 | } | ||
249 | |||
250 | #ifdef CONFIG_DEBUG_PAGE_TYPE | 241 | #ifdef CONFIG_DEBUG_PAGE_TYPE |
251 | 242 | ||
252 | #ifdef CONFIG_X86_PAE | 243 | #ifdef CONFIG_X86_PAE |
@@ -722,7 +713,6 @@ do { \ | |||
722 | } \ | 713 | } \ |
723 | } while (0) | 714 | } while (0) |
724 | 715 | ||
725 | |||
726 | /* | 716 | /* |
727 | * Activate the VMI interface and switch into paravirtualized mode | 717 | * Activate the VMI interface and switch into paravirtualized mode |
728 | */ | 718 | */ |
@@ -901,8 +891,8 @@ static inline int __init activate_vmi(void) | |||
901 | paravirt_ops.get_wallclock = vmi_get_wallclock; | 891 | paravirt_ops.get_wallclock = vmi_get_wallclock; |
902 | paravirt_ops.set_wallclock = vmi_set_wallclock; | 892 | paravirt_ops.set_wallclock = vmi_set_wallclock; |
903 | #ifdef CONFIG_X86_LOCAL_APIC | 893 | #ifdef CONFIG_X86_LOCAL_APIC |
904 | paravirt_ops.setup_boot_clock = vmi_timer_setup_boot_alarm; | 894 | paravirt_ops.setup_boot_clock = vmi_time_bsp_init; |
905 | paravirt_ops.setup_secondary_clock = vmi_timer_setup_secondary_alarm; | 895 | paravirt_ops.setup_secondary_clock = vmi_time_ap_init; |
906 | #endif | 896 | #endif |
907 | paravirt_ops.get_scheduled_cycles = vmi_get_sched_cycles; | 897 | paravirt_ops.get_scheduled_cycles = vmi_get_sched_cycles; |
908 | paravirt_ops.get_cpu_khz = vmi_cpu_khz; | 898 | paravirt_ops.get_cpu_khz = vmi_cpu_khz; |
@@ -914,11 +904,7 @@ static inline int __init activate_vmi(void) | |||
914 | disable_vmi_timer = 1; | 904 | disable_vmi_timer = 1; |
915 | } | 905 | } |
916 | 906 | ||
917 | /* No idle HZ mode only works if VMI timer and no idle is enabled */ | 907 | para_fill(safe_halt, Halt); |
918 | if (disable_noidle || disable_vmi_timer) | ||
919 | para_fill(safe_halt, Halt); | ||
920 | else | ||
921 | para_wrap(safe_halt, vmi_safe_halt, halt, Halt); | ||
922 | 908 | ||
923 | /* | 909 | /* |
924 | * Alternative instruction rewriting doesn't happen soon enough | 910 | * Alternative instruction rewriting doesn't happen soon enough |