diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/kvm_host.h | 2 | ||||
-rw-r--r-- | include/linux/kvm.h | 4 | ||||
-rw-r--r-- | include/linux/stop_machine.h | 19 |
3 files changed, 4 insertions, 21 deletions
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 0f3c53114614..c2e34c275900 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -722,7 +722,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void); | |||
722 | 722 | ||
723 | #define __kvm_handle_fault_on_reboot(insn) \ | 723 | #define __kvm_handle_fault_on_reboot(insn) \ |
724 | "666: " insn "\n\t" \ | 724 | "666: " insn "\n\t" \ |
725 | ".pushsection .text.fixup, \"ax\" \n" \ | 725 | ".pushsection .fixup, \"ax\" \n" \ |
726 | "667: \n\t" \ | 726 | "667: \n\t" \ |
727 | KVM_EX_PUSH " $666b \n\t" \ | 727 | KVM_EX_PUSH " $666b \n\t" \ |
728 | "jmp kvm_handle_fault_on_reboot \n\t" \ | 728 | "jmp kvm_handle_fault_on_reboot \n\t" \ |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 69511f74f912..70a30651cd12 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -320,12 +320,12 @@ struct kvm_trace_rec { | |||
320 | struct { | 320 | struct { |
321 | __u64 cycle_u64; | 321 | __u64 cycle_u64; |
322 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; | 322 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; |
323 | } cycle; | 323 | } __attribute__((packed)) cycle; |
324 | struct { | 324 | struct { |
325 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; | 325 | __u32 extra_u32[KVM_TRC_EXTRA_MAX]; |
326 | } nocycle; | 326 | } nocycle; |
327 | } u; | 327 | } u; |
328 | } __attribute__((packed)); | 328 | }; |
329 | 329 | ||
330 | #define KVMIO 0xAE | 330 | #define KVMIO 0xAE |
331 | 331 | ||
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index f1cb0ba6d715..faf1519b5adc 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -3,16 +3,13 @@ | |||
3 | /* "Bogolock": stop the entire machine, disable interrupts. This is a | 3 | /* "Bogolock": stop the entire machine, disable interrupts. This is a |
4 | very heavy lock, which is equivalent to grabbing every spinlock | 4 | very heavy lock, which is equivalent to grabbing every spinlock |
5 | (and more). So the "read" side to such a lock is anything which | 5 | (and more). So the "read" side to such a lock is anything which |
6 | diables preeempt. */ | 6 | disables preeempt. */ |
7 | #include <linux/cpu.h> | 7 | #include <linux/cpu.h> |
8 | #include <linux/cpumask.h> | 8 | #include <linux/cpumask.h> |
9 | #include <asm/system.h> | 9 | #include <asm/system.h> |
10 | 10 | ||
11 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) | 11 | #if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) |
12 | 12 | ||
13 | /* Deprecated, but useful for transition. */ | ||
14 | #define ALL_CPUS ~0U | ||
15 | |||
16 | /** | 13 | /** |
17 | * stop_machine: freeze the machine on all CPUs and run this function | 14 | * stop_machine: freeze the machine on all CPUs and run this function |
18 | * @fn: the function to run | 15 | * @fn: the function to run |
@@ -50,18 +47,4 @@ static inline int stop_machine(int (*fn)(void *), void *data, | |||
50 | return ret; | 47 | return ret; |
51 | } | 48 | } |
52 | #endif /* CONFIG_SMP */ | 49 | #endif /* CONFIG_SMP */ |
53 | |||
54 | static inline int __deprecated stop_machine_run(int (*fn)(void *), void *data, | ||
55 | unsigned int cpu) | ||
56 | { | ||
57 | /* If they don't care which cpu fn runs on, just pick one. */ | ||
58 | if (cpu == NR_CPUS) | ||
59 | return stop_machine(fn, data, NULL); | ||
60 | else if (cpu == ~0U) | ||
61 | return stop_machine(fn, data, &cpu_possible_map); | ||
62 | else { | ||
63 | cpumask_t cpus = cpumask_of_cpu(cpu); | ||
64 | return stop_machine(fn, data, &cpus); | ||
65 | } | ||
66 | } | ||
67 | #endif /* _LINUX_STOP_MACHINE */ | 50 | #endif /* _LINUX_STOP_MACHINE */ |