diff options
Diffstat (limited to 'arch/x86/kernel')
| -rw-r--r-- | arch/x86/kernel/amd_iommu.c | 22 | ||||
| -rw-r--r-- | arch/x86/kernel/apm_32.c | 3 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/kgdb.c | 43 | ||||
| -rw-r--r-- | arch/x86/kernel/process.c | 17 | ||||
| -rw-r--r-- | arch/x86/kernel/process_32.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/process_64.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/vmi_32.c | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/vsmp_64.c | 2 |
9 files changed, 69 insertions, 26 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 69b4d060b21c..042fdc27bc92 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
| @@ -101,10 +101,10 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd) | |||
| 101 | */ | 101 | */ |
| 102 | static int iommu_completion_wait(struct amd_iommu *iommu) | 102 | static int iommu_completion_wait(struct amd_iommu *iommu) |
| 103 | { | 103 | { |
| 104 | int ret, ready = 0; | 104 | int ret = 0, ready = 0; |
| 105 | unsigned status = 0; | 105 | unsigned status = 0; |
| 106 | struct iommu_cmd cmd; | 106 | struct iommu_cmd cmd; |
| 107 | unsigned long i = 0; | 107 | unsigned long flags, i = 0; |
| 108 | 108 | ||
| 109 | memset(&cmd, 0, sizeof(cmd)); | 109 | memset(&cmd, 0, sizeof(cmd)); |
| 110 | cmd.data[0] = CMD_COMPL_WAIT_INT_MASK; | 110 | cmd.data[0] = CMD_COMPL_WAIT_INT_MASK; |
| @@ -112,10 +112,12 @@ static int iommu_completion_wait(struct amd_iommu *iommu) | |||
| 112 | 112 | ||
| 113 | iommu->need_sync = 0; | 113 | iommu->need_sync = 0; |
| 114 | 114 | ||
| 115 | ret = iommu_queue_command(iommu, &cmd); | 115 | spin_lock_irqsave(&iommu->lock, flags); |
| 116 | |||
| 117 | ret = __iommu_queue_command(iommu, &cmd); | ||
| 116 | 118 | ||
| 117 | if (ret) | 119 | if (ret) |
| 118 | return ret; | 120 | goto out; |
| 119 | 121 | ||
| 120 | while (!ready && (i < EXIT_LOOP_COUNT)) { | 122 | while (!ready && (i < EXIT_LOOP_COUNT)) { |
| 121 | ++i; | 123 | ++i; |
| @@ -130,6 +132,8 @@ static int iommu_completion_wait(struct amd_iommu *iommu) | |||
| 130 | 132 | ||
| 131 | if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit())) | 133 | if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit())) |
| 132 | printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n"); | 134 | printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n"); |
| 135 | out: | ||
| 136 | spin_unlock_irqrestore(&iommu->lock, flags); | ||
| 133 | 137 | ||
| 134 | return 0; | 138 | return 0; |
| 135 | } | 139 | } |
| @@ -140,6 +144,7 @@ static int iommu_completion_wait(struct amd_iommu *iommu) | |||
| 140 | static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) | 144 | static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) |
| 141 | { | 145 | { |
| 142 | struct iommu_cmd cmd; | 146 | struct iommu_cmd cmd; |
| 147 | int ret; | ||
| 143 | 148 | ||
| 144 | BUG_ON(iommu == NULL); | 149 | BUG_ON(iommu == NULL); |
| 145 | 150 | ||
| @@ -147,9 +152,11 @@ static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) | |||
| 147 | CMD_SET_TYPE(&cmd, CMD_INV_DEV_ENTRY); | 152 | CMD_SET_TYPE(&cmd, CMD_INV_DEV_ENTRY); |
| 148 | cmd.data[0] = devid; | 153 | cmd.data[0] = devid; |
| 149 | 154 | ||
| 155 | ret = iommu_queue_command(iommu, &cmd); | ||
| 156 | |||
| 150 | iommu->need_sync = 1; | 157 | iommu->need_sync = 1; |
| 151 | 158 | ||
| 152 | return iommu_queue_command(iommu, &cmd); | 159 | return ret; |
| 153 | } | 160 | } |
| 154 | 161 | ||
| 155 | /* | 162 | /* |
| @@ -159,6 +166,7 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, | |||
| 159 | u64 address, u16 domid, int pde, int s) | 166 | u64 address, u16 domid, int pde, int s) |
| 160 | { | 167 | { |
| 161 | struct iommu_cmd cmd; | 168 | struct iommu_cmd cmd; |
| 169 | int ret; | ||
| 162 | 170 | ||
| 163 | memset(&cmd, 0, sizeof(cmd)); | 171 | memset(&cmd, 0, sizeof(cmd)); |
| 164 | address &= PAGE_MASK; | 172 | address &= PAGE_MASK; |
| @@ -171,9 +179,11 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, | |||
| 171 | if (pde) /* PDE bit - we wan't flush everything not only the PTEs */ | 179 | if (pde) /* PDE bit - we wan't flush everything not only the PTEs */ |
| 172 | cmd.data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK; | 180 | cmd.data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK; |
| 173 | 181 | ||
| 182 | ret = iommu_queue_command(iommu, &cmd); | ||
| 183 | |||
| 174 | iommu->need_sync = 1; | 184 | iommu->need_sync = 1; |
| 175 | 185 | ||
| 176 | return iommu_queue_command(iommu, &cmd); | 186 | return ret; |
| 177 | } | 187 | } |
| 178 | 188 | ||
| 179 | /* | 189 | /* |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 9ee24e6bc4b0..732d1f4e10ee 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
| @@ -234,6 +234,7 @@ | |||
| 234 | #include <asm/uaccess.h> | 234 | #include <asm/uaccess.h> |
| 235 | #include <asm/desc.h> | 235 | #include <asm/desc.h> |
| 236 | #include <asm/i8253.h> | 236 | #include <asm/i8253.h> |
| 237 | #include <asm/olpc.h> | ||
| 237 | #include <asm/paravirt.h> | 238 | #include <asm/paravirt.h> |
| 238 | #include <asm/reboot.h> | 239 | #include <asm/reboot.h> |
| 239 | 240 | ||
| @@ -2217,7 +2218,7 @@ static int __init apm_init(void) | |||
| 2217 | 2218 | ||
| 2218 | dmi_check_system(apm_dmi_table); | 2219 | dmi_check_system(apm_dmi_table); |
| 2219 | 2220 | ||
| 2220 | if (apm_info.bios.version == 0 || paravirt_enabled()) { | 2221 | if (apm_info.bios.version == 0 || paravirt_enabled() || machine_is_olpc()) { |
| 2221 | printk(KERN_INFO "apm: BIOS not found.\n"); | 2222 | printk(KERN_INFO "apm: BIOS not found.\n"); |
| 2222 | return -ENODEV; | 2223 | return -ENODEV; |
| 2223 | } | 2224 | } |
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index b117d7f8a564..885c8265e6b5 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
| @@ -834,7 +834,7 @@ static int __init enable_mtrr_cleanup_setup(char *str) | |||
| 834 | enable_mtrr_cleanup = 1; | 834 | enable_mtrr_cleanup = 1; |
| 835 | return 0; | 835 | return 0; |
| 836 | } | 836 | } |
| 837 | early_param("enble_mtrr_cleanup", enable_mtrr_cleanup_setup); | 837 | early_param("enable_mtrr_cleanup", enable_mtrr_cleanup_setup); |
| 838 | 838 | ||
| 839 | struct var_mtrr_state { | 839 | struct var_mtrr_state { |
| 840 | unsigned long range_startk; | 840 | unsigned long range_startk; |
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index f47f0eb886b8..8282a2139681 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
| @@ -69,6 +69,9 @@ static int gdb_x86vector = -1; | |||
| 69 | */ | 69 | */ |
| 70 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | 70 | void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) |
| 71 | { | 71 | { |
| 72 | #ifndef CONFIG_X86_32 | ||
| 73 | u32 *gdb_regs32 = (u32 *)gdb_regs; | ||
| 74 | #endif | ||
| 72 | gdb_regs[GDB_AX] = regs->ax; | 75 | gdb_regs[GDB_AX] = regs->ax; |
| 73 | gdb_regs[GDB_BX] = regs->bx; | 76 | gdb_regs[GDB_BX] = regs->bx; |
| 74 | gdb_regs[GDB_CX] = regs->cx; | 77 | gdb_regs[GDB_CX] = regs->cx; |
| @@ -76,9 +79,9 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
| 76 | gdb_regs[GDB_SI] = regs->si; | 79 | gdb_regs[GDB_SI] = regs->si; |
| 77 | gdb_regs[GDB_DI] = regs->di; | 80 | gdb_regs[GDB_DI] = regs->di; |
| 78 | gdb_regs[GDB_BP] = regs->bp; | 81 | gdb_regs[GDB_BP] = regs->bp; |
| 79 | gdb_regs[GDB_PS] = regs->flags; | ||
| 80 | gdb_regs[GDB_PC] = regs->ip; | 82 | gdb_regs[GDB_PC] = regs->ip; |
| 81 | #ifdef CONFIG_X86_32 | 83 | #ifdef CONFIG_X86_32 |
| 84 | gdb_regs[GDB_PS] = regs->flags; | ||
| 82 | gdb_regs[GDB_DS] = regs->ds; | 85 | gdb_regs[GDB_DS] = regs->ds; |
| 83 | gdb_regs[GDB_ES] = regs->es; | 86 | gdb_regs[GDB_ES] = regs->es; |
| 84 | gdb_regs[GDB_CS] = regs->cs; | 87 | gdb_regs[GDB_CS] = regs->cs; |
| @@ -94,6 +97,9 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
| 94 | gdb_regs[GDB_R13] = regs->r13; | 97 | gdb_regs[GDB_R13] = regs->r13; |
| 95 | gdb_regs[GDB_R14] = regs->r14; | 98 | gdb_regs[GDB_R14] = regs->r14; |
| 96 | gdb_regs[GDB_R15] = regs->r15; | 99 | gdb_regs[GDB_R15] = regs->r15; |
| 100 | gdb_regs32[GDB_PS] = regs->flags; | ||
| 101 | gdb_regs32[GDB_CS] = regs->cs; | ||
| 102 | gdb_regs32[GDB_SS] = regs->ss; | ||
| 97 | #endif | 103 | #endif |
| 98 | gdb_regs[GDB_SP] = regs->sp; | 104 | gdb_regs[GDB_SP] = regs->sp; |
| 99 | } | 105 | } |
| @@ -112,6 +118,9 @@ void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
| 112 | */ | 118 | */ |
| 113 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | 119 | void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) |
| 114 | { | 120 | { |
| 121 | #ifndef CONFIG_X86_32 | ||
| 122 | u32 *gdb_regs32 = (u32 *)gdb_regs; | ||
| 123 | #endif | ||
| 115 | gdb_regs[GDB_AX] = 0; | 124 | gdb_regs[GDB_AX] = 0; |
| 116 | gdb_regs[GDB_BX] = 0; | 125 | gdb_regs[GDB_BX] = 0; |
| 117 | gdb_regs[GDB_CX] = 0; | 126 | gdb_regs[GDB_CX] = 0; |
| @@ -129,8 +138,10 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | |||
| 129 | gdb_regs[GDB_FS] = 0xFFFF; | 138 | gdb_regs[GDB_FS] = 0xFFFF; |
| 130 | gdb_regs[GDB_GS] = 0xFFFF; | 139 | gdb_regs[GDB_GS] = 0xFFFF; |
| 131 | #else | 140 | #else |
| 132 | gdb_regs[GDB_PS] = *(unsigned long *)(p->thread.sp + 8); | 141 | gdb_regs32[GDB_PS] = *(unsigned long *)(p->thread.sp + 8); |
| 133 | gdb_regs[GDB_PC] = 0; | 142 | gdb_regs32[GDB_CS] = __KERNEL_CS; |
| 143 | gdb_regs32[GDB_SS] = __KERNEL_DS; | ||
| 144 | gdb_regs[GDB_PC] = p->thread.ip; | ||
| 134 | gdb_regs[GDB_R8] = 0; | 145 | gdb_regs[GDB_R8] = 0; |
| 135 | gdb_regs[GDB_R9] = 0; | 146 | gdb_regs[GDB_R9] = 0; |
| 136 | gdb_regs[GDB_R10] = 0; | 147 | gdb_regs[GDB_R10] = 0; |
| @@ -153,6 +164,9 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) | |||
| 153 | */ | 164 | */ |
| 154 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | 165 | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) |
| 155 | { | 166 | { |
| 167 | #ifndef CONFIG_X86_32 | ||
| 168 | u32 *gdb_regs32 = (u32 *)gdb_regs; | ||
| 169 | #endif | ||
| 156 | regs->ax = gdb_regs[GDB_AX]; | 170 | regs->ax = gdb_regs[GDB_AX]; |
| 157 | regs->bx = gdb_regs[GDB_BX]; | 171 | regs->bx = gdb_regs[GDB_BX]; |
| 158 | regs->cx = gdb_regs[GDB_CX]; | 172 | regs->cx = gdb_regs[GDB_CX]; |
| @@ -160,9 +174,9 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
| 160 | regs->si = gdb_regs[GDB_SI]; | 174 | regs->si = gdb_regs[GDB_SI]; |
| 161 | regs->di = gdb_regs[GDB_DI]; | 175 | regs->di = gdb_regs[GDB_DI]; |
| 162 | regs->bp = gdb_regs[GDB_BP]; | 176 | regs->bp = gdb_regs[GDB_BP]; |
| 163 | regs->flags = gdb_regs[GDB_PS]; | ||
| 164 | regs->ip = gdb_regs[GDB_PC]; | 177 | regs->ip = gdb_regs[GDB_PC]; |
| 165 | #ifdef CONFIG_X86_32 | 178 | #ifdef CONFIG_X86_32 |
| 179 | regs->flags = gdb_regs[GDB_PS]; | ||
| 166 | regs->ds = gdb_regs[GDB_DS]; | 180 | regs->ds = gdb_regs[GDB_DS]; |
| 167 | regs->es = gdb_regs[GDB_ES]; | 181 | regs->es = gdb_regs[GDB_ES]; |
| 168 | regs->cs = gdb_regs[GDB_CS]; | 182 | regs->cs = gdb_regs[GDB_CS]; |
| @@ -175,6 +189,9 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) | |||
| 175 | regs->r13 = gdb_regs[GDB_R13]; | 189 | regs->r13 = gdb_regs[GDB_R13]; |
| 176 | regs->r14 = gdb_regs[GDB_R14]; | 190 | regs->r14 = gdb_regs[GDB_R14]; |
| 177 | regs->r15 = gdb_regs[GDB_R15]; | 191 | regs->r15 = gdb_regs[GDB_R15]; |
| 192 | regs->flags = gdb_regs32[GDB_PS]; | ||
| 193 | regs->cs = gdb_regs32[GDB_CS]; | ||
| 194 | regs->ss = gdb_regs32[GDB_SS]; | ||
| 178 | #endif | 195 | #endif |
| 179 | } | 196 | } |
| 180 | 197 | ||
| @@ -378,10 +395,8 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code, | |||
| 378 | if (remcomInBuffer[0] == 's') { | 395 | if (remcomInBuffer[0] == 's') { |
| 379 | linux_regs->flags |= X86_EFLAGS_TF; | 396 | linux_regs->flags |= X86_EFLAGS_TF; |
| 380 | kgdb_single_step = 1; | 397 | kgdb_single_step = 1; |
| 381 | if (kgdb_contthread) { | 398 | atomic_set(&kgdb_cpu_doing_single_step, |
| 382 | atomic_set(&kgdb_cpu_doing_single_step, | 399 | raw_smp_processor_id()); |
| 383 | raw_smp_processor_id()); | ||
| 384 | } | ||
| 385 | } | 400 | } |
| 386 | 401 | ||
| 387 | get_debugreg(dr6, 6); | 402 | get_debugreg(dr6, 6); |
| @@ -466,9 +481,15 @@ static int __kgdb_notify(struct die_args *args, unsigned long cmd) | |||
| 466 | 481 | ||
| 467 | case DIE_DEBUG: | 482 | case DIE_DEBUG: |
| 468 | if (atomic_read(&kgdb_cpu_doing_single_step) == | 483 | if (atomic_read(&kgdb_cpu_doing_single_step) == |
| 469 | raw_smp_processor_id() && | 484 | raw_smp_processor_id()) { |
| 470 | user_mode(regs)) | 485 | if (user_mode(regs)) |
| 471 | return single_step_cont(regs, args); | 486 | return single_step_cont(regs, args); |
| 487 | break; | ||
| 488 | } else if (test_thread_flag(TIF_SINGLESTEP)) | ||
| 489 | /* This means a user thread is single stepping | ||
| 490 | * a system call which should be ignored | ||
| 491 | */ | ||
| 492 | return NOTIFY_DONE; | ||
| 472 | /* fall through */ | 493 | /* fall through */ |
| 473 | default: | 494 | default: |
| 474 | if (user_mode(regs)) | 495 | if (user_mode(regs)) |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 7fc4d5b0a6a0..876e91890777 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -246,6 +246,14 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | |||
| 246 | return 1; | 246 | return 1; |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | static cpumask_t c1e_mask = CPU_MASK_NONE; | ||
| 250 | static int c1e_detected; | ||
| 251 | |||
| 252 | void c1e_remove_cpu(int cpu) | ||
| 253 | { | ||
| 254 | cpu_clear(cpu, c1e_mask); | ||
| 255 | } | ||
| 256 | |||
| 249 | /* | 257 | /* |
| 250 | * C1E aware idle routine. We check for C1E active in the interrupt | 258 | * C1E aware idle routine. We check for C1E active in the interrupt |
| 251 | * pending message MSR. If we detect C1E, then we handle it the same | 259 | * pending message MSR. If we detect C1E, then we handle it the same |
| @@ -253,9 +261,6 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | |||
| 253 | */ | 261 | */ |
| 254 | static void c1e_idle(void) | 262 | static void c1e_idle(void) |
| 255 | { | 263 | { |
| 256 | static cpumask_t c1e_mask = CPU_MASK_NONE; | ||
| 257 | static int c1e_detected; | ||
| 258 | |||
| 259 | if (need_resched()) | 264 | if (need_resched()) |
| 260 | return; | 265 | return; |
| 261 | 266 | ||
| @@ -265,8 +270,10 @@ static void c1e_idle(void) | |||
| 265 | rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi); | 270 | rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi); |
| 266 | if (lo & K8_INTP_C1E_ACTIVE_MASK) { | 271 | if (lo & K8_INTP_C1E_ACTIVE_MASK) { |
| 267 | c1e_detected = 1; | 272 | c1e_detected = 1; |
| 268 | mark_tsc_unstable("TSC halt in C1E"); | 273 | if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) |
| 269 | printk(KERN_INFO "System has C1E enabled\n"); | 274 | mark_tsc_unstable("TSC halt in AMD C1E"); |
| 275 | printk(KERN_INFO "System has AMD C1E enabled\n"); | ||
| 276 | set_cpu_cap(&boot_cpu_data, X86_FEATURE_AMDC1E); | ||
| 270 | } | 277 | } |
| 271 | } | 278 | } |
| 272 | 279 | ||
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 3b7a1ddcc0bc..31f40b24bf5d 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | #include <asm/tlbflush.h> | 55 | #include <asm/tlbflush.h> |
| 56 | #include <asm/cpu.h> | 56 | #include <asm/cpu.h> |
| 57 | #include <asm/kdebug.h> | 57 | #include <asm/kdebug.h> |
| 58 | #include <asm/idle.h> | ||
| 58 | 59 | ||
| 59 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); | 60 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); |
| 60 | 61 | ||
| @@ -88,6 +89,7 @@ static void cpu_exit_clear(void) | |||
| 88 | cpu_clear(cpu, cpu_callin_map); | 89 | cpu_clear(cpu, cpu_callin_map); |
| 89 | 90 | ||
| 90 | numa_remove_cpu(cpu); | 91 | numa_remove_cpu(cpu); |
| 92 | c1e_remove_cpu(cpu); | ||
| 91 | } | 93 | } |
| 92 | 94 | ||
| 93 | /* We don't actually take CPU down, just spin without interrupts. */ | 95 | /* We don't actually take CPU down, just spin without interrupts. */ |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 71553b664e2a..e12e0e4dd256 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
| @@ -93,6 +93,8 @@ DECLARE_PER_CPU(int, cpu_state); | |||
| 93 | static inline void play_dead(void) | 93 | static inline void play_dead(void) |
| 94 | { | 94 | { |
| 95 | idle_task_exit(); | 95 | idle_task_exit(); |
| 96 | c1e_remove_cpu(raw_smp_processor_id()); | ||
| 97 | |||
| 96 | mb(); | 98 | mb(); |
| 97 | /* Ack it */ | 99 | /* Ack it */ |
| 98 | __get_cpu_var(cpu_state) = CPU_DEAD; | 100 | __get_cpu_var(cpu_state) = CPU_DEAD; |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 6ca515d6db54..edfb09f30479 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
| @@ -235,7 +235,7 @@ static void vmi_write_ldt_entry(struct desc_struct *dt, int entry, | |||
| 235 | const void *desc) | 235 | const void *desc) |
| 236 | { | 236 | { |
| 237 | u32 *ldt_entry = (u32 *)desc; | 237 | u32 *ldt_entry = (u32 *)desc; |
| 238 | vmi_ops.write_idt_entry(dt, entry, ldt_entry[0], ldt_entry[1]); | 238 | vmi_ops.write_ldt_entry(dt, entry, ldt_entry[0], ldt_entry[1]); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | static void vmi_load_sp0(struct tss_struct *tss, | 241 | static void vmi_load_sp0(struct tss_struct *tss, |
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c index 0c029e8959c7..7766d36983fc 100644 --- a/arch/x86/kernel/vsmp_64.c +++ b/arch/x86/kernel/vsmp_64.c | |||
| @@ -61,7 +61,7 @@ static void vsmp_irq_enable(void) | |||
| 61 | native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC)); | 61 | native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC)); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf, | 64 | static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf, |
| 65 | unsigned long addr, unsigned len) | 65 | unsigned long addr, unsigned len) |
| 66 | { | 66 | { |
| 67 | switch (type) { | 67 | switch (type) { |
