Diff for /linux/kernel/traps.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2018/04/24 18:00:41 version 1.1.1.2, 2018/04/24 18:01:31
Line 1 Line 1
 /*  /*
    *  linux/kernel/traps.c
    *
    *  (C) 1991  Linus Torvalds
    */
   
   /*
  * 'Traps.c' handles hardware traps and faults after we have saved some   * 'Traps.c' handles hardware traps and faults after we have saved some
  * state in 'asm.s'. Currently mostly a debugging-aid, will be extended   * state in 'asm.s'. Currently mostly a debugging-aid, will be extended
  * to mainly kill the offending process (probably by giving it a signal,   * to mainly kill the offending process (probably by giving it a signal,
Line 11 Line 17
 #include <linux/kernel.h>  #include <linux/kernel.h>
 #include <asm/system.h>  #include <asm/system.h>
 #include <asm/segment.h>  #include <asm/segment.h>
   #include <asm/io.h>
   
 #define get_seg_byte(seg,addr) ({ \  #define get_seg_byte(seg,addr) ({ \
 register char __res; \  register char __res; \
Line 50  void general_protection(void); Line 57  void general_protection(void);
 void page_fault(void);  void page_fault(void);
 void coprocessor_error(void);  void coprocessor_error(void);
 void reserved(void);  void reserved(void);
   void parallel_interrupt(void);
   void irq13(void);
   
 static void die(char * str,long esp_ptr,long nr)  static void die(char * str,long esp_ptr,long nr)
 {  {
Line 159  void do_stack_segment(long esp,long erro Line 168  void do_stack_segment(long esp,long erro
   
 void do_coprocessor_error(long esp, long error_code)  void do_coprocessor_error(long esp, long error_code)
 {  {
           if (last_task_used_math != current)
                   return;
         die("coprocessor error",esp,error_code);          die("coprocessor error",esp,error_code);
 }  }
   
 void do_reserved(long esp, long error_code)  void do_reserved(long esp, long error_code)
 {  {
         die("reserved (15,17-31) error",esp,error_code);          die("reserved (15,17-47) error",esp,error_code);
 }  }
   
 void trap_init(void)  void trap_init(void)
Line 188  void trap_init(void) Line 199  void trap_init(void)
         set_trap_gate(14,&page_fault);          set_trap_gate(14,&page_fault);
         set_trap_gate(15,&reserved);          set_trap_gate(15,&reserved);
         set_trap_gate(16,&coprocessor_error);          set_trap_gate(16,&coprocessor_error);
         for (i=17;i<32;i++)          for (i=17;i<48;i++)
                 set_trap_gate(i,&reserved);                  set_trap_gate(i,&reserved);
 /*      __asm__("movl $0x3ff000,%%eax\n\t"          set_trap_gate(45,&irq13);
                 "movl %%eax,%%db0\n\t"          outb_p(inb_p(0x21)&0xfb,0x21);
                 "movl $0x000d0303,%%eax\n\t"          outb(inb_p(0xA1)&0xdf,0xA1);
                 "movl %%eax,%%db7"          set_trap_gate(39,&parallel_interrupt);
                 :::"ax");*/  
 }  }
   

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


unix.superglobalmegacorp.com