]> git.neil.brown.name Git - history.git/commitdiff
Import 1.0.5 1.0.5
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:25 +0000 (15:09 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:25 +0000 (15:09 -0500)
17 files changed:
Makefile
drivers/FPU-emu/README
drivers/FPU-emu/fpu_emu.h
drivers/FPU-emu/fpu_entry.c
drivers/FPU-emu/get_address.c
drivers/FPU-emu/version.h
drivers/char/tty_ioctl.c
drivers/scsi/Makefile
drivers/scsi/aha152x.c
drivers/scsi/aha152x.h
drivers/scsi/aha1542.c
drivers/scsi/fdomain.c
fs/proc/array.c
include/linux/fs.h
include/linux/kernel_stat.h
init/main.c
kernel/irq.c

index d61951966cd74429649b338248c32d34102c9c10..14791b6a6b92a383dc724609e060a622f09f3cf3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 0
-SUBLEVEL = 4
+SUBLEVEL = 5
 
 all:   Version zImage
 
@@ -74,6 +74,7 @@ LD86  =ld86 -0
 
 AS     =as
 LD     =ld
+LDFLAGS        =#-qmagic
 HOSTCC =gcc
 CC     =gcc -D__KERNEL__
 MAKE   =make
index 1ae3263aa59b58e73d4395bec03d1314d9ccbf71..efe0367528c1e4edcfc0fc752c7ab64da43cb049 100644 (file)
@@ -47,7 +47,7 @@ Please report bugs, etc to me at:
 
 
 --Bill Metzenthen
-  Feb 1994
+  March 1994
 
 
 ----------------------- Internals of wm-FPU-emu -----------------------
@@ -92,7 +92,7 @@ is confined to five files:
 ----------------------- Limitations of wm-FPU-emu -----------------------
 
 There are a number of differences between the current wm-FPU-emu
-(version beta 1.10) and the 80486 FPU (apart from bugs). Some of the
+(version beta 1.11) and the 80486 FPU (apart from bugs). Some of the
 more important differences are listed below:
 
 The Roundup flag does not have much meaning for the transcendental
@@ -144,6 +144,17 @@ able to find the instruction which caused the device-not-present
 exception. For this case, the emulator cannot emulate the behaviour of
 an 80486DX.
 
+Handling of the address size override prefix byte (0x67) has not been
+extensively tested yet. A major problem exists because using it in
+vm86 mode can cause a general protection fault. Address offsets
+greater than 0xffff appear to be illegal in vm86 mode but are quite
+acceptable (and work) in real mode. A small test program developed to
+check the addressing, and which runs successfully in real mode,
+crashes dosemu under Linux and also brings Windows down with a general
+protection fault message when run under the MS-DOS prompt of Windows
+3.1. (The program simply reads data from a valid address).
+
+
 ----------------------- Performance of wm-FPU-emu -----------------------
 
 Speed.
@@ -310,6 +321,7 @@ cae@jpmorgan.com
 Hamish Coleman, t933093@minyos.xx.rmit.oz.au
 Bruce Evans, bde@kralizec.zeta.org.au
 Timo Korvola, Timo.Korvola@hut.fi
+Rick Lyons, rick@razorback.brisnet.org.au
  
 ...and numerous others who responded to my request for help with
 a real 80486.
index 3db50e68054ce8b23c41031f8e55c939980f9290..140c4bd33198102c6c3c30ef1f5f4ac861e1cf95 100644 (file)
@@ -87,6 +87,7 @@ extern char emulating;
 #define PREFIX_FS_ 4
 #define PREFIX_GS_ 5
 #define PREFIX_SS_ 6
+#define PREFIX_DEFAULT 7
 
 /* These are to defeat the default action, giving the instruction
    no net effect: */
index 57751320b47f48212cd2edaf998039598c816643..66b589c241dc43a2c0f7ff5388dbb956f4d18e22 100644 (file)
@@ -239,7 +239,7 @@ do_another_FPU_instruction:
 
   RE_ENTRANT_CHECK_OFF;
   FPU_code_verify_area(1);
-  FPU_modrm = get_fs_byte((unsigned short *) FPU_EIP);
+  FPU_modrm = get_fs_byte((unsigned char *) FPU_EIP);
   RE_ENTRANT_CHECK_ON;
   FPU_EIP++;
 
@@ -281,6 +281,9 @@ do_another_FPU_instruction:
 
          FPU_EIP = FPU_ORIG_EIP;       /* Point to current FPU instruction. */
 
+         if ( addr_modes.vm86 )
+           FPU_EIP -= FPU_CS << 4;
+
          RE_ENTRANT_CHECK_OFF;
          current->tss.trap_no = 16;
          current->tss.error_code = 0;
@@ -303,6 +306,7 @@ do_another_FPU_instruction:
        get_address_16(FPU_modrm, &FPU_EIP, addr_modes);
       else
        get_address(FPU_modrm, &FPU_EIP, addr_modes);
+
       if ( !(byte1 & 1) )
        {
          unsigned short status1 = partial_status;
@@ -563,7 +567,7 @@ static int valid_prefix(unsigned char *Byte, unsigned char **fpu_eip,
   unsigned char byte;
   unsigned char *ip = *fpu_eip;
 
-  *override = (overrides) { 0, 0, PREFIX_DS_ };       /* defaults */
+  *override = (overrides) { 0, 0, PREFIX_DEFAULT };       /* defaults */
 
   RE_ENTRANT_CHECK_OFF;
   FPU_code_verify_area(1);
@@ -597,9 +601,9 @@ static int valid_prefix(unsigned char *Byte, unsigned char **fpu_eip,
        case PREFIX_GS:
          override->segment = PREFIX_GS_;
          goto do_next_byte;
-
-       case PREFIX_DS:   /* Redundant unless preceded by another override. */
+       case PREFIX_DS:
          override->segment = PREFIX_DS_;
+         goto do_next_byte;
 
 /* lock is not a valid prefix for FPU instructions,
    let the cpu handle it to generate a SIGILL. */
index 3fb115cb6e3b31c723b0f5c9b7f702c5db4128c9..964c30921cd8ae46027938aba3c58bad0f992fe9 100644 (file)
@@ -45,7 +45,8 @@ static int reg_offset_vm86[] = {
        offsetof(struct info,___vm86_es),
        offsetof(struct info,___vm86_fs),
        offsetof(struct info,___vm86_gs),
-       offsetof(struct info,___ss)
+       offsetof(struct info,___ss),
+       offsetof(struct info,___vm86_ds)
       };
 
 #define VM86_REG_(x) (*(unsigned short *) \
@@ -285,9 +286,13 @@ void get_address_16(unsigned char FPU_modrm, unsigned long *fpu_eip,
       break;
     case 2:
       offset += FPU_info->___ebp + FPU_info->___esi;
+      if ( addr_modes.override.segment == PREFIX_DEFAULT )
+       addr_modes.override.segment = PREFIX_SS_;
       break;
     case 3:
       offset += FPU_info->___ebp + FPU_info->___edi;
+      if ( addr_modes.override.segment == PREFIX_DEFAULT )
+       addr_modes.override.segment = PREFIX_SS_;
       break;
     case 4:
       offset += FPU_info->___esi;
@@ -297,6 +302,8 @@ void get_address_16(unsigned char FPU_modrm, unsigned long *fpu_eip,
       break;
     case 6:
       offset += FPU_info->___ebp;
+      if ( addr_modes.override.segment == PREFIX_DEFAULT )
+       addr_modes.override.segment = PREFIX_SS_;
       break;
     case 7:
       offset += FPU_info->___ebx;
@@ -313,4 +320,3 @@ void get_address_16(unsigned char FPU_modrm, unsigned long *fpu_eip,
 
   FPU_data_address = (void *)offset ;
 }
-
index 94045f08d89bd7aab08597c1beb7ab407e0405f9..83fcc74c2996fa68fe005accafb555dd1208eafb 100644 (file)
@@ -9,5 +9,5 @@
  |                                                                           |
  +---------------------------------------------------------------------------*/
 
-#define FPU_VERSION "wm-FPU-emu version Beta 1.10"
+#define FPU_VERSION "wm-FPU-emu version Beta 1.11"
 
index 046012d47b53d9feecc9568e93fe1341ea583ea2..d1c7282e7ea87bbe14fe72486e1f2eae57cef7c1 100644 (file)
@@ -487,7 +487,10 @@ int tty_ioctl(struct inode * inode, struct file * file,
                                             sizeof (pid_t));
                        if (retval)
                                return retval;
-                       if (current->tty != termios_dev)
+                       /* If a master pty, return the slave's tpgid.
+                          If not, only return the tpgid if this is
+                          the controlling tty. */
+                       if (tty == termios_tty && current->tty != dev)
                                return -ENOTTY;
                        put_fs_long(termios_tty->pgrp, (pid_t *) arg);
                        return 0;
index 76e3dc2186e7c1551ec2775cf5be6f720fdaa016..7c0821192d53264b75e7143c916d17ee8fa8c386 100644 (file)
@@ -9,7 +9,7 @@
 #AHA152X       = -DDEBUG -DAUTOCONF -DIRQ=11 -DSCSI_ID=7 -DRECONNECT=0 \
 #          -DPORTBASE=0x340 -DSKIP_BIOSTEST -DDONT_SNARF
 
-AHA152X        = -DDEBUG -DAUTOCONF
+AHA152X        = -DDEBUG_AHA152X -DAUTOCONF
 
 SCSI_OBJS =
 SCSI_SRCS =
index 4939e6f0a75ff350fc2f094d72606f3ee3def983..a7994a5b3116ed2de12932aad2351b04b6d29a28 100644 (file)
@@ -1,6 +1,6 @@
 /* aha152x.c -- Adaptec AHA-152x driver
  * Author: Juergen E. Fischer, fischer@server.et-inf.fho-emden.de
- * Copyright 1993 Juergen E. Fischer
+ * Copyright 1993, 1994 Juergen E. Fischer
  *
  *
  * This driver is based on
  * General Public License for more details.
  
  *
- * $Id: aha152x.c,v 0.101 1993/12/13 01:16:27 root Exp $
+ * $Id: aha152x.c,v 1.0 1994/03/25 12:52:00 root Exp $
  *
 
  * $Log: aha152x.c,v $
+ * Revision 1.0  1994/03/25  12:52:00  root
+ * - Fixed "more data than expected" problem
+ * - added new BIOS signatures
+ *
+ * Revision 0.102  1994/01/31  20:44:12  root
+ * - minor changes in insw/outsw handling
+ *
  * Revision 0.101  1993/12/13  01:16:27  root
  * - fixed STATUS phase (non-GOOD stati were dropped sometimes;
  *   fixes problems with CD-ROM sector size detection & media change)
 /* I use this when I'm looking for weird bugs */
 #define DEBUG_TIMING 
 
-#if defined(DEBUG)
+#if defined(DEBUG_AHA152X)
 
 #undef  SKIP_PORTS              /* don't display ports */
 
 #define P_BUSFREE  1
 #define P_PARITY   2
 
-char *aha152x_id = "Adaptec 152x SCSI driver; $Revision: 0.101 $\n";
+static char *aha152x_id = AHA152X_REVID;
 
 static int port_base      = 0;
 static int this_host      = 0;
@@ -308,27 +315,26 @@ static unsigned short ports[] =
 /* possible interrupt channels */
 static unsigned short ints[] = { 9, 10, 11, 12 };
 
-/* signatures for various AIC-6260 based controllers */
+/* signatures for various AIC-6[23]60 based controllers.
+   The point in detecting signatures is to avoid useless
+   and maybe harmful probes on ports. I'm not sure that
+   all listed boards pass auto-configuration. For those
+   which fail the BIOS signature is obsolete, because
+   user intervention to supply the configuration is 
+   needed anyway. */
 static struct signature {
   char *signature;
   int  sig_offset;
   int  sig_length;
 } signatures[] =
 {
-  {
-    "Adaptec AHA-1520 BIOS\r\n\0\
-Version 1.4      \r\n\0\
-Copyright 1990 Adaptec, Inc.\r\n\
-All Rights Reserved\r\n \r\n \r\n", 0x102e, 101
-  },                                                          /* Adaptec 152x */
-  {
-    "Adaptec ASW-B626 BIOS\r\n\0\
-Version 1.0      \r\n\0\
-Copyright 1990 Adaptec, Inc.\r\n\
-All Rights Reserved\r\n\0 \r\n \r\n", 0x1029, 102
-  },                                                   /* on-board controller */
-  { "Adaptec BIOS: ASW-B626", 0x0F, 22},               /* on-board controller */
-  { "Adaptec ASW-B626 S2 BIOS", 0x2e6c, 24},           /* on-board controller */
+  { "Adaptec AHA-1520 BIOS",      0x102e, 21 },  /* Adaptec 152x */
+  { "Adaptec ASW-B626 BIOS",      0x1029, 21 },  /* on-board controller */
+  { "Adaptec BIOS: ASW-B626",       0x0f, 22 },  /* on-board controller */
+  { "Adaptec ASW-B626 S2",        0x2e6c, 19 },  /* on-board controller */
+  { "Adaptec BIOS:AIC-6360",         0xc, 21 },  /* on-board controller */
+  { "ScsiPro SP-360 BIOS",        0x2873, 19 },  /* ScsiPro-Controller with AIC-6360 */
+  { "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 },  /* Gigabyte Local-Bus-SCSI */
 };
 #define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature ))
 
@@ -498,11 +504,9 @@ int aha152x_detect(int hostno)
   enter_driver("detect");
 #endif
   
-  printk("aha152x: Probing: ");
-
   if(setup_called)
     {
-      printk("processing commandline: ");
+      printk("aha152x: processing commandline: ");
    
       if(setup_called!=4)
         {
@@ -551,12 +555,11 @@ int aha152x_detect(int hostno)
           printk("reconnect %d should be 0 or 1\n", can_disconnect);
           panic("aha152x panics in line %d", __LINE__);
         }
-      printk("ok");
+      printk("ok\n");
     }
   else
     {
 #if !defined(SKIP_BIOSTEST)
-      printk("BIOS test: ");
       ok=0;
       for( i=0; i < ADDRESS_COUNT && !ok; i++)
         for( j=0; (j < SIGNATURE_COUNT) && !ok; j++)
@@ -572,7 +575,9 @@ int aha152x_detect(int hostno)
           printk("failed\n");
           return 0;
         }
-      printk("ok, ");
+      printk("aha152x: BIOS test: passed, ");
+#else
+      printk("aha152x: ");
 #endif /* !SKIP_BIOSTEST */
  
 #if !defined(PORTBASE)
@@ -685,14 +690,6 @@ int aha152x_detect(int hostno)
  */
 const char *aha152x_info(void)
 {
-#if defined(DEBUG_RACE)
-  enter_driver("info");
-  leave_driver("info");
-#else
-#if defined(DEBUG_INFO)
-  printk("\naha152x: info()\n");
-#endif
-#endif
   return(aha152x_id);
 }
 
@@ -791,7 +788,7 @@ int aha152x_abort( Scsi_Cmnd *SCpnt, int code )
   cli();
 
 #if defined(DEBUG_ABORT)
-  printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned long) SCpnt );
+  printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt );
 #endif
 
   show_queues();
@@ -962,16 +959,8 @@ int aha152x_reset(Scsi_Cmnd * __unused)
  */
 int aha152x_biosparam( int size, int dev, int *info_array )
 {
-#if defined(DEBUG_RACE)
-  enter_driver("biosparam");
-#else
 #if defined(DEBUG_BIOSPARAM)
-  printk("\naha152x: biosparam(), ");
-#endif
-#endif
-
-#if defined(DEBUG_BIOSPARAM)
-  printk("dev=%x, size=%d, ", dev, size);
+  printk("aha152x_biosparam: dev=%x, size=%d, ", dev, size);
 #endif
   
 /* I took this from other SCSI drivers, since it provides
@@ -986,9 +975,6 @@ int aha152x_biosparam( int size, int dev, int *info_array )
   printk("WARNING: check, if the bios geometry is correct.\n");
 #endif
 
-#if defined(DEBUG_RACE)
-  leave_driver("biosparam");
-#endif
   return 0;
 }
 
@@ -1708,7 +1694,7 @@ void aha152x_intr( int irqno )
               ;
 
             if( TESTHI( DMASTAT, DFIFOFULL ) )
-              fifodata=132;
+              fifodata=GETPORT(FIFOSTAT);
             else
               {
                 /* wait for SCSI fifo to get empty */
@@ -1786,13 +1772,18 @@ void aha152x_intr( int irqno )
                   } 
               }
  
-            /* rare (but possible) status bytes (probably also DISCONNECT 
-               messages) get transfered in the data phase, so I assume 1
-               additional byte is ok */
-            if(fifodata>1)
+            /*
+             * Fifo should be empty
+             */
+            if(fifodata>0)
               {
                 printk("aha152x: more data than expected (%d bytes)\n",
                        GETPORT(FIFOSTAT));
+                SETBITS(DMACNTRL0, _8BIT );
+                printk("aha152x: data ( ");
+                while(fifodata--)
+                  printk("%2x ", GETPORT( DATAPORT ));
+                printk(")\n");
               }
 
 #if defined(DEBUG_DATAI)
@@ -2302,7 +2293,7 @@ static void show_command(Scsi_Cmnd *ptr)
   int i;
 
   printk("0x%08x: target=%d; lun=%d; cmnd=( ",
-         (unsigned long) ptr, ptr->target, ptr->lun);
+         (unsigned int) ptr, ptr->target, ptr->lun);
   
   for(i=0; i<COMMAND_SIZE(ptr->cmnd[0]); i++)
     printk("%02x ", ptr->cmnd[i]);
@@ -2346,7 +2337,7 @@ static void show_command(Scsi_Cmnd *ptr)
       if(ptr->SCp.phase & (1<<16))
         printk("; phaseend");
     }
-  printk("; next=0x%08x\n", (unsigned long) ptr->host_scribble);
+  printk("; next=0x%08x\n", (unsigned int) ptr->host_scribble);
 }
  
 /*
index 7996f812b72dd757284ded825afc77443dbad638..47439deef10eced65baab7162f13fbb49b49ccde 100644 (file)
@@ -2,7 +2,7 @@
 #define _AHA152X_H
 
 /*
- * $Id: aha152x.h,v 0.2 1993/10/03 00:58:03 root Exp $
+ * $Id: aha152x.h,v 1.0 1994/03/25 12:52:00 root Exp $
  */
 
 #include "../block/blk.h"
@@ -22,8 +22,10 @@ int        aha152x_biosparam(int, int, int*);
    (unless we support more than 1 cmd_per_lun this should do) */
 #define AHA152X_MAXQUEUE       7               
 
+#define AHA152X_REVID  "Adaptec 152x SCSI driver; $Revision: 1.0 $"
+
 /* Initial value of Scsi_Host entry */
-#define AHA152X       { /* name */             "Adaptec 152x SCSI driver", \
+#define AHA152X       { /* name */             AHA152X_REVID, \
                        /* detect */            aha152x_detect,             \
                        /* info */              aha152x_info,               \
                        /* command */           aha152x_command,            \
index d3f1ac10e142bf9a0f853d856c469924edabac49..c9b1a9815cf5f3ca5b97b6ab06903c2fd158ec6d 100644 (file)
@@ -95,28 +95,51 @@ static void aha1542_stat(void)
   printk("status=%x intrflags=%x\n", s, i, WAITnexttimeout-WAITtimeout); */
 }
 
+/* This is a bit complicated, but we need to make sure that an interrupt
+   routine does not send something out while we are in the middle of this.
+   Fortunately, it is only at boot time that multi-byte messages
+   are ever sent. */
 static int aha1542_out(unsigned int base, unchar *cmdp, int len)
 {
+  if(len == 1) {
+    while(1==1){
+       WAIT(STATUS(base), CDF, 0, CDF);
+       cli();
+       if(inb(STATUS(base)) & CDF) {sti(); continue;}
+       outb(*cmdp, DATA(base));
+       sti();
+       return 0;
+      }
+  } else {
+    cli();
     while (len--)
       {
-         WAIT(STATUS(base), CDF, 0, CDF);
-         outb(*cmdp++, DATA(base));
+       WAIT(STATUS(base), CDF, 0, CDF);
+       outb(*cmdp++, DATA(base));
       }
+    sti();
+  }
     return 0;
   fail:
+  sti();
     printk("aha1542_out failed(%d): ", len+1); aha1542_stat();
     return 1;
 }
 
+/* Only used at boot time, so we do not need to worry about latency as much
+   here */
 static int aha1542_in(unsigned int base, unchar *cmdp, int len)
 {
+    cli();
     while (len--)
       {
          WAIT(STATUS(base), DF, DF, 0);
          *cmdp++ = inb(DATA(base));
       }
+    sti();
     return 0;
   fail:
+    sti();
     printk("aha1542_in failed(%d): ", len+1); aha1542_stat();
     return 1;
 }
index 8043f70cf1db766bbd035309fcab19e1d93907ff..a2e1e07c3948b310234d467262f3cc9c7d39f958 100644 (file)
@@ -510,7 +510,7 @@ int fdomain_16x0_detect( int hostnum )
         port_base = ports[i];
         if (check_region( port_base, 0x10 )) {
 #if DEBUG_DETECT
-           printf( " (%x inuse),", port_base );
+           printk( " (%x inuse),", port_base );
 #endif
            continue;
         }
index fdd92dab1769f5fdd8d53945b27378b67f4b4b44..028ec2296a699ef3aeae18cb64fdfbd93650ca3b 100644 (file)
@@ -88,28 +88,38 @@ static int get_loadavg(char * buffer)
 
 static int get_kstat(char * buffer)
 {
-        return sprintf(buffer, "cpu  %u %u %u %lu\n"
-                               "disk %u %u %u %u\n"
-                               "page %u %u\n"
-                               "swap %u %u\n"
-                               "intr %u\n"
-                               "ctxt %u\n"
-                               "btime %lu\n",
-                kstat.cpu_user,
-                kstat.cpu_nice,
-                kstat.cpu_system,
-                jiffies - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
-                kstat.dk_drive[0],
-                kstat.dk_drive[1],
-                kstat.dk_drive[2],
-                kstat.dk_drive[3],
-                kstat.pgpgin,
-                kstat.pgpgout,
-                kstat.pswpin,
-                kstat.pswpout,
-                kstat.interrupts,
-                kstat.context_swtch,
-                xtime.tv_sec - jiffies / HZ);
+       int i, len;
+       unsigned sum = 0;
+
+       for (i = 0 ; i < 16 ; i++)
+               sum += kstat.interrupts[i];
+       len = sprintf(buffer,
+               "cpu  %u %u %u %lu\n"
+               "disk %u %u %u %u\n"
+               "page %u %u\n"
+               "swap %u %u\n"
+               "%u",
+               kstat.cpu_user,
+               kstat.cpu_nice,
+               kstat.cpu_system,
+               jiffies - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
+               kstat.dk_drive[0],
+               kstat.dk_drive[1],
+               kstat.dk_drive[2],
+               kstat.dk_drive[3],
+               kstat.pgpgin,
+               kstat.pgpgout,
+               kstat.pswpin,
+               kstat.pswpout,
+               sum);
+       for (i = 0 ; i < 16 ; i++)
+               len += sprintf(buffer + len, " %u", kstat.interrupts[i]);
+       len += sprintf(buffer + len,
+               "\nctxt %u\n"
+               "btime %lu\n",
+               kstat.context_swtch,
+               xtime.tv_sec - jiffies / HZ);
+       return len;
 }
 
 
index 4244ea322af250b29b58fbe2f1d68629423791a2..173d33352371ad4c02f83e2221e464be49af61de 100644 (file)
@@ -200,6 +200,7 @@ struct inode {
                struct nfs_inode_info nfs_i;
                struct xiafs_inode_info xiafs_i;
                struct sysv_inode_info sysv_i;
+               void * generic_ip;
        } u;
 };
 
@@ -260,6 +261,7 @@ struct super_block {
                struct nfs_sb_info nfs_sb;
                struct xiafs_sb_info xiafs_sb;
                struct sysv_sb_info sysv_sb;
+               void *generic_sbp;
        } u;
 };
 
index 2f3e53b8ec95fd019f0e8f16139bbf4888ca8e5b..4d3f3e941a0800b60c36286d262a7e055d50a41b 100644 (file)
@@ -14,7 +14,7 @@ struct kernel_stat {
        unsigned int dk_drive[DK_NDRIVE];
        unsigned int pgpgin, pgpgout;
        unsigned int pswpin, pswpout;
-       unsigned int interrupts;
+       unsigned int interrupts[16];
        unsigned int ipackets, opackets;
        unsigned int ierrors, oerrors;
        unsigned int collisions;
index f86cf12afcd0ee2d39b1fe5798e7bf548c9208db..6c71204b722bb40d2e38b1c86b1645d582d22f42 100644 (file)
@@ -120,6 +120,7 @@ extern unsigned long scsi_dev_init(unsigned long, unsigned long);
 #define MAX_INIT_ARGS 8
 #define MAX_INIT_ENVS 8
 #define COMMAND_LINE ((char *) (PARAM+2048))
+#define COMMAND_LINE_SIZE 256
 
 extern void time_init(void);
 
@@ -149,7 +150,7 @@ int root_mountflags = 0;
 
 static char fpu_error = 0;
 
-static char command_line[80] = { 0, };
+static char command_line[COMMAND_LINE_SIZE] = { 0, };
 
 char *get_options(char *str, int *ints) 
 {
@@ -329,12 +330,19 @@ static void parse_options(char *line)
 static void copy_options(char * to, char * from)
 {
        char c = ' ';
+       int len = 0;
 
-       do {
-               if (c == ' ' && !memcmp("mem=", from, 4))
+       for (;;) {
+               if (c == ' ' && *(unsigned long *)from == *(unsigned long *)"mem=")
                        memory_end = simple_strtoul(from+4, &from, 0);
-               c = *(to++) = *(from++);
-       } while (c);
+               c = *(from++);
+               if (!c)
+                       break;
+               if (COMMAND_LINE_SIZE <= ++len)
+                       break;
+               *(to++) = c;
+       }
+       *to = '\0';
 }
 
 static void copro_timeout(void)
index e38d9e806d83eee0a6240cab493d745d06171def..4423fbf2a3dd8ef0408e44f4f94a26f42a7eb9a9 100644 (file)
@@ -201,7 +201,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
 {
        struct sigaction * sa = irq + irq_sigaction;
 
-       kstat.interrupts++;
+       kstat.interrupts[irq]++;
        sa->sa_handler((int) regs);
 }
 
@@ -214,7 +214,7 @@ asmlinkage void do_fast_IRQ(int irq)
 {
        struct sigaction * sa = irq + irq_sigaction;
 
-       kstat.interrupts++;
+       kstat.interrupts[irq]++;
        sa->sa_handler(irq);
 }