Commit 4964368c authored by Richard Henderson's avatar Richard Henderson

[ALPHA] Fixup fallout from force_successful_syscall_return change.

parent 72001697
...@@ -31,6 +31,7 @@ void foo(void) ...@@ -31,6 +31,7 @@ void foo(void)
DEFINE(TASK_TGID, offsetof(struct task_struct, tgid)); DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
BLANK(); BLANK();
DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
DEFINE(PT_PTRACED, PT_PTRACED); DEFINE(PT_PTRACED, PT_PTRACED);
DEFINE(CLONE_VM, CLONE_VM); DEFINE(CLONE_VM, CLONE_VM);
DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/asm_offsets.h>
.globl swapper_pg_dir .globl swapper_pg_dir
.globl _stext .globl _stext
...@@ -25,7 +26,7 @@ __start: ...@@ -25,7 +26,7 @@ __start:
/* We need to get current_task_info loaded up... */ /* We need to get current_task_info loaded up... */
lda $8,init_thread_union lda $8,init_thread_union
/* ... and find our stack ... */ /* ... and find our stack ... */
lda $30,0x4000($8) lda $30,0x4000 - SIZEOF_PT_REGS($8)
/* ... and then we can start the kernel. */ /* ... and then we can start the kernel. */
jsr $26,start_kernel jsr $26,start_kernel
call_pal PAL_halt call_pal PAL_halt
......
...@@ -71,15 +71,8 @@ struct switch_stack { ...@@ -71,15 +71,8 @@ struct switch_stack {
#define instruction_pointer(regs) ((regs)->pc) #define instruction_pointer(regs) ((regs)->pc)
extern void show_regs(struct pt_regs *); extern void show_regs(struct pt_regs *);
/* #define alpha_task_regs(task) \
* TODO: if kernel-only threads do not have a dummy pt_regs structure at the ((struct pt_regs *) ((long) (task)->thread_info + 2*PAGE_SIZE) - 1)
* top of the stack, this would cause kernel stack corruption. Either check
* first that we're not dealing with a kernel thread or change the kernel
* stacks to allocate a dummy pt_regs structure.
*/
#define alpha_task_regs(task) ((struct pt_regs *) \
((long) task->thread_info + PAGE_SIZE) - 1)
#define force_successful_syscall_return() (alpha_task_regs(current)->r0 = 0) #define force_successful_syscall_return() (alpha_task_regs(current)->r0 = 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment