[PATCH] syscall latency improvement #2

From: David Howells (dhowells@redhat.com)
Date: Fri Jan 25 2002 - 13:54:06 EST


Hi Linus,

The attached patch (only necessary you apply #1) puts a #error in front of all
the accesses to the changed task_struct variables in the entry.S files of the
non-i386 archs in 2.5.3-pre5.

David

diff -uNr linux-2.5.3-pre5/arch/alpha/kernel/check_asm.c linux-work-253p5/arch/alpha/kernel/check_asm.c
--- linux-2.5.3-pre5/arch/alpha/kernel/check_asm.c Tue Jan 22 09:06:50 2002
+++ linux-work-253p5/arch/alpha/kernel/check_asm.c Fri Jan 25 15:01:07 2002
@@ -18,7 +18,7 @@
         printf("#define TASK_EXEC_DOMAIN %ld\n",
                (long)offsetof(struct task_struct, exec_domain));
         printf("#define TASK_NEED_RESCHED %ld\n",
- (long)offsetof(struct task_struct, need_resched));
+ (long)offsetof(struct task_struct, work.need_resched));
         printf("#define TASK_SIZE %ld\n", sizeof(struct task_struct));
         printf("#define STACK_SIZE %ld\n", sizeof(union task_union));
 
diff -uNr linux-2.5.3-pre5/arch/alpha/kernel/process.c linux-work-253p5/arch/alpha/kernel/process.c
--- linux-2.5.3-pre5/arch/alpha/kernel/process.c Tue Jan 22 09:06:49 2002
+++ linux-work-253p5/arch/alpha/kernel/process.c Fri Jan 25 15:01:07 2002
@@ -82,9 +82,9 @@
 
                 /* Although we are an idle CPU, we do not want to
                    get into the scheduler unnecessarily. */
- long oldval = xchg(&current->need_resched, -1UL);
+ long oldval = xchg(&current->work.need_resched, -1UL);
                 if (!oldval)
- while (current->need_resched < 0);
+ while (current->work.need_resched < 0);
                 schedule();
                 check_pgt_cache();
         }
diff -uNr linux-2.5.3-pre5/arch/arm/kernel/entry-common.S linux-work-253p5/arch/arm/kernel/entry-common.S
--- linux-2.5.3-pre5/arch/arm/kernel/entry-common.S Tue Jan 22 09:06:57 2002
+++ linux-work-253p5/arch/arm/kernel/entry-common.S Fri Jan 25 15:01:07 2002
@@ -34,8 +34,8 @@
  * stack.
  */
 ret_fast_syscall:
- ldr r1, [tsk, #TSK_NEED_RESCHED]
- ldr r2, [tsk, #TSK_SIGPENDING]
+#error ldr r1, [tsk, #TSK_NEED_RESCHED]
+#error ldr r2, [tsk, #TSK_SIGPENDING]
         teq r1, #0 @ need_resched || sigpending
         teqeq r2, #0
         bne slow
@@ -54,8 +54,8 @@
         bl SYMBOL_NAME(schedule)
 ENTRY(ret_to_user)
 ret_slow_syscall:
- ldr r1, [tsk, #TSK_NEED_RESCHED]
- ldr r2, [tsk, #TSK_SIGPENDING]
+#error ldr r1, [tsk, #TSK_NEED_RESCHED]
+#error ldr r2, [tsk, #TSK_SIGPENDING]
 1: teq r1, #0 @ need_resched => schedule()
         bne reschedule
         teq r2, #0 @ sigpending => do_signal()
@@ -66,7 +66,7 @@
         mov r0, #0 @ NULL 'oldset'
         mov r1, sp @ 'regs'
         mov r2, why @ 'syscall'
- b SYMBOL_NAME(do_signal) @ note the bl above sets lr
+#error b SYMBOL_NAME(do_signal) @ note the bl above sets lr
 
 /*
  * This is how we return from a fork. __switch_to will be calling us
@@ -82,7 +82,7 @@
         beq ret_slow_syscall
         mov r1, sp
         mov r0, #1 @ trace exit [IP = 1]
- bl SYMBOL_NAME(syscall_trace)
+#error bl SYMBOL_NAME(syscall_trace)
         b ret_slow_syscall
         
 
@@ -160,7 +160,7 @@
 __sys_trace:
         add r1, sp, #S_OFF
         mov r0, #0 @ trace entry [IP = 0]
- bl SYMBOL_NAME(syscall_trace)
+#error bl SYMBOL_NAME(syscall_trace)
 
         adrsvc al, lr, __sys_trace_return @ return address
         add r1, sp, #S_R0 + S_OFF @ pointer to regs
@@ -173,7 +173,7 @@
         str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
         mov r1, sp
         mov r0, #1 @ trace exit [IP = 1]
- bl SYMBOL_NAME(syscall_trace)
+#error bl SYMBOL_NAME(syscall_trace)
         b ret_slow_syscall
 
         .align 5
diff -uNr linux-2.5.3-pre5/arch/arm/tools/getconstants.c linux-work-253p5/arch/arm/tools/getconstants.c
--- linux-2.5.3-pre5/arch/arm/tools/getconstants.c Tue Jan 22 09:07:03 2002
+++ linux-work-253p5/arch/arm/tools/getconstants.c Fri Jan 25 15:01:07 2002
@@ -37,10 +37,10 @@
 
 void func(void)
 {
-DEFN("TSK_SIGPENDING", OFF_TSK(sigpending));
+#error DEFN("TSK_SIGPENDING", OFF_TSK(sigpending));
 DEFN("TSK_ADDR_LIMIT", OFF_TSK(addr_limit));
-DEFN("TSK_NEED_RESCHED", OFF_TSK(need_resched));
-DEFN("TSK_PTRACE", OFF_TSK(ptrace));
+#error DEFN("TSK_NEED_RESCHED", OFF_TSK(need_resched));
+#error DEFN("TSK_PTRACE", OFF_TSK(ptrace));
 DEFN("TSK_USED_MATH", OFF_TSK(used_math));
 
 DEFN("TSS_SAVE", OFF_TSK(thread.save));
diff -uNr linux-2.5.3-pre5/arch/cris/kernel/entryoffsets.c linux-work-253p5/arch/cris/kernel/entryoffsets.c
--- linux-2.5.3-pre5/arch/cris/kernel/entryoffsets.c Tue Jan 22 09:07:06 2002
+++ linux-work-253p5/arch/cris/kernel/entryoffsets.c Fri Jan 25 15:01:07 2002
@@ -33,9 +33,9 @@
   VAL (NAME, offsetof (TYPE, MEMBER))
 
 /* task_struct offsets. */
-OF (LTASK_SIGPENDING, struct task_struct, sigpending)
-OF (LTASK_NEEDRESCHED, struct task_struct, need_resched)
-OF (LTASK_PTRACE, struct task_struct, ptrace)
+#error OF (LTASK_SIGPENDING, struct task_struct, sigpending)
+#error OF (LTASK_NEEDRESCHED, struct task_struct, need_resched)
+#error OF (LTASK_PTRACE, struct task_struct, ptrace)
 OF (LTASK_PID, struct task_struct, pid)
 
 /* pt_regs offsets. */
diff -uNr linux-2.5.3-pre5/arch/ia64/kernel/entry.S linux-work-253p5/arch/ia64/kernel/entry.S
--- linux-2.5.3-pre5/arch/ia64/kernel/entry.S Tue Jan 22 09:07:04 2002
+++ linux-work-253p5/arch/ia64/kernel/entry.S Fri Jan 25 15:01:07 2002
@@ -433,7 +433,7 @@
         .body
         mov loc2=b6
         ;;
- br.call.sptk.many rp=syscall_trace
+#error br.call.sptk.many rp=syscall_trace
 .ret3: mov rp=loc0
         mov ar.pfs=loc1
         mov b6=loc2
@@ -454,7 +454,7 @@
 
 GLOBAL_ENTRY(ia64_trace_syscall)
         PT_REGS_UNWIND_INFO(0)
- br.call.sptk.many rp=invoke_syscall_trace // give parent a chance to catch syscall args
+#error br.call.sptk.many rp=invoke_syscall_trace // give parent a chance to catch syscall args
 .ret6: br.call.sptk.many rp=b6 // do the syscall
 strace_check_retval:
         cmp.lt p6,p0=r8,r0 // syscall failed?
@@ -467,7 +467,7 @@
 .mem.offset 0,0; st8.spill [r2]=r8 // store return value in slot for r8
 .mem.offset 8,0; st8.spill [r3]=r10 // clear error indication in slot for r10
 ia64_strace_leave_kernel:
- br.call.sptk.many rp=invoke_syscall_trace // give parent a chance to catch return value
+#error br.call.sptk.many rp=invoke_syscall_trace // give parent a chance to catch return value
 .rety: br.cond.sptk ia64_leave_kernel
 
 strace_error:
@@ -530,14 +530,14 @@
 #ifdef CONFIG_PERFMON
 (pUser) ld8 r19=[r19] // load current->thread.pfm_must_block
 #endif
-(pUser) ld8 r17=[r17] // load current->need_resched
-(pUser) ld4 r18=[r18] // load current->sigpending
+#error (pUser) ld8 r17=[r17] // load current->need_resched
+#error (pUser) ld4 r18=[r18] // load current->sigpending
         ;;
 #ifdef CONFIG_PERFMON
 (pUser) cmp.ne.unc p9,p0=r19,r0 // current->thread.pfm_must_block != 0?
 #endif
-(pUser) cmp.ne.unc p7,p0=r17,r0 // current->need_resched != 0?
-(pUser) cmp.ne.unc p8,p0=r18,r0 // current->sigpending != 0?
+#error (pUser) cmp.ne.unc p7,p0=r17,r0 // current->need_resched != 0?
+#errror (pUser) cmp.ne.unc p8,p0=r18,r0 // current->sigpending != 0?
         ;;
         adds r2=PT(R8)+16,r12
         adds r3=PT(R9)+16,r12
@@ -816,7 +816,7 @@
         .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!)
         st8 [sp]=r9,-16 // allocate space for ar.unat and save it
         .body
- br.call.sptk.many rp=ia64_do_signal
+#error br.call.sptk.many rp=ia64_do_signal
 .ret15: .restore sp
         adds sp=16,sp // pop scratch stack space
         ;;
diff -uNr linux-2.5.3-pre5/arch/ia64/tools/print_offsets.c linux-work-253p5/arch/ia64/tools/print_offsets.c
--- linux-2.5.3-pre5/arch/ia64/tools/print_offsets.c Tue Jan 22 09:07:05 2002
+++ linux-work-253p5/arch/ia64/tools/print_offsets.c Fri Jan 25 15:01:07 2002
@@ -51,9 +51,9 @@
     { "SIGFRAME_SIZE", sizeof (struct sigframe) },
     { "UNW_FRAME_INFO_SIZE", sizeof (struct unw_frame_info) },
     { "", 0 }, /* spacer */
- { "IA64_TASK_PTRACE_OFFSET", offsetof (struct task_struct, ptrace) },
- { "IA64_TASK_SIGPENDING_OFFSET", offsetof (struct task_struct, sigpending) },
- { "IA64_TASK_NEED_RESCHED_OFFSET", offsetof (struct task_struct, need_resched) },
+#error { "IA64_TASK_PTRACE_OFFSET", offsetof (struct task_struct, ptrace) },
+#error { "IA64_TASK_SIGPENDING_OFFSET", offsetof (struct task_struct, sigpending) },
+#error { "IA64_TASK_NEED_RESCHED_OFFSET", offsetof (struct task_struct, need_resched) },
     { "IA64_TASK_PROCESSOR_OFFSET", offsetof (struct task_struct, processor) },
     { "IA64_TASK_THREAD_OFFSET", offsetof (struct task_struct, thread) },
     { "IA64_TASK_THREAD_KSP_OFFSET", offsetof (struct task_struct, thread.ksp) },
diff -uNr linux-2.5.3-pre5/arch/m68k/kernel/m68k_defs.c linux-work-253p5/arch/m68k/kernel/m68k_defs.c
--- linux-2.5.3-pre5/arch/m68k/kernel/m68k_defs.c Tue Jan 22 09:06:55 2002
+++ linux-work-253p5/arch/m68k/kernel/m68k_defs.c Fri Jan 25 15:01:07 2002
@@ -25,8 +25,8 @@
         DEFINE(TASK_STATE, offsetof(struct task_struct, state));
         DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
         DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
- DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, sigpending));
- DEFINE(TASK_NEEDRESCHED, offsetof(struct task_struct, need_resched));
+#error DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, work.sigpending));
+#error DEFINE(TASK_NEEDRESCHED, offsetof(struct task_struct, work.need_resched));
         DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
         DEFINE(TASK_MM, offsetof(struct task_struct, mm));
         DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
diff -uNr linux-2.5.3-pre5/arch/mips/kernel/entry.S linux-work-253p5/arch/mips/kernel/entry.S
--- linux-2.5.3-pre5/arch/mips/kernel/entry.S Tue Jan 22 09:06:51 2002
+++ linux-work-253p5/arch/mips/kernel/entry.S Fri Jan 25 15:01:07 2002
@@ -36,7 +36,7 @@
 EXPORT(ret_from_fork)
                 move a0, v0 # prev
                 jal schedule_tail
- lw t0, TASK_PTRACE($28) # syscall tracing enabled?
+#error lw t0, TASK_PTRACE($28) # syscall tracing enabled?
                 andi t0, PT_TRACESYS
                 bnez t0, tracesys_exit
                 j ret_from_sys_call
@@ -62,8 +62,8 @@
                 mtc0 t0, CP0_STATUS
                 nop; nop; nop
 
- lw v0, TASK_NEED_RESCHED($28)
- lw v1, TASK_SIGPENDING($28)
+#error lw v0, TASK_NEED_RESCHED($28)
+#error lw v1, TASK_SIGPENDING($28)
                 bnez v0, reschedule
                 bnez v1, signal_return
 restore_all: .set noat
@@ -80,7 +80,7 @@
 
                 move a0, zero
                 move a1, sp
- jal do_signal
+#error jal do_signal
                 b restore_all
 
 /*
diff -uNr linux-2.5.3-pre5/arch/mips/kernel/scall_o32.S linux-work-253p5/arch/mips/kernel/scall_o32.S
--- linux-2.5.3-pre5/arch/mips/kernel/scall_o32.S Tue Jan 22 09:06:51 2002
+++ linux-work-253p5/arch/mips/kernel/scall_o32.S Fri Jan 25 15:01:07 2002
@@ -49,7 +49,7 @@
 
 stack_done:
         sw a3, PT_R26(sp) # save for syscall restart
- lw t0, TASK_PTRACE($28) # syscall tracing enabled?
+#error lw t0, TASK_PTRACE($28) # syscall tracing enabled?
         andi t0, PT_TRACESYS
         bnez t0, trace_a_syscall
 
@@ -70,9 +70,9 @@
         xori t0, t0, 1
         mtc0 t0, CP0_STATUS
 
- lw t2, TASK_NEED_RESCHED($28)
+#error lw t2, TASK_NEED_RESCHED($28)
         bnez t2, o32_reschedule
- lw v0, TASK_SIGPENDING($28)
+#error lw v0, TASK_SIGPENDING($28)
         bnez v0, signal_return
 restore_all:
         RESTORE_SOME
@@ -88,7 +88,7 @@
 
         move a0, zero
         move a1, sp
- jal do_signal
+#error jal do_signal
         b restore_all
 
 o32_reschedule:
@@ -101,7 +101,7 @@
 trace_a_syscall:
         SAVE_STATIC
         sw t2, PT_R1(sp)
- jal syscall_trace
+#error jal syscall_trace
         lw t2, PT_R1(sp)
 
         lw a0, PT_R4(sp) # Restore argument registers
@@ -119,7 +119,7 @@
         sw v0, PT_R0(sp) # set flag for syscall restarting
 1: sw v0, PT_R2(sp) # result
 
- jal syscall_trace
+#error jal syscall_trace
         j ret_from_sys_call
 
 /* ------------------------------------------------------------------------ */
diff -uNr linux-2.5.3-pre5/arch/mips/kernel/smp.c linux-work-253p5/arch/mips/kernel/smp.c
--- linux-2.5.3-pre5/arch/mips/kernel/smp.c Tue Jan 22 09:06:51 2002
+++ linux-work-253p5/arch/mips/kernel/smp.c Fri Jan 25 15:01:07 2002
@@ -179,7 +179,7 @@
 
 static void reschedule_this_cpu(void *dummy)
 {
- current->need_resched = 1;
+ current->work.need_resched = 1;
 }
 
 void FASTCALL(smp_send_reschedule(int cpu))
diff -uNr linux-2.5.3-pre5/arch/mips/tools/offset.c linux-work-253p5/arch/mips/tools/offset.c
--- linux-2.5.3-pre5/arch/mips/tools/offset.c Tue Jan 22 09:06:51 2002
+++ linux-work-253p5/arch/mips/tools/offset.c Fri Jan 25 15:01:07 2002
@@ -79,9 +79,9 @@
         text("/* MIPS task_struct offsets. */");
         offset("#define TASK_STATE ", struct task_struct, state);
         offset("#define TASK_FLAGS ", struct task_struct, flags);
- offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
- offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
- offset("#define TASK_PTRACE ", struct task_struct, ptrace);
+#error offset("#define TASK_SIGPENDING ", struct task_struct, work.sigpending);
+#error offset("#define TASK_NEED_RESCHED ", struct task_struct, work.need_resched);
+#error offset("#define TASK_PTRACE ", struct task_struct, ptrace);
         offset("#define TASK_COUNTER ", struct task_struct, counter);
         offset("#define TASK_NICE ", struct task_struct, nice);
         offset("#define TASK_MM ", struct task_struct, mm);
diff -uNr linux-2.5.3-pre5/arch/mips64/kernel/entry.S linux-work-253p5/arch/mips64/kernel/entry.S
--- linux-2.5.3-pre5/arch/mips64/kernel/entry.S Tue Jan 22 09:07:05 2002
+++ linux-work-253p5/arch/mips64/kernel/entry.S Fri Jan 25 15:01:07 2002
@@ -17,7 +17,7 @@
 #include <asm/stackframe.h>
 
 /* This duplicates the definition from <linux/sched.h> */
-#define PT_TRACESYS 0x00000002 /* tracing system calls */
+#error #define PT_TRACESYS 0x00000002 /* tracing system calls */
 
 #define KU_USER 0x10
 
@@ -26,8 +26,8 @@
 FEXPORT(ret_from_fork)
                 move a0, v0 # prev
                 jal schedule_tail
- lw t0, TASK_PTRACE($28) # syscall tracing enabled?
- andi t0, PT_TRACESYS
+#error lw t0, TASK_PTRACE($28) # syscall tracing enabled?
+#error andi t0, PT_TRACESYS
                 bnez t0, tracesys_exit
                 j ret_from_sys_call
 
@@ -50,8 +50,8 @@
                 xori t0, t0, 1
                 mtc0 t0, CP0_STATUS
 
- ld v0, TASK_NEED_RESCHED($28)
- lw v1, TASK_SIGPENDING($28)
+#error ld v0, TASK_NEED_RESCHED($28)
+#error lw v1, TASK_SIGPENDING($28)
                 bnez v0, reschedule
                 bnez v1, signal_return
 
diff -uNr linux-2.5.3-pre5/arch/mips64/kernel/scall_o32.S linux-work-253p5/arch/mips64/kernel/scall_o32.S
--- linux-2.5.3-pre5/arch/mips64/kernel/scall_o32.S Tue Jan 22 09:07:05 2002
+++ linux-work-253p5/arch/mips64/kernel/scall_o32.S Fri Jan 25 15:01:07 2002
@@ -22,7 +22,7 @@
 #include <asm/sysmips.h>
 
 /* This duplicates the definition from <linux/sched.h> */
-#define PT_TRACESYS 0x00000002 /* tracing system calls */
+#error #define PT_TRACESYS 0x00000002 /* tracing system calls */
 
 /* This duplicates the definition from <asm/signal.h> */
 #define SIGILL 4 /* Illegal instruction (ANSI). */
@@ -54,8 +54,8 @@
         bgez t0, stackargs
 
 stack_done:
- ld t0, TASK_PTRACE($28) # syscall tracing enabled?
- andi t0, PT_TRACESYS
+#error ld t0, TASK_PTRACE($28) # syscall tracing enabled?
+#error andi t0, PT_TRACESYS
                 bnez t0, trace_a_syscall
 
                 jalr t2 # Do The Real Thing (TM)
@@ -75,9 +75,9 @@
                 xori t0, t0, 1
                 mtc0 t0, CP0_STATUS
 
- ld t2, TASK_NEED_RESCHED($28)
+#error ld t2, TASK_NEED_RESCHED($28)
                 bnez t2, o32_reschedule
- lw v0, TASK_SIGPENDING($28)
+#error lw v0, TASK_SIGPENDING($28)
                 bnez v0, signal_return
 
 restore_all: RESTORE_SOME
@@ -92,7 +92,7 @@
                 move a0, zero
                 move a1, sp
                 SAVE_STATIC
- jal do_signal
+#error jal do_signal
 
 o32_reschedule:
                 SAVE_STATIC
@@ -130,7 +130,7 @@
         sd v0, PT_R0(sp) # set flag for syscall restarting
 1: sd v0, PT_R2(sp) # result
 
- jal syscall_trace
+#error jal syscall_trace
         j o32_ret_from_sys_call
 
 /* ------------------------------------------------------------------------ */
@@ -213,13 +213,13 @@
 1: sd v0, PT_R2(sp) # result
 
         /* Success, so skip usual error handling garbage. */
- ld t0, TASK_PTRACE($28) # syscall tracing enabled?
- andi t0, PT_TRACESYS
+#error ld t0, TASK_PTRACE($28) # syscall tracing enabled?
+#error andi t0, PT_TRACESYS
         bnez t0, 1f
         b o32_ret_from_sys_call
 
 1: SAVE_STATIC
- jal syscall_trace
+#error jal syscall_trace
         li a3, 0 # success
         j ret_from_sys_call
 
diff -uNr linux-2.5.3-pre5/arch/mips64/tools/offset.c linux-work-253p5/arch/mips64/tools/offset.c
--- linux-2.5.3-pre5/arch/mips64/tools/offset.c Tue Jan 22 09:07:05 2002
+++ linux-work-253p5/arch/mips64/tools/offset.c Fri Jan 25 15:01:07 2002
@@ -76,9 +76,9 @@
         text("/* MIPS task_struct offsets. */");
         offset("#define TASK_STATE ", struct task_struct, state);
         offset("#define TASK_FLAGS ", struct task_struct, flags);
- offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
- offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
- offset("#define TASK_PTRACE ", struct task_struct, ptrace);
+#error offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
+#error offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
+#error offset("#define TASK_PTRACE ", struct task_struct, ptrace);
         offset("#define TASK_COUNTER ", struct task_struct, counter);
         offset("#define TASK_NICE ", struct task_struct, nice);
         offset("#define TASK_MM ", struct task_struct, mm);
diff -uNr linux-2.5.3-pre5/arch/parisc/kernel/entry.S linux-work-253p5/arch/parisc/kernel/entry.S
--- linux-2.5.3-pre5/arch/parisc/kernel/entry.S Tue Jan 22 09:07:06 2002
+++ linux-work-253p5/arch/parisc/kernel/entry.S Fri Jan 25 15:01:07 2002
@@ -650,14 +650,14 @@
         copy %r30,%r1
         /* FIXME! depi below has hardcoded dependency on kernel stack size */
         depi 0,31,14,%r1 /* get task pointer */
- LDREG TASK_NEED_RESCHED(%r1),%r19 /* sched.h: long need_resched */
+#error LDREG TASK_NEED_RESCHED(%r1),%r19 /* sched.h: long need_resched */
         comib,<>,n 0,%r19,intr_do_resched /* forward */
 
 intr_check_sig:
         /* As above */
         copy %r30,%r1
         depi 0,31,14,%r1 /* get task pointer */
- ldw TASK_SIGPENDING(%r1),%r19 /* sched.h: int sigpending */
+#error ldw TASK_SIGPENDING(%r1),%r19 /* sched.h: int sigpending */
         comib,<>,n 0,%r19,intr_do_signal /* forward */
 
 intr_restore:
@@ -719,7 +719,7 @@
         copy %r0, %r24 /* unsigned long in_syscall */
         copy %r16, %r25 /* struct pt_regs *regs */
         ssm PSW_SM_I, %r0
- bl do_signal,%r2
+#error bl do_signal,%r2
         copy %r0, %r26 /* sigset_t *oldset = NULL */
 
         b intr_restore
@@ -1699,20 +1699,20 @@
 
         /* check for reschedule */
 
- LDREG TASK_NEED_RESCHED-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* long */
+#error LDREG TASK_NEED_RESCHED-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* long */
         comib,<>,n 0,%r19,syscall_do_resched /* forward */
 
 syscall_check_sig:
         ldo -TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
         /* check for pending signals */
- ldw TASK_SIGPENDING(%r1),%r19
+#error ldw TASK_SIGPENDING(%r1),%r19
         comib,<>,n 0,%r19,syscall_do_signal /* forward */
 
 syscall_restore:
         /* disable interrupts while dicking with the kernel stack, */
         /* or life can become unpleasant */
         rsm PSW_SM_I, %r20
- LDREG TASK_PTRACE(%r1), %r19 /* Are we being ptraced? */
+#error LDREG TASK_PTRACE(%r1), %r19 /* Are we being ptraced? */
         bb,<,n %r19,31,syscall_restore_rfi
         LDREG TASK_PT_GR20(%r1),%r19
         mtctl %r19, %cr27
@@ -1840,7 +1840,7 @@
 
         ldi 1, %r24 /* unsigned long in_syscall */
 
- bl do_signal,%r2
+#error bl do_signal,%r2
         copy %r0, %r26 /* sigset_t *oldset = NULL */
 
         ldo -TASK_SZ_ALGN-FRAME_SIZE(%r30), %r1 /* reload task ptr */
diff -uNr linux-2.5.3-pre5/arch/parisc/tools/offset.c linux-work-253p5/arch/parisc/tools/offset.c
--- linux-2.5.3-pre5/arch/parisc/tools/offset.c Tue Jan 22 09:07:06 2002
+++ linux-work-253p5/arch/parisc/tools/offset.c Fri Jan 25 15:01:07 2002
@@ -241,11 +241,11 @@
         text("/* PARISC task_struct offsets. */");
         offset("#define TASK_STATE ", struct task_struct, state);
         offset("#define TASK_FLAGS ", struct task_struct, flags);
- offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
+#error offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
         offset("#define TASK_SEGMENT ", struct task_struct, addr_limit);
- offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
+#error offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
         offset("#define TASK_COUNTER ", struct task_struct, counter);
- offset("#define TASK_PTRACE ", struct task_struct, ptrace);
+#error offset("#define TASK_PTRACE ", struct task_struct, ptrace);
         offset("#define TASK_NICE ", struct task_struct, nice);
         offset("#define TASK_MM ", struct task_struct, mm);
         offset("#define TASK_PROCESSOR ", struct task_struct, processor);
diff -uNr linux-2.5.3-pre5/arch/ppc/kernel/entry.S linux-work-253p5/arch/ppc/kernel/entry.S
--- linux-2.5.3-pre5/arch/ppc/kernel/entry.S Tue Jan 22 09:06:53 2002
+++ linux-work-253p5/arch/ppc/kernel/entry.S Fri Jan 25 15:01:07 2002
@@ -261,9 +261,9 @@
         .globl ret_from_fork
 ret_from_fork:
         bl schedule_tail
- lwz r0,TASK_PTRACE(r2)
+#error lwz r0,TASK_PTRACE(r2)
         andi. r0,r0,PT_TRACESYS
- bnel- syscall_trace
+#error bnel- syscall_trace
         b ret_from_except
 
         .globl ret_from_intercept
@@ -279,16 +279,16 @@
         lwz r3,_MSR(r1) /* Returning to user mode? */
         andi. r3,r3,MSR_PR
         beq+ do_signal_ret /* if so, check need_resched and signals */
- lwz r3,NEED_RESCHED(r2)
+#error lwz r3,NEED_RESCHED(r2)
         cmpi 0,r3,0 /* check need_resched flag */
         beq+ 7f
         bl schedule
-7: lwz r5,SIGPENDING(r2) /* Check for pending unblocked signals */
+#error 7: lwz r5,SIGPENDING(r2) /* Check for pending unblocked signals */
         cmpwi 0,r5,0
         beq+ do_signal_ret
         li r3,0
         addi r4,r1,STACK_FRAME_OVERHEAD
- bl do_signal
+#error bl do_signal
         .globl do_signal_ret
 do_signal_ret:
         .globl ret_to_user_hook
diff -uNr linux-2.5.3-pre5/arch/ppc/kernel/mk_defs.c linux-work-253p5/arch/ppc/kernel/mk_defs.c
--- linux-2.5.3-pre5/arch/ppc/kernel/mk_defs.c Tue Jan 22 09:06:53 2002
+++ linux-work-253p5/arch/ppc/kernel/mk_defs.c Fri Jan 25 15:01:07 2002
@@ -39,7 +39,7 @@
         DEFINE(NEXT_TASK, offsetof(struct task_struct, next_task));
         DEFINE(COUNTER, offsetof(struct task_struct, counter));
         DEFINE(PROCESSOR, offsetof(struct task_struct, processor));
- DEFINE(SIGPENDING, offsetof(struct task_struct, sigpending));
+#error DEFINE(SIGPENDING, offsetof(struct task_struct, sigpending));
         DEFINE(THREAD, offsetof(struct task_struct, thread));
         DEFINE(MM, offsetof(struct task_struct, mm));
         DEFINE(ACTIVE_MM, offsetof(struct task_struct, active_mm));
@@ -50,8 +50,8 @@
         DEFINE(PT_REGS, offsetof(struct thread_struct, regs));
         DEFINE(PT_TRACESYS, PT_TRACESYS);
         DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
- DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
- DEFINE(NEED_RESCHED, offsetof(struct task_struct, need_resched));
+#error DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
+#error DEFINE(NEED_RESCHED, offsetof(struct task_struct, need_resched));
         DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0]));
         DEFINE(THREAD_FPSCR, offsetof(struct thread_struct, fpscr));
 #ifdef CONFIG_ALTIVEC
diff -uNr linux-2.5.3-pre5/arch/ppc/kernel/smp.c linux-work-253p5/arch/ppc/kernel/smp.c
--- linux-2.5.3-pre5/arch/ppc/kernel/smp.c Tue Jan 22 09:06:53 2002
+++ linux-work-253p5/arch/ppc/kernel/smp.c Fri Jan 25 15:01:07 2002
@@ -106,7 +106,7 @@
                 smp_call_function_interrupt();
                 break;
         case PPC_MSG_RESCHEDULE:
- current->need_resched = 1;
+ current->work.need_resched = 1;
                 break;
         case PPC_MSG_INVALIDATE_TLB:
                 _tlbia();
diff -uNr linux-2.5.3-pre5/arch/s390/kernel/entry.S linux-work-253p5/arch/s390/kernel/entry.S
--- linux-2.5.3-pre5/arch/s390/kernel/entry.S Tue Jan 22 09:07:06 2002
+++ linux-work-253p5/arch/s390/kernel/entry.S Fri Jan 25 15:01:07 2002
@@ -76,9 +76,9 @@
  */
 state = 0
 flags = 4
-sigpending = 8
-need_resched = 24
-tsk_ptrace = 28
+#error sigpending = 8
+#error need_resched = 24
+#error tsk_ptrace = 28
 processor = 56
 
 /*
@@ -218,7 +218,7 @@
         stosm 24(%r15),0x03 # reenable interrupts
         sll %r8,2
         l %r8,sys_call_table-entry_base(8,%r13) # get address of system call
- tm tsk_ptrace+3(%r9),0x02 # PT_TRACESYS
+#error tm tsk_ptrace+3(%r9),0x02 # PT_TRACESYS
         bnz BASED(sysc_tracesys)
         basr %r14,%r8 # call sys_xxxx
         st %r2,SP_R2(%r15) # store return value (change R2 on stack)
@@ -231,9 +231,9 @@
 #
 # check, if reschedule is needed
 #
- icm %r0,15,need_resched(%r9) # get need_resched from task_struct
+#error icm %r0,15,need_resched(%r9) # get need_resched from task_struct
         bnz BASED(sysc_reschedule)
- icm %r0,15,sigpending(%r9) # get sigpending from task_struct
+#error icm %r0,15,sigpending(%r9) # get sigpending from task_struct
         bnz BASED(sysc_signal_return)
 sysc_leave:
         tm SP_PGM_OLD_ILC(%r15),0xff
@@ -744,9 +744,9 @@
 #
 # check, if reschedule is needed
 #
- icm %r0,15,need_resched(%r9) # get need_resched from task_struct
+#error icm %r0,15,need_resched(%r9) # get need_resched from task_struct
         bnz BASED(io_reschedule)
- icm %r0,15,sigpending(%r9) # get sigpending from task_struct
+#error icm %r0,15,sigpending(%r9) # get sigpending from task_struct
         bnz BASED(io_signal_return)
 io_leave:
         stnsm 24(%r15),0xfc # disable I/O and ext. interrupts
@@ -874,7 +874,7 @@
  */
 .Ls390_mcck: .long s390_do_machine_check
 .Ldo_IRQ: .long do_IRQ
-.Ldo_signal: .long do_signal
+#error .Ldo_signal: .long do_signal
 .Ldo_softirq: .long do_softirq
 .Lentry_base: .long entry_base
 .Lext_hash: .long ext_int_hash
@@ -891,7 +891,7 @@
 .Lsigreturn: .long sys_sigreturn
 .Lsigsuspend: .long sys_sigsuspend
 .Lsigaltstack: .long sys_sigaltstack
-.Ltrace: .long syscall_trace
+#error .Ltrace: .long syscall_trace
 .Lvfork: .long sys_vfork
 
 #ifdef CONFIG_SMP
diff -uNr linux-2.5.3-pre5/arch/s390x/kernel/entry.S linux-work-253p5/arch/s390x/kernel/entry.S
--- linux-2.5.3-pre5/arch/s390x/kernel/entry.S Tue Jan 22 09:07:06 2002
+++ linux-work-253p5/arch/s390x/kernel/entry.S Fri Jan 25 15:01:07 2002
@@ -76,9 +76,9 @@
  */
 state = 0
 flags = 8
-sigpending = 16
-need_resched = 32
-tsk_ptrace = 40
+#error sigpending = 16
+#error need_resched = 32
+#error tsk_ptrace = 40
 processor = 92
 
 /*
@@ -220,10 +220,10 @@
 #
 # check, if reschedule is needed
 #
- lg %r0,need_resched(%r9) # get need_resched from task_struct
+#error lg %r0,need_resched(%r9) # get need_resched from task_struct
         ltgr %r0,%r0
         jnz sysc_reschedule
- icm %r0,15,sigpending(%r9) # get sigpending from task_struct
+#error icm %r0,15,sigpending(%r9) # get sigpending from task_struct
         jnz sysc_signal_return
 sysc_leave:
         tm SP_PGM_OLD_ILC(%r15),0xff
@@ -246,7 +246,7 @@
 sysc_tracesys:
         lghi %r2,-ENOSYS
         stg %r2,SP_R2(%r15) # give sysc_trace an -ENOSYS retval
- brasl %r14,syscall_trace
+#error brasl %r14,syscall_trace
         lg %r2,SP_R2(%r15)
         cghi %r2,-ENOSYS
         je sysc_tracesys_dn1
@@ -263,7 +263,7 @@
         basr %r14,%r8 # call sys_xxx
         stg %r2,SP_R2(%r15) # store return value
         larl %r14,sysc_return
- jg syscall_trace # return point is sysc_return
+#error jg syscall_trace # return point is sysc_return
 
 #
 # call schedule with sysc_return as return-address
@@ -734,10 +734,10 @@
 #
 # check, if reschedule is needed
 #
- lg %r0,need_resched(%r9) # get need_resched from task_struct
+#error lg %r0,need_resched(%r9) # get need_resched from task_struct
         ltgr %r0,%r0
         jnz io_reschedule
- icm %r0,15,sigpending(%r9) # get sigpending from task_struct
+#error icm %r0,15,sigpending(%r9) # get sigpending from task_struct
         jnz io_signal_return
 io_leave:
         stnsm 48(%r15),0xfc # disable I/O and ext. interrupts
diff -uNr linux-2.5.3-pre5/arch/sh/kernel/entry.S linux-work-253p5/arch/sh/kernel/entry.S
--- linux-2.5.3-pre5/arch/sh/kernel/entry.S Fri Jan 25 14:52:14 2002
+++ linux-work-253p5/arch/sh/kernel/entry.S Fri Jan 25 15:02:41 2002
@@ -61,11 +61,11 @@
  * These are offsets into the task-struct.
  */
 flags = 4
-sigpending = 8
-need_resched = 20
-tsk_ptrace = 24
+#error sigpending = 8
+#error need_resched = 20
+#error tsk_ptrace = 24
 
-PT_TRACESYS = 0x00000002
+#error PT_TRACESYS = 0x00000002
 
 ENOSYS = 38
 EINVAL = 22
@@ -300,8 +300,8 @@
         ! If we're being traced, return via syscall_ret_trace, otherwise
         ! return directly to ret_from_syscall
         stc k_current, r0
- mov.l @(tsk_ptrace,r0), r0 ! Is current PTRACE_SYSCALL'd?
- mov #PT_TRACESYS, r1
+#error mov.l @(tsk_ptrace,r0), r0 ! Is current PTRACE_SYSCALL'd?
+#error mov #PT_TRACESYS, r1
         tst r1, r0
         bt ret_from_syscall
         bra syscall_ret_trace
@@ -371,8 +371,8 @@
         STI()
         !
         stc k_current, r11
- mov.l @(tsk_ptrace,r11), r10 ! Is current PTRACE_SYSCALL'd?
- mov #PT_TRACESYS, r11
+#error mov.l @(tsk_ptrace,r11), r10 ! Is current PTRACE_SYSCALL'd?
+#error mov #PT_TRACESYS, r11
         tst r11, r10
         bt 5f
         ! Yes it is traced.
@@ -497,7 +497,7 @@
         .align 2
 __TRA: .long TRA
 __syscall_trace:
- .long SYMBOL_NAME(syscall_trace)
+#error .long SYMBOL_NAME(syscall_trace)
 __n_sys:.long NR_syscalls
 __sct: .long SYMBOL_NAME(sys_call_table)
 __syscall_ret_trace:
@@ -545,10 +545,10 @@
         ldc r0, sr
         !
         stc k_current, r1
- mov.l @(need_resched,r1), r0
+#error mov.l @(need_resched,r1), r0
         tst r0, r0
         bf reschedule
- mov.l @(sigpending,r1), r0
+#error mov.l @(sigpending,r1), r0
         tst r0, r0
         bt restore_all
 signal_return:
@@ -560,7 +560,7 @@
          lds r0, pr
         .align 2
 __do_signal:
- .long SYMBOL_NAME(do_signal)
+#error .long SYMBOL_NAME(do_signal)
 __irq_stat:
         .long SYMBOL_NAME(irq_stat)
 
diff -uNr linux-2.5.3-pre5/arch/sparc/kernel/rtrap.S linux-work-253p5/arch/sparc/kernel/rtrap.S
--- linux-2.5.3-pre5/arch/sparc/kernel/rtrap.S Tue Jan 22 09:06:50 2002
+++ linux-work-253p5/arch/sparc/kernel/rtrap.S Fri Jan 25 15:01:07 2002
@@ -58,15 +58,15 @@
          nop
 
 1:
- ld [%curptr + AOFF_task_need_resched], %g2
+#error ld [%curptr + AOFF_task_need_resched], %g2
         orcc %g2, %g0, %g0
         be signal_p
- ld [%curptr + AOFF_task_sigpending], %g2
+#error ld [%curptr + AOFF_task_sigpending], %g2
 
         call C_LABEL(schedule)
          nop
 
- ld [%curptr + AOFF_task_sigpending], %g2
+#error ld [%curptr + AOFF_task_sigpending], %g2
 signal_p:
         cmp %g2, 0
         bz,a ret_trap_continue
diff -uNr linux-2.5.3-pre5/arch/sparc/kernel/smp.c linux-work-253p5/arch/sparc/kernel/smp.c
--- linux-2.5.3-pre5/arch/sparc/kernel/smp.c Fri Jan 25 14:52:15 2002
+++ linux-work-253p5/arch/sparc/kernel/smp.c Fri Jan 25 15:01:07 2002
@@ -247,7 +247,7 @@
 /* Reschedule call back. */
 void smp_reschedule_irq(void)
 {
- current->need_resched = 1;
+ current->work.need_resched = 1;
 }
 
 /* Stopping processors. */
diff -uNr linux-2.5.3-pre5/arch/sparc64/kernel/process.c linux-work-253p5/arch/sparc64/kernel/process.c
--- linux-2.5.3-pre5/arch/sparc64/kernel/process.c Fri Jan 25 14:52:15 2002
+++ linux-work-253p5/arch/sparc64/kernel/process.c Fri Jan 25 15:01:07 2002
@@ -54,7 +54,7 @@
 
         /* endless idle loop with no priority at all */
         for (;;) {
- /* If current->need_resched is zero we should really
+ /* If current->work.need_resched is zero we should really
                  * setup for a system wakup event and execute a shutdown
                  * instruction.
                  *
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:35 EST