1 diff -urN linux.orig/Documentation/Configure.help linux/Documentation/Configure.help
2 --- linux.orig/Documentation/Configure.help Tue May 21 01:32:34 2002
3 +++ linux/Documentation/Configure.help Wed Aug 7 17:44:10 2002
5 "PPro/6X86MX" Select this for the Cyrix/IBM/National Semiconductor
6 6x86MX/MII and Intel Pentium II/Pentium Pro.
8 + "K7" Select this for the AMD Athlon K7 CPUs with 64 bytes large L1
10 + "P4" Select this for the Intel Pentium4 CPUs with 128 bytes large L1
13 If you don't know what to do, choose "386".
16 diff -urN linux.orig/arch/alpha/kernel/time.c linux/arch/alpha/kernel/time.c
17 --- linux.orig/arch/alpha/kernel/time.c Sun Mar 25 18:31:46 2001
18 +++ linux/arch/alpha/kernel/time.c Wed Aug 7 17:53:48 2002
20 irq_handler = timer_interrupt;
21 if (request_irq(TIMER_IRQ, irq_handler, 0, "timer", NULL))
22 panic("Could not allocate timer IRQ!");
23 + do_get_fast_time = do_gettimeofday;
27 +timeval_normalize(struct timeval * tv)
31 + __sec = tv->tv_usec / 1000000;
34 + tv->tv_usec %= 1000000;
35 + tv->tv_sec += __sec;
44 - if (usec >= 1000000) {
52 + timeval_normalize(tv);
56 diff -urN linux.orig/arch/alpha/mm/fault.c linux/arch/alpha/mm/fault.c
57 --- linux.orig/arch/alpha/mm/fault.c Sun Mar 25 18:37:29 2001
58 +++ linux/arch/alpha/mm/fault.c Wed Aug 7 17:57:18 2002
61 if (!(vma->vm_flags & VM_GROWSDOWN))
63 - if (expand_stack(vma, address))
64 + if (expand_stack(vma, address, NULL))
67 * Ok, we have a good vm_area for this memory access, so
68 diff -urN linux.orig/arch/i386/Makefile linux/arch/i386/Makefile
69 --- linux.orig/arch/i386/Makefile Sun Mar 25 18:31:45 2001
70 +++ linux/arch/i386/Makefile Wed Aug 7 17:44:10 2002
72 CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686
75 +ifdef CONFIG_M686_L1_64
76 +CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686
79 +ifdef CONFIG_M686_L1_128
80 +CFLAGS := $(CFLAGS) -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686
83 HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
85 SUBDIRS := $(SUBDIRS) arch/i386/kernel arch/i386/mm arch/i386/lib
86 diff -urN linux.orig/arch/i386/config.in linux/arch/i386/config.in
87 --- linux.orig/arch/i386/config.in Fri Nov 2 17:39:05 2001
88 +++ linux/arch/i386/config.in Wed Aug 7 17:44:10 2002
90 486/Cx486 CONFIG_M486 \
91 586/K5/5x86/6x86 CONFIG_M586 \
92 Pentium/K6/TSC/CyrixIII CONFIG_M586TSC \
93 - PPro/6x86MX CONFIG_M686" PPro
94 + PPro/6x86MX CONFIG_M686 \
95 + K7 CONFIG_M686_L1_64 \
96 + P4 CONFIG_M686_L1_128" PPro
98 # Define implied options from the CPU selection here
101 define_bool CONFIG_X86_BSWAP y
102 define_bool CONFIG_X86_POPAD_OK y
104 -if [ "$CONFIG_M686" = "y" -o "$CONFIG_M586TSC" = "y" ]; then
105 +if [ "$CONFIG_M686" = "y" -o "$CONFIG_M586TSC" = "y" -o "$CONFIG_M686_L1_64" = "y" -o "$CONFIG_M686_L1_128" = "y" ]; then
106 define_bool CONFIG_X86_TSC y
108 -if [ "$CONFIG_M686" = "y" ]; then
109 +if [ "$CONFIG_M686" = "y" -o "$CONFIG_M686_L1_64" = "y" -o "$CONFIG_M686_L1_128" = "y" ]; then
110 define_bool CONFIG_X86_GOOD_APIC y
113 diff -urN linux.orig/arch/i386/kernel/Makefile linux/arch/i386/kernel/Makefile
114 --- linux.orig/arch/i386/kernel/Makefile Sun Mar 25 18:37:29 2001
115 +++ linux/arch/i386/kernel/Makefile Wed Aug 7 17:44:42 2002
118 O_OBJS := process.o signal.o entry.o traps.o irq.o vm86.o \
119 ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
122 OX_OBJS := i386_ksyms.o dmi_scan.o
125 diff -urN linux.orig/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
126 --- linux.orig/arch/i386/kernel/entry.S Tue May 21 01:32:34 2002
127 +++ linux/arch/i386/kernel/entry.S Wed Aug 7 17:44:43 2002
129 pushl $ SYMBOL_NAME(do_coprocessor_error)
132 +ENTRY(simd_coprocessor_error)
134 + pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
137 ENTRY(device_not_available)
138 pushl $-1 # mark this as an int
140 diff -urN linux.orig/arch/i386/kernel/head.S linux/arch/i386/kernel/head.S
141 --- linux.orig/arch/i386/kernel/head.S Tue May 21 01:32:34 2002
142 +++ linux/arch/i386/kernel/head.S Wed Aug 7 17:44:43 2002
144 * NOTE! We have to correct for the fact that we're
145 * not yet offset PAGE_OFFSET..
147 -#define cr4_bits mmu_cr4_features-__PAGE_OFFSET
148 +#define cr4_bits x86_cr4-__PAGE_OFFSET
149 movl %cr4,%eax # Turn on 4Mb pages
152 + movl %cr3,%eax # Intel specification clarification says
153 + movl %eax,%cr3 # to do this. Maybe it makes a difference.
157 * Setup paging (the tables are already set up, just switch them on)
163 - movb ready,%al # First CPU if 0
165 - jz 4f # First CPU skip this stuff
166 - movl %cr4,%eax # Turn on 4Mb pages
169 - movl %cr3,%eax # Intel specification clarification says
170 - movl %eax,%cr3 # to do this. Maybe it makes a difference.
179 ljmp $(__KERNEL_CS),$1f
181 jmp L6 # main should never return here, but
182 # just in case, we know what happens.
189 * We depend on ET to be correct. This checks for 287/387.
191 diff -urN linux.orig/arch/i386/kernel/i386_ksyms.c linux/arch/i386/kernel/i386_ksyms.c
192 --- linux.orig/arch/i386/kernel/i386_ksyms.c Sun Mar 25 18:31:45 2001
193 +++ linux/arch/i386/kernel/i386_ksyms.c Wed Aug 7 17:44:43 2002
196 #include <asm/semaphore.h>
197 #include <asm/processor.h>
198 +#include <asm/i387.h>
199 #include <asm/uaccess.h>
200 #include <asm/checksum.h>
205 extern void dump_thread(struct pt_regs *, struct user *);
206 -extern int dump_fpu(elf_fpregset_t *);
207 extern spinlock_t rtc_lock;
209 #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
211 EXPORT_SYMBOL(__verify_write);
212 EXPORT_SYMBOL(dump_thread);
213 EXPORT_SYMBOL(dump_fpu);
214 +EXPORT_SYMBOL(dump_extended_fpu);
215 EXPORT_SYMBOL(__ioremap);
216 EXPORT_SYMBOL(iounmap);
217 EXPORT_SYMBOL(local_bh_count);
218 diff -urN linux.orig/arch/i386/kernel/i387.c linux/arch/i386/kernel/i387.c
219 --- linux.orig/arch/i386/kernel/i387.c Thu Jan 1 01:00:00 1970
220 +++ linux/arch/i386/kernel/i387.c Wed Aug 7 17:44:43 2002
223 + * linux/arch/i386/kernel/i387.c
225 + * Copyright (C) 1994 Linus Torvalds
227 + * Pentium III FXSR, SSE support
228 + * General FPU state handling cleanups
229 + * Gareth Hughes <gareth@valinux.com>, May 2000
232 +#include <linux/config.h>
233 +#include <linux/sched.h>
234 +#include <asm/processor.h>
235 +#include <asm/i387.h>
236 +#include <asm/math_emu.h>
237 +#include <asm/sigcontext.h>
238 +#include <asm/user.h>
239 +#include <asm/ptrace.h>
240 +#include <asm/uaccess.h>
242 +#define HAVE_FXSR cpu_has_fxsr
243 +#define HAVE_XMM cpu_has_xmm
245 +#ifdef CONFIG_MATH_EMULATION
246 +#define HAVE_HWFP (boot_cpu_data.hard_math)
252 + * The _current_ task is using the FPU for the first time
253 + * so initialize it and set the mxcsr to its default
254 + * value at reset if we support XMM instructions and then
255 + * remeber the current task has used the FPU.
261 + load_mxcsr(0x1f80);
263 + current->used_math = 1;
267 + * FPU lazy state save handling.
270 +void save_init_fpu( struct task_struct *tsk )
273 + asm volatile( "fxsave %0 ; fnclex"
274 + : "=m" (tsk->tss.i387.fxsave) );
276 + asm volatile( "fnsave %0 ; fwait"
277 + : "=m" (tsk->tss.i387.fsave) );
279 + tsk->flags &= ~PF_USEDFPU;
283 +void restore_fpu( struct task_struct *tsk )
286 + asm volatile( "fxrstor %0"
287 + : : "m" (tsk->tss.i387.fxsave) );
289 + asm volatile( "frstor %0"
290 + : : "m" (tsk->tss.i387.fsave) );
295 + * FPU tag word conversions.
298 +static inline unsigned short twd_i387_to_fxsr( unsigned short twd )
300 + unsigned int tmp; /* to avoid 16 bit prefixes in the code */
302 + /* Transform each pair of bits into 01 (valid) or 00 (empty) */
304 + tmp = (tmp | (tmp>>1)) & 0x5555; /* 0V0V0V0V0V0V0V0V */
305 + /* and move the valid bits to the lower byte. */
306 + tmp = (tmp | (tmp >> 1)) & 0x3333; /* 00VV00VV00VV00VV */
307 + tmp = (tmp | (tmp >> 2)) & 0x0f0f; /* 0000VVVV0000VVVV */
308 + tmp = (tmp | (tmp >> 4)) & 0x00ff; /* 00000000VVVVVVVV */
312 +static inline unsigned long twd_fxsr_to_i387( struct i387_fxsave_struct *fxsave )
314 + struct _fpxreg *st = NULL;
315 + unsigned long twd = (unsigned long) fxsave->twd;
317 + unsigned long ret = 0xffff0000;
320 +#define FPREG_ADDR(f, n) ((char *)&(f)->st_space + (n) * 16);
322 + for ( i = 0 ; i < 8 ; i++ ) {
324 + st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
326 + switch ( st->exponent & 0x7fff ) {
328 + tag = 2; /* Special */
331 + if ( !st->significand[0] &&
332 + !st->significand[1] &&
333 + !st->significand[2] &&
334 + !st->significand[3] ) {
335 + tag = 1; /* Zero */
337 + tag = 2; /* Special */
341 + if ( st->significand[3] & 0x8000 ) {
342 + tag = 0; /* Valid */
344 + tag = 2; /* Special */
349 + tag = 3; /* Empty */
351 + ret |= (tag << (2 * i));
358 + * FPU state interaction.
361 +unsigned short get_fpu_cwd( struct task_struct *tsk )
364 + return tsk->tss.i387.fxsave.cwd;
366 + return (unsigned short)tsk->tss.i387.fsave.cwd;
370 +unsigned short get_fpu_swd( struct task_struct *tsk )
373 + return tsk->tss.i387.fxsave.swd;
375 + return (unsigned short)tsk->tss.i387.fsave.swd;
379 +unsigned short get_fpu_twd( struct task_struct *tsk )
382 + return tsk->tss.i387.fxsave.twd;
384 + return (unsigned short)tsk->tss.i387.fsave.twd;
388 +unsigned short get_fpu_mxcsr( struct task_struct *tsk )
391 + return tsk->tss.i387.fxsave.mxcsr;
397 +void set_fpu_cwd( struct task_struct *tsk, unsigned short cwd )
400 + tsk->tss.i387.fxsave.cwd = cwd;
402 + tsk->tss.i387.fsave.cwd = ((long)cwd | 0xffff0000);
406 +void set_fpu_swd( struct task_struct *tsk, unsigned short swd )
409 + tsk->tss.i387.fxsave.swd = swd;
411 + tsk->tss.i387.fsave.swd = ((long)swd | 0xffff0000);
415 +void set_fpu_twd( struct task_struct *tsk, unsigned short twd )
418 + tsk->tss.i387.fxsave.twd = twd_i387_to_fxsr(twd);
420 + tsk->tss.i387.fsave.twd = ((long)twd | 0xffff0000);
424 +void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr )
427 + tsk->tss.i387.fxsave.mxcsr = (mxcsr & 0xffbf);
432 + * FXSR floating point environment conversions.
435 +static inline int convert_fxsr_to_user( struct _fpstate *buf,
436 + struct i387_fxsave_struct *fxsave )
438 + unsigned long env[7];
440 + struct _fpxreg *from;
443 + env[0] = (unsigned long)fxsave->cwd | 0xffff0000;
444 + env[1] = (unsigned long)fxsave->swd | 0xffff0000;
445 + env[2] = twd_fxsr_to_i387(fxsave);
446 + env[3] = fxsave->fip;
447 + env[4] = fxsave->fcs | ((unsigned long)fxsave->fop << 16);
448 + env[5] = fxsave->foo;
449 + env[6] = fxsave->fos;
451 + if ( __copy_to_user( buf, env, 7 * sizeof(unsigned long) ) )
455 + from = (struct _fpxreg *) &fxsave->st_space[0];
456 + for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
457 + if ( __copy_to_user( to, from, sizeof(*to) ) )
463 +static inline int convert_fxsr_from_user( struct i387_fxsave_struct *fxsave,
464 + struct _fpstate *buf )
466 + unsigned long env[7];
467 + struct _fpxreg *to;
468 + struct _fpreg *from;
471 + if ( __copy_from_user( env, buf, 7 * sizeof(long) ) )
474 + fxsave->cwd = (unsigned short)(env[0] & 0xffff);
475 + fxsave->swd = (unsigned short)(env[1] & 0xffff);
476 + fxsave->twd = twd_i387_to_fxsr((unsigned short)(env[2] & 0xffff));
477 + fxsave->fip = env[3];
478 + fxsave->fop = (unsigned short)((env[4] & 0xffff0000) >> 16);
479 + fxsave->fcs = (env[4] & 0xffff);
480 + fxsave->foo = env[5];
481 + fxsave->fos = env[6];
483 + to = (struct _fpxreg *) &fxsave->st_space[0];
484 + from = &buf->_st[0];
485 + for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
486 + if ( __copy_from_user( to, from, sizeof(*from) ) )
493 + * Signal frame handlers.
496 +static inline int save_i387_fsave( struct _fpstate *buf )
498 + struct task_struct *tsk = current;
501 + tsk->tss.i387.fsave.status = tsk->tss.i387.fsave.swd;
502 + if ( __copy_to_user( buf, &tsk->tss.i387.fsave,
503 + sizeof(struct i387_fsave_struct) ) )
508 +static inline int save_i387_fxsave( struct _fpstate *buf )
510 + struct task_struct *tsk = current;
515 + if ( convert_fxsr_to_user( buf, &tsk->tss.i387.fxsave ) )
518 + err |= __put_user( tsk->tss.i387.fxsave.swd, &buf->status );
519 + err |= __put_user( X86_FXSR_MAGIC, &buf->magic );
523 + if ( __copy_to_user( &buf->_fxsr_env[0], &tsk->tss.i387.fxsave,
524 + sizeof(struct i387_fxsave_struct) ) )
529 +int save_i387( struct _fpstate *buf )
531 + if ( !current->used_math )
534 + /* This will cause a "finit" to be triggered by the next
535 + * attempted FPU operation by the 'current' process.
537 + current->used_math = 0;
541 + return save_i387_fxsave( buf );
543 + return save_i387_fsave( buf );
546 + return save_i387_soft( ¤t->tss.i387.soft, buf );
550 +static inline int restore_i387_fsave( struct _fpstate *buf )
552 + struct task_struct *tsk = current;
554 + return __copy_from_user( &tsk->tss.i387.fsave, buf,
555 + sizeof(struct i387_fsave_struct) );
558 +static inline int restore_i387_fxsave( struct _fpstate *buf )
560 + struct task_struct *tsk = current;
562 + if ( __copy_from_user( &tsk->tss.i387.fxsave, &buf->_fxsr_env[0],
563 + sizeof(struct i387_fxsave_struct) ) )
565 + /* bit 6 and 31-16 must be zero for security reasons */
566 + tsk->tss.i387.fxsave.mxcsr &= 0xffbf;
567 + return convert_fxsr_from_user( &tsk->tss.i387.fxsave, buf );
570 +int restore_i387( struct _fpstate *buf )
576 + err = restore_i387_fxsave( buf );
578 + err = restore_i387_fsave( buf );
581 + err = restore_i387_soft( ¤t->tss.i387.soft, buf );
583 + current->used_math = 1;
588 + * ptrace request handlers.
591 +static inline int get_fpregs_fsave( struct user_i387_struct *buf,
592 + struct task_struct *tsk )
594 + return __copy_to_user( buf, &tsk->tss.i387.fsave,
595 + sizeof(struct user_i387_struct) );
598 +static inline int get_fpregs_fxsave( struct user_i387_struct *buf,
599 + struct task_struct *tsk )
601 + return convert_fxsr_to_user( (struct _fpstate *)buf,
602 + &tsk->tss.i387.fxsave );
605 +int get_fpregs( struct user_i387_struct *buf, struct task_struct *tsk )
609 + return get_fpregs_fxsave( buf, tsk );
611 + return get_fpregs_fsave( buf, tsk );
614 + return save_i387_soft( &tsk->tss.i387.soft,
615 + (struct _fpstate *)buf );
619 +static inline int set_fpregs_fsave( struct task_struct *tsk,
620 + struct user_i387_struct *buf )
622 + return __copy_from_user( &tsk->tss.i387.fsave, buf,
623 + sizeof(struct user_i387_struct) );
626 +static inline int set_fpregs_fxsave( struct task_struct *tsk,
627 + struct user_i387_struct *buf )
629 + return convert_fxsr_from_user( &tsk->tss.i387.fxsave,
630 + (struct _fpstate *)buf );
633 +int set_fpregs( struct task_struct *tsk, struct user_i387_struct *buf )
637 + return set_fpregs_fxsave( tsk, buf );
639 + return set_fpregs_fsave( tsk, buf );
642 + return restore_i387_soft( &tsk->tss.i387.soft,
643 + (struct _fpstate *)buf );
647 +int get_fpxregs( struct user_fxsr_struct *buf, struct task_struct *tsk )
650 + if (__copy_to_user( (void *)buf, &tsk->tss.i387.fxsave,
651 + sizeof(struct user_fxsr_struct) ))
659 +int set_fpxregs( struct task_struct *tsk, struct user_fxsr_struct *buf )
664 + error = __copy_from_user(&tsk->tss.i387.fxsave, (void *)buf,
665 + sizeof(struct user_fxsr_struct));
666 + /* bit 6 and 31-16 must be zero for security reasons */
667 + tsk->tss.i387.fxsave.mxcsr &= 0xffbf;
669 + return error ? -EFAULT : 0;
676 + * FPU state for core dumps.
679 +static inline void copy_fpu_fsave( struct task_struct *tsk,
680 + struct user_i387_struct *fpu )
682 + memcpy( fpu, &tsk->tss.i387.fsave,
683 + sizeof(struct user_i387_struct) );
686 +static inline void copy_fpu_fxsave( struct task_struct *tsk,
687 + struct user_i387_struct *fpu )
689 + unsigned short *to;
690 + unsigned short *from;
693 + memcpy( fpu, &tsk->tss.i387.fxsave, 7 * sizeof(long) );
695 + to = (unsigned short *)&fpu->st_space[0];
696 + from = (unsigned short *)&tsk->tss.i387.fxsave.st_space[0];
697 + for ( i = 0 ; i < 8 ; i++, to += 5, from += 8 ) {
698 + memcpy( to, from, 5 * sizeof(unsigned short) );
702 +int dump_fpu( struct pt_regs *regs, struct user_i387_struct *fpu )
705 + struct task_struct *tsk = current;
707 + fpvalid = tsk->used_math;
711 + copy_fpu_fxsave( tsk, fpu );
713 + copy_fpu_fsave( tsk, fpu );
720 +int dump_extended_fpu( struct pt_regs *regs, struct user_fxsr_struct *fpu )
723 + struct task_struct *tsk = current;
725 + fpvalid = tsk->used_math && HAVE_FXSR;
728 + memcpy( fpu, &tsk->tss.i387.fxsave,
729 + sizeof(struct user_fxsr_struct) );
734 diff -urN linux.orig/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c
735 --- linux.orig/arch/i386/kernel/irq.c Sun Mar 25 18:31:45 2001
736 +++ linux/arch/i386/kernel/irq.c Wed Aug 7 17:44:43 2002
737 @@ -381,10 +381,11 @@
739 static void math_error_irq(int cpl, void *dev_id, struct pt_regs *regs)
741 + extern void math_error(void *);
743 if (ignore_irq13 || !boot_cpu_data.hard_math)
746 + math_error((void *)regs->eip);
749 static struct irqaction irq13 = { math_error_irq, 0, 0, "fpu", NULL, NULL };
750 diff -urN linux.orig/arch/i386/kernel/irq.h linux/arch/i386/kernel/irq.h
751 --- linux.orig/arch/i386/kernel/irq.h Fri Nov 2 17:39:05 2001
752 +++ linux/arch/i386/kernel/irq.h Wed Aug 7 17:44:10 2002
754 struct hw_interrupt_type *handler; /* handle/enable/disable functions */
755 struct irqaction *action; /* IRQ action list */
756 unsigned int depth; /* Disable depth for nested irq disables */
757 - unsigned int unused[4];
759 + unsigned char unused[L1_CACHE_BYTES-16];
764 diff -urN linux.orig/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
765 --- linux.orig/arch/i386/kernel/process.c Fri Nov 2 17:39:05 2001
766 +++ linux/arch/i386/kernel/process.c Wed Aug 7 17:56:44 2002
768 * linux/arch/i386/kernel/process.c
770 * Copyright (C) 1995 Linus Torvalds
772 + * Pentium III FXSR, SSE support
773 + * Gareth Hughes <gareth@valinux.com>, May 2000
779 #include <asm/processor.h>
780 #include <asm/desc.h>
781 +#include <asm/i387.h>
782 #ifdef CONFIG_MATH_EMULATION
783 #include <asm/math_emu.h>
785 @@ -384,23 +388,15 @@
787 void show_regs(struct pt_regs * regs)
789 + extern void show_registers(struct pt_regs *);
790 long cr0 = 0L, cr2 = 0L, cr3 = 0L;
793 - printk("EIP: %04x:[<%08lx>]",0xffff & regs->xcs,regs->eip);
795 - printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
796 - printk(" EFLAGS: %08lx\n",regs->eflags);
797 - printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
798 - regs->eax,regs->ebx,regs->ecx,regs->edx);
799 - printk("ESI: %08lx EDI: %08lx EBP: %08lx",
800 - regs->esi, regs->edi, regs->ebp);
801 - printk(" DS: %04x ES: %04x\n",
802 - 0xffff & regs->xds,0xffff & regs->xes);
803 __asm__("movl %%cr0, %0": "=r" (cr0));
804 __asm__("movl %%cr2, %0": "=r" (cr2));
805 __asm__("movl %%cr3, %0": "=r" (cr3));
806 printk("CR0: %08lx CR2: %08lx CR3: %08lx\n", cr0, cr2, cr3);
807 + show_registers(regs);
815 - * fill in the FPU structure for a core dump.
817 -int dump_fpu (struct pt_regs * regs, struct user_i387_struct* fpu)
820 - struct task_struct *tsk = current;
822 - fpvalid = tsk->used_math;
825 - memcpy(fpu,&tsk->tss.i387.hard,sizeof(*fpu));
832 * fill in the user structure for a core dump..
834 void dump_thread(struct pt_regs * regs, struct user * dump)
835 diff -urN linux.orig/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
836 --- linux.orig/arch/i386/kernel/ptrace.c Fri Nov 2 17:39:05 2001
837 +++ linux/arch/i386/kernel/ptrace.c Wed Aug 7 17:44:43 2002
840 /* By Ross Biro 1/23/92 */
841 /* edited by Linus Torvalds */
843 + * Pentium III FXSR, SSE support
844 + * Gareth Hughes <gareth@valinux.com>, May 2000
847 -#include <linux/config.h> /* for CONFIG_MATH_EMULATION */
848 #include <linux/kernel.h>
849 #include <linux/sched.h>
850 #include <linux/mm.h>
852 #include <asm/system.h>
853 #include <asm/processor.h>
854 #include <asm/debugreg.h>
855 +#include <asm/i387.h>
858 * does not yet catch signals sent when the child dies.
859 @@ -658,21 +662,11 @@
861 if ( !child->used_math ) {
862 /* Simulate an empty FPU. */
863 - child->tss.i387.hard.cwd = 0xffff037f;
864 - child->tss.i387.hard.swd = 0xffff0000;
865 - child->tss.i387.hard.twd = 0xffffffff;
867 -#ifdef CONFIG_MATH_EMULATION
868 - if ( boot_cpu_data.hard_math ) {
870 - __copy_to_user((void *)data, &child->tss.i387.hard,
871 - sizeof(struct user_i387_struct));
872 -#ifdef CONFIG_MATH_EMULATION
874 - save_i387_soft(&child->tss.i387.soft,
875 - (struct _fpstate *)data);
876 + set_fpu_cwd(child, 0x037f);
877 + set_fpu_swd(child, 0x0000);
878 + set_fpu_twd(child, 0xffff);
881 + get_fpregs((struct user_i387_struct *)data, child);
885 @@ -684,21 +678,39 @@
888 child->used_math = 1;
889 -#ifdef CONFIG_MATH_EMULATION
890 - if ( boot_cpu_data.hard_math ) {
892 - __copy_from_user(&child->tss.i387.hard, (void *)data,
893 - sizeof(struct user_i387_struct));
894 -#ifdef CONFIG_MATH_EMULATION
896 - restore_i387_soft(&child->tss.i387.soft,
897 - (struct _fpstate *)data);
900 + set_fpregs(child, (struct user_i387_struct *)data);
905 + case PTRACE_GETFPXREGS: { /* Get the child extended FPU state. */
906 + if (!access_ok(VERIFY_WRITE, (unsigned *)data,
907 + sizeof(struct user_fxsr_struct))) {
911 + if ( !child->used_math ) {
912 + /* Simulate an empty FPU. */
913 + set_fpu_cwd(child, 0x037f);
914 + set_fpu_swd(child, 0x0000);
915 + set_fpu_twd(child, 0xffff);
916 + set_fpu_mxcsr(child, 0x1f80);
918 + ret = get_fpxregs((struct user_fxsr_struct *)data, child);
922 + case PTRACE_SETFPXREGS: { /* Set the child extended FPU state. */
923 + if (!access_ok(VERIFY_READ, (unsigned *)data,
924 + sizeof(struct user_fxsr_struct))) {
928 + child->used_math = 1;
929 + ret = set_fpxregs(child, (struct user_fxsr_struct *)data);
936 diff -urN linux.orig/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
937 --- linux.orig/arch/i386/kernel/setup.c Tue May 21 01:32:34 2002
938 +++ linux/arch/i386/kernel/setup.c Wed Aug 7 17:44:43 2002
940 char ignore_irq13 = 0; /* set if exception 16 works */
941 struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
943 +unsigned long x86_cr4;
949 extern unsigned long cpu_khz;
951 static int disable_x86_serial_nr __initdata = 1;
952 +static int disable_x86_fxsr __initdata = 0;
955 * This is set up by the setup-routine at boot-time
956 @@ -1308,7 +1311,8 @@
958 static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
960 - if (c->x86_capability&(X86_FEATURE_PN) && disable_x86_serial_nr) {
961 + if (c->x86_capability&(X86_FEATURE_PN) && (c->x86_vendor == X86_VENDOR_INTEL || c->x86_vendor == X86_VENDOR_TRANSMETA) &&
962 + disable_x86_serial_nr) {
963 /* Disable processor serial number */
966 @@ -1326,6 +1330,12 @@
968 __setup("serialnumber", x86_serial_nr_setup);
970 +int __init x86_fxsr_setup(char * s)
972 + disable_x86_fxsr = 1;
975 +__setup("nofxsr", x86_fxsr_setup);
977 __initfunc(void identify_cpu(struct cpuinfo_x86 *c))
979 @@ -1377,6 +1387,13 @@
983 + /* FXSR disabled? */
984 + if (disable_x86_fxsr) {
985 + printk(KERN_INFO "Disabling fast FPU save and restore.\n");
986 + clear_bit(X86_FEATURE_FXSR, &c->x86_capability);
987 + clear_bit(X86_FEATURE_XMM, &c->x86_capability);
990 squash_the_stupid_serial_number(c);
993 diff -urN linux.orig/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
994 --- linux.orig/arch/i386/kernel/signal.c Fri Nov 2 17:39:05 2001
995 +++ linux/arch/i386/kernel/signal.c Wed Aug 7 17:44:43 2002
997 * Copyright (C) 1991, 1992 Linus Torvalds
999 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
1000 + * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes
1003 #include <linux/config.h>
1005 #include <linux/stddef.h>
1006 #include <asm/ucontext.h>
1007 #include <asm/uaccess.h>
1008 +#include <asm/i387.h>
1012 @@ -150,29 +152,6 @@
1017 -static inline int restore_i387_hard(struct _fpstate *buf)
1019 - struct task_struct *tsk = current;
1021 - return __copy_from_user(&tsk->tss.i387.hard, buf, sizeof(*buf));
1024 -static inline int restore_i387(struct _fpstate *buf)
1027 -#ifndef CONFIG_MATH_EMULATION
1028 - err = restore_i387_hard(buf);
1030 - if (boot_cpu_data.hard_math)
1031 - err = restore_i387_hard(buf);
1033 - err = restore_i387_soft(¤t->tss.i387.soft, buf);
1035 - current->used_math = 1;
1040 restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
1042 @@ -299,39 +278,6 @@
1047 - * Set up a signal frame.
1050 -static inline int save_i387_hard(struct _fpstate * buf)
1052 - struct task_struct *tsk = current;
1055 - tsk->tss.i387.hard.status = tsk->tss.i387.hard.swd;
1056 - if (__copy_to_user(buf, &tsk->tss.i387.hard, sizeof(*buf)))
1061 -static int save_i387(struct _fpstate *buf)
1063 - if (!current->used_math)
1066 - /* This will cause a "finit" to be triggered by the next
1067 - attempted FPU operation by the 'current' process.
1069 - current->used_math = 0;
1071 -#ifndef CONFIG_MATH_EMULATION
1072 - return save_i387_hard(buf);
1074 - return boot_cpu_data.hard_math ? save_i387_hard(buf)
1075 - : save_i387_soft(¤t->tss.i387.soft, buf);
1080 setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
1081 struct pt_regs *regs, unsigned long mask)
1082 diff -urN linux.orig/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
1083 --- linux.orig/arch/i386/kernel/smp.c Sun Mar 25 18:37:29 2001
1084 +++ linux/arch/i386/kernel/smp.c Wed Aug 7 17:58:31 2002
1086 static volatile unsigned long cpu_callout_map[NR_CPUS] = {0,}; /* We always use 0 the rest is ready for parallel delivery */
1087 volatile unsigned long smp_invalidate_needed; /* Used for the invalidate map that's also checked in the spinlock */
1088 volatile unsigned long kstack_ptr; /* Stack vector for booting CPUs */
1089 -struct cpuinfo_x86 cpu_data[NR_CPUS]; /* Per CPU bogomips and other parameters */
1090 +struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned = { { 0, }, }; /* Per CPU bogomips and other parameters */
1091 static unsigned int num_processors = 1; /* Internal processor count */
1092 unsigned char boot_cpu_id = 0; /* Processor that is doing the boot up */
1093 static int smp_activated = 0; /* Tripped once we need to start cross invalidating */
1094 @@ -737,12 +737,6 @@
1096 unsigned long value;
1098 - value = apic_read(APIC_SPIV);
1099 - value |= (1<<8); /* Enable APIC (bit==1) */
1100 - value &= ~(1<<9); /* Enable focus processor (bit==0) */
1101 - value |= 0xff; /* Set spurious IRQ vector to 0xff */
1102 - apic_write(APIC_SPIV,value);
1105 * Set Task Priority to 'accept all'
1107 @@ -762,6 +756,12 @@
1108 value |= SET_APIC_DFR(0xf);
1109 apic_write(APIC_DFR, value);
1111 + value = apic_read(APIC_SPIV);
1112 + value |= (1<<8); /* Enable APIC (bit==1) */
1113 + value &= ~(1<<9); /* Enable focus processor (bit==0) */
1114 + value |= 0xff; /* Set spurious IRQ vector to 0xff */
1115 + apic_write(APIC_SPIV,value);
1117 udelay(100); /* B safe */
1121 return memory_start;
1124 -#ifdef CONFIG_X86_TSC
1126 * TSC synchronization.
1128 @@ -1010,8 +1009,6 @@
1134 extern void calibrate_delay(void);
1136 void __init smp_callin(void)
1137 @@ -1098,12 +1095,11 @@
1139 set_bit(cpuid, (unsigned long *)&cpu_callin_map[0]);
1141 -#ifdef CONFIG_X86_TSC
1143 * Synchronize the TSC with the BP
1145 - synchronize_tsc_ap ();
1147 + if (boot_cpu_data.x86_capability & X86_FEATURE_TSC)
1148 + synchronize_tsc_ap ();
1152 @@ -1640,13 +1636,11 @@
1156 -#ifdef CONFIG_X86_TSC
1158 * Synchronize the TSC with the AP
1161 + if (boot_cpu_data.x86_capability & X86_FEATURE_TSC && cpucount)
1162 synchronize_tsc_bp();
1167 diff -urN linux.orig/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
1168 --- linux.orig/arch/i386/kernel/time.c Sun Mar 25 18:37:30 2001
1169 +++ linux/arch/i386/kernel/time.c Wed Aug 7 17:53:48 2002
1170 @@ -247,6 +247,20 @@
1174 +/* FIXME: should be inline but gcc is buggy and breaks */
1176 +timeval_normalize(struct timeval * tv)
1180 + __sec = tv->tv_usec / 1000000;
1183 + tv->tv_usec %= 1000000;
1184 + tv->tv_sec += __sec;
1189 * This version of gettimeofday has microsecond resolution
1190 * and better than microsecond precision on fast x86 machines with TSC.
1191 @@ -267,13 +281,10 @@
1192 usec += xtime.tv_usec;
1193 read_unlock_irqrestore(&xtime_lock, flags);
1195 - while (usec >= 1000000) {
1203 + timeval_normalize(tv);
1206 void do_settimeofday(struct timeval *tv)
1207 diff -urN linux.orig/arch/i386/kernel/traps.c linux/arch/i386/kernel/traps.c
1208 --- linux.orig/arch/i386/kernel/traps.c Tue May 21 01:32:34 2002
1209 +++ linux/arch/i386/kernel/traps.c Wed Aug 7 17:56:44 2002
1211 * linux/arch/i386/traps.c
1213 * Copyright (C) 1991, 1992 Linus Torvalds
1215 + * Pentium III FXSR, SSE support
1216 + * Gareth Hughes <gareth@valinux.com>, May 2000
1221 #include <asm/atomic.h>
1222 #include <asm/debugreg.h>
1223 #include <asm/desc.h>
1224 +#include <asm/i387.h>
1226 #include <asm/smp.h>
1229 asmlinkage void general_protection(void);
1230 asmlinkage void page_fault(void);
1231 asmlinkage void coprocessor_error(void);
1232 +asmlinkage void simd_coprocessor_error(void);
1233 asmlinkage void alignment_check(void);
1234 asmlinkage void spurious_interrupt_bug(void);
1235 asmlinkage void machine_check(void);
1237 #define VMALLOC_OFFSET (8*1024*1024)
1238 #define MODULE_RANGE (8*1024*1024)
1240 -static void show_registers(struct pt_regs *regs)
1241 +void show_registers(struct pt_regs *regs)
1245 @@ -428,25 +433,138 @@
1246 * the correct behaviour even in the presence of the asynchronous
1249 -void math_error(void)
1250 +void math_error(void *eip)
1252 struct task_struct * task;
1254 + unsigned short cwd, swd;
1257 * Save the info for the exception handler
1258 * (this will also clear the error)
1262 + save_init_fpu(task);
1263 task->tss.trap_no = 16;
1264 task->tss.error_code = 0;
1265 - force_sig(SIGFPE, task);
1266 + info.si_signo = SIGFPE;
1267 + info.si_errno = 0;
1268 + info.si_code = __SI_FAULT;
1269 + info.si_addr = eip;
1271 + * (~cwd & swd) will mask out exceptions that are not set to unmasked
1272 + * status. 0x3f is the exception bits in these regs, 0x200 is the
1273 + * C1 reg you need in case of a stack fault, 0x040 is the stack
1274 + * fault bit. We should only be taking one exception at a time,
1275 + * so if this combination doesn't produce any single exception,
1276 + * then we have a bad program that isn't syncronizing its FPU usage
1277 + * and it will suffer the consequences since we won't be able to
1278 + * fully reproduce the context of the exception
1280 + cwd = get_fpu_cwd(task);
1281 + swd = get_fpu_swd(task);
1282 + switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) {
1286 + case 0x001: /* Invalid Op */
1287 + case 0x040: /* Stack Fault */
1288 + case 0x240: /* Stack Fault | Direction */
1289 + info.si_code = FPE_FLTINV;
1291 + case 0x002: /* Denormalize */
1292 + case 0x010: /* Underflow */
1293 + info.si_code = FPE_FLTUND;
1295 + case 0x004: /* Zero Divide */
1296 + info.si_code = FPE_FLTDIV;
1298 + case 0x008: /* Overflow */
1299 + info.si_code = FPE_FLTOVF;
1301 + case 0x020: /* Precision */
1302 + info.si_code = FPE_FLTRES;
1305 + force_sig_info(SIGFPE, &info, task);
1308 asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code)
1312 + math_error((void *)regs->eip);
1315 +void simd_math_error(void *eip)
1317 + struct task_struct * task;
1319 + unsigned short mxcsr;
1322 + * Save the info for the exception handler and clear the error.
1325 + save_init_fpu(task);
1326 + task->tss.trap_no = 19;
1327 + task->tss.error_code = 0;
1328 + info.si_signo = SIGFPE;
1329 + info.si_errno = 0;
1330 + info.si_code = __SI_FAULT;
1331 + info.si_addr = eip;
1333 + * The SIMD FPU exceptions are handled a little differently, as there
1334 + * is only a single status/control register. Thus, to determine which
1335 + * unmasked exception was caught we must mask the exception mask bits
1336 + * at 0x1f80, and then use these to mask the exception bits at 0x3f.
1338 + mxcsr = get_fpu_mxcsr(task);
1339 + switch (~((mxcsr & 0x1f80) >> 7) & (mxcsr & 0x3f)) {
1343 + case 0x001: /* Invalid Op */
1344 + info.si_code = FPE_FLTINV;
1346 + case 0x002: /* Denormalize */
1347 + case 0x010: /* Underflow */
1348 + info.si_code = FPE_FLTUND;
1350 + case 0x004: /* Zero Divide */
1351 + info.si_code = FPE_FLTDIV;
1353 + case 0x008: /* Overflow */
1354 + info.si_code = FPE_FLTOVF;
1356 + case 0x020: /* Precision */
1357 + info.si_code = FPE_FLTRES;
1360 + force_sig_info(SIGFPE, &info, task);
1363 +asmlinkage void do_simd_coprocessor_error(struct pt_regs * regs,
1366 + if (cpu_has_xmm) {
1367 + /* Handle SIMD FPU exceptions on PIII+ processors. */
1369 + simd_math_error((void *)regs->eip);
1372 + * Handle strange cache flush from user space exception
1373 + * in all other cases. This is undocumented behaviour.
1375 + if (regs->eflags & VM_MASK) {
1376 + handle_vm86_fault((struct kernel_vm86_regs *)regs,
1380 + die_if_kernel("cache flush denied", regs, error_code);
1381 + current->tss.trap_no = 19;
1382 + current->tss.error_code = error_code;
1383 + force_sig(SIGSEGV, current);
1387 asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs,
1388 @@ -468,17 +586,13 @@
1389 asmlinkage void math_state_restore(struct pt_regs regs)
1391 __asm__ __volatile__("clts"); /* Allow maths ops (or we recurse) */
1392 - if(current->used_math)
1393 - __asm__("frstor %0": :"m" (current->tss.i387));
1397 - * Our first FPU usage, clean the chip.
1399 - __asm__("fninit");
1400 - current->used_math = 1;
1402 + if (current->used_math) {
1403 + restore_fpu(current);
1407 - current->flags|=PF_USEDFPU; /* So we fnsave on switch_to() */
1408 + current->flags |= PF_USEDFPU; /* So we fnsave on switch_to() */
1411 #ifndef CONFIG_MATH_EMULATION
1413 set_trap_gate(16,&coprocessor_error);
1414 set_trap_gate(17,&alignment_check);
1415 set_trap_gate(18,&machine_check);
1416 + set_trap_gate(19,&simd_coprocessor_error);
1417 set_system_gate(SYSCALL_VECTOR,&system_call);
1419 /* set up GDT task & ldt entries */
1420 diff -urN linux.orig/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
1421 --- linux.orig/arch/i386/mm/fault.c Sun Mar 25 18:31:45 2001
1422 +++ linux/arch/i386/mm/fault.c Wed Aug 7 17:57:18 2002
1425 int __verify_write(const void * addr, unsigned long size)
1427 - struct vm_area_struct * vma;
1428 + struct vm_area_struct * vma, * prev_vma;
1429 unsigned long start = (unsigned long) addr;
1434 - vma = find_vma(current->mm, start);
1435 + vma = find_vma_prev(current->mm, start, &prev_vma);
1438 if (vma->vm_start > start)
1441 if (!(vma->vm_flags & VM_GROWSDOWN))
1443 - if (expand_stack(vma, start) == 0)
1444 + if (expand_stack(vma, start, prev_vma) == 0)
1450 struct task_struct *tsk;
1451 struct mm_struct *mm;
1452 - struct vm_area_struct * vma;
1453 + struct vm_area_struct * vma, * prev_vma;
1454 unsigned long address;
1456 unsigned long fixup;
1459 down(&mm->mmap_sem);
1461 - vma = find_vma(mm, address);
1462 + vma = find_vma_prev(mm, address, &prev_vma);
1465 if (vma->vm_start <= address)
1467 if (address + 32 < regs->esp)
1470 - if (expand_stack(vma, address))
1471 + if (expand_stack(vma, address, prev_vma))
1474 * Ok, we have a good vm_area for this memory access, so
1475 diff -urN linux.orig/arch/i386/vmlinux.lds.S linux/arch/i386/vmlinux.lds.S
1476 --- linux.orig/arch/i386/vmlinux.lds.S Sun Mar 25 18:31:45 2001
1477 +++ linux/arch/i386/vmlinux.lds.S Wed Aug 7 17:44:10 2002
1479 /* ld script to make i386 Linux kernel
1480 * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
1482 +#include <asm/cache.h>
1483 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
1491 + . = ALIGN(L1_CACHE_BYTES);
1492 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
1495 diff -urN linux.orig/arch/ppc/kernel/time.c linux/arch/ppc/kernel/time.c
1496 --- linux.orig/arch/ppc/kernel/time.c Sun Mar 25 18:31:49 2001
1497 +++ linux/arch/ppc/kernel/time.c Wed Aug 7 17:53:48 2002
1498 @@ -147,6 +147,19 @@
1503 +timeval_normalize(struct timeval * tv)
1507 + __sec = tv->tv_usec / 1000000;
1510 + tv->tv_usec %= 1000000;
1511 + tv->tv_sec += __sec;
1516 * This version of gettimeofday has microsecond resolution.
1518 @@ -161,10 +174,7 @@
1520 tv->tv_usec += (decrementer_count - get_dec())
1521 * count_period_num / count_period_den;
1522 - if (tv->tv_usec >= 1000000) {
1523 - tv->tv_usec -= 1000000;
1526 + timeval_normalize(tv);
1528 restore_flags(flags);
1530 diff -urN linux.orig/arch/ppc/mm/fault.c linux/arch/ppc/mm/fault.c
1531 --- linux.orig/arch/ppc/mm/fault.c Sun Mar 25 18:31:48 2001
1532 +++ linux/arch/ppc/mm/fault.c Wed Aug 7 17:57:18 2002
1534 void do_page_fault(struct pt_regs *regs, unsigned long address,
1535 unsigned long error_code)
1537 - struct vm_area_struct * vma;
1538 + struct vm_area_struct * vma, * prev_vma;
1539 struct mm_struct *mm = current->mm;
1545 down(&mm->mmap_sem);
1546 - vma = find_vma(mm, address);
1547 + vma = find_vma_prev(mm, address, &prev_vma);
1550 if (vma->vm_start <= address)
1552 if (!(vma->vm_flags & VM_GROWSDOWN))
1554 - if (expand_stack(vma, address))
1555 + if (expand_stack(vma, address, prev_vma))
1559 diff -urN linux.orig/arch/s390/mm/fault.c linux/arch/s390/mm/fault.c
1560 --- linux.orig/arch/s390/mm/fault.c Fri Nov 2 17:39:06 2001
1561 +++ linux/arch/s390/mm/fault.c Wed Aug 7 17:57:18 2002
1564 if (!(vma->vm_flags & VM_GROWSDOWN))
1566 - if (expand_stack(vma, address))
1567 + if (expand_stack(vma, address, NULL))
1570 * Ok, we have a good vm_area for this memory access, so
1571 diff -urN linux.orig/arch/sparc/mm/fault.c linux/arch/sparc/mm/fault.c
1572 --- linux.orig/arch/sparc/mm/fault.c Sun Mar 25 18:31:47 2001
1573 +++ linux/arch/sparc/mm/fault.c Wed Aug 7 17:57:18 2002
1576 if(!(vma->vm_flags & VM_GROWSDOWN))
1578 - if(expand_stack(vma, address))
1579 + if(expand_stack(vma, address, NULL))
1582 * Ok, we have a good vm_area for this memory access, so
1585 if(!(vma->vm_flags & VM_GROWSDOWN))
1587 - if(expand_stack(vma, address))
1588 + if(expand_stack(vma, address, NULL))
1592 diff -urN linux.orig/arch/sparc64/mm/fault.c linux/arch/sparc64/mm/fault.c
1593 --- linux.orig/arch/sparc64/mm/fault.c Sun Mar 25 18:31:53 2001
1594 +++ linux/arch/sparc64/mm/fault.c Wed Aug 7 17:57:18 2002
1597 if(!(vma->vm_flags & VM_GROWSDOWN))
1599 - if(expand_stack(vma, address))
1600 + if(expand_stack(vma, address, NULL))
1603 * Ok, we have a good vm_area for this memory access, so
1604 diff -urN linux.orig/arch/sparc64/solaris/timod.c linux/arch/sparc64/solaris/timod.c
1605 --- linux.orig/arch/sparc64/solaris/timod.c Sun Mar 25 18:31:53 2001
1606 +++ linux/arch/sparc64/solaris/timod.c Wed Aug 7 17:45:22 2002
1608 sock = ¤t->files->fd[fd]->f_dentry->d_inode->u.socket_i;
1609 wake_up_interruptible(&sock->wait);
1610 if (sock->fasync_list && !(sock->flags & SO_WAITDATA))
1611 - kill_fasync(sock->fasync_list, SIGIO);
1612 + kill_fasync(sock->fasync_list, SIGIO, POLL_IN);
1616 diff -urN linux.orig/drivers/block/ide-probe.c linux/drivers/block/ide-probe.c
1617 --- linux.orig/drivers/block/ide-probe.c Sun Mar 25 18:31:24 2001
1618 +++ linux/drivers/block/ide-probe.c Wed Aug 7 17:50:35 2002
1620 extern struct drive_info_struct drive_info;
1621 byte cmos_disks, *BIOS = (byte *) &drive_info;
1623 + extern spinlock_t rtc_lock;
1625 #ifdef CONFIG_BLK_DEV_PDC4030
1626 if (hwif->chipset == ide_pdc4030 && hwif->channel != 0)
1627 diff -urN linux.orig/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
1628 --- linux.orig/drivers/block/ll_rw_blk.c Tue May 21 01:32:34 2002
1629 +++ linux/drivers/block/ll_rw_blk.c Wed Aug 7 17:52:39 2002
1631 case COMPAQ_CISS_MAJOR+4: \
1632 case COMPAQ_CISS_MAJOR+5: \
1633 case COMPAQ_CISS_MAJOR+6: \
1634 - case COMPAQ_CISS_MAJOR+7:
1635 + case COMPAQ_CISS_MAJOR+7: \
1638 #define elevator_starve_rest_of_queue(req) \
1640 @@ -574,10 +575,9 @@
1641 void make_request(int major, int rw, struct buffer_head * bh)
1643 unsigned int sector, count;
1644 - struct request * req, * prev;
1645 + struct request * req, * prev, * freereq = NULL;
1646 int rw_ahead, max_req, max_sectors, max_segments;
1647 unsigned long flags;
1650 count = bh->b_size >> 9;
1651 sector = bh->b_rsector;
1653 max_sectors = get_max_sectors(bh->b_rdev);
1654 max_segments = get_max_segments(bh->b_rdev);
1658 * Now we acquire the request spinlock, we have to be mega careful
1659 * not to schedule or do something nonatomic
1660 @@ -684,29 +685,23 @@
1662 req = seek_to_not_starving_chunk(req);
1668 if (req->rq_dev != bh->b_rdev)
1670 - if (req->sector + req->nr_sectors == sector)
1672 - else if (req->sector - count == sector)
1675 if (req->nr_sectors + count > max_sectors)
1680 /* Can we add it to the end of this request? */
1682 + if (req->sector + req->nr_sectors == sector) {
1683 if (req->bhtail->b_data + req->bhtail->b_size
1685 if (req->nr_segments < max_segments)
1690 req->bhtail->b_reqnext = bh;
1692 @@ -717,19 +712,19 @@
1693 /* Can we now merge this req with the next? */
1694 attempt_merge(req, max_sectors, max_segments);
1695 /* or to the beginning? */
1696 - } else if (front) {
1697 + } else if (req->sector - count == sector) {
1699 * Check that we didn't seek on a starving request,
1700 * that could happen only at the first pass, thus
1701 * do that only if prev is NULL.
1703 if (!prev && ((req->cmd != READ && req->cmd != WRITE) || !req->elevator_latency))
1706 if (bh->b_data + bh->b_size
1707 != req->bh->b_data) {
1708 if (req->nr_segments < max_segments)
1713 bh->b_reqnext = req->bh;
1715 @@ -749,15 +744,22 @@
1718 mark_buffer_clean(bh);
1720 + freereq->rq_status = RQ_INACTIVE;
1721 + wake_up(&wait_for_request);
1723 spin_unlock_irqrestore(&io_request_lock,flags);
1726 - } while (prev = req,
1727 - !front && !back && (req = req->next) != NULL);
1728 + } while (prev = req, (req = req->next) != NULL);
1731 /* find an unused request. */
1732 - req = get_request(max_req, bh->b_rdev);
1737 + req = get_request(max_req, bh->b_rdev);
1739 spin_unlock_irqrestore(&io_request_lock,flags);
1745 - req = __get_request_wait(max_req, bh->b_rdev);
1746 + freereq = __get_request_wait(max_req, bh->b_rdev);
1750 /* fill up the request-info, and add it to the queue */
1751 diff -urN linux.orig/drivers/block/loop.c linux/drivers/block/loop.c
1752 --- linux.orig/drivers/block/loop.c Sun Mar 25 18:31:24 2001
1753 +++ linux/drivers/block/loop.c Wed Aug 7 17:52:39 2002
1757 spin_lock_irq(&io_request_lock);
1758 + current_request->sector += current_request->current_nr_sectors;
1759 + current_request->nr_sectors -= current_request->current_nr_sectors;
1760 current_request->next=CURRENT;
1761 CURRENT=current_request;
1763 diff -urN linux.orig/drivers/char/adbmouse.c linux/drivers/char/adbmouse.c
1764 --- linux.orig/drivers/char/adbmouse.c Sun Mar 25 18:31:26 2001
1765 +++ linux/drivers/char/adbmouse.c Wed Aug 7 17:45:22 2002
1768 wake_up_interruptible(&mouse.wait);
1769 if (mouse.fasyncptr)
1770 - kill_fasync(mouse.fasyncptr, SIGIO);
1771 + kill_fasync(mouse.fasyncptr, SIGIO, POLL_IN);
1774 static int fasync_mouse(int fd, struct file *filp, int on)
1775 diff -urN linux.orig/drivers/char/amigamouse.c linux/drivers/char/amigamouse.c
1776 --- linux.orig/drivers/char/amigamouse.c Sun Mar 25 18:31:26 2001
1777 +++ linux/drivers/char/amigamouse.c Wed Aug 7 17:45:22 2002
1781 if (mouse.fasyncptr)
1782 - kill_fasync(mouse.fasyncptr, SIGIO);
1783 + kill_fasync(mouse.fasyncptr, SIGIO, POLL_IN);
1787 diff -urN linux.orig/drivers/char/atarimouse.c linux/drivers/char/atarimouse.c
1788 --- linux.orig/drivers/char/atarimouse.c Sun Mar 25 18:31:26 2001
1789 +++ linux/drivers/char/atarimouse.c Wed Aug 7 17:45:22 2002
1792 wake_up_interruptible(&mouse.wait);
1793 if (mouse.fasyncptr)
1794 - kill_fasync(mouse.fasyncptr, SIGIO);
1795 + kill_fasync(mouse.fasyncptr, SIGIO, POLL_IN);
1797 /* ikbd_mouse_rel_pos(); */
1799 diff -urN linux.orig/drivers/char/atixlmouse.c linux/drivers/char/atixlmouse.c
1800 --- linux.orig/drivers/char/atixlmouse.c Sun Mar 25 18:31:24 2001
1801 +++ linux/drivers/char/atixlmouse.c Wed Aug 7 17:45:22 2002
1804 wake_up_interruptible(&mouse.wait);
1806 - kill_fasync(mouse.fasync, SIGIO);
1807 + kill_fasync(mouse.fasync, SIGIO, POLL_IN);
1809 ATIXL_MSE_ENABLE_UPDATE();
1811 diff -urN linux.orig/drivers/char/busmouse.c linux/drivers/char/busmouse.c
1812 --- linux.orig/drivers/char/busmouse.c Sun Mar 25 18:31:24 2001
1813 +++ linux/drivers/char/busmouse.c Wed Aug 7 17:45:22 2002
1817 if (mouse.fasyncptr)
1818 - kill_fasync(mouse.fasyncptr, SIGIO);
1819 + kill_fasync(mouse.fasyncptr, SIGIO, POLL_IN);
1823 diff -urN linux.orig/drivers/char/dn_keyb.c linux/drivers/char/dn_keyb.c
1824 --- linux.orig/drivers/char/dn_keyb.c Sun Mar 25 18:31:26 2001
1825 +++ linux/drivers/char/dn_keyb.c Wed Aug 7 17:45:22 2002
1827 if (mouse_dy > 2048)
1829 if (mouse_fasyncptr)
1830 - kill_fasync(mouse_fasyncptr, SIGIO);
1831 + kill_fasync(mouse_fasyncptr, SIGIO, POLL_IN);
1834 /* printk("mouse: %d, %d, %x\n",mouse_x,mouse_y,buttons); */
1835 diff -urN linux.orig/drivers/char/drm/fops.c linux/drivers/char/drm/fops.c
1836 --- linux.orig/drivers/char/drm/fops.c Fri Nov 2 17:39:06 2001
1837 +++ linux/drivers/char/drm/fops.c Wed Aug 7 17:45:22 2002
1841 #if LINUX_VERSION_CODE < 0x020400
1842 - if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO);
1843 + if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN);
1845 /* Type of first parameter changed in
1846 Linux 2.4.0-test2... */
1847 diff -urN linux.orig/drivers/char/msbusmouse.c linux/drivers/char/msbusmouse.c
1848 --- linux.orig/drivers/char/msbusmouse.c Sun Mar 25 18:31:24 2001
1849 +++ linux/drivers/char/msbusmouse.c Wed Aug 7 17:45:22 2002
1852 wake_up_interruptible(&mouse.wait);
1853 if (mouse.fasyncptr)
1854 - kill_fasync(mouse.fasyncptr, SIGIO);
1855 + kill_fasync(mouse.fasyncptr, SIGIO, POLL_IN);
1859 diff -urN linux.orig/drivers/char/n_hdlc.c linux/drivers/char/n_hdlc.c
1860 --- linux.orig/drivers/char/n_hdlc.c Fri Nov 2 17:39:06 2001
1861 +++ linux/drivers/char/n_hdlc.c Wed Aug 7 17:45:22 2002
1862 @@ -584,11 +584,7 @@
1863 wake_up_interruptible (&n_hdlc->read_wait);
1864 wake_up_interruptible (&n_hdlc->poll_wait);
1865 if (n_hdlc->tty->fasync != NULL)
1866 -#if LINUX_VERSION_CODE >= VERSION(2,2,14) && defined(__rh_config_h__)
1867 kill_fasync (n_hdlc->tty->fasync, SIGIO, POLL_IN);
1869 - kill_fasync (n_hdlc->tty->fasync, SIGIO);
1871 } /* end of n_hdlc_tty_receive() */
1873 /* n_hdlc_tty_read()
1874 diff -urN linux.orig/drivers/char/n_tty.c linux/drivers/char/n_tty.c
1875 --- linux.orig/drivers/char/n_tty.c Sun Mar 25 18:31:25 2001
1876 +++ linux/drivers/char/n_tty.c Wed Aug 7 17:45:23 2002
1878 tty->canon_head = tty->read_head;
1881 - kill_fasync(tty->fasync, SIGIO);
1882 + kill_fasync(tty->fasync, SIGIO, POLL_IN);
1883 if (tty->read_wait || tty->poll_wait)
1885 wake_up_interruptible(&tty->read_wait);
1888 if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
1890 - kill_fasync(tty->fasync, SIGIO);
1891 + kill_fasync(tty->fasync, SIGIO, POLL_IN);
1892 if (tty->read_wait||tty->poll_wait)
1894 wake_up_interruptible(&tty->read_wait);
1895 diff -urN linux.orig/drivers/char/pc110pad.c linux/drivers/char/pc110pad.c
1896 --- linux.orig/drivers/char/pc110pad.c Fri Nov 2 17:39:06 2001
1897 +++ linux/drivers/char/pc110pad.c Wed Aug 7 17:45:23 2002
1900 wake_up_interruptible(&queue);
1902 - kill_fasync(asyncptr, SIGIO);
1903 + kill_fasync(asyncptr, SIGIO, POLL_IN);
1907 diff -urN linux.orig/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
1908 --- linux.orig/drivers/char/pc_keyb.c Sun Mar 25 18:31:26 2001
1909 +++ linux/drivers/char/pc_keyb.c Wed Aug 7 17:45:23 2002
1911 if (head != queue->tail) {
1914 - kill_fasync(queue->fasync, SIGIO);
1915 + kill_fasync(queue->fasync, SIGIO, POLL_IN);
1916 wake_up_interruptible(&queue->proc_list);
1919 diff -urN linux.orig/drivers/char/qpmouse.c linux/drivers/char/qpmouse.c
1920 --- linux.orig/drivers/char/qpmouse.c Sun Mar 25 18:31:26 2001
1921 +++ linux/drivers/char/qpmouse.c Wed Aug 7 17:45:23 2002
1926 - kill_fasync(queue->fasync, SIGIO);
1927 + kill_fasync(queue->fasync, SIGIO, POLL_IN);
1928 wake_up_interruptible(&queue->proc_list);
1931 diff -urN linux.orig/drivers/i2o/i2o_config.c linux/drivers/i2o/i2o_config.c
1932 --- linux.orig/drivers/i2o/i2o_config.c Sun Mar 25 18:31:44 2001
1933 +++ linux/drivers/i2o/i2o_config.c Wed Aug 7 17:45:23 2002
1935 // inf->fp, inf->q_id, inf->q_len);
1938 - kill_fasync(inf->fasync, SIGIO);
1939 + kill_fasync(inf->fasync, SIGIO, POLL_IN);
1943 diff -urN linux.orig/drivers/net/ppp.c linux/drivers/net/ppp.c
1944 --- linux.orig/drivers/net/ppp.c Sun Mar 25 18:31:15 2001
1945 +++ linux/drivers/net/ppp.c Wed Aug 7 17:45:23 2002
1946 @@ -2382,7 +2382,7 @@
1948 wake_up_interruptible (&ppp->read_wait);
1949 if (ppp->tty->fasync != NULL)
1950 - kill_fasync (ppp->tty->fasync, SIGIO);
1951 + kill_fasync (ppp->tty->fasync, SIGIO, POLL_IN);
1955 diff -urN linux.orig/drivers/sbus/char/pcikbd.c linux/drivers/sbus/char/pcikbd.c
1956 --- linux.orig/drivers/sbus/char/pcikbd.c Fri Nov 2 17:39:07 2001
1957 +++ linux/drivers/sbus/char/pcikbd.c Wed Aug 7 17:45:23 2002
1962 - kill_fasync(queue->fasync, SIGIO);
1963 + kill_fasync(queue->fasync, SIGIO, POLL_IN);
1964 wake_up_interruptible(&queue->proc_list);
1967 diff -urN linux.orig/drivers/sbus/char/sunkbd.c linux/drivers/sbus/char/sunkbd.c
1968 --- linux.orig/drivers/sbus/char/sunkbd.c Sun Mar 25 18:31:38 2001
1969 +++ linux/drivers/sbus/char/sunkbd.c Wed Aug 7 17:45:23 2002
1970 @@ -1278,7 +1278,7 @@
1974 - kill_fasync (kb_fasync, SIGIO);
1975 + kill_fasync (kb_fasync, SIGIO, POLL_IN);
1976 wake_up_interruptible (&kbd_wait);
1979 diff -urN linux.orig/drivers/sbus/char/sunmouse.c linux/drivers/sbus/char/sunmouse.c
1980 --- linux.orig/drivers/sbus/char/sunmouse.c Sun Mar 25 18:31:39 2001
1981 +++ linux/drivers/sbus/char/sunmouse.c Wed Aug 7 17:45:23 2002
1985 if (sunmouse.fasync)
1986 - kill_fasync (sunmouse.fasync, SIGIO);
1987 + kill_fasync (sunmouse.fasync, SIGIO, POLL_IN);
1988 wake_up_interruptible (&sunmouse.proc_list);
1994 if (sunmouse.fasync)
1995 - kill_fasync (sunmouse.fasync, SIGIO);
1996 + kill_fasync (sunmouse.fasync, SIGIO, POLL_IN);
1997 wake_up_interruptible(&sunmouse.proc_list);
2000 diff -urN linux.orig/drivers/scsi/sg.c linux/drivers/scsi/sg.c
2001 --- linux.orig/drivers/scsi/sg.c Tue May 21 01:32:35 2002
2002 +++ linux/drivers/scsi/sg.c Wed Aug 7 17:45:23 2002
2005 wake_up_interruptible(&sfp->read_wait);
2007 - kill_fasync(sfp->async_qp, SIGPOLL);
2008 + kill_fasync(sfp->async_qp, SIGIO, POLL_IN);
2012 diff -urN linux.orig/drivers/sgi/char/shmiq.c linux/drivers/sgi/char/shmiq.c
2013 --- linux.orig/drivers/sgi/char/shmiq.c Sun Mar 25 18:31:42 2001
2014 +++ linux/drivers/sgi/char/shmiq.c Wed Aug 7 17:45:23 2002
2016 s->tail = tail_next;
2017 shmiqs [device].tail = tail_next;
2018 if (shmiqs [device].fasync)
2019 - kill_fasync (shmiqs [device].fasync, SIGIO);
2020 + kill_fasync (shmiqs [device].fasync, SIGIO, POLL_IN);
2021 wake_up_interruptible (&shmiqs [device].proc_list);
2024 diff -urN linux.orig/drivers/telephony/ixj.c linux/drivers/telephony/ixj.c
2025 --- linux.orig/drivers/telephony/ixj.c Sun Mar 25 18:31:44 2001
2026 +++ linux/drivers/telephony/ixj.c Wed Aug 7 17:45:23 2002
2028 extern __inline__ void ixj_kill_fasync(int board)
2030 if (ixj[board].async_queue)
2031 - kill_fasync(ixj[board].async_queue, SIGIO); // Send apps notice of change
2032 + kill_fasync(ixj[board].async_queue, SIGIO, POLL_IN); // Send apps notice of change
2035 static void ixj_timeout(unsigned long ptr)
2036 diff -urN linux.orig/drivers/usb/evdev.c linux/drivers/usb/evdev.c
2037 --- linux.orig/drivers/usb/evdev.c Sun Mar 25 18:31:43 2001
2038 +++ linux/drivers/usb/evdev.c Wed Aug 7 17:45:23 2002
2040 list->buffer[list->head].value = value;
2041 list->head = (list->head + 1) & (EVDEV_BUFFER_SIZE - 1);
2043 - kill_fasync(list->fasync, SIGIO);
2044 + kill_fasync(list->fasync, SIGIO, POLL_IN);
2048 diff -urN linux.orig/drivers/usb/joydev.c linux/drivers/usb/joydev.c
2049 --- linux.orig/drivers/usb/joydev.c Sun Mar 25 18:31:43 2001
2050 +++ linux/drivers/usb/joydev.c Wed Aug 7 17:45:23 2002
2052 if (list->tail == (list->head = (list->head + 1) & (JOYDEV_BUFFER_SIZE - 1)))
2055 - kill_fasync(list->fasync, SIGIO);
2056 + kill_fasync(list->fasync, SIGIO, POLL_IN);
2060 diff -urN linux.orig/drivers/usb/mousedev.c linux/drivers/usb/mousedev.c
2061 --- linux.orig/drivers/usb/mousedev.c Sun Mar 25 18:31:42 2001
2062 +++ linux/drivers/usb/mousedev.c Wed Aug 7 17:45:23 2002
2067 - kill_fasync(list->fasync, SIGIO);
2068 + kill_fasync(list->fasync, SIGIO, POLL_IN);
2073 list->buffer = list->bufsiz;
2076 - kill_fasync(list->fasync, SIGIO);
2077 + kill_fasync(list->fasync, SIGIO, POLL_IN);
2079 wake_up_interruptible(&list->mousedev->wait);
2081 diff -urN linux.orig/fs/buffer.c linux/fs/buffer.c
2082 --- linux.orig/fs/buffer.c Sun Mar 25 18:37:38 2001
2083 +++ linux/fs/buffer.c Wed Aug 7 17:52:06 2002
2086 /* These are the min and max parameter values that we will allow to be assigned */
2087 int bdflush_min[N_PARAM] = { 0, 10, 5, 25, 0, 1*HZ, 1*HZ, 1, 1};
2088 -int bdflush_max[N_PARAM] = {100,5000, 2000, 2000,60*HZ, 600*HZ, 600*HZ, 2047, 5};
2089 +int bdflush_max[N_PARAM] = {100,5000, 2000, 2000,INT_MAX, 600*HZ, 600*HZ, 2047, 5};
2091 void wakeup_bdflush(int);
2093 @@ -144,13 +144,13 @@
2096 add_wait_queue(&bh->b_wait, &wait);
2098 - tsk->state = TASK_UNINTERRUPTIBLE;
2099 - run_task_queue(&tq_disk);
2100 - if (buffer_locked(bh)) {
2102 + set_current_state(TASK_UNINTERRUPTIBLE);
2103 + run_task_queue(&tq_disk);
2104 + if (!buffer_locked(bh))
2109 + } while (buffer_locked(bh));
2110 tsk->state = TASK_RUNNING;
2111 remove_wait_queue(&bh->b_wait, &wait);
2113 @@ -1530,9 +1530,13 @@
2114 struct buffer_head *p = tmp;
2115 tmp = tmp->b_this_page;
2117 - if (buffer_dirty(p))
2118 - if (test_and_set_bit(BH_Wait_IO, &p->b_state))
2119 - ll_rw_block(WRITE, 1, &p);
2120 + if (buffer_dirty(p) || buffer_locked(p))
2121 + if (test_and_set_bit(BH_Wait_IO, &p->b_state)) {
2122 + if (buffer_dirty(p))
2123 + ll_rw_block(WRITE, 1, &p);
2124 + else if (buffer_locked(p))
2125 + wait_on_buffer(p);
2127 } while (tmp != bh);
2129 /* Restore the visibility of the page before returning. */
2130 @@ -1788,7 +1792,6 @@
2131 if (ncount) printk("sync_old_buffers: %d dirty buffers not on dirty list\n", ncount);
2132 printk("Wrote %d/%d buffers\n", nwritten, ndirty);
2134 - run_task_queue(&tq_disk);
2138 @@ -1986,13 +1989,18 @@
2141 strcpy(tsk->comm, "kupdate");
2143 + /* sigstop and sigcont will stop and wakeup kupdate */
2144 + spin_lock_irq(&tsk->sigmask_lock);
2145 sigfillset(&tsk->blocked);
2146 - /* sigcont will wakeup kupdate after setting interval to 0 */
2147 sigdelset(&tsk->blocked, SIGCONT);
2148 + sigdelset(&tsk->blocked, SIGSTOP);
2149 + spin_unlock_irq(&tsk->sigmask_lock);
2154 + /* update interval */
2155 interval = bdf_prm.b_un.interval;
2158 @@ -2001,9 +2009,25 @@
2163 tsk->state = TASK_STOPPED;
2164 schedule(); /* wait for SIGCONT */
2166 + /* check for sigstop */
2167 + if (signal_pending(tsk))
2170 + spin_lock_irq(&tsk->sigmask_lock);
2171 + if (sigismember(&tsk->signal, SIGSTOP))
2173 + sigdelset(&tsk->signal, SIGSTOP);
2176 + recalc_sigpending(tsk);
2177 + spin_unlock_irq(&tsk->sigmask_lock);
2179 + goto stop_kupdate;
2182 printk("kupdate() activated...\n");
2184 diff -urN linux.orig/fs/ext2/inode.c linux/fs/ext2/inode.c
2185 --- linux.orig/fs/ext2/inode.c Sun Mar 25 18:30:58 2001
2186 +++ linux/fs/ext2/inode.c Wed Aug 7 17:54:11 2002
2190 #if BITS_PER_LONG == 64
2193 struct super_block *sb = inode->i_sb;
2194 struct ext2_super_block *es = sb->u.ext2_sb.s_es;
2195 if (!(es->s_feature_ro_compat &
2196 diff -urN linux.orig/fs/fcntl.c linux/fs/fcntl.c
2197 --- linux.orig/fs/fcntl.c Sun Mar 25 18:30:58 2001
2198 +++ linux/fs/fcntl.c Wed Aug 7 17:45:23 2002
2200 #include <linux/file.h>
2201 #include <linux/smp_lock.h>
2203 +#include <asm/poll.h>
2204 +#include <asm/siginfo.h>
2205 #include <asm/uaccess.h>
2207 extern int sock_fcntl (struct file *, unsigned int cmd, unsigned long arg);
2208 @@ -223,7 +225,19 @@
2212 -static void send_sigio(struct fown_struct *fown, struct fasync_struct *fa)
2213 +/* Table to convert sigio signal codes into poll band bitmaps */
2215 +static int band_table[NSIGPOLL] = {
2216 + POLLIN | POLLRDNORM, /* POLL_IN */
2217 + POLLOUT | POLLWRNORM | POLLWRBAND, /* POLL_OUT */
2218 + POLLIN | POLLRDNORM | POLLMSG, /* POLL_MSG */
2219 + POLLERR, /* POLL_ERR */
2220 + POLLPRI | POLLRDBAND, /* POLL_PRI */
2221 + POLLHUP | POLLERR /* POLL_HUP */
2224 +static void send_sigio(struct fown_struct *fown, struct fasync_struct *fa,
2227 struct task_struct * p;
2228 int pid = fown->pid;
2229 @@ -252,9 +266,12 @@
2230 back to SIGIO in that case. --sct */
2231 si.si_signo = fown->signum;
2233 - si.si_code = SI_SIGIO;
2236 + si.si_code = reason;
2237 + if (reason - POLL_IN >= NSIGPOLL ||
2239 + panic("send_sigio got `reason' != POLL_*");
2241 + si.si_band = band_table[reason - POLL_IN];
2242 si.si_fd = fa->fa_fd;
2243 if (!send_sig_info(fown->signum, &si, p))
2246 read_unlock(&tasklist_lock);
2249 -void kill_fasync(struct fasync_struct *fa, int sig)
2250 +void kill_fasync(struct fasync_struct *fa, int sig, int band)
2253 struct fown_struct * fown;
2254 @@ -276,8 +293,11 @@
2257 fown = &fa->fa_file->f_owner;
2259 - send_sigio(fown, fa);
2260 + /* Don't send SIGURG to processes which have not set a
2261 + queued signum: SIGURG has its own default signalling
2263 + if (fown->pid && !(sig == SIGURG && fown->signum == 0))
2264 + send_sigio(fown, fa, band);
2268 diff -urN linux.orig/fs/inode.c linux/fs/inode.c
2269 --- linux.orig/fs/inode.c Sun Mar 25 18:37:38 2001
2270 +++ linux/fs/inode.c Wed Aug 7 17:57:41 2002
2272 #include <linux/init.h>
2273 #include <linux/quotaops.h>
2274 #include <linux/random.h>
2275 +#include <linux/bigmem.h>
2276 +#include <linux/slab.h>
2279 * New inode.c implementation.
2281 * Inode lookup is no longer as critical as it used to be:
2282 * most of the lookups are going to be through the dcache.
2284 -#define HASH_BITS 8
2285 -#define HASH_SIZE (1UL << HASH_BITS)
2286 -#define HASH_MASK (HASH_SIZE-1)
2287 +#define HASH_BITS i_hash_bits
2288 +#define HASH_MASK i_hash_mask
2291 * Each inode can be on two separate lists. One is
2294 LIST_HEAD(inode_in_use);
2295 static LIST_HEAD(inode_unused);
2296 -static struct list_head inode_hashtable[HASH_SIZE];
2297 +static unsigned int i_hash_bits;
2298 +static unsigned int i_hash_mask;
2299 +static struct list_head *inode_hashtable;
2301 __u32 inode_generation_count = 0;
2304 inode->i_writecount = 0;
2306 inode->i_generation = 0;
2307 + inode->i_blocks = 0;
2308 memset(&inode->i_dquot, 0, sizeof(inode->i_dquot));
2309 sema_init(&inode->i_sem, 1);
2313 static inline unsigned long hash(struct super_block *sb, unsigned long i_ino)
2315 - unsigned long tmp = i_ino | (unsigned long) sb;
2316 + unsigned long tmp = i_ino + (unsigned long) sb / (sizeof(struct super_block) & ~(sizeof(struct super_block) - 1));
2317 tmp = tmp + (tmp >> HASH_BITS);
2318 return tmp & HASH_MASK;
2320 @@ -835,30 +839,85 @@
2325 - * Initialize the hash tables and default
2326 - * value for max inodes
2328 -#define MAX_INODE (16384)
2330 void __init inode_init(void)
2333 - struct list_head *head = inode_hashtable;
2335 + struct list_head *d;
2336 + unsigned long nr_hash, hash_size, tmp;
2338 +#ifndef CONFIG_BIGMEM
2339 + nr_hash = num_physpages;
2341 + nr_hash = bigmem_mapnr;
2343 + nr_hash <<= PAGE_SHIFT;
2346 + /* scale logaritmically over 32768 inodes */
2347 + if (nr_hash > 16384) {
2348 + if (nr_hash > 32768)
2353 + if (nr_hash > 32768) {
2354 + if (nr_hash > 65536)
2360 + /* This limit triggers with more than 1G of RAM */
2361 + if (nr_hash > 65536)
2364 + max_inodes = nr_hash;
2366 + hash_size = nr_hash * sizeof(struct list_head);
2368 + if (hash_size < PAGE_SIZE) {
2369 + /* Embedded systems */
2370 + inode_hashtable = kmalloc(hash_size, GFP_ATOMIC);
2372 + i_hash_mask = (nr_hash - 1);
2377 + while((tmp >>= 1UL) != 0UL)
2380 + for (order = 0; ((1UL << order) << PAGE_SHIFT) < hash_size;
2384 + hash_size = 1UL << (order+PAGE_SHIFT);
2385 + nr_hash = hash_size / sizeof(struct list_head);
2387 + i_hash_mask = (nr_hash - 1);
2391 + while((tmp >>= 1UL) != 0UL)
2394 + inode_hashtable = (struct list_head *) __get_free_pages(GFP_ATOMIC, order);
2395 + } while(inode_hashtable == NULL && --order >= 0);
2398 + printk("Inode hash table entries: %lu (%ldk), inode-max: %d\n",
2399 + nr_hash, hash_size >> 10, max_inodes);
2401 + if (!inode_hashtable)
2402 + panic("Failed to allocate inode hash table\n");
2404 + d = inode_hashtable;
2407 - INIT_LIST_HEAD(head);
2409 + INIT_LIST_HEAD(d);
2414 - /* Initial guess at reasonable inode number */
2415 - max = num_physpages >> 1;
2416 - if (max > MAX_INODE)
2420 /* Get a random number. */
2421 get_random_bytes (&inode_generation_count,
2422 sizeof (inode_generation_count));
2423 diff -urN linux.orig/fs/proc/fd.c linux/fs/proc/fd.c
2424 --- linux.orig/fs/proc/fd.c Sun Mar 25 18:30:58 2001
2425 +++ linux/fs/proc/fd.c Wed Aug 7 17:51:29 2002
2428 len = dentry->d_name.len;
2429 name = dentry->d_name.name;
2430 - if (len > 1 && *name == '0') goto out;
2434 diff -urN linux.orig/fs/proc/root.c linux/fs/proc/root.c
2435 --- linux.orig/fs/proc/root.c Tue May 21 01:32:35 2002
2436 +++ linux/fs/proc/root.c Wed Aug 7 17:51:29 2002
2442 if (pid & 0xffff0000) {
2445 diff -urN linux.orig/fs/select.c linux/fs/select.c
2446 --- linux.orig/fs/select.c Sun Mar 25 18:30:58 2001
2447 +++ linux/fs/select.c Wed Aug 7 17:55:44 2002
2450 /* Do a sanity check on nfds ... */
2452 - if (nfds > current->files->max_fds)
2453 + if (nfds > current->rlim[RLIMIT_NOFILE].rlim_cur)
2457 diff -urN linux.orig/fs/smbfs/sock.c linux/fs/smbfs/sock.c
2458 --- linux.orig/fs/smbfs/sock.c Sun Mar 25 18:30:59 2001
2459 +++ linux/fs/smbfs/sock.c Wed Aug 7 17:45:23 2002
2463 wake_up_interruptible(sk->sleep);
2464 - sock_wake_async(sk->socket,1);
2465 + sock_wake_async(sk->socket,1,POLL_IN);
2469 diff -urN linux.orig/include/asm-i386/bugs.h linux/include/asm-i386/bugs.h
2470 --- linux.orig/include/asm-i386/bugs.h Sun Mar 25 18:37:39 2001
2471 +++ linux/include/asm-i386/bugs.h Wed Aug 7 17:44:43 2002
2473 * <rreilova@ececs.uc.edu>
2474 * - Channing Corn (tests & fixes),
2475 * - Andrew D. Balsa (code cleanup).
2477 + * Pentium III FXSR, SSE support
2478 + * Gareth Hughes <gareth@valinux.com>, May 2000
2483 #include <linux/config.h>
2484 #include <asm/processor.h>
2485 #include <asm/msr.h>
2486 +#include <asm/i387.h>
2488 #define CONFIG_BUGi386
2496 + * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
2498 + if (offsetof(struct task_struct, tss.i387.fxsave) & 15) {
2499 + extern void __buggy_fxsr_alignment(void);
2500 + __buggy_fxsr_alignment();
2502 + if (cpu_has_fxsr) {
2503 + printk(KERN_INFO "Enabling fast FPU save and restore... ");
2504 + set_in_cr4(X86_CR4_OSFXSR);
2505 + printk("done.\n");
2507 + if (cpu_has_xmm) {
2508 + printk(KERN_INFO "Enabling unmasked SIMD FPU exception support... ");
2509 + set_in_cr4(X86_CR4_OSXMMEXCPT);
2510 + printk("done.\n");
2513 if (mca_pentium_flag) {
2514 /* The IBM Model 95 machines with pentiums lock up on
2515 * fpu test, so we avoid it. All pentiums have inbuilt
2516 diff -urN linux.orig/include/asm-i386/cache.h linux/include/asm-i386/cache.h
2517 --- linux.orig/include/asm-i386/cache.h Sun Mar 25 18:31:05 2001
2518 +++ linux/include/asm-i386/cache.h Wed Aug 7 17:44:10 2002
2520 #define __ARCH_I386_CACHE_H
2522 /* bytes per L1 cache line */
2523 -#if CPU==586 || CPU==686
2524 +#ifdef CONFIG_M686_L1_64
2525 +#define L1_CACHE_BYTES 64
2526 +#elif defined(CONFIG_M686_L1_128)
2527 +#define L1_CACHE_BYTES 128
2528 +#elif CPU==586 || CPU==686
2529 #define L1_CACHE_BYTES 32
2531 #define L1_CACHE_BYTES 16
2532 diff -urN linux.orig/include/asm-i386/elf.h linux/include/asm-i386/elf.h
2533 --- linux.orig/include/asm-i386/elf.h Sun Mar 25 18:31:05 2001
2534 +++ linux/include/asm-i386/elf.h Wed Aug 7 17:44:43 2002
2536 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
2538 typedef struct user_i387_struct elf_fpregset_t;
2539 +typedef struct user_fxsr_struct elf_fpxregset_t;
2542 * This is used to ensure we don't load something for the wrong architecture.
2543 diff -urN linux.orig/include/asm-i386/i387.h linux/include/asm-i386/i387.h
2544 --- linux.orig/include/asm-i386/i387.h Thu Jan 1 01:00:00 1970
2545 +++ linux/include/asm-i386/i387.h Wed Aug 7 17:44:43 2002
2548 + * include/asm-i386/i387.h
2550 + * Copyright (C) 1994 Linus Torvalds
2552 + * Pentium III FXSR, SSE support
2553 + * General FPU state handling cleanups
2554 + * Gareth Hughes <gareth@valinux.com>, May 2000
2557 +#ifndef __ASM_I386_I387_H
2558 +#define __ASM_I386_I387_H
2560 +#include <linux/sched.h>
2561 +#include <asm/processor.h>
2562 +#include <asm/sigcontext.h>
2563 +#include <asm/user.h>
2565 +extern void init_fpu(void);
2567 + * FPU lazy state save handling...
2569 +extern void save_init_fpu( struct task_struct *tsk );
2570 +extern void restore_fpu( struct task_struct *tsk );
2572 +#define unlazy_fpu( tsk ) do { \
2573 + if ( tsk->flags & PF_USEDFPU ) \
2574 + save_init_fpu( tsk ); \
2577 +#define clear_fpu( tsk ) do { \
2578 + if ( tsk->flags & PF_USEDFPU ) { \
2579 + tsk->flags &= ~PF_USEDFPU; \
2585 + * FPU state interaction...
2587 +extern unsigned short get_fpu_cwd( struct task_struct *tsk );
2588 +extern unsigned short get_fpu_swd( struct task_struct *tsk );
2589 +extern unsigned short get_fpu_twd( struct task_struct *tsk );
2590 +extern unsigned short get_fpu_mxcsr( struct task_struct *tsk );
2592 +extern void set_fpu_cwd( struct task_struct *tsk, unsigned short cwd );
2593 +extern void set_fpu_swd( struct task_struct *tsk, unsigned short swd );
2594 +extern void set_fpu_twd( struct task_struct *tsk, unsigned short twd );
2595 +extern void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr );
2597 +#define load_mxcsr( val ) do { \
2598 + unsigned long __mxcsr = ((unsigned long)(val) & 0xffbf); \
2599 + asm volatile( "ldmxcsr %0" : : "m" (__mxcsr) ); \
2603 + * Signal frame handlers...
2605 +extern int save_i387( struct _fpstate *buf );
2606 +extern int restore_i387( struct _fpstate *buf );
2609 + * ptrace request handers...
2611 +extern int get_fpregs( struct user_i387_struct *buf,
2612 + struct task_struct *tsk );
2613 +extern int set_fpregs( struct task_struct *tsk,
2614 + struct user_i387_struct *buf );
2616 +extern int get_fpxregs( struct user_fxsr_struct *buf,
2617 + struct task_struct *tsk );
2618 +extern int set_fpxregs( struct task_struct *tsk,
2619 + struct user_fxsr_struct *buf );
2622 + * FPU state for core dumps...
2624 +extern int dump_fpu( struct pt_regs *regs,
2625 + struct user_i387_struct *fpu );
2626 +extern int dump_extended_fpu( struct pt_regs *regs,
2627 + struct user_fxsr_struct *fpu );
2629 +#endif /* __ASM_I386_I387_H */
2630 diff -urN linux.orig/include/asm-i386/processor.h linux/include/asm-i386/processor.h
2631 --- linux.orig/include/asm-i386/processor.h Tue May 21 01:32:35 2002
2632 +++ linux/include/asm-i386/processor.h Wed Aug 7 17:44:43 2002
2634 unsigned long *pgd_quick;
2635 unsigned long *pte_quick;
2636 unsigned long pgtable_cache_sz;
2638 +} __attribute__((__aligned__(SMP_CACHE_BYTES)));
2640 #define X86_VENDOR_INTEL 0
2641 #define X86_VENDOR_CYRIX 1
2643 #define X86_FEATURE_22 0x00400000
2644 #define X86_FEATURE_MMX 0x00800000 /* multimedia extensions */
2645 #define X86_FEATURE_FXSR 0x01000000 /* FXSAVE and FXRSTOR instructions (fast save and restore of FPU context), and CR4.OSFXSR (OS uses these instructions) available */
2646 -#define X86_FEATURE_25 0x02000000
2647 +#define X86_FEATURE_XMM 0x02000000 /* Intel MMX2 instruction set */
2648 #define X86_FEATURE_26 0x04000000
2649 #define X86_FEATURE_27 0x08000000
2650 #define X86_FEATURE_28 0x10000000
2651 @@ -100,6 +100,23 @@
2652 #define current_cpu_data boot_cpu_data
2655 +#define cpu_has_pge \
2656 + (boot_cpu_data.x86_capability & X86_FEATURE_PGE)
2657 +#define cpu_has_pse \
2658 + (boot_cpu_data.x86_capability & X86_FEATURE_PSE)
2659 +#define cpu_has_pae \
2660 + (boot_cpu_data.x86_capability & X86_FEATURE_PAE)
2661 +#define cpu_has_tsc \
2662 + (boot_cpu_data.x86_capability & X86_FEATURE_TSC)
2663 +#define cpu_has_de \
2664 + (boot_cpu_data.x86_capability & X86_FEATURE_DE)
2665 +#define cpu_has_vme \
2666 + (boot_cpu_data.x86_capability & X86_FEATURE_VME)
2667 +#define cpu_has_fxsr \
2668 + ((boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX) && (boot_cpu_data.x86_capability & X86_FEATURE_FXSR))
2669 +#define cpu_has_xmm \
2670 + (boot_cpu_data.x86_capability & X86_FEATURE_XMM)
2672 extern char ignore_irq13;
2674 extern void identify_cpu(struct cpuinfo_x86 *);
2675 @@ -184,6 +201,49 @@
2679 + * Intel CPU features in CR4
2681 +#define X86_CR4_VME 0x0001 /* enable vm86 extensions */
2682 +#define X86_CR4_PVI 0x0002 /* virtual interrupts flag enable */
2683 +#define X86_CR4_TSD 0x0004 /* disable time stamp at ipl 3 */
2684 +#define X86_CR4_DE 0x0008 /* enable debugging extensions */
2685 +#define X86_CR4_PSE 0x0010 /* enable page size extensions */
2686 +#define X86_CR4_PAE 0x0020 /* enable physical address extensions */
2687 +#define X86_CR4_MCE 0x0040 /* Machine check enable */
2688 +#define X86_CR4_PGE 0x0080 /* enable global pages */
2689 +#define X86_CR4_PCE 0x0100 /* enable performance counters at ipl 3 */
2690 +#define X86_CR4_OSFXSR 0x0200 /* enable fast FPU save and restore */
2691 +#define X86_CR4_OSXMMEXCPT 0x0400 /* enable unmasked SSE exceptions */
2694 + * Save the cr4 feature set we're using (ie
2695 + * Pentium 4MB enable and PPro Global page
2696 + * enable), so that any CPU's that boot up
2697 + * after us can get the correct flags.
2699 +extern unsigned long x86_cr4;
2701 +static inline void set_in_cr4 (unsigned long mask)
2704 + __asm__("movl %%cr4,%%eax\n\t"
2705 + "orl %0,%%eax\n\t"
2706 + "movl %%eax,%%cr4\n"
2711 +static inline void clear_in_cr4 (unsigned long mask)
2714 + __asm__("movl %%cr4,%%eax\n\t"
2715 + "andl %0,%%eax\n\t"
2716 + "movl %%eax,%%cr4\n"
2722 * Cyrix CPU configuration register indexes
2724 #define CX86_CCR0 0xc0
2725 @@ -211,39 +271,6 @@
2729 - * * Intel CPU features in CR4
2731 -#define X86_CR4_VME 0x0001 /* enable vm86 extensions */
2732 -#define X86_CR4_PVI 0x0002 /* virtual interrupts flag enable */
2733 -#define X86_CR4_TSD 0x0004 /* disable time stamp at ipl 3 */
2734 -#define X86_CR4_DE 0x0008 /* enable debugging extensions */
2735 -#define X86_CR4_PSE 0x0010 /* enable page size extensions */
2736 -#define X86_CR4_PAE 0x0020 /* enable physical address extensions */
2737 -#define X86_CR4_MCE 0x0040 /* Machine check enable */
2738 -#define X86_CR4_PGE 0x0080 /* enable global pages */
2739 -#define X86_CR4_PCE 0x0100 /* enable performance counters at ipl 3 */
2740 -#define X86_CR4_OSFXSR 0x0200 /* enable fast FPU save and restore */
2741 -#define X86_CR4_OSXMMEXCPT 0x0400 /* enable unmasked SSE exceptions */
2744 - * Save the cr4 feature set we're using (ie
2745 - * Pentium 4MB enable and PPro Global page
2746 - * enable), so that any CPU's that boot up
2747 - * after us can get the correct flags.
2749 -extern unsigned long mmu_cr4_features;
2751 -static inline void set_in_cr4 (unsigned long mask)
2753 - mmu_cr4_features |= mask;
2754 - __asm__("movl %%cr4,%%eax\n\t"
2755 - "orl %0,%%eax\n\t"
2756 - "movl %%eax,%%cr4\n"
2762 * Bus types (default is ISA, but people can check others with these..)
2764 extern int EISA_bus;
2767 #define IO_BITMAP_SIZE 32
2769 -struct i387_hard_struct {
2770 +struct i387_fsave_struct {
2774 @@ -283,22 +310,42 @@
2775 long status; /* software status information */
2778 -struct i387_soft_struct {
2783 + * has to be 128-bit aligned
2785 +struct i387_fxsave_struct {
2786 + unsigned short cwd;
2787 + unsigned short swd;
2788 + unsigned short twd;
2789 + unsigned short fop;
2794 - long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
2795 - unsigned char ftop, changed, lookahead, no_update, rm, alimit;
2796 - struct info *info;
2797 - unsigned long entry_eip;
2800 + long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
2801 + long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
2803 +} __attribute__ ((aligned (16)));
2805 +struct i387_soft_struct {
2813 + long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
2814 + unsigned char ftop, changed, lookahead, no_update, rm, alimit;
2815 + struct info *info;
2816 + unsigned long entry_eip;
2820 - struct i387_hard_struct hard;
2821 + struct i387_fsave_struct fsave;
2822 + struct i387_fxsave_struct fxsave;
2823 struct i387_soft_struct soft;
2826 @@ -391,27 +438,6 @@
2827 extern void forget_segments(void);
2830 - * FPU lazy state save handling..
2832 -#define save_fpu(tsk) do { \
2833 - asm volatile("fnsave %0\n\tfwait":"=m" (tsk->tss.i387)); \
2834 - tsk->flags &= ~PF_USEDFPU; \
2838 -#define unlazy_fpu(tsk) do { \
2839 - if (tsk->flags & PF_USEDFPU) \
2843 -#define clear_fpu(tsk) do { \
2844 - if (tsk->flags & PF_USEDFPU) { \
2845 - tsk->flags &= ~PF_USEDFPU; \
2851 * Return saved PC of a blocked thread.
2853 extern inline unsigned long thread_saved_pc(struct thread_struct *t)
2854 diff -urN linux.orig/include/asm-i386/ptrace.h linux/include/asm-i386/ptrace.h
2855 --- linux.orig/include/asm-i386/ptrace.h Sun Mar 25 18:31:05 2001
2856 +++ linux/include/asm-i386/ptrace.h Wed Aug 7 17:44:43 2002
2858 #define PTRACE_SETREGS 13
2859 #define PTRACE_GETFPREGS 14
2860 #define PTRACE_SETFPREGS 15
2861 +#define PTRACE_GETFPXREGS 18
2862 +#define PTRACE_SETFPXREGS 19
2865 #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->xcs))
2866 diff -urN linux.orig/include/asm-i386/sigcontext.h linux/include/asm-i386/sigcontext.h
2867 --- linux.orig/include/asm-i386/sigcontext.h Sun Mar 25 18:31:05 2001
2868 +++ linux/include/asm-i386/sigcontext.h Wed Aug 7 17:44:43 2002
2870 * normal i387 hardware setup, the extra "status"
2871 * word is used to save the coprocessor status word
2872 * before entering the handler.
2874 + * Pentium III FXSR, SSE support
2875 + * Gareth Hughes <gareth@valinux.com>, May 2000
2877 + * The FPU state data structure has had to grow to accomodate the
2878 + * extended FPU state required by the Streaming SIMD Extensions.
2879 + * There is no documented standard to accomplish this at the moment.
2882 unsigned short significand[4];
2883 unsigned short exponent;
2887 + unsigned short significand[4];
2888 + unsigned short exponent;
2889 + unsigned short padding[3];
2893 + unsigned long element[4];
2904 + /* Regular FPU environment */
2907 + unsigned long tag;
2908 + unsigned long ipoff;
2909 + unsigned long cssel;
2910 + unsigned long dataoff;
2911 + unsigned long datasel;
2912 struct _fpreg _st[8];
2913 - unsigned long status;
2914 + unsigned short status;
2915 + unsigned short magic; /* 0xffff = regular FPU data only */
2917 + /* FXSR FPU environment */
2918 + unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
2919 + unsigned long mxcsr;
2920 + unsigned long reserved;
2921 + struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
2922 + struct _xmmreg _xmm[8];
2923 + unsigned long padding[56];
2926 +#define X86_FXSR_MAGIC 0x0000
2929 unsigned short gs, __gsh;
2930 unsigned short fs, __fsh;
2931 diff -urN linux.orig/include/asm-i386/siginfo.h linux/include/asm-i386/siginfo.h
2932 --- linux.orig/include/asm-i386/siginfo.h Sun Mar 25 18:37:39 2001
2933 +++ linux/include/asm-i386/siginfo.h Wed Aug 7 17:44:43 2002
2935 #define si_band _sifields._sigpoll._band
2936 #define si_fd _sifields._sigpoll._fd
2939 +#define __SI_MASK 0xffff0000
2940 +#define __SI_KILL (0 << 16)
2941 +#define __SI_TIMER (1 << 16)
2942 +#define __SI_POLL (2 << 16)
2943 +#define __SI_FAULT (3 << 16)
2944 +#define __SI_CHLD (4 << 16)
2945 +#define __SI_RT (5 << 16)
2946 +#define __SI_CODE(T,N) ((T) << 16 | ((N) & 0xffff))
2948 +#define __SI_KILL 0
2949 +#define __SI_TIMER 0
2950 +#define __SI_POLL 0
2951 +#define __SI_FAULT 0
2952 +#define __SI_CHLD 0
2954 +#define __SI_CODE(T,N) (N)
2959 * Digital reserves positive values for kernel-generated signals.
2960 diff -urN linux.orig/include/asm-i386/user.h linux/include/asm-i386/user.h
2961 --- linux.orig/include/asm-i386/user.h Sun Mar 25 18:31:05 2001
2962 +++ linux/include/asm-i386/user.h Wed Aug 7 17:44:43 2002
2964 The minimum core file size is 3 pages, or 12288 bytes.
2968 + * Pentium III FXSR, SSE support
2969 + * Gareth Hughes <gareth@valinux.com>, May 2000
2971 + * Provide support for the GDB 5.0+ PTRACE_{GET|SET}FPXREGS requests for
2972 + * interacting with the FXSR-format floating point environment. Floating
2973 + * point data can be accessed in the regular format in the usual manner,
2974 + * and both the standard and SIMD floating point data can be accessed via
2975 + * the new ptrace requests. In either case, changes to the FPU environment
2976 + * will be reflected in the task's state as expected.
2979 struct user_i387_struct {
2983 long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */
2986 +struct user_fxsr_struct {
2987 + unsigned short cwd;
2988 + unsigned short swd;
2989 + unsigned short twd;
2990 + unsigned short fop;
2997 + long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
2998 + long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
3003 * This is the old layout of "struct pt_regs", and
3004 * is still the layout used by user mode (the new
3005 diff -urN linux.orig/include/asm-sparc/asm_offsets.h linux/include/asm-sparc/asm_offsets.h
3006 --- linux.orig/include/asm-sparc/asm_offsets.h Fri Nov 2 17:39:08 2001
3007 +++ linux/include/asm-sparc/asm_offsets.h Wed Aug 7 17:55:29 2002
3008 @@ -26,179 +26,181 @@
3009 #define ASIZ_task_priority 0x00000004
3010 #define AOFF_task_avg_slice 0x00000024
3011 #define ASIZ_task_avg_slice 0x00000004
3012 -#define AOFF_task_has_cpu 0x00000028
3013 +#define AOFF_task_counter_refresh 0x00000028
3014 +#define ASIZ_task_counter_refresh 0x00000004
3015 +#define AOFF_task_has_cpu 0x0000002c
3016 #define ASIZ_task_has_cpu 0x00000004
3017 -#define AOFF_task_processor 0x0000002c
3018 +#define AOFF_task_processor 0x00000030
3019 #define ASIZ_task_processor 0x00000004
3020 -#define AOFF_task_last_processor 0x00000030
3021 +#define AOFF_task_last_processor 0x00000034
3022 #define ASIZ_task_last_processor 0x00000004
3023 -#define AOFF_task_lock_depth 0x00000034
3024 +#define AOFF_task_lock_depth 0x00000038
3025 #define ASIZ_task_lock_depth 0x00000004
3026 -#define AOFF_task_next_task 0x00000038
3027 +#define AOFF_task_next_task 0x0000003c
3028 #define ASIZ_task_next_task 0x00000004
3029 -#define AOFF_task_prev_task 0x0000003c
3030 +#define AOFF_task_prev_task 0x00000040
3031 #define ASIZ_task_prev_task 0x00000004
3032 -#define AOFF_task_next_run 0x00000040
3033 +#define AOFF_task_next_run 0x00000044
3034 #define ASIZ_task_next_run 0x00000004
3035 -#define AOFF_task_prev_run 0x00000044
3036 +#define AOFF_task_prev_run 0x00000048
3037 #define ASIZ_task_prev_run 0x00000004
3038 -#define AOFF_task_task_exclusive 0x00000048
3039 +#define AOFF_task_task_exclusive 0x0000004c
3040 #define ASIZ_task_task_exclusive 0x00000004
3041 -#define AOFF_task_binfmt 0x0000004c
3042 +#define AOFF_task_binfmt 0x00000050
3043 #define ASIZ_task_binfmt 0x00000004
3044 -#define AOFF_task_exit_code 0x00000050
3045 +#define AOFF_task_exit_code 0x00000054
3046 #define ASIZ_task_exit_code 0x00000004
3047 -#define AOFF_task_exit_signal 0x00000054
3048 +#define AOFF_task_exit_signal 0x00000058
3049 #define ASIZ_task_exit_signal 0x00000004
3050 -#define AOFF_task_pdeath_signal 0x00000058
3051 +#define AOFF_task_pdeath_signal 0x0000005c
3052 #define ASIZ_task_pdeath_signal 0x00000004
3053 -#define AOFF_task_personality 0x0000005c
3054 +#define AOFF_task_personality 0x00000060
3055 #define ASIZ_task_personality 0x00000004
3056 -#define AOFF_task_pid 0x00000064
3057 +#define AOFF_task_pid 0x00000068
3058 #define ASIZ_task_pid 0x00000004
3059 -#define AOFF_task_pgrp 0x00000068
3060 +#define AOFF_task_pgrp 0x0000006c
3061 #define ASIZ_task_pgrp 0x00000004
3062 -#define AOFF_task_tty_old_pgrp 0x0000006c
3063 +#define AOFF_task_tty_old_pgrp 0x00000070
3064 #define ASIZ_task_tty_old_pgrp 0x00000004
3065 -#define AOFF_task_session 0x00000070
3066 +#define AOFF_task_session 0x00000074
3067 #define ASIZ_task_session 0x00000004
3068 -#define AOFF_task_leader 0x00000074
3069 +#define AOFF_task_leader 0x00000078
3070 #define ASIZ_task_leader 0x00000004
3071 -#define AOFF_task_p_opptr 0x00000078
3072 +#define AOFF_task_p_opptr 0x0000007c
3073 #define ASIZ_task_p_opptr 0x00000004
3074 -#define AOFF_task_p_pptr 0x0000007c
3075 +#define AOFF_task_p_pptr 0x00000080
3076 #define ASIZ_task_p_pptr 0x00000004
3077 -#define AOFF_task_p_cptr 0x00000080
3078 +#define AOFF_task_p_cptr 0x00000084
3079 #define ASIZ_task_p_cptr 0x00000004
3080 -#define AOFF_task_p_ysptr 0x00000084
3081 +#define AOFF_task_p_ysptr 0x00000088
3082 #define ASIZ_task_p_ysptr 0x00000004
3083 -#define AOFF_task_p_osptr 0x00000088
3084 +#define AOFF_task_p_osptr 0x0000008c
3085 #define ASIZ_task_p_osptr 0x00000004
3086 -#define AOFF_task_pidhash_next 0x0000008c
3087 +#define AOFF_task_pidhash_next 0x00000090
3088 #define ASIZ_task_pidhash_next 0x00000004
3089 -#define AOFF_task_pidhash_pprev 0x00000090
3090 +#define AOFF_task_pidhash_pprev 0x00000094
3091 #define ASIZ_task_pidhash_pprev 0x00000004
3092 -#define AOFF_task_tarray_ptr 0x00000094
3093 +#define AOFF_task_tarray_ptr 0x00000098
3094 #define ASIZ_task_tarray_ptr 0x00000004
3095 -#define AOFF_task_wait_chldexit 0x00000098
3096 +#define AOFF_task_wait_chldexit 0x0000009c
3097 #define ASIZ_task_wait_chldexit 0x00000004
3098 -#define AOFF_task_vfork_sem 0x0000009c
3099 +#define AOFF_task_vfork_sem 0x000000a0
3100 #define ASIZ_task_vfork_sem 0x00000004
3101 -#define AOFF_task_policy 0x000000a0
3102 +#define AOFF_task_policy 0x000000a4
3103 #define ASIZ_task_policy 0x00000004
3104 -#define AOFF_task_rt_priority 0x000000a4
3105 +#define AOFF_task_rt_priority 0x000000a8
3106 #define ASIZ_task_rt_priority 0x00000004
3107 -#define AOFF_task_it_real_value 0x000000a8
3108 +#define AOFF_task_it_real_value 0x000000ac
3109 #define ASIZ_task_it_real_value 0x00000004
3110 -#define AOFF_task_it_prof_value 0x000000ac
3111 +#define AOFF_task_it_prof_value 0x000000b0
3112 #define ASIZ_task_it_prof_value 0x00000004
3113 -#define AOFF_task_it_virt_value 0x000000b0
3114 +#define AOFF_task_it_virt_value 0x000000b4
3115 #define ASIZ_task_it_virt_value 0x00000004
3116 -#define AOFF_task_it_real_incr 0x000000b4
3117 +#define AOFF_task_it_real_incr 0x000000b8
3118 #define ASIZ_task_it_real_incr 0x00000004
3119 -#define AOFF_task_it_prof_incr 0x000000b8
3120 +#define AOFF_task_it_prof_incr 0x000000bc
3121 #define ASIZ_task_it_prof_incr 0x00000004
3122 -#define AOFF_task_it_virt_incr 0x000000bc
3123 +#define AOFF_task_it_virt_incr 0x000000c0
3124 #define ASIZ_task_it_virt_incr 0x00000004
3125 -#define AOFF_task_real_timer 0x000000c0
3126 +#define AOFF_task_real_timer 0x000000c4
3127 #define ASIZ_task_real_timer 0x00000014
3128 -#define AOFF_task_times 0x000000d4
3129 +#define AOFF_task_times 0x000000d8
3130 #define ASIZ_task_times 0x00000010
3131 -#define AOFF_task_start_time 0x000000e4
3132 +#define AOFF_task_start_time 0x000000e8
3133 #define ASIZ_task_start_time 0x00000004
3134 -#define AOFF_task_per_cpu_utime 0x000000e8
3135 +#define AOFF_task_per_cpu_utime 0x000000ec
3136 #define ASIZ_task_per_cpu_utime 0x00000004
3137 -#define AOFF_task_min_flt 0x000000f0
3138 +#define AOFF_task_min_flt 0x000000f4
3139 #define ASIZ_task_min_flt 0x00000004
3140 -#define AOFF_task_maj_flt 0x000000f4
3141 +#define AOFF_task_maj_flt 0x000000f8
3142 #define ASIZ_task_maj_flt 0x00000004
3143 -#define AOFF_task_nswap 0x000000f8
3144 +#define AOFF_task_nswap 0x000000fc
3145 #define ASIZ_task_nswap 0x00000004
3146 -#define AOFF_task_cmin_flt 0x000000fc
3147 +#define AOFF_task_cmin_flt 0x00000100
3148 #define ASIZ_task_cmin_flt 0x00000004
3149 -#define AOFF_task_cmaj_flt 0x00000100
3150 +#define AOFF_task_cmaj_flt 0x00000104
3151 #define ASIZ_task_cmaj_flt 0x00000004
3152 -#define AOFF_task_cnswap 0x00000104
3153 +#define AOFF_task_cnswap 0x00000108
3154 #define ASIZ_task_cnswap 0x00000004
3155 -#define AOFF_task_uid 0x0000010a
3156 +#define AOFF_task_uid 0x0000010e
3157 #define ASIZ_task_uid 0x00000002
3158 -#define AOFF_task_euid 0x0000010c
3159 +#define AOFF_task_euid 0x00000110
3160 #define ASIZ_task_euid 0x00000002
3161 -#define AOFF_task_suid 0x0000010e
3162 +#define AOFF_task_suid 0x00000112
3163 #define ASIZ_task_suid 0x00000002
3164 -#define AOFF_task_fsuid 0x00000110
3165 +#define AOFF_task_fsuid 0x00000114
3166 #define ASIZ_task_fsuid 0x00000002
3167 -#define AOFF_task_gid 0x00000112
3168 +#define AOFF_task_gid 0x00000116
3169 #define ASIZ_task_gid 0x00000002
3170 -#define AOFF_task_egid 0x00000114
3171 +#define AOFF_task_egid 0x00000118
3172 #define ASIZ_task_egid 0x00000002
3173 -#define AOFF_task_sgid 0x00000116
3174 +#define AOFF_task_sgid 0x0000011a
3175 #define ASIZ_task_sgid 0x00000002
3176 -#define AOFF_task_fsgid 0x00000118
3177 +#define AOFF_task_fsgid 0x0000011c
3178 #define ASIZ_task_fsgid 0x00000002
3179 -#define AOFF_task_ngroups 0x0000011c
3180 +#define AOFF_task_ngroups 0x00000120
3181 #define ASIZ_task_ngroups 0x00000004
3182 -#define AOFF_task_groups 0x00000120
3183 +#define AOFF_task_groups 0x00000124
3184 #define ASIZ_task_groups 0x00000040
3185 -#define AOFF_task_cap_effective 0x00000160
3186 +#define AOFF_task_cap_effective 0x00000164
3187 #define ASIZ_task_cap_effective 0x00000004
3188 -#define AOFF_task_cap_inheritable 0x00000164
3189 +#define AOFF_task_cap_inheritable 0x00000168
3190 #define ASIZ_task_cap_inheritable 0x00000004
3191 -#define AOFF_task_cap_permitted 0x00000168
3192 +#define AOFF_task_cap_permitted 0x0000016c
3193 #define ASIZ_task_cap_permitted 0x00000004
3194 -#define AOFF_task_user 0x00000170
3195 +#define AOFF_task_user 0x00000174
3196 #define ASIZ_task_user 0x00000004
3197 -#define AOFF_task_rlim 0x00000174
3198 +#define AOFF_task_rlim 0x00000178
3199 #define ASIZ_task_rlim 0x00000050
3200 -#define AOFF_task_used_math 0x000001c4
3201 +#define AOFF_task_used_math 0x000001c8
3202 #define ASIZ_task_used_math 0x00000002
3203 -#define AOFF_task_comm 0x000001c6
3204 +#define AOFF_task_comm 0x000001ca
3205 #define ASIZ_task_comm 0x00000010
3206 -#define AOFF_task_link_count 0x000001d8
3207 +#define AOFF_task_link_count 0x000001dc
3208 #define ASIZ_task_link_count 0x00000004
3209 -#define AOFF_task_tty 0x000001dc
3210 +#define AOFF_task_tty 0x000001e0
3211 #define ASIZ_task_tty 0x00000004
3212 -#define AOFF_task_semundo 0x000001e0
3213 +#define AOFF_task_semundo 0x000001e4
3214 #define ASIZ_task_semundo 0x00000004
3215 -#define AOFF_task_semsleeping 0x000001e4
3216 +#define AOFF_task_semsleeping 0x000001e8
3217 #define ASIZ_task_semsleeping 0x00000004
3218 -#define AOFF_task_tss 0x000001e8
3219 +#define AOFF_task_tss 0x000001f0
3220 #define ASIZ_task_tss 0x00000388
3221 -#define AOFF_task_fs 0x00000570
3222 +#define AOFF_task_fs 0x00000578
3223 #define ASIZ_task_fs 0x00000004
3224 -#define AOFF_task_files 0x00000574
3225 +#define AOFF_task_files 0x0000057c
3226 #define ASIZ_task_files 0x00000004
3227 -#define AOFF_task_mm 0x00000578
3228 +#define AOFF_task_mm 0x00000580
3229 #define ASIZ_task_mm 0x00000004
3230 -#define AOFF_task_local_pages 0x0000057c
3231 +#define AOFF_task_local_pages 0x00000584
3232 #define ASIZ_task_local_pages 0x00000008
3233 -#define AOFF_task_allocation_order 0x00000584
3234 +#define AOFF_task_allocation_order 0x0000058c
3235 #define ASIZ_task_allocation_order 0x00000004
3236 -#define AOFF_task_nr_local_pages 0x00000588
3237 +#define AOFF_task_nr_local_pages 0x00000590
3238 #define ASIZ_task_nr_local_pages 0x00000004
3239 -#define AOFF_task_fs_locks 0x0000058c
3240 +#define AOFF_task_fs_locks 0x00000594
3241 #define ASIZ_task_fs_locks 0x00000004
3242 -#define AOFF_task_sigmask_lock 0x00000590
3243 +#define AOFF_task_sigmask_lock 0x00000598
3244 #define ASIZ_task_sigmask_lock 0x00000001
3245 -#define AOFF_task_sig 0x00000594
3246 +#define AOFF_task_sig 0x0000059c
3247 #define ASIZ_task_sig 0x00000004
3248 -#define AOFF_task_signal 0x00000598
3249 +#define AOFF_task_signal 0x000005a0
3250 #define ASIZ_task_signal 0x00000008
3251 -#define AOFF_task_blocked 0x000005a0
3252 +#define AOFF_task_blocked 0x000005a8
3253 #define ASIZ_task_blocked 0x00000008
3254 -#define AOFF_task_sigqueue 0x000005a8
3255 +#define AOFF_task_sigqueue 0x000005b0
3256 #define ASIZ_task_sigqueue 0x00000004
3257 -#define AOFF_task_sigqueue_tail 0x000005ac
3258 +#define AOFF_task_sigqueue_tail 0x000005b4
3259 #define ASIZ_task_sigqueue_tail 0x00000004
3260 -#define AOFF_task_sas_ss_sp 0x000005b0
3261 +#define AOFF_task_sas_ss_sp 0x000005b8
3262 #define ASIZ_task_sas_ss_sp 0x00000004
3263 -#define AOFF_task_sas_ss_size 0x000005b4
3264 +#define AOFF_task_sas_ss_size 0x000005bc
3265 #define ASIZ_task_sas_ss_size 0x00000004
3266 -#define AOFF_task_parent_exec_id 0x000005b8
3267 +#define AOFF_task_parent_exec_id 0x000005c0
3268 #define ASIZ_task_parent_exec_id 0x00000004
3269 -#define AOFF_task_self_exec_id 0x000005bc
3270 +#define AOFF_task_self_exec_id 0x000005c4
3271 #define ASIZ_task_self_exec_id 0x00000004
3272 -#define AOFF_task_oom_kill_try 0x000005c0
3273 +#define AOFF_task_oom_kill_try 0x000005c8
3274 #define ASIZ_task_oom_kill_try 0x00000004
3275 #define AOFF_mm_mmap 0x00000000
3276 #define ASIZ_mm_mmap 0x00000004
3277 @@ -319,179 +321,181 @@
3278 #define ASIZ_task_priority 0x00000004
3279 #define AOFF_task_avg_slice 0x00000024
3280 #define ASIZ_task_avg_slice 0x00000004
3281 -#define AOFF_task_has_cpu 0x00000028
3282 +#define AOFF_task_counter_refresh 0x00000028
3283 +#define ASIZ_task_counter_refresh 0x00000004
3284 +#define AOFF_task_has_cpu 0x0000002c
3285 #define ASIZ_task_has_cpu 0x00000004
3286 -#define AOFF_task_processor 0x0000002c
3287 +#define AOFF_task_processor 0x00000030
3288 #define ASIZ_task_processor 0x00000004
3289 -#define AOFF_task_last_processor 0x00000030
3290 +#define AOFF_task_last_processor 0x00000034
3291 #define ASIZ_task_last_processor 0x00000004
3292 -#define AOFF_task_lock_depth 0x00000034
3293 +#define AOFF_task_lock_depth 0x00000038
3294 #define ASIZ_task_lock_depth 0x00000004
3295 -#define AOFF_task_next_task 0x00000038
3296 +#define AOFF_task_next_task 0x0000003c
3297 #define ASIZ_task_next_task 0x00000004
3298 -#define AOFF_task_prev_task 0x0000003c
3299 +#define AOFF_task_prev_task 0x00000040
3300 #define ASIZ_task_prev_task 0x00000004
3301 -#define AOFF_task_next_run 0x00000040
3302 +#define AOFF_task_next_run 0x00000044
3303 #define ASIZ_task_next_run 0x00000004
3304 -#define AOFF_task_prev_run 0x00000044
3305 +#define AOFF_task_prev_run 0x00000048
3306 #define ASIZ_task_prev_run 0x00000004
3307 -#define AOFF_task_task_exclusive 0x00000048
3308 +#define AOFF_task_task_exclusive 0x0000004c
3309 #define ASIZ_task_task_exclusive 0x00000004
3310 -#define AOFF_task_binfmt 0x0000004c
3311 +#define AOFF_task_binfmt 0x00000050
3312 #define ASIZ_task_binfmt 0x00000004
3313 -#define AOFF_task_exit_code 0x00000050
3314 +#define AOFF_task_exit_code 0x00000054
3315 #define ASIZ_task_exit_code 0x00000004
3316 -#define AOFF_task_exit_signal 0x00000054
3317 +#define AOFF_task_exit_signal 0x00000058
3318 #define ASIZ_task_exit_signal 0x00000004
3319 -#define AOFF_task_pdeath_signal 0x00000058
3320 +#define AOFF_task_pdeath_signal 0x0000005c
3321 #define ASIZ_task_pdeath_signal 0x00000004
3322 -#define AOFF_task_personality 0x0000005c
3323 +#define AOFF_task_personality 0x00000060
3324 #define ASIZ_task_personality 0x00000004
3325 -#define AOFF_task_pid 0x00000064
3326 +#define AOFF_task_pid 0x00000068
3327 #define ASIZ_task_pid 0x00000004
3328 -#define AOFF_task_pgrp 0x00000068
3329 +#define AOFF_task_pgrp 0x0000006c
3330 #define ASIZ_task_pgrp 0x00000004
3331 -#define AOFF_task_tty_old_pgrp 0x0000006c
3332 +#define AOFF_task_tty_old_pgrp 0x00000070
3333 #define ASIZ_task_tty_old_pgrp 0x00000004
3334 -#define AOFF_task_session 0x00000070
3335 +#define AOFF_task_session 0x00000074
3336 #define ASIZ_task_session 0x00000004
3337 -#define AOFF_task_leader 0x00000074
3338 +#define AOFF_task_leader 0x00000078
3339 #define ASIZ_task_leader 0x00000004
3340 -#define AOFF_task_p_opptr 0x00000078
3341 +#define AOFF_task_p_opptr 0x0000007c
3342 #define ASIZ_task_p_opptr 0x00000004
3343 -#define AOFF_task_p_pptr 0x0000007c
3344 +#define AOFF_task_p_pptr 0x00000080
3345 #define ASIZ_task_p_pptr 0x00000004
3346 -#define AOFF_task_p_cptr 0x00000080
3347 +#define AOFF_task_p_cptr 0x00000084
3348 #define ASIZ_task_p_cptr 0x00000004
3349 -#define AOFF_task_p_ysptr 0x00000084
3350 +#define AOFF_task_p_ysptr 0x00000088
3351 #define ASIZ_task_p_ysptr 0x00000004
3352 -#define AOFF_task_p_osptr 0x00000088
3353 +#define AOFF_task_p_osptr 0x0000008c
3354 #define ASIZ_task_p_osptr 0x00000004
3355 -#define AOFF_task_pidhash_next 0x0000008c
3356 +#define AOFF_task_pidhash_next 0x00000090
3357 #define ASIZ_task_pidhash_next 0x00000004
3358 -#define AOFF_task_pidhash_pprev 0x00000090
3359 +#define AOFF_task_pidhash_pprev 0x00000094
3360 #define ASIZ_task_pidhash_pprev 0x00000004
3361 -#define AOFF_task_tarray_ptr 0x00000094
3362 +#define AOFF_task_tarray_ptr 0x00000098
3363 #define ASIZ_task_tarray_ptr 0x00000004
3364 -#define AOFF_task_wait_chldexit 0x00000098
3365 +#define AOFF_task_wait_chldexit 0x0000009c
3366 #define ASIZ_task_wait_chldexit 0x00000004
3367 -#define AOFF_task_vfork_sem 0x0000009c
3368 +#define AOFF_task_vfork_sem 0x000000a0
3369 #define ASIZ_task_vfork_sem 0x00000004
3370 -#define AOFF_task_policy 0x000000a0
3371 +#define AOFF_task_policy 0x000000a4
3372 #define ASIZ_task_policy 0x00000004
3373 -#define AOFF_task_rt_priority 0x000000a4
3374 +#define AOFF_task_rt_priority 0x000000a8
3375 #define ASIZ_task_rt_priority 0x00000004
3376 -#define AOFF_task_it_real_value 0x000000a8
3377 +#define AOFF_task_it_real_value 0x000000ac
3378 #define ASIZ_task_it_real_value 0x00000004
3379 -#define AOFF_task_it_prof_value 0x000000ac
3380 +#define AOFF_task_it_prof_value 0x000000b0
3381 #define ASIZ_task_it_prof_value 0x00000004
3382 -#define AOFF_task_it_virt_value 0x000000b0
3383 +#define AOFF_task_it_virt_value 0x000000b4
3384 #define ASIZ_task_it_virt_value 0x00000004
3385 -#define AOFF_task_it_real_incr 0x000000b4
3386 +#define AOFF_task_it_real_incr 0x000000b8
3387 #define ASIZ_task_it_real_incr 0x00000004
3388 -#define AOFF_task_it_prof_incr 0x000000b8
3389 +#define AOFF_task_it_prof_incr 0x000000bc
3390 #define ASIZ_task_it_prof_incr 0x00000004
3391 -#define AOFF_task_it_virt_incr 0x000000bc
3392 +#define AOFF_task_it_virt_incr 0x000000c0
3393 #define ASIZ_task_it_virt_incr 0x00000004
3394 -#define AOFF_task_real_timer 0x000000c0
3395 +#define AOFF_task_real_timer 0x000000c4
3396 #define ASIZ_task_real_timer 0x00000014
3397 -#define AOFF_task_times 0x000000d4
3398 +#define AOFF_task_times 0x000000d8
3399 #define ASIZ_task_times 0x00000010
3400 -#define AOFF_task_start_time 0x000000e4
3401 +#define AOFF_task_start_time 0x000000e8
3402 #define ASIZ_task_start_time 0x00000004
3403 -#define AOFF_task_per_cpu_utime 0x000000e8
3404 +#define AOFF_task_per_cpu_utime 0x000000ec
3405 #define ASIZ_task_per_cpu_utime 0x00000080
3406 -#define AOFF_task_min_flt 0x000001e8
3407 +#define AOFF_task_min_flt 0x000001ec
3408 #define ASIZ_task_min_flt 0x00000004
3409 -#define AOFF_task_maj_flt 0x000001ec
3410 +#define AOFF_task_maj_flt 0x000001f0
3411 #define ASIZ_task_maj_flt 0x00000004
3412 -#define AOFF_task_nswap 0x000001f0
3413 +#define AOFF_task_nswap 0x000001f4
3414 #define ASIZ_task_nswap 0x00000004
3415 -#define AOFF_task_cmin_flt 0x000001f4
3416 +#define AOFF_task_cmin_flt 0x000001f8
3417 #define ASIZ_task_cmin_flt 0x00000004
3418 -#define AOFF_task_cmaj_flt 0x000001f8
3419 +#define AOFF_task_cmaj_flt 0x000001fc
3420 #define ASIZ_task_cmaj_flt 0x00000004
3421 -#define AOFF_task_cnswap 0x000001fc
3422 +#define AOFF_task_cnswap 0x00000200
3423 #define ASIZ_task_cnswap 0x00000004
3424 -#define AOFF_task_uid 0x00000202
3425 +#define AOFF_task_uid 0x00000206
3426 #define ASIZ_task_uid 0x00000002
3427 -#define AOFF_task_euid 0x00000204
3428 +#define AOFF_task_euid 0x00000208
3429 #define ASIZ_task_euid 0x00000002
3430 -#define AOFF_task_suid 0x00000206
3431 +#define AOFF_task_suid 0x0000020a
3432 #define ASIZ_task_suid 0x00000002
3433 -#define AOFF_task_fsuid 0x00000208
3434 +#define AOFF_task_fsuid 0x0000020c
3435 #define ASIZ_task_fsuid 0x00000002
3436 -#define AOFF_task_gid 0x0000020a
3437 +#define AOFF_task_gid 0x0000020e
3438 #define ASIZ_task_gid 0x00000002
3439 -#define AOFF_task_egid 0x0000020c
3440 +#define AOFF_task_egid 0x00000210
3441 #define ASIZ_task_egid 0x00000002
3442 -#define AOFF_task_sgid 0x0000020e
3443 +#define AOFF_task_sgid 0x00000212
3444 #define ASIZ_task_sgid 0x00000002
3445 -#define AOFF_task_fsgid 0x00000210
3446 +#define AOFF_task_fsgid 0x00000214
3447 #define ASIZ_task_fsgid 0x00000002
3448 -#define AOFF_task_ngroups 0x00000214
3449 +#define AOFF_task_ngroups 0x00000218
3450 #define ASIZ_task_ngroups 0x00000004
3451 -#define AOFF_task_groups 0x00000218
3452 +#define AOFF_task_groups 0x0000021c
3453 #define ASIZ_task_groups 0x00000040
3454 -#define AOFF_task_cap_effective 0x00000258
3455 +#define AOFF_task_cap_effective 0x0000025c
3456 #define ASIZ_task_cap_effective 0x00000004
3457 -#define AOFF_task_cap_inheritable 0x0000025c
3458 +#define AOFF_task_cap_inheritable 0x00000260
3459 #define ASIZ_task_cap_inheritable 0x00000004
3460 -#define AOFF_task_cap_permitted 0x00000260
3461 +#define AOFF_task_cap_permitted 0x00000264
3462 #define ASIZ_task_cap_permitted 0x00000004
3463 -#define AOFF_task_user 0x00000268
3464 +#define AOFF_task_user 0x0000026c
3465 #define ASIZ_task_user 0x00000004
3466 -#define AOFF_task_rlim 0x0000026c
3467 +#define AOFF_task_rlim 0x00000270
3468 #define ASIZ_task_rlim 0x00000050
3469 -#define AOFF_task_used_math 0x000002bc
3470 +#define AOFF_task_used_math 0x000002c0
3471 #define ASIZ_task_used_math 0x00000002
3472 -#define AOFF_task_comm 0x000002be
3473 +#define AOFF_task_comm 0x000002c2
3474 #define ASIZ_task_comm 0x00000010
3475 -#define AOFF_task_link_count 0x000002d0
3476 +#define AOFF_task_link_count 0x000002d4
3477 #define ASIZ_task_link_count 0x00000004
3478 -#define AOFF_task_tty 0x000002d4
3479 +#define AOFF_task_tty 0x000002d8
3480 #define ASIZ_task_tty 0x00000004
3481 -#define AOFF_task_semundo 0x000002d8
3482 +#define AOFF_task_semundo 0x000002dc
3483 #define ASIZ_task_semundo 0x00000004
3484 -#define AOFF_task_semsleeping 0x000002dc
3485 +#define AOFF_task_semsleeping 0x000002e0
3486 #define ASIZ_task_semsleeping 0x00000004
3487 -#define AOFF_task_tss 0x000002e0
3488 +#define AOFF_task_tss 0x000002e8
3489 #define ASIZ_task_tss 0x00000388
3490 -#define AOFF_task_fs 0x00000668
3491 +#define AOFF_task_fs 0x00000670
3492 #define ASIZ_task_fs 0x00000004
3493 -#define AOFF_task_files 0x0000066c
3494 +#define AOFF_task_files 0x00000674
3495 #define ASIZ_task_files 0x00000004
3496 -#define AOFF_task_mm 0x00000670
3497 +#define AOFF_task_mm 0x00000678
3498 #define ASIZ_task_mm 0x00000004
3499 -#define AOFF_task_local_pages 0x00000674
3500 +#define AOFF_task_local_pages 0x0000067c
3501 #define ASIZ_task_local_pages 0x00000008
3502 -#define AOFF_task_allocation_order 0x0000067c
3503 +#define AOFF_task_allocation_order 0x00000684
3504 #define ASIZ_task_allocation_order 0x00000004
3505 -#define AOFF_task_nr_local_pages 0x00000680
3506 +#define AOFF_task_nr_local_pages 0x00000688
3507 #define ASIZ_task_nr_local_pages 0x00000004
3508 -#define AOFF_task_fs_locks 0x00000684
3509 +#define AOFF_task_fs_locks 0x0000068c
3510 #define ASIZ_task_fs_locks 0x00000004
3511 -#define AOFF_task_sigmask_lock 0x00000688
3512 +#define AOFF_task_sigmask_lock 0x00000690
3513 #define ASIZ_task_sigmask_lock 0x00000001
3514 -#define AOFF_task_sig 0x0000068c
3515 +#define AOFF_task_sig 0x00000694
3516 #define ASIZ_task_sig 0x00000004
3517 -#define AOFF_task_signal 0x00000690
3518 +#define AOFF_task_signal 0x00000698
3519 #define ASIZ_task_signal 0x00000008
3520 -#define AOFF_task_blocked 0x00000698
3521 +#define AOFF_task_blocked 0x000006a0
3522 #define ASIZ_task_blocked 0x00000008
3523 -#define AOFF_task_sigqueue 0x000006a0
3524 +#define AOFF_task_sigqueue 0x000006a8
3525 #define ASIZ_task_sigqueue 0x00000004
3526 -#define AOFF_task_sigqueue_tail 0x000006a4
3527 +#define AOFF_task_sigqueue_tail 0x000006ac
3528 #define ASIZ_task_sigqueue_tail 0x00000004
3529 -#define AOFF_task_sas_ss_sp 0x000006a8
3530 +#define AOFF_task_sas_ss_sp 0x000006b0
3531 #define ASIZ_task_sas_ss_sp 0x00000004
3532 -#define AOFF_task_sas_ss_size 0x000006ac
3533 +#define AOFF_task_sas_ss_size 0x000006b4
3534 #define ASIZ_task_sas_ss_size 0x00000004
3535 -#define AOFF_task_parent_exec_id 0x000006b0
3536 +#define AOFF_task_parent_exec_id 0x000006b8
3537 #define ASIZ_task_parent_exec_id 0x00000004
3538 -#define AOFF_task_self_exec_id 0x000006b4
3539 +#define AOFF_task_self_exec_id 0x000006bc
3540 #define ASIZ_task_self_exec_id 0x00000004
3541 -#define AOFF_task_oom_kill_try 0x000006b8
3542 +#define AOFF_task_oom_kill_try 0x000006c0
3543 #define ASIZ_task_oom_kill_try 0x00000004
3544 #define AOFF_mm_mmap 0x00000000
3545 #define ASIZ_mm_mmap 0x00000004
3546 diff -urN linux.orig/include/asm-sparc/poll.h linux/include/asm-sparc/poll.h
3547 --- linux.orig/include/asm-sparc/poll.h Sun Mar 25 18:31:07 2001
3548 +++ linux/include/asm-sparc/poll.h Wed Aug 7 17:45:23 2002
3550 #define POLLWRNORM POLLOUT
3551 #define POLLRDBAND 128
3552 #define POLLWRBAND 256
3553 +#define POLLMSG 512
3557 diff -urN linux.orig/include/asm-sparc64/asm_offsets.h linux/include/asm-sparc64/asm_offsets.h
3558 --- linux.orig/include/asm-sparc64/asm_offsets.h Fri Nov 2 17:39:08 2001
3559 +++ linux/include/asm-sparc64/asm_offsets.h Wed Aug 7 17:55:29 2002
3560 @@ -26,181 +26,183 @@
3561 #define ASIZ_task_priority 0x00000008
3562 #define AOFF_task_avg_slice 0x00000048
3563 #define ASIZ_task_avg_slice 0x00000008
3564 -#define AOFF_task_has_cpu 0x00000050
3565 +#define AOFF_task_counter_refresh 0x00000050
3566 +#define ASIZ_task_counter_refresh 0x00000004
3567 +#define AOFF_task_has_cpu 0x00000054
3568 #define ASIZ_task_has_cpu 0x00000004
3569 -#define AOFF_task_processor 0x00000054
3570 +#define AOFF_task_processor 0x00000058
3571 #define ASIZ_task_processor 0x00000004
3572 -#define AOFF_task_last_processor 0x00000058
3573 +#define AOFF_task_last_processor 0x0000005c
3574 #define ASIZ_task_last_processor 0x00000004
3575 -#define AOFF_task_lock_depth 0x0000005c
3576 +#define AOFF_task_lock_depth 0x00000060
3577 #define ASIZ_task_lock_depth 0x00000004
3578 -#define AOFF_task_next_task 0x00000060
3579 +#define AOFF_task_next_task 0x00000068
3580 #define ASIZ_task_next_task 0x00000008
3581 -#define AOFF_task_prev_task 0x00000068
3582 +#define AOFF_task_prev_task 0x00000070
3583 #define ASIZ_task_prev_task 0x00000008
3584 -#define AOFF_task_next_run 0x00000070
3585 +#define AOFF_task_next_run 0x00000078
3586 #define ASIZ_task_next_run 0x00000008
3587 -#define AOFF_task_prev_run 0x00000078
3588 +#define AOFF_task_prev_run 0x00000080
3589 #define ASIZ_task_prev_run 0x00000008
3590 -#define AOFF_task_task_exclusive 0x00000080
3591 +#define AOFF_task_task_exclusive 0x00000088
3592 #define ASIZ_task_task_exclusive 0x00000004
3593 -#define AOFF_task_binfmt 0x00000088
3594 +#define AOFF_task_binfmt 0x00000090
3595 #define ASIZ_task_binfmt 0x00000008
3596 -#define AOFF_task_exit_code 0x00000090
3597 +#define AOFF_task_exit_code 0x00000098
3598 #define ASIZ_task_exit_code 0x00000004
3599 -#define AOFF_task_exit_signal 0x00000094
3600 +#define AOFF_task_exit_signal 0x0000009c
3601 #define ASIZ_task_exit_signal 0x00000004
3602 -#define AOFF_task_pdeath_signal 0x00000098
3603 +#define AOFF_task_pdeath_signal 0x000000a0
3604 #define ASIZ_task_pdeath_signal 0x00000004
3605 -#define AOFF_task_personality 0x000000a0
3606 +#define AOFF_task_personality 0x000000a8
3607 #define ASIZ_task_personality 0x00000008
3608 -#define AOFF_task_pid 0x000000ac
3609 +#define AOFF_task_pid 0x000000b4
3610 #define ASIZ_task_pid 0x00000004
3611 -#define AOFF_task_pgrp 0x000000b0
3612 +#define AOFF_task_pgrp 0x000000b8
3613 #define ASIZ_task_pgrp 0x00000004
3614 -#define AOFF_task_tty_old_pgrp 0x000000b4
3615 +#define AOFF_task_tty_old_pgrp 0x000000bc
3616 #define ASIZ_task_tty_old_pgrp 0x00000004
3617 -#define AOFF_task_session 0x000000b8
3618 +#define AOFF_task_session 0x000000c0
3619 #define ASIZ_task_session 0x00000004
3620 -#define AOFF_task_leader 0x000000bc
3621 +#define AOFF_task_leader 0x000000c4
3622 #define ASIZ_task_leader 0x00000004
3623 -#define AOFF_task_p_opptr 0x000000c0
3624 +#define AOFF_task_p_opptr 0x000000c8
3625 #define ASIZ_task_p_opptr 0x00000008
3626 -#define AOFF_task_p_pptr 0x000000c8
3627 +#define AOFF_task_p_pptr 0x000000d0
3628 #define ASIZ_task_p_pptr 0x00000008
3629 -#define AOFF_task_p_cptr 0x000000d0
3630 +#define AOFF_task_p_cptr 0x000000d8
3631 #define ASIZ_task_p_cptr 0x00000008
3632 -#define AOFF_task_p_ysptr 0x000000d8
3633 +#define AOFF_task_p_ysptr 0x000000e0
3634 #define ASIZ_task_p_ysptr 0x00000008
3635 -#define AOFF_task_p_osptr 0x000000e0
3636 +#define AOFF_task_p_osptr 0x000000e8
3637 #define ASIZ_task_p_osptr 0x00000008
3638 -#define AOFF_task_pidhash_next 0x000000e8
3639 +#define AOFF_task_pidhash_next 0x000000f0
3640 #define ASIZ_task_pidhash_next 0x00000008
3641 -#define AOFF_task_pidhash_pprev 0x000000f0
3642 +#define AOFF_task_pidhash_pprev 0x000000f8
3643 #define ASIZ_task_pidhash_pprev 0x00000008
3644 -#define AOFF_task_tarray_ptr 0x000000f8
3645 +#define AOFF_task_tarray_ptr 0x00000100
3646 #define ASIZ_task_tarray_ptr 0x00000008
3647 -#define AOFF_task_wait_chldexit 0x00000100
3648 +#define AOFF_task_wait_chldexit 0x00000108
3649 #define ASIZ_task_wait_chldexit 0x00000008
3650 -#define AOFF_task_vfork_sem 0x00000108
3651 +#define AOFF_task_vfork_sem 0x00000110
3652 #define ASIZ_task_vfork_sem 0x00000008
3653 -#define AOFF_task_policy 0x00000110
3654 +#define AOFF_task_policy 0x00000118
3655 #define ASIZ_task_policy 0x00000008
3656 -#define AOFF_task_rt_priority 0x00000118
3657 +#define AOFF_task_rt_priority 0x00000120
3658 #define ASIZ_task_rt_priority 0x00000008
3659 -#define AOFF_task_it_real_value 0x00000120
3660 +#define AOFF_task_it_real_value 0x00000128
3661 #define ASIZ_task_it_real_value 0x00000008
3662 -#define AOFF_task_it_prof_value 0x00000128
3663 +#define AOFF_task_it_prof_value 0x00000130
3664 #define ASIZ_task_it_prof_value 0x00000008
3665 -#define AOFF_task_it_virt_value 0x00000130
3666 +#define AOFF_task_it_virt_value 0x00000138
3667 #define ASIZ_task_it_virt_value 0x00000008
3668 -#define AOFF_task_it_real_incr 0x00000138
3669 +#define AOFF_task_it_real_incr 0x00000140
3670 #define ASIZ_task_it_real_incr 0x00000008
3671 -#define AOFF_task_it_prof_incr 0x00000140
3672 +#define AOFF_task_it_prof_incr 0x00000148
3673 #define ASIZ_task_it_prof_incr 0x00000008
3674 -#define AOFF_task_it_virt_incr 0x00000148
3675 +#define AOFF_task_it_virt_incr 0x00000150
3676 #define ASIZ_task_it_virt_incr 0x00000008
3677 -#define AOFF_task_real_timer 0x00000150
3678 +#define AOFF_task_real_timer 0x00000158
3679 #define ASIZ_task_real_timer 0x00000028
3680 -#define AOFF_task_times 0x00000178
3681 +#define AOFF_task_times 0x00000180
3682 #define ASIZ_task_times 0x00000020
3683 -#define AOFF_task_start_time 0x00000198
3684 +#define AOFF_task_start_time 0x000001a0
3685 #define ASIZ_task_start_time 0x00000008
3686 -#define AOFF_task_per_cpu_utime 0x000001a0
3687 +#define AOFF_task_per_cpu_utime 0x000001a8
3688 #define ASIZ_task_per_cpu_utime 0x00000008
3689 -#define AOFF_task_min_flt 0x000001b0
3690 +#define AOFF_task_min_flt 0x000001b8
3691 #define ASIZ_task_min_flt 0x00000008
3692 -#define AOFF_task_maj_flt 0x000001b8
3693 +#define AOFF_task_maj_flt 0x000001c0
3694 #define ASIZ_task_maj_flt 0x00000008
3695 -#define AOFF_task_nswap 0x000001c0
3696 +#define AOFF_task_nswap 0x000001c8
3697 #define ASIZ_task_nswap 0x00000008
3698 -#define AOFF_task_cmin_flt 0x000001c8
3699 +#define AOFF_task_cmin_flt 0x000001d0
3700 #define ASIZ_task_cmin_flt 0x00000008
3701 -#define AOFF_task_cmaj_flt 0x000001d0
3702 +#define AOFF_task_cmaj_flt 0x000001d8
3703 #define ASIZ_task_cmaj_flt 0x00000008
3704 -#define AOFF_task_cnswap 0x000001d8
3705 +#define AOFF_task_cnswap 0x000001e0
3706 #define ASIZ_task_cnswap 0x00000008
3707 -#define AOFF_task_uid 0x000001e4
3708 +#define AOFF_task_uid 0x000001ec
3709 #define ASIZ_task_uid 0x00000004
3710 -#define AOFF_task_euid 0x000001e8
3711 +#define AOFF_task_euid 0x000001f0
3712 #define ASIZ_task_euid 0x00000004
3713 -#define AOFF_task_suid 0x000001ec
3714 +#define AOFF_task_suid 0x000001f4
3715 #define ASIZ_task_suid 0x00000004
3716 -#define AOFF_task_fsuid 0x000001f0
3717 +#define AOFF_task_fsuid 0x000001f8
3718 #define ASIZ_task_fsuid 0x00000004
3719 -#define AOFF_task_gid 0x000001f4
3720 +#define AOFF_task_gid 0x000001fc
3721 #define ASIZ_task_gid 0x00000004
3722 -#define AOFF_task_egid 0x000001f8
3723 +#define AOFF_task_egid 0x00000200
3724 #define ASIZ_task_egid 0x00000004
3725 -#define AOFF_task_sgid 0x000001fc
3726 +#define AOFF_task_sgid 0x00000204
3727 #define ASIZ_task_sgid 0x00000004
3728 -#define AOFF_task_fsgid 0x00000200
3729 +#define AOFF_task_fsgid 0x00000208
3730 #define ASIZ_task_fsgid 0x00000004
3731 -#define AOFF_task_ngroups 0x00000204
3732 +#define AOFF_task_ngroups 0x0000020c
3733 #define ASIZ_task_ngroups 0x00000004
3734 -#define AOFF_task_groups 0x00000208
3735 +#define AOFF_task_groups 0x00000210
3736 #define ASIZ_task_groups 0x00000080
3737 -#define AOFF_task_cap_effective 0x00000288
3738 +#define AOFF_task_cap_effective 0x00000290
3739 #define ASIZ_task_cap_effective 0x00000004
3740 -#define AOFF_task_cap_inheritable 0x0000028c
3741 +#define AOFF_task_cap_inheritable 0x00000294
3742 #define ASIZ_task_cap_inheritable 0x00000004
3743 -#define AOFF_task_cap_permitted 0x00000290
3744 +#define AOFF_task_cap_permitted 0x00000298
3745 #define ASIZ_task_cap_permitted 0x00000004
3746 -#define AOFF_task_user 0x00000298
3747 +#define AOFF_task_user 0x000002a0
3748 #define ASIZ_task_user 0x00000008
3749 -#define AOFF_task_rlim 0x000002a0
3750 +#define AOFF_task_rlim 0x000002a8
3751 #define ASIZ_task_rlim 0x000000a0
3752 -#define AOFF_task_used_math 0x00000340
3753 +#define AOFF_task_used_math 0x00000348
3754 #define ASIZ_task_used_math 0x00000002
3755 -#define AOFF_task_comm 0x00000342
3756 +#define AOFF_task_comm 0x0000034a
3757 #define ASIZ_task_comm 0x00000010
3758 -#define AOFF_task_link_count 0x00000354
3759 +#define AOFF_task_link_count 0x0000035c
3760 #define ASIZ_task_link_count 0x00000004
3761 -#define AOFF_task_tty 0x00000358
3762 +#define AOFF_task_tty 0x00000360
3763 #define ASIZ_task_tty 0x00000008
3764 -#define AOFF_task_semundo 0x00000360
3765 +#define AOFF_task_semundo 0x00000368
3766 #define ASIZ_task_semundo 0x00000008
3767 -#define AOFF_task_semsleeping 0x00000368
3768 +#define AOFF_task_semsleeping 0x00000370
3769 #define ASIZ_task_semsleeping 0x00000008
3770 -#define AOFF_task_tss 0x00000370
3771 +#define AOFF_task_tss 0x00000380
3772 #define ASIZ_task_tss 0x00000470
3773 -#define AOFF_task_fs 0x000007e0
3774 +#define AOFF_task_fs 0x000007f0
3775 #define ASIZ_task_fs 0x00000008
3776 -#define AOFF_task_files 0x000007e8
3777 +#define AOFF_task_files 0x000007f8
3778 #define ASIZ_task_files 0x00000008
3779 -#define AOFF_task_mm 0x000007f0
3780 +#define AOFF_task_mm 0x00000800
3781 #define ASIZ_task_mm 0x00000008
3782 -#define AOFF_task_local_pages 0x000007f8
3783 +#define AOFF_task_local_pages 0x00000808
3784 #define ASIZ_task_local_pages 0x00000010
3785 -#define AOFF_task_allocation_order 0x00000808
3786 +#define AOFF_task_allocation_order 0x00000818
3787 #define ASIZ_task_allocation_order 0x00000004
3788 -#define AOFF_task_nr_local_pages 0x0000080c
3789 +#define AOFF_task_nr_local_pages 0x0000081c
3790 #define ASIZ_task_nr_local_pages 0x00000004
3791 -#define AOFF_task_fs_locks 0x00000810
3792 +#define AOFF_task_fs_locks 0x00000820
3793 #define ASIZ_task_fs_locks 0x00000004
3794 -#define AOFF_task_sigmask_lock 0x00000814
3795 +#define AOFF_task_sigmask_lock 0x00000824
3796 #define ASIZ_task_sigmask_lock 0x00000001
3797 -#define AOFF_task_sig 0x00000818
3798 +#define AOFF_task_sig 0x00000828
3799 #define ASIZ_task_sig 0x00000008
3800 -#define AOFF_task_signal 0x00000820
3801 +#define AOFF_task_signal 0x00000830
3802 #define ASIZ_task_signal 0x00000008
3803 -#define AOFF_task_blocked 0x00000828
3804 +#define AOFF_task_blocked 0x00000838
3805 #define ASIZ_task_blocked 0x00000008
3806 -#define AOFF_task_sigqueue 0x00000830
3807 +#define AOFF_task_sigqueue 0x00000840
3808 #define ASIZ_task_sigqueue 0x00000008
3809 -#define AOFF_task_sigqueue_tail 0x00000838
3810 +#define AOFF_task_sigqueue_tail 0x00000848
3811 #define ASIZ_task_sigqueue_tail 0x00000008
3812 -#define AOFF_task_sas_ss_sp 0x00000840
3813 +#define AOFF_task_sas_ss_sp 0x00000850
3814 #define ASIZ_task_sas_ss_sp 0x00000008
3815 -#define AOFF_task_sas_ss_size 0x00000848
3816 +#define AOFF_task_sas_ss_size 0x00000858
3817 #define ASIZ_task_sas_ss_size 0x00000008
3818 -#define AOFF_task_parent_exec_id 0x00000850
3819 +#define AOFF_task_parent_exec_id 0x00000860
3820 #define ASIZ_task_parent_exec_id 0x00000004
3821 -#define AOFF_task_self_exec_id 0x00000854
3822 +#define AOFF_task_self_exec_id 0x00000864
3823 #define ASIZ_task_self_exec_id 0x00000004
3824 -#define AOFF_task_oom_kill_try 0x00000858
3825 +#define AOFF_task_oom_kill_try 0x00000868
3826 #define ASIZ_task_oom_kill_try 0x00000004
3827 -#define ASIZ_task 0x00000860
3828 +#define ASIZ_task 0x00000870
3829 #define AOFF_mm_mmap 0x00000000
3830 #define ASIZ_mm_mmap 0x00000008
3831 #define AOFF_mm_mmap_avl 0x00000008
3832 @@ -330,181 +332,183 @@
3833 #define ASIZ_task_priority 0x00000008
3834 #define AOFF_task_avg_slice 0x00000048
3835 #define ASIZ_task_avg_slice 0x00000008
3836 -#define AOFF_task_has_cpu 0x00000050
3837 +#define AOFF_task_counter_refresh 0x00000050
3838 +#define ASIZ_task_counter_refresh 0x00000004
3839 +#define AOFF_task_has_cpu 0x00000054
3840 #define ASIZ_task_has_cpu 0x00000004
3841 -#define AOFF_task_processor 0x00000054
3842 +#define AOFF_task_processor 0x00000058
3843 #define ASIZ_task_processor 0x00000004
3844 -#define AOFF_task_last_processor 0x00000058
3845 +#define AOFF_task_last_processor 0x0000005c
3846 #define ASIZ_task_last_processor 0x00000004
3847 -#define AOFF_task_lock_depth 0x0000005c
3848 +#define AOFF_task_lock_depth 0x00000060
3849 #define ASIZ_task_lock_depth 0x00000004
3850 -#define AOFF_task_next_task 0x00000060
3851 +#define AOFF_task_next_task 0x00000068
3852 #define ASIZ_task_next_task 0x00000008
3853 -#define AOFF_task_prev_task 0x00000068
3854 +#define AOFF_task_prev_task 0x00000070
3855 #define ASIZ_task_prev_task 0x00000008
3856 -#define AOFF_task_next_run 0x00000070
3857 +#define AOFF_task_next_run 0x00000078
3858 #define ASIZ_task_next_run 0x00000008
3859 -#define AOFF_task_prev_run 0x00000078
3860 +#define AOFF_task_prev_run 0x00000080
3861 #define ASIZ_task_prev_run 0x00000008
3862 -#define AOFF_task_task_exclusive 0x00000080
3863 +#define AOFF_task_task_exclusive 0x00000088
3864 #define ASIZ_task_task_exclusive 0x00000004
3865 -#define AOFF_task_binfmt 0x00000088
3866 +#define AOFF_task_binfmt 0x00000090
3867 #define ASIZ_task_binfmt 0x00000008
3868 -#define AOFF_task_exit_code 0x00000090
3869 +#define AOFF_task_exit_code 0x00000098
3870 #define ASIZ_task_exit_code 0x00000004
3871 -#define AOFF_task_exit_signal 0x00000094
3872 +#define AOFF_task_exit_signal 0x0000009c
3873 #define ASIZ_task_exit_signal 0x00000004
3874 -#define AOFF_task_pdeath_signal 0x00000098
3875 +#define AOFF_task_pdeath_signal 0x000000a0
3876 #define ASIZ_task_pdeath_signal 0x00000004
3877 -#define AOFF_task_personality 0x000000a0
3878 +#define AOFF_task_personality 0x000000a8
3879 #define ASIZ_task_personality 0x00000008
3880 -#define AOFF_task_pid 0x000000ac
3881 +#define AOFF_task_pid 0x000000b4
3882 #define ASIZ_task_pid 0x00000004
3883 -#define AOFF_task_pgrp 0x000000b0
3884 +#define AOFF_task_pgrp 0x000000b8
3885 #define ASIZ_task_pgrp 0x00000004
3886 -#define AOFF_task_tty_old_pgrp 0x000000b4
3887 +#define AOFF_task_tty_old_pgrp 0x000000bc
3888 #define ASIZ_task_tty_old_pgrp 0x00000004
3889 -#define AOFF_task_session 0x000000b8
3890 +#define AOFF_task_session 0x000000c0
3891 #define ASIZ_task_session 0x00000004
3892 -#define AOFF_task_leader 0x000000bc
3893 +#define AOFF_task_leader 0x000000c4
3894 #define ASIZ_task_leader 0x00000004
3895 -#define AOFF_task_p_opptr 0x000000c0
3896 +#define AOFF_task_p_opptr 0x000000c8
3897 #define ASIZ_task_p_opptr 0x00000008
3898 -#define AOFF_task_p_pptr 0x000000c8
3899 +#define AOFF_task_p_pptr 0x000000d0
3900 #define ASIZ_task_p_pptr 0x00000008
3901 -#define AOFF_task_p_cptr 0x000000d0
3902 +#define AOFF_task_p_cptr 0x000000d8
3903 #define ASIZ_task_p_cptr 0x00000008
3904 -#define AOFF_task_p_ysptr 0x000000d8
3905 +#define AOFF_task_p_ysptr 0x000000e0
3906 #define ASIZ_task_p_ysptr 0x00000008
3907 -#define AOFF_task_p_osptr 0x000000e0
3908 +#define AOFF_task_p_osptr 0x000000e8
3909 #define ASIZ_task_p_osptr 0x00000008
3910 -#define AOFF_task_pidhash_next 0x000000e8
3911 +#define AOFF_task_pidhash_next 0x000000f0
3912 #define ASIZ_task_pidhash_next 0x00000008
3913 -#define AOFF_task_pidhash_pprev 0x000000f0
3914 +#define AOFF_task_pidhash_pprev 0x000000f8
3915 #define ASIZ_task_pidhash_pprev 0x00000008
3916 -#define AOFF_task_tarray_ptr 0x000000f8
3917 +#define AOFF_task_tarray_ptr 0x00000100
3918 #define ASIZ_task_tarray_ptr 0x00000008
3919 -#define AOFF_task_wait_chldexit 0x00000100
3920 +#define AOFF_task_wait_chldexit 0x00000108
3921 #define ASIZ_task_wait_chldexit 0x00000008
3922 -#define AOFF_task_vfork_sem 0x00000108
3923 +#define AOFF_task_vfork_sem 0x00000110
3924 #define ASIZ_task_vfork_sem 0x00000008
3925 -#define AOFF_task_policy 0x00000110
3926 +#define AOFF_task_policy 0x00000118
3927 #define ASIZ_task_policy 0x00000008
3928 -#define AOFF_task_rt_priority 0x00000118
3929 +#define AOFF_task_rt_priority 0x00000120
3930 #define ASIZ_task_rt_priority 0x00000008
3931 -#define AOFF_task_it_real_value 0x00000120
3932 +#define AOFF_task_it_real_value 0x00000128
3933 #define ASIZ_task_it_real_value 0x00000008
3934 -#define AOFF_task_it_prof_value 0x00000128
3935 +#define AOFF_task_it_prof_value 0x00000130
3936 #define ASIZ_task_it_prof_value 0x00000008
3937 -#define AOFF_task_it_virt_value 0x00000130
3938 +#define AOFF_task_it_virt_value 0x00000138
3939 #define ASIZ_task_it_virt_value 0x00000008
3940 -#define AOFF_task_it_real_incr 0x00000138
3941 +#define AOFF_task_it_real_incr 0x00000140
3942 #define ASIZ_task_it_real_incr 0x00000008
3943 -#define AOFF_task_it_prof_incr 0x00000140
3944 +#define AOFF_task_it_prof_incr 0x00000148
3945 #define ASIZ_task_it_prof_incr 0x00000008
3946 -#define AOFF_task_it_virt_incr 0x00000148
3947 +#define AOFF_task_it_virt_incr 0x00000150
3948 #define ASIZ_task_it_virt_incr 0x00000008
3949 -#define AOFF_task_real_timer 0x00000150
3950 +#define AOFF_task_real_timer 0x00000158
3951 #define ASIZ_task_real_timer 0x00000028
3952 -#define AOFF_task_times 0x00000178
3953 +#define AOFF_task_times 0x00000180
3954 #define ASIZ_task_times 0x00000020
3955 -#define AOFF_task_start_time 0x00000198
3956 +#define AOFF_task_start_time 0x000001a0
3957 #define ASIZ_task_start_time 0x00000008
3958 -#define AOFF_task_per_cpu_utime 0x000001a0
3959 +#define AOFF_task_per_cpu_utime 0x000001a8
3960 #define ASIZ_task_per_cpu_utime 0x00000100
3961 -#define AOFF_task_min_flt 0x000003a0
3962 +#define AOFF_task_min_flt 0x000003a8
3963 #define ASIZ_task_min_flt 0x00000008
3964 -#define AOFF_task_maj_flt 0x000003a8
3965 +#define AOFF_task_maj_flt 0x000003b0
3966 #define ASIZ_task_maj_flt 0x00000008
3967 -#define AOFF_task_nswap 0x000003b0
3968 +#define AOFF_task_nswap 0x000003b8
3969 #define ASIZ_task_nswap 0x00000008
3970 -#define AOFF_task_cmin_flt 0x000003b8
3971 +#define AOFF_task_cmin_flt 0x000003c0
3972 #define ASIZ_task_cmin_flt 0x00000008
3973 -#define AOFF_task_cmaj_flt 0x000003c0
3974 +#define AOFF_task_cmaj_flt 0x000003c8
3975 #define ASIZ_task_cmaj_flt 0x00000008
3976 -#define AOFF_task_cnswap 0x000003c8
3977 +#define AOFF_task_cnswap 0x000003d0
3978 #define ASIZ_task_cnswap 0x00000008
3979 -#define AOFF_task_uid 0x000003d4
3980 +#define AOFF_task_uid 0x000003dc
3981 #define ASIZ_task_uid 0x00000004
3982 -#define AOFF_task_euid 0x000003d8
3983 +#define AOFF_task_euid 0x000003e0
3984 #define ASIZ_task_euid 0x00000004
3985 -#define AOFF_task_suid 0x000003dc
3986 +#define AOFF_task_suid 0x000003e4
3987 #define ASIZ_task_suid 0x00000004
3988 -#define AOFF_task_fsuid 0x000003e0
3989 +#define AOFF_task_fsuid 0x000003e8
3990 #define ASIZ_task_fsuid 0x00000004
3991 -#define AOFF_task_gid 0x000003e4
3992 +#define AOFF_task_gid 0x000003ec
3993 #define ASIZ_task_gid 0x00000004
3994 -#define AOFF_task_egid 0x000003e8
3995 +#define AOFF_task_egid 0x000003f0
3996 #define ASIZ_task_egid 0x00000004
3997 -#define AOFF_task_sgid 0x000003ec
3998 +#define AOFF_task_sgid 0x000003f4
3999 #define ASIZ_task_sgid 0x00000004
4000 -#define AOFF_task_fsgid 0x000003f0
4001 +#define AOFF_task_fsgid 0x000003f8
4002 #define ASIZ_task_fsgid 0x00000004
4003 -#define AOFF_task_ngroups 0x000003f4
4004 +#define AOFF_task_ngroups 0x000003fc
4005 #define ASIZ_task_ngroups 0x00000004
4006 -#define AOFF_task_groups 0x000003f8
4007 +#define AOFF_task_groups 0x00000400
4008 #define ASIZ_task_groups 0x00000080
4009 -#define AOFF_task_cap_effective 0x00000478
4010 +#define AOFF_task_cap_effective 0x00000480
4011 #define ASIZ_task_cap_effective 0x00000004
4012 -#define AOFF_task_cap_inheritable 0x0000047c
4013 +#define AOFF_task_cap_inheritable 0x00000484
4014 #define ASIZ_task_cap_inheritable 0x00000004
4015 -#define AOFF_task_cap_permitted 0x00000480
4016 +#define AOFF_task_cap_permitted 0x00000488
4017 #define ASIZ_task_cap_permitted 0x00000004
4018 -#define AOFF_task_user 0x00000488
4019 +#define AOFF_task_user 0x00000490
4020 #define ASIZ_task_user 0x00000008
4021 -#define AOFF_task_rlim 0x00000490
4022 +#define AOFF_task_rlim 0x00000498
4023 #define ASIZ_task_rlim 0x000000a0
4024 -#define AOFF_task_used_math 0x00000530
4025 +#define AOFF_task_used_math 0x00000538
4026 #define ASIZ_task_used_math 0x00000002
4027 -#define AOFF_task_comm 0x00000532
4028 +#define AOFF_task_comm 0x0000053a
4029 #define ASIZ_task_comm 0x00000010
4030 -#define AOFF_task_link_count 0x00000544
4031 +#define AOFF_task_link_count 0x0000054c
4032 #define ASIZ_task_link_count 0x00000004
4033 -#define AOFF_task_tty 0x00000548
4034 +#define AOFF_task_tty 0x00000550
4035 #define ASIZ_task_tty 0x00000008
4036 -#define AOFF_task_semundo 0x00000550
4037 +#define AOFF_task_semundo 0x00000558
4038 #define ASIZ_task_semundo 0x00000008
4039 -#define AOFF_task_semsleeping 0x00000558
4040 +#define AOFF_task_semsleeping 0x00000560
4041 #define ASIZ_task_semsleeping 0x00000008
4042 -#define AOFF_task_tss 0x00000560
4043 +#define AOFF_task_tss 0x00000570
4044 #define ASIZ_task_tss 0x00000470
4045 -#define AOFF_task_fs 0x000009d0
4046 +#define AOFF_task_fs 0x000009e0
4047 #define ASIZ_task_fs 0x00000008
4048 -#define AOFF_task_files 0x000009d8
4049 +#define AOFF_task_files 0x000009e8
4050 #define ASIZ_task_files 0x00000008
4051 -#define AOFF_task_mm 0x000009e0
4052 +#define AOFF_task_mm 0x000009f0
4053 #define ASIZ_task_mm 0x00000008
4054 -#define AOFF_task_local_pages 0x000009e8
4055 +#define AOFF_task_local_pages 0x000009f8
4056 #define ASIZ_task_local_pages 0x00000010
4057 -#define AOFF_task_allocation_order 0x000009f8
4058 +#define AOFF_task_allocation_order 0x00000a08
4059 #define ASIZ_task_allocation_order 0x00000004
4060 -#define AOFF_task_nr_local_pages 0x000009fc
4061 +#define AOFF_task_nr_local_pages 0x00000a0c
4062 #define ASIZ_task_nr_local_pages 0x00000004
4063 -#define AOFF_task_fs_locks 0x00000a00
4064 +#define AOFF_task_fs_locks 0x00000a10
4065 #define ASIZ_task_fs_locks 0x00000004
4066 -#define AOFF_task_sigmask_lock 0x00000a04
4067 +#define AOFF_task_sigmask_lock 0x00000a14
4068 #define ASIZ_task_sigmask_lock 0x00000001
4069 -#define AOFF_task_sig 0x00000a08
4070 +#define AOFF_task_sig 0x00000a18
4071 #define ASIZ_task_sig 0x00000008
4072 -#define AOFF_task_signal 0x00000a10
4073 +#define AOFF_task_signal 0x00000a20
4074 #define ASIZ_task_signal 0x00000008
4075 -#define AOFF_task_blocked 0x00000a18
4076 +#define AOFF_task_blocked 0x00000a28
4077 #define ASIZ_task_blocked 0x00000008
4078 -#define AOFF_task_sigqueue 0x00000a20
4079 +#define AOFF_task_sigqueue 0x00000a30
4080 #define ASIZ_task_sigqueue 0x00000008
4081 -#define AOFF_task_sigqueue_tail 0x00000a28
4082 +#define AOFF_task_sigqueue_tail 0x00000a38
4083 #define ASIZ_task_sigqueue_tail 0x00000008
4084 -#define AOFF_task_sas_ss_sp 0x00000a30
4085 +#define AOFF_task_sas_ss_sp 0x00000a40
4086 #define ASIZ_task_sas_ss_sp 0x00000008
4087 -#define AOFF_task_sas_ss_size 0x00000a38
4088 +#define AOFF_task_sas_ss_size 0x00000a48
4089 #define ASIZ_task_sas_ss_size 0x00000008
4090 -#define AOFF_task_parent_exec_id 0x00000a40
4091 +#define AOFF_task_parent_exec_id 0x00000a50
4092 #define ASIZ_task_parent_exec_id 0x00000004
4093 -#define AOFF_task_self_exec_id 0x00000a44
4094 +#define AOFF_task_self_exec_id 0x00000a54
4095 #define ASIZ_task_self_exec_id 0x00000004
4096 -#define AOFF_task_oom_kill_try 0x00000a48
4097 +#define AOFF_task_oom_kill_try 0x00000a58
4098 #define ASIZ_task_oom_kill_try 0x00000004
4099 -#define ASIZ_task 0x00000a50
4100 +#define ASIZ_task 0x00000a60
4101 #define AOFF_mm_mmap 0x00000000
4102 #define ASIZ_mm_mmap 0x00000008
4103 #define AOFF_mm_mmap_avl 0x00000008
4104 @@ -632,181 +636,183 @@
4105 #define ASIZ_task_priority 0x00000008
4106 #define AOFF_task_avg_slice 0x00000048
4107 #define ASIZ_task_avg_slice 0x00000008
4108 -#define AOFF_task_has_cpu 0x00000050
4109 +#define AOFF_task_counter_refresh 0x00000050
4110 +#define ASIZ_task_counter_refresh 0x00000004
4111 +#define AOFF_task_has_cpu 0x00000054
4112 #define ASIZ_task_has_cpu 0x00000004
4113 -#define AOFF_task_processor 0x00000054
4114 +#define AOFF_task_processor 0x00000058
4115 #define ASIZ_task_processor 0x00000004
4116 -#define AOFF_task_last_processor 0x00000058
4117 +#define AOFF_task_last_processor 0x0000005c
4118 #define ASIZ_task_last_processor 0x00000004
4119 -#define AOFF_task_lock_depth 0x0000005c
4120 +#define AOFF_task_lock_depth 0x00000060
4121 #define ASIZ_task_lock_depth 0x00000004
4122 -#define AOFF_task_next_task 0x00000060
4123 +#define AOFF_task_next_task 0x00000068
4124 #define ASIZ_task_next_task 0x00000008
4125 -#define AOFF_task_prev_task 0x00000068
4126 +#define AOFF_task_prev_task 0x00000070
4127 #define ASIZ_task_prev_task 0x00000008
4128 -#define AOFF_task_next_run 0x00000070
4129 +#define AOFF_task_next_run 0x00000078
4130 #define ASIZ_task_next_run 0x00000008
4131 -#define AOFF_task_prev_run 0x00000078
4132 +#define AOFF_task_prev_run 0x00000080
4133 #define ASIZ_task_prev_run 0x00000008
4134 -#define AOFF_task_task_exclusive 0x00000080
4135 +#define AOFF_task_task_exclusive 0x00000088
4136 #define ASIZ_task_task_exclusive 0x00000004
4137 -#define AOFF_task_binfmt 0x00000088
4138 +#define AOFF_task_binfmt 0x00000090
4139 #define ASIZ_task_binfmt 0x00000008
4140 -#define AOFF_task_exit_code 0x00000090
4141 +#define AOFF_task_exit_code 0x00000098
4142 #define ASIZ_task_exit_code 0x00000004
4143 -#define AOFF_task_exit_signal 0x00000094
4144 +#define AOFF_task_exit_signal 0x0000009c
4145 #define ASIZ_task_exit_signal 0x00000004
4146 -#define AOFF_task_pdeath_signal 0x00000098
4147 +#define AOFF_task_pdeath_signal 0x000000a0
4148 #define ASIZ_task_pdeath_signal 0x00000004
4149 -#define AOFF_task_personality 0x000000a0
4150 +#define AOFF_task_personality 0x000000a8
4151 #define ASIZ_task_personality 0x00000008
4152 -#define AOFF_task_pid 0x000000ac
4153 +#define AOFF_task_pid 0x000000b4
4154 #define ASIZ_task_pid 0x00000004
4155 -#define AOFF_task_pgrp 0x000000b0
4156 +#define AOFF_task_pgrp 0x000000b8
4157 #define ASIZ_task_pgrp 0x00000004
4158 -#define AOFF_task_tty_old_pgrp 0x000000b4
4159 +#define AOFF_task_tty_old_pgrp 0x000000bc
4160 #define ASIZ_task_tty_old_pgrp 0x00000004
4161 -#define AOFF_task_session 0x000000b8
4162 +#define AOFF_task_session 0x000000c0
4163 #define ASIZ_task_session 0x00000004
4164 -#define AOFF_task_leader 0x000000bc
4165 +#define AOFF_task_leader 0x000000c4
4166 #define ASIZ_task_leader 0x00000004
4167 -#define AOFF_task_p_opptr 0x000000c0
4168 +#define AOFF_task_p_opptr 0x000000c8
4169 #define ASIZ_task_p_opptr 0x00000008
4170 -#define AOFF_task_p_pptr 0x000000c8
4171 +#define AOFF_task_p_pptr 0x000000d0
4172 #define ASIZ_task_p_pptr 0x00000008
4173 -#define AOFF_task_p_cptr 0x000000d0
4174 +#define AOFF_task_p_cptr 0x000000d8
4175 #define ASIZ_task_p_cptr 0x00000008
4176 -#define AOFF_task_p_ysptr 0x000000d8
4177 +#define AOFF_task_p_ysptr 0x000000e0
4178 #define ASIZ_task_p_ysptr 0x00000008
4179 -#define AOFF_task_p_osptr 0x000000e0
4180 +#define AOFF_task_p_osptr 0x000000e8
4181 #define ASIZ_task_p_osptr 0x00000008
4182 -#define AOFF_task_pidhash_next 0x000000e8
4183 +#define AOFF_task_pidhash_next 0x000000f0
4184 #define ASIZ_task_pidhash_next 0x00000008
4185 -#define AOFF_task_pidhash_pprev 0x000000f0
4186 +#define AOFF_task_pidhash_pprev 0x000000f8
4187 #define ASIZ_task_pidhash_pprev 0x00000008
4188 -#define AOFF_task_tarray_ptr 0x000000f8
4189 +#define AOFF_task_tarray_ptr 0x00000100
4190 #define ASIZ_task_tarray_ptr 0x00000008
4191 -#define AOFF_task_wait_chldexit 0x00000100
4192 +#define AOFF_task_wait_chldexit 0x00000108
4193 #define ASIZ_task_wait_chldexit 0x00000008
4194 -#define AOFF_task_vfork_sem 0x00000108
4195 +#define AOFF_task_vfork_sem 0x00000110
4196 #define ASIZ_task_vfork_sem 0x00000008
4197 -#define AOFF_task_policy 0x00000110
4198 +#define AOFF_task_policy 0x00000118
4199 #define ASIZ_task_policy 0x00000008
4200 -#define AOFF_task_rt_priority 0x00000118
4201 +#define AOFF_task_rt_priority 0x00000120
4202 #define ASIZ_task_rt_priority 0x00000008
4203 -#define AOFF_task_it_real_value 0x00000120
4204 +#define AOFF_task_it_real_value 0x00000128
4205 #define ASIZ_task_it_real_value 0x00000008
4206 -#define AOFF_task_it_prof_value 0x00000128
4207 +#define AOFF_task_it_prof_value 0x00000130
4208 #define ASIZ_task_it_prof_value 0x00000008
4209 -#define AOFF_task_it_virt_value 0x00000130
4210 +#define AOFF_task_it_virt_value 0x00000138
4211 #define ASIZ_task_it_virt_value 0x00000008
4212 -#define AOFF_task_it_real_incr 0x00000138
4213 +#define AOFF_task_it_real_incr 0x00000140
4214 #define ASIZ_task_it_real_incr 0x00000008
4215 -#define AOFF_task_it_prof_incr 0x00000140
4216 +#define AOFF_task_it_prof_incr 0x00000148
4217 #define ASIZ_task_it_prof_incr 0x00000008
4218 -#define AOFF_task_it_virt_incr 0x00000148
4219 +#define AOFF_task_it_virt_incr 0x00000150
4220 #define ASIZ_task_it_virt_incr 0x00000008
4221 -#define AOFF_task_real_timer 0x00000150
4222 +#define AOFF_task_real_timer 0x00000158
4223 #define ASIZ_task_real_timer 0x00000028
4224 -#define AOFF_task_times 0x00000178
4225 +#define AOFF_task_times 0x00000180
4226 #define ASIZ_task_times 0x00000020
4227 -#define AOFF_task_start_time 0x00000198
4228 +#define AOFF_task_start_time 0x000001a0
4229 #define ASIZ_task_start_time 0x00000008
4230 -#define AOFF_task_per_cpu_utime 0x000001a0
4231 +#define AOFF_task_per_cpu_utime 0x000001a8
4232 #define ASIZ_task_per_cpu_utime 0x00000100
4233 -#define AOFF_task_min_flt 0x000003a0
4234 +#define AOFF_task_min_flt 0x000003a8
4235 #define ASIZ_task_min_flt 0x00000008
4236 -#define AOFF_task_maj_flt 0x000003a8
4237 +#define AOFF_task_maj_flt 0x000003b0
4238 #define ASIZ_task_maj_flt 0x00000008
4239 -#define AOFF_task_nswap 0x000003b0
4240 +#define AOFF_task_nswap 0x000003b8
4241 #define ASIZ_task_nswap 0x00000008
4242 -#define AOFF_task_cmin_flt 0x000003b8
4243 +#define AOFF_task_cmin_flt 0x000003c0
4244 #define ASIZ_task_cmin_flt 0x00000008
4245 -#define AOFF_task_cmaj_flt 0x000003c0
4246 +#define AOFF_task_cmaj_flt 0x000003c8
4247 #define ASIZ_task_cmaj_flt 0x00000008
4248 -#define AOFF_task_cnswap 0x000003c8
4249 +#define AOFF_task_cnswap 0x000003d0
4250 #define ASIZ_task_cnswap 0x00000008
4251 -#define AOFF_task_uid 0x000003d4
4252 +#define AOFF_task_uid 0x000003dc
4253 #define ASIZ_task_uid 0x00000004
4254 -#define AOFF_task_euid 0x000003d8
4255 +#define AOFF_task_euid 0x000003e0
4256 #define ASIZ_task_euid 0x00000004
4257 -#define AOFF_task_suid 0x000003dc
4258 +#define AOFF_task_suid 0x000003e4
4259 #define ASIZ_task_suid 0x00000004
4260 -#define AOFF_task_fsuid 0x000003e0
4261 +#define AOFF_task_fsuid 0x000003e8
4262 #define ASIZ_task_fsuid 0x00000004
4263 -#define AOFF_task_gid 0x000003e4
4264 +#define AOFF_task_gid 0x000003ec
4265 #define ASIZ_task_gid 0x00000004
4266 -#define AOFF_task_egid 0x000003e8
4267 +#define AOFF_task_egid 0x000003f0
4268 #define ASIZ_task_egid 0x00000004
4269 -#define AOFF_task_sgid 0x000003ec
4270 +#define AOFF_task_sgid 0x000003f4
4271 #define ASIZ_task_sgid 0x00000004
4272 -#define AOFF_task_fsgid 0x000003f0
4273 +#define AOFF_task_fsgid 0x000003f8
4274 #define ASIZ_task_fsgid 0x00000004
4275 -#define AOFF_task_ngroups 0x000003f4
4276 +#define AOFF_task_ngroups 0x000003fc
4277 #define ASIZ_task_ngroups 0x00000004
4278 -#define AOFF_task_groups 0x000003f8
4279 +#define AOFF_task_groups 0x00000400
4280 #define ASIZ_task_groups 0x00000080
4281 -#define AOFF_task_cap_effective 0x00000478
4282 +#define AOFF_task_cap_effective 0x00000480
4283 #define ASIZ_task_cap_effective 0x00000004
4284 -#define AOFF_task_cap_inheritable 0x0000047c
4285 +#define AOFF_task_cap_inheritable 0x00000484
4286 #define ASIZ_task_cap_inheritable 0x00000004
4287 -#define AOFF_task_cap_permitted 0x00000480
4288 +#define AOFF_task_cap_permitted 0x00000488
4289 #define ASIZ_task_cap_permitted 0x00000004
4290 -#define AOFF_task_user 0x00000488
4291 +#define AOFF_task_user 0x00000490
4292 #define ASIZ_task_user 0x00000008
4293 -#define AOFF_task_rlim 0x00000490
4294 +#define AOFF_task_rlim 0x00000498
4295 #define ASIZ_task_rlim 0x000000a0
4296 -#define AOFF_task_used_math 0x00000530
4297 +#define AOFF_task_used_math 0x00000538
4298 #define ASIZ_task_used_math 0x00000002
4299 -#define AOFF_task_comm 0x00000532
4300 +#define AOFF_task_comm 0x0000053a
4301 #define ASIZ_task_comm 0x00000010
4302 -#define AOFF_task_link_count 0x00000544
4303 +#define AOFF_task_link_count 0x0000054c
4304 #define ASIZ_task_link_count 0x00000004
4305 -#define AOFF_task_tty 0x00000548
4306 +#define AOFF_task_tty 0x00000550
4307 #define ASIZ_task_tty 0x00000008
4308 -#define AOFF_task_semundo 0x00000550
4309 +#define AOFF_task_semundo 0x00000558
4310 #define ASIZ_task_semundo 0x00000008
4311 -#define AOFF_task_semsleeping 0x00000558
4312 +#define AOFF_task_semsleeping 0x00000560
4313 #define ASIZ_task_semsleeping 0x00000008
4314 -#define AOFF_task_tss 0x00000560
4315 +#define AOFF_task_tss 0x00000570
4316 #define ASIZ_task_tss 0x00000470
4317 -#define AOFF_task_fs 0x000009d0
4318 +#define AOFF_task_fs 0x000009e0
4319 #define ASIZ_task_fs 0x00000008
4320 -#define AOFF_task_files 0x000009d8
4321 +#define AOFF_task_files 0x000009e8
4322 #define ASIZ_task_files 0x00000008
4323 -#define AOFF_task_mm 0x000009e0
4324 +#define AOFF_task_mm 0x000009f0
4325 #define ASIZ_task_mm 0x00000008
4326 -#define AOFF_task_local_pages 0x000009e8
4327 +#define AOFF_task_local_pages 0x000009f8
4328 #define ASIZ_task_local_pages 0x00000010
4329 -#define AOFF_task_allocation_order 0x000009f8
4330 +#define AOFF_task_allocation_order 0x00000a08
4331 #define ASIZ_task_allocation_order 0x00000004
4332 -#define AOFF_task_nr_local_pages 0x000009fc
4333 +#define AOFF_task_nr_local_pages 0x00000a0c
4334 #define ASIZ_task_nr_local_pages 0x00000004
4335 -#define AOFF_task_fs_locks 0x00000a00
4336 +#define AOFF_task_fs_locks 0x00000a10
4337 #define ASIZ_task_fs_locks 0x00000004
4338 -#define AOFF_task_sigmask_lock 0x00000a04
4339 +#define AOFF_task_sigmask_lock 0x00000a14
4340 #define ASIZ_task_sigmask_lock 0x0000000c
4341 -#define AOFF_task_sig 0x00000a10
4342 +#define AOFF_task_sig 0x00000a20
4343 #define ASIZ_task_sig 0x00000008
4344 -#define AOFF_task_signal 0x00000a18
4345 +#define AOFF_task_signal 0x00000a28
4346 #define ASIZ_task_signal 0x00000008
4347 -#define AOFF_task_blocked 0x00000a20
4348 +#define AOFF_task_blocked 0x00000a30
4349 #define ASIZ_task_blocked 0x00000008
4350 -#define AOFF_task_sigqueue 0x00000a28
4351 +#define AOFF_task_sigqueue 0x00000a38
4352 #define ASIZ_task_sigqueue 0x00000008
4353 -#define AOFF_task_sigqueue_tail 0x00000a30
4354 +#define AOFF_task_sigqueue_tail 0x00000a40
4355 #define ASIZ_task_sigqueue_tail 0x00000008
4356 -#define AOFF_task_sas_ss_sp 0x00000a38
4357 +#define AOFF_task_sas_ss_sp 0x00000a48
4358 #define ASIZ_task_sas_ss_sp 0x00000008
4359 -#define AOFF_task_sas_ss_size 0x00000a40
4360 +#define AOFF_task_sas_ss_size 0x00000a50
4361 #define ASIZ_task_sas_ss_size 0x00000008
4362 -#define AOFF_task_parent_exec_id 0x00000a48
4363 +#define AOFF_task_parent_exec_id 0x00000a58
4364 #define ASIZ_task_parent_exec_id 0x00000004
4365 -#define AOFF_task_self_exec_id 0x00000a4c
4366 +#define AOFF_task_self_exec_id 0x00000a5c
4367 #define ASIZ_task_self_exec_id 0x00000004
4368 -#define AOFF_task_oom_kill_try 0x00000a50
4369 +#define AOFF_task_oom_kill_try 0x00000a60
4370 #define ASIZ_task_oom_kill_try 0x00000004
4371 -#define ASIZ_task 0x00000a60
4372 +#define ASIZ_task 0x00000a70
4373 #define AOFF_mm_mmap 0x00000000
4374 #define ASIZ_mm_mmap 0x00000008
4375 #define AOFF_mm_mmap_avl 0x00000008
4376 diff -urN linux.orig/include/asm-sparc64/poll.h linux/include/asm-sparc64/poll.h
4377 --- linux.orig/include/asm-sparc64/poll.h Sun Mar 25 18:31:09 2001
4378 +++ linux/include/asm-sparc64/poll.h Wed Aug 7 17:45:23 2002
4380 #define POLLWRNORM POLLOUT
4381 #define POLLRDBAND 128
4382 #define POLLWRBAND 256
4383 +#define POLLMSG 512
4387 diff -urN linux.orig/include/linux/elfcore.h linux/include/linux/elfcore.h
4388 --- linux.orig/include/linux/elfcore.h Sun Mar 25 18:31:04 2001
4389 +++ linux/include/linux/elfcore.h Wed Aug 7 17:44:43 2002
4391 typedef elf_greg_t greg_t;
4392 typedef elf_gregset_t gregset_t;
4393 typedef elf_fpregset_t fpregset_t;
4394 +typedef elf_fpxregset_t fpxregset_t;
4395 #define NGREG ELF_NGREG
4398 diff -urN linux.orig/include/linux/fs.h linux/include/linux/fs.h
4399 --- linux.orig/include/linux/fs.h Fri Nov 2 17:39:09 2001
4400 +++ linux/include/linux/fs.h Wed Aug 7 17:46:35 2002
4402 #define __getname() ((char *) __get_free_page(GFP_KERNEL))
4403 #define putname(name) free_page((unsigned long)(name))
4405 -extern void kill_fasync(struct fasync_struct *fa, int sig);
4406 +extern void kill_fasync(struct fasync_struct *fa, int sig, int band);
4407 extern int register_blkdev(unsigned int, const char *, struct file_operations *);
4408 extern int unregister_blkdev(unsigned int major, const char * name);
4409 extern int blkdev_open(struct inode * inode, struct file * filp);
4411 if (test_and_clear_bit(BH_Dirty, &bh->b_state)) {
4412 if (bh->b_list == BUF_DIRTY)
4414 - clear_bit(BH_Wait_IO, &bh->b_state);
4418 diff -urN linux.orig/include/linux/kernel.h linux/include/linux/kernel.h
4419 --- linux.orig/include/linux/kernel.h Sun Mar 25 18:31:03 2001
4420 +++ linux/include/linux/kernel.h Wed Aug 7 17:44:43 2002
4422 #define FASTCALL(x) x
4425 -extern void math_error(void);
4426 extern struct notifier_block *panic_notifier_list;
4427 NORET_TYPE void panic(const char * fmt, ...)
4428 __attribute__ ((NORET_AND format (printf, 1, 2)));
4429 diff -urN linux.orig/include/linux/locks.h linux/include/linux/locks.h
4430 --- linux.orig/include/linux/locks.h Sun Mar 25 18:37:40 2001
4431 +++ linux/include/linux/locks.h Wed Aug 7 17:46:35 2002
4433 extern inline void unlock_buffer(struct buffer_head *bh)
4435 clear_bit(BH_Lock, &bh->b_state);
4436 + clear_bit(BH_Wait_IO, &bh->b_state);
4437 wake_up(&bh->b_wait);
4440 diff -urN linux.orig/include/linux/mm.h linux/include/linux/mm.h
4441 --- linux.orig/include/linux/mm.h Sun Mar 25 18:31:03 2001
4442 +++ linux/include/linux/mm.h Wed Aug 7 17:57:18 2002
4444 #define VM_LOCKED 0x2000
4445 #define VM_IO 0x4000 /* Memory mapped I/O or similar */
4447 +#define VM_RESERVED 0x8000 /* Don't unmap it from swap_out */
4449 #define VM_STACK_FLAGS 0x0177
4452 @@ -347,13 +349,18 @@
4454 #define GFP_DMA __GFP_DMA
4456 +extern int heap_stack_gap;
4458 /* vma is the first one with address < vma->vm_end,
4459 * and even address < vma->vm_start. Have to extend vma. */
4460 -static inline int expand_stack(struct vm_area_struct * vma, unsigned long address)
4461 +static inline int expand_stack(struct vm_area_struct * vma, unsigned long address,
4462 + struct vm_area_struct * prev_vma)
4466 address &= PAGE_MASK;
4467 + if (prev_vma && prev_vma->vm_end + (heap_stack_gap << PAGE_SHIFT) > address)
4469 grow = vma->vm_start - address;
4470 if ((vma->vm_end - address
4471 > current->rlim[RLIMIT_STACK].rlim_cur) ||
4474 /* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
4475 extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
4476 +extern struct vm_area_struct * find_vma_prev(struct mm_struct *, unsigned long,
4477 + struct vm_area_struct **);
4479 /* Look up the first VMA which intersects the interval start_addr..end_addr-1,
4480 NULL if none. Assume start_addr < end_addr. */
4481 diff -urN linux.orig/include/linux/net.h linux/include/linux/net.h
4482 --- linux.orig/include/linux/net.h Sun Mar 25 18:31:03 2001
4483 +++ linux/include/linux/net.h Wed Aug 7 17:45:23 2002
4487 extern struct net_proto_family *net_families[];
4488 -extern int sock_wake_async(struct socket *sk, int how);
4489 +extern int sock_wake_async(struct socket *sk, int how, int band);
4490 extern int sock_register(struct net_proto_family *fam);
4491 extern int sock_unregister(int family);
4492 extern struct socket *sock_alloc(void);
4493 diff -urN linux.orig/include/linux/sched.h linux/include/linux/sched.h
4494 --- linux.orig/include/linux/sched.h Fri Nov 2 17:39:09 2001
4495 +++ linux/include/linux/sched.h Wed Aug 7 17:55:29 2002
4500 + int counter_refresh;
4501 /* SMP and runqueue state */
4507 /* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0,0, \
4508 -/* counter */ DEF_PRIORITY,DEF_PRIORITY,0, \
4509 +/* counter */ DEF_PRIORITY,DEF_PRIORITY,0,0, \
4510 /* SMP */ 0,0,0,-1, \
4511 /* schedlink */ &init_task,&init_task, &init_task, &init_task, \
4512 /* task_exclusive */ 0, \
4513 diff -urN linux.orig/include/linux/sysctl.h linux/include/linux/sysctl.h
4514 --- linux.orig/include/linux/sysctl.h Sun Mar 25 18:37:40 2001
4515 +++ linux/include/linux/sysctl.h Wed Aug 7 17:57:18 2002
4517 VM_PAGECACHE=7, /* struct: Set cache memory thresholds */
4518 VM_PAGERDAEMON=8, /* struct: Control kswapd behaviour */
4519 VM_PGT_CACHE=9, /* struct: Set page table cache parameters */
4520 - VM_PAGE_CLUSTER=10 /* int: set number of pages to swap together */
4521 + VM_PAGE_CLUSTER=10, /* int: set number of pages to swap together */
4522 + VM_HEAP_STACK_GAP=11, /* int: page gap between heap and stack */
4526 diff -urN linux.orig/include/linux/time.h linux/include/linux/time.h
4527 --- linux.orig/include/linux/time.h Sun Mar 25 18:31:03 2001
4528 +++ linux/include/linux/time.h Wed Aug 7 17:53:48 2002
4530 value->tv_sec = jiffies / HZ;
4533 +static __inline__ int
4534 +timespec_before(struct timespec a, struct timespec b)
4536 + if (a.tv_sec == b.tv_sec)
4537 + return a.tv_nsec < b.tv_nsec;
4538 + return a.tv_sec < b.tv_sec;
4541 +/* computes `a - b' and write the result in `result', assumes `a >= b' */
4543 +timespec_less(struct timespec a, struct timespec b, struct timespec * result)
4545 + if (a.tv_nsec < b.tv_nsec)
4548 + a.tv_nsec += 1000000000;
4551 + result->tv_sec = a.tv_sec - b.tv_sec;
4552 + result->tv_nsec = a.tv_nsec - b.tv_nsec;
4556 time_t tv_sec; /* seconds */
4557 suseconds_t tv_usec; /* microseconds */
4560 +/* computes `a - b' and write the result in `result', assumes `a >= b' */
4562 +timeval_less(struct timeval a, struct timeval b, struct timeval * result)
4564 + if (a.tv_usec < b.tv_usec)
4567 + a.tv_usec += 1000000;
4570 + result->tv_sec = a.tv_sec - b.tv_sec;
4571 + result->tv_usec = a.tv_usec - b.tv_usec;
4574 +static __inline__ void
4575 +timeval_to_timespec(struct timeval tv, struct timespec * ts)
4577 + ts->tv_sec = tv.tv_sec;
4578 + ts->tv_nsec = (long) tv.tv_usec * 1000;
4582 int tz_minuteswest; /* minutes west of Greenwich */
4583 int tz_dsttime; /* type of dst correction */
4584 diff -urN linux.orig/include/linux/wrapper.h linux/include/linux/wrapper.h
4585 --- linux.orig/include/linux/wrapper.h Sun Mar 25 18:31:04 2001
4586 +++ linux/include/linux/wrapper.h Wed Aug 7 17:46:42 2002
4588 #define vma_get_end(v) v->vm_end
4589 #define vma_get_page_prot(v) v->vm_page_prot
4592 + * mem_map_reserve()/unreserve() are going to be obsoleted by
4593 + * setting the VM_RESERVED in vma->vm_flags.
4595 + * Instead of marking the pages as reserved, just mark the vma as reserved
4596 + * this will improve performance (it's zero cost unlike the PG_reserved check)
4597 + * and it will be trivial for not physically contigous mappings too.
4599 #define mem_map_reserve(p) set_bit(PG_reserved, &mem_map[p].flags)
4600 #define mem_map_unreserve(p) clear_bit(PG_reserved, &mem_map[p].flags)
4601 #define mem_map_inc_count(p) atomic_inc(&(mem_map[p].count))
4602 diff -urN linux.orig/kernel/exit.c linux/kernel/exit.c
4603 --- linux.orig/kernel/exit.c Fri Nov 2 17:39:16 2001
4604 +++ linux/kernel/exit.c Wed Aug 7 17:55:29 2002
4606 current->cmin_flt += p->min_flt + p->cmin_flt;
4607 current->cmaj_flt += p->maj_flt + p->cmaj_flt;
4608 current->cnswap += p->nswap + p->cnswap;
4610 + * Potentially available timeslices are retrieved
4611 + * here - this way the parent does not get penalized
4612 + * for creating too many processes.
4614 + * (this cannot be used to artificially 'generate'
4615 + * timeslices, because any timeslice recovered here
4616 + * was given away by the parent in the first place.)
4618 + if (!p->counter_refresh)
4619 + current->counter += p->counter;
4620 free_task_struct(p);
4622 printk("task releasing itself\n");
4624 p->exit_signal = SIGCHLD;
4626 p->p_opptr = child_reaper; /* init */
4627 + p->counter_refresh = 1;
4628 if (p->pdeath_signal) send_sig(p->pdeath_signal, p, 0);
4631 diff -urN linux.orig/kernel/fork.c linux/kernel/fork.c
4632 --- linux.orig/kernel/fork.c Fri Nov 2 17:39:16 2001
4633 +++ linux/kernel/fork.c Wed Aug 7 17:55:29 2002
4636 current->counter >>= 1;
4637 p->counter = current->counter;
4638 + /* Tell the parent if it can get back its timeslice when child exits */
4639 + p->counter_refresh = 0;
4642 * Ok, add it to the run-queues and make it
4643 diff -urN linux.orig/kernel/sched.c linux/kernel/sched.c
4644 --- linux.orig/kernel/sched.c Sun Mar 25 18:37:40 2001
4645 +++ linux/kernel/sched.c Wed Aug 7 17:55:29 2002
4646 @@ -212,101 +212,89 @@
4650 - * If there is a dependency between p1 and p2,
4651 - * don't be too eager to go into the slow schedule.
4652 - * In particular, if p1 and p2 both want the kernel
4653 - * lock, there is no point in trying to make them
4654 - * extremely parallel..
4656 - * (No lock - lock_depth < 0)
4658 - * There are two additional metrics here:
4660 - * first, a 'cutoff' interval, currently 0-200 usecs on
4661 - * x86 CPUs, depending on the size of the 'SMP-local cache'.
4662 - * If the current process has longer average timeslices than
4663 - * this, then we utilize the idle CPU.
4665 - * second, if the wakeup comes from a process context,
4666 - * then the two processes are 'related'. (they form a
4669 - * An idle CPU is almost always a bad thing, thus we skip
4670 - * the idle-CPU utilization only if both these conditions
4671 - * are true. (ie. a 'process-gang' rescheduling with rather
4672 - * high frequency should stay on the same CPU).
4674 - * [We can switch to something more finegrained in 2.3.]
4676 - * do not 'guess' if the to-be-scheduled task is RT.
4677 + * This is ugly, but reschedule_idle() is very timing-critical.
4678 + * We enter with the runqueue spinlock held, but we might end
4679 + * up unlocking it early, so the caller must not unlock the
4680 + * runqueue, it's always done by reschedule_idle().
4682 -#define related(p1,p2) (((p1)->lock_depth >= 0) && (p2)->lock_depth >= 0) && \
4683 - (((p2)->policy == SCHED_OTHER) && ((p1)->avg_slice < cacheflush_time))
4685 -static inline void reschedule_idle_slow(struct task_struct * p)
4686 +static inline void reschedule_idle(struct task_struct * p, unsigned long flags)
4690 - * (see reschedule_idle() for an explanation first ...)
4694 - * We try to find another (idle) CPU for this woken-up process.
4696 - * On SMP, we mostly try to see if the CPU the task used
4697 - * to run on is idle.. but we will use another idle CPU too,
4698 - * at this point we already know that this CPU is not
4699 - * willing to reschedule in the near future.
4701 - * An idle CPU is definitely wasted, especially if this CPU is
4702 - * running long-timeslice processes. The following algorithm is
4703 - * pretty good at finding the best idle CPU to send this process
4706 - * [We can try to preempt low-priority processes on other CPUs in
4707 - * 2.3. Also we can try to use the avg_slice value to predict
4708 - * 'likely reschedule' events even on other CPUs.]
4710 int this_cpu = smp_processor_id(), target_cpu;
4711 - struct task_struct *tsk, *target_tsk;
4712 - int cpu, best_cpu, weight, best_weight, i;
4713 - unsigned long flags;
4715 - best_weight = 0; /* prevents negative weight */
4717 - spin_lock_irqsave(&runqueue_lock, flags);
4718 + struct task_struct *tsk;
4719 + int cpu, best_cpu, i;
4722 * shortcut if the woken up task's last CPU is
4725 best_cpu = p->processor;
4726 - target_tsk = idle_task(best_cpu);
4727 - if (cpu_curr(best_cpu) == target_tsk)
4728 + tsk = idle_task(best_cpu);
4729 + if (cpu_curr(best_cpu) == tsk)
4732 - target_tsk = NULL;
4733 - for (i = 0; i < smp_num_cpus; i++) {
4735 + * We know that the preferred CPU has a cache-affine current
4736 + * process, lets try to find a new idle CPU for the woken-up
4739 + for (i = smp_num_cpus - 1; i >= 0; i--) {
4740 cpu = cpu_logical_map(i);
4741 + if (cpu == best_cpu)
4743 tsk = cpu_curr(cpu);
4744 - if (related(tsk, p))
4745 - goto out_no_target;
4746 - weight = preemption_goodness(tsk, p, cpu);
4747 - if (weight > best_weight) {
4748 - best_weight = weight;
4752 + * We use the last available idle CPU. This creates
4753 + * a priority list between idle CPUs, but this is not
4756 + if (tsk == idle_task(cpu))
4761 - * found any suitable CPU?
4762 + * No CPU is idle, but maybe this process has enough priority
4763 + * to preempt it's preferred CPU.
4765 + tsk = cpu_curr(best_cpu);
4766 + if (preemption_goodness(tsk, p, best_cpu) > 0)
4770 + * We will get here often - or in the high CPU contention
4771 + * case. No CPU is idle and this process is either lowprio or
4772 + * the preferred CPU is highprio. Try to preemt some other CPU
4773 + * only if it's RT or if it's iteractive and the preferred
4774 + * cpu won't reschedule shortly.
4777 - goto out_no_target;
4778 + if ((p->avg_slice < cacheflush_time && cpu_curr(best_cpu)->avg_slice > cacheflush_time) ||
4779 + ((p->policy & ~SCHED_YIELD) != SCHED_OTHER))
4781 + int weight, best_weight = 0;
4782 + struct task_struct * best_tsk = NULL;
4784 + for (i = smp_num_cpus - 1; i >= 0; i--) {
4785 + cpu = cpu_logical_map(i);
4786 + if (cpu == best_cpu)
4788 + tsk = cpu_curr(cpu);
4789 + weight = preemption_goodness(tsk, p, cpu);
4790 + if (weight > best_weight) {
4791 + best_weight = weight;
4796 + if ((tsk = best_tsk))
4800 + spin_unlock_irqrestore(&runqueue_lock, flags);
4804 - target_cpu = target_tsk->processor;
4805 - target_tsk->need_resched = 1;
4806 + target_cpu = tsk->processor;
4807 + tsk->need_resched = 1;
4808 spin_unlock_irqrestore(&runqueue_lock, flags);
4810 * the APIC stuff can go outside of the lock because
4812 if (target_cpu != this_cpu)
4813 smp_send_reschedule(target_cpu);
4816 - spin_unlock_irqrestore(&runqueue_lock, flags);
4819 int this_cpu = smp_processor_id();
4820 struct task_struct *tsk;
4821 @@ -325,38 +310,10 @@
4823 if (preemption_goodness(tsk, p, this_cpu) > 0)
4824 tsk->need_resched = 1;
4825 + spin_unlock_irqrestore(&runqueue_lock, flags);
4829 -static void reschedule_idle(struct task_struct * p)
4832 - int cpu = smp_processor_id();
4834 - * ("wakeup()" should not be called before we've initialized
4836 - * Basically a not-yet initialized SMP subsystem can be
4837 - * considered as a not-yet working scheduler, simply dont use
4838 - * it before it's up and running ...)
4840 - * SMP rescheduling is done in 2 passes:
4841 - * - pass #1: faster: 'quick decisions'
4842 - * - pass #2: slower: 'lets try and find a suitable CPU'
4846 - * Pass #1. (subtle. We might be in the middle of __switch_to, so
4847 - * to preserve scheduling atomicity we have to use cpu_curr)
4849 - if ((p->processor == cpu) && related(cpu_curr(cpu), p))
4851 -#endif /* __SMP__ */
4855 - reschedule_idle_slow(p);
4865 - spin_unlock_irqrestore(&runqueue_lock, flags);
4866 + reschedule_idle(p, flags); // spin_unlocks runqueue
4868 - reschedule_idle(p);
4871 spin_unlock_irqrestore(&runqueue_lock, flags);
4872 @@ -668,9 +624,13 @@
4875 if ((prev->state == TASK_RUNNING) &&
4876 - (prev != idle_task(smp_processor_id())))
4877 - reschedule_idle(prev);
4879 + (prev != idle_task(smp_processor_id()))) {
4880 + unsigned long flags;
4882 + spin_lock_irqsave(&runqueue_lock, flags);
4883 + reschedule_idle(prev, flags); // spin_unlocks runqueue
4887 #endif /* __SMP__ */
4889 @@ -841,8 +801,10 @@
4890 struct task_struct *p;
4891 spin_unlock_irq(&runqueue_lock);
4892 read_lock(&tasklist_lock);
4894 + for_each_task(p) {
4895 p->counter = (p->counter >> 1) + p->priority;
4896 + p->counter_refresh = 1;
4898 read_unlock(&tasklist_lock);
4899 spin_lock_irq(&runqueue_lock);
4900 goto repeat_schedule;
4901 @@ -1922,6 +1884,7 @@
4904 unsigned long expire;
4905 + struct timeval before, after;
4907 if(copy_from_user(&t, rqtp, sizeof(struct timespec)))
4909 @@ -1954,11 +1917,20 @@
4910 expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec);
4912 current->state = TASK_INTERRUPTIBLE;
4913 + get_fast_time(&before);
4914 expire = schedule_timeout(expire);
4915 + get_fast_time(&after);
4919 - jiffies_to_timespec(expire, &t);
4920 + struct timespec elapsed;
4922 + timeval_less(after, before, &after);
4923 + timeval_to_timespec(after, &elapsed);
4924 + if (timespec_before(elapsed, t))
4925 + timespec_less(t, elapsed, &t);
4927 + t.tv_nsec = t.tv_sec = 0;
4928 if (copy_to_user(rmtp, &t, sizeof(struct timespec)))
4931 diff -urN linux.orig/kernel/sysctl.c linux/kernel/sysctl.c
4932 --- linux.orig/kernel/sysctl.c Sun Mar 25 18:37:40 2001
4933 +++ linux/kernel/sysctl.c Wed Aug 7 17:57:18 2002
4935 &pgt_cache_water, 2*sizeof(int), 0600, NULL, &proc_dointvec},
4936 {VM_PAGE_CLUSTER, "page-cluster",
4937 &page_cluster, sizeof(int), 0600, NULL, &proc_dointvec},
4938 + {VM_HEAP_STACK_GAP, "heap-stack-gap",
4939 + &heap_stack_gap, sizeof(int), 0644, NULL, &proc_dointvec},
4943 diff -urN linux.orig/mm/filemap.c linux/mm/filemap.c
4944 --- linux.orig/mm/filemap.c Sun Mar 25 18:37:40 2001
4945 +++ linux/mm/filemap.c Wed Aug 7 17:56:23 2002
4946 @@ -338,13 +338,13 @@
4949 add_wait_queue(&page->wait, &wait);
4951 - tsk->state = TASK_UNINTERRUPTIBLE;
4953 - if (PageLocked(page)) {
4955 + set_current_state(TASK_UNINTERRUPTIBLE);
4957 + if (!PageLocked(page))
4962 + } while (PageLocked(page));
4963 tsk->state = TASK_RUNNING;
4964 remove_wait_queue(&page->wait, &wait);
4966 @@ -560,9 +560,11 @@
4967 * accessed sequentially.
4971 if (reada_ok == 2) {
4972 run_task_queue(&tq_disk);
4976 filp->f_ralen += ahead;
4977 filp->f_rawin += filp->f_ralen;
4978 diff -urN linux.orig/mm/mmap.c linux/mm/mmap.c
4979 --- linux.orig/mm/mmap.c Sun Mar 25 18:31:02 2001
4980 +++ linux/mm/mmap.c Wed Aug 7 17:57:18 2002
4982 kmem_cache_t *vm_area_cachep;
4984 int sysctl_overcommit_memory;
4985 +int heap_stack_gap = 1;
4987 /* Check that a process has enough memory to allocate a
4988 * new virtual mapping.
4990 free += page_cache_size;
4991 free += nr_free_pages;
4992 free += nr_swap_pages;
4993 - free -= (page_cache.min_percent + buffer_mem.min_percent + 2)*num_physpages/100;
4994 return free > pages;
4997 @@ -371,9 +371,14 @@
4999 for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) {
5000 /* At this point: (!vmm || addr < vmm->vm_end). */
5001 + unsigned long __heap_stack_gap = 0;
5002 if (TASK_SIZE - len < addr)
5004 - if (!vmm || addr + len <= vmm->vm_start)
5007 + if (vmm->vm_flags & VM_GROWSDOWN)
5008 + __heap_stack_gap = heap_stack_gap << PAGE_SHIFT;
5009 + if (addr + len + __heap_stack_gap <= vmm->vm_start)
5013 diff -urN linux.orig/mm/mremap.c linux/mm/mremap.c
5014 --- linux.orig/mm/mremap.c Sun Mar 25 18:31:03 2001
5015 +++ linux/mm/mremap.c Wed Aug 7 17:53:05 2002
5018 new_vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
5020 - unsigned long new_addr = get_unmapped_area(addr, new_len);
5021 + unsigned long new_addr = get_unmapped_area(0, new_len);
5023 if (new_addr && !move_page_tables(current->mm, new_addr, addr, old_len)) {
5025 diff -urN linux.orig/mm/swap.c linux/mm/swap.c
5026 --- linux.orig/mm/swap.c Sun Mar 25 18:31:02 2001
5027 +++ linux/mm/swap.c Wed Aug 7 17:43:00 2002
5029 atomic_t nr_async_pages = ATOMIC_INIT(0);
5031 buffer_mem_t buffer_mem = {
5032 - 2, /* minimum percent buffer */
5033 + 4, /* minimum percent buffer */
5034 10, /* borrow percent buffer */
5035 60 /* maximum percent buffer */
5038 buffer_mem_t page_cache = {
5039 - 2, /* minimum percent page cache */
5040 + 4, /* minimum percent page cache */
5041 15, /* borrow percent page cache */
5044 diff -urN linux.orig/mm/vmscan.c linux/mm/vmscan.c
5045 --- linux.orig/mm/vmscan.c Tue May 21 01:32:35 2002
5046 +++ linux/mm/vmscan.c Wed Aug 7 17:46:42 2002
5050 /* Don't swap out areas which are locked down */
5051 - if (vma->vm_flags & VM_LOCKED)
5052 + if (vma->vm_flags & (VM_LOCKED|VM_RESERVED))
5055 pgdir = pgd_offset(tsk->mm, address);
5056 diff -urN linux.orig/net/core/sock.c linux/net/core/sock.c
5057 --- linux.orig/net/core/sock.c Fri Nov 2 17:39:16 2001
5058 +++ linux/net/core/sock.c Wed Aug 7 17:45:23 2002
5059 @@ -1025,7 +1025,7 @@
5062 wake_up_interruptible(sk->sleep);
5063 - sock_wake_async(sk->socket,0);
5064 + sock_wake_async(sk->socket,0,POLL_ERR);
5068 @@ -1033,7 +1033,7 @@
5071 wake_up_interruptible(sk->sleep);
5072 - sock_wake_async(sk->socket,1);
5073 + sock_wake_async(sk->socket,1,POLL_IN);
5077 @@ -1048,7 +1048,7 @@
5079 /* Should agree with poll, otherwise some programs break */
5080 if (sock_writeable(sk))
5081 - sock_wake_async(sk->socket, 2);
5082 + sock_wake_async(sk->socket, 2, POLL_OUT);
5086 diff -urN linux.orig/net/ipv4/tcp.c linux/net/ipv4/tcp.c
5087 --- linux.orig/net/ipv4/tcp.c Fri Nov 2 17:39:16 2001
5088 +++ linux/net/ipv4/tcp.c Wed Aug 7 17:45:23 2002
5090 wake_up_interruptible(sk->sleep);
5091 if (sock_wspace(sk) >=
5092 tcp_min_write_space(sk))
5093 - sock_wake_async(sk->socket, 2);
5094 + sock_wake_async(sk->socket, 2, POLL_OUT);
5098 diff -urN linux.orig/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
5099 --- linux.orig/net/ipv4/tcp_input.c Fri Nov 2 17:39:16 2001
5100 +++ linux/net/ipv4/tcp_input.c Wed Aug 7 17:58:04 2002
5103 static void tcp_delack_estimator(struct tcp_opt *tp)
5105 + tcp_exit_quickack_mode(tp);
5107 tp->lrcvtime = tcp_time_stamp;
5109 @@ -115,10 +116,7 @@
5113 - /* This funny shift makes sure we
5114 - * clear the "quick ack mode" bit.
5116 - tp->ato = ((tp->ato << 1) >> 2) + m;
5117 + tp->ato = (tp->ato >> 1) + m;
5121 @@ -1183,7 +1181,7 @@
5124 sk->state_change(sk);
5125 - sock_wake_async(sk->socket, 1);
5126 + sock_wake_async(sk->socket, 1, POLL_HUP);
5130 @@ -1697,6 +1695,7 @@
5131 kill_proc(sk->proc, SIGURG, 1);
5133 kill_pg(-sk->proc, SIGURG, 1);
5134 + sock_wake_async(sk->socket, 3, POLL_PRI);
5137 /* We may be adding urgent data when the last byte read was
5138 @@ -1933,19 +1932,23 @@
5143 - if(th->syn && TCP_SKB_CB(skb)->seq != tp->syn_seq) {
5144 - SOCK_DEBUG(sk, "syn in established state\n");
5145 - tcp_statistics.TcpInErrs++;
5156 + if (TCP_SKB_CB(skb)->seq != tp->syn_seq ||
5157 + skb->len > th->doff*4) {
5158 + tcp_statistics.TcpInErrs++;
5167 tcp_ack(sk, th, TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->ack_seq, len);
5169 @@ -2244,7 +2247,7 @@
5172 sk->state_change(sk);
5173 - sock_wake_async(sk->socket, 0);
5174 + sock_wake_async(sk->socket, 0, POLL_OUT);
5177 if(th->syn && !th->rst) {
5178 diff -urN linux.orig/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
5179 --- linux.orig/net/ipv4/tcp_ipv4.c Sun Mar 25 18:37:41 2001
5180 +++ linux/net/ipv4/tcp_ipv4.c Wed Aug 7 17:49:21 2002
5181 @@ -1404,6 +1404,7 @@
5182 newtp->snd_una = req->snt_isn + 1;
5185 + tcp_enter_quickack_mode(newtp);
5186 newtp->snd_wl1 = req->rcv_isn;
5187 newtp->snd_wl2 = req->snt_isn;
5189 @@ -1958,6 +1959,7 @@
5190 skb_queue_head_init(&tp->out_of_order_queue);
5191 tcp_init_xmit_timers(sk);
5193 + tcp_enter_quickack_mode(tp);
5194 tp->rto = TCP_TIMEOUT_INIT; /*TCP_WRITE_TIME*/
5195 tp->mdev = TCP_TIMEOUT_INIT;
5197 diff -urN linux.orig/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
5198 --- linux.orig/net/ipv4/tcp_output.c Fri Nov 2 17:39:16 2001
5199 +++ linux/net/ipv4/tcp_output.c Wed Aug 7 17:49:21 2002
5200 @@ -1044,6 +1044,17 @@
5201 timeout = (tp->ato << 1) >> 1;
5202 if (timeout > max_timeout)
5203 timeout = max_timeout;
5206 + timeout = tp->rto;
5207 + if ((signed) timeout <= 0)
5210 + "tcp_send_delayed_ack: rto %ld!\n", timeout);
5213 + timeout = min(timeout, max_timeout);
5217 /* Use new timeout only if there wasn't a older one earlier. */
5218 diff -urN linux.orig/net/ipv4/tcp_timer.c linux/net/ipv4/tcp_timer.c
5219 --- linux.orig/net/ipv4/tcp_timer.c Sun Mar 25 18:31:12 2001
5220 +++ linux/net/ipv4/tcp_timer.c Wed Aug 7 17:49:21 2002
5221 @@ -195,7 +195,21 @@
5222 if (!atomic_read(&sk->sock_readers))
5225 - tcp_send_delayed_ack(&(sk->tp_pinfo.af_tcp), HZ/10);
5227 + struct tcp_opt * tp = &(sk->tp_pinfo.af_tcp);
5234 + "tcp_delack_timer: rto %d!\n", rto);
5237 + rto = min(rto, HZ/10);
5238 + tp->delack_timer.expires = rto + jiffies;
5239 + add_timer(&tp->delack_timer);
5244 diff -urN linux.orig/net/ipv6/ip6_output.c linux/net/ipv6/ip6_output.c
5245 --- linux.orig/net/ipv6/ip6_output.c Sun Mar 25 18:31:13 2001
5246 +++ linux/net/ipv6/ip6_output.c Wed Aug 7 17:51:14 2002
5248 struct ipv6hdr *hdr = skb->nh.ipv6h;
5249 struct inet6_skb_parm *opt =(struct inet6_skb_parm*)skb->cb;
5251 - if (ipv6_devconf.forwarding == 0 && opt->srcrt == 0)
5252 + if (ipv6_devconf.forwarding == 0)
5256 diff -urN linux.orig/net/socket.c linux/net/socket.c
5257 --- linux.orig/net/socket.c Sun Mar 25 18:37:41 2001
5258 +++ linux/net/socket.c Wed Aug 7 17:45:23 2002
5263 -int sock_wake_async(struct socket *sock, int how)
5264 +int sock_wake_async(struct socket *sock, int how, int band)
5266 if (!sock || !sock->fasync_list)
5268 @@ -563,8 +563,10 @@
5272 - kill_fasync(sock->fasync_list, SIGIO);
5273 + kill_fasync(sock->fasync_list, SIGIO, band);
5276 + kill_fasync(sock->fasync_list, SIGURG, band);
5280 diff -urN linux.orig/net/unix/af_unix.c linux/net/unix/af_unix.c
5281 --- linux.orig/net/unix/af_unix.c Tue May 21 01:32:35 2002
5282 +++ linux/net/unix/af_unix.c Wed Aug 7 17:47:52 2002
5283 @@ -1017,9 +1017,6 @@
5287 - err = -ECONNRESET;
5290 other = unix_find_other(sunaddr, namelen, sk->type, hash, &err);