]> git.neil.brown.name Git - history.git/commitdiff
pl15b mainly fixes some small tty problems. 0.99.15b
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:21 +0000 (15:09 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:21 +0000 (15:09 -0500)
Makefile
drivers/FPU-emu/errors.c
drivers/FPU-emu/fpu_entry.c
drivers/FPU-emu/reg_round.S
drivers/char/pty.c
drivers/char/tty_io.c
fs/ext2/balloc.c
include/linux/fs.h
kernel/traps.c

index b15808f5dc5de0be28aa8f98ced6c8537bc0ad01..47407f6c798f0d7c8ba49ff4744dc0be34124a35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 0.99
 PATCHLEVEL = 15
-ALPHA = a
+ALPHA = b
 
 all:   Version zImage
 
index d34e5e9e44835914b67706eeffbe2ebfef8af2d4..99de4fa7dda88aefe36bc2269920ef18d570e6df 100644 (file)
@@ -235,7 +235,7 @@ static struct {
              0x127  in poly_2xm1.c
              0x128  in fpu_entry.c
        0x2nn  in an *.S file:
-              0x201  in reg_u_add.S, reg_round.S
+              0x201  in reg_u_add.S
               0x202  in reg_u_div.S
               0x203  in reg_u_div.S
               0x204  in reg_u_div.S
@@ -250,11 +250,14 @@ static struct {
              0x213  in wm_sqrt.S
              0x214  in wm_sqrt.S
              0x215  in wm_sqrt.S
-             0x216  in reg_round.S
-             0x217  in reg_round.S
-             0x218  in reg_round.S
              0x220  in reg_norm.S
              0x221  in reg_norm.S
+             0x230  in reg_round.S
+             0x231  in reg_round.S
+             0x232  in reg_round.S
+             0x233  in reg_round.S
+             0x234  in reg_round.S
+             0x235  in reg_round.S
  */
 
 void exception(int n)
index 8b9a0860e0e0213335ee237f55ce5eace2a2d6b3..063f54f2d380b94d4c6359161b44f1838cefb756 100644 (file)
@@ -577,10 +577,14 @@ static int valid_prefix(unsigned char *Byte, overrides *override)
        case PREFIX_DS:   /* Redundant unless preceded by another override. */
          override->segment = PREFIX_DS;
 
+/* lock is not a valid prefix for FPU instructions,
+   let the cpu handle it to generate a SIGILL. */
+/*     case PREFIX_LOCK: */
+
          /* rep.. prefixes have no meaning for FPU instructions */
-       case PREFIX_LOCK:
        case PREFIX_REPE:
        case PREFIX_REPNE:
+
        case OP_SIZE_PREFIX:  /* Used often by gcc, but has no effect. */
        do_next_byte:
          FPU_EIP++;
@@ -600,6 +604,9 @@ static int valid_prefix(unsigned char *Byte, overrides *override)
            }
          else
            {
+             /* Not a valid sequence of prefix bytes followed by
+                an FPU instruction. */
+             *Byte = byte;  /* Needed for error message. */
              FPU_EIP = ip;
              return 0;
            }
index 32f2b2ebbca312da7fa3161aba6e977f64618a30..4209b22f50297194ee0f15efcfac9391b4c33df7 100644 (file)
@@ -157,7 +157,7 @@ xDenorm_done:
        je      LRound_To_24
 
 #ifdef PARANOID
-       jmp     L_bugged        /* There is no bug, just a bad control word */
+       jmp     L_bugged_denorm /* There is no bug, just a bad control word */
 #endif PARANOID
 
 
@@ -178,7 +178,7 @@ LRound_To_24:
        je      LDown_24
 
 #ifdef PARANOID
-       jmp     L_bugged
+       jmp     L_bugged_round24
 #endif PARANOID
 
 LUp_24:
@@ -258,7 +258,7 @@ LRound_To_53:
        je      LDown_53
 
 #ifdef PARANOID
-       jmp     L_bugged
+       jmp     L_bugged_round53
 #endif PARANOID
 
 LUp_53:
@@ -332,7 +332,7 @@ LRound_To_64:
        je      LDown_64
 
 #ifdef PARANOID
-       jmp     L_bugged
+       jmp     L_bugged_round64
 #endif PARANOID
 
 LUp_64:
@@ -644,20 +644,38 @@ xDo_unmasked_underflow:
 
 #ifdef PARANOID
 /* If we ever get here then we have problems! */
-L_bugged:
-       pushl   EX_INTERNAL|0x201
+L_bugged_denorm:
+       pushl   EX_INTERNAL|0x230
+       call    EXCEPTION
+       popl    %ebx
+       jmp     L_exception_exit
+
+L_bugged_round24:
+       pushl   EX_INTERNAL|0x231
+       call    EXCEPTION
+       popl    %ebx
+       jmp     L_exception_exit
+
+L_bugged_round53:
+       pushl   EX_INTERNAL|0x232
+       call    EXCEPTION
+       popl    %ebx
+       jmp     L_exception_exit
+
+L_bugged_round64:
+       pushl   EX_INTERNAL|0x233
        call    EXCEPTION
        popl    %ebx
        jmp     L_exception_exit
 
 L_norm_bugged:
-       pushl   EX_INTERNAL|0x216
+       pushl   EX_INTERNAL|0x234
        call    EXCEPTION
        popl    %ebx
        jmp     L_exception_exit
 
 L_entry_bugged:
-       pushl   EX_INTERNAL|0x217
+       pushl   EX_INTERNAL|0x235
        call    EXCEPTION
        popl    %ebx
 L_exception_exit:
index 482afe6b2132f1064f07631fbdf42ae1b0008957..5818e21c9522a28be081d6afa5568372b297e870 100644 (file)
@@ -55,14 +55,11 @@ static inline void pty_copy(struct tty_struct * from, struct tty_struct * to)
 {
        unsigned long count, n;
        struct tty_queue *fq, *tq;
-       int skip_readq;
 
        if (from->stopped || EMPTY(&from->write_q))
                return;
        fq = &from->write_q;
-       /* Bypass the read_q if this is a pty master. */
-       skip_readq = IS_A_PTY_MASTER(to->line) && to->disc == N_TTY;
-       tq = skip_readq ? &to->secondary : &to->read_q;
+       tq = &to->read_q;
        count = MIN(CHARS(fq), LEFT(tq));
        while (count) {
                n = MIN(MIN(TTY_BUF_SIZE - fq->tail, TTY_BUF_SIZE - tq->head),
@@ -72,10 +69,7 @@ static inline void pty_copy(struct tty_struct * from, struct tty_struct * to)
                fq->tail = (fq->tail + n) & (TTY_BUF_SIZE - 1);
                tq->head = (tq->head + n) & (TTY_BUF_SIZE - 1);
        }
-       if (skip_readq)
-               wake_up_interruptible(&to->secondary.proc_list);
-       else
-               TTY_READ_FLUSH(to);
+       TTY_READ_FLUSH(to);
        if (LEFT(fq) > WAKEUP_CHARS)
                wake_up_interruptible(&fq->proc_list);
        if (from->write_data_cnt) {
index 29976010b60ce4721575b60912d016192b74d896..c5731f728e6e93a972d6b9574450809f7ab46810 100644 (file)
@@ -954,6 +954,24 @@ static int read_chan(struct tty_struct *tty, struct file *file,
        int minimum, time;
        int retval = 0;
 
+       /* Job control check -- must be done at start and after
+          every sleep (POSIX.1 7.1.1.4). */
+       /* NOTE: not yet done after every sleep pending a thorough
+          check of the logic of this change. -- jlc */
+       /* don't stop on /dev/console */
+       if (file->f_inode->i_rdev != CONSOLE_DEV &&
+           current->tty == tty->line) {
+               if (tty->pgrp <= 0)
+                       printk("read_chan: tty->pgrp <= 0!\n");
+               else if (current->pgrp != tty->pgrp) {
+                       if (is_ignored(SIGTTIN) ||
+                           is_orphaned_pgrp(current->pgrp))
+                               return -EIO;
+                       kill_pg(current->pgrp, SIGTTIN, 1);
+                       return -ERESTARTSYS;
+               }
+       }
+
        if (L_ICANON(tty)) {
                minimum = time = 0;
                current->timeout = (unsigned long) -1;
@@ -974,24 +992,6 @@ static int read_chan(struct tty_struct *tty, struct file *file,
 
        add_wait_queue(&tty->secondary.proc_list, &wait);
        while (1) {
-               /* Job control check -- must be done at start and after
-                  every sleep (POSIX.1 7.1.1.4). */
-               /* don't stop on /dev/console */
-               if (file->f_inode->i_rdev != CONSOLE_DEV &&
-                   current->tty == tty->line) {
-                       if (tty->pgrp <= 0)
-                               printk("read_chan: tty->pgrp <= 0!\n");
-                       else if (current->pgrp != tty->pgrp) {
-                               if (is_ignored(SIGTTIN) ||
-                                   is_orphaned_pgrp(current->pgrp)) {
-                                       retval = -EIO;
-                                       break;
-                               }
-                               kill_pg(current->pgrp, SIGTTIN, 1);
-                               retval = -ERESTARTSYS;
-                               break;
-                       }
-               }
                /* First test for status change. */
                if (tty->packet && tty->link->ctrl_status) {
                        if (b != buf)
index b6559894bf091b60d661f0e2a25ba64d3e3f9b29..b34778b769d7c91a4153b39ddf91400820c0722a 100644 (file)
@@ -359,16 +359,15 @@ int ext2_new_block (struct super_block * sb, unsigned long goal,
 
        ext2_debug ("goal=%lu.\n", goal);
 
-       if (goal < es->s_first_data_block || goal >= es->s_blocks_count) {
-               ext2_warning (sb, "ext2_new_block",
-                             "Goal out of bounds: %lu", goal);
-               goal = es->s_first_data_block;
-       }
 repeat:
        /*
         * First, test whether the goal block is free.
         */
        i = ((goal - es->s_first_data_block) / EXT2_BLOCKS_PER_GROUP(sb));
+       if (i >= EXT2_BLOCKS_PER_GROUP(sb) || i < 0) {
+               i = 0;
+               goal = es->s_first_data_block;
+       }
        gdp = get_group_desc (sb, i, &bh2);
        if (gdp->bg_free_blocks_count > 0) {
                j = ((goal - es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb));
index cac50aa36b55759a94d174b30f6517eeb8e6fcc1..eaf22afd4240ab777b9511bc570cb8d77c416fd3 100644 (file)
@@ -392,6 +392,7 @@ extern struct buffer_head * breada(dev_t dev,int block,...);
 extern void put_super(dev_t dev);
 extern dev_t ROOT_DEV;
 
+extern void show_buffers(void);
 extern void mount_root(void);
 
 extern int char_read(struct inode *, struct file *, char *, int);
index 7321836e379a77020ff42c52e76192afafa79df4..78ca139c20ed79b4579e81f52ffe5b6de3622071 100644 (file)
@@ -89,8 +89,8 @@ asmlinkage void alignment_check(void);
        printk("EIP:    %04x:%08lx\nEFLAGS: %08lx\n", 0xffff & regs->cs,regs->eip,regs->eflags);
        printk("eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
                regs->eax, regs->ebx, regs->ecx, regs->edx);
-       printk("esi: %08lx   edi: %08lx   ebp: %08lx\n",
-               regs->esi, regs->edi, regs->ebp);
+       printk("esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08x\n",
+               regs->esi, regs->edi, regs->ebp, regs->esp);
        printk("ds: %04x   es: %04x   fs: %04x   gs: %04x\n",
                regs->ds, regs->es, regs->fs, regs->gs);
        store_TR(i);
@@ -98,6 +98,9 @@ asmlinkage void alignment_check(void);
        for(i=0;i<20;i++)
                printk("%02x ",0xff & get_seg_byte(regs->cs,(i+(char *)regs->eip)));
        printk("\n");
+       for(i=0;i<5;i++)
+               printk("%08x ", get_seg_long(regs->ss,(i+(unsigned long *)regs->esp)));
+       printk("\n");
        do_exit(SIGSEGV);
 }