Commit f938a5c8 authored by Linus Torvalds's avatar Linus Torvalds

pl15b mainly fixes some small tty problems.

parent 17d2d71c
VERSION = 0.99
PATCHLEVEL = 15
ALPHA = a
ALPHA = b
all: Version zImage
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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:
......
......@@ -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) {
......
......@@ -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)
......
......@@ -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));
......
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment