home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / kernel-s / v1.2 / old-elf- / linux-1.001 / linux-1.2.8.elff.diff
Text File  |  1995-05-17  |  96KB  |  3,857 lines

  1. diff -c linux/linux/arch/i386/Makefile:1.1.1.1 linux/linux/arch/i386/Makefile:1.2
  2. *** linux/linux/arch/i386/Makefile:1.1.1.1    Wed May 17 23:57:19 1995
  3. --- linux/linux/arch/i386/Makefile    Wed May 17 23:57:19 1995
  4. ***************
  5. *** 1,4 ****
  6. --- 1,12 ----
  7.   #
  8. + # We use ELF.
  9. + #
  10. + USE_ELF=yes
  11. + #
  12. + # We use a.out.
  13. + #USE_ELF=no
  14. + #
  15.   # i386/Makefile
  16.   #
  17.   # This file is included by the global makefile so that you can add your own
  18. ***************
  19. *** 21,30 ****
  20. --- 29,55 ----
  21.   # ZLINKFLAGS   = -Ttext 0x1000
  22.   # LINKFLAGS    = -Ttext 0x100000
  23.   #
  24. + #
  25. + ifeq ($(USE_ELF),yes)
  26. + LD=ld -m elf_i386
  27. + CPP=$(CC) -E -D__ELF__
  28. + OBJDUMP =objdump
  29. + OBJDUMP_FLAGS=-k -q 
  30. + LDFLAGS=-e startup_32 
  31. + ZIMAGE_OFFSET=0x1000
  32. + IMAGE_OFFSET=0x100000
  33. + ZLINKFLAGS =-Ttext $(ZIMAGE_OFFSET) $(LDFLAGS)
  34. + LINKFLAGS =-Ttext $(IMAGE_OFFSET) $(LDFLAGS)
  35. + else
  36. + AS=/usr/i486-linuxaout/bin/as
  37. + LD=/usr/i486-linuxaout/bin/ld -m i386linux
  38. + CC=gcc -b i486-linuxaout -D__KERNEL__ -I$(TOPDIR)/include
  39. + #
  40.   # -qmagic (we need to remove the 32 byte header for bootup purposes)
  41.   #
  42.   ZLINKFLAGS =-qmagic -Ttext 0xfe0
  43.   LINKFLAGS =-qmagic -Ttext 0xfffe0
  44. + endif
  45.   CFLAGS := $(CFLAGS) -pipe
  46.   
  47.   ifdef CONFIG_M486
  48. diff -c linux/linux/arch/i386/boot/Makefile:1.1.1.1 linux/linux/arch/i386/boot/Makefile:1.2
  49. *** linux/linux/arch/i386/boot/Makefile:1.1.1.1    Wed May 17 23:57:19 1995
  50. --- linux/linux/arch/i386/boot/Makefile    Wed May 17 23:57:19 1995
  51. ***************
  52. *** 11,18 ****
  53. --- 11,27 ----
  54.   AS86    =as86 -0 -a
  55.   LD86    =ld86 -0
  56.   
  57. + ifeq ($(USE_ELF),yes)
  58. + CFLAGS := $(CFLAGS) -D__BFD__
  59. + endif
  60.   zImage: $(CONFIGURE) bootsect setup compressed/vmlinux tools/build
  61. + ifeq ($(USE_ELF),yes)
  62. +     $(OBJDUMP) $(OBJDUMP_FLAGS) -o $(ZIMAGE_OFFSET) compressed/vmlinux > compressed/vmlinux.out
  63. +     tools/build bootsect setup compressed/vmlinux.out $(ROOT_DEV) > zImage
  64. + else
  65.       tools/build bootsect setup compressed/vmlinux $(ROOT_DEV) > zImage
  66. + endif
  67.       sync
  68.   
  69.   compressed/vmlinux: $(TOPDIR)/vmlinux
  70. ***************
  71. *** 56,60 ****
  72.   
  73.   clean:
  74.       rm -f bootsect setup
  75. !     rm -f zImage tools/build
  76.       @$(MAKE) -C compressed clean
  77. --- 65,69 ----
  78.   
  79.   clean:
  80.       rm -f bootsect setup
  81. !     rm -f zImage tools/build compressed/vmlinux.out
  82.       @$(MAKE) -C compressed clean
  83. diff -c linux/linux/arch/i386/boot/compressed/Makefile:1.1.1.1 linux/linux/arch/i386/boot/compressed/Makefile:1.2
  84. *** linux/linux/arch/i386/boot/compressed/Makefile:1.1.1.1    Wed May 17 23:57:19 1995
  85. --- linux/linux/arch/i386/boot/compressed/Makefile    Wed May 17 23:57:19 1995
  86. ***************
  87. *** 11,16 ****
  88. --- 11,22 ----
  89.   
  90.   CFLAGS = -O2 -DSTDC_HEADERS
  91.   
  92. + ifeq ($(USE_ELF),yes)
  93. + TARGET=--target elf32-i386
  94. + INPUT_DATA=input_data
  95. + INPUT_LEN=input_len
  96. + endif
  97.   .c.s:
  98.       $(CC) $(CFLAGS) -S $<
  99.   .s.o:
  100. ***************
  101. *** 20,32 ****
  102.   
  103.   all: vmlinux
  104.   
  105. ! vmlinux:    piggy.o $(OBJECTS)
  106. !         $(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o
  107.   
  108. ! head.o:    head.s
  109.   
  110. ! head.s: head.S $(TOPDIR)/include/linux/tasks.h
  111. !     $(CPP) -traditional head.S -o head.s
  112.   
  113.   piggy.o:    $(SYSTEM) xtract piggyback
  114.           ./xtract $(SYSTEM) | gzip -9 | ./piggyback > piggy.o
  115. --- 26,51 ----
  116.   
  117.   all: vmlinux
  118.   
  119. ! vmlinux: piggy.o $(OBJECTS)
  120. !     $(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o
  121. ! #head.o:    head.s
  122.   
  123. ! head.o: head.S $(TOPDIR)/include/linux/tasks.h
  124. !     $(CC) -traditional -c head.S
  125.   
  126. ! ifeq ($(USE_ELF),yes)
  127. ! # You cannot compress a file and have the kernel uncompress it, it must
  128. ! # be stdin
  129. ! piggy.o:    $(SYSTEM)
  130. !     tmppiggy=/tmp/$$.piggy; \
  131. !     rm -f $$tmppiggy $$tmppiggy.gz; \
  132. !     $(OBJDUMP) $(OBJDUMP_FLAGS) -o $(IMAGE_OFFSET) $(SYSTEM) > $$tmppiggy; \
  133. !     gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
  134. !     encaps $(TARGET) piggy.o $$tmppiggy.gz $(INPUT_DATA) $(INPUT_LEN); \
  135. !     rm -f $$tmppiggy $$tmppiggy.gz
  136. ! else
  137.   
  138.   piggy.o:    $(SYSTEM) xtract piggyback
  139.           ./xtract $(SYSTEM) | gzip -9 | ./piggyback > piggy.o
  140. ***************
  141. *** 36,41 ****
  142. --- 55,62 ----
  143.   
  144.   piggyback: piggyback.c
  145.       $(HOSTCC) $(CFLAGS) -o piggyback piggyback.c
  146. + endif
  147.   
  148.   clean:
  149.       rm -f xtract piggyback vmlinux
  150. diff -c linux/linux/arch/i386/boot/compressed/head.S:1.1.1.1 linux/linux/arch/i386/boot/compressed/head.S:1.2
  151. *** linux/linux/arch/i386/boot/compressed/head.S:1.1.1.1    Wed May 17 23:57:20 1995
  152. --- linux/linux/arch/i386/boot/compressed/head.S    Wed May 17 23:57:20 1995
  153. ***************
  154. *** 19,26 ****
  155. --- 19,28 ----
  156.   .text
  157.   
  158.   #define __ASSEMBLY__
  159. + #include <linux/linkage.h>
  160.   #include <asm/segment.h>
  161.   
  162. +     .globl startup_32
  163.   startup_32:
  164.       cld
  165.       cli
  166. ***************
  167. *** 29,35 ****
  168.       mov %ax,%es
  169.       mov %ax,%fs
  170.       mov %ax,%gs
  171. !     lss _stack_start,%esp
  172.       xorl %eax,%eax
  173.   1:    incl %eax        # check that A20 really IS enabled
  174.       movl %eax,0x000000    # loop forever if it isn't
  175. --- 31,37 ----
  176.       mov %ax,%es
  177.       mov %ax,%fs
  178.       mov %ax,%gs
  179. !     lss SYMBOL_NAME(stack_start),%esp
  180.       xorl %eax,%eax
  181.   1:    incl %eax        # check that A20 really IS enabled
  182.       movl %eax,0x000000    # loop forever if it isn't
  183. ***************
  184. *** 46,53 ****
  185.    * Clear BSS
  186.    */
  187.       xorl %eax,%eax
  188. !     movl $__edata,%edi
  189. !     movl $__end,%ecx
  190.       subl %edi,%ecx
  191.       cld
  192.       rep
  193. --- 48,55 ----
  194.    * Clear BSS
  195.    */
  196.       xorl %eax,%eax
  197. !     movl $ SYMBOL_NAME(_edata),%edi
  198. !     movl $ SYMBOL_NAME(_end),%ecx
  199.       subl %edi,%ecx
  200.       cld
  201.       rep
  202. ***************
  203. *** 55,59 ****
  204.   /*
  205.    * Do the decompression, and jump to the new kernel..
  206.    */
  207. !     call _decompress_kernel
  208.       ljmp $(KERNEL_CS), $0x100000
  209. --- 57,61 ----
  210.   /*
  211.    * Do the decompression, and jump to the new kernel..
  212.    */
  213. !     call SYMBOL_NAME(decompress_kernel)
  214.       ljmp $(KERNEL_CS), $0x100000
  215. diff -c linux/linux/arch/i386/boot/tools/build.c:1.1.1.1 linux/linux/arch/i386/boot/tools/build.c:1.2
  216. *** linux/linux/arch/i386/boot/tools/build.c:1.1.1.1    Wed May 17 23:57:20 1995
  217. --- linux/linux/arch/i386/boot/tools/build.c    Wed May 17 23:57:20 1995
  218. ***************
  219. *** 30,40 ****
  220. --- 30,43 ----
  221.   #include <fcntl.h>
  222.   #include <linux/a.out.h>
  223.   #include <linux/config.h>
  224. + #include <errno.h>
  225.   
  226.   #define MINIX_HEADER 32
  227.   
  228.   #define N_MAGIC_OFFSET 1024
  229. + #ifndef __BFD__
  230.   static int GCC_HEADER = sizeof(struct exec);
  231. + #endif
  232.   
  233.   #define SYS_SIZE DEF_SYSSIZE
  234.   
  235. ***************
  236. *** 89,95 ****
  237. --- 92,100 ----
  238.       int i,c,id, sz;
  239.       unsigned long sys_size;
  240.       char buf[1024];
  241. + #ifndef __BFD__
  242.       struct exec *ex = (struct exec *)buf;
  243. + #endif
  244.       char major_root, minor_root;
  245.       struct stat sb;
  246.       unsigned char setup_sectors;
  247. ***************
  248. *** 190,195 ****
  249. --- 195,201 ----
  250.       
  251.       if ((id=open(argv[3],O_RDONLY,0))<0)
  252.           die("Unable to open 'system'");
  253. + #ifndef __BFD__
  254.       if (read(id,buf,GCC_HEADER) != GCC_HEADER)
  255.           die("Unable to read header of 'system'");
  256.       if (N_MAGIC(*ex) == ZMAGIC) {
  257. ***************
  258. *** 203,208 ****
  259. --- 209,222 ----
  260.           ex->a_data /1024,
  261.           ex->a_bss  /1024);
  262.       sz = N_SYMOFF(*ex) - GCC_HEADER + 4;
  263. + #else
  264. +     if (fstat (id, &sb)) {
  265. +       perror ("fstat");
  266. +       die ("Unable to stat 'system'");
  267. +     }
  268. +     sz = sb.st_size;
  269. +     fprintf (stderr, "System is %d kB\n", sz/1024);
  270. + #endif
  271.       sys_size = (sz + 15) / 16;
  272.       if (sys_size > SYS_SIZE)
  273.           die("System is too big");
  274. diff -c linux/linux/arch/i386/ibcs/Makefile:1.1.1.1 linux/linux/arch/i386/ibcs/Makefile:1.2
  275. *** linux/linux/arch/i386/ibcs/Makefile:1.1.1.1    Wed May 17 23:57:20 1995
  276. --- linux/linux/arch/i386/ibcs/Makefile    Wed May 17 23:57:20 1995
  277. ***************
  278. *** 7,12 ****
  279. --- 7,14 ----
  280.   #
  281.   # Note 2! The CFLAGS definitions are now in the main makefile...
  282.   
  283. + .S.o:
  284. +     $(CC) $(CFLAGS) -c -traditional $< -o $*.s
  285.   .S.s:
  286.       $(CPP) -traditional $< -o $*.s
  287.   .c.s:
  288. diff -c linux/linux/arch/i386/kernel/Makefile:1.1.1.1 linux/linux/arch/i386/kernel/Makefile:1.2
  289. *** linux/linux/arch/i386/kernel/Makefile:1.1.1.1    Wed May 17 23:57:20 1995
  290. --- linux/linux/arch/i386/kernel/Makefile    Wed May 17 23:57:20 1995
  291. ***************
  292. *** 13,20 ****
  293.       $(AS) -o $*.o $<
  294.   .c.o:
  295.       $(CC) $(CFLAGS) -c $<
  296. ! .S.s:
  297. !     $(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
  298.   .S.o:
  299.       $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
  300.   
  301. --- 13,20 ----
  302.       $(AS) -o $*.o $<
  303.   .c.o:
  304.       $(CC) $(CFLAGS) -c $<
  305. ! #.S.s:
  306. ! #    $(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
  307.   .S.o:
  308.       $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
  309.   
  310. ***************
  311. *** 22,31 ****
  312.   
  313.   all: kernel.o head.o
  314.   
  315. ! head.o: head.s
  316.   
  317. ! head.s: head.S $(TOPDIR)/include/linux/tasks.h
  318. !     $(CPP) -traditional -o $*.s $<
  319.   
  320.   kernel.o: $(OBJS)
  321.       $(LD) -r -o kernel.o $(OBJS)
  322. --- 22,32 ----
  323.   
  324.   all: kernel.o head.o
  325.   
  326. ! #head.o: head.s
  327.   
  328. ! head.o: head.S $(TOPDIR)/include/linux/tasks.h
  329. !     $(CC) -D__ASSEMBLY__ -traditional -c $*.S -o $*.o
  330. ! #    $(CPP) -traditional -o $*.s $<
  331.   
  332.   kernel.o: $(OBJS)
  333.       $(LD) -r -o kernel.o $(OBJS)
  334. diff -c linux/linux/arch/i386/kernel/entry.S:1.1.1.1 linux/linux/arch/i386/kernel/entry.S:1.2
  335. *** linux/linux/arch/i386/kernel/entry.S:1.1.1.1    Wed May 17 23:57:20 1995
  336. --- linux/linux/arch/i386/kernel/entry.S    Wed May 17 23:57:20 1995
  337. ***************
  338. *** 41,46 ****
  339. --- 41,47 ----
  340.    */
  341.   
  342.   #include <linux/sys.h>
  343. + #include <linux/linkage.h>
  344.   #include <asm/segment.h>
  345.   
  346.   EBX        = 0x00
  347. ***************
  348. *** 82,96 ****
  349.   
  350.   ENOSYS = 38
  351.   
  352. - .globl _system_call,_lcall7
  353. - .globl _device_not_available, _coprocessor_error
  354. - .globl _divide_error,_debug,_nmi,_int3,_overflow,_bounds,_invalid_op
  355. - .globl _double_fault,_coprocessor_segment_overrun
  356. - .globl _invalid_TSS,_segment_not_present,_stack_segment
  357. - .globl _general_protection,_reserved
  358. - .globl _alignment_check,_page_fault
  359. - .globl ret_from_sys_call, _sys_call_table
  360.   #define SAVE_ALL \
  361.       cld; \
  362.       push %gs; \
  363. --- 83,88 ----
  364. ***************
  365. *** 113,119 ****
  366.   #define RESTORE_ALL \
  367.       cmpw $(KERNEL_CS),CS(%esp); \
  368.       je 1f;   \
  369. !     movl _current,%eax; \
  370.       movl dbgreg7(%eax),%ebx; \
  371.       movl %ebx,%db7;    \
  372.   1:    popl %ebx; \
  373. --- 105,111 ----
  374.   #define RESTORE_ALL \
  375.       cmpw $(KERNEL_CS),CS(%esp); \
  376.       je 1f;   \
  377. !     movl SYMBOL_NAME(current),%eax; \
  378.       movl dbgreg7(%eax),%ebx; \
  379.       movl %ebx,%db7;    \
  380.   1:    popl %ebx; \
  381. ***************
  382. *** 130,137 ****
  383.       addl $4,%esp; \
  384.       iret
  385.   
  386. ! .align 4
  387. ! _lcall7:
  388.       pushfl            # We get a different stack layout with call gates,
  389.       pushl %eax        # which has to be cleaned up later..
  390.       SAVE_ALL
  391. --- 122,128 ----
  392.       addl $4,%esp; \
  393.       iret
  394.   
  395. ! ENTRY(lcall7)
  396.       pushfl            # We get a different stack layout with call gates,
  397.       pushl %eax        # which has to be cleaned up later..
  398.       SAVE_ALL
  399. ***************
  400. *** 142,148 ****
  401.       movl %edx,EIP(%esp)    # Now we move them to their "normal" places
  402.       movl %ecx,CS(%esp)    #
  403.       movl %esp,%eax
  404. !     movl _current,%edx
  405.       pushl %eax
  406.       movl exec_domain(%edx),%edx    # Get the execution domain
  407.       movl 4(%edx),%edx    # Get the lcall7 handler for the domain
  408. --- 133,139 ----
  409.       movl %edx,EIP(%esp)    # Now we move them to their "normal" places
  410.       movl %ecx,CS(%esp)    #
  411.       movl %esp,%eax
  412. !     movl SYMBOL_NAME(current),%edx
  413.       pushl %eax
  414.       movl exec_domain(%edx),%edx    # Get the execution domain
  415.       movl 4(%edx),%edx    # Get the lcall7 handler for the domain
  416. ***************
  417. *** 150,179 ****
  418.       popl %eax
  419.       jmp ret_from_sys_call
  420.   
  421. ! .align 4
  422.   handle_bottom_half:
  423.       pushfl
  424. !     incl _intr_count
  425.       sti
  426. !     call _do_bottom_half
  427.       popfl
  428. !     decl _intr_count
  429.       jmp 9f
  430. ! .align 4
  431.   reschedule:
  432.       pushl $ret_from_sys_call
  433. !     jmp _schedule
  434. ! .align 4
  435. ! _system_call:
  436.       pushl %eax            # save orig_eax
  437.       SAVE_ALL
  438.       movl $-ENOSYS,EAX(%esp)
  439.       cmpl $(NR_syscalls),%eax
  440.       jae ret_from_sys_call
  441. !     movl _sys_call_table(,%eax,4),%eax
  442.       testl %eax,%eax
  443.       je ret_from_sys_call
  444. !     movl _current,%ebx
  445.       andl $~CF_MASK,EFLAGS(%esp)    # clear carry - assume no errors
  446.       movl $0,errno(%ebx)
  447.       movl %db6,%edx
  448. --- 141,170 ----
  449.       popl %eax
  450.       jmp ret_from_sys_call
  451.   
  452. !     ALIGN
  453.   handle_bottom_half:
  454.       pushfl
  455. !     incl SYMBOL_NAME(intr_count)
  456.       sti
  457. !     call SYMBOL_NAME(do_bottom_half)
  458.       popfl
  459. !     decl SYMBOL_NAME(intr_count)
  460.       jmp 9f
  461. !     ALIGN
  462.   reschedule:
  463.       pushl $ret_from_sys_call
  464. !     jmp SYMBOL_NAME(schedule)
  465. ! ENTRY(system_call)
  466.       pushl %eax            # save orig_eax
  467.       SAVE_ALL
  468.       movl $-ENOSYS,EAX(%esp)
  469.       cmpl $(NR_syscalls),%eax
  470.       jae ret_from_sys_call
  471. !     movl SYMBOL_NAME(sys_call_table)(,%eax,4),%eax
  472.       testl %eax,%eax
  473.       je ret_from_sys_call
  474. !     movl SYMBOL_NAME(current),%ebx
  475.       andl $~CF_MASK,EFLAGS(%esp)    # clear carry - assume no errors
  476.       movl $0,errno(%ebx)
  477.       movl %db6,%edx
  478. ***************
  479. *** 188,212 ****
  480.       movl %edx,EAX(%esp)
  481.       orl $(CF_MASK),EFLAGS(%esp)    # set carry to indicate error
  482.       jmp ret_from_sys_call
  483. ! .align 4
  484. ! 1:    call _syscall_trace
  485.       movl ORIG_EAX(%esp),%eax
  486. !     call _sys_call_table(,%eax,4)
  487.       movl %eax,EAX(%esp)        # save the return value
  488. !     movl _current,%eax
  489.       movl errno(%eax),%edx
  490.       negl %edx
  491.       je 1f
  492.       movl %edx,EAX(%esp)
  493.       orl $(CF_MASK),EFLAGS(%esp)    # set carry to indicate error
  494. ! 1:    call _syscall_trace
  495.   
  496. !     .align 4,0x90
  497.   ret_from_sys_call:
  498. !     cmpl $0,_intr_count
  499.       jne 2f
  500. ! 9:    movl _bh_mask,%eax
  501. !     andl _bh_active,%eax
  502.       jne handle_bottom_half
  503.       movl EFLAGS(%esp),%eax        # check VM86 flag: CS/SS are
  504.       testl $(VM_MASK),%eax        # different then
  505. --- 179,204 ----
  506.       movl %edx,EAX(%esp)
  507.       orl $(CF_MASK),EFLAGS(%esp)    # set carry to indicate error
  508.       jmp ret_from_sys_call
  509. !     ALIGN
  510. ! 1:    call SYMBOL_NAME(syscall_trace)
  511.       movl ORIG_EAX(%esp),%eax
  512. !     call SYMBOL_NAME(sys_call_table)(,%eax,4)
  513.       movl %eax,EAX(%esp)        # save the return value
  514. !     movl SYMBOL_NAME(current),%eax
  515.       movl errno(%eax),%edx
  516.       negl %edx
  517.       je 1f
  518.       movl %edx,EAX(%esp)
  519.       orl $(CF_MASK),EFLAGS(%esp)    # set carry to indicate error
  520. ! 1:    call SYMBOL_NAME(syscall_trace)
  521.   
  522. !     ALIGN
  523. !     .globl ret_from_sys_call
  524.   ret_from_sys_call:
  525. !     cmpl $0,SYMBOL_NAME(intr_count)
  526.       jne 2f
  527. ! 9:    movl SYMBOL_NAME(bh_mask),%eax
  528. !     andl SYMBOL_NAME(bh_active),%eax
  529.       jne handle_bottom_half
  530.       movl EFLAGS(%esp),%eax        # check VM86 flag: CS/SS are
  531.       testl $(VM_MASK),%eax        # different then
  532. ***************
  533. *** 217,226 ****
  534.       orl $(IF_MASK),%eax        # these just try to make sure
  535.       andl $~NT_MASK,%eax        # the program doesn't do anything
  536.       movl %eax,EFLAGS(%esp)        # stupid
  537. !     cmpl $0,_need_resched
  538.       jne reschedule
  539. !     movl _current,%eax
  540. !     cmpl _task,%eax            # task[0] cannot have signals
  541.       je 2f
  542.       cmpl $0,state(%eax)        # state
  543.       jne reschedule
  544. --- 209,218 ----
  545.       orl $(IF_MASK),%eax        # these just try to make sure
  546.       andl $~NT_MASK,%eax        # the program doesn't do anything
  547.       movl %eax,EFLAGS(%esp)        # stupid
  548. !     cmpl $0,SYMBOL_NAME(need_resched)
  549.       jne reschedule
  550. !     movl SYMBOL_NAME(current),%eax
  551. !     cmpl SYMBOL_NAME(task),%eax    # task[0] cannot have signals
  552.       je 2f
  553.       cmpl $0,state(%eax)        # state
  554.       jne reschedule
  555. ***************
  556. *** 232,264 ****
  557.       andl signal(%eax),%ecx
  558.       jne signal_return
  559.   2:    RESTORE_ALL
  560. ! .align 4
  561.   signal_return:
  562.       movl %esp,%ecx
  563.       pushl %ecx
  564.       testl $(VM_MASK),EFLAGS(%ecx)
  565.       jne v86_signal_return
  566.       pushl %ebx
  567. !     call _do_signal
  568.       popl %ebx
  569.       popl %ebx
  570.       RESTORE_ALL
  571. ! .align 4
  572.   v86_signal_return:
  573. !     call _save_v86_state
  574.       movl %eax,%esp
  575.       pushl %eax
  576.       pushl %ebx
  577. !     call _do_signal
  578.       popl %ebx
  579.       popl %ebx
  580.       RESTORE_ALL
  581.   
  582. ! .align 4
  583. ! _divide_error:
  584.       pushl $0        # no error code
  585. !     pushl $_do_divide_error
  586. ! .align 4,0x90
  587.   error_code:
  588.       push %fs
  589.       push %es
  590. --- 224,255 ----
  591.       andl signal(%eax),%ecx
  592.       jne signal_return
  593.   2:    RESTORE_ALL
  594. !     ALIGN
  595.   signal_return:
  596.       movl %esp,%ecx
  597.       pushl %ecx
  598.       testl $(VM_MASK),EFLAGS(%ecx)
  599.       jne v86_signal_return
  600.       pushl %ebx
  601. !     call SYMBOL_NAME(do_signal)
  602.       popl %ebx
  603.       popl %ebx
  604.       RESTORE_ALL
  605. !     ALIGN
  606.   v86_signal_return:
  607. !     call SYMBOL_NAME(save_v86_state)
  608.       movl %eax,%esp
  609.       pushl %eax
  610.       pushl %ebx
  611. !     call SYMBOL_NAME(do_signal)
  612.       popl %ebx
  613.       popl %ebx
  614.       RESTORE_ALL
  615.   
  616. ! ENTRY(divide_error)
  617.       pushl $0        # no error code
  618. !     pushl $ SYMBOL_NAME(do_divide_error)
  619. !     ALIGN
  620.   error_code:
  621.       push %fs
  622.       push %es
  623. ***************
  624. *** 287,293 ****
  625.       movl $(USER_DS),%edx
  626.       mov %dx,%fs
  627.       pushl %eax
  628. !     movl _current,%eax
  629.       movl %db6,%edx
  630.       movl %edx,dbgreg6(%eax)  # save current hardware debugging status
  631.       popl %eax
  632. --- 278,284 ----
  633.       movl $(USER_DS),%edx
  634.       mov %dx,%fs
  635.       pushl %eax
  636. !     movl SYMBOL_NAME(current),%eax
  637.       movl %db6,%edx
  638.       movl %edx,dbgreg6(%eax)  # save current hardware debugging status
  639.       popl %eax
  640. ***************
  641. *** 295,544 ****
  642.       addl $8,%esp
  643.       jmp ret_from_sys_call
  644.   
  645. ! .align 4
  646. ! _coprocessor_error:
  647.       pushl $0
  648. !     pushl $_do_coprocessor_error
  649.       jmp error_code
  650.   
  651. ! .align 4
  652. ! _device_not_available:
  653.       pushl $-1        # mark this as an int
  654.       SAVE_ALL
  655.       pushl $ret_from_sys_call
  656.       movl %cr0,%eax
  657.       testl $0x4,%eax            # EM (math emulation bit)
  658. !     je _math_state_restore
  659.       pushl $0        # temporary storage for ORIG_EIP
  660. !     call _math_emulate
  661.       addl $4,%esp
  662.       ret
  663.   
  664. ! .align 4
  665. ! _debug:
  666.       pushl $0
  667. !     pushl $_do_debug
  668.       jmp error_code
  669.   
  670. ! .align 4
  671. ! _nmi:
  672.       pushl $0
  673. !     pushl $_do_nmi
  674.       jmp error_code
  675.   
  676. ! .align 4
  677. ! _int3:
  678.       pushl $0
  679. !     pushl $_do_int3
  680.       jmp error_code
  681.   
  682. ! .align 4
  683. ! _overflow:
  684.       pushl $0
  685. !     pushl $_do_overflow
  686.       jmp error_code
  687.   
  688. ! .align 4
  689. ! _bounds:
  690.       pushl $0
  691. !     pushl $_do_bounds
  692.       jmp error_code
  693.   
  694. ! .align 4
  695. ! _invalid_op:
  696.       pushl $0
  697. !     pushl $_do_invalid_op
  698.       jmp error_code
  699.   
  700. ! .align 4
  701. ! _coprocessor_segment_overrun:
  702.       pushl $0
  703. !     pushl $_do_coprocessor_segment_overrun
  704.       jmp error_code
  705.   
  706. ! .align 4
  707. ! _reserved:
  708.       pushl $0
  709. !     pushl $_do_reserved
  710.       jmp error_code
  711.   
  712. ! .align 4
  713. ! _double_fault:
  714. !     pushl $_do_double_fault
  715.       jmp error_code
  716.   
  717. ! .align 4
  718. ! _invalid_TSS:
  719. !     pushl $_do_invalid_TSS
  720.       jmp error_code
  721.   
  722. ! .align 4
  723. ! _segment_not_present:
  724. !     pushl $_do_segment_not_present
  725.       jmp error_code
  726.   
  727. ! .align 4
  728. ! _stack_segment:
  729. !     pushl $_do_stack_segment
  730.       jmp error_code
  731.   
  732. ! .align 4
  733. ! _general_protection:
  734. !     pushl $_do_general_protection
  735.       jmp error_code
  736.   
  737. ! .align 4
  738. ! _alignment_check:
  739. !     pushl $_do_alignment_check
  740.       jmp error_code
  741.   
  742. ! .align 4
  743. ! _page_fault:
  744. !     pushl $_do_page_fault
  745.       jmp error_code
  746.   
  747.   .data
  748. ! .align 4
  749. ! _sys_call_table:
  750. !     .long _sys_setup        /* 0 */
  751. !     .long _sys_exit
  752. !     .long _sys_fork
  753. !     .long _sys_read
  754. !     .long _sys_write
  755. !     .long _sys_open            /* 5 */
  756. !     .long _sys_close
  757. !     .long _sys_waitpid
  758. !     .long _sys_creat
  759. !     .long _sys_link
  760. !     .long _sys_unlink        /* 10 */
  761. !     .long _sys_execve
  762. !     .long _sys_chdir
  763. !     .long _sys_time
  764. !     .long _sys_mknod
  765. !     .long _sys_chmod        /* 15 */
  766. !     .long _sys_chown
  767. !     .long _sys_break
  768. !     .long _sys_stat
  769. !     .long _sys_lseek
  770. !     .long _sys_getpid        /* 20 */
  771. !     .long _sys_mount
  772. !     .long _sys_umount
  773. !     .long _sys_setuid
  774. !     .long _sys_getuid
  775. !     .long _sys_stime        /* 25 */
  776. !     .long _sys_ptrace
  777. !     .long _sys_alarm
  778. !     .long _sys_fstat
  779. !     .long _sys_pause
  780. !     .long _sys_utime        /* 30 */
  781. !     .long _sys_stty
  782. !     .long _sys_gtty
  783. !     .long _sys_access
  784. !     .long _sys_nice
  785. !     .long _sys_ftime        /* 35 */
  786. !     .long _sys_sync
  787. !     .long _sys_kill
  788. !     .long _sys_rename
  789. !     .long _sys_mkdir
  790. !     .long _sys_rmdir        /* 40 */
  791. !     .long _sys_dup
  792. !     .long _sys_pipe
  793. !     .long _sys_times
  794. !     .long _sys_prof
  795. !     .long _sys_brk            /* 45 */
  796. !     .long _sys_setgid
  797. !     .long _sys_getgid
  798. !     .long _sys_signal
  799. !     .long _sys_geteuid
  800. !     .long _sys_getegid        /* 50 */
  801. !     .long _sys_acct
  802. !     .long _sys_phys
  803. !     .long _sys_lock
  804. !     .long _sys_ioctl
  805. !     .long _sys_fcntl        /* 55 */
  806. !     .long _sys_mpx
  807. !     .long _sys_setpgid
  808. !     .long _sys_ulimit
  809. !     .long _sys_olduname
  810. !     .long _sys_umask        /* 60 */
  811. !     .long _sys_chroot
  812. !     .long _sys_ustat
  813. !     .long _sys_dup2
  814. !     .long _sys_getppid
  815. !     .long _sys_getpgrp        /* 65 */
  816. !     .long _sys_setsid
  817. !     .long _sys_sigaction
  818. !     .long _sys_sgetmask
  819. !     .long _sys_ssetmask
  820. !     .long _sys_setreuid        /* 70 */
  821. !     .long _sys_setregid
  822. !     .long _sys_sigsuspend
  823. !     .long _sys_sigpending
  824. !     .long _sys_sethostname
  825. !     .long _sys_setrlimit        /* 75 */
  826. !     .long _sys_getrlimit
  827. !     .long _sys_getrusage
  828. !     .long _sys_gettimeofday
  829. !     .long _sys_settimeofday
  830. !     .long _sys_getgroups        /* 80 */
  831. !     .long _sys_setgroups
  832. !     .long _sys_select
  833. !     .long _sys_symlink
  834. !     .long _sys_lstat
  835. !     .long _sys_readlink        /* 85 */
  836. !     .long _sys_uselib
  837. !     .long _sys_swapon
  838. !     .long _sys_reboot
  839. !     .long _sys_readdir
  840. !     .long _sys_mmap            /* 90 */
  841. !     .long _sys_munmap
  842. !     .long _sys_truncate
  843. !     .long _sys_ftruncate
  844. !     .long _sys_fchmod
  845. !     .long _sys_fchown        /* 95 */
  846. !     .long _sys_getpriority
  847. !     .long _sys_setpriority
  848. !     .long _sys_profil
  849. !     .long _sys_statfs
  850. !     .long _sys_fstatfs        /* 100 */
  851. !     .long _sys_ioperm
  852. !     .long _sys_socketcall
  853. !     .long _sys_syslog
  854. !     .long _sys_setitimer
  855. !     .long _sys_getitimer        /* 105 */
  856. !     .long _sys_newstat
  857. !     .long _sys_newlstat
  858. !     .long _sys_newfstat
  859. !     .long _sys_uname
  860. !     .long _sys_iopl            /* 110 */
  861. !     .long _sys_vhangup
  862. !     .long _sys_idle
  863. !     .long _sys_vm86
  864. !     .long _sys_wait4
  865. !     .long _sys_swapoff        /* 115 */
  866. !     .long _sys_sysinfo
  867. !     .long _sys_ipc
  868. !     .long _sys_fsync
  869. !     .long _sys_sigreturn
  870. !     .long _sys_clone        /* 120 */
  871. !     .long _sys_setdomainname
  872. !     .long _sys_newuname
  873. !     .long _sys_modify_ldt
  874. !     .long _sys_adjtimex
  875. !     .long _sys_mprotect        /* 125 */
  876. !     .long _sys_sigprocmask
  877. !     .long _sys_create_module
  878. !     .long _sys_init_module
  879. !     .long _sys_delete_module
  880. !     .long _sys_get_kernel_syms    /* 130 */
  881. !     .long _sys_quotactl
  882. !     .long _sys_getpgid
  883. !     .long _sys_fchdir
  884. !     .long _sys_bdflush
  885. !     .long _sys_sysfs        /* 135 */
  886. !     .long _sys_personality
  887.       .long 0                /* for afs_syscall */
  888. !     .long _sys_setfsuid
  889. !     .long _sys_setfsgid
  890. !     .long _sys_llseek        /* 140 */
  891.       .space (NR_syscalls-140)*4
  892. --- 286,517 ----
  893.       addl $8,%esp
  894.       jmp ret_from_sys_call
  895.   
  896. ! ENTRY(coprocessor_error)
  897.       pushl $0
  898. !     pushl $ SYMBOL_NAME(do_coprocessor_error)
  899.       jmp error_code
  900.   
  901. ! ENTRY(device_not_available)
  902.       pushl $-1        # mark this as an int
  903.       SAVE_ALL
  904.       pushl $ret_from_sys_call
  905.       movl %cr0,%eax
  906.       testl $0x4,%eax            # EM (math emulation bit)
  907. !     je  SYMBOL_NAME(math_state_restore)
  908.       pushl $0        # temporary storage for ORIG_EIP
  909. !     call  SYMBOL_NAME(math_emulate)
  910.       addl $4,%esp
  911.       ret
  912.   
  913. ! ENTRY(debug)
  914.       pushl $0
  915. !     pushl $ SYMBOL_NAME(do_debug)
  916.       jmp error_code
  917.   
  918. ! ENTRY(nmi)
  919.       pushl $0
  920. !     pushl $ SYMBOL_NAME(do_nmi)
  921.       jmp error_code
  922.   
  923. ! ENTRY(int3)
  924.       pushl $0
  925. !     pushl $ SYMBOL_NAME(do_int3)
  926.       jmp error_code
  927.   
  928. ! ENTRY(overflow)
  929.       pushl $0
  930. !     pushl $ SYMBOL_NAME(do_overflow)
  931.       jmp error_code
  932.   
  933. ! ENTRY(bounds)
  934.       pushl $0
  935. !     pushl $ SYMBOL_NAME(do_bounds)
  936.       jmp error_code
  937.   
  938. ! ENTRY(invalid_op)
  939.       pushl $0
  940. !     pushl $ SYMBOL_NAME(do_invalid_op)
  941.       jmp error_code
  942.   
  943. ! ENTRY(coprocessor_segment_overrun)
  944.       pushl $0
  945. !     pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
  946.       jmp error_code
  947.   
  948. ! ENTRY(reserved)
  949.       pushl $0
  950. !     pushl $ SYMBOL_NAME(do_reserved)
  951.       jmp error_code
  952.   
  953. ! ENTRY(double_fault)
  954. !     pushl $ SYMBOL_NAME(do_double_fault)
  955.       jmp error_code
  956.   
  957. ! ENTRY(invalid_TSS)
  958. !     pushl $ SYMBOL_NAME(do_invalid_TSS)
  959.       jmp error_code
  960.   
  961. ! ENTRY(segment_not_present)
  962. !     pushl $ SYMBOL_NAME(do_segment_not_present)
  963.       jmp error_code
  964.   
  965. ! ENTRY(stack_segment)
  966. !     pushl $ SYMBOL_NAME(do_stack_segment)
  967.       jmp error_code
  968.   
  969. ! ENTRY(general_protection)
  970. !     pushl $ SYMBOL_NAME(do_general_protection)
  971.       jmp error_code
  972.   
  973. ! ENTRY(alignment_check)
  974. !     pushl $ SYMBOL_NAME(do_alignment_check)
  975.       jmp error_code
  976.   
  977. ! ENTRY(page_fault)
  978. !     pushl $ SYMBOL_NAME(do_page_fault)
  979.       jmp error_code
  980.   
  981.   .data
  982. ! ENTRY(sys_call_table)
  983. !     .long SYMBOL_NAME(sys_setup)        /* 0 */
  984. !     .long SYMBOL_NAME(sys_exit)
  985. !     .long SYMBOL_NAME(sys_fork)
  986. !     .long SYMBOL_NAME(sys_read)
  987. !     .long SYMBOL_NAME(sys_write)
  988. !     .long SYMBOL_NAME(sys_open)        /* 5 */
  989. !     .long SYMBOL_NAME(sys_close)
  990. !     .long SYMBOL_NAME(sys_waitpid)
  991. !     .long SYMBOL_NAME(sys_creat)
  992. !     .long SYMBOL_NAME(sys_link)
  993. !     .long SYMBOL_NAME(sys_unlink)        /* 10 */
  994. !     .long SYMBOL_NAME(sys_execve)
  995. !     .long SYMBOL_NAME(sys_chdir)
  996. !     .long SYMBOL_NAME(sys_time)
  997. !     .long SYMBOL_NAME(sys_mknod)
  998. !     .long SYMBOL_NAME(sys_chmod)        /* 15 */
  999. !     .long SYMBOL_NAME(sys_chown)
  1000. !     .long SYMBOL_NAME(sys_break)
  1001. !     .long SYMBOL_NAME(sys_stat)
  1002. !     .long SYMBOL_NAME(sys_lseek)
  1003. !     .long SYMBOL_NAME(sys_getpid)        /* 20 */
  1004. !     .long SYMBOL_NAME(sys_mount)
  1005. !     .long SYMBOL_NAME(sys_umount)
  1006. !     .long SYMBOL_NAME(sys_setuid)
  1007. !     .long SYMBOL_NAME(sys_getuid)
  1008. !     .long SYMBOL_NAME(sys_stime)        /* 25 */
  1009. !     .long SYMBOL_NAME(sys_ptrace)
  1010. !     .long SYMBOL_NAME(sys_alarm)
  1011. !     .long SYMBOL_NAME(sys_fstat)
  1012. !     .long SYMBOL_NAME(sys_pause)
  1013. !     .long SYMBOL_NAME(sys_utime)        /* 30 */
  1014. !     .long SYMBOL_NAME(sys_stty)
  1015. !     .long SYMBOL_NAME(sys_gtty)
  1016. !     .long SYMBOL_NAME(sys_access)
  1017. !     .long SYMBOL_NAME(sys_nice)
  1018. !     .long SYMBOL_NAME(sys_ftime)        /* 35 */
  1019. !     .long SYMBOL_NAME(sys_sync)
  1020. !     .long SYMBOL_NAME(sys_kill)
  1021. !     .long SYMBOL_NAME(sys_rename)
  1022. !     .long SYMBOL_NAME(sys_mkdir)
  1023. !     .long SYMBOL_NAME(sys_rmdir)        /* 40 */
  1024. !     .long SYMBOL_NAME(sys_dup)
  1025. !     .long SYMBOL_NAME(sys_pipe)
  1026. !     .long SYMBOL_NAME(sys_times)
  1027. !     .long SYMBOL_NAME(sys_prof)
  1028. !     .long SYMBOL_NAME(sys_brk)        /* 45 */
  1029. !     .long SYMBOL_NAME(sys_setgid)
  1030. !     .long SYMBOL_NAME(sys_getgid)
  1031. !     .long SYMBOL_NAME(sys_signal)
  1032. !     .long SYMBOL_NAME(sys_geteuid)
  1033. !     .long SYMBOL_NAME(sys_getegid)        /* 50 */
  1034. !     .long SYMBOL_NAME(sys_acct)
  1035. !     .long SYMBOL_NAME(sys_phys)
  1036. !     .long SYMBOL_NAME(sys_lock)
  1037. !     .long SYMBOL_NAME(sys_ioctl)
  1038. !     .long SYMBOL_NAME(sys_fcntl)        /* 55 */
  1039. !     .long SYMBOL_NAME(sys_mpx)
  1040. !     .long SYMBOL_NAME(sys_setpgid)
  1041. !     .long SYMBOL_NAME(sys_ulimit)
  1042. !     .long SYMBOL_NAME(sys_olduname)
  1043. !     .long SYMBOL_NAME(sys_umask)        /* 60 */
  1044. !     .long SYMBOL_NAME(sys_chroot)
  1045. !     .long SYMBOL_NAME(sys_ustat)
  1046. !     .long SYMBOL_NAME(sys_dup2)
  1047. !     .long SYMBOL_NAME(sys_getppid)
  1048. !     .long SYMBOL_NAME(sys_getpgrp)        /* 65 */
  1049. !     .long SYMBOL_NAME(sys_setsid)
  1050. !     .long SYMBOL_NAME(sys_sigaction)
  1051. !     .long SYMBOL_NAME(sys_sgetmask)
  1052. !     .long SYMBOL_NAME(sys_ssetmask)
  1053. !     .long SYMBOL_NAME(sys_setreuid)        /* 70 */
  1054. !     .long SYMBOL_NAME(sys_setregid)
  1055. !     .long SYMBOL_NAME(sys_sigsuspend)
  1056. !     .long SYMBOL_NAME(sys_sigpending)
  1057. !     .long SYMBOL_NAME(sys_sethostname)
  1058. !     .long SYMBOL_NAME(sys_setrlimit)    /* 75 */
  1059. !     .long SYMBOL_NAME(sys_getrlimit)
  1060. !     .long SYMBOL_NAME(sys_getrusage)
  1061. !     .long SYMBOL_NAME(sys_gettimeofday)
  1062. !     .long SYMBOL_NAME(sys_settimeofday)
  1063. !     .long SYMBOL_NAME(sys_getgroups)    /* 80 */
  1064. !     .long SYMBOL_NAME(sys_setgroups)
  1065. !     .long SYMBOL_NAME(sys_select)
  1066. !     .long SYMBOL_NAME(sys_symlink)
  1067. !     .long SYMBOL_NAME(sys_lstat)
  1068. !     .long SYMBOL_NAME(sys_readlink)        /* 85 */
  1069. !     .long SYMBOL_NAME(sys_uselib)
  1070. !     .long SYMBOL_NAME(sys_swapon)
  1071. !     .long SYMBOL_NAME(sys_reboot)
  1072. !     .long SYMBOL_NAME(sys_readdir)
  1073. !     .long SYMBOL_NAME(sys_mmap)        /* 90 */
  1074. !     .long SYMBOL_NAME(sys_munmap)
  1075. !     .long SYMBOL_NAME(sys_truncate)
  1076. !     .long SYMBOL_NAME(sys_ftruncate)
  1077. !     .long SYMBOL_NAME(sys_fchmod)
  1078. !     .long SYMBOL_NAME(sys_fchown)        /* 95 */
  1079. !     .long SYMBOL_NAME(sys_getpriority)
  1080. !     .long SYMBOL_NAME(sys_setpriority)
  1081. !     .long SYMBOL_NAME(sys_profil)
  1082. !     .long SYMBOL_NAME(sys_statfs)
  1083. !     .long SYMBOL_NAME(sys_fstatfs)        /* 100 */
  1084. !     .long SYMBOL_NAME(sys_ioperm)
  1085. !     .long SYMBOL_NAME(sys_socketcall)
  1086. !     .long SYMBOL_NAME(sys_syslog)
  1087. !     .long SYMBOL_NAME(sys_setitimer)
  1088. !     .long SYMBOL_NAME(sys_getitimer)    /* 105 */
  1089. !     .long SYMBOL_NAME(sys_newstat)
  1090. !     .long SYMBOL_NAME(sys_newlstat)
  1091. !     .long SYMBOL_NAME(sys_newfstat)
  1092. !     .long SYMBOL_NAME(sys_uname)
  1093. !     .long SYMBOL_NAME(sys_iopl)        /* 110 */
  1094. !     .long SYMBOL_NAME(sys_vhangup)
  1095. !     .long SYMBOL_NAME(sys_idle)
  1096. !     .long SYMBOL_NAME(sys_vm86)
  1097. !     .long SYMBOL_NAME(sys_wait4)
  1098. !     .long SYMBOL_NAME(sys_swapoff)        /* 115 */
  1099. !     .long SYMBOL_NAME(sys_sysinfo)
  1100. !     .long SYMBOL_NAME(sys_ipc)
  1101. !     .long SYMBOL_NAME(sys_fsync)
  1102. !     .long SYMBOL_NAME(sys_sigreturn)
  1103. !     .long SYMBOL_NAME(sys_clone)        /* 120 */
  1104. !     .long SYMBOL_NAME(sys_setdomainname)
  1105. !     .long SYMBOL_NAME(sys_newuname)
  1106. !     .long SYMBOL_NAME(sys_modify_ldt)
  1107. !     .long SYMBOL_NAME(sys_adjtimex)
  1108. !     .long SYMBOL_NAME(sys_mprotect)        /* 125 */
  1109. !     .long SYMBOL_NAME(sys_sigprocmask)
  1110. !     .long SYMBOL_NAME(sys_create_module)
  1111. !     .long SYMBOL_NAME(sys_init_module)
  1112. !     .long SYMBOL_NAME(sys_delete_module)
  1113. !     .long SYMBOL_NAME(sys_get_kernel_syms)    /* 130 */
  1114. !     .long SYMBOL_NAME(sys_quotactl)
  1115. !     .long SYMBOL_NAME(sys_getpgid)
  1116. !     .long SYMBOL_NAME(sys_fchdir)
  1117. !     .long SYMBOL_NAME(sys_bdflush)
  1118. !     .long SYMBOL_NAME(sys_sysfs)        /* 135 */
  1119. !     .long SYMBOL_NAME(sys_personality)
  1120.       .long 0                /* for afs_syscall */
  1121. !     .long SYMBOL_NAME(sys_setfsuid)
  1122. !     .long SYMBOL_NAME(sys_setfsgid)
  1123. !     .long SYMBOL_NAME(sys_llseek)        /* 140 */
  1124.       .space (NR_syscalls-140)*4
  1125. diff -c linux/linux/arch/i386/kernel/head.S:1.1.1.1 linux/linux/arch/i386/kernel/head.S:1.2
  1126. *** linux/linux/arch/i386/kernel/head.S:1.1.1.1    Wed May 17 23:57:21 1995
  1127. --- linux/linux/arch/i386/kernel/head.S    Wed May 17 23:57:21 1995
  1128. ***************
  1129. *** 9,24 ****
  1130.    */
  1131.   
  1132.   .text
  1133. - .globl _idt,_gdt,
  1134. - .globl _swapper_pg_dir,_pg0
  1135. - .globl _empty_bad_page
  1136. - .globl _empty_bad_page_table
  1137. - .globl _empty_zero_page
  1138. - .globl _floppy_track_buffer
  1139.   
  1140. - #define __ASSEMBLY__
  1141.   #include <linux/tasks.h>
  1142.   #include <linux/fd.h>
  1143.   #include <asm/segment.h>
  1144.   
  1145.   #define CL_MAGIC_ADDR    0x90020
  1146. --- 9,18 ----
  1147.    */
  1148.   
  1149.   .text
  1150.   
  1151.   #include <linux/tasks.h>
  1152.   #include <linux/fd.h>
  1153. + #include <linux/linkage.h>
  1154.   #include <asm/segment.h>
  1155.   
  1156.   #define CL_MAGIC_ADDR    0x90020
  1157. ***************
  1158. *** 30,35 ****
  1159. --- 24,30 ----
  1160.    * swapper_pg_dir is the main page directory, address 0x00001000 (or at
  1161.    * address 0x00101000 for a compressed boot).
  1162.    */
  1163. +     .globl startup_32
  1164.   startup_32:
  1165.       cld
  1166.       movl $(KERNEL_DS),%eax
  1167. ***************
  1168. *** 42,49 ****
  1169.    * Clear BSS first so that there are no surprises...
  1170.    */
  1171.       xorl %eax,%eax
  1172. !     movl $__edata,%edi
  1173. !     movl $__end,%ecx
  1174.       subl %edi,%ecx
  1175.       cld
  1176.       rep
  1177. --- 37,44 ----
  1178.    * Clear BSS first so that there are no surprises...
  1179.    */
  1180.       xorl %eax,%eax
  1181. !     movl $ SYMBOL_NAME(_edata),%edi
  1182. !     movl $ SYMBOL_NAME(_end),%ecx
  1183.       subl %edi,%ecx
  1184.       cld
  1185.       rep
  1186. ***************
  1187. *** 71,77 ****
  1188.    * is for the command line.
  1189.    */
  1190.       movl $0x90000,%esi
  1191. !     movl $_empty_zero_page,%edi
  1192.       movl $512,%ecx
  1193.       cld
  1194.       rep
  1195. --- 66,72 ----
  1196.    * is for the command line.
  1197.    */
  1198.       movl $0x90000,%esi
  1199. !     movl $ SYMBOL_NAME(empty_zero_page),%edi
  1200.       movl $512,%ecx
  1201.       cld
  1202.       rep
  1203. ***************
  1204. *** 82,88 ****
  1205.       stosl
  1206.       cmpw $(CL_MAGIC),CL_MAGIC_ADDR
  1207.       jne 1f
  1208. !     movl $_empty_zero_page+2048,%edi
  1209.       movzwl CL_OFFSET,%esi
  1210.       addl $(CL_BASE_ADDR),%esi
  1211.       movl $2048,%ecx
  1212. --- 77,83 ----
  1213.       stosl
  1214.       cmpw $(CL_MAGIC),CL_MAGIC_ADDR
  1215.       jne 1f
  1216. !     movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi
  1217.       movzwl CL_OFFSET,%esi
  1218.       addl $(CL_BASE_ADDR),%esi
  1219.       movl $2048,%ecx
  1220. ***************
  1221. *** 95,101 ****
  1222.    * apply at our cpl of 0 and the stack ought to be aligned already, and
  1223.    * we don't need to preserve eflags.
  1224.    */
  1225. !     movl $3,_x86
  1226.       pushfl            # push EFLAGS
  1227.       popl %eax        # get EFLAGS
  1228.       movl %eax,%ecx        # save original EFLAGS
  1229. --- 90,96 ----
  1230.    * apply at our cpl of 0 and the stack ought to be aligned already, and
  1231.    * we don't need to preserve eflags.
  1232.    */
  1233. !     movl $3, SYMBOL_NAME(x86)
  1234.       pushfl            # push EFLAGS
  1235.       popl %eax        # get EFLAGS
  1236.       movl %eax,%ecx        # save original EFLAGS
  1237. ***************
  1238. *** 107,113 ****
  1239.       xorl %ecx,%eax        # change in flags
  1240.       andl $0x40000,%eax    # check if AC bit changed
  1241.       je is386
  1242. !     movl $4,_x86
  1243.       movl %ecx,%eax
  1244.       xorl $0x200000,%eax    # check ID flag
  1245.       pushl %eax
  1246. --- 102,108 ----
  1247.       xorl %ecx,%eax        # change in flags
  1248.       andl $0x40000,%eax    # check if AC bit changed
  1249.       je is386
  1250. !     movl $4,SYMBOL_NAME(x86)
  1251.       movl %ecx,%eax
  1252.       xorl $0x200000,%eax    # check ID flag
  1253.       pushl %eax
  1254. ***************
  1255. *** 124,142 ****
  1256.       .byte 0x0f, 0xa2    # check the processor type
  1257.       movb %al, %cl        # save reg for future use
  1258.       andb $0x0f,%ah        # mask processor family
  1259. !     movb %ah, _x86
  1260.       andb $0xf0, %eax    # mask model
  1261.       shrb $4, %al
  1262. !     movb %al, _x86_model
  1263.       andb $0x0f, %cl        # mask mask revision
  1264. !     movb %cl, _x86_mask
  1265. !     movl %edx, _x86_capability
  1266.       /* get vendor info */
  1267.       xorl %eax, %eax            # call CPUID with 0 -> return vendor ID
  1268.       .byte 0x0f, 0xa2        # CPUID
  1269. !     movl %ebx, _x86_vendor_id    # lo 4 chars
  1270. !     movl %edx, _x86_vendor_id+4    # next 4 chars
  1271. !     movl %ecx, _x86_vendor_id+8    # last 4 chars
  1272.   
  1273.       movl %cr0,%eax        # 486+
  1274.       andl $0x80000011,%eax    # Save PG,PE,ET
  1275. --- 119,137 ----
  1276.       .byte 0x0f, 0xa2    # check the processor type
  1277.       movb %al, %cl        # save reg for future use
  1278.       andb $0x0f,%ah        # mask processor family
  1279. !     movb %ah,SYMBOL_NAME(x86)
  1280.       andb $0xf0, %eax    # mask model
  1281.       shrb $4, %al
  1282. !     movb %al,SYMBOL_NAME(x86_model)
  1283.       andb $0x0f, %cl        # mask mask revision
  1284. !     movb %cl,SYMBOL_NAME(x86_mask)
  1285. !     movl %edx,SYMBOL_NAME(x86_capability)
  1286.       /* get vendor info */
  1287.       xorl %eax, %eax            # call CPUID with 0 -> return vendor ID
  1288.       .byte 0x0f, 0xa2        # CPUID
  1289. !     movl %ebx,SYMBOL_NAME(x86_vendor_id)    # lo 4 chars
  1290. !     movl %edx,SYMBOL_NAME(x86_vendor_id)+4    # next 4 chars
  1291. !     movl %ecx,SYMBOL_NAME(x86_vendor_id)+8    # last 4 chars
  1292.   
  1293.       movl %cr0,%eax        # 486+
  1294.       andl $0x80000011,%eax    # Save PG,PE,ET
  1295. ***************
  1296. *** 171,177 ****
  1297.       pushl %eax
  1298.       pushl %eax
  1299.       cld            # gcc2 wants the direction flag cleared at all times
  1300. !     call _start_kernel
  1301.   L6:
  1302.       jmp L6            # main should never return here, but
  1303.                   # just in case, we know what happens.
  1304. --- 166,172 ----
  1305.       pushl %eax
  1306.       pushl %eax
  1307.       cld            # gcc2 wants the direction flag cleared at all times
  1308. !     call SYMBOL_NAME(start_kernel)
  1309.   L6:
  1310.       jmp L6            # main should never return here, but
  1311.                   # just in case, we know what happens.
  1312. ***************
  1313. *** 180,186 ****
  1314.    * We depend on ET to be correct. This checks for 287/387.
  1315.    */
  1316.   check_x87:
  1317. !     movb $0,_hard_math
  1318.       clts
  1319.       fninit
  1320.       fstsw %ax
  1321. --- 175,181 ----
  1322.    * We depend on ET to be correct. This checks for 287/387.
  1323.    */
  1324.   check_x87:
  1325. !     movb $0,SYMBOL_NAME(hard_math)
  1326.       clts
  1327.       fninit
  1328.       fstsw %ax
  1329. ***************
  1330. *** 190,197 ****
  1331.       xorl $4,%eax        /* set EM */
  1332.       movl %eax,%cr0
  1333.       ret
  1334. ! .align 2
  1335. ! 1:    movb $1,_hard_math
  1336.       .byte 0xDB,0xE4        /* fsetpm for 287, ignored by 387 */
  1337.       ret
  1338.   
  1339. --- 185,192 ----
  1340.       xorl $4,%eax        /* set EM */
  1341.       movl %eax,%cr0
  1342.       ret
  1343. !     ALIGN
  1344. ! 1:    movb $1,SYMBOL_NAME(hard_math)
  1345.       .byte 0xDB,0xE4        /* fsetpm for 287, ignored by 387 */
  1346.       ret
  1347.   
  1348. ***************
  1349. *** 211,217 ****
  1350.       movw %dx,%ax        /* selector = 0x0010 = cs */
  1351.       movw $0x8E00,%dx    /* interrupt gate - dpl=0, present */
  1352.   
  1353. !     lea _idt,%edi
  1354.       mov $256,%ecx
  1355.   rp_sidt:
  1356.       movl %eax,(%edi)
  1357. --- 206,212 ----
  1358.       movw %dx,%ax        /* selector = 0x0010 = cs */
  1359.       movw $0x8E00,%dx    /* interrupt gate - dpl=0, present */
  1360.   
  1361. !     lea SYMBOL_NAME(idt),%edi
  1362.       mov $256,%ecx
  1363.   rp_sidt:
  1364.       movl %eax,(%edi)
  1365. ***************
  1366. *** 233,256 ****
  1367.    * (ref: update, 25Sept92)  -- croutons@crunchy.uucp 
  1368.    * (ref: 92.10.11 - Linus Torvalds. Corrected 16M limit - no upper memory limit)
  1369.    */
  1370. ! .align 2
  1371.   setup_paging:
  1372.       movl $1024*2,%ecx        /* 2 pages - swapper_pg_dir+1 page table */
  1373.       xorl %eax,%eax
  1374. !     movl $_swapper_pg_dir,%edi    /* swapper_pg_dir is at 0x1000 */
  1375.       cld;rep;stosl
  1376.   /* Identity-map the kernel in low 4MB memory for ease of transition */
  1377. !     movl $_pg0+7,_swapper_pg_dir        /* set present bit/user r/w */
  1378.   /* But the real place is at 0xC0000000 */
  1379. !     movl $_pg0+7,_swapper_pg_dir+3072    /* set present bit/user r/w */
  1380. !     movl $_pg0+4092,%edi
  1381.       movl $0x03ff007,%eax        /*  4Mb - 4096 + 7 (r/w user,p) */
  1382.       std
  1383.   1:    stosl            /* fill the page backwards - more efficient :-) */
  1384.       subl $0x1000,%eax
  1385.       jge 1b
  1386.       cld
  1387. !     movl $_swapper_pg_dir,%eax
  1388.       movl %eax,%cr3            /* cr3 - page directory start */
  1389.       movl %cr0,%eax
  1390.       orl $0x80000000,%eax
  1391. --- 228,253 ----
  1392.    * (ref: update, 25Sept92)  -- croutons@crunchy.uucp 
  1393.    * (ref: 92.10.11 - Linus Torvalds. Corrected 16M limit - no upper memory limit)
  1394.    */
  1395. !     ALIGN
  1396.   setup_paging:
  1397.       movl $1024*2,%ecx        /* 2 pages - swapper_pg_dir+1 page table */
  1398.       xorl %eax,%eax
  1399. !     movl $ SYMBOL_NAME(swapper_pg_dir),%edi    /* swapper_pg_dir is at 0x1000 */
  1400.       cld;rep;stosl
  1401.   /* Identity-map the kernel in low 4MB memory for ease of transition */
  1402. ! /* set present bit/user r/w */
  1403. !     movl $ SYMBOL_NAME(pg0)+7,SYMBOL_NAME(swapper_pg_dir)
  1404.   /* But the real place is at 0xC0000000 */
  1405. ! /* set present bit/user r/w */
  1406. !     movl $ SYMBOL_NAME(pg0)+7,SYMBOL_NAME(swapper_pg_dir)+3072
  1407. !     movl $ SYMBOL_NAME(pg0)+4092,%edi
  1408.       movl $0x03ff007,%eax        /*  4Mb - 4096 + 7 (r/w user,p) */
  1409.       std
  1410.   1:    stosl            /* fill the page backwards - more efficient :-) */
  1411.       subl $0x1000,%eax
  1412.       jge 1b
  1413.       cld
  1414. !     movl $ SYMBOL_NAME(swapper_pg_dir),%eax
  1415.       movl %eax,%cr3            /* cr3 - page directory start */
  1416.       movl %cr0,%eax
  1417.       orl $0x80000000,%eax
  1418. ***************
  1419. *** 268,289 ****
  1420.    * by 2-3k.  This would be a good thing to do at some point.....
  1421.    */
  1422.   .org 0x1000
  1423. ! _swapper_pg_dir:
  1424.   /*
  1425.    * The page tables are initialized to only 4MB here - the final page
  1426.    * tables are set up later depending on memory size.
  1427.    */
  1428.   .org 0x2000
  1429. ! _pg0:
  1430.   
  1431.   .org 0x3000
  1432. ! _empty_bad_page:
  1433.   
  1434.   .org 0x4000
  1435. ! _empty_bad_page_table:
  1436.   
  1437.   .org 0x5000
  1438. ! _empty_zero_page:
  1439.   
  1440.   .org 0x6000
  1441.   /*
  1442. --- 265,286 ----
  1443.    * by 2-3k.  This would be a good thing to do at some point.....
  1444.    */
  1445.   .org 0x1000
  1446. ! ENTRY(swapper_pg_dir)
  1447.   /*
  1448.    * The page tables are initialized to only 4MB here - the final page
  1449.    * tables are set up later depending on memory size.
  1450.    */
  1451.   .org 0x2000
  1452. ! ENTRY(pg0)
  1453.   
  1454.   .org 0x3000
  1455. ! ENTRY(empty_bad_page)
  1456.   
  1457.   .org 0x4000
  1458. ! ENTRY(empty_bad_page_table)
  1459.   
  1460.   .org 0x5000
  1461. ! ENTRY(empty_zero_page)
  1462.   
  1463.   .org 0x6000
  1464.   /*
  1465. ***************
  1466. *** 292,308 ****
  1467.    * sector read/write can mess it up. It can contain one full cylinder (sic) of
  1468.    * data (36*2*512 bytes).
  1469.    */
  1470. ! _floppy_track_buffer:
  1471.       .fill 512*2*MAX_BUFFER_SECTORS,1,0
  1472.       
  1473.   stack_start:
  1474. !     .long _init_user_stack+4096
  1475.       .long KERNEL_DS
  1476.   
  1477.   /* This is the default interrupt "handler" :-) */
  1478.   int_msg:
  1479.       .asciz "Unknown interrupt\n"
  1480. ! .align 2
  1481.   ignore_int:
  1482.       cld
  1483.       pushl %eax
  1484. --- 289,305 ----
  1485.    * sector read/write can mess it up. It can contain one full cylinder (sic) of
  1486.    * data (36*2*512 bytes).
  1487.    */
  1488. ! ENTRY(floppy_track_buffer)
  1489.       .fill 512*2*MAX_BUFFER_SECTORS,1,0
  1490.       
  1491.   stack_start:
  1492. !     .long SYMBOL_NAME(init_user_stack)+4096
  1493.       .long KERNEL_DS
  1494.   
  1495.   /* This is the default interrupt "handler" :-) */
  1496.   int_msg:
  1497.       .asciz "Unknown interrupt\n"
  1498. !     ALIGN
  1499.   ignore_int:
  1500.       cld
  1501.       pushl %eax
  1502. ***************
  1503. *** 316,322 ****
  1504.       mov %ax,%es
  1505.       mov %ax,%fs
  1506.       pushl $int_msg
  1507. !     call _printk
  1508.       popl %eax
  1509.       pop %fs
  1510.       pop %es
  1511. --- 313,319 ----
  1512.       mov %ax,%es
  1513.       mov %ax,%fs
  1514.       pushl $int_msg
  1515. !     call SYMBOL_NAME(printk)
  1516.       popl %eax
  1517.       pop %fs
  1518.       pop %es
  1519. ***************
  1520. *** 329,356 ****
  1521.   /*
  1522.    * The interrupt descriptor table has room for 256 idt's
  1523.    */
  1524. ! .align 4
  1525.   .word 0
  1526.   idt_descr:
  1527.       .word 256*8-1        # idt contains 256 entries
  1528. !     .long 0xc0000000+_idt
  1529.   
  1530. ! .align 4
  1531. ! _idt:
  1532.       .fill 256,8,0        # idt is uninitialized
  1533.   
  1534. ! .align 4
  1535.   .word 0
  1536.   gdt_descr:
  1537.       .word (8+2*NR_TASKS)*8-1
  1538. !     .long 0xc0000000+_gdt
  1539.   
  1540.   /*
  1541.    * This gdt setup gives the kernel a 1GB address space at virtual
  1542.    * address 0xC0000000 - space enough for expansion, I hope.
  1543.    */
  1544. ! .align 4
  1545. ! _gdt:
  1546.       .quad 0x0000000000000000    /* NULL descriptor */
  1547.       .quad 0x0000000000000000    /* not used */
  1548.       .quad 0xc0c39a000000ffff    /* 0x10 kernel 1GB code at 0xC0000000 */
  1549. --- 326,351 ----
  1550.   /*
  1551.    * The interrupt descriptor table has room for 256 idt's
  1552.    */
  1553. !     ALIGN
  1554.   .word 0
  1555.   idt_descr:
  1556.       .word 256*8-1        # idt contains 256 entries
  1557. !     .long 0xc0000000+SYMBOL_NAME(idt)
  1558.   
  1559. ! ENTRY(idt)
  1560.       .fill 256,8,0        # idt is uninitialized
  1561.   
  1562. !     ALIGN
  1563.   .word 0
  1564.   gdt_descr:
  1565.       .word (8+2*NR_TASKS)*8-1
  1566. !     .long 0xc0000000+SYMBOL_NAME(gdt)
  1567.   
  1568.   /*
  1569.    * This gdt setup gives the kernel a 1GB address space at virtual
  1570.    * address 0xC0000000 - space enough for expansion, I hope.
  1571.    */
  1572. ! ENTRY(gdt)
  1573.       .quad 0x0000000000000000    /* NULL descriptor */
  1574.       .quad 0x0000000000000000    /* not used */
  1575.       .quad 0xc0c39a000000ffff    /* 0x10 kernel 1GB code at 0xC0000000 */
  1576. diff -c linux/linux/arch/i386/kernel/process.c:1.1.1.1 linux/linux/arch/i386/kernel/process.c:1.4
  1577. *** linux/linux/arch/i386/kernel/process.c:1.1.1.1    Wed May 17 23:57:21 1995
  1578. --- linux/linux/arch/i386/kernel/process.c    Wed May 17 23:57:21 1995
  1579. ***************
  1580. *** 192,197 ****
  1581. --- 192,222 ----
  1582.   }
  1583.   
  1584.   /*
  1585. +  * fill in the fpu structure for a core dump..
  1586. +  */
  1587. + int dump_fpu (struct user_i387_struct* fpu)
  1588. + {
  1589. +     int fpvalid;
  1590. + /* Flag indicating the math stuff is valid. We don't support this for the
  1591. +    soft-float routines yet */
  1592. +     if (hard_math) {
  1593. +         if ((fpvalid = current->used_math) != 0) {
  1594. +             if (last_task_used_math == current)
  1595. +                 __asm__("clts ; fnsave %0": :"m" (*fpu));
  1596. +             else
  1597. +                 memcpy(fpu,¤t->tss.i387.hard,sizeof(*fpu));
  1598. +         }
  1599. +     } else {
  1600. +         /* we should dump the emulator state here, but we need to
  1601. +            convert it into standard 387 format first.. */
  1602. +         fpvalid = 0;
  1603. +     }
  1604. +     return fpvalid;
  1605. + }
  1606. + /*
  1607.    * fill in the user structure for a core dump..
  1608.    */
  1609.   void dump_thread(struct pt_regs * regs, struct user * dump)
  1610. ***************
  1611. *** 214,233 ****
  1612.   
  1613.       dump->regs = *regs;
  1614.   
  1615. ! /* Flag indicating the math stuff is valid. We don't support this for the
  1616. !    soft-float routines yet */
  1617. !     if (hard_math) {
  1618. !         if ((dump->u_fpvalid = current->used_math) != 0) {
  1619. !             if (last_task_used_math == current)
  1620. !                 __asm__("clts ; fnsave %0": :"m" (dump->i387));
  1621. !             else
  1622. !                 memcpy(&dump->i387,¤t->tss.i387.hard,sizeof(dump->i387));
  1623. !         }
  1624. !     } else {
  1625. !         /* we should dump the emulator state here, but we need to
  1626. !            convert it into standard 387 format first.. */
  1627. !         dump->u_fpvalid = 0;
  1628. !     }
  1629.   }
  1630.   
  1631.   asmlinkage int sys_fork(struct pt_regs regs)
  1632. --- 239,245 ----
  1633.   
  1634.       dump->regs = *regs;
  1635.   
  1636. !     dump->u_fpvalid = dump_fpu (&dump->i387);
  1637.   }
  1638.   
  1639.   asmlinkage int sys_fork(struct pt_regs regs)
  1640. diff -c linux/linux/arch/i386/kernel/setup.c:1.1.1.1 linux/linux/arch/i386/kernel/setup.c:1.2
  1641. *** linux/linux/arch/i386/kernel/setup.c:1.1.1.1    Wed May 17 23:57:21 1995
  1642. --- linux/linux/arch/i386/kernel/setup.c    Wed May 17 23:57:21 1995
  1643. ***************
  1644. *** 55,61 ****
  1645.   unsigned char aux_device_present;
  1646.   extern int ramdisk_size;
  1647.   extern int root_mountflags;
  1648. ! extern int etext, edata, end;
  1649.   
  1650.   extern char empty_zero_page[PAGE_SIZE];
  1651.   
  1652. --- 55,61 ----
  1653.   unsigned char aux_device_present;
  1654.   extern int ramdisk_size;
  1655.   extern int root_mountflags;
  1656. ! extern int _etext, _edata, _end;
  1657.   
  1658.   extern char empty_zero_page[PAGE_SIZE];
  1659.   
  1660. ***************
  1661. *** 95,105 ****
  1662.   #endif
  1663.       if (MOUNT_ROOT_RDONLY)
  1664.           root_mountflags |= MS_RDONLY;
  1665. !     memory_start = (unsigned long) &end;
  1666.       init_task.mm->start_code = TASK_SIZE;
  1667. !     init_task.mm->end_code = TASK_SIZE + (unsigned long) &etext;
  1668. !     init_task.mm->end_data = TASK_SIZE + (unsigned long) &edata;
  1669. !     init_task.mm->brk = TASK_SIZE + (unsigned long) &end;
  1670.   
  1671.       for (;;) {
  1672.           if (c == ' ' && *(unsigned long *)from == *(unsigned long *)"mem=") {
  1673. --- 95,105 ----
  1674.   #endif
  1675.       if (MOUNT_ROOT_RDONLY)
  1676.           root_mountflags |= MS_RDONLY;
  1677. !     memory_start = (unsigned long) &_end;
  1678.       init_task.mm->start_code = TASK_SIZE;
  1679. !     init_task.mm->end_code = TASK_SIZE + (unsigned long) &_etext;
  1680. !     init_task.mm->end_data = TASK_SIZE + (unsigned long) &_edata;
  1681. !     init_task.mm->brk = TASK_SIZE + (unsigned long) &_end;
  1682.   
  1683.       for (;;) {
  1684.           if (c == ' ' && *(unsigned long *)from == *(unsigned long *)"mem=") {
  1685. diff -c linux/linux/arch/i386/kernel/traps.c:1.1.1.1 linux/linux/arch/i386/kernel/traps.c:1.2
  1686. *** linux/linux/arch/i386/kernel/traps.c:1.1.1.1    Wed May 17 23:57:21 1995
  1687. --- linux/linux/arch/i386/kernel/traps.c    Wed May 17 23:57:21 1995
  1688. ***************
  1689. *** 99,105 ****
  1690.       unsigned long esp;
  1691.       unsigned short ss;
  1692.       unsigned long *stack, addr, module_start, module_end;
  1693. !     extern char start_kernel, etext;
  1694.   
  1695.       esp = (unsigned long) ®s->esp;
  1696.       ss = KERNEL_DS;
  1697. --- 99,105 ----
  1698.       unsigned long esp;
  1699.       unsigned short ss;
  1700.       unsigned long *stack, addr, module_start, module_end;
  1701. !     extern char start_kernel, _etext;
  1702.   
  1703.       esp = (unsigned long) ®s->esp;
  1704.       ss = KERNEL_DS;
  1705. ***************
  1706. *** 147,153 ****
  1707.            * out the call path that was taken.
  1708.            */
  1709.           if (((addr >= (unsigned long) &start_kernel) &&
  1710. !              (addr <= (unsigned long) &etext)) ||
  1711.               ((addr >= module_start) && (addr <= module_end))) {
  1712.               if (i && ((i % 8) == 0))
  1713.                   printk("\n       ");
  1714. --- 147,153 ----
  1715.            * out the call path that was taken.
  1716.            */
  1717.           if (((addr >= (unsigned long) &start_kernel) &&
  1718. !              (addr <= (unsigned long) &_etext)) ||
  1719.               ((addr >= module_start) && (addr <= module_end))) {
  1720.               if (i && ((i % 8) == 0))
  1721.                   printk("\n       ");
  1722. diff -c linux/linux/arch/i386/math-emu/div_Xsig.S:1.1.1.1 linux/linux/arch/i386/math-emu/div_Xsig.S:1.2
  1723. *** linux/linux/arch/i386/math-emu/div_Xsig.S:1.1.1.1    Wed May 17 23:57:22 1995
  1724. --- linux/linux/arch/i386/math-emu/div_Xsig.S    Wed May 17 23:57:22 1995
  1725. ***************
  1726. *** 74,84 ****
  1727.   
  1728.   
  1729.   .text
  1730. !     .align 2,144
  1731. ! .globl _div_Xsig
  1732. ! _div_Xsig:
  1733.       pushl    %ebp
  1734.       movl    %esp,%ebp
  1735.   #ifndef NON_REENTRANT_FPU
  1736. --- 74,80 ----
  1737.   
  1738.   
  1739.   .text
  1740. ! ENTRY(div_Xsig)
  1741.       pushl    %ebp
  1742.       movl    %esp,%ebp
  1743.   #ifndef NON_REENTRANT_FPU
  1744. diff -c linux/linux/arch/i386/math-emu/div_small.S:1.1.1.1 linux/linux/arch/i386/math-emu/div_small.S:1.2
  1745. *** linux/linux/arch/i386/math-emu/div_small.S:1.1.1.1    Wed May 17 23:57:22 1995
  1746. --- linux/linux/arch/i386/math-emu/div_small.S    Wed May 17 23:57:22 1995
  1747. ***************
  1748. *** 17,27 ****
  1749.   #include "fpu_asm.h"
  1750.   
  1751.   .text
  1752. !     .align 2,144
  1753. ! .globl _div_small
  1754. ! _div_small:
  1755.       pushl    %ebp
  1756.       movl    %esp,%ebp
  1757.   
  1758. --- 17,23 ----
  1759.   #include "fpu_asm.h"
  1760.   
  1761.   .text
  1762. ! ENTRY(div_small)
  1763.       pushl    %ebp
  1764.       movl    %esp,%ebp
  1765.   
  1766. diff -c linux/linux/arch/i386/math-emu/fpu_asm.h:1.1.1.1 linux/linux/arch/i386/math-emu/fpu_asm.h:1.3
  1767. *** linux/linux/arch/i386/math-emu/fpu_asm.h:1.1.1.1    Wed May 17 23:57:22 1995
  1768. --- linux/linux/arch/i386/math-emu/fpu_asm.h    Wed May 17 23:57:22 1995
  1769. ***************
  1770. *** 9,17 ****
  1771.   #ifndef _FPU_ASM_H_
  1772.   #define _FPU_ASM_H_
  1773.   
  1774.   #include "fpu_emu.h"
  1775.   
  1776. ! #define    EXCEPTION    _exception
  1777.   
  1778.   
  1779.   #define PARAM1    8(%ebp)
  1780. --- 9,18 ----
  1781.   #ifndef _FPU_ASM_H_
  1782.   #define _FPU_ASM_H_
  1783.   
  1784. + #include <linux/linkage.h>
  1785.   #include "fpu_emu.h"
  1786.   
  1787. ! #define    EXCEPTION    SYMBOL_NAME(exception)
  1788.   
  1789.   
  1790.   #define PARAM1    8(%ebp)
  1791. diff -c linux/linux/arch/i386/math-emu/mul_Xsig.S:1.1.1.1 linux/linux/arch/i386/math-emu/mul_Xsig.S:1.3
  1792. *** linux/linux/arch/i386/math-emu/mul_Xsig.S:1.1.1.1    Wed May 17 23:57:22 1995
  1793. --- linux/linux/arch/i386/math-emu/mul_Xsig.S    Wed May 17 23:57:22 1995
  1794. ***************
  1795. *** 24,32 ****
  1796.   #include "fpu_asm.h"
  1797.   
  1798.   .text
  1799. !     .align 2,144
  1800. ! .globl _mul32_Xsig
  1801. ! _mul32_Xsig:
  1802.       pushl %ebp
  1803.       movl %esp,%ebp
  1804.       subl $16,%esp
  1805. --- 24,30 ----
  1806.   #include "fpu_asm.h"
  1807.   
  1808.   .text
  1809. ! ENTRY(mul32_Xsig)
  1810.       pushl %ebp
  1811.       movl %esp,%ebp
  1812.       subl $16,%esp
  1813. ***************
  1814. *** 66,74 ****
  1815.       ret
  1816.   
  1817.   
  1818. !     .align 2,144
  1819. ! .globl _mul64_Xsig
  1820. ! _mul64_Xsig:
  1821.       pushl %ebp
  1822.       movl %esp,%ebp
  1823.       subl $16,%esp
  1824. --- 64,70 ----
  1825.       ret
  1826.   
  1827.   
  1828. ! ENTRY(mul64_Xsig)
  1829.       pushl %ebp
  1830.       movl %esp,%ebp
  1831.       subl $16,%esp
  1832. ***************
  1833. *** 121,129 ****
  1834.   
  1835.   
  1836.   
  1837. !     .align 2,144
  1838. ! .globl _mul_Xsig_Xsig
  1839. ! _mul_Xsig_Xsig:
  1840.       pushl %ebp
  1841.       movl %esp,%ebp
  1842.       subl $16,%esp
  1843. --- 117,123 ----
  1844.   
  1845.   
  1846.   
  1847. ! ENTRY(mul_Xsig_Xsig)
  1848.       pushl %ebp
  1849.       movl %esp,%ebp
  1850.       subl $16,%esp
  1851. diff -c linux/linux/arch/i386/math-emu/polynom_Xsig.S:1.1.1.1 linux/linux/arch/i386/math-emu/polynom_Xsig.S:1.2
  1852. *** linux/linux/arch/i386/math-emu/polynom_Xsig.S:1.1.1.1    Wed May 17 23:57:22 1995
  1853. --- linux/linux/arch/i386/math-emu/polynom_Xsig.S    Wed May 17 23:57:23 1995
  1854. ***************
  1855. *** 36,44 ****
  1856.   #define OVERFLOWED      -16(%ebp)    /* addition overflow flag */
  1857.   
  1858.   .text
  1859. !     .align 2,144
  1860. ! .globl _polynomial_Xsig
  1861. ! _polynomial_Xsig:
  1862.       pushl    %ebp
  1863.       movl    %esp,%ebp
  1864.       subl    $32,%esp
  1865. --- 36,42 ----
  1866.   #define OVERFLOWED      -16(%ebp)    /* addition overflow flag */
  1867.   
  1868.   .text
  1869. ! ENTRY(polynomial_Xsig)
  1870.       pushl    %ebp
  1871.       movl    %esp,%ebp
  1872.       subl    $32,%esp
  1873. diff -c linux/linux/arch/i386/math-emu/reg_div.S:1.1.1.1 linux/linux/arch/i386/math-emu/reg_div.S:1.3
  1874. *** linux/linux/arch/i386/math-emu/reg_div.S:1.1.1.1    Wed May 17 23:57:23 1995
  1875. --- linux/linux/arch/i386/math-emu/reg_div.S    Wed May 17 23:57:23 1995
  1876. ***************
  1877. *** 19,28 ****
  1878.   
  1879.   
  1880.   .text
  1881. !     .align 2
  1882. ! .globl    _reg_div
  1883. ! _reg_div:
  1884.       pushl    %ebp
  1885.       movl    %esp,%ebp
  1886.   #ifndef NON_REENTRANT_FPU
  1887. --- 19,25 ----
  1888.   
  1889.   
  1890.   .text
  1891. ! ENTRY(reg_div)
  1892.       pushl    %ebp
  1893.       movl    %esp,%ebp
  1894.   #ifndef NON_REENTRANT_FPU
  1895. ***************
  1896. *** 47,53 ****
  1897.       cmpl    EXP_UNDER,EXP(%esi)
  1898.       jg    xL_arg1_not_denormal
  1899.   
  1900. !     call    _denormal_operand
  1901.       orl    %eax,%eax
  1902.       jnz    fpu_Arith_exit
  1903.   
  1904. --- 44,50 ----
  1905.       cmpl    EXP_UNDER,EXP(%esi)
  1906.       jg    xL_arg1_not_denormal
  1907.   
  1908. !     call    SYMBOL_NAME(denormal_operand)
  1909.       orl    %eax,%eax
  1910.       jnz    fpu_Arith_exit
  1911.   
  1912. ***************
  1913. *** 55,61 ****
  1914.       cmpl    EXP_UNDER,EXP(%ebx)
  1915.       jg    xL_arg2_not_denormal
  1916.   
  1917. !     call    _denormal_operand
  1918.       orl    %eax,%eax
  1919.       jnz    fpu_Arith_exit
  1920.   
  1921. --- 52,58 ----
  1922.       cmpl    EXP_UNDER,EXP(%ebx)
  1923.       jg    xL_arg2_not_denormal
  1924.   
  1925. !     call    SYMBOL_NAME(denormal_operand)
  1926.       orl    %eax,%eax
  1927.       jnz    fpu_Arith_exit
  1928.   
  1929. ***************
  1930. *** 75,81 ****
  1931.       addl    EXP_BIAS,%edx
  1932.       movl    %edx,EXP(%edi)
  1933.   
  1934. !     jmp    _divide_kernel
  1935.   
  1936.   
  1937.   /*-----------------------------------------------------------------------*/
  1938. --- 72,78 ----
  1939.       addl    EXP_BIAS,%edx
  1940.       movl    %edx,EXP(%edi)
  1941.   
  1942. !     jmp    SYMBOL_NAME(divide_kernel)
  1943.   
  1944.   
  1945.   /*-----------------------------------------------------------------------*/
  1946. ***************
  1947. *** 92,105 ****
  1948.       pushl    %edi            /* Destination */
  1949.       pushl    %esi
  1950.       pushl    %ebx            /* Ordering is important here */
  1951. !     call    _real_2op_NaN
  1952.       jmp    LDiv_exit
  1953.   
  1954.   /* Invalid operations */
  1955.   L_zero_zero:
  1956.   L_inf_inf:
  1957.       pushl    %edi            /* Destination */
  1958. !     call    _arith_invalid        /* 0/0 or Infinity/Infinity */
  1959.       jmp    LDiv_exit
  1960.   
  1961.   L_no_NaN_arg:
  1962. --- 89,102 ----
  1963.       pushl    %edi            /* Destination */
  1964.       pushl    %esi
  1965.       pushl    %ebx            /* Ordering is important here */
  1966. !     call    SYMBOL_NAME(real_2op_NaN)
  1967.       jmp    LDiv_exit
  1968.   
  1969.   /* Invalid operations */
  1970.   L_zero_zero:
  1971.   L_inf_inf:
  1972.       pushl    %edi            /* Destination */
  1973. !     call    SYMBOL_NAME(arith_invalid) /* 0/0 or Infinity/Infinity */
  1974.       jmp    LDiv_exit
  1975.   
  1976.   L_no_NaN_arg:
  1977. ***************
  1978. *** 126,132 ****
  1979.       cmpl    EXP_UNDER,EXP(%ebx)
  1980.       jg    L_copy_arg1        /* Answer is Inf */
  1981.   
  1982. !     call    _denormal_operand
  1983.       orl    %eax,%eax
  1984.       jnz    fpu_Arith_exit
  1985.   #endif DENORM_OPERAND
  1986. --- 123,129 ----
  1987.       cmpl    EXP_UNDER,EXP(%ebx)
  1988.       jg    L_copy_arg1        /* Answer is Inf */
  1989.   
  1990. !     call    SYMBOL_NAME(denormal_operand)
  1991.       orl    %eax,%eax
  1992.       jnz    fpu_Arith_exit
  1993.   #endif DENORM_OPERAND
  1994. ***************
  1995. *** 151,157 ****
  1996.       movb    SIGN(%esi),%al
  1997.       xorb    SIGN(%ebx),%al
  1998.       pushl    %eax            /* lower 8 bits have the sign */
  1999. !     call    _divide_by_zero
  2000.       jmp    LDiv_exit
  2001.   
  2002.   L_arg2_not_zero:
  2003. --- 148,154 ----
  2004.       movb    SIGN(%esi),%al
  2005.       xorb    SIGN(%ebx),%al
  2006.       pushl    %eax            /* lower 8 bits have the sign */
  2007. !     call    SYMBOL_NAME(divide_by_zero)
  2008.       jmp    LDiv_exit
  2009.   
  2010.   L_arg2_not_zero:
  2011. ***************
  2012. *** 165,171 ****
  2013.       cmpl    EXP_UNDER,EXP(%esi)
  2014.       jg    L_return_zero        /* Answer is zero */
  2015.   
  2016. !     call    _denormal_operand
  2017.       orl    %eax,%eax
  2018.       jnz    fpu_Arith_exit
  2019.   #endif DENORM_OPERAND
  2020. --- 162,168 ----
  2021.       cmpl    EXP_UNDER,EXP(%esi)
  2022.       jg    L_return_zero        /* Answer is zero */
  2023.   
  2024. !     call    SYMBOL_NAME(denormal_operand)
  2025.       orl    %eax,%eax
  2026.       jnz    fpu_Arith_exit
  2027.   #endif DENORM_OPERAND
  2028. ***************
  2029. *** 185,191 ****
  2030.       cmpl    EXP_UNDER,EXP(%ebx)
  2031.       jg    L_copy_arg1        /* Answer is zero */
  2032.   
  2033. !     call    _denormal_operand
  2034.       orl    %eax,%eax
  2035.       jnz    fpu_Arith_exit
  2036.   #endif DENORM_OPERAND
  2037. --- 182,188 ----
  2038.       cmpl    EXP_UNDER,EXP(%ebx)
  2039.       jg    L_copy_arg1        /* Answer is zero */
  2040.   
  2041. !     call    SYMBOL_NAME(denormal_operand)
  2042.       orl    %eax,%eax
  2043.       jnz    fpu_Arith_exit
  2044.   #endif DENORM_OPERAND
  2045. ***************
  2046. *** 241,251 ****
  2047.       call    EXCEPTION
  2048.   
  2049.       /* Generate a NaN for unknown tags */
  2050. !     movl    _CONST_QNaN,%eax
  2051.       movl    %eax,(%edi)
  2052. !     movl    _CONST_QNaN+4,%eax
  2053.       movl    %eax,SIGL(%edi)
  2054. !     movl    _CONST_QNaN+8,%eax
  2055.       movl    %eax,SIGH(%edi)
  2056.       jmp    LDiv_exit        /* %eax is nz */
  2057.   #endif PARANOID
  2058. --- 238,248 ----
  2059.       call    EXCEPTION
  2060.   
  2061.       /* Generate a NaN for unknown tags */
  2062. !     movl    SYMBOL_NAME(CONST_QNaN),%eax
  2063.       movl    %eax,(%edi)
  2064. !     movl    SYMBOL_NAME(CONST_QNaN)+4,%eax
  2065.       movl    %eax,SIGL(%edi)
  2066. !     movl    SYMBOL_NAME(CONST_QNaN)+8,%eax
  2067.       movl    %eax,SIGH(%edi)
  2068.       jmp    LDiv_exit        /* %eax is nz */
  2069.   #endif PARANOID
  2070. diff -c linux/linux/arch/i386/math-emu/reg_norm.S:1.1.1.1 linux/linux/arch/i386/math-emu/reg_norm.S:1.3
  2071. *** linux/linux/arch/i386/math-emu/reg_norm.S:1.1.1.1    Wed May 17 23:57:23 1995
  2072. --- linux/linux/arch/i386/math-emu/reg_norm.S    Wed May 17 23:57:23 1995
  2073. ***************
  2074. *** 18,28 ****
  2075.   
  2076.   
  2077.   .text
  2078. !     .align 2,144
  2079. ! .globl _normalize
  2080. ! _normalize:
  2081.       pushl    %ebp
  2082.       movl    %esp,%ebp
  2083.       pushl    %ebx
  2084. --- 18,24 ----
  2085.   
  2086.   
  2087.   .text
  2088. ! ENTRY(normalize)
  2089.       pushl    %ebp
  2090.       movl    %esp,%ebp
  2091.       pushl    %ebx
  2092. ***************
  2093. *** 34,40 ****
  2094.       je    L_ok
  2095.   
  2096.       pushl    $0x220
  2097. !     call    _exception
  2098.       addl    $4,%esp
  2099.   
  2100.   L_ok:
  2101. --- 30,36 ----
  2102.       je    L_ok
  2103.   
  2104.       pushl    $0x220
  2105. !     call    SYMBOL_NAME(exception)
  2106.       addl    $4,%esp
  2107.   
  2108.   L_ok:
  2109. ***************
  2110. *** 86,108 ****
  2111.   
  2112.   L_underflow:
  2113.       push    %ebx
  2114. !     call    _arith_underflow
  2115.       pop    %ebx
  2116.       jmp    L_exit
  2117.   
  2118.   L_overflow:
  2119.       push    %ebx
  2120. !     call    _arith_overflow
  2121.       pop    %ebx
  2122.       jmp    L_exit
  2123.   
  2124.   
  2125.   
  2126.   /* Normalise without reporting underflow or overflow */
  2127. !     .align 2,144
  2128. ! .globl _normalize_nuo
  2129. ! _normalize_nuo:
  2130.       pushl    %ebp
  2131.       movl    %esp,%ebp
  2132.       pushl    %ebx
  2133. --- 82,101 ----
  2134.   
  2135.   L_underflow:
  2136.       push    %ebx
  2137. !     call    SYMBOL_NAME(arith_underflow)
  2138.       pop    %ebx
  2139.       jmp    L_exit
  2140.   
  2141.   L_overflow:
  2142.       push    %ebx
  2143. !     call    SYMBOL_NAME(arith_overflow)
  2144.       pop    %ebx
  2145.       jmp    L_exit
  2146.   
  2147.   
  2148.   
  2149.   /* Normalise without reporting underflow or overflow */
  2150. ! ENTRY(normalize_nuo)
  2151.       pushl    %ebp
  2152.       movl    %esp,%ebp
  2153.       pushl    %ebx
  2154. ***************
  2155. *** 114,120 ****
  2156.       je    L_ok_nuo
  2157.   
  2158.       pushl    $0x221
  2159. !     call    _exception
  2160.       addl    $4,%esp
  2161.   
  2162.   L_ok_nuo:
  2163. --- 107,113 ----
  2164.       je    L_ok_nuo
  2165.   
  2166.       pushl    $0x221
  2167. !     call    SYMBOL_NAME(exception)
  2168.       addl    $4,%esp
  2169.   
  2170.   L_ok_nuo:
  2171. diff -c linux/linux/arch/i386/math-emu/reg_round.S:1.1.1.1 linux/linux/arch/i386/math-emu/reg_round.S:1.3
  2172. *** linux/linux/arch/i386/math-emu/reg_round.S:1.1.1.1    Wed May 17 23:57:23 1995
  2173. --- linux/linux/arch/i386/math-emu/reg_round.S    Wed May 17 23:57:23 1995
  2174. ***************
  2175. *** 101,114 ****
  2176.   
  2177.   
  2178.   .text
  2179. -     .align 2,144
  2180.   .globl fpu_reg_round
  2181.   .globl fpu_reg_round_sqrt
  2182.   .globl fpu_Arith_exit
  2183. - .globl _round_reg
  2184.   
  2185.   /* Entry point when called from C */
  2186. ! _round_reg:
  2187.       pushl    %ebp
  2188.       movl    %esp,%ebp
  2189.       pushl    %esi
  2190. --- 101,112 ----
  2191.   
  2192.   
  2193.   .text
  2194.   .globl fpu_reg_round
  2195.   .globl fpu_reg_round_sqrt
  2196.   .globl fpu_Arith_exit
  2197.   
  2198.   /* Entry point when called from C */
  2199. ! ENTRY(round_reg)
  2200.       pushl    %ebp
  2201.       movl    %esp,%ebp
  2202.       pushl    %esi
  2203. ***************
  2204. *** 435,441 ****
  2205.    */
  2206.   xL_precision_lost_up:
  2207.       push    %eax
  2208. !     call    _set_precision_flag_up
  2209.       popl    %eax
  2210.       jmp    xL_no_precision_loss
  2211.   
  2212. --- 433,439 ----
  2213.    */
  2214.   xL_precision_lost_up:
  2215.       push    %eax
  2216. !     call    SYMBOL_NAME(set_precision_flag_up)
  2217.       popl    %eax
  2218.       jmp    xL_no_precision_loss
  2219.   
  2220. ***************
  2221. *** 445,451 ****
  2222.    */
  2223.   xL_precision_lost_down:
  2224.       push    %eax
  2225. !     call    _set_precision_flag_down
  2226.       popl    %eax
  2227.       jmp    xL_no_precision_loss
  2228.   
  2229. --- 443,449 ----
  2230.    */
  2231.   xL_precision_lost_down:
  2232.       push    %eax
  2233. !     call    SYMBOL_NAME(set_precision_flag_down)
  2234.       popl    %eax
  2235.       jmp    xL_no_precision_loss
  2236.   
  2237. ***************
  2238. *** 598,604 ****
  2239.       /* There must be a masked underflow */
  2240.       push    %eax
  2241.       pushl    EX_Underflow
  2242. !     call    _exception
  2243.       popl    %eax
  2244.       popl    %eax
  2245.       jmp    xL_Normalised
  2246. --- 596,602 ----
  2247.       /* There must be a masked underflow */
  2248.       push    %eax
  2249.       pushl    EX_Underflow
  2250. !     call    SYMBOL_NAME(exception)
  2251.       popl    %eax
  2252.       popl    %eax
  2253.       jmp    xL_Normalised
  2254. ***************
  2255. *** 610,621 ****
  2256.    */
  2257.   L_underflow_to_zero:
  2258.       push    %eax
  2259. !     call    _set_precision_flag_down
  2260.       popl    %eax
  2261.   
  2262.       push    %eax
  2263.       pushl    EX_Underflow
  2264. !     call    _exception
  2265.       popl    %eax
  2266.       popl    %eax
  2267.   
  2268. --- 608,619 ----
  2269.    */
  2270.   L_underflow_to_zero:
  2271.       push    %eax
  2272. !     call    SYMBOL_NAME(set_precision_flag_down)
  2273.       popl    %eax
  2274.   
  2275.       push    %eax
  2276.       pushl    EX_Underflow
  2277. !     call    SYMBOL_NAME(exception)
  2278.       popl    %eax
  2279.       popl    %eax
  2280.   
  2281. ***************
  2282. *** 628,634 ****
  2283.   /* The operations resulted in a number too large to represent. */
  2284.   L_overflow:
  2285.       push    %edi
  2286. !     call    _arith_overflow
  2287.       pop    %edi
  2288.       jmp    fpu_reg_round_exit
  2289.   
  2290. --- 626,632 ----
  2291.   /* The operations resulted in a number too large to represent. */
  2292.   L_overflow:
  2293.       push    %edi
  2294. !     call    SYMBOL_NAME(arith_overflow)
  2295.       pop    %edi
  2296.       jmp    fpu_reg_round_exit
  2297.   
  2298. diff -c linux/linux/arch/i386/math-emu/reg_u_add.S:1.1.1.1 linux/linux/arch/i386/math-emu/reg_u_add.S:1.3
  2299. *** linux/linux/arch/i386/math-emu/reg_u_add.S:1.1.1.1    Wed May 17 23:57:23 1995
  2300. --- linux/linux/arch/i386/math-emu/reg_u_add.S    Wed May 17 23:57:23 1995
  2301. ***************
  2302. *** 29,37 ****
  2303.   #include "control_w.h"
  2304.   
  2305.   .text
  2306. !     .align 2,144
  2307. ! .globl _reg_u_add
  2308. ! _reg_u_add:
  2309.       pushl    %ebp
  2310.       movl    %esp,%ebp
  2311.       pushl    %esi
  2312. --- 29,35 ----
  2313.   #include "control_w.h"
  2314.   
  2315.   .text
  2316. ! ENTRY(reg_u_add)
  2317.       pushl    %ebp
  2318.       movl    %esp,%ebp
  2319.       pushl    %esi
  2320. ***************
  2321. *** 45,51 ****
  2322.       cmpl    EXP_UNDER,EXP(%esi)
  2323.       jg    xOp1_not_denorm
  2324.   
  2325. !     call    _denormal_operand
  2326.       orl    %eax,%eax
  2327.       jnz    fpu_Arith_exit
  2328.   
  2329. --- 43,49 ----
  2330.       cmpl    EXP_UNDER,EXP(%esi)
  2331.       jg    xOp1_not_denorm
  2332.   
  2333. !     call    SYMBOL_NAME(denormal_operand)
  2334.       orl    %eax,%eax
  2335.       jnz    fpu_Arith_exit
  2336.   
  2337. ***************
  2338. *** 53,59 ****
  2339.       cmpl    EXP_UNDER,EXP(%edi)
  2340.       jg    xOp2_not_denorm
  2341.   
  2342. !     call    _denormal_operand
  2343.       orl    %eax,%eax
  2344.       jnz    fpu_Arith_exit
  2345.   
  2346. --- 51,57 ----
  2347.       cmpl    EXP_UNDER,EXP(%edi)
  2348.       jg    xOp2_not_denorm
  2349.   
  2350. !     call    SYMBOL_NAME(denormal_operand)
  2351.       orl    %eax,%eax
  2352.       jnz    fpu_Arith_exit
  2353.   
  2354. diff -c linux/linux/arch/i386/math-emu/reg_u_div.S:1.1.1.1 linux/linux/arch/i386/math-emu/reg_u_div.S:1.3
  2355. *** linux/linux/arch/i386/math-emu/reg_u_div.S:1.1.1.1    Wed May 17 23:57:23 1995
  2356. --- linux/linux/arch/i386/math-emu/reg_u_div.S    Wed May 17 23:57:23 1995
  2357. ***************
  2358. *** 69,81 ****
  2359.   
  2360.   
  2361.   .text
  2362. !     .align 2,144
  2363. ! .globl _reg_u_div
  2364. ! .globl _divide_kernel
  2365. ! _reg_u_div:
  2366.       pushl    %ebp
  2367.       movl    %esp,%ebp
  2368.   #ifndef NON_REENTRANT_FPU
  2369. --- 69,75 ----
  2370.   
  2371.   
  2372.   .text
  2373. ! ENTRY(reg_u_div)
  2374.       pushl    %ebp
  2375.       movl    %esp,%ebp
  2376.   #ifndef NON_REENTRANT_FPU
  2377. ***************
  2378. *** 95,101 ****
  2379.       cmpl    EXP_UNDER,%eax
  2380.       jg    xOp1_not_denorm
  2381.   
  2382. !     call    _denormal_operand
  2383.       orl    %eax,%eax
  2384.       jnz    fpu_Arith_exit
  2385.   
  2386. --- 89,95 ----
  2387.       cmpl    EXP_UNDER,%eax
  2388.       jg    xOp1_not_denorm
  2389.   
  2390. !     call    SYMBOL_NAME(denormal_operand)
  2391.       orl    %eax,%eax
  2392.       jnz    fpu_Arith_exit
  2393.   
  2394. ***************
  2395. *** 104,117 ****
  2396.       cmpl    EXP_UNDER,%eax
  2397.       jg    xOp2_not_denorm
  2398.   
  2399. !     call    _denormal_operand
  2400.       orl    %eax,%eax
  2401.       jnz    fpu_Arith_exit
  2402.   
  2403.   xOp2_not_denorm:
  2404.   #endif DENORM_OPERAND
  2405.   
  2406. ! _divide_kernel:
  2407.   #ifdef PARANOID
  2408.   /*    testl    $0x80000000, SIGH(%esi)    // Dividend */
  2409.   /*    je    L_bugged */
  2410. --- 98,111 ----
  2411.       cmpl    EXP_UNDER,%eax
  2412.       jg    xOp2_not_denorm
  2413.   
  2414. !     call    SYMBOL_NAME(denormal_operand)
  2415.       orl    %eax,%eax
  2416.       jnz    fpu_Arith_exit
  2417.   
  2418.   xOp2_not_denorm:
  2419.   #endif DENORM_OPERAND
  2420.   
  2421. ! ENTRY(divide_kernel)
  2422.   #ifdef PARANOID
  2423.   /*    testl    $0x80000000, SIGH(%esi)    // Dividend */
  2424.   /*    je    L_bugged */
  2425. diff -c linux/linux/arch/i386/math-emu/reg_u_mul.S:1.1.1.1 linux/linux/arch/i386/math-emu/reg_u_mul.S:1.3
  2426. *** linux/linux/arch/i386/math-emu/reg_u_mul.S:1.1.1.1    Wed May 17 23:57:24 1995
  2427. --- linux/linux/arch/i386/math-emu/reg_u_mul.S    Wed May 17 23:57:24 1995
  2428. ***************
  2429. *** 44,53 ****
  2430.   
  2431.   
  2432.   .text
  2433. !     .align 2,144
  2434. ! .globl _reg_u_mul
  2435. ! _reg_u_mul:
  2436.       pushl    %ebp
  2437.       movl    %esp,%ebp
  2438.   #ifndef NON_REENTRANT_FPU
  2439. --- 44,50 ----
  2440.   
  2441.   
  2442.   .text
  2443. ! ENTRY(reg_u_mul)
  2444.       pushl    %ebp
  2445.       movl    %esp,%ebp
  2446.   #ifndef NON_REENTRANT_FPU
  2447. ***************
  2448. *** 73,79 ****
  2449.       cmpl    EXP_UNDER,%eax
  2450.       jg    xOp1_not_denorm
  2451.   
  2452. !     call    _denormal_operand
  2453.       orl    %eax,%eax
  2454.       jnz    fpu_Arith_exit
  2455.   
  2456. --- 70,76 ----
  2457.       cmpl    EXP_UNDER,%eax
  2458.       jg    xOp1_not_denorm
  2459.   
  2460. !     call    SYMBOL_NAME(denormal_operand)
  2461.       orl    %eax,%eax
  2462.       jnz    fpu_Arith_exit
  2463.   
  2464. ***************
  2465. *** 82,88 ****
  2466.       cmpl    EXP_UNDER,%eax
  2467.       jg    xOp2_not_denorm
  2468.   
  2469. !     call    _denormal_operand
  2470.       orl    %eax,%eax
  2471.       jnz    fpu_Arith_exit
  2472.   
  2473. --- 79,85 ----
  2474.       cmpl    EXP_UNDER,%eax
  2475.       jg    xOp2_not_denorm
  2476.   
  2477. !     call    SYMBOL_NAME(denormal_operand)
  2478.       orl    %eax,%eax
  2479.       jnz    fpu_Arith_exit
  2480.   
  2481. diff -c linux/linux/arch/i386/math-emu/reg_u_sub.S:1.1.1.1 linux/linux/arch/i386/math-emu/reg_u_sub.S:1.3
  2482. *** linux/linux/arch/i386/math-emu/reg_u_sub.S:1.1.1.1    Wed May 17 23:57:24 1995
  2483. --- linux/linux/arch/i386/math-emu/reg_u_sub.S    Wed May 17 23:57:24 1995
  2484. ***************
  2485. *** 30,38 ****
  2486.   #include "control_w.h"
  2487.   
  2488.   .text
  2489. !     .align 2,144
  2490. ! .globl _reg_u_sub
  2491. ! _reg_u_sub:
  2492.       pushl    %ebp
  2493.       movl    %esp,%ebp
  2494.       pushl    %esi
  2495. --- 30,36 ----
  2496.   #include "control_w.h"
  2497.   
  2498.   .text
  2499. ! ENTRY(reg_u_sub)
  2500.       pushl    %ebp
  2501.       movl    %esp,%ebp
  2502.       pushl    %esi
  2503. ***************
  2504. *** 46,52 ****
  2505.       cmpl    EXP_UNDER,EXP(%esi)
  2506.       jg    xOp1_not_denorm
  2507.   
  2508. !     call    _denormal_operand
  2509.       orl    %eax,%eax
  2510.       jnz    fpu_Arith_exit
  2511.   
  2512. --- 44,50 ----
  2513.       cmpl    EXP_UNDER,EXP(%esi)
  2514.       jg    xOp1_not_denorm
  2515.   
  2516. !     call    SYMBOL_NAME(denormal_operand)
  2517.       orl    %eax,%eax
  2518.       jnz    fpu_Arith_exit
  2519.   
  2520. ***************
  2521. *** 54,60 ****
  2522.       cmpl    EXP_UNDER,EXP(%edi)
  2523.       jg    xOp2_not_denorm
  2524.   
  2525. !     call    _denormal_operand
  2526.       orl    %eax,%eax
  2527.       jnz    fpu_Arith_exit
  2528.   
  2529. --- 52,58 ----
  2530.       cmpl    EXP_UNDER,EXP(%edi)
  2531.       jg    xOp2_not_denorm
  2532.   
  2533. !     call    SYMBOL_NAME(denormal_operand)
  2534.       orl    %eax,%eax
  2535.       jnz    fpu_Arith_exit
  2536.   
  2537. diff -c linux/linux/arch/i386/math-emu/round_Xsig.S:1.1.1.1 linux/linux/arch/i386/math-emu/round_Xsig.S:1.2
  2538. *** linux/linux/arch/i386/math-emu/round_Xsig.S:1.1.1.1    Wed May 17 23:57:24 1995
  2539. --- linux/linux/arch/i386/math-emu/round_Xsig.S    Wed May 17 23:57:24 1995
  2540. ***************
  2541. *** 22,32 ****
  2542.   
  2543.   
  2544.   .text
  2545. !     .align 2,144
  2546. ! .globl _round_Xsig
  2547. ! _round_Xsig:
  2548.       pushl    %ebp
  2549.       movl    %esp,%ebp
  2550.       pushl    %ebx        /* Reserve some space */
  2551. --- 22,28 ----
  2552.   
  2553.   
  2554.   .text
  2555. ! ENTRY(round_Xsig)
  2556.       pushl    %ebp
  2557.       movl    %esp,%ebp
  2558.       pushl    %ebx        /* Reserve some space */
  2559. ***************
  2560. *** 86,95 ****
  2561.   
  2562.   
  2563.   
  2564. !     .align 2,144
  2565. ! .globl _norm_Xsig
  2566. ! _norm_Xsig:
  2567.       pushl    %ebp
  2568.       movl    %esp,%ebp
  2569.       pushl    %ebx        /* Reserve some space */
  2570. --- 82,88 ----
  2571.   
  2572.   
  2573.   
  2574. ! ENTRY(norm_Xsig)
  2575.       pushl    %ebp
  2576.       movl    %esp,%ebp
  2577.       pushl    %ebx        /* Reserve some space */
  2578. diff -c linux/linux/arch/i386/math-emu/shr_Xsig.S:1.1.1.1 linux/linux/arch/i386/math-emu/shr_Xsig.S:1.2
  2579. *** linux/linux/arch/i386/math-emu/shr_Xsig.S:1.1.1.1    Wed May 17 23:57:24 1995
  2580. --- linux/linux/arch/i386/math-emu/shr_Xsig.S    Wed May 17 23:57:24 1995
  2581. ***************
  2582. *** 21,30 ****
  2583.   #include "fpu_asm.h"
  2584.   
  2585.   .text
  2586. !     .align 2,144
  2587. !     .globl    _shr_Xsig
  2588. ! _shr_Xsig:
  2589.       push    %ebp
  2590.       movl    %esp,%ebp
  2591.       pushl    %esi
  2592. --- 21,27 ----
  2593.   #include "fpu_asm.h"
  2594.   
  2595.   .text
  2596. ! ENTRY(shr_Xsig)
  2597.       push    %ebp
  2598.       movl    %esp,%ebp
  2599.       pushl    %esi
  2600. diff -c linux/linux/arch/i386/math-emu/wm_shrx.S:1.1.1.1 linux/linux/arch/i386/math-emu/wm_shrx.S:1.2
  2601. *** linux/linux/arch/i386/math-emu/wm_shrx.S:1.1.1.1    Wed May 17 23:57:24 1995
  2602. --- linux/linux/arch/i386/math-emu/wm_shrx.S    Wed May 17 23:57:25 1995
  2603. ***************
  2604. *** 17,24 ****
  2605.   #include "fpu_asm.h"
  2606.   
  2607.   .text
  2608. -     .align 2,144
  2609.   /*---------------------------------------------------------------------------+
  2610.    |   unsigned shrx(void *arg1, unsigned arg2)                                |
  2611.    |                                                                           |
  2612. --- 17,22 ----
  2613. ***************
  2614. *** 33,41 ****
  2615.    |   Results returned in the 64 bit arg and eax.                             |
  2616.    +---------------------------------------------------------------------------*/
  2617.   
  2618. !     .globl    _shrx
  2619. ! _shrx:
  2620.       push    %ebp
  2621.       movl    %esp,%ebp
  2622.       pushl    %esi
  2623. --- 31,37 ----
  2624.    |   Results returned in the 64 bit arg and eax.                             |
  2625.    +---------------------------------------------------------------------------*/
  2626.   
  2627. ! ENTRY(shrx)
  2628.       push    %ebp
  2629.       movl    %esp,%ebp
  2630.       pushl    %esi
  2631. ***************
  2632. *** 113,120 ****
  2633.    |   part which has been shifted out of the arg.                             |
  2634.    |   Results returned in the 64 bit arg and eax.                             |
  2635.    +---------------------------------------------------------------------------*/
  2636. !     .globl    _shrxs
  2637. ! _shrxs:
  2638.       push    %ebp
  2639.       movl    %esp,%ebp
  2640.       pushl    %esi
  2641. --- 109,115 ----
  2642.    |   part which has been shifted out of the arg.                             |
  2643.    |   Results returned in the 64 bit arg and eax.                             |
  2644.    +---------------------------------------------------------------------------*/
  2645. ! ENTRY(shrxs)
  2646.       push    %ebp
  2647.       movl    %esp,%ebp
  2648.       pushl    %esi
  2649. diff -c linux/linux/arch/i386/math-emu/wm_sqrt.S:1.1.1.1 linux/linux/arch/i386/math-emu/wm_sqrt.S:1.2
  2650. *** linux/linux/arch/i386/math-emu/wm_sqrt.S:1.1.1.1    Wed May 17 23:57:25 1995
  2651. --- linux/linux/arch/i386/math-emu/wm_sqrt.S    Wed May 17 23:57:25 1995
  2652. ***************
  2653. *** 74,83 ****
  2654.   
  2655.   
  2656.   .text
  2657. !     .align 2,144
  2658. ! .globl _wm_sqrt
  2659. ! _wm_sqrt:
  2660.       pushl    %ebp
  2661.       movl    %esp,%ebp
  2662.   #ifndef NON_REENTRANT_FPU
  2663. --- 74,80 ----
  2664.   
  2665.   
  2666.   .text
  2667. ! ENTRY(wm_sqrt)
  2668.       pushl    %ebp
  2669.       movl    %esp,%ebp
  2670.   #ifndef NON_REENTRANT_FPU
  2671. diff -c linux/linux/arch/i386/mm/init.c:1.1.1.2 linux/linux/arch/i386/mm/init.c:1.3
  2672. *** linux/linux/arch/i386/mm/init.c:1.1.1.2    Wed May 17 23:57:25 1995
  2673. --- linux/linux/arch/i386/mm/init.c    Wed May 17 23:57:25 1995
  2674. ***************
  2675. *** 161,167 ****
  2676.       int reservedpages = 0;
  2677.       int datapages = 0;
  2678.       unsigned long tmp;
  2679. !     extern int etext;
  2680.   
  2681.       end_mem &= PAGE_MASK;
  2682.       high_memory = end_mem;
  2683. --- 161,167 ----
  2684.       int reservedpages = 0;
  2685.       int datapages = 0;
  2686.       unsigned long tmp;
  2687. !     extern int _etext;
  2688.   
  2689.       end_mem &= PAGE_MASK;
  2690.       high_memory = end_mem;
  2691. ***************
  2692. *** 194,200 ****
  2693.           if (mem_map[MAP_NR(tmp)]) {
  2694.               if (tmp >= 0xA0000 && tmp < 0x100000)
  2695.                   reservedpages++;
  2696. !             else if (tmp < (unsigned long) &etext)
  2697.                   codepages++;
  2698.               else
  2699.                   datapages++;
  2700. --- 194,200 ----
  2701.           if (mem_map[MAP_NR(tmp)]) {
  2702.               if (tmp >= 0xA0000 && tmp < 0x100000)
  2703.                   reservedpages++;
  2704. !             else if (tmp < (unsigned long) &_etext)
  2705.                   codepages++;
  2706.               else
  2707.                   datapages++;
  2708. diff -c linux/linux/drivers/block/aztcd.c:1.1.1.3 linux/linux/drivers/block/aztcd.c:1.2
  2709. *** linux/linux/drivers/block/aztcd.c:1.1.1.3    Wed May 17 23:57:26 1995
  2710. --- linux/linux/drivers/block/aztcd.c    Wed May 17 23:57:26 1995
  2711. ***************
  2712. *** 1,5 ****
  2713.   #define AZT_VERSION "V1.0"
  2714. ! /*      aztcd.c,v 1.1.1.2 1995/03/29 23:36:22 hjl Exp
  2715.       linux/drivers/block/aztcd.c - AztechCD268 CDROM driver
  2716.   
  2717.       Copyright (C) 1994,1995 Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
  2718. --- 1,5 ----
  2719.   #define AZT_VERSION "V1.0"
  2720. ! /*      $Id: aztcd.c,v 1.2 1995/04/22 13:09:11 hjl Exp $
  2721.       linux/drivers/block/aztcd.c - AztechCD268 CDROM driver
  2722.   
  2723.       Copyright (C) 1994,1995 Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
  2724. ***************
  2725. *** 134,143 ****
  2726.   
  2727.   #define MAJOR_NR AZTECH_CDROM_MAJOR 
  2728.   
  2729. ! #ifdef MODULE
  2730. ! # include "/usr/src/linux/drivers/block/blk.h"
  2731. ! #else
  2732. ! # include "blk.h"
  2733.   # define MOD_INC_USE_COUNT
  2734.   # define MOD_DEC_USE_COUNT
  2735.   #endif
  2736. --- 134,142 ----
  2737.   
  2738.   #define MAJOR_NR AZTECH_CDROM_MAJOR 
  2739.   
  2740. ! #include "blk.h"
  2741. ! #ifndef MODULE
  2742.   # define MOD_INC_USE_COUNT
  2743.   # define MOD_DEC_USE_COUNT
  2744.   #endif
  2745. diff -c linux/linux/drivers/block/sonycd535.c:1.1.1.1 linux/linux/drivers/block/sonycd535.c:1.2
  2746. *** linux/linux/drivers/block/sonycd535.c:1.1.1.1    Wed May 17 23:57:27 1995
  2747. --- linux/linux/drivers/block/sonycd535.c    Wed May 17 23:57:27 1995
  2748. ***************
  2749. *** 130,139 ****
  2750.   
  2751.   #define MAJOR_NR CDU535_CDROM_MAJOR
  2752.   
  2753. ! #ifdef MODULE
  2754. ! # include "/usr/src/linux/drivers/block/blk.h"
  2755. ! #else
  2756. ! # include "blk.h"
  2757.   # define MOD_INC_USE_COUNT
  2758.   # define MOD_DEC_USE_COUNT
  2759.   #endif
  2760. --- 130,138 ----
  2761.   
  2762.   #define MAJOR_NR CDU535_CDROM_MAJOR
  2763.   
  2764. ! #include "blk.h"
  2765. ! #ifndef MODULE
  2766.   # define MOD_INC_USE_COUNT
  2767.   # define MOD_DEC_USE_COUNT
  2768.   #endif
  2769. diff -c linux/linux/drivers/scsi/53c7,8xx.c:1.1.1.4 linux/linux/drivers/scsi/53c7,8xx.c:1.7
  2770. *** linux/linux/drivers/scsi/53c7,8xx.c:1.1.1.4    Wed May 17 23:57:28 1995
  2771. --- linux/linux/drivers/scsi/53c7,8xx.c    Wed May 17 23:57:28 1995
  2772. ***************
  2773. *** 2266,2278 ****
  2774.        * and SCSI recommended .5s selection timeout.
  2775.        */
  2776.   
  2777.       NCR53c7x0_write8(STIME0_REG_800, 
  2778.           ((14 << STIME0_800_SEL_SHIFT) & STIME0_800_SEL_MASK) 
  2779.   /* Disable HTH interrupt */
  2780. ! #if 0
  2781. !     | ((15 << STIME0_800_HTH_SHIFT) & STIME0_800_HTH_MASK)
  2782.   #endif
  2783. -     );
  2784.   
  2785.   
  2786.   
  2787. --- 2266,2284 ----
  2788.        * and SCSI recommended .5s selection timeout.
  2789.        */
  2790.   
  2791. +     /*
  2792. +      * The new gcc won't recognize preprocessing directives
  2793. +      * within macro args.
  2794. +      */
  2795. + #if 0
  2796.       NCR53c7x0_write8(STIME0_REG_800, 
  2797.           ((14 << STIME0_800_SEL_SHIFT) & STIME0_800_SEL_MASK) 
  2798.   /* Disable HTH interrupt */
  2799. !     | ((15 << STIME0_800_HTH_SHIFT) & STIME0_800_HTH_MASK));
  2800. ! #else
  2801. !     NCR53c7x0_write8(STIME0_REG_800, 
  2802. !         ((14 << STIME0_800_SEL_SHIFT) & STIME0_800_SEL_MASK));
  2803.   #endif
  2804.   
  2805.   
  2806.   
  2807. diff -c linux/linux/drivers/scsi/seagate.c:1.1.1.2 linux/linux/drivers/scsi/seagate.c:1.3
  2808. *** linux/linux/drivers/scsi/seagate.c:1.1.1.2    Wed May 17 23:57:31 1995
  2809. --- linux/linux/drivers/scsi/seagate.c    Wed May 17 23:57:31 1995
  2810. ***************
  2811. *** 1105,1112 ****
  2812.   
  2813.       cld
  2814.   
  2815. !     movl _st0x_cr_sr, %%ebx
  2816. !     movl _st0x_dr, %%edi
  2817.       
  2818.   1:    movb (%%ebx), %%al\n"
  2819.   /*
  2820. --- 1105,1112 ----
  2821.   
  2822.       cld
  2823.   
  2824. !     movl " SYMBOL_NAME_STR(st0x_cr_sr) ", %%ebx
  2825. !     movl " SYMBOL_NAME_STR(st0x_dr) ", %%edi
  2826.       
  2827.   1:    movb (%%ebx), %%al\n"
  2828.   /*
  2829. ***************
  2830. *** 1241,1248 ****
  2831.       jz 2f
  2832.   
  2833.       cld
  2834. !     movl _st0x_cr_sr, %%esi
  2835. !     movl _st0x_dr, %%ebx
  2836.   
  2837.   1:    movb (%%esi), %%al\n"
  2838.   /*
  2839. --- 1241,1248 ----
  2840.       jz 2f
  2841.   
  2842.       cld
  2843. !     movl " SYMBOL_NAME_STR(st0x_cr_sr) ", %%esi
  2844. !     movl " SYMBOL_NAME_STR(st0x_dr) ", %%ebx
  2845.   
  2846.   1:    movb (%%esi), %%al\n"
  2847.   /*
  2848. diff -c linux/linux/fs/binfmt_elf.c:1.1.1.1 linux/linux/fs/binfmt_elf.c:1.4
  2849. *** linux/linux/fs/binfmt_elf.c:1.1.1.1    Wed May 17 23:57:32 1995
  2850. --- linux/linux/fs/binfmt_elf.c    Wed May 17 23:57:32 1995
  2851. ***************
  2852. *** 18,23 ****
  2853. --- 18,24 ----
  2854.   #endif
  2855.   
  2856.   #include <linux/fs.h>
  2857. + #include <linux/stat.h>
  2858.   #include <linux/sched.h>
  2859.   #include <linux/mm.h>
  2860.   #include <linux/mman.h>
  2861. ***************
  2862. *** 31,36 ****
  2863. --- 32,38 ----
  2864.   #include <linux/malloc.h>
  2865.   #include <linux/shm.h>
  2866.   #include <linux/personality.h>
  2867. + #include <linux/elfcore.h>
  2868.   
  2869.   #include <asm/segment.h>
  2870.   #include <asm/pgtable.h>
  2871. ***************
  2872. *** 48,59 ****
  2873.   
  2874.   static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
  2875.   static int load_elf_library(int fd);
  2876.   
  2877.   struct linux_binfmt elf_format = {
  2878.   #ifndef MODULE
  2879. !     NULL, NULL, load_elf_binary, load_elf_library, NULL
  2880.   #else
  2881. !     NULL, &mod_use_count_, load_elf_binary, load_elf_library, NULL
  2882.   #endif
  2883.   };
  2884.   
  2885. --- 50,63 ----
  2886.   
  2887.   static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
  2888.   static int load_elf_library(int fd);
  2889. + static int elf_core_dump(long signr, struct pt_regs * regs);
  2890. + extern int dump_fpu (elf_fpregset_t *);
  2891.   
  2892.   struct linux_binfmt elf_format = {
  2893.   #ifndef MODULE
  2894. !     NULL, NULL, load_elf_binary, load_elf_library, elf_core_dump
  2895.   #else
  2896. !     NULL, &mod_use_count_, load_elf_binary, load_elf_library, elf_core_dump
  2897.   #endif
  2898.   };
  2899.   
  2900. ***************
  2901. *** 732,737 ****
  2902. --- 736,1146 ----
  2903.       return 0;
  2904.   }
  2905.   
  2906. + /*
  2907. +  * ELF core dumper
  2908. +  *
  2909. +  * Modelled on fs/exec.c:aout_core_dump()
  2910. +  * Jeremy Fitzhardinge <jeremy@sw.oz.au>
  2911. +  */
  2912. + /*
  2913. +  * These are the only things you should do on a core-file: use only these
  2914. +  * functions to write out all the necessary info.
  2915. +  */
  2916. + static int dump_write(struct file *file, void *addr, int nr)
  2917. + {
  2918. +     return file->f_op->write(file->f_inode, file, addr, nr) == nr;
  2919. + }
  2920. + static int dump_seek(struct file *file, off_t off)
  2921. + {
  2922. +     if (file->f_op->lseek) {
  2923. +         if (file->f_op->lseek(file->f_inode, file, off, 0) != off)
  2924. +             return 0;
  2925. +     } else
  2926. +         file->f_pos = off;
  2927. +     return 1;
  2928. + }
  2929. + /*
  2930. +  * Decide whether a segment is worth dumping; default is yes to be
  2931. +  * sure (missing info is worse than too much; etc).
  2932. +  * Personally I'd include everything, and use the coredump limit...
  2933. +  *
  2934. +  * I think we should skip something. But I am not sure how. H.J.
  2935. +  */
  2936. + static inline int maydump(struct vm_area_struct *vma)
  2937. + {
  2938. + #if 1
  2939. +     if (vma->vm_flags & (VM_WRITE|VM_GROWSUP|VM_GROWSDOWN))
  2940. +         return 1;
  2941. +     if (vma->vm_flags & (VM_READ|VM_EXEC|VM_EXECUTABLE|VM_SHARED))
  2942. +         return 0;
  2943. + #endif
  2944. +     return 1;
  2945. + }
  2946. + #define roundup(x, y)  ((((x)+((y)-1))/(y))*(y))
  2947. + /* An ELF note in memory */
  2948. + struct memelfnote
  2949. + {
  2950. +     char *name;
  2951. +     int type;
  2952. +     unsigned int datasz;
  2953. +     void *data;
  2954. + };
  2955. + static int notesize(struct memelfnote *en)
  2956. + {
  2957. +     int sz;
  2958. +     
  2959. +     sz = sizeof(struct elf_note);
  2960. +     sz += roundup(strlen(en->name), 4);
  2961. +     sz += roundup(en->datasz, 4);
  2962. +     
  2963. +     return sz;
  2964. + }
  2965. + /* #define DEBUG */
  2966. + #ifdef DEBUG
  2967. + static void dump_regs(const char *str, elf_greg_t *r)
  2968. + {
  2969. +     int i;
  2970. +     static const char *regs[] = { "ebx", "ecx", "edx", "esi", "edi", "ebp",
  2971. +                           "eax", "ds", "es", "fs", "gs",
  2972. +                           "orig_eax", "eip", "cs",
  2973. +                           "efl", "uesp", "ss"};
  2974. +     printk("Registers: %s\n", str);
  2975. +     for(i = 0; i < ELF_NGREG; i++)
  2976. +     {
  2977. +         unsigned long val = r[i];
  2978. +         printk("   %-2d %-5s=%08lx %lu\n", i, regs[i], val, val);
  2979. +     }
  2980. + }
  2981. + #endif
  2982. + #define DUMP_WRITE(addr, nr)    \
  2983. +     do { if (!dump_write(file, (addr), (nr))) return 0; } while(0)
  2984. + #define DUMP_SEEK(off)    \
  2985. +     do { if (!dump_seek(file, (off))) return 0; } while(0)
  2986. + static int writenote(struct memelfnote *men, struct file *file)
  2987. + {
  2988. +     struct elf_note en;
  2989. +     en.n_namesz = strlen(men->name);
  2990. +     en.n_descsz = men->datasz;
  2991. +     en.n_type = men->type;
  2992. +     DUMP_WRITE(&en, sizeof(en));
  2993. +     DUMP_WRITE(men->name, en.n_namesz);
  2994. +     /* XXX - cast from long long to long to avoid need for libgcc.a */
  2995. +     DUMP_SEEK(roundup((unsigned long)file->f_pos, 4));    /* XXX */
  2996. +     DUMP_WRITE(men->data, men->datasz);
  2997. +     DUMP_SEEK(roundup((unsigned long)file->f_pos, 4));    /* XXX */
  2998. +     
  2999. +     return 1;
  3000. + }
  3001. + #undef DUMP_WRITE
  3002. + #undef DUMP_SEEK
  3003. + #define DUMP_WRITE(addr, nr)    \
  3004. +     if (!dump_write(&file, (addr), (nr))) \
  3005. +         goto close_coredump;
  3006. + #define DUMP_SEEK(off)    \
  3007. +     if (!dump_seek(&file, (off))) \
  3008. +         goto close_coredump;
  3009. + /*
  3010. +  * Actual dumper
  3011. +  *
  3012. +  * This is a two-pass process; first we find the offsets of the bits,
  3013. +  * and then they are actually written out.  If we run out of core limit
  3014. +  * we just truncate.
  3015. +  */
  3016. + static int elf_core_dump(long signr, struct pt_regs * regs)
  3017. + {
  3018. +     int has_dumped = 0;
  3019. +     struct file file;
  3020. +     struct inode *inode;
  3021. +     unsigned short fs;
  3022. +     char corefile[6+sizeof(current->comm)];
  3023. +     int segs;
  3024. +     int i;
  3025. +     size_t size;
  3026. +     struct vm_area_struct *vma;
  3027. +     struct elfhdr elf;
  3028. +     off_t offset = 0, dataoff;
  3029. +     int limit = current->rlim[RLIMIT_CORE].rlim_cur;
  3030. +     int numnote = 4;
  3031. +     struct memelfnote notes[4];
  3032. +     struct elf_prstatus prstatus;    /* NT_PRSTATUS */
  3033. +     elf_fpregset_t fpu;        /* NT_PRFPREG */
  3034. +     struct elf_prpsinfo psinfo;    /* NT_PRPSINFO */
  3035. +     
  3036. +     if (!current->dumpable || limit < PAGE_SIZE)
  3037. +         return 0;
  3038. +     current->dumpable = 0;
  3039. + #ifndef CONFIG_BINFMT_ELF
  3040. +     MOD_INC_USE_COUNT;
  3041. + #endif
  3042. +     /* Count what's needed to dump, up to the limit of coredump size */
  3043. +     segs = 0;
  3044. +     size = 0;
  3045. +     for(vma = current->mm->mmap; vma != NULL; vma = vma->vm_next) {
  3046. +         int sz = vma->vm_end-vma->vm_start;
  3047. +         
  3048. +         if (!maydump(vma))
  3049. +             continue;
  3050. +         if (size+sz > limit)
  3051. +             break;
  3052. +         
  3053. +         segs++;
  3054. +         size += sz;
  3055. +     }
  3056. + #ifdef DEBUG
  3057. +     printk("elf_core_dump: %d segs taking %d bytes\n", segs, size);
  3058. + #endif
  3059. +     /* Set up header */
  3060. +     memcpy(elf.e_ident, ELFMAG, SELFMAG);
  3061. +     elf.e_ident[EI_CLASS] = ELFCLASS32;
  3062. +     elf.e_ident[EI_DATA] = ELFDATA2LSB;
  3063. +     elf.e_ident[EI_VERSION] = EV_CURRENT;
  3064. +     memset(elf.e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD);
  3065. +     
  3066. +     elf.e_type = ET_CORE;
  3067. +     elf.e_machine = EM_386;
  3068. +     elf.e_version = EV_CURRENT;
  3069. +     elf.e_entry = 0;
  3070. +     elf.e_phoff = sizeof(elf);
  3071. +     elf.e_shoff = 0;
  3072. +     elf.e_flags = 0;
  3073. +     elf.e_ehsize = sizeof(elf);
  3074. +     elf.e_phentsize = sizeof(struct elf_phdr);
  3075. +     elf.e_phnum = segs+1;        /* Include notes */
  3076. +     elf.e_shentsize = 0;
  3077. +     elf.e_shnum = 0;
  3078. +     elf.e_shstrndx = 0;
  3079. +     
  3080. +     fs = get_fs();
  3081. +     set_fs(KERNEL_DS);
  3082. +     memcpy(corefile,"core.",5);
  3083. + #if 0
  3084. +     memcpy(corefile+5,current->comm,sizeof(current->comm));
  3085. + #else
  3086. +     corefile[4] = '\0';
  3087. + #endif
  3088. +     if (open_namei(corefile,O_CREAT | 2 | O_TRUNC,0600,&inode,NULL)) {
  3089. +         inode = NULL;
  3090. +         goto end_coredump;
  3091. +     }
  3092. +     if (!S_ISREG(inode->i_mode))
  3093. +         goto end_coredump;
  3094. +     if (!inode->i_op || !inode->i_op->default_file_ops)
  3095. +         goto end_coredump;
  3096. +     file.f_mode = 3;
  3097. +     file.f_flags = 0;
  3098. +     file.f_count = 1;
  3099. +     file.f_inode = inode;
  3100. +     file.f_pos = 0;
  3101. +     file.f_reada = 0;
  3102. +     file.f_op = inode->i_op->default_file_ops;
  3103. +     if (file.f_op->open)
  3104. +         if (file.f_op->open(inode,&file))
  3105. +             goto end_coredump;
  3106. +     if (!file.f_op->write)
  3107. +         goto close_coredump;
  3108. +     has_dumped = 1;
  3109. +     DUMP_WRITE(&elf, sizeof(elf));
  3110. +     offset += sizeof(elf);                /* Elf header */
  3111. +     offset += (segs+1) * sizeof(struct elf_phdr);    /* Program headers */
  3112. +     /*
  3113. +      * Set up the notes in similar form to SVR4 core dumps made
  3114. +      * with info from their /proc.
  3115. +      */
  3116. +     memset(&psinfo, 0, sizeof(psinfo));
  3117. +     memset(&prstatus, 0, sizeof(prstatus));
  3118. +     notes[0].name = "CORE";
  3119. +     notes[0].type = NT_PRSTATUS;
  3120. +     notes[0].datasz = sizeof(prstatus);
  3121. +     notes[0].data = &prstatus;
  3122. +     prstatus.pr_info.si_signo = prstatus.pr_cursig = signr;
  3123. +     prstatus.pr_sigpend = current->signal;
  3124. +     prstatus.pr_sighold = current->blocked;
  3125. +     psinfo.pr_pid = prstatus.pr_pid = current->pid;
  3126. +     psinfo.pr_ppid = prstatus.pr_ppid = current->p_pptr->pid;
  3127. +     psinfo.pr_pgrp = prstatus.pr_pgrp = current->pgrp;
  3128. +     psinfo.pr_sid = prstatus.pr_sid = current->session;
  3129. +     prstatus.pr_utime.tv_sec = CT_TO_SECS(current->utime);
  3130. +     prstatus.pr_utime.tv_usec = CT_TO_USECS(current->utime);
  3131. +     prstatus.pr_stime.tv_sec = CT_TO_SECS(current->stime);
  3132. +     prstatus.pr_stime.tv_usec = CT_TO_USECS(current->stime);
  3133. +     prstatus.pr_cutime.tv_sec = CT_TO_SECS(current->cutime);
  3134. +     prstatus.pr_cutime.tv_usec = CT_TO_USECS(current->cutime);
  3135. +     prstatus.pr_cstime.tv_sec = CT_TO_SECS(current->cstime);
  3136. +     prstatus.pr_cstime.tv_usec = CT_TO_USECS(current->cstime);
  3137. +     if (sizeof(elf_gregset_t) != sizeof(struct pt_regs))
  3138. +     {
  3139. +         printk("sizeof(elf_gregset_t) (%d) != sizeof(struct pt_regs) (%d)\n",
  3140. +             sizeof(elf_gregset_t), sizeof(struct pt_regs));
  3141. +     }
  3142. +     else
  3143. +         *(struct pt_regs *)&prstatus.pr_reg = *regs;
  3144. +     
  3145. + #ifdef DEBUG
  3146. +     dump_regs("Passed in regs", (elf_greg_t *)regs);
  3147. +     dump_regs("prstatus regs", (elf_greg_t *)&prstatus.pr_reg);
  3148. + #endif
  3149. +     notes[1].name = "CORE";
  3150. +     notes[1].type = NT_PRPSINFO;
  3151. +     notes[1].datasz = sizeof(psinfo);
  3152. +     notes[1].data = &psinfo;
  3153. +     psinfo.pr_state = current->state;
  3154. +     psinfo.pr_sname = (current->state < 0 || current->state > 5) ? '.' : "RSDZTD"[current->state];
  3155. +     psinfo.pr_zomb = psinfo.pr_sname == 'Z';
  3156. +     psinfo.pr_nice = current->priority-15;
  3157. +     psinfo.pr_flag = current->flags;
  3158. +     psinfo.pr_uid = current->uid;
  3159. +     psinfo.pr_gid = current->gid;
  3160. +     {
  3161. +         int i, len;
  3162. +         set_fs(fs);
  3163. +         
  3164. +         len = current->mm->arg_end - current->mm->arg_start;
  3165. +         len = len >= ELF_PRARGSZ ? ELF_PRARGSZ : len;
  3166. +         memcpy_fromfs(&psinfo.pr_psargs,
  3167. +                   (const char *)current->mm->arg_start, len);
  3168. +         for(i = 0; i < len; i++)
  3169. +             if (psinfo.pr_psargs[i] == 0)
  3170. +                 psinfo.pr_psargs[i] = ' ';
  3171. +         psinfo.pr_psargs[len] = 0;
  3172. +         set_fs(KERNEL_DS);
  3173. +     }
  3174. +     strncpy(psinfo.pr_fname, current->comm, sizeof(psinfo.pr_fname));
  3175. +     notes[2].name = "CORE";
  3176. +     notes[2].type = NT_TASKSTRUCT;
  3177. +     notes[2].datasz = sizeof(*current);
  3178. +     notes[2].data = current;
  3179. +     
  3180. +     /* Try to dump the fpu. */
  3181. +     prstatus.pr_fpvalid = dump_fpu (&fpu);
  3182. +     if (!prstatus.pr_fpvalid)
  3183. +     {
  3184. +         numnote--;
  3185. +     }
  3186. +     else
  3187. +     {
  3188. +         notes[3].name = "CORE";
  3189. +         notes[3].type = NT_PRFPREG;
  3190. +         notes[3].datasz = sizeof(fpu);
  3191. +         notes[3].data = &fpu;
  3192. +     }
  3193. +     
  3194. +     /* Write notes phdr entry */
  3195. +     {
  3196. +         struct elf_phdr phdr;
  3197. +         int sz = 0;
  3198. +         for(i = 0; i < numnote; i++)
  3199. +             sz += notesize(¬es[i]);
  3200. +         
  3201. +         phdr.p_type = PT_NOTE;
  3202. +         phdr.p_offset = offset;
  3203. +         phdr.p_vaddr = 0;
  3204. +         phdr.p_paddr = 0;
  3205. +         phdr.p_filesz = sz;
  3206. +         phdr.p_memsz = 0;
  3207. +         phdr.p_flags = 0;
  3208. +         phdr.p_align = 0;
  3209. +         offset += phdr.p_filesz;
  3210. +         DUMP_WRITE(&phdr, sizeof(phdr));
  3211. +     }
  3212. +     /* Page-align dumped data */
  3213. +     dataoff = offset = roundup(offset, PAGE_SIZE);
  3214. +     
  3215. +     /* Write program headers for segments dump */
  3216. +     for(vma = current->mm->mmap, i = 0;
  3217. +         i < segs && vma != NULL; vma = vma->vm_next) {
  3218. +         struct elf_phdr phdr;
  3219. +         size_t sz;
  3220. +         if (!maydump(vma))
  3221. +             continue;
  3222. +         i++;
  3223. +         sz = vma->vm_end - vma->vm_start;
  3224. +         
  3225. +         phdr.p_type = PT_LOAD;
  3226. +         phdr.p_offset = offset;
  3227. +         phdr.p_vaddr = vma->vm_start;
  3228. +         phdr.p_paddr = 0;
  3229. +         phdr.p_filesz = sz;
  3230. +         phdr.p_memsz = sz;
  3231. +         offset += sz;
  3232. +         phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
  3233. +         if (vma->vm_flags & VM_WRITE) phdr.p_flags |= PF_W;
  3234. +         if (vma->vm_flags & VM_EXEC) phdr.p_flags |= PF_X;
  3235. +         phdr.p_align = PAGE_SIZE;
  3236. +         DUMP_WRITE(&phdr, sizeof(phdr));
  3237. +     }
  3238. +     for(i = 0; i < numnote; i++)
  3239. +         if (!writenote(¬es[i], &file))
  3240. +             goto close_coredump;
  3241. +     
  3242. +     set_fs(fs);
  3243. +     DUMP_SEEK(dataoff);
  3244. +     
  3245. +     for(i = 0, vma = current->mm->mmap;
  3246. +         i < segs && vma != NULL;
  3247. +         vma = vma->vm_next) {
  3248. +         unsigned long addr = vma->vm_start;
  3249. +         unsigned long len = vma->vm_end - vma->vm_start;
  3250. +         
  3251. +         if (!maydump(vma))
  3252. +             continue;
  3253. +         i++;
  3254. + #ifdef DEBUG
  3255. +         printk("elf_core_dump: writing %08lx %lx\n", addr, len);
  3256. + #endif
  3257. +         DUMP_WRITE((void *)addr, len);
  3258. +     }
  3259. +     if (file.f_pos != offset) {
  3260. +         /* Sanity check */
  3261. +         printk("elf_core_dump: file.f_pos (%ld) != offset (%ld)\n",
  3262. +                file.f_pos, offset);
  3263. +     }
  3264. +  close_coredump:
  3265. +     if (file.f_op->release)
  3266. +         file.f_op->release(inode,&file);
  3267. +  end_coredump:
  3268. +     set_fs(fs);
  3269. +     iput(inode);
  3270. + #ifndef CONFIG_BINFMT_ELF
  3271. +     MOD_DEC_USE_COUNT;
  3272. + #endif
  3273. +     return has_dumped;
  3274. + }
  3275.   #ifdef MODULE
  3276.   char kernel_version[] = UTS_RELEASE;
  3277.   
  3278. ***************
  3279. *** 743,748 ****
  3280. --- 1152,1158 ----
  3281.       register_binfmt(&elf_format);
  3282.       return 0;
  3283.   }
  3284.   
  3285.   void cleanup_module( void) {
  3286.       
  3287. diff -c linux/linux/include/asm-i386/irq.h:1.1.1.1 linux/linux/include/asm-i386/irq.h:1.2
  3288. *** linux/linux/include/asm-i386/irq.h:1.1.1.1    Wed May 17 23:57:33 1995
  3289. --- linux/linux/include/asm-i386/irq.h    Wed May 17 23:57:33 1995
  3290. ***************
  3291. *** 79,86 ****
  3292.       "inb $0x21,%al\n\t" \
  3293.       "jmp 1f\n" \
  3294.       "1:\tjmp 1f\n" \
  3295. !     "1:\torb $" #mask ",_cache_21\n\t" \
  3296. !     "movb _cache_21,%al\n\t" \
  3297.       "outb %al,$0x21\n\t" \
  3298.       "jmp 1f\n" \
  3299.       "1:\tjmp 1f\n" \
  3300. --- 79,86 ----
  3301.       "inb $0x21,%al\n\t" \
  3302.       "jmp 1f\n" \
  3303.       "1:\tjmp 1f\n" \
  3304. !     "1:\torb $" #mask ","SYMBOL_NAME_STR(cache_21)"\n\t" \
  3305. !     "movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
  3306.       "outb %al,$0x21\n\t" \
  3307.       "jmp 1f\n" \
  3308.       "1:\tjmp 1f\n" \
  3309. ***************
  3310. *** 91,98 ****
  3311.       "inb $0xA1,%al\n\t" \
  3312.       "jmp 1f\n" \
  3313.       "1:\tjmp 1f\n" \
  3314. !     "1:\torb $" #mask ",_cache_A1\n\t" \
  3315. !     "movb _cache_A1,%al\n\t" \
  3316.       "outb %al,$0xA1\n\t" \
  3317.       "jmp 1f\n" \
  3318.       "1:\tjmp 1f\n" \
  3319. --- 91,98 ----
  3320.       "inb $0xA1,%al\n\t" \
  3321.       "jmp 1f\n" \
  3322.       "1:\tjmp 1f\n" \
  3323. !     "1:\torb $" #mask ","SYMBOL_NAME_STR(cache_A1)"\n\t" \
  3324. !     "movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
  3325.       "outb %al,$0xA1\n\t" \
  3326.       "jmp 1f\n" \
  3327.       "1:\tjmp 1f\n" \
  3328. ***************
  3329. *** 106,121 ****
  3330.       "inb $0x21,%al\n\t" \
  3331.       "jmp 1f\n" \
  3332.       "1:\tjmp 1f\n" \
  3333. !     "1:\tandb $~(" #mask "),_cache_21\n\t" \
  3334. !     "movb _cache_21,%al\n\t" \
  3335.       "outb %al,$0x21\n\t"
  3336.   
  3337.   #define UNBLK_SECOND(mask) \
  3338.       "inb $0xA1,%al\n\t" \
  3339.       "jmp 1f\n" \
  3340.       "1:\tjmp 1f\n" \
  3341. !     "1:\tandb $~(" #mask "),_cache_A1\n\t" \
  3342. !     "movb _cache_A1,%al\n\t" \
  3343.       "outb %al,$0xA1\n\t"
  3344.   
  3345.   #define IRQ_NAME2(nr) nr##_interrupt(void)
  3346. --- 106,121 ----
  3347.       "inb $0x21,%al\n\t" \
  3348.       "jmp 1f\n" \
  3349.       "1:\tjmp 1f\n" \
  3350. !     "1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_21)"\n\t" \
  3351. !     "movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
  3352.       "outb %al,$0x21\n\t"
  3353.   
  3354.   #define UNBLK_SECOND(mask) \
  3355.       "inb $0xA1,%al\n\t" \
  3356.       "jmp 1f\n" \
  3357.       "1:\tjmp 1f\n" \
  3358. !     "1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_A1)"\n\t" \
  3359. !     "movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
  3360.       "outb %al,$0xA1\n\t"
  3361.   
  3362.   #define IRQ_NAME2(nr) nr##_interrupt(void)
  3363. ***************
  3364. *** 128,163 ****
  3365.   asmlinkage void FAST_IRQ_NAME(nr); \
  3366.   asmlinkage void BAD_IRQ_NAME(nr); \
  3367.   __asm__( \
  3368. ! "\n.align 4\n" \
  3369. ! "_IRQ" #nr "_interrupt:\n\t" \
  3370.       "pushl $-"#nr"-2\n\t" \
  3371.       SAVE_ALL \
  3372.       ACK_##chip(mask) \
  3373. !     "incl _intr_count\n\t"\
  3374.       "sti\n\t" \
  3375.       "movl %esp,%ebx\n\t" \
  3376.       "pushl %ebx\n\t" \
  3377.       "pushl $" #nr "\n\t" \
  3378. !     "call _do_IRQ\n\t" \
  3379.       "addl $8,%esp\n\t" \
  3380.       "cli\n\t" \
  3381.       UNBLK_##chip(mask) \
  3382. !     "decl _intr_count\n\t" \
  3383.       "jmp ret_from_sys_call\n" \
  3384. ! "\n.align 4\n" \
  3385. ! "_fast_IRQ" #nr "_interrupt:\n\t" \
  3386.       SAVE_MOST \
  3387.       ACK_##chip(mask) \
  3388. !     "incl _intr_count\n\t" \
  3389.       "pushl $" #nr "\n\t" \
  3390. !     "call _do_fast_IRQ\n\t" \
  3391.       "addl $4,%esp\n\t" \
  3392.       "cli\n\t" \
  3393.       UNBLK_##chip(mask) \
  3394. !     "decl _intr_count\n\t" \
  3395.       RESTORE_MOST \
  3396. ! "\n\n.align 4\n" \
  3397. ! "_bad_IRQ" #nr "_interrupt:\n\t" \
  3398.       SAVE_MOST \
  3399.       ACK_##chip(mask) \
  3400.       RESTORE_MOST);
  3401. --- 128,163 ----
  3402.   asmlinkage void FAST_IRQ_NAME(nr); \
  3403.   asmlinkage void BAD_IRQ_NAME(nr); \
  3404.   __asm__( \
  3405. ! "\n"ALIGN_STR"\n" \
  3406. ! SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
  3407.       "pushl $-"#nr"-2\n\t" \
  3408.       SAVE_ALL \
  3409.       ACK_##chip(mask) \
  3410. !     "incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
  3411.       "sti\n\t" \
  3412.       "movl %esp,%ebx\n\t" \
  3413.       "pushl %ebx\n\t" \
  3414.       "pushl $" #nr "\n\t" \
  3415. !     "call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
  3416.       "addl $8,%esp\n\t" \
  3417.       "cli\n\t" \
  3418.       UNBLK_##chip(mask) \
  3419. !     "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \
  3420.       "jmp ret_from_sys_call\n" \
  3421. ! "\n"ALIGN_STR"\n" \
  3422. ! SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \
  3423.       SAVE_MOST \
  3424.       ACK_##chip(mask) \
  3425. !     "incl "SYMBOL_NAME_STR(intr_count)"\n\t" \
  3426.       "pushl $" #nr "\n\t" \
  3427. !     "call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \
  3428.       "addl $4,%esp\n\t" \
  3429.       "cli\n\t" \
  3430.       UNBLK_##chip(mask) \
  3431. !     "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \
  3432.       RESTORE_MOST \
  3433. ! "\n"ALIGN_STR"\n" \
  3434. ! SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
  3435.       SAVE_MOST \
  3436.       ACK_##chip(mask) \
  3437.       RESTORE_MOST);
  3438. diff -c linux/linux/include/asm-i386/processor.h:1.1.1.1 linux/linux/include/asm-i386/processor.h:1.2
  3439. *** linux/linux/include/asm-i386/processor.h:1.1.1.1    Wed May 17 23:57:33 1995
  3440. --- linux/linux/include/asm-i386/processor.h    Wed May 17 23:57:34 1995
  3441. ***************
  3442. *** 22,31 ****
  3443.   extern char hlt_works_ok;    /* problems on some 486Dx4's and old 386's */
  3444.   
  3445.   #define start_bh_atomic() \
  3446. ! __asm__ __volatile__("incl _intr_count")
  3447.   
  3448.   #define end_bh_atomic() \
  3449. ! __asm__ __volatile__("decl _intr_count")
  3450.   
  3451.   /*
  3452.    * Bus types (default is ISA, but people can check others with these..)
  3453. --- 22,31 ----
  3454.   extern char hlt_works_ok;    /* problems on some 486Dx4's and old 386's */
  3455.   
  3456.   #define start_bh_atomic() \
  3457. ! __asm__ __volatile__("incl " SYMBOL_NAME_STR(intr_count))
  3458.   
  3459.   #define end_bh_atomic() \
  3460. ! __asm__ __volatile__("decl " SYMBOL_NAME_STR(intr_count))
  3461.   
  3462.   /*
  3463.    * Bus types (default is ISA, but people can check others with these..)
  3464. diff -c linux/linux/include/asm-i386/system.h:1.1.1.1 linux/linux/include/asm-i386/system.h:1.2
  3465. *** linux/linux/include/asm-i386/system.h:1.1.1.1    Wed May 17 23:57:34 1995
  3466. --- linux/linux/include/asm-i386/system.h    Wed May 17 23:57:34 1995
  3467. ***************
  3468. *** 49,58 ****
  3469.    */
  3470.   #define switch_to(tsk) do { \
  3471.   __asm__("cli\n\t" \
  3472. !     "xchgl %%ecx,_current\n\t" \
  3473.       "ljmp %0\n\t" \
  3474.       "sti\n\t" \
  3475. !     "cmpl %%ecx,_last_task_used_math\n\t" \
  3476.       "jne 1f\n\t" \
  3477.       "clts\n" \
  3478.       "1:" \
  3479. --- 49,58 ----
  3480.    */
  3481.   #define switch_to(tsk) do { \
  3482.   __asm__("cli\n\t" \
  3483. !     "xchgl %%ecx,"SYMBOL_NAME_STR(current)"\n\t" \
  3484.       "ljmp %0\n\t" \
  3485.       "sti\n\t" \
  3486. !     "cmpl %%ecx,"SYMBOL_NAME_STR(last_task_used_math)"\n\t" \
  3487.       "jne 1f\n\t" \
  3488.       "clts\n" \
  3489.       "1:" \
  3490. diff -c linux/linux/include/linux/elf.h:1.1.1.2 linux/linux/include/linux/elf.h:1.2
  3491. *** linux/linux/include/linux/elf.h:1.1.1.2    Wed May 17 23:57:35 1995
  3492. --- linux/linux/include/linux/elf.h    Wed May 17 23:57:35 1995
  3493. ***************
  3494. *** 148,153 ****
  3495. --- 148,159 ----
  3496.     Elf32_Half    e_shstrndx;
  3497.   } Elf32_Ehdr;
  3498.   
  3499. + /* These constants define the permissions on sections in the program
  3500. +    header, p_flags. */
  3501. + #define PF_R        0x4
  3502. + #define PF_W        0x2
  3503. + #define PF_X        0x1
  3504.   typedef struct elf_phdr{
  3505.     Elf32_Word    p_type;
  3506.     Elf32_Off    p_offset;
  3507. ***************
  3508. *** 234,239 ****
  3509. --- 240,258 ----
  3510.   #define EV_NONE        0        /* e_version, EI_VERSION */
  3511.   #define EV_CURRENT    1
  3512.   #define EV_NUM        2
  3513. + /* Notes used in ET_CORE */
  3514. + #define NT_PRSTATUS    1
  3515. + #define NT_PRFPREG    2
  3516. + #define NT_PRPSINFO    3
  3517. + #define NT_TASKSTRUCT    4
  3518. + /* Note header in a PT_NOTE section */
  3519. + typedef struct elf_note {
  3520. +   Elf32_Word    n_namesz;    /* Name size */
  3521. +   Elf32_Word    n_descsz;    /* Content size */
  3522. +   Elf32_Word    n_type;        /* Content type */
  3523. + } Elf32_Nhdr;
  3524.   
  3525.   #define ELF_START_MMAP 0x80000000
  3526.   
  3527. diff -c /dev/null linux/linux/include/linux/elfcore.h:1.1
  3528. *** /dev/null    Wed May 17 23:57:35 1995
  3529. --- linux/linux/include/linux/elfcore.h    Wed May 17 23:57:35 1995
  3530. ***************
  3531. *** 0 ****
  3532. --- 1,97 ----
  3533. + #ifndef _LINUX_ELFCORE_H
  3534. + #define _LINUX_ELFCORE_H
  3535. + #include <linux/types.h>
  3536. + #include <linux/signal.h>
  3537. + #include <linux/time.h>
  3538. + #include <linux/ptrace.h>
  3539. + #include <linux/user.h>
  3540. + struct elf_siginfo
  3541. + {
  3542. +     int    si_signo;            /* signal number */
  3543. +     int    si_code;            /* extra code */
  3544. +     int    si_errno;            /* errno */
  3545. + };
  3546. + typedef unsigned long elf_greg_t;
  3547. + #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
  3548. + typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  3549. + typedef struct
  3550. + #ifdef __i386__
  3551. +     user_i387_struct
  3552. + #else
  3553. + #error    "The FPU in this arch is not supported by ELF core dump.".
  3554. + #endif
  3555. + elf_fpregset_t;
  3556. + #ifndef __KERNEL__
  3557. + typedef elf_greg_t greg_t;
  3558. + typedef elf_gregset_t gregset_t;
  3559. + typedef elf_fpregset_t fpregset_t;
  3560. + #define NGREG ELF_NGREG
  3561. + #endif
  3562. + /*
  3563. +  * Definitons to generate Intel SVR4-like core files.
  3564. +  * These mostly have the same names as the SVR4 types with "elf_"
  3565. +  * tacked on the front to prevent clashes with linux definitions,
  3566. +  * and the typedef forms have been avoided.  This is mostly like
  3567. +  * the SVR4 structure, but more Linuxy, with things that Linux does
  3568. +  * not support and which gdb doesn't really use excluded.
  3569. +  * Fields present but not used are marked with "XXX".
  3570. +  */
  3571. + struct elf_prstatus
  3572. + {
  3573. + #if 0
  3574. +     long    pr_flags;    /* XXX Process flags */
  3575. +     short    pr_why;        /* XXX Reason for process halt */
  3576. +     short    pr_what;    /* XXX More detailed reason */
  3577. + #endif
  3578. +     struct elf_siginfo pr_info;    /* Info associated with signal */
  3579. +     short    pr_cursig;    /* Current signal */
  3580. +     sigset_t pr_sigpend;    /* Set of pending signals */
  3581. +     sigset_t pr_sighold;    /* Set of held signals */
  3582. + #if 0
  3583. +     struct sigaltstack pr_altstack;    /* Alternate stack info */
  3584. +     struct sigaction pr_action;    /* Signal action for current sig */
  3585. + #endif
  3586. +     pid_t    pr_pid;
  3587. +     pid_t    pr_ppid;
  3588. +     pid_t    pr_pgrp;
  3589. +     pid_t    pr_sid;
  3590. +     struct timeval pr_utime;    /* User time */
  3591. +     struct timeval pr_stime;    /* System time */
  3592. +     struct timeval pr_cutime;    /* Cumulative user time */
  3593. +     struct timeval pr_cstime;    /* Cumulative system time */
  3594. + #if 0
  3595. +     long    pr_instr;        /* Current instruction */
  3596. + #endif
  3597. +     elf_gregset_t pr_reg;    /* GP registers */
  3598. +     int pr_fpvalid;        /* True if math co-processor being used.  */
  3599. + };
  3600. + #define ELF_PRARGSZ    (80)    /* Number of chars for args */
  3601. + struct elf_prpsinfo
  3602. + {
  3603. +     char    pr_state;    /* numeric process state */
  3604. +     char    pr_sname;    /* char for pr_state */
  3605. +     char    pr_zomb;    /* zombie */
  3606. +     char    pr_nice;    /* nice val */
  3607. +     unsigned long pr_flag;    /* flags */
  3608. +     uid_t    pr_uid;
  3609. +     gid_t    pr_gid;
  3610. +     pid_t    pr_pid, pr_ppid, pr_pgrp, pr_sid;
  3611. +     /* Lots missing */
  3612. +     char    pr_fname[16];    /* filename of executable */
  3613. +     char    pr_psargs[ELF_PRARGSZ];    /* initial part of arg list */
  3614. + };
  3615. + #ifndef __KERNEL__
  3616. + typedef struct elf_prstatus prstatus_t;
  3617. + typedef struct elf_prpsinfo prpsinfo_t;
  3618. + #define PRARGSZ ELF_PRARGSZ 
  3619. + #endif
  3620. + #endif /* _LINUX_ELFCORE_H */
  3621. diff -c linux/linux/include/linux/linkage.h:1.1.1.1 linux/linux/include/linux/linkage.h:1.2
  3622. *** linux/linux/include/linux/linkage.h:1.1.1.1    Wed May 17 23:57:35 1995
  3623. --- linux/linux/include/linux/linkage.h    Wed May 17 23:57:35 1995
  3624. ***************
  3625. *** 7,10 ****
  3626. --- 7,52 ----
  3627.   #define asmlinkage
  3628.   #endif
  3629.   
  3630. + #if !defined(__i486__) && !defined(__i586__)
  3631. + #ifdef __ELF__
  3632. + #define ALIGN .align 4,0x90
  3633. + #define ALIGN_STR ".align 4,0x90"
  3634. + #else  /* __ELF__ */
  3635. + #define ALIGN .align 2,0x90
  3636. + #define ALIGN_STR ".align 2,0x90"
  3637. + #endif /* __ELF__ */
  3638. + #else  /* __i486__/__i586__ */
  3639. + #ifdef __ELF__
  3640. + #define ALIGN .align 16,0x90
  3641. + #define ALIGN_STR ".align 16,0x90"
  3642. + #else  /* __ELF__ */
  3643. + #define ALIGN .align 4,0x90
  3644. + #define ALIGN_STR ".align 4,0x90"
  3645. + #endif /* __ELF__ */
  3646. + #endif /* __i486__/__i586__ */
  3647. + #ifdef __ELF__
  3648. + #define SYMBOL_NAME_STR(X) #X
  3649. + #define SYMBOL_NAME(X) X
  3650. + #ifdef __STDC__
  3651. + #define SYMBOL_NAME_LABEL(X) X##:
  3652. + #else
  3653. + #define SYMBOL_NAME_LABEL(X) X/**/:
  3654. + #endif
  3655. + #else
  3656. + #define SYMBOL_NAME_STR(X) "_"#X
  3657. + #ifdef __STDC__
  3658. + #define SYMBOL_NAME(X) _##X
  3659. + #define SYMBOL_NAME_LABEL(X) _##X##:
  3660. + #else
  3661. + #define SYMBOL_NAME(X) _/**/X
  3662. + #define SYMBOL_NAME_LABEL(X) _/**/X/**/:
  3663. + #endif
  3664. + #endif
  3665. + #define ENTRY(name) \
  3666. +   .globl SYMBOL_NAME(name); \
  3667. +   ALIGN; \
  3668. +   SYMBOL_NAME_LABEL(name)
  3669.   #endif
  3670. diff -c linux/linux/include/linux/symtab_begin.h:1.1.1.1 linux/linux/include/linux/symtab_begin.h:1.2
  3671. *** linux/linux/include/linux/symtab_begin.h:1.1.1.1    Wed May 17 23:57:35 1995
  3672. --- linux/linux/include/linux/symtab_begin.h    Wed May 17 23:57:35 1995
  3673. ***************
  3674. *** 1,16 ****
  3675.   #ifdef CONFIG_MODVERSIONS /* CONFIG_MODVERSIONS */
  3676.   #undef _set_ver
  3677.   #undef X
  3678.   #ifndef __GENKSYMS__
  3679.   #ifdef MODULE
  3680. ! #define _set_ver(sym,ver) { (void *) & sym ## _R ## ver, "_" #sym "_R" #ver }
  3681.   #else /* MODULE */
  3682. ! #define _set_ver(sym,ver) { (void *) & sym, "_" #sym "_R" #ver }
  3683.   #endif /* MODULE */
  3684.   #define X(a) a
  3685.   #endif /* __GENKSYMS__ */
  3686.   #else /* CONFIG_MODVERSIONS */
  3687. ! #define X(sym) { (void *) & sym, "_" #sym }
  3688.   #endif /* CONFIG_MODVERSIONS */
  3689.   #define EMPTY {0,0}
  3690.       0, 0, 0, {
  3691. --- 1,19 ----
  3692. + #include <linux/linkage.h>
  3693.   #ifdef CONFIG_MODVERSIONS /* CONFIG_MODVERSIONS */
  3694.   #undef _set_ver
  3695.   #undef X
  3696.   #ifndef __GENKSYMS__
  3697.   #ifdef MODULE
  3698. ! #define _set_ver(sym,ver) \
  3699. !     { (void *) & sym ## _R ## ver, SYMBOL_NAME_STR(sym) "_R" #ver }
  3700.   #else /* MODULE */
  3701. ! #define _set_ver(sym,ver) \
  3702. !     { (void *) & sym, SYMBOL_NAME_STR(sym) "_R" #ver }
  3703.   #endif /* MODULE */
  3704.   #define X(a) a
  3705.   #endif /* __GENKSYMS__ */
  3706.   #else /* CONFIG_MODVERSIONS */
  3707. ! #define X(sym) { (void *) & sym, SYMBOL_NAME_STR(sym)}
  3708.   #endif /* CONFIG_MODVERSIONS */
  3709.   #define EMPTY {0,0}
  3710.       0, 0, 0, {
  3711. diff -c linux/linux/include/linux/sys.h:1.1.1.1 linux/linux/include/linux/sys.h:1.2
  3712. *** linux/linux/include/linux/sys.h:1.1.1.1    Wed May 17 23:57:35 1995
  3713. --- linux/linux/include/linux/sys.h    Wed May 17 23:57:35 1995
  3714. ***************
  3715. *** 27,32 ****
  3716. --- 27,36 ----
  3717.    * These are system calls that haven't been implemented yet
  3718.    * but have an entry in the table for future expansion..
  3719.    */
  3720. + #ifdef __ELF__
  3721. + #define sys_quotactl    sys_ni_syscall
  3722. + #else
  3723.   #define _sys_quotactl    _sys_ni_syscall
  3724. + #endif
  3725.   
  3726.   #endif
  3727. diff -c linux/linux/include/linux/timex.h:1.1.1.1 linux/linux/include/linux/timex.h:1.2
  3728. *** linux/linux/include/linux/timex.h:1.1.1.1    Wed May 17 23:57:36 1995
  3729. --- linux/linux/include/linux/timex.h    Wed May 17 23:57:36 1995
  3730. ***************
  3731. *** 88,93 ****
  3732. --- 88,106 ----
  3733.                    */
  3734.       struct timeval time;    /* (read only) */
  3735.       long tick;        /* (modified) usecs between clock ticks */
  3736. +         long ppsfreq;           /* pps frequency (scaled ppm) (ro) */
  3737. +         long jitter;            /* pps jitter (us) (ro) */
  3738. +         int shift;              /* interval duration (s) (shift) (ro) */
  3739. +         long stabil;            /* pps stability (scaled ppm) (ro) */
  3740. +         long jitcnt;            /* jitter limit exceeded (ro) */
  3741. +         long calcnt;            /* calibration intervals (ro) */
  3742. +         long errcnt;            /* calibration errors (ro) */
  3743. +         long stbcnt;            /* stability limit exceeded (ro) */
  3744. +     int  :32; int  :32; int  :32; int  :32;
  3745. +     int  :32; int  :32; int  :32; int  :32;
  3746. +     int  :32; int  :32; int  :32; int  :32;
  3747.   };
  3748.   
  3749.   /*
  3750. diff -c linux/linux/kernel/ksyms.c:1.1.1.4 linux/linux/kernel/ksyms.c:1.4
  3751. *** linux/linux/kernel/ksyms.c:1.1.1.4    Wed May 17 23:57:36 1995
  3752. --- linux/linux/kernel/ksyms.c    Wed May 17 23:57:36 1995
  3753. ***************
  3754. *** 81,87 ****
  3755.   struct symbol_table symbol_table = {
  3756.   #include <linux/symtab_begin.h>
  3757.   #ifdef CONFIG_MODVERSIONS
  3758. !     { (void *)1 /* Version version :-) */, "_Using_Versions" },
  3759.   #endif
  3760.       /* stackable module support */
  3761.       X(rename_module_symbol),
  3762. --- 81,88 ----
  3763.   struct symbol_table symbol_table = {
  3764.   #include <linux/symtab_begin.h>
  3765.   #ifdef CONFIG_MODVERSIONS
  3766. !     { (void *)1 /* Version version :-) */,
  3767. !         SYMBOL_NAME_STR (Using_Versions) },
  3768.   #endif
  3769.       /* stackable module support */
  3770.       X(rename_module_symbol),
  3771.