aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/boot/vesa.h9
-rw-r--r--arch/x86/boot/video-vesa.c2
-rw-r--r--arch/x86/ia32/ia32_signal.c4
-rw-r--r--arch/x86/kernel/i387.c2
-rw-r--r--arch/x86/kernel/reboot.c6
-rw-r--r--arch/x86/kernel/signal_32.c4
-rw-r--r--arch/x86/kernel/signal_64.c2
-rw-r--r--arch/x86/kernel/step.c4
8 files changed, 15 insertions, 18 deletions
diff --git a/arch/x86/boot/vesa.h b/arch/x86/boot/vesa.h
index ff5b73cd406f..468e444622c5 100644
--- a/arch/x86/boot/vesa.h
+++ b/arch/x86/boot/vesa.h
@@ -26,17 +26,10 @@ struct vesa_general_info {
26 far_ptr video_mode_ptr; /* 14 */ 26 far_ptr video_mode_ptr; /* 14 */
27 u16 total_memory; /* 18 */ 27 u16 total_memory; /* 18 */
28 28
29 u16 oem_software_rev; /* 20 */ 29 u8 reserved[236]; /* 20 */
30 far_ptr oem_vendor_name_ptr; /* 22 */
31 far_ptr oem_product_name_ptr; /* 26 */
32 far_ptr oem_product_rev_ptr; /* 30 */
33
34 u8 reserved[222]; /* 34 */
35 u8 oem_data[256]; /* 256 */
36} __attribute__ ((packed)); 30} __attribute__ ((packed));
37 31
38#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24)) 32#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))
39#define VBE2_MAGIC ('V' + ('B' << 8) + ('E' << 16) + ('2' << 24))
40 33
41struct vesa_mode_info { 34struct vesa_mode_info {
42 u16 mode_attr; /* 0 */ 35 u16 mode_attr; /* 0 */
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
index 662dd2f13068..419b5c273374 100644
--- a/arch/x86/boot/video-vesa.c
+++ b/arch/x86/boot/video-vesa.c
@@ -37,8 +37,6 @@ static int vesa_probe(void)
37 37
38 video_vesa.modes = GET_HEAP(struct mode_info, 0); 38 video_vesa.modes = GET_HEAP(struct mode_info, 0);
39 39
40 vginfo.signature = VBE2_MAGIC;
41
42 ax = 0x4f00; 40 ax = 0x4f00;
43 di = (size_t)&vginfo; 41 di = (size_t)&vginfo;
44 asm(INT10 42 asm(INT10
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index 1c0503bdfb1a..5e7771a3ba2f 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -500,7 +500,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka,
500 regs->ss = __USER32_DS; 500 regs->ss = __USER32_DS;
501 501
502 set_fs(USER_DS); 502 set_fs(USER_DS);
503 regs->flags &= ~X86_EFLAGS_TF; 503 regs->flags &= ~(X86_EFLAGS_TF | X86_EFLAGS_DF);
504 if (test_thread_flag(TIF_SINGLESTEP)) 504 if (test_thread_flag(TIF_SINGLESTEP))
505 ptrace_notify(SIGTRAP); 505 ptrace_notify(SIGTRAP);
506 506
@@ -600,7 +600,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
600 regs->ss = __USER32_DS; 600 regs->ss = __USER32_DS;
601 601
602 set_fs(USER_DS); 602 set_fs(USER_DS);
603 regs->flags &= ~X86_EFLAGS_TF; 603 regs->flags &= ~(X86_EFLAGS_TF | X86_EFLAGS_DF);
604 if (test_thread_flag(TIF_SINGLESTEP)) 604 if (test_thread_flag(TIF_SINGLESTEP))
605 ptrace_notify(SIGTRAP); 605 ptrace_notify(SIGTRAP);
606 606
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index 60fe80157569..d2e39e69aaf8 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -261,7 +261,7 @@ static void convert_from_fxsr(struct user_i387_ia32_struct *env,
261 } 261 }
262#else 262#else
263 env->fip = fxsave->fip; 263 env->fip = fxsave->fip;
264 env->fcs = fxsave->fcs; 264 env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16);
265 env->foo = fxsave->foo; 265 env->foo = fxsave->foo;
266 env->fos = fxsave->fos; 266 env->fos = fxsave->fos;
267#endif 267#endif
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 7fd6ac43e4a1..55ceb8cdef75 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -326,6 +326,10 @@ static inline void kb_wait(void)
326 } 326 }
327} 327}
328 328
329void __attribute__((weak)) mach_reboot_fixups(void)
330{
331}
332
329static void native_machine_emergency_restart(void) 333static void native_machine_emergency_restart(void)
330{ 334{
331 int i; 335 int i;
@@ -337,6 +341,8 @@ static void native_machine_emergency_restart(void)
337 /* Could also try the reset bit in the Hammer NB */ 341 /* Could also try the reset bit in the Hammer NB */
338 switch (reboot_type) { 342 switch (reboot_type) {
339 case BOOT_KBD: 343 case BOOT_KBD:
344 mach_reboot_fixups(); /* for board specific fixups */
345
340 for (i = 0; i < 10; i++) { 346 for (i = 0; i < 10; i++) {
341 kb_wait(); 347 kb_wait();
342 udelay(50); 348 udelay(50);
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index caee1f002fed..0157a6f0f41f 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -407,7 +407,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
407 * The tracer may want to single-step inside the 407 * The tracer may want to single-step inside the
408 * handler too. 408 * handler too.
409 */ 409 */
410 regs->flags &= ~TF_MASK; 410 regs->flags &= ~(TF_MASK | X86_EFLAGS_DF);
411 if (test_thread_flag(TIF_SINGLESTEP)) 411 if (test_thread_flag(TIF_SINGLESTEP))
412 ptrace_notify(SIGTRAP); 412 ptrace_notify(SIGTRAP);
413 413
@@ -500,7 +500,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
500 * The tracer may want to single-step inside the 500 * The tracer may want to single-step inside the
501 * handler too. 501 * handler too.
502 */ 502 */
503 regs->flags &= ~TF_MASK; 503 regs->flags &= ~(TF_MASK | X86_EFLAGS_DF);
504 if (test_thread_flag(TIF_SINGLESTEP)) 504 if (test_thread_flag(TIF_SINGLESTEP))
505 ptrace_notify(SIGTRAP); 505 ptrace_notify(SIGTRAP);
506 506
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index 7347bb14e306..56b72fb67f9b 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -295,7 +295,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
295 see include/asm-x86_64/uaccess.h for details. */ 295 see include/asm-x86_64/uaccess.h for details. */
296 set_fs(USER_DS); 296 set_fs(USER_DS);
297 297
298 regs->flags &= ~X86_EFLAGS_TF; 298 regs->flags &= ~(X86_EFLAGS_TF | X86_EFLAGS_DF);
299 if (test_thread_flag(TIF_SINGLESTEP)) 299 if (test_thread_flag(TIF_SINGLESTEP))
300 ptrace_notify(SIGTRAP); 300 ptrace_notify(SIGTRAP);
301#ifdef DEBUG_SIG 301#ifdef DEBUG_SIG
diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c
index 2ef1a5f8d675..9d406cdc847f 100644
--- a/arch/x86/kernel/step.c
+++ b/arch/x86/kernel/step.c
@@ -166,7 +166,7 @@ static void enable_step(struct task_struct *child, bool block)
166 child->thread.debugctlmsr | DEBUGCTLMSR_BTF); 166 child->thread.debugctlmsr | DEBUGCTLMSR_BTF);
167 } else { 167 } else {
168 write_debugctlmsr(child, 168 write_debugctlmsr(child,
169 child->thread.debugctlmsr & ~TIF_DEBUGCTLMSR); 169 child->thread.debugctlmsr & ~DEBUGCTLMSR_BTF);
170 170
171 if (!child->thread.debugctlmsr) 171 if (!child->thread.debugctlmsr)
172 clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); 172 clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR);
@@ -189,7 +189,7 @@ void user_disable_single_step(struct task_struct *child)
189 * Make sure block stepping (BTF) is disabled. 189 * Make sure block stepping (BTF) is disabled.
190 */ 190 */
191 write_debugctlmsr(child, 191 write_debugctlmsr(child,
192 child->thread.debugctlmsr & ~TIF_DEBUGCTLMSR); 192 child->thread.debugctlmsr & ~DEBUGCTLMSR_BTF);
193 193
194 if (!child->thread.debugctlmsr) 194 if (!child->thread.debugctlmsr)
195 clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); 195 clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR);