diff options
Diffstat (limited to 'arch')
113 files changed, 5011 insertions, 1863 deletions
diff --git a/arch/alpha/config.in b/arch/alpha/config.in index 18fdcde8a..da5c361c9 100644 --- a/arch/alpha/config.in +++ b/arch/alpha/config.in @@ -63,12 +63,13 @@ unset CONFIG_ALPHA_T2 CONFIG_ALPHA_PYXIS CONFIG_ALPHA_POLARIS unset CONFIG_ALPHA_TSUNAMI CONFIG_ALPHA_MCPCIA unset CONFIG_ALPHA_IRONGATE unset CONFIG_ALPHA_BROKEN_IRQ_MASK -unset CONFIG_ALPHA_LARGE_VMALLOC # Most of these machines have ISA slots; not exactly sure which don't, # and this doesn't activate hordes of code, so do it always. define_bool CONFIG_ISA y +define_bool CONFIG_EISA y define_bool CONFIG_SBUS n +define_bool CONFIG_MCA n if [ "$CONFIG_ALPHA_JENSEN" = "y" ] then @@ -214,6 +215,8 @@ if [ "$CONFIG_ALPHA_GENERIC" = "y" -o "$CONFIG_ALPHA_DP264" = "y" \ -o "$CONFIG_ALPHA_WILDFIRE" = "y" -o "$CONFIG_ALPHA_TITAN" = "y" ] then bool 'Large VMALLOC support' CONFIG_ALPHA_LARGE_VMALLOC +else + define_bool CONFIG_ALPHA_LARGE_VMALLOC n fi source drivers/pci/Config.in diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index 4ac2e8b0d..17285ac26 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c @@ -160,15 +160,20 @@ EXPORT_SYMBOL_NOVERS(__do_clear_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strnlen_user); -/* - * The following are specially called from the semaphore assembly stubs. - */ -EXPORT_SYMBOL_NOVERS(__down_failed); -EXPORT_SYMBOL_NOVERS(__down_failed_interruptible); -EXPORT_SYMBOL_NOVERS(__up_wakeup); -EXPORT_SYMBOL_NOVERS(__down_read_failed); -EXPORT_SYMBOL_NOVERS(__down_write_failed); -EXPORT_SYMBOL_NOVERS(__rwsem_wake); +/* Semaphore helper functions. */ +EXPORT_SYMBOL(__down_failed); +EXPORT_SYMBOL(__down_failed_interruptible); +EXPORT_SYMBOL(__up_wakeup); +EXPORT_SYMBOL(down); +EXPORT_SYMBOL(down_interruptible); +EXPORT_SYMBOL(up); +EXPORT_SYMBOL(__down_read_failed); +EXPORT_SYMBOL(__down_write_failed); +EXPORT_SYMBOL(__rwsem_wake); +EXPORT_SYMBOL(down_read); +EXPORT_SYMBOL(down_write); +EXPORT_SYMBOL(up_read); +EXPORT_SYMBOL(up_write); /* * SMP-specific symbols. diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index ac7ca67f8..080e48e43 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -747,7 +747,7 @@ probe_irq_mask(unsigned long val) unsigned int mask; mask = 0; - for (i = 0; i < 16; i++) { + for (i = 0; i < NR_IRQS; i++) { irq_desc_t *desc = irq_desc + i; unsigned int status; @@ -755,8 +755,11 @@ probe_irq_mask(unsigned long val) status = desc->status; if (status & IRQ_AUTODETECT) { - if (!(status & IRQ_WAITING)) - mask |= 1 << i; + /* We only react to ISA interrupts */ + if (!(status & IRQ_WAITING)) { + if (i < 16) + mask |= 1 << i; + } desc->status = status & ~IRQ_AUTODETECT; desc->handler->shutdown(i); diff --git a/arch/alpha/kernel/semaphore.c b/arch/alpha/kernel/semaphore.c index dc5209531..7c1c9a80c 100644 --- a/arch/alpha/kernel/semaphore.c +++ b/arch/alpha/kernel/semaphore.c @@ -1,139 +1,267 @@ /* - * Generic semaphore code. Buyer beware. Do your own - * specific changes in <asm/semaphore-helper.h> + * Alpha semaphore implementation. + * + * (C) Copyright 1996 Linus Torvalds + * (C) Copyright 1999, 2000 Richard Henderson */ #include <linux/sched.h> -#include <asm/semaphore-helper.h> + /* * Semaphores are implemented using a two-way counter: - * The "count" variable is decremented for each process - * that tries to sleep, while the "waking" variable is - * incremented when the "up()" code goes to wake up waiting - * processes. + * + * The "count" variable is decremented for each process that tries to sleep, + * while the "waking" variable is incremented when the "up()" code goes to + * wake up waiting processes. * - * Notably, the inline "up()" and "down()" functions can - * efficiently test if they need to do any extra work (up - * needs to do something only if count was negative before - * the increment operation. + * Notably, the inline "up()" and "down()" functions can efficiently test + * if they need to do any extra work (up needs to do something only if count + * was negative before the increment operation. * - * waking_non_zero() (from asm/semaphore.h) must execute - * atomically. + * waking_non_zero() (from asm/semaphore.h) must execute atomically. * - * When __up() is called, the count was negative before - * incrementing it, and we need to wake up somebody. + * When __up() is called, the count was negative before incrementing it, + * and we need to wake up somebody. * - * This routine adds one to the count of processes that need to - * wake up and exit. ALL waiting processes actually wake up but - * only the one that gets to the "waking" field first will gate - * through and acquire the semaphore. The others will go back - * to sleep. + * This routine adds one to the count of processes that need to wake up and + * exit. ALL waiting processes actually wake up but only the one that gets + * to the "waking" field first will gate through and acquire the semaphore. + * The others will go back to sleep. * - * Note that these functions are only called when there is - * contention on the lock, and as such all this is the - * "non-critical" part of the whole semaphore business. The - * critical part is the inline stuff in <asm/semaphore.h> - * where we want to avoid any extra jumps and calls. + * Note that these functions are only called when there is contention on the + * lock, and as such all this is the "non-critical" part of the whole + * semaphore business. The critical part is the inline stuff in + * <asm/semaphore.h> where we want to avoid any extra jumps and calls. */ -void -__up(struct semaphore *sem) -{ - wake_one_more(sem); - wake_up(&sem->wait); -} - /* * Perform the "down" function. Return zero for semaphore acquired, * return negative for signalled out of the function. * - * If called from __down, the return is ignored and the wait loop is + * If called from down, the return is ignored and the wait loop is * not interruptible. This means that a task waiting on a semaphore * using "down()" cannot be killed until someone does an "up()" on * the semaphore. * - * If called from __down_interruptible, the return value gets checked + * If called from down_interruptible, the return value gets checked * upon return. If the return value is negative then the task continues * with the negative value in the return register (it can be tested by * the caller). * * Either form may be used in conjunction with "up()". - * */ -#define DOWN_VAR \ - struct task_struct *tsk = current; \ - wait_queue_t wait; \ - init_waitqueue_entry(&wait, tsk) - -#define DOWN_HEAD(task_state) \ - \ - \ - tsk->state = (task_state); \ - add_wait_queue(&sem->wait, &wait); \ - \ - /* \ - * Ok, we're set up. sem->count is known to be less than zero \ - * so we must wait. \ - * \ - * We can let go the lock for purposes of waiting. \ - * We re-acquire it after awaking so as to protect \ - * all semaphore operations. \ - * \ - * If "up()" is called before we call waking_non_zero() then \ - * we will catch it right away. If it is called later then \ - * we will have to go through a wakeup cycle to catch it. \ - * \ - * Multiple waiters contend for the semaphore lock to see \ - * who gets to gate through and who has to wait some more. \ - */ \ - for (;;) { - -#define DOWN_TAIL(task_state) \ - tsk->state = (task_state); \ - } \ - tsk->state = TASK_RUNNING; \ - remove_wait_queue(&sem->wait, &wait) - void -__down(struct semaphore * sem) +__down_failed(struct semaphore *sem) { - DOWN_VAR; - DOWN_HEAD(TASK_UNINTERRUPTIBLE); + DECLARE_WAITQUEUE(wait, current); + +#if DEBUG_SEMAPHORE + printk("%s(%d): down failed(%p)\n", + current->comm, current->pid, sem); +#endif + + current->state = TASK_UNINTERRUPTIBLE; + wmb(); + add_wait_queue_exclusive(&sem->wait, &wait); + + /* At this point we know that sem->count is negative. In order + to avoid racing with __up, we must check for wakeup before + going to sleep the first time. */ + + while (1) { + long ret, tmp; + + /* An atomic conditional decrement of sem->waking. */ + __asm__ __volatile__( + "1: ldl_l %1,%2\n" + " blt %1,2f\n" + " subl %1,1,%0\n" + " stl_c %0,%2\n" + " beq %0,3f\n" + "2:\n" + ".subsection 2\n" + "3: br 1b\n" + ".previous" + : "=r"(ret), "=&r"(tmp), "=m"(sem->waking) + : "0"(0)); + + if (ret) + break; - if (waking_non_zero(sem)) - break; - schedule(); + schedule(); + set_task_state(current, TASK_UNINTERRUPTIBLE); + } - DOWN_TAIL(TASK_UNINTERRUPTIBLE); + remove_wait_queue(&sem->wait, &wait); + current->state = TASK_RUNNING; + +#if DEBUG_SEMAPHORE + printk("%s(%d): down acquired(%p)\n", + current->comm, current->pid, sem); +#endif } int -__down_interruptible(struct semaphore * sem) +__down_failed_interruptible(struct semaphore *sem) { - int ret = 0; - DOWN_VAR; - DOWN_HEAD(TASK_INTERRUPTIBLE); - - ret = waking_non_zero_interruptible(sem, tsk); - if (ret) - { - if (ret == 1) - /* ret != 0 only if we get interrupted -arca */ - ret = 0; - break; + DECLARE_WAITQUEUE(wait, current); + long ret; + +#if DEBUG_SEMAPHORE + printk("%s(%d): down failed(%p)\n", + current->comm, current->pid, sem); +#endif + + current->state = TASK_INTERRUPTIBLE; + wmb(); + add_wait_queue_exclusive(&sem->wait, &wait); + + while (1) { + long tmp, tmp2, tmp3; + + /* We must undo the sem->count down_interruptible decrement + simultaneously and atomicly with the sem->waking + adjustment, otherwise we can race with __up. This is + accomplished by doing a 64-bit ll/sc on two 32-bit words. + + "Equivalent" C. Note that we have to do this all without + (taken) branches in order to be a valid ll/sc sequence. + + do { + tmp = ldq_l; + ret = 0; + if (tmp >= 0) { // waking >= 0 + tmp += 0xffffffff00000000; // waking -= 1 + ret = 1; + } + else if (pending) { + // count += 1, but since -1 + 1 carries into the + // high word, we have to be more careful here. + tmp = (tmp & 0xffffffff00000000) + | ((tmp + 1) & 0x00000000ffffffff); + ret = -EINTR; + } + tmp = stq_c = tmp; + } while (tmp == 0); + */ + + __asm__ __volatile__( + "1: ldq_l %1,%4\n" + " lda %0,0\n" + " cmovne %5,%6,%0\n" + " addq %1,1,%2\n" + " and %1,%7,%3\n" + " andnot %2,%7,%2\n" + " cmovge %1,1,%0\n" + " or %3,%2,%2\n" + " addq %1,%7,%3\n" + " cmovne %5,%2,%1\n" + " cmovge %2,%3,%1\n" + " stq_c %1,%4\n" + " beq %1,3f\n" + "2:\n" + ".subsection 2\n" + "3: br 1b\n" + ".previous" + : "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), + "=&r"(tmp3), "=m"(*sem) + : "r"(signal_pending(current)), "r"(-EINTR), + "r"(0xffffffff00000000)); + + /* At this point we have ret + 1 got the lock + 0 go to sleep + -EINTR interrupted */ + if (ret != 0) + break; + + schedule(); + set_task_state(current, TASK_INTERRUPTIBLE); } - schedule(); - DOWN_TAIL(TASK_INTERRUPTIBLE); - return ret; + remove_wait_queue(&sem->wait, &wait); + current->state = TASK_RUNNING; + wake_up(&sem->wait); + +#if DEBUG_SEMAPHORE + printk("%s(%d): down %s(%p)\n", + current->comm, current->pid, + (ret < 0 ? "interrupted" : "acquired"), sem); +#endif + + /* Convert "got the lock" to 0==success. */ + return (ret < 0 ? ret : 0); +} + +void +__up_wakeup(struct semaphore *sem) +{ + wake_up(&sem->wait); +} + +void +down(struct semaphore *sem) +{ +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); +#endif +#if DEBUG_SEMAPHORE + printk("%s(%d): down(%p) <count=%d> from %p\n", + current->comm, current->pid, sem, + atomic_read(&sem->count), __builtin_return_address(0)); +#endif + __down(sem); +} + +int +down_interruptible(struct semaphore *sem) +{ +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); +#endif +#if DEBUG_SEMAPHORE + printk("%s(%d): down(%p) <count=%d> from %p\n", + current->comm, current->pid, sem, + atomic_read(&sem->count), __builtin_return_address(0)); +#endif + return __down_interruptible(sem); } int -__down_trylock(struct semaphore * sem) +down_trylock(struct semaphore *sem) { - return waking_non_zero_trylock(sem); + int ret; + +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); +#endif + + ret = __down_trylock(sem); + +#if DEBUG_SEMAPHORE + printk("%s(%d): down_trylock %s from %p\n", + current->comm, current->pid, + ret ? "failed" : "acquired", + __builtin_return_address(0)); +#endif + + return ret; +} + +void +up(struct semaphore *sem) +{ +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); +#endif +#if DEBUG_SEMAPHORE + printk("%s(%d): up(%p) <count=%d> from %p\n", + current->comm, current->pid, sem, + atomic_read(&sem->count), __builtin_return_address(0)); +#endif + __up(sem); } @@ -142,124 +270,106 @@ __down_trylock(struct semaphore * sem) */ void -__down_read(struct rw_semaphore *sem, int count) +__down_read_failed(struct rw_semaphore *sem, int count) { - long tmp; - DOWN_VAR; + DECLARE_WAITQUEUE(wait, current); retry_down: if (count < 0) { - /* Wait for the lock to become unbiased. Readers - are non-exclusive. */ + /* Waiting on multiple readers and/or writers. */ - /* This takes care of granting the lock. */ - up_read(sem); + /* Undo the acquisition we started in down_read. */ + atomic_inc(&sem->count); + current->state = TASK_UNINTERRUPTIBLE; + wmb(); add_wait_queue(&sem->wait, &wait); - while (sem->count < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE); - if (sem->count >= 0) - break; + mb(); + while (atomic_read(&sem->count) < 0) { schedule(); + set_task_state(current, TASK_UNINTERRUPTIBLE); } remove_wait_queue(&sem->wait, &wait); - tsk->state = TASK_RUNNING; - - __asm __volatile ( - " mb\n" - "1: ldl_l %0,%1\n" - " subl %0,1,%2\n" - " subl %0,1,%0\n" - " stl_c %2,%1\n" - " bne %2,2f\n" - ".subsection 2\n" - "2: br 1b\n" - ".previous" - : "=r"(count), "=m"(sem->count), "=r"(tmp) - : : "memory"); + current->state = TASK_RUNNING; + + mb(); + count = atomic_dec_return(&sem->count); if (count <= 0) goto retry_down; } else { + /* Waiting on exactly one writer. */ + + current->state = TASK_UNINTERRUPTIBLE; + wmb(); add_wait_queue(&sem->wait, &wait); + mb(); - while (1) { - if (test_and_clear_bit(0, &sem->granted)) - break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE); - if ((sem->granted & 1) == 0) - schedule(); + while (!test_and_clear_bit(0, &sem->granted)) { + schedule(); + set_task_state(current, TASK_UNINTERRUPTIBLE); } remove_wait_queue(&sem->wait, &wait); - tsk->state = TASK_RUNNING; + current->state = TASK_RUNNING; } } void -__down_write(struct rw_semaphore *sem, int count) +__down_write_failed(struct rw_semaphore *sem, int count) { - long tmp; - DOWN_VAR; + DECLARE_WAITQUEUE(wait, current); retry_down: if (count + RW_LOCK_BIAS < 0) { - up_write(sem); + /* Waiting on multiple readers and/or writers. */ + + /* Undo the acquisition we started in down_write. */ + atomic_add(RW_LOCK_BIAS, &sem->count); + current->state = TASK_UNINTERRUPTIBLE; + wmb(); add_wait_queue_exclusive(&sem->wait, &wait); + mb(); - while (sem->count < 0) { - set_task_state(tsk, (TASK_UNINTERRUPTIBLE - | TASK_EXCLUSIVE)); - if (sem->count >= RW_LOCK_BIAS) - break; + while (atomic_read(&sem->count) + RW_LOCK_BIAS < 0) { schedule(); + set_task_state(current, TASK_UNINTERRUPTIBLE); } remove_wait_queue(&sem->wait, &wait); - tsk->state = TASK_RUNNING; - - __asm __volatile ( - " mb\n" - "1: ldl_l %0,%1\n" - " ldah %2,%3(%0)\n" - " ldah %0,%3(%0)\n" - " stl_c %2,%1\n" - " bne %2,2f\n" - ".subsection 2\n" - "2: br 1b\n" - ".previous" - : "=r"(count), "=m"(sem->count), "=r"(tmp) - : "i"(-(RW_LOCK_BIAS >> 16)) - : "memory"); + current->state = TASK_RUNNING; + + count = atomic_sub_return(RW_LOCK_BIAS, &sem->count); if (count != 0) goto retry_down; } else { - /* Put ourselves at the end of the list. */ - add_wait_queue_exclusive(&sem->write_bias_wait, &wait); - - while (1) { - if (test_and_clear_bit(1, &sem->granted)) - break; - set_task_state(tsk, (TASK_UNINTERRUPTIBLE - | TASK_EXCLUSIVE)); - if ((sem->granted & 2) == 0) - schedule(); + /* Waiting on exactly one writer. */ + + current->state = TASK_UNINTERRUPTIBLE; + wmb(); + add_wait_queue_exclusive(&sem->wait, &wait); + mb(); + + while (!test_and_clear_bit(1, &sem->granted)) { + schedule(); + set_task_state(current, TASK_UNINTERRUPTIBLE); } remove_wait_queue(&sem->write_bias_wait, &wait); - tsk->state = TASK_RUNNING; + current->state = TASK_RUNNING; /* If the lock is currently unbiased, awaken the sleepers. FIXME: This wakes up the readers early in a bit of a stampede -> bad! */ - if (sem->count >= 0) + count = atomic_read(&sem->count); + if (__builtin_expect(count >= 0, 0)) wake_up(&sem->wait); } } void -__do_rwsem_wake(struct rw_semaphore *sem, int readers) +__rwsem_wake(struct rw_semaphore *sem, int readers) { if (readers) { if (test_and_set_bit(0, &sem->granted)) @@ -271,3 +381,67 @@ __do_rwsem_wake(struct rw_semaphore *sem, int readers) wake_up(&sem->write_bias_wait); } } + +void +down_read(struct rw_semaphore *sem) +{ +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); +#endif + __down_read(sem); +#if WAITQUEUE_DEBUG + if (sem->granted & 2) + BUG(); + if (atomic_read(&sem->writers)) + BUG(); + atomic_inc(&sem->readers); +#endif +} + +void +down_write(struct rw_semaphore *sem) +{ +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); +#endif + __down_write(sem); +#if WAITQUEUE_DEBUG + if (sem->granted & 3) + BUG(); + if (atomic_read(&sem->writers)) + BUG(); + if (atomic_read(&sem->readers)) + BUG(); + atomic_inc(&sem->writers); +#endif +} + +void +up_read(struct rw_semaphore *sem) +{ +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); + if (sem->granted & 2) + BUG(); + if (atomic_read(&sem->writers)) + BUG(); + atomic_dec(&sem->readers); +#endif + __up_read(sem); +} + +void +up_write(struct rw_semaphore *sem) +{ +#if WAITQUEUE_DEBUG + CHECK_MAGIC(sem->__magic); + if (sem->granted & 3) + BUG(); + if (atomic_read(&sem->readers)) + BUG(); + if (atomic_read(&sem->writers) != 1) + BUG(); + atomic_dec(&sem->writers); +#endif + __up_write(sem); +} diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index 0edf60839..bc7beb7be 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c @@ -378,6 +378,9 @@ do_settimeofday(struct timeval *tv) * BUG: This routine does not handle hour overflow properly; it just * sets the minutes. Usually you won't notice until after reboot! */ + +extern int abs(int); + static int set_rtc_mmss(unsigned long nowtime) { diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile index d22a6f522..913331a95 100644 --- a/arch/alpha/lib/Makefile +++ b/arch/alpha/lib/Makefile @@ -12,7 +12,7 @@ OBJS = __divqu.o __remqu.o __divlu.o __remlu.o memset.o memcpy.o io.o \ strcat.o strcpy.o strncat.o strncpy.o stxcpy.o stxncpy.o \ strchr.o strrchr.o memchr.o \ copy_user.o clear_user.o strncpy_from_user.o strlen_user.o \ - csum_ipv6_magic.o strcasecmp.o semaphore.o fpreg.o \ + csum_ipv6_magic.o strcasecmp.o fpreg.o \ callback_srm.o srm_puts.o srm_printk.o lib.a: $(OBJS) diff --git a/arch/alpha/lib/semaphore.S b/arch/alpha/lib/semaphore.S deleted file mode 100644 index 517285ea4..000000000 --- a/arch/alpha/lib/semaphore.S +++ /dev/null @@ -1,348 +0,0 @@ -/* - * linux/arch/alpha/lib/semaphore.S - * - * Copyright (C) 1999, 2000 Richard Henderson - */ - -/* - * The semaphore operations have a special calling sequence that - * allow us to do a simpler in-line version of them. These routines - * need to convert that sequence back into the C sequence when - * there is contention on the semaphore. - */ - - .set noat - .set noreorder - .align 4 - -/* __down_failed takes the semaphore in $24, clobbers $24 and $28. */ - - .globl __down_failed - .ent __down_failed -__down_failed: - ldgp $29,0($27) - lda $30, -20*8($30) - stq $28, 0*8($30) - stq $0, 1*8($30) - stq $1, 2*8($30) - stq $2, 3*8($30) - stq $3, 4*8($30) - stq $4, 5*8($30) - stq $5, 6*8($30) - stq $6, 7*8($30) - stq $7, 8*8($30) - stq $16, 9*8($30) - stq $17, 10*8($30) - stq $18, 11*8($30) - stq $19, 12*8($30) - stq $20, 13*8($30) - stq $21, 14*8($30) - stq $22, 15*8($30) - stq $23, 16*8($30) - stq $25, 17*8($30) - stq $26, 18*8($30) - .frame $30, 20*8, $28 - .prologue 1 - - mov $24, $16 - jsr __down - - ldq $28, 0*8($30) - ldq $0, 1*8($30) - ldq $1, 2*8($30) - ldq $2, 3*8($30) - ldq $3, 4*8($30) - ldq $4, 5*8($30) - ldq $5, 6*8($30) - ldq $6, 7*8($30) - ldq $7, 8*8($30) - ldq $16, 9*8($30) - ldq $17, 10*8($30) - ldq $18, 11*8($30) - ldq $19, 12*8($30) - ldq $20, 13*8($30) - ldq $21, 14*8($30) - ldq $22, 15*8($30) - ldq $23, 16*8($30) - ldq $25, 17*8($30) - ldq $26, 18*8($30) - lda $30, 20*8($30) - ret $31, ($28), 0 - .end __down_failed - -/* __down_failed_interruptible takes the semaphore in $24, - clobbers $28, returns success in $24. */ - - .globl __down_failed_interruptible - .ent __down_failed_interruptible -__down_failed_interruptible: - ldgp $29,0($27) - lda $30, -20*8($30) - stq $28, 0*8($30) - stq $0, 1*8($30) - stq $1, 2*8($30) - stq $2, 3*8($30) - stq $3, 4*8($30) - stq $4, 5*8($30) - stq $5, 6*8($30) - stq $6, 7*8($30) - stq $7, 8*8($30) - stq $16, 9*8($30) - stq $17, 10*8($30) - stq $18, 11*8($30) - stq $19, 12*8($30) - stq $20, 13*8($30) - stq $21, 14*8($30) - stq $22, 15*8($30) - stq $23, 16*8($30) - stq $25, 17*8($30) - stq $26, 18*8($30) - .frame $30, 20*8, $28 - .prologue 1 - - mov $24, $16 - jsr __down_interruptible - mov $0, $24 - - ldq $28, 0*8($30) - ldq $0, 1*8($30) - ldq $1, 2*8($30) - ldq $2, 3*8($30) - ldq $3, 4*8($30) - ldq $4, 5*8($30) - ldq $5, 6*8($30) - ldq $6, 7*8($30) - ldq $7, 8*8($30) - ldq $16, 9*8($30) - ldq $17, 10*8($30) - ldq $18, 11*8($30) - ldq $19, 12*8($30) - ldq $20, 13*8($30) - ldq $21, 14*8($30) - ldq $22, 15*8($30) - ldq $23, 16*8($30) - ldq $25, 17*8($30) - ldq $26, 18*8($30) - lda $30, 20*8($30) - ret $31, ($28), 0 - .end __down_failed_interruptible - -/* __up_wakeup takes the semaphore in $24, clobbers $24 and $28. */ - - .globl __up_wakeup - .ent __up_wakeup -__up_wakeup: - ldgp $29,0($27) - lda $30, -20*8($30) - stq $28, 0*8($30) - stq $0, 1*8($30) - stq $1, 2*8($30) - stq $2, 3*8($30) - stq $3, 4*8($30) - stq $4, 5*8($30) - stq $5, 6*8($30) - stq $6, 7*8($30) - stq $7, 8*8($30) - stq $16, 9*8($30) - stq $17, 10*8($30) - stq $18, 11*8($30) - stq $19, 12*8($30) - stq $20, 13*8($30) - stq $21, 14*8($30) - stq $22, 15*8($30) - stq $23, 16*8($30) - stq $25, 17*8($30) - stq $26, 18*8($30) - .frame $30, 20*8, $28 - .prologue 1 - - mov $24, $16 - jsr __up - - ldq $28, 0*8($30) - ldq $0, 1*8($30) - ldq $1, 2*8($30) - ldq $2, 3*8($30) - ldq $3, 4*8($30) - ldq $4, 5*8($30) - ldq $5, 6*8($30) - ldq $6, 7*8($30) - ldq $7, 8*8($30) - ldq $16, 9*8($30) - ldq $17, 10*8($30) - ldq $18, 11*8($30) - ldq $19, 12*8($30) - ldq $20, 13*8($30) - ldq $21, 14*8($30) - ldq $22, 15*8($30) - ldq $23, 16*8($30) - ldq $25, 17*8($30) - ldq $26, 18*8($30) - lda $30, 20*8($30) - ret $31, ($28), 0 - .end __up_wakeup - -/* __down_read_failed takes the semaphore in $24, count in $25; - clobbers $24, $25 and $28. */ - - .globl __down_read_failed - .ent __down_read_failed -__down_read_failed: - ldgp $29,0($27) - lda $30, -18*8($30) - stq $28, 0*8($30) - stq $0, 1*8($30) - stq $1, 2*8($30) - stq $2, 3*8($30) - stq $3, 4*8($30) - stq $4, 5*8($30) - stq $5, 6*8($30) - stq $6, 7*8($30) - stq $7, 8*8($30) - stq $16, 9*8($30) - stq $17, 10*8($30) - stq $18, 11*8($30) - stq $19, 12*8($30) - stq $20, 13*8($30) - stq $21, 14*8($30) - stq $22, 15*8($30) - stq $23, 16*8($30) - stq $26, 17*8($30) - .frame $30, 18*8, $28 - .prologue 1 - - mov $24, $16 - mov $25, $17 - jsr __down_read - - ldq $28, 0*8($30) - ldq $0, 1*8($30) - ldq $1, 2*8($30) - ldq $2, 3*8($30) - ldq $3, 4*8($30) - ldq $4, 5*8($30) - ldq $5, 6*8($30) - ldq $6, 7*8($30) - ldq $7, 8*8($30) - ldq $16, 9*8($30) - ldq $17, 10*8($30) - ldq $18, 11*8($30) - ldq $19, 12*8($30) - ldq $20, 13*8($30) - ldq $21, 14*8($30) - ldq $22, 15*8($30) - ldq $23, 16*8($30) - ldq $26, 17*8($30) - lda $30, 18*8($30) - ret $31, ($28), 0 - .end __down_read_failed - -/* __down_write_failed takes the semaphore in $24, count in $25; - clobbers $24, $25 and $28. */ - - .globl __down_write_failed - .ent __down_write_failed -__down_write_failed: - ldgp $29,0($27) - lda $30, -20*8($30) - stq $28, 0*8($30) - stq $0, 1*8($30) - stq $1, 2*8($30) - stq $2, 3*8($30) - stq $3, 4*8($30) - stq $4, 5*8($30) - stq $5, 6*8($30) - stq $6, 7*8($30) - stq $7, 8*8($30) - stq $16, 9*8($30) - stq $17, 10*8($30) - stq $18, 11*8($30) - stq $19, 12*8($30) - stq $20, 13*8($30) - stq $21, 14*8($30) - stq $22, 15*8($30) - stq $23, 16*8($30) - stq $26, 17*8($30) - .frame $30, 18*8, $28 - .prologue 1 - - mov $24, $16 - mov $25, $17 - jsr __down_write - - ldq $28, 0*8($30) - ldq $0, 1*8($30) - ldq $1, 2*8($30) - ldq $2, 3*8($30) - ldq $3, 4*8($30) - ldq $4, 5*8($30) - ldq $5, 6*8($30) - ldq $6, 7*8($30) - ldq $7, 8*8($30) - ldq $16, 9*8($30) - ldq $17, 10*8($30) - ldq $18, 11*8($30) - ldq $19, 12*8($30) - ldq $20, 13*8($30) - ldq $21, 14*8($30) - ldq $22, 15*8($30) - ldq $23, 16*8($30) - ldq $26, 17*8($30) - lda $30, 18*8($30) - ret $31, ($28), 0 - .end __down_write_failed - -/* __rwsem_wake takes the semaphore in $24, readers in $25; - clobbers $24, $25, and $28. */ - - .globl __rwsem_wake - .ent __rwsem_wake -__rwsem_wake: - ldgp $29,0($27) - lda $30, -18*8($30) - stq $28, 0*8($30) - stq $0, 1*8($30) - stq $1, 2*8($30) - stq $2, 3*8($30) - stq $3, 4*8($30) - stq $4, 5*8($30) - stq $5, 6*8($30) - stq $6, 7*8($30) - stq $7, 8*8($30) - stq $16, 9*8($30) - stq $17, 10*8($30) - stq $18, 11*8($30) - stq $19, 12*8($30) - stq $20, 13*8($30) - stq $21, 14*8($30) - stq $22, 15*8($30) - stq $23, 16*8($30) - stq $26, 17*8($30) - .frame $30, 18*8, $28 - .prologue 1 - - mov $24, $16 - mov $25, $17 - jsr __do_rwsem_wake - - ldq $28, 0*8($30) - ldq $0, 1*8($30) - ldq $1, 2*8($30) - ldq $2, 3*8($30) - ldq $3, 4*8($30) - ldq $4, 5*8($30) - ldq $5, 6*8($30) - ldq $6, 7*8($30) - ldq $7, 8*8($30) - ldq $16, 9*8($30) - ldq $17, 10*8($30) - ldq $18, 11*8($30) - ldq $19, 12*8($30) - ldq $20, 13*8($30) - ldq $21, 14*8($30) - ldq $22, 15*8($30) - ldq $23, 16*8($30) - ldq $26, 17*8($30) - lda $30, 18*8($30) - ret $31, ($28), 0 - .end __rwsem_wake diff --git a/arch/arm/config.in b/arch/arm/config.in index fff056940..561cf3bf3 100644 --- a/arch/arm/config.in +++ b/arch/arm/config.in @@ -5,7 +5,9 @@ mainmenu_name "Linux Kernel Configuration" define_bool CONFIG_ARM y +define_bool CONFIG_EISA n define_bool CONFIG_SBUS n +define_bool CONFIG_MCA n define_bool CONFIG_UID16 y diff --git a/arch/arm/kernel/semaphore.c b/arch/arm/kernel/semaphore.c index f89852641..aac8be68b 100644 --- a/arch/arm/kernel/semaphore.c +++ b/arch/arm/kernel/semaphore.c @@ -58,7 +58,7 @@ void __down(struct semaphore * sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -78,7 +78,7 @@ void __down(struct semaphore * sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -92,7 +92,7 @@ int __down_interruptible(struct semaphore * sem) int retval = 0; struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -128,7 +128,7 @@ int __down_interruptible(struct semaphore * sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -197,7 +197,7 @@ struct rw_semaphore *down_write_failed_biased(struct rw_semaphore *sem) for (;;) { if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!sem->write_bias_granted) schedule(); } @@ -255,7 +255,7 @@ struct rw_semaphore *down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 96da8d33b..7ef695981 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -54,6 +54,10 @@ ifdef CONFIG_M686FXSR CFLAGS += -march=i686 endif +ifdef CONFIG_MPENTIUM4 +CFLAGS += -march=i686 +endif + ifdef CONFIG_MK6 CFLAGS += $(shell if $(CC) -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=k6"; else echo "-march=i586"; fi) endif @@ -63,7 +67,7 @@ CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/nul endif ifdef CONFIG_MCRUSOE -CFLAGS += -march=i586 +CFLAGS += -march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0 endif ifdef CONFIG_MWINCHIPC6 diff --git a/arch/i386/config.in b/arch/i386/config.in index 327aa736d..d6c63a8b8 100644 --- a/arch/i386/config.in +++ b/arch/i386/config.in @@ -34,6 +34,7 @@ choice 'Processor family' \ Pentium-MMX CONFIG_M586MMX \ Pentium-Pro/Celeron/Pentium-II CONFIG_M686 \ Pentium-III CONFIG_M686FXSR \ + Pentium-4 CONFIG_MPENTIUM4 \ K6/K6-II/K6-III CONFIG_MK6 \ Athlon/K7 CONFIG_MK7 \ Crusoe CONFIG_MCRUSOE \ @@ -92,6 +93,15 @@ if [ "$CONFIG_M686FXSR" = "y" ]; then define_bool CONFIG_X86_FXSR y define_bool CONFIG_X86_XMM y fi +if [ "$CONFIG_MPENTIUM4" = "y" ]; then + define_int CONFIG_X86_L1_CACHE_SHIFT 7 + define_bool CONFIG_X86_TSC y + define_bool CONFIG_X86_GOOD_APIC y + define_bool CONFIG_X86_PGE y + define_bool CONFIG_X86_USE_PPRO_CHECKSUM y + define_bool CONFIG_X86_FXSR y + define_bool CONFIG_X86_XMM y +fi if [ "$CONFIG_MK6" = "y" ]; then define_int CONFIG_X86_L1_CACHE_SHIFT 5 define_bool CONFIG_X86_ALIGNMENT_16 y @@ -158,6 +168,7 @@ if [ "$CONFIG_SMP" != "y" ]; then define_bool CONFIG_X86_LOCAL_APIC y fi fi + if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then define_bool CONFIG_HAVE_DEC_LOCK y fi @@ -194,8 +205,12 @@ fi source drivers/pci/Config.in +bool 'EISA support' CONFIG_EISA + if [ "$CONFIG_VISWS" != "y" ]; then bool 'MCA support' CONFIG_MCA +else + define_bool CONFIG_MCA n fi bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG diff --git a/arch/i386/defconfig b/arch/i386/defconfig index b22c770db..9f8625c6e 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -28,6 +28,7 @@ CONFIG_KMOD=y # CONFIG_M586MMX is not set # CONFIG_M686 is not set CONFIG_M686FXSR=y +# CONFIG_MPENTIUM4 is not set # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MCRUSOE is not set @@ -71,6 +72,7 @@ CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_NAMES=y +# CONFIG_EISA is not set # CONFIG_MCA is not set CONFIG_HOTPLUG=y @@ -79,6 +81,8 @@ CONFIG_HOTPLUG=y # CONFIG_PCMCIA=y CONFIG_CARDBUS=y +# CONFIG_I82365 is not set +# CONFIG_TCIC is not set CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y @@ -143,11 +147,12 @@ CONFIG_PACKET=y # CONFIG_FILTER is not set CONFIG_UNIX=y CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set +CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set # CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set @@ -359,21 +364,29 @@ CONFIG_NET_ETHERNET=y CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_CS89x0 is not set -# CONFIG_DE4X5 is not set # CONFIG_TULIP is not set +# CONFIG_DE4X5 is not set # CONFIG_DGRS is not set +# CONFIG_DM9102 is not set CONFIG_EEPRO100=y +# CONFIG_EEPRO100_PM is not set +# CONFIG_LNE390 is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set +# CONFIG_NE3210 is not set +# CONFIG_ES3210 is not set # CONFIG_8139TOO is not set +# CONFIG_RTL8129 is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_WINBOND_840 is not set +# CONFIG_HAPPYMEAL is not set # CONFIG_NET_POCKET is not set # diff --git a/arch/i386/kernel/acpi.c b/arch/i386/kernel/acpi.c index f9424d105..98079f060 100644 --- a/arch/i386/kernel/acpi.c +++ b/arch/i386/kernel/acpi.c @@ -258,6 +258,8 @@ static struct ctl_table acpi_table[] = {ACPI_FACP, "facp", &acpi_facp, 0, 0644, NULL, &acpi_do_table}, {ACPI_DSDT, "dsdt", &acpi_dsdt, 0, 0644, NULL, &acpi_do_table}, + + {ACPI_FACS, "facs", &acpi_facs, 0, 0644, NULL, &acpi_do_table}, {ACPI_PM1_ENABLE, "pm1_enable", NULL, 0, @@ -722,12 +724,21 @@ static int __init acpi_find_tables(void) if (!acpi_init_table(&acpi_facp, dt, 1)) { struct acpi_facp *facp = (struct acpi_facp*) acpi_facp.table; + struct acpi_table *facs; // map DSDT if it exists - dt = acpi_map_table(facp->dsdt); - if (acpi_init_table(&acpi_dsdt, dt, 1)) - acpi_unmap_table(dt); - + if ((dt = acpi_map_table(facp->dsdt))) { + if (acpi_init_table(&acpi_dsdt, dt, 1)) + acpi_unmap_table(dt); + } + + /* + * map FACS if it exists + */ + if ((facs = acpi_map_table(facp->facs))) { + if (acpi_init_table(&acpi_facs,facs,1)) + acpi_unmap_table(facs); + } break; } else { diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 4e5df4681..fc54896f8 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -219,39 +219,6 @@ void __init setup_local_APIC (void) if (!test_bit(GET_APIC_ID(apic_read(APIC_ID)), &phys_cpu_present_map)) BUG(); - value = apic_read(APIC_SPIV); - value &= ~APIC_VECTOR_MASK; - /* - * Enable APIC - */ - value |= (1<<8); - - /* - * Some unknown Intel IO/APIC (or APIC) errata is biting us with - * certain networking cards. If high frequency interrupts are - * happening on a particular IOAPIC pin, plus the IOAPIC routing - * entry is masked/unmasked at a high rate as well then sooner or - * later IOAPIC line gets 'stuck', no more interrupts are received - * from the device. If focus CPU is disabled then the hang goes - * away, oh well :-( - * - * [ This bug can be reproduced easily with a level-triggered - * PCI Ne2000 networking cards and PII/PIII processors, dual - * BX chipset. ] - */ -#if 0 - /* Enable focus processor (bit==0) */ - value &= ~(1<<9); -#else - /* Disable focus processor (bit==1) */ - value |= (1<<9); -#endif - /* - * Set spurious IRQ vector - */ - value |= SPURIOUS_APIC_VECTOR; - apic_write_around(APIC_SPIV, value); - /* * Set up LVT0, LVT1: * @@ -323,6 +290,42 @@ void __init setup_local_APIC (void) * Must be "all ones" explicitly for 82489DX. */ apic_write_around(APIC_DFR, 0xffffffff); + + /* + * Now that we are all set up, enable the APIC + */ + value = apic_read(APIC_SPIV); + value &= ~APIC_VECTOR_MASK; + /* + * Enable APIC + */ + value |= (1<<8); + + /* + * Some unknown Intel IO/APIC (or APIC) errata is biting us with + * certain networking cards. If high frequency interrupts are + * happening on a particular IOAPIC pin, plus the IOAPIC routing + * entry is masked/unmasked at a high rate as well then sooner or + * later IOAPIC line gets 'stuck', no more interrupts are received + * from the device. If focus CPU is disabled then the hang goes + * away, oh well :-( + * + * [ This bug can be reproduced easily with a level-triggered + * PCI Ne2000 networking cards and PII/PIII processors, dual + * BX chipset. ] + */ +#if 0 + /* Enable focus processor (bit==0) */ + value &= ~(1<<9); +#else + /* Disable focus processor (bit==1) */ + value |= (1<<9); +#endif + /* + * Set spurious IRQ vector + */ + value |= SPURIOUS_APIC_VECTOR; + apic_write_around(APIC_SPIV, value); } void __init init_apic_mappings(void) diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index b0aa2a7c3..dc47528cd 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c @@ -1126,6 +1126,7 @@ static void apm_mainloop(void) } #endif } + remove_wait_queue(&apm_waitqueue, &wait); } static int check_apm_user(struct apm_user *as, const char *func) @@ -1422,9 +1423,6 @@ static int apm(void *unused) kapmd_running = 1; - exit_files(current); /* daemonize doesn't do exit_files */ - current->files = init_task.files; - atomic_inc(¤t->files->count); daemonize(); strcpy(current->comm, "kapm-idled"); @@ -1574,8 +1572,6 @@ static struct miscdevice apm_device = { &apm_bios_fops }; -#define APM_INIT_ERROR_RETURN return -1 - /* * Just start the APM thread. We do NOT want to do APM BIOS * calls from anything but the APM thread, if for no other reason @@ -1590,7 +1586,7 @@ static int __init apm_init(void) { if (apm_bios_info.version == 0) { printk(KERN_INFO "apm: BIOS not found.\n"); - APM_INIT_ERROR_RETURN; + return -ENODEV; } printk(KERN_INFO "apm: BIOS version %d.%d Flags 0x%02x (Driver version %s)\n", @@ -1600,7 +1596,7 @@ static int __init apm_init(void) driver_version); if ((apm_bios_info.flags & APM_32_BIT_SUPPORT) == 0) { printk(KERN_INFO "apm: no 32 bit BIOS support\n"); - APM_INIT_ERROR_RETURN; + return -ENODEV; } /* @@ -1629,15 +1625,15 @@ static int __init apm_init(void) if (apm_disabled) { printk(KERN_NOTICE "apm: disabled on user request.\n"); - APM_INIT_ERROR_RETURN; + return -ENODEV; } if ((smp_num_cpus > 1) && !power_off) { printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n"); - APM_INIT_ERROR_RETURN; + return -ENODEV; } if (PM_IS_ACTIVE()) { printk(KERN_NOTICE "apm: overridden by ACPI.\n"); - APM_INIT_ERROR_RETURN; + return -ENODEV; } pm_active = 1; @@ -1686,7 +1682,7 @@ static int __init apm_init(void) if (smp_num_cpus > 1) { printk(KERN_NOTICE "apm: disabled - APM is not SMP safe (power off active).\n"); - APM_INIT_ERROR_RETURN; + return 0; } misc_register(&apm_device); diff --git a/arch/i386/kernel/bluesmoke.c b/arch/i386/kernel/bluesmoke.c index ee6966d5f..59826db68 100644 --- a/arch/i386/kernel/bluesmoke.c +++ b/arch/i386/kernel/bluesmoke.c @@ -10,7 +10,7 @@ static int banks; -void mcheck_fault(void) +void do_machine_check(struct pt_regs * regs, long error_code) { int recover=1; u32 alow, ahigh, high, low; @@ -66,22 +66,19 @@ void mcheck_fault(void) * This has to be run for each processor */ -void mcheck_init(void) +void mcheck_init(struct cpuinfo_x86 *c) { u32 l, h; int i; - struct cpuinfo_x86 *c; static int done; - c=cpu_data+smp_processor_id(); - - if(c->x86_vendor!=X86_VENDOR_INTEL) + if( c->x86_vendor != X86_VENDOR_INTEL ) return; - if(!(c->x86_capability&X86_FEATURE_MCE)) + if( !test_bit(X86_FEATURE_TSC, &c->x86_capability) ) return; - if(!(c->x86_capability&X86_FEATURE_MCA)) + if( !test_bit(X86_FEATURE_MCA, &c->x86_capability) ) return; /* Ok machine check is available */ diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 4ae0ed2ee..5e3c91019 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -383,11 +383,6 @@ ENTRY(coprocessor_segment_overrun) pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun) jmp error_code -ENTRY(reserved) - pushl $0 - pushl $ SYMBOL_NAME(do_reserved) - jmp error_code - ENTRY(double_fault) pushl $ SYMBOL_NAME(do_double_fault) jmp error_code @@ -418,7 +413,7 @@ ENTRY(page_fault) ENTRY(machine_check) pushl $0 - pushl $ SYMBOL_NAME(mcheck_fault) + pushl $ SYMBOL_NAME(do_machine_check) jmp error_code ENTRY(spurious_interrupt_bug) diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c index ed3573426..3de4a76d1 100644 --- a/arch/i386/kernel/i386_ksyms.c +++ b/arch/i386/kernel/i386_ksyms.c @@ -49,7 +49,9 @@ extern unsigned long get_cmos_time(void); /* platform dependent support */ EXPORT_SYMBOL(boot_cpu_data); +#ifdef CONFIG_EISA EXPORT_SYMBOL(EISA_bus); +#endif EXPORT_SYMBOL(MCA_bus); EXPORT_SYMBOL(__verify_write); EXPORT_SYMBOL(dump_thread); diff --git a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c index c3d052e8a..3031432d0 100644 --- a/arch/i386/kernel/i387.c +++ b/arch/i386/kernel/i387.c @@ -442,6 +442,8 @@ int set_fpxregs( struct task_struct *tsk, struct user_fxsr_struct *buf ) if ( HAVE_FXSR ) { __copy_from_user( &tsk->thread.i387.fxsave, (void *)buf, sizeof(struct user_fxsr_struct) ); + /* mxcsr bit 6 and 31-16 must be zero for security reasons */ + tsk->thread.i387.fxsave.mxcsr &= 0xffbf; return 0; } else { return -EIO; diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c index df377c5b4..570614282 100644 --- a/arch/i386/kernel/i8259.c +++ b/arch/i386/kernel/i8259.c @@ -374,7 +374,6 @@ void __init init_8259A(int auto_eoi) spin_unlock_irqrestore(&i8259A_lock, flags); } -#ifndef CONFIG_VISWS /* * Note that on a 486, we don't want to do a SIGFPE on an irq13 * as the irq is unreliable, and exception 16 works correctly @@ -400,12 +399,13 @@ static void math_error_irq(int cpl, void *dev_id, struct pt_regs *regs) * New motherboards sometimes make IRQ 13 be a PCI interrupt, * so allow interrupt sharing. */ -static struct irqaction irq13 = { math_error_irq, SA_SHIRQ, 0, "fpu", NULL, NULL }; +static struct irqaction irq13 = { math_error_irq, 0, 0, "fpu", NULL, NULL }; /* * IRQ2 is cascade interrupt to second interrupt controller */ +#ifndef CONFIG_VISWS static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL}; #endif @@ -494,6 +494,12 @@ void __init init_IRQ(void) #ifndef CONFIG_VISWS setup_irq(2, &irq2); - setup_irq(13, &irq13); #endif + + /* + * External FPU? Set up irq13 if so, for + * original braindamaged IBM FERR coupling. + */ + if (boot_cpu_data.hard_math && !cpu_has_fpu) + setup_irq(13, &irq13); } diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index b17c30041..5dfbde523 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -97,6 +97,8 @@ static char __init *mpc_family(int family,int model) return("Pentium(tm) Pro"); case 0x0F: + if (model == 0x00) + return("Pentium 4(tm)"); if (model == 0x0F) return("Special controller"); } @@ -125,6 +127,44 @@ static void __init MP_processor_info (struct mpc_config_processor *m) Dprintk(" 64 bit compare & exchange supported.\n"); if (m->mpc_featureflag&(1<<9)) Dprintk(" Internal APIC present.\n"); + if (m->mpc_featureflag&(1<<11)) + Dprintk(" SEP present.\n"); + if (m->mpc_featureflag&(1<<12)) + Dprintk(" MTRR present.\n"); + if (m->mpc_featureflag&(1<<13)) + Dprintk(" PGE present.\n"); + if (m->mpc_featureflag&(1<<14)) + Dprintk(" MCA present.\n"); + if (m->mpc_featureflag&(1<<15)) + Dprintk(" CMOV present.\n"); + if (m->mpc_featureflag&(1<<16)) + Dprintk(" PAT present.\n"); + if (m->mpc_featureflag&(1<<17)) + Dprintk(" PSE present.\n"); + if (m->mpc_featureflag&(1<<18)) + Dprintk(" PSN present.\n"); + if (m->mpc_featureflag&(1<<19)) + Dprintk(" Cache Line Flush Instruction present.\n"); + /* 20 Reserved */ + if (m->mpc_featureflag&(1<<21)) + Dprintk(" Debug Trace and EMON Store present.\n"); + if (m->mpc_featureflag&(1<<22)) + Dprintk(" ACPI Thermal Throttle Registers present.\n"); + if (m->mpc_featureflag&(1<<23)) + Dprintk(" MMX present.\n"); + if (m->mpc_featureflag&(1<<24)) + Dprintk(" FXSR present.\n"); + if (m->mpc_featureflag&(1<<25)) + Dprintk(" XMM present.\n"); + if (m->mpc_featureflag&(1<<26)) + Dprintk(" Willamette New Instructions present.\n"); + if (m->mpc_featureflag&(1<<27)) + Dprintk(" Self Snoop present.\n"); + /* 28 Reserved */ + if (m->mpc_featureflag&(1<<29)) + Dprintk(" Thermal Monitor present.\n"); + /* 30, 31 Reserved */ + if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { Dprintk(" Bootup CPU\n"); @@ -378,7 +418,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | (boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask; - processor.mpc_featureflag = boot_cpu_data.x86_capability; + processor.mpc_featureflag = boot_cpu_data.x86_capability[0]; processor.mpc_reserved[0] = 0; processor.mpc_reserved[1] = 0; for (i = 0; i < 2; i++) { diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index fe52293da..badb6ed15 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c @@ -231,7 +231,7 @@ static int msr_open(struct inode *inode, struct file *file) if ( !(cpu_online_map & (1UL << cpu)) ) return -ENXIO; /* No such CPU */ - if ( !(c->x86_capability & X86_FEATURE_MSR) ) + if ( !test_bit(X86_FEATURE_MSR, &c->x86_capability) ) return -EIO; /* MSR not supported */ return 0; diff --git a/arch/i386/kernel/mtrr.c b/arch/i386/kernel/mtrr.c index 045374d50..47c83f58e 100644 --- a/arch/i386/kernel/mtrr.c +++ b/arch/i386/kernel/mtrr.c @@ -228,6 +228,9 @@ 20000221 Richard Gooch <rgooch@atnf.csiro.au> Compile fix if procfs and devfs not enabled. Formatting changes. + v1.37 + 20001109 H. Peter Anvin <hpa@zytor.com> + Use the new centralized CPU feature detects. */ #include <linux/types.h> #include <linux/errno.h> @@ -266,11 +269,28 @@ #include <asm/hardirq.h> #include <linux/irq.h> -#define MTRR_VERSION "1.36 (20000221)" +#define MTRR_VERSION "1.37 (20001109)" #define TRUE 1 #define FALSE 0 +/* + * The code assumes all processors support the same MTRR + * interface. This is generally a good assumption, but could + * potentially be a problem. + */ +enum mtrr_if_type { + MTRR_IF_NONE, /* No MTRRs supported */ + MTRR_IF_INTEL, /* Intel (P6) standard MTRRs */ + MTRR_IF_AMD_K6, /* AMD pre-Athlon MTRRs */ + MTRR_IF_CYRIX_ARR, /* Cyrix ARRs */ + MTRR_IF_CENTAUR_MCR, /* Centaur MCRs */ +} mtrr_if = MTRR_IF_NONE; + +static __initdata char *mtrr_if_name[] = { + "none", "Intel", "AMD K6", "Cyrix ARR", "Centaur MCR" +}; + #define MTRRcap_MSR 0x0fe #define MTRRdefType_MSR 0x2ff @@ -350,18 +370,11 @@ static void set_mtrr_prepare (struct set_mtrr_context *ctxt) /* Disable interrupts locally */ __save_flags (ctxt->flags); __cli (); - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 >= 6) break; /* Athlon and post-Athlon CPUs */ - /* else fall through */ - case X86_VENDOR_CENTAUR: - if(boot_cpu_data.x86 != 6) - return; - /*break;*/ - } + if ( mtrr_if != MTRR_IF_INTEL && mtrr_if != MTRR_IF_CYRIX_ARR ) + return; + /* Save value of CR4 and clear Page Global Enable (bit 7) */ - if (boot_cpu_data.x86_capability & X86_FEATURE_PGE) + if ( test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability) ) asm volatile ("movl %%cr4, %0\n\t" "movl %0, %1\n\t" "andb $0x7f, %b1\n\t" @@ -377,20 +390,15 @@ static void set_mtrr_prepare (struct set_mtrr_context *ctxt) "wbinvd\n\t" : "=r" (tmp) : : "memory"); - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - case X86_VENDOR_INTEL: - case X86_VENDOR_CENTAUR: + if ( mtrr_if == MTRR_IF_INTEL ) { /* Disable MTRRs, and set the default type to uncached */ rdmsr (MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi); wrmsr (MTRRdefType_MSR, ctxt->deftype_lo & 0xf300UL, ctxt->deftype_hi); - break; - case X86_VENDOR_CYRIX: + } else { + /* Cyrix ARRs - everything else were excluded at the top */ tmp = getCx86 (CX86_CCR3); setCx86 (CX86_CCR3, (tmp & 0x0f) | 0x10); ctxt->ccr3 = tmp; - break; } } /* End Function set_mtrr_prepare */ @@ -399,33 +407,21 @@ static void set_mtrr_done (struct set_mtrr_context *ctxt) { unsigned long tmp; - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 >= 6) break; /* Athlon and post-Athlon CPUs */ - /* else fall through */ - case X86_VENDOR_CENTAUR: - if(boot_cpu_data.x86 != 6) - { - __restore_flags (ctxt->flags); - return; - } - /*break;*/ + if ( mtrr_if != MTRR_IF_INTEL && mtrr_if != MTRR_IF_CYRIX_ARR ) { + __restore_flags (ctxt->flags); + return; } + /* Flush caches and TLBs */ asm volatile ("wbinvd" : : : "memory" ); /* Restore MTRRdefType */ - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - case X86_VENDOR_INTEL: - case X86_VENDOR_CENTAUR: + if ( mtrr_if == MTRR_IF_INTEL ) { + /* Intel (P6) standard MTRRs */ wrmsr (MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi); - break; - case X86_VENDOR_CYRIX: + } else { + /* Cyrix ARRs - everything else was excluded at the top */ setCx86 (CX86_CCR3, ctxt->ccr3); - break; } /* Enable caches */ @@ -435,7 +431,7 @@ static void set_mtrr_done (struct set_mtrr_context *ctxt) : "=r" (tmp) : : "memory"); /* Restore value of CR4 */ - if (boot_cpu_data.x86_capability & X86_FEATURE_PGE) + if ( test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability) ) asm volatile ("movl %0, %%cr4" : : "r" (ctxt->cr4val) : "memory"); @@ -448,31 +444,20 @@ static unsigned int get_num_var_ranges (void) { unsigned long config, dummy; - switch (boot_cpu_data.x86_vendor) + switch ( mtrr_if ) { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 < 6) return 2; /* pre-Athlon CPUs */ - /* else fall through */ - case X86_VENDOR_INTEL: + case MTRR_IF_INTEL: rdmsr (MTRRcap_MSR, config, dummy); return (config & 0xff); - /*break;*/ - case X86_VENDOR_CYRIX: - /* Cyrix have 8 ARRs */ + case MTRR_IF_AMD_K6: + return 2; + case MTRR_IF_CYRIX_ARR: return 8; - case X86_VENDOR_CENTAUR: - /* and Centaur has 8 MCR's */ - if(boot_cpu_data.x86==5) - return 8; - /* the cyrix III has intel compatible MTRR */ - if(boot_cpu_data.x86==6) - { - rdmsr (MTRRcap_MSR, config, dummy); - return (config & 0xff); - } - /*break;*/ + case MTRR_IF_CENTAUR_MCR: + return 8; + default: + return 0; } - return 0; } /* End Function get_num_var_ranges */ /* Returns non-zero if we have the write-combining memory type */ @@ -480,24 +465,19 @@ static int have_wrcomb (void) { unsigned long config, dummy; - switch (boot_cpu_data.x86_vendor) + switch ( mtrr_if ) { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 < 6) return 1; /* pre-Athlon CPUs */ - /* else fall through */ - case X86_VENDOR_CENTAUR: - if (boot_cpu_data.x86 == 5) - return 1; /* C6 */ - /* CyrixIII is Intel like */ - case X86_VENDOR_INTEL: + case MTRR_IF_INTEL: rdmsr (MTRRcap_MSR, config, dummy); return (config & (1<<10)); - /*break;*/ - case X86_VENDOR_CYRIX: return 1; - /*break;*/ + case MTRR_IF_AMD_K6: + case MTRR_IF_CENTAUR_MCR: + case MTRR_IF_CYRIX_ARR: + return 1; + default: + return 0; } - return 0; } /* End Function have_wrcomb */ static void intel_get_mtrr (unsigned int reg, unsigned long *base, @@ -1171,47 +1151,48 @@ int mtrr_add(unsigned long base, unsigned long size, unsigned int type, char inc mtrr_type ltype; unsigned long lbase, lsize, last; - if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return -ENODEV; - switch (boot_cpu_data.x86_vendor) + switch ( mtrr_if ) { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 < 6) - { /* pre-Athlon CPUs */ - /* Apply the K6 block alignment and size rules - In order - o Uncached or gathering only - o 128K or bigger block - o Power of 2 block - o base suitably aligned to the power - */ - if ( type > MTRR_TYPE_WRCOMB || size < (1 << 17) || - (size & ~(size-1))-size || ( base & (size-1) ) ) - return -EINVAL; - break; - } - /* Else fall through */ - case X86_VENDOR_INTEL: - /* Double check for Intel, we may run on Athlon */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) + case MTRR_IF_NONE: + return -ENXIO; /* No MTRRs whatsoever */ + + case MTRR_IF_AMD_K6: + /* Apply the K6 block alignment and size rules + In order + o Uncached or gathering only + o 128K or bigger block + o Power of 2 block + o base suitably aligned to the power + */ + if ( type > MTRR_TYPE_WRCOMB || size < (1 << 17) || + (size & ~(size-1))-size || ( base & (size-1) ) ) + return -EINVAL; + break; + + case MTRR_IF_INTEL: + /* For Intel PPro stepping <= 7, must be 4 MiB aligned */ + if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && + boot_cpu_data.x86 == 6 && + boot_cpu_data.x86_model == 1 && + boot_cpu_data.x86_mask <= 7 ) { - /* For Intel PPro stepping <= 7, must be 4 MiB aligned */ - if ( (boot_cpu_data.x86 == 6) && (boot_cpu_data.x86_model == 1) && - (boot_cpu_data.x86_mask <= 7) && ( base & ( (1 << 22) -1 ) ) ) + if ( base & ((1 << 22)-1) ) { printk (KERN_WARNING "mtrr: base(0x%lx) is not 4 MiB aligned\n", base); return -EINVAL; } } - /* Fall through */ - case X86_VENDOR_CYRIX: - case X86_VENDOR_CENTAUR: + /* Fall through */ + + case MTRR_IF_CYRIX_ARR: + case MTRR_IF_CENTAUR_MCR: if ( (base & 0xfff) || (size & 0xfff) ) { printk ("mtrr: size and base must be multiples of 4 kiB\n"); printk ("mtrr: size: %lx base: %lx\n", size, base); return -EINVAL; } - if (boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR && boot_cpu_data.x86 == 5) + if ( mtrr_if == MTRR_IF_CENTAUR_MCR ) { if (type != MTRR_TYPE_WRCOMB) { @@ -1237,10 +1218,11 @@ int mtrr_add(unsigned long base, unsigned long size, unsigned int type, char inc return -EINVAL; } break; - default: + + default: return -EINVAL; - /*break;*/ } + if (type >= MTRR_NUM_TYPES) { printk ("mtrr: type: %u illegal\n", type); @@ -1328,7 +1310,8 @@ int mtrr_del (int reg, unsigned long base, unsigned long size) mtrr_type ltype; unsigned long lbase, lsize; - if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return -ENODEV; + if ( mtrr_if == MTRR_IF_NONE ) return -ENXIO; + max = get_num_var_ranges (); down (&main_lock); if (reg < 0) @@ -1356,7 +1339,7 @@ int mtrr_del (int reg, unsigned long base, unsigned long size) printk ("mtrr: register: %d too big\n", reg); return -EINVAL; } - if (boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX) + if ( mtrr_if == MTRR_IF_CYRIX_ARR ) { if ( (reg == 3) && arr3_protected ) { @@ -1772,42 +1755,41 @@ static void __init centaur_mcr_init(void) set_mtrr_done (&ctxt); } /* End Function centaur_mcr_init */ -static void __init mtrr_setup(void) +static int __init mtrr_setup(void) { - printk ("mtrr: v%s Richard Gooch (rgooch@atnf.csiro.au)\n", MTRR_VERSION); - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 < 6) - { - /* pre-Athlon CPUs */ - get_mtrr = amd_get_mtrr; - set_mtrr_up = amd_set_mtrr_up; - break; - } - /* Else fall through */ - case X86_VENDOR_INTEL: + if ( test_bit(X86_FEATURE_MTRR, &boot_cpu_data.x86_capability) ) { + /* Intel (P6) standard MTRRs */ + mtrr_if = MTRR_IF_INTEL; get_mtrr = intel_get_mtrr; set_mtrr_up = intel_set_mtrr_up; - break; - case X86_VENDOR_CYRIX: + } else if ( test_bit(X86_FEATURE_K6_MTRR, &boot_cpu_data.x86_capability) ) { + /* Pre-Athlon (K6) AMD CPU MTRRs */ + mtrr_if = MTRR_IF_AMD_K6; + get_mtrr = amd_get_mtrr; + set_mtrr_up = amd_set_mtrr_up; + } else if ( test_bit(X86_FEATURE_CYRIX_ARR, &boot_cpu_data.x86_capability) ) { + /* Cyrix ARRs */ + mtrr_if = MTRR_IF_CYRIX_ARR; get_mtrr = cyrix_get_arr; set_mtrr_up = cyrix_set_arr_up; get_free_region = cyrix_get_free_region; - break; - case X86_VENDOR_CENTAUR: - if(boot_cpu_data.x86 == 5) - { - get_mtrr = centaur_get_mcr; - set_mtrr_up = centaur_set_mcr_up; - } - if(boot_cpu_data.x86 == 6) - { - get_mtrr = intel_get_mtrr; - set_mtrr_up = intel_set_mtrr_up; - } - break; + cyrix_arr_init(); + } else if ( test_bit(X86_FEATURE_CENTAUR_MCR, &boot_cpu_data.x86_capability) ) { + /* Centaur MCRs */ + mtrr_if = MTRR_IF_CENTAUR_MCR; + get_mtrr = centaur_get_mcr; + set_mtrr_up = centaur_set_mcr_up; + centaur_mcr_init(); + } else { + /* No supported MTRR interface */ + mtrr_if = MTRR_IF_NONE; } + + printk ("mtrr: v%s Richard Gooch (rgooch@atnf.csiro.au)\n" + "mtrr: detected mtrr type: %s\n", + MTRR_VERSION, mtrr_if_name[mtrr_if]); + + return (mtrr_if != MTRR_IF_NONE); } /* End Function mtrr_setup */ #ifdef CONFIG_SMP @@ -1817,24 +1799,12 @@ static struct mtrr_state smp_mtrr_state __initdata = {0, 0}; void __init mtrr_init_boot_cpu(void) { - if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return; - mtrr_setup (); - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 < 6) break; /* Pre-Athlon CPUs */ - case X86_VENDOR_INTEL: + if ( !mtrr_setup () ) + return; + + if ( mtrr_if == MTRR_IF_INTEL ) { + /* Only for Intel MTRRs */ get_mtrr_state (&smp_mtrr_state); - break; - case X86_VENDOR_CYRIX: - cyrix_arr_init (); - break; - case X86_VENDOR_CENTAUR: /* C6 and Cyrix III have different ones */ - if(boot_cpu_data.x86 == 5) - centaur_mcr_init (); - if(boot_cpu_data.x86 == 6) - get_mtrr_state(&smp_mtrr_state); - break; } } /* End Function mtrr_init_boot_cpu */ @@ -1859,16 +1829,12 @@ static void __init intel_mtrr_init_secondary_cpu(void) void __init mtrr_init_secondary_cpu(void) { - if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return; - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - /* Just for robustness: pre-Athlon CPUs cannot do SMP */ - if (boot_cpu_data.x86 < 6) break; - case X86_VENDOR_INTEL: - intel_mtrr_init_secondary_cpu (); + switch ( mtrr_if ) { + case MTRR_IF_INTEL: + /* Intel (P6) standard MTRRs */ + intel_mtrr_init_secondary_cpu(); break; - case X86_VENDOR_CYRIX: + case MTRR_IF_CYRIX_ARR: /* This is _completely theoretical_! * I assume here that one day Cyrix will support Intel APIC. * In reality on non-Intel CPUs we won't even get to this routine. @@ -1877,39 +1843,26 @@ void __init mtrr_init_secondary_cpu(void) */ cyrix_arr_init_secondary (); break; - default: + default: + /* I see no MTRRs I can support in SMP mode... */ printk ("mtrr: SMP support incomplete for this vendor\n"); - break; } } /* End Function mtrr_init_secondary_cpu */ #endif /* CONFIG_SMP */ int __init mtrr_init(void) { - if ( !(boot_cpu_data.x86_capability & X86_FEATURE_MTRR) ) return 0; #ifdef CONFIG_SMP - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_AMD: - if (boot_cpu_data.x86 < 6) break; /* Pre-Athlon CPUs */ - case X86_VENDOR_INTEL: + /* mtrr_setup() should already have been called from mtrr_init_boot_cpu() */ + + if ( mtrr_if == MTRR_IF_INTEL ) { finalize_mtrr_state (&smp_mtrr_state); mtrr_state_warn (smp_changes_mask); - break; } -#else /* CONFIG_SMP */ - mtrr_setup (); - switch (boot_cpu_data.x86_vendor) - { - case X86_VENDOR_CYRIX: - cyrix_arr_init (); - break; - case X86_VENDOR_CENTAUR: - if(boot_cpu_data.x86 == 5) - centaur_mcr_init (); - break; - } -#endif /* !CONFIG_SMP */ +#else + if ( !mtrr_setup() ) + return 0; /* MTRRs not supported? */ +#endif #ifdef CONFIG_PROC_FS proc_root_mtrr = create_proc_entry ("mtrr", S_IWUSR | S_IRUGO, &proc_root); @@ -1924,3 +1877,11 @@ int __init mtrr_init(void) init_table (); return 0; } /* End Function mtrr_init */ + +/* + * Local Variables: + * mode:c + * c-file-style:"k&r" + * c-basic-offset:4 + * End: + */ diff --git a/arch/i386/kernel/pci-irq.c b/arch/i386/kernel/pci-irq.c index 9a5fe8958..17a929bb2 100644 --- a/arch/i386/kernel/pci-irq.c +++ b/arch/i386/kernel/pci-irq.c @@ -265,6 +265,20 @@ static int pirq_opti_set(struct pci_dev *router, struct pci_dev *dev, int pirq, return 1; } +/* + * Cyrix: nibble offset 0x5C + */ +static int pirq_cyrix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) +{ + return read_config_nybble(router, 0x5C, pirq-1); +} + +static int pirq_cyrix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) +{ + write_config_nybble(router, 0x5C, pirq-1, irq); + return 1; +} + #ifdef CONFIG_PCI_BIOS static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) @@ -283,12 +297,19 @@ static struct irq_router pirq_routers[] = { { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371FB_0, pirq_piix_get, pirq_piix_set }, { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, pirq_piix_get, pirq_piix_set }, { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, pirq_piix_get, pirq_piix_set }, + { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371MX, pirq_piix_get, pirq_piix_set }, { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_0, pirq_piix_get, pirq_piix_set }, + { "ALI", PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, pirq_ali_get, pirq_ali_set }, + { "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, pirq_via_get, pirq_via_set }, { "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, pirq_via_get, pirq_via_set }, { "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, pirq_via_get, pirq_via_set }, + { "OPTI", PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C700, pirq_opti_get, pirq_opti_set }, + + { "NatSemi", PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, pirq_cyrix_get, pirq_cyrix_set }, + { "default", 0, 0, NULL, NULL } }; @@ -298,7 +319,6 @@ static struct pci_dev *pirq_router_dev; static void __init pirq_find_router(void) { struct irq_routing_table *rt = pirq_table; - u16 rvendor, rdevice; struct irq_router *r; #ifdef CONFIG_PCI_BIOS @@ -308,32 +328,31 @@ static void __init pirq_find_router(void) return; } #endif - if (!(pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn))) { + /* fall back to default router if nothing else found */ + pirq_router = pirq_routers + sizeof(pirq_routers) / sizeof(pirq_routers[0]) - 1; + + pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn); + if (!pirq_router_dev) { DBG("PCI: Interrupt router not found at %02x:%02x\n", rt->rtr_bus, rt->rtr_devfn); - /* fall back to default router */ - pirq_router = pirq_routers + sizeof(pirq_routers) / sizeof(pirq_routers[0]) - 1; return; } - if (rt->rtr_vendor) { - rvendor = rt->rtr_vendor; - rdevice = rt->rtr_device; - } else { - /* - * Several BIOSes forget to set the router type. In such cases, we - * use chip vendor/device. This doesn't guarantee us semantics of - * PIRQ values, but was found to work in practice and it's still - * better than not trying. - */ - DBG("PCI: Guessed interrupt router ID from %s\n", pirq_router_dev->slot_name); - rvendor = pirq_router_dev->vendor; - rdevice = pirq_router_dev->device; - } - for(r=pirq_routers; r->vendor; r++) - if (r->vendor == rvendor && r->device == rdevice) + + for(r=pirq_routers; r->vendor; r++) { + /* Exact match against router table entry? Use it! */ + if (r->vendor == rt->rtr_vendor && r->device == rt->rtr_device) { + pirq_router = r; break; - pirq_router = r; - printk("PCI: Using IRQ router %s [%04x/%04x] at %s\n", r->name, - rvendor, rdevice, pirq_router_dev->slot_name); + } + /* Match against router device entry? Use it as a fallback */ + if (r->vendor == pirq_router_dev->vendor && r->device == pirq_router_dev->device) { + pirq_router = r; + } + } + printk("PCI: Using IRQ router %s [%04x/%04x] at %s\n", + pirq_router->name, + pirq_router_dev->vendor, + pirq_router_dev->device, + pirq_router_dev->slot_name); } static struct irq_info *pirq_get_info(struct pci_dev *dev, int pin) diff --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c index d70e9e569..f97d3b1ad 100644 --- a/arch/i386/kernel/semaphore.c +++ b/arch/i386/kernel/semaphore.c @@ -59,7 +59,7 @@ void __down(struct semaphore * sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -79,7 +79,7 @@ void __down(struct semaphore * sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -93,7 +93,7 @@ int __down_interruptible(struct semaphore * sem) int retval = 0; struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -129,7 +129,7 @@ int __down_interruptible(struct semaphore * sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -315,7 +315,7 @@ struct rw_semaphore *down_write_failed_biased(struct rw_semaphore *sem) for (;;) { if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!sem->write_bias_granted) schedule(); } @@ -371,7 +371,7 @@ struct rw_semaphore *down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 7ac7fdb36..692965a06 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -55,6 +55,9 @@ * Cyrix III, Pentium IV support. * Dave Jones <davej@suse.de>, October 2000 * + * Massive cleanup of CPU detection and bug handling; + * Transmeta CPU detection, + * H. Peter Anvin <hpa@zytor.com>, November 2000 */ /* @@ -107,7 +110,9 @@ unsigned long mmu_cr4_features; /* * Bus types .. */ +#ifdef CONFIG_EISA int EISA_bus; +#endif int MCA_bus; /* for MCA, but anyone else can use it if they want */ @@ -543,7 +548,7 @@ static inline void parse_mem_cmdline (char ** cmdline_p) to--; if (!memcmp(from+4, "nopentium", 9)) { from += 9+4; - boot_cpu_data.x86_capability &= ~X86_FEATURE_PSE; + clear_bit(X86_FEATURE_PSE, &boot_cpu_data.x86_capability); } else if (!memcmp(from+4, "exactmap", 8)) { from += 8+4; e820.nr_map = 0; @@ -846,70 +851,158 @@ void __init setup_arch(char **cmdline_p) #endif } +#ifndef CONFIG_X86_TSC +static int tsc_disable __initdata = 0; + +static int __init tsc_setup(char *str) +{ + tsc_disable = 1; + return 1; +} + +__setup("notsc", tsc_setup); +#endif + static int __init get_model_name(struct cpuinfo_x86 *c) { - unsigned int n, dummy, *v; + unsigned int *v; + char *p, *q; - cpuid(0x80000000, &n, &dummy, &dummy, &dummy); - if (n < 0x80000004) + if (cpuid_eax(0x80000000) < 0x80000004) return 0; - cpuid(0x80000001, &dummy, &dummy, &dummy, &(c->x86_capability)); + v = (unsigned int *) c->x86_model_id; cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]); cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]); cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]); c->x86_model_id[48] = 0; + + /* Intel chips right-justify this string for some dumb reason; + undo that brain damage */ + p = q = &c->x86_model_id[0]; + while ( *p == ' ' ) + p++; + if ( p != q ) { + while ( *p ) + *q++ = *p++; + while ( q <= &c->x86_model_id[48] ) + *q++ = '\0'; /* Zero-pad the rest */ + } + return 1; } static void __init display_cacheinfo(struct cpuinfo_x86 *c) { - unsigned int n, dummy, ecx, edx; + unsigned int n, dummy, ecx, edx, l2size; - cpuid(0x80000000, &n, &dummy, &dummy, &dummy); + n = cpuid_eax(0x80000000); if (n >= 0x80000005) { cpuid(0x80000005, &dummy, &dummy, &ecx, &edx); - printk("CPU: L1 I Cache: %dK L1 D Cache: %dK (%d bytes/line)\n", - edx>>24, ecx>>24, edx&0xFF); + printk("CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n", + edx>>24, edx&0xFF, ecx>>24, ecx&0xFF); c->x86_cache_size=(ecx>>24)+(edx>>24); } - if (n < 0x80000006) /* Cyrix just has large L1. */ + if (n < 0x80000006) /* Some chips just has a large L1. */ return; - cpuid(0x80000006, &dummy, &dummy, &ecx, &edx); - c->x86_cache_size = ecx >>16; + ecx = cpuid_ecx(0x80000006); + l2size = ecx >> 16; /* AMD errata T13 (order #21922) */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && - boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 3 && - boot_cpu_data.x86_mask == 0) - { - c->x86_cache_size = 64; + if (c->x86_vendor == X86_VENDOR_AMD && + c->x86 == 6 && + c->x86_model == 3 && + c->x86_mask == 0) { + l2size = 64; } - printk("CPU: L2 Cache: %dK\n", ecx>>16); + + if ( l2size == 0 ) + return; /* Again, no L2 cache is possible */ + + c->x86_cache_size = l2size; + + printk("CPU: L2 Cache: %dK (%d bytes/line)\n", + l2size, ecx & 0xFF); } +/* + * B step AMD K6 before B 9730xxxx have hardware bugs that can cause + * misexecution of code under Linux. Owners of such processors should + * contact AMD for precise details and a CPU swap. + * + * See http://www.mygale.com/~poulot/k6bug.html + * http://www.amd.com/K6/k6docs/revgd.html + * + * The following test is erm.. interesting. AMD neglected to up + * the chip setting when fixing the bug but they also tweaked some + * performance at the same time.. + */ + +extern void vide(void); +__asm__(".align 4\nvide: ret"); -static int __init amd_model(struct cpuinfo_x86 *c) +static int __init init_amd(struct cpuinfo_x86 *c) { u32 l, h; unsigned long flags; int mbytes = max_mapnr >> (20-PAGE_SHIFT); + int r; - int r=get_model_name(c); + /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; + 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ + clear_bit(0*32+31, &c->x86_capability); + + r = get_model_name(c); switch(c->x86) { case 5: if( c->x86_model < 6 ) { - /* Anyone with a K5 want to fill this in */ + /* Based on AMD doc 20734R - June 2000 */ + if ( c->x86_model == 0 ) { + clear_bit(X86_FEATURE_APIC, &c->x86_capability); + set_bit(X86_FEATURE_PGE, &c->x86_capability); + } break; } + if ( c->x86_model == 6 && c->x86_mask == 1 ) { + const int K6_BUG_LOOP = 1000000; + int n; + void (*f_vide)(void); + unsigned long d, d2; + + printk(KERN_INFO "AMD K6 stepping B detected - "); + + /* + * It looks like AMD fixed the 2.6.2 bug and improved indirect + * calls at the same time. + */ + + n = K6_BUG_LOOP; + f_vide = vide; + rdtscl(d); + while (n--) + f_vide(); + rdtscl(d2); + d = d2-d; + + /* Knock these two lines out if it debugs out ok */ + printk(KERN_INFO "K6 BUG %ld %d (Report these if test report is incorrect)\n", d, 20*K6_BUG_LOOP); + printk(KERN_INFO "AMD K6 stepping B detected - "); + /* -- cut here -- */ + if (d > 20*K6_BUG_LOOP) + printk("system stability may be impaired when more than 32 MB are used.\n"); + else + printk("probably OK (after B9730xxxx).\n"); + printk(KERN_INFO "Please see http://www.mygale.com/~poulot/k6bug.html\n"); + } + /* K6 with old style WHCR */ if( c->x86_model < 8 || (c->x86_model== 8 && c->x86_mask < 8)) @@ -954,11 +1047,11 @@ static int __init amd_model(struct cpuinfo_x86 *c) } /* Set MTRR capability flag if appropriate */ - if((boot_cpu_data.x86_model == 13) || - (boot_cpu_data.x86_model == 9) || - ((boot_cpu_data.x86_model == 8) && - (boot_cpu_data.x86_mask >= 8))) - c->x86_capability |= X86_FEATURE_MTRR; + if ( (c->x86_model == 13) || + (c->x86_model == 9) || + ((c->x86_model == 8) && + (c->x86_mask >= 8)) ) + set_bit(X86_FEATURE_K6_MTRR, &c->x86_capability); break; } @@ -971,7 +1064,6 @@ static int __init amd_model(struct cpuinfo_x86 *c) display_cacheinfo(c); return r; } - /* * Read Cyrix DEVID registers (DIR) to get more detailed info. about the CPU @@ -1032,14 +1124,56 @@ static char Cx86_cb[] __initdata = "?.5x Core/Bus Clock"; static char cyrix_model_mult1[] __initdata = "12??43"; static char cyrix_model_mult2[] __initdata = "12233445"; -static void __init cyrix_model(struct cpuinfo_x86 *c) +/* + * Reset the slow-loop (SLOP) bit on the 686(L) which is set by some old + * BIOSes for compatability with DOS games. This makes the udelay loop + * work correctly, and improves performance. + */ + +extern void calibrate_delay(void) __init; + +static void __init check_cx686_slop(struct cpuinfo_x86 *c) +{ + if (Cx86_dir0_msb == 3) { + unsigned char ccr3, ccr5; + + cli(); + ccr3 = getCx86(CX86_CCR3); + setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ + ccr5 = getCx86(CX86_CCR5); + if (ccr5 & 2) + setCx86(CX86_CCR5, ccr5 & 0xfd); /* reset SLOP */ + setCx86(CX86_CCR3, ccr3); /* disable MAPEN */ + sti(); + + if (ccr5 & 2) { /* possible wrong calibration done */ + printk(KERN_INFO "Recalibrating delay loop with SLOP bit reset\n"); + calibrate_delay(); + c->loops_per_sec = loops_per_sec; + } + } +} + +static void __init init_cyrix(struct cpuinfo_x86 *c) { unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0; char *buf = c->x86_model_id; const char *p = NULL; + /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; + 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ + clear_bit(0*32+31, &c->x86_capability); + + /* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */ + if ( test_bit(1*32+24, &c->x86_capability) ) { + clear_bit(1*32+24, &c->x86_capability); + set_bit(X86_FEATURE_CXMMX, &c->x86_capability); + } + do_cyrix_devid(&dir0, &dir1); + check_cx686_slop(c); + Cx86_dir0_msb = dir0_msn = dir0 >> 4; /* identifies CPU "family" */ dir0_lsn = dir0 & 0xf; /* model or clock multiplier */ @@ -1080,7 +1214,7 @@ static void __init cyrix_model(struct cpuinfo_x86 *c) } else /* 686 */ p = Cx86_cb+1; /* Emulate MTRRs using Cyrix's ARRs. */ - c->x86_capability |= X86_FEATURE_MTRR; + set_bit(X86_FEATURE_CYRIX_ARR, &c->x86_capability); /* 6x86's contain this bug */ c->coma_bug = 1; break; @@ -1112,14 +1246,14 @@ static void __init cyrix_model(struct cpuinfo_x86 *c) /* GXm supports extended cpuid levels 'ala' AMD */ if (c->cpuid_level == 2) { get_model_name(c); /* get CPU marketing name */ - c->x86_capability&=~X86_FEATURE_TSC; + clear_bit(X86_FEATURE_TSC, c->x86_capability); return; } else { /* MediaGX */ Cx86_cb[2] = (dir0_lsn & 1) ? '3' : '4'; p = Cx86_cb+2; c->x86_model = (dir1 & 0x20) ? 1 : 2; - c->x86_capability&=~X86_FEATURE_TSC; + clear_bit(X86_FEATURE_TSC, &c->x86_capability); } break; @@ -1132,7 +1266,7 @@ static void __init cyrix_model(struct cpuinfo_x86 *c) if (((dir1 & 0x0f) > 4) || ((dir1 & 0xf0) == 0x20)) (c->x86_model)++; /* Emulate MTRRs using Cyrix's ARRs. */ - c->x86_capability |= X86_FEATURE_MTRR; + set_bit(X86_FEATURE_CYRIX_ARR, &c->x86_capability); break; case 0xf: /* Cyrix 486 without DEVID registers */ @@ -1158,7 +1292,7 @@ static void __init cyrix_model(struct cpuinfo_x86 *c) return; } -static void __init centaur_model(struct cpuinfo_x86 *c) +static void __init init_centaur(struct cpuinfo_x86 *c) { enum { ECX8=1<<1, @@ -1187,6 +1321,10 @@ static void __init centaur_model(struct cpuinfo_x86 *c) u32 lo,hi,newlo; u32 aa,bb,cc,dd; + /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; + 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ + clear_bit(0*32+31, &c->x86_capability); + switch (c->x86) { case 5: @@ -1196,7 +1334,7 @@ static void __init centaur_model(struct cpuinfo_x86 *c) fcr_set=ECX8|DSMC|EDCTLB|EMMX|ERETSTK; fcr_clr=DPDC; printk("Disabling bugged TSC.\n"); - c->x86_capability &= ~X86_FEATURE_TSC; + clear_bit(X86_FEATURE_TSC, &c->x86_capability); break; case 8: switch(c->x86_mask) { @@ -1238,15 +1376,15 @@ static void __init centaur_model(struct cpuinfo_x86 *c) printk("Centaur FCR is 0x%X\n",lo); } /* Emulate MTRRs using Centaur's MCR. */ - c->x86_capability |= X86_FEATURE_MTRR; + set_bit(X86_FEATURE_CENTAUR_MCR, &c->x86_capability); /* Report CX8 */ - c->x86_capability |= X86_FEATURE_CX8; + set_bit(X86_FEATURE_CX8, &c->x86_capability); /* Set 3DNow! on Winchip 2 and above. */ if (c->x86_model >=8) - c->x86_capability |= X86_FEATURE_AMD3D; + set_bit(X86_FEATURE_3DNOW, &c->x86_capability); /* See if we can find out some more. */ - cpuid(0x80000000,&aa,&bb,&cc,&dd); - if (aa>=0x80000005) { /* Yes, we can. */ + if ( cpuid_eax(0x80000000) >= 0x80000005 ) { + /* Yes, we can. */ cpuid(0x80000005,&aa,&bb,&cc,&dd); /* Add L1 data and code cache sizes. */ c->x86_cache_size = (cc>>24)+(dd>>24); @@ -1261,10 +1399,10 @@ static void __init centaur_model(struct cpuinfo_x86 *c) lo |= (1<<1 | 1<<7); /* Report CX8 & enable PGE */ wrmsr (0x1107, lo, hi); - c->x86_capability |= X86_FEATURE_CX8; + set_bit(X86_FEATURE_CX8, &c->x86_capability); rdmsr (0x80000001, lo, hi); if (hi & (1<<31)) - c->x86_capability |= X86_FEATURE_AMD3D; + set_bit(X86_FEATURE_3DNOW, &c->x86_capability); get_model_name(c); display_cacheinfo(c); @@ -1276,7 +1414,7 @@ static void __init centaur_model(struct cpuinfo_x86 *c) } -static void __init transmeta_model(struct cpuinfo_x86 *c) +static void __init init_transmeta(struct cpuinfo_x86 *c) { unsigned int cap_mask, uk, max, dummy; unsigned int cms_rev1, cms_rev2; @@ -1287,17 +1425,15 @@ static void __init transmeta_model(struct cpuinfo_x86 *c) display_cacheinfo(c); /* Print CMS and CPU revision */ - cpuid(0x80860000, &max, &dummy, &dummy, &dummy); + max = cpuid_eax(0x80860000); if ( max >= 0x80860001 ) { cpuid(0x80860001, &dummy, &cpu_rev, &cpu_freq, &cpu_flags); - printk("CPU: Processor revision %u.%u.%u.%u, %u MHz%s%s\n", + printk("CPU: Processor revision %u.%u.%u.%u, %u MHz\n", (cpu_rev >> 24) & 0xff, (cpu_rev >> 16) & 0xff, (cpu_rev >> 8) & 0xff, cpu_rev & 0xff, - cpu_freq, - (cpu_flags & 1) ? " [recovery]" : "", - (cpu_flags & 2) ? " [longrun]" : ""); + cpu_freq); } if ( max >= 0x80860002 ) { cpuid(0x80860002, &dummy, &cms_rev1, &cms_rev2, &dummy); @@ -1333,13 +1469,154 @@ static void __init transmeta_model(struct cpuinfo_x86 *c) printk("CPU: %s\n", cpu_info); } - /* Unhide possibly hidden flags */ + /* Unhide possibly hidden capability flags */ rdmsr(0x80860004, cap_mask, uk); wrmsr(0x80860004, ~0, uk); - cpuid(0x00000001, &dummy, &dummy, &dummy, &c->x86_capability); + c->x86_capability[0] = cpuid_edx(0x00000001); wrmsr(0x80860004, cap_mask, uk); } +extern void trap_init_f00f_bug(void); + +static void __init init_intel(struct cpuinfo_x86 *c) +{ +#ifndef CONFIG_M686 + static int f00f_workaround_enabled = 0; +#endif + extern void mcheck_init(struct cpuinfo_x86 *c); + char *p = NULL; + unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */ + +#ifndef CONFIG_M686 + /* + * All current models of Pentium and Pentium with MMX technology CPUs + * have the F0 0F bug, which lets nonpriviledged users lock up the system. + * Note that the workaround only should be initialized once... + */ + c->f00f_bug = 0; + if ( c->x86 == 5 ) { + c->f00f_bug = 1; + if ( !f00f_workaround_enabled ) { + trap_init_f00f_bug(); + printk(KERN_INFO "Intel Pentium with F0 0F bug - workaround enabled.\n"); + f00f_workaround_enabled = 1; + } + } +#endif + + + if (c->cpuid_level > 1) { + /* supports eax=2 call */ + int i, j, n; + int regs[4]; + unsigned char *dp = (unsigned char *)regs; + + /* Number of times to iterate */ + n = cpuid_eax(2) & 0xFF; + + for ( i = 0 ; i < n ; i++ ) { + cpuid(2, ®s[0], ®s[1], ®s[2], ®s[3]); + + /* If bit 31 is set, this is an unknown format */ + for ( j = 0 ; j < 3 ; j++ ) { + if ( regs[j] < 0 ) regs[j] = 0; + } + + /* Byte 0 is level count, not a descriptor */ + for ( j = 1 ; j < 16 ; j++ ) { + unsigned char des = dp[j]; + unsigned char dl, dh; + unsigned int cs; + + dh = des >> 4; + dl = des & 0x0F; + + switch ( dh ) + { + case 2: + if ( dl ) { + /* L3 cache */ + cs = (dl-1) << 9; + l3 += cs; + } + break; + case 4: + case 8: + if ( dl ) { + /* L2 cache */ + cs = 128 << (dl-1); + l2 += cs; + } + break; + case 6: + if (dl > 5) { + /* L1 D cache */ + cs = 8<<(dl-6); + l1d += cs; + } + break; + case 7: + /* L1 I cache */ + cs = dl ? (16 << (dl-1)) : 12; + l1i += cs; + break; + default: + /* TLB, or something else we don't know about */ + break; + } + } + } + if ( l1i || l1d ) + printk("CPU: L1 I cache: %dK, L1 D cache: %dK\n", + l1i, l1d); + if ( l2 ) + printk("CPU: L2 cache: %dK\n", l2); + if ( l3 ) + printk("CPU: L3 cache: %dK\n", l3); + + /* + * This assumes the L3 cache is shared; it typically lives in + * the northbridge. The L1 caches are included by the L2 + * cache, and so should not be included for the purpose of + * SMP switching weights. + */ + c->x86_cache_size = l2 ? l2 : (l1i+l1d); + } + + /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it */ + if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 ) + clear_bit(X86_FEATURE_SEP, &c->x86_capability); + + /* Names for the Pentium II/Celeron processors + detectable only by also checking the cache size. + Dixon is NOT a Celeron. */ + if (c->x86 == 6) { + switch (c->x86_model) { + case 5: + if (l2 == 0) + p = "Celeron (Covington)"; + if (l2 == 256) + p = "Mobile Pentium II (Dixon)"; + break; + + case 6: + if (l2 == 128) + p = "Celeron (Mendocino)"; + break; + + case 8: + if (l2 == 128) + p = "Celeron (Coppermine)"; + break; + } + } + + if ( p ) + strcpy(c->x86_model_id, p); + + /* Enable MCA if available */ + mcheck_init(c); +} void __init get_cpu_vendor(struct cpuinfo_x86 *c) { @@ -1359,7 +1636,8 @@ void __init get_cpu_vendor(struct cpuinfo_x86 *c) c->x86_vendor = X86_VENDOR_NEXGEN; else if (!strcmp(v, "RiseRiseRise")) c->x86_vendor = X86_VENDOR_RISE; - else if (!strcmp(v, "GenuineTMx86")) + else if (!strcmp(v, "GenuineTMx86") || + !strcmp(v, "TransmetaCPU")) c->x86_vendor = X86_VENDOR_TRANSMETA; else c->x86_vendor = X86_VENDOR_UNKNOWN; @@ -1367,11 +1645,13 @@ void __init get_cpu_vendor(struct cpuinfo_x86 *c) struct cpu_model_info { int vendor; - int x86; + int family; char *model_names[16]; }; /* Naming convention should be: <Name> [(<Codename>)] */ +/* This table only is used unless init_<vendor>() below doesn't set it; */ +/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */ static struct cpu_model_info cpu_models[] __initdata = { { X86_VENDOR_INTEL, 4, { "486 DX-25/33", "486 DX-50", "486 SX", "486 DX/2", "486 SL", @@ -1391,12 +1671,12 @@ static struct cpu_model_info cpu_models[] __initdata = { { NULL, NULL, NULL, "486 DX/2", NULL, NULL, NULL, "486 DX/2-WB", "486 DX/4", "486 DX/4-WB", NULL, NULL, NULL, NULL, "Am5x86-WT", "Am5x86-WB" }}, - { X86_VENDOR_AMD, 5, + { X86_VENDOR_AMD, 5, /* Is this this really necessary?? */ { "K5/SSA5", "K5", "K5", "K5", NULL, NULL, "K6", "K6", "K6-2", "K6-3", NULL, NULL, NULL, NULL, NULL, NULL }}, - { X86_VENDOR_AMD, 6, + { X86_VENDOR_AMD, 6, /* Is this this really necessary?? */ { "Athlon", "Athlon", "Athlon", NULL, "Athlon", NULL, NULL, NULL, NULL, @@ -1410,11 +1690,27 @@ static struct cpu_model_info cpu_models[] __initdata = { { X86_VENDOR_RISE, 5, { "mP6", "mP6", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }}, - { X86_VENDOR_TRANSMETA, 5, - { NULL, NULL, NULL, "Crusoe", NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }}, }; +/* Look up CPU names by table lookup. */ +static char __init *table_lookup_model(struct cpuinfo_x86 *c) +{ + struct cpu_model_info *info = cpu_models; + int i; + + if ( c->x86_model >= 16 ) + return NULL; /* Range check */ + + for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) { + if ( info->vendor == c->x86_vendor && + info->family == c->x86 ) { + return info->model_names[c->x86_model]; + } + info++; + } + return NULL; /* Not found */ +} + /* * Detect a NexGen CPU running without BIOS hypercode new enough * to have CPUID. (Thanks to Herbert Oppmann) @@ -1439,13 +1735,15 @@ static int __init deep_magic_nexgen_probe(void) static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c) { - if(c->x86_capability&(X86_FEATURE_PN) && disable_x86_serial_nr) { + if( test_bit(X86_FEATURE_PN, &c->x86_capability) && + disable_x86_serial_nr ) { /* Disable processor serial number */ unsigned long lo,hi; rdmsr(0x119,lo,hi); lo |= 0x200000; wrmsr(0x119,lo,hi); printk(KERN_INFO "CPU serial number disabled.\n"); + clear_bit(X86_FEATURE_PN, &c->x86_capability); } } @@ -1458,157 +1756,255 @@ int __init x86_serial_nr_setup(char *s) __setup("serialnumber", x86_serial_nr_setup); -void __init identify_cpu(struct cpuinfo_x86 *c) +/* Standard macro to see if a specific flag is changeable */ +static inline int flag_is_changeable_p(u32 flag) { - int i=0; - char *p = NULL; - extern void mcheck_init(void); - - c->loops_per_sec = loops_per_sec; - c->x86_cache_size = -1; + u32 f1, f2; + + asm("pushfl\n\t" + "pushfl\n\t" + "popl %0\n\t" + "movl %0,%1\n\t" + "xorl %2,%0\n\t" + "pushl %0\n\t" + "popfl\n\t" + "pushfl\n\t" + "popl %0\n\t" + "popfl\n\t" + : "=&r" (f1), "=&r" (f2) + : "ir" (flag)); + + return ((f1^f2) & flag) != 0; +} - get_cpu_vendor(c); +/* Probe for the CPUID instruction */ +static int __init have_cpuid_p(void) +{ + return flag_is_changeable_p(X86_EFLAGS_ID); +} - switch (c->x86_vendor) { +/* + * Cyrix CPUs without cpuid or with cpuid not yet enabled can be detected + * by the fact that they preserve the flags across the division of 5/2. + * PII and PPro exhibit this behavior too, but they have cpuid available. + */ + +/* + * Perform the Cyrix 5/2 test. A Cyrix won't change + * the flags, while other 486 chips will. + */ +static inline int test_cyrix_52div(void) +{ + unsigned int test; + + __asm__ __volatile__( + "sahf\n\t" /* clear flags (%eax = 0x0005) */ + "div %b2\n\t" /* divide 5 by 2 */ + "lahf" /* store flags into %ah */ + : "=a" (test) + : "0" (5), "q" (2) + : "cc"); + + /* AH is 0x02 on Cyrix after the divide.. */ + return (unsigned char) (test >> 8) == 0x02; +} - case X86_VENDOR_UNKNOWN: - if (c->cpuid_level < 0) - { - /* It may be a nexgen with cpuid disabled.. */ - if(deep_magic_nexgen_probe()) - { - strcpy(c->x86_model_id, "Nx586"); - c->x86_vendor = X86_VENDOR_NEXGEN; - } - return; - } - break; +/* Try to detect a CPU with disabled CPUID, and if so, enable. This routine + may also be used to detect non-CPUID processors and fill in some of + the information manually. */ +static int __init id_and_try_enable_cpuid(struct cpuinfo_x86 *c) +{ + /* First of all, decide if this is a 486 or higher */ + /* It's a 486 if we can modify the AC flag */ + if ( flag_is_changeable_p(X86_EFLAGS_AC) ) + c->x86 = 4; + else + c->x86 = 3; - case X86_VENDOR_CYRIX: - cyrix_model(c); - return; + /* Detect Cyrix with disabled CPUID */ + if ( c->x86 == 4 && test_cyrix_52div() ) { + strcpy(c->x86_vendor_id, "CyrixInstead"); + } - case X86_VENDOR_AMD: - if (amd_model(c)) - return; - break; + /* Detect NexGen with old hypercode */ + if ( deep_magic_nexgen_probe() ) { + strcpy(c->x86_vendor_id, "NexGenDriven"); + } - case X86_VENDOR_CENTAUR: - centaur_model(c); - return; + return have_cpuid_p(); /* Check to see if CPUID now enabled? */ +} - case X86_VENDOR_INTEL: +/* + * This does the hard work of actually picking apart the CPU stuff... + */ +void __init identify_cpu(struct cpuinfo_x86 *c) +{ + int junk, i; + u32 xlvl, tfms; - squash_the_stupid_serial_number(c); - mcheck_init(); + c->loops_per_sec = loops_per_sec; + c->x86_cache_size = -1; + c->x86_vendor = X86_VENDOR_UNKNOWN; + c->cpuid_level = -1; /* CPUID not detected */ + c->x86_model = c->x86_mask = 0; /* So far unknown... */ + c->x86_vendor_id[0] = '\0'; /* Unset */ + c->x86_model_id[0] = '\0'; /* Unset */ + memset(&c->x86_capability, 0, sizeof c->x86_capability); + + if ( !have_cpuid_p() && !id_and_try_enable_cpuid(c) ) { + /* CPU doesn't have CPUID */ + + /* If there are any capabilities, they're vendor-specific */ + /* enable_cpuid() would have set c->x86 for us. */ + } else { + /* CPU does have CPUID */ + + /* Get vendor name */ + cpuid(0x00000000, &c->cpuid_level, + (int *)&c->x86_vendor_id[0], + (int *)&c->x86_vendor_id[8], + (int *)&c->x86_vendor_id[4]); + + get_cpu_vendor(c); + + /* Initialize the standard set of capabilities */ + /* Note that the vendor-specific code below might override */ + + /* Intel-defined flags: level 0x00000001 */ + if ( c->cpuid_level >= 0x00000001 ) { + cpuid(0x00000001, &tfms, &junk, &junk, + &c->x86_capability[0]); + c->x86 = (tfms >> 8) & 15; + c->x86_model = (tfms >> 4) & 15; + c->x86_mask = tfms & 15; + } else { + /* Have CPUID level 0 only - unheard of */ + c->x86 = 4; + } - if (c->cpuid_level > 1) { - /* supports eax=2 call */ - int edx, dummy; + /* AMD-defined flags: level 0x80000001 */ + xlvl = cpuid_eax(0x80000000); + if ( (xlvl & 0xffff0000) == 0x80000000 ) { + if ( xlvl >= 0x80000001 ) + c->x86_capability[1] = cpuid_edx(0x80000001); + if ( xlvl >= 0x80000004 ) + get_model_name(c); /* Default name */ + } - cpuid(2, &dummy, &dummy, &dummy, &edx); + /* Transmeta-defined flags: level 0x80860001 */ + xlvl = cpuid_eax(0x80860000); + if ( (xlvl & 0xffff0000) == 0x80860000 ) { + if ( xlvl >= 0x80860001 ) + c->x86_capability[2] = cpuid_edx(0x80860001); + } + } - /* We need only the LSB */ - edx &= 0xff; + printk("CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n", + c->x86_capability[0], + c->x86_capability[1], + c->x86_capability[2], + c->x86_vendor); - switch (edx) { - case 0x40: - c->x86_cache_size = 0; - break; + /* + * Vendor-specific initialization. In this section we + * canonicalize the feature flags, meaning if there are + * features a certain CPU supports which CPUID doesn't + * tell us, CPUID claiming incorrect flags, or other bugs, + * we handle them here. + * + * At the end of this section, c->x86_capability better + * indicate the features this CPU genuinely supports! + */ + switch ( c->x86_vendor ) { + case X86_VENDOR_UNKNOWN: + default: + /* Not much we can do here... */ + break; - case 0x41: /* 4-way 128 */ - c->x86_cache_size = 128; - break; + case X86_VENDOR_CYRIX: + init_cyrix(c); + break; - case 0x42: /* 4-way 256 */ - case 0x82: /* 8-way 256 */ - c->x86_cache_size = 256; - break; + case X86_VENDOR_AMD: + init_amd(c); + break; - case 0x43: /* 4-way 512 */ - c->x86_cache_size = 512; - break; + case X86_VENDOR_CENTAUR: + init_centaur(c); + break; - case 0x44: /* 4-way 1024 */ - case 0x84: /* 8-way 1024 */ - c->x86_cache_size = 1024; - break; + case X86_VENDOR_INTEL: + init_intel(c); + break; - case 0x45: /* 4-way 2048 */ - case 0x85: /* 8-way 2048 */ - c->x86_cache_size = 2048; - break; + case X86_VENDOR_NEXGEN: + c->x86_cache_size = 256; /* A few had 1 MB... */ + break; - default: - c->x86_cache_size = 0; - break; - } - } + case X86_VENDOR_TRANSMETA: + init_transmeta(c); + break; + } + + printk("CPU: After vendor init, caps: %08x %08x %08x %08x\n", + c->x86_capability[0], + c->x86_capability[1], + c->x86_capability[2], + c->x86_capability[3]); - /* Pentium IV. */ - if (c->x86 == 15) { - get_model_name(c); - return; - } + /* + * The vendor-specific functions might have changed features. Now + * we do "generic changes." + */ - /* Names for the Pentium II/Celeron processors - detectable only by also checking the cache size. - Dixon is NOT a Celeron. */ - if (c->x86 == 6) { - switch (c->x86_model) { - case 5: - if (c->x86_cache_size == 0) - p = "Celeron (Covington)"; - if (c->x86_cache_size == 256) - p = "Mobile Pentium II (Dixon)"; - break; - - case 6: - if (c->x86_cache_size == 128) - p = "Celeron (Mendocino)"; - break; - - case 8: - if (c->x86_cache_size == 128) - p = "Celeron (Coppermine)"; - break; - } - } - if (p!=NULL) - goto name_decoded; + /* TSC disabled? */ +#ifdef CONFIG_TSC + if ( tsc_disable ) + clear_bit(X86_FEATURE_TSC, &c->x86_capability); +#endif - break; + /* Disable the PN if appropriate */ + squash_the_stupid_serial_number(c); - case X86_VENDOR_TRANSMETA: - transmeta_model(c); - squash_the_stupid_serial_number(c); - return; + /* If the model name is still unset, do table lookup. */ + if ( !c->x86_model_id[0] ) { + char *p; + p = table_lookup_model(c); + if ( p ) + strcpy(c->x86_model_id, p); + else + /* Last resort... */ + sprintf(c->x86_model_id, "%02x/%02x", + c->x86_vendor, c->x86_model); } - /* may be changed in the switch so needs to be after */ - - if(c->x86_vendor == X86_VENDOR_NEXGEN) - c->x86_cache_size = 256; /* A few had 1Mb.. */ - - for (i = 0; i < sizeof(cpu_models)/sizeof(struct cpu_model_info); i++) { - if (cpu_models[i].vendor == c->x86_vendor && - cpu_models[i].x86 == c->x86) { - if (c->x86_model <= 16) - p = cpu_models[i].model_names[c->x86_model]; - } - } + /* Now the feature flags better reflect actual CPU features! */ -name_decoded: + printk("CPU: After generic, caps: %08x %08x %08x %08x\n", + c->x86_capability[0], + c->x86_capability[1], + c->x86_capability[2], + c->x86_capability[3]); - if (p) { - strcpy(c->x86_model_id, p); - return; + /* + * On SMP, boot_cpu_data holds the common feature set between + * all CPUs; so make sure that we indicate which features are + * common between the CPUs. The first time this routine gets + * executed, c == &boot_cpu_data. + */ + if ( c != &boot_cpu_data ) { + /* AND the already accumulated flags with these */ + for ( i = 0 ; i < NCAPINTS ; i++ ) + boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; } - sprintf(c->x86_model_id, "%02x/%02x", c->x86_vendor, c->x86_model); + printk("CPU: Common caps: %08x %08x %08x %08x\n", + boot_cpu_data.x86_capability[0], + boot_cpu_data.x86_capability[1], + boot_cpu_data.x86_capability[2], + boot_cpu_data.x86_capability[3]); } - /* * Perform early boot up checks for a valid TSC. See arch/i386/kernel/time.c */ @@ -1617,14 +2013,12 @@ void __init dodgy_tsc(void) { get_cpu_vendor(&boot_cpu_data); - if(boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX) - return; - - cyrix_model(&boot_cpu_data); + if ( boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX ) + init_cyrix(&boot_cpu_data); } - +/* These need to match <asm/processor.h> */ static char *cpu_vendor_names[] __initdata = { "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" }; @@ -1646,7 +2040,7 @@ void __init print_cpu_info(struct cpuinfo_x86 *c) else printk("%s", c->x86_model_id); - if (c->x86_mask || c->cpuid_level>=0) + if (c->x86_mask || c->cpuid_level >= 0) printk(" stepping %02x\n", c->x86_mask); else printk("\n"); @@ -1659,23 +2053,39 @@ void __init print_cpu_info(struct cpuinfo_x86 *c) int get_cpuinfo(char * buffer) { char *p = buffer; - int sep_bug; /* - * Flags should be entered into the array ONLY if there is no overlap. - * Else a number should be used and then overridden in the case - * statement below. --Jauder <jauderho@carumba.com> - * - * NOTE: bits 10, 19-22, 26-31 are reserved. - * - * Data courtesy of http://www.sandpile.org/arch/cpuid.htm - * Thanks to the Greasel! + * These flag bits must match the definitions in <asm/cpufeature.h>. + * NULL means this bit is undefined or reserved; either way it doesn't + * have meaning as far as Linux is concerned. Note that it's important + * to realize there is a difference between this table and CPUID -- if + * applications want to get the raw CPUID data, they should access + * /dev/cpu/<cpu_nr>/cpuid instead. */ static char *x86_cap_flags[] = { + /* Intel-defined */ "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", - "cx8", "apic", "10", "sep", "mtrr", "pge", "mca", "cmov", - "16", "pse36", "psn", "19", "20", "21", "22", "mmx", - "24", "xmm", "26", "27", "28", "29", "30", "31" + "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov", + "pat", "pse36", "pn", "clflsh", NULL, "dtes", "acpi", "mmx", + "fxsr", "sse", "sse2", "selfsnoop", NULL, "acc", "ia64", NULL, + + /* AMD-defined */ + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, "mmxext", NULL, + NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow", + + /* Transmeta-defined */ + "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* Other (Linux-defined) */ + "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; struct cpuinfo_x86 *c = cpu_data; int i, n; @@ -1702,7 +2112,7 @@ int get_cpuinfo(char * buffer) else p += sprintf(p, "stepping\t: unknown\n"); - if (c->x86_capability & X86_FEATURE_TSC) { + if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) { p += sprintf(p, "cpu MHz\t\t: %lu.%06lu\n", cpu_khz / 1000, (cpu_khz % 1000)); } @@ -1711,65 +2121,19 @@ int get_cpuinfo(char * buffer) if (c->x86_cache_size >= 0) p += sprintf(p, "cache size\t: %d KB\n", c->x86_cache_size); - /* Modify the capabilities according to chip type */ - switch (c->x86_vendor) { - - case X86_VENDOR_CYRIX: - x86_cap_flags[24] = "cxmmx"; - break; - - case X86_VENDOR_AMD: - if (c->x86 == 5 && c->x86_model == 6) - x86_cap_flags[10] = "sep"; - if (c->x86 < 6) - x86_cap_flags[16] = "fcmov"; - else - x86_cap_flags[16] = "pat"; - x86_cap_flags[22] = "mmxext"; - x86_cap_flags[24] = "fxsr"; - x86_cap_flags[30] = "3dnowext"; - x86_cap_flags[31] = "3dnow"; - break; - - case X86_VENDOR_INTEL: - x86_cap_flags[16] = "pat"; - x86_cap_flags[18] = "pn"; - x86_cap_flags[24] = "fxsr"; - x86_cap_flags[25] = "xmm"; - break; - - case X86_VENDOR_CENTAUR: - if (c->x86_model >=8) /* Only Winchip2 and above */ - x86_cap_flags[31] = "3dnow"; - break; - - default: - /* Unknown CPU manufacturer or no special handling needed */ - break; - } - - sep_bug = c->x86_vendor == X86_VENDOR_INTEL && - c->x86 == 0x06 && - c->cpuid_level >= 0 && - (c->x86_capability & X86_FEATURE_SEP) && - c->x86_model < 3 && - c->x86_mask < 3; - /* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */ - fpu_exception = c->hard_math && (ignore_irq13 | (c->x86_capability & X86_FEATURE_FPU)); + fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu); p += sprintf(p, "fdiv_bug\t: %s\n" "hlt_bug\t\t: %s\n" - "sep_bug\t\t: %s\n" "f00f_bug\t: %s\n" "coma_bug\t: %s\n" "fpu\t\t: %s\n" "fpu_exception\t: %s\n" "cpuid level\t: %d\n" "wp\t\t: %s\n" - "flags\t\t:", + "features\t:", c->fdiv_bug ? "yes" : "no", c->hlt_works_ok ? "no" : "yes", - sep_bug ? "yes" : "no", c->f00f_bug ? "yes" : "no", c->coma_bug ? "yes" : "no", c->hard_math ? "yes" : "no", @@ -1777,8 +2141,9 @@ int get_cpuinfo(char * buffer) c->cpuid_level, c->wp_works_ok ? "yes" : "no"); - for ( i = 0 ; i < 32 ; i++ ) - if ( c->x86_capability & (1 << i) ) + for ( i = 0 ; i < 32*NCAPINTS ; i++ ) + if ( test_bit(i, &c->x86_capability) && + x86_cap_flags[i] != NULL ) p += sprintf(p, " %s", x86_cap_flags[i]); p += sprintf(p, "\nbogomips\t: %lu.%02lu\n\n", @@ -1788,18 +2153,6 @@ int get_cpuinfo(char * buffer) return p - buffer; } -#ifndef CONFIG_X86_TSC -static int tsc_disable __initdata = 0; - -static int __init tsc_setup(char *str) -{ - tsc_disable = 1; - return 1; -} - -__setup("notsc", tsc_setup); -#endif - static unsigned long cpu_initialized __initdata = 0; /* @@ -1824,7 +2177,8 @@ void __init cpu_init (void) #ifndef CONFIG_X86_TSC if (tsc_disable && cpu_has_tsc) { printk("Disabling TSC...\n"); - boot_cpu_data.x86_capability &= ~X86_FEATURE_TSC; + /**** FIX-HPA: DOES THIS REALLY BELONG HERE? ****/ + clear_bit(X86_FEATURE_TSC, boot_cpu_data.x86_capability); set_in_cr4(X86_CR4_TSD); } #endif @@ -1869,3 +2223,11 @@ void __init cpu_init (void) current->used_math = 0; stts(); } + +/* + * Local Variables: + * mode:c + * c-file-style:"k&r" + * c-basic-offset:8 + * End: + */ diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 6092aec3b..57a07765e 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -455,7 +455,7 @@ int __init start_secondary(void *unused) cpu_init(); smp_callin(); while (!atomic_read(&smp_commenced)) - /* nothing */ ; + rep_nop(); /* * low-memory mappings have been cleared, flush them from * the local TLBs too. diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index ae87ded92..b84421374 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -63,6 +63,7 @@ struct desc_struct default_ldt[] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, struct desc_struct idt_table[256] __attribute__((__section__(".data.idt"))) = { {0, 0}, }; extern int console_loglevel; +extern void bust_spinlocks(void); static inline void console_silent(void) { @@ -92,7 +93,6 @@ asmlinkage void general_protection(void); asmlinkage void page_fault(void); asmlinkage void coprocessor_error(void); asmlinkage void simd_coprocessor_error(void); -asmlinkage void reserved(void); asmlinkage void alignment_check(void); asmlinkage void spurious_interrupt_bug(void); asmlinkage void machine_check(void); @@ -312,7 +312,6 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) DO_ERROR(12, SIGBUS, "stack segment", stack_segment) DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, get_cr2()) -DO_ERROR(18, SIGSEGV, "reserved", reserved) asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) { @@ -396,7 +395,6 @@ static int __init setup_nmi_watchdog(char *str) __setup("nmi_watchdog=", setup_nmi_watchdog); -extern spinlock_t console_lock; static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED; inline void nmi_watchdog_tick(struct pt_regs * regs) @@ -439,8 +437,7 @@ inline void nmi_watchdog_tick(struct pt_regs * regs) * We are in trouble anyway, lets at least try * to get a message out. */ - spin_trylock(&console_lock); - spin_unlock(&console_lock); + bust_spinlocks(); printk("NMI Watchdog detected LOCKUP on CPU%d, registers:\n", cpu); show_registers(regs); printk("console shuts up ...\n"); @@ -954,8 +951,10 @@ cobalt_init(void) #endif void __init trap_init(void) { +#ifdef CONFIG_EISA if (isa_readl(0x0FFFD9) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) EISA_bus = 1; +#endif set_trap_gate(0,÷_error); set_trap_gate(1,&debug); diff --git a/arch/i386/lib/mmx.c b/arch/i386/lib/mmx.c index 0314041f9..4aca07e72 100644 --- a/arch/i386/lib/mmx.c +++ b/arch/i386/lib/mmx.c @@ -16,6 +16,9 @@ * Add *user handling. Checksums are not a win with MMX on any CPU * tested so far for any MMX solution figured. * + * 22/09/2000 - Arjan van de Ven + * Improved for non-egineering-sample Athlons + * */ void *_mmx_memcpy(void *to, const void *from, size_t len) @@ -104,28 +107,26 @@ static void fast_clear_page(void *page) " pxor %%mm0, %%mm0\n" : : ); - for(i=0;i<4096/128;i++) + for(i=0;i<4096/64;i++) { __asm__ __volatile__ ( - " movq %%mm0, (%0)\n" - " movq %%mm0, 8(%0)\n" - " movq %%mm0, 16(%0)\n" - " movq %%mm0, 24(%0)\n" - " movq %%mm0, 32(%0)\n" - " movq %%mm0, 40(%0)\n" - " movq %%mm0, 48(%0)\n" - " movq %%mm0, 56(%0)\n" - " movq %%mm0, 64(%0)\n" - " movq %%mm0, 72(%0)\n" - " movq %%mm0, 80(%0)\n" - " movq %%mm0, 88(%0)\n" - " movq %%mm0, 96(%0)\n" - " movq %%mm0, 104(%0)\n" - " movq %%mm0, 112(%0)\n" - " movq %%mm0, 120(%0)\n" + " movntq %%mm0, (%0)\n" + " movntq %%mm0, 8(%0)\n" + " movntq %%mm0, 16(%0)\n" + " movntq %%mm0, 24(%0)\n" + " movntq %%mm0, 32(%0)\n" + " movntq %%mm0, 40(%0)\n" + " movntq %%mm0, 48(%0)\n" + " movntq %%mm0, 56(%0)\n" : : "r" (page) : "memory"); - page+=128; + page+=64; } + /* since movntq is weakly-ordered, a "sfence" is needed to become + * ordered again. + */ + __asm__ __volatile__ ( + " sfence \n" : : + ); stts(); } @@ -140,6 +141,9 @@ static void fast_copy_page(void *to, void *from) current->flags &= ~PF_USEDFPU; } + /* maybe the prefetch stuff can go before the expensive fnsave... + * but that is for later. -AV + */ __asm__ __volatile__ ( "1: prefetch (%0)\n" " prefetch 64(%0)\n" @@ -162,21 +166,21 @@ static void fast_copy_page(void *to, void *from) __asm__ __volatile__ ( "1: prefetch 320(%0)\n" "2: movq (%0), %%mm0\n" + " movntq %%mm0, (%1)\n" " movq 8(%0), %%mm1\n" + " movntq %%mm1, 8(%1)\n" " movq 16(%0), %%mm2\n" + " movntq %%mm2, 16(%1)\n" " movq 24(%0), %%mm3\n" - " movq %%mm0, (%1)\n" - " movq %%mm1, 8(%1)\n" - " movq %%mm2, 16(%1)\n" - " movq %%mm3, 24(%1)\n" - " movq 32(%0), %%mm0\n" - " movq 40(%0), %%mm1\n" - " movq 48(%0), %%mm2\n" - " movq 56(%0), %%mm3\n" - " movq %%mm0, 32(%1)\n" - " movq %%mm1, 40(%1)\n" - " movq %%mm2, 48(%1)\n" - " movq %%mm3, 56(%1)\n" + " movntq %%mm3, 24(%1)\n" + " movq 32(%0), %%mm4\n" + " movntq %%mm4, 32(%1)\n" + " movq 40(%0), %%mm5\n" + " movntq %%mm5, 40(%1)\n" + " movq 48(%0), %%mm6\n" + " movntq %%mm6, 48(%1)\n" + " movq 56(%0), %%mm7\n" + " movntq %%mm7, 56(%1)\n" ".section .fixup, \"ax\"\n" "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ " jmp 2b\n" @@ -189,6 +193,12 @@ static void fast_copy_page(void *to, void *from) from+=64; to+=64; } + /* since movntq is weakly-ordered, a "sfence" is needed to become + * ordered again. + */ + __asm__ __volatile__ ( + " sfence \n" : : + ); stts(); } diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 946d1f40a..e2a9ee9fe 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -77,6 +77,19 @@ bad_area: return 0; } +extern spinlock_t console_lock, timerlist_lock; + +/* + * Unlock any spinlocks which will prevent us from getting the + * message out (timerlist_lock is aquired through the + * console unblank code) + */ +void bust_spinlocks(void) +{ + spin_lock_init(&console_lock); + spin_lock_init(&timerlist_lock); +} + asmlinkage void do_invalid_op(struct pt_regs *, unsigned long); extern unsigned long idt; @@ -251,6 +264,8 @@ no_context: * terminate things with extreme prejudice. */ + bust_spinlocks(); + if (address < PAGE_SIZE) printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); else diff --git a/arch/ia64/config.in b/arch/ia64/config.in index 33bf47a44..8defec849 100644 --- a/arch/ia64/config.in +++ b/arch/ia64/config.in @@ -21,6 +21,8 @@ define_bool CONFIG_IA64 y define_bool CONFIG_SWIOTLB y # for now... define_bool CONFIG_ISA n +define_bool CONFIG_EISA n +define_bool CONFIG_MCA n define_bool CONFIG_SBUS n choice 'IA-64 system type' \ diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 0383741a0..416b23faa 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c @@ -3392,7 +3392,7 @@ sockfd_lookup(int fd, int *err) } inode = file->f_dentry->d_inode; - if (!inode || !inode->i_sock || !socki_lookup(inode)) + if (!inode->i_sock || !socki_lookup(inode)) { *err = -ENOTSOCK; fput(file); diff --git a/arch/ia64/kernel/semaphore.c b/arch/ia64/kernel/semaphore.c index 84ff34cf6..f26099912 100644 --- a/arch/ia64/kernel/semaphore.c +++ b/arch/ia64/kernel/semaphore.c @@ -50,7 +50,7 @@ __down (struct semaphore *sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -70,7 +70,7 @@ __down (struct semaphore *sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -85,7 +85,7 @@ __down_interruptible (struct semaphore * sem) int retval = 0; struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -121,7 +121,7 @@ __down_interruptible (struct semaphore * sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -248,7 +248,7 @@ down_write_failed_biased (struct rw_semaphore *sem) for (;;) { if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!sem->write_bias_granted) schedule(); } @@ -277,7 +277,7 @@ down_write_failed (struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (sem->count < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (sem->count >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); diff --git a/arch/m68k/config.in b/arch/m68k/config.in index b06fdb516..b287daca8 100644 --- a/arch/m68k/config.in +++ b/arch/m68k/config.in @@ -25,6 +25,8 @@ mainmenu_option next_comment comment 'Platform dependent setup' define_bool CONFIG_ISA n +define_bool CONFIG_EISA n +define_bool CONFIG_MCA n define_bool CONFIG_PCMCIA n bool 'Amiga support' CONFIG_AMIGA diff --git a/arch/m68k/kernel/semaphore.c b/arch/m68k/kernel/semaphore.c index 139a75b64..a3a3e17f1 100644 --- a/arch/m68k/kernel/semaphore.c +++ b/arch/m68k/kernel/semaphore.c @@ -180,7 +180,7 @@ void down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { - set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(current, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); @@ -199,7 +199,7 @@ void down_write_failed_biased(struct rw_semaphore *sem) for (;;) { if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) break; - set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(current, TASK_UNINTERRUPTIBLE); if (!sem->write_bias_granted) schedule(); } diff --git a/arch/mips/config.in b/arch/mips/config.in index 65cb90b3d..a5486d93a 100644 --- a/arch/mips/config.in +++ b/arch/mips/config.in @@ -40,6 +40,7 @@ unset CONFIG_VIDEO_G364 unset CONFIG_PC_KEYB unset CONFIG_I8259 +define_bool CONFIG_MCA n define_bool CONFIG_SBUS n if [ "$CONFIG_MIPS_EV96100" = "y" ]; then @@ -103,6 +104,9 @@ fi if [ "$CONFIG_ISA" != "y" ]; then define_bool CONFIG_ISA n + define_bool CONFIG_EISA n +else + define_bool CONFIG_EISA y fi if [ "$CONFIG_PCI" != "y" ]; then diff --git a/arch/mips/defconfig b/arch/mips/defconfig index 534d17b1d..6b9ae3b5b 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig @@ -24,12 +24,14 @@ CONFIG_EXPERIMENTAL=y # CONFIG_OLIVETTI_M700 is not set CONFIG_SGI_IP22=y # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_ARC32=y CONFIG_BOARD_SCACHE=y CONFIG_PC_KEYB=y CONFIG_SGI=y # CONFIG_ISA is not set +# CONFIG_EISA is not set # CONFIG_PCI is not set # CONFIG_I8259 is not set diff --git a/arch/mips/defconfig-atlas b/arch/mips/defconfig-atlas index b7c45f78c..af230e0c5 100644 --- a/arch/mips/defconfig-atlas +++ b/arch/mips/defconfig-atlas @@ -24,10 +24,12 @@ CONFIG_MIPS_ATLAS=y # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_PCI=y # CONFIG_ISA is not set # CONFIG_ISA is not set +# CONFIG_EISA is not set # CONFIG_I8259 is not set # diff --git a/arch/mips/defconfig-ddb5476 b/arch/mips/defconfig-ddb5476 index 77130d7da..b4aa2ccde 100644 --- a/arch/mips/defconfig-ddb5476 +++ b/arch/mips/defconfig-ddb5476 @@ -24,12 +24,14 @@ CONFIG_DDB5476=y # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_I8259=y CONFIG_ISA=y CONFIG_PCI=y CONFIG_PC_KEYB=y CONFIG_ROTTEN_IRQ=y +CONFIG_EISA=y # # Loadable module support @@ -283,8 +285,8 @@ CONFIG_NET_PCI=y # CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_CS89x0 is not set -# CONFIG_DE4X5 is not set CONFIG_TULIP=y +# CONFIG_DE4X5 is not set # CONFIG_DGRS is not set # CONFIG_DM9102 is not set CONFIG_EEPRO100=y @@ -294,14 +296,15 @@ CONFIG_EEPRO100=y CONFIG_NE2K_PCI=y # CONFIG_NE3210 is not set # CONFIG_ES3210 is not set -# CONFIG_RTL8129 is not set # CONFIG_8139TOO is not set +# CONFIG_RTL8129 is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_WINBOND_840 is not set +# CONFIG_HAPPYMEAL is not set # CONFIG_LAN_SAA9730 is not set # CONFIG_NET_POCKET is not set diff --git a/arch/mips/defconfig-decstation b/arch/mips/defconfig-decstation index d264f047a..751bd10e3 100644 --- a/arch/mips/defconfig-decstation +++ b/arch/mips/defconfig-decstation @@ -24,8 +24,10 @@ CONFIG_DECSTATION=y # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set # CONFIG_ISA is not set +# CONFIG_EISA is not set # CONFIG_PCI is not set # CONFIG_I8259 is not set diff --git a/arch/mips/defconfig-ev96100 b/arch/mips/defconfig-ev96100 index 44eeaa0e1..acce83979 100644 --- a/arch/mips/defconfig-ev96100 +++ b/arch/mips/defconfig-ev96100 @@ -24,10 +24,12 @@ CONFIG_MIPS_EV96100=y # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_PCI=y CONFIG_MIPS_GT96100=y # CONFIG_ISA is not set +# CONFIG_EISA is not set # CONFIG_I8259 is not set # @@ -211,27 +213,28 @@ CONFIG_MIPS_GT96100ETH=y CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_AC3200 is not set # CONFIG_APRICOT is not set # CONFIG_CS89x0 is not set -# CONFIG_DE4X5 is not set CONFIG_TULIP=y +# CONFIG_DE4X5 is not set # CONFIG_DGRS is not set # CONFIG_DM9102 is not set # CONFIG_EEPRO100 is not set +# CONFIG_EEPRO100_PM is not set # CONFIG_LNE390 is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set # CONFIG_NE3210 is not set # CONFIG_ES3210 is not set -# CONFIG_RTL8129 is not set # CONFIG_8139TOO is not set +# CONFIG_RTL8129 is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_WINBOND_840 is not set +# CONFIG_HAPPYMEAL is not set # CONFIG_LAN_SAA9730 is not set # CONFIG_NET_POCKET is not set diff --git a/arch/mips/defconfig-ip22 b/arch/mips/defconfig-ip22 index 534d17b1d..6b9ae3b5b 100644 --- a/arch/mips/defconfig-ip22 +++ b/arch/mips/defconfig-ip22 @@ -24,12 +24,14 @@ CONFIG_EXPERIMENTAL=y # CONFIG_OLIVETTI_M700 is not set CONFIG_SGI_IP22=y # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_ARC32=y CONFIG_BOARD_SCACHE=y CONFIG_PC_KEYB=y CONFIG_SGI=y # CONFIG_ISA is not set +# CONFIG_EISA is not set # CONFIG_PCI is not set # CONFIG_I8259 is not set diff --git a/arch/mips/defconfig-malta b/arch/mips/defconfig-malta index 1e9f8e70b..08ae459c5 100644 --- a/arch/mips/defconfig-malta +++ b/arch/mips/defconfig-malta @@ -24,11 +24,13 @@ CONFIG_MIPS_MALTA=y # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_I8259=y CONFIG_PCI=y # CONFIG_ISA is not set # CONFIG_ISA is not set +# CONFIG_EISA is not set # # Loadable module support diff --git a/arch/mips/defconfig-orion b/arch/mips/defconfig-orion index 967043363..11f9353cf 100644 --- a/arch/mips/defconfig-orion +++ b/arch/mips/defconfig-orion @@ -24,8 +24,10 @@ CONFIG_ORION=y # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set # CONFIG_SNI_RM200_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set # CONFIG_ISA is not set +# CONFIG_EISA is not set # CONFIG_PCI is not set # CONFIG_I8259 is not set diff --git a/arch/mips/defconfig-rm200 b/arch/mips/defconfig-rm200 index 5eb83f270..4881669c0 100644 --- a/arch/mips/defconfig-rm200 +++ b/arch/mips/defconfig-rm200 @@ -24,6 +24,7 @@ CONFIG_EXPERIMENTAL=y # CONFIG_OLIVETTI_M700 is not set # CONFIG_SGI_IP22 is not set CONFIG_SNI_RM200_PCI=y +# CONFIG_MCA is not set # CONFIG_SBUS is not set CONFIG_ARC32=y CONFIG_I8259=y @@ -31,6 +32,7 @@ CONFIG_ISA=y CONFIG_PC_KEYB=y CONFIG_PCI=y CONFIG_ROTTEN_IRQ=y +CONFIG_EISA=y # # Loadable module support diff --git a/arch/mips/kernel/semaphore.c b/arch/mips/kernel/semaphore.c index 1f47bd929..5a9478f03 100644 --- a/arch/mips/kernel/semaphore.c +++ b/arch/mips/kernel/semaphore.c @@ -187,8 +187,7 @@ __down_write(struct rw_semaphore *sem, int count) add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { - set_task_state(tsk, (TASK_UNINTERRUPTIBLE - | TASK_EXCLUSIVE)); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= RW_LOCK_BIAS) break; schedule(); @@ -208,8 +207,7 @@ __down_write(struct rw_semaphore *sem, int count) while (1) { if (test_and_clear_bit(1, &sem->granted)) break; - set_task_state(tsk, (TASK_UNINTERRUPTIBLE - | TASK_EXCLUSIVE)); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if ((sem->granted & 2) == 0) schedule(); } diff --git a/arch/mips64/config.in b/arch/mips64/config.in index 129c24913..97730d9be 100644 --- a/arch/mips64/config.in +++ b/arch/mips64/config.in @@ -57,12 +57,16 @@ fi if [ "$CONFIG_ISA" != "y" ]; then define_bool CONFIG_ISA n + define_bool CONFIG_EISA n +else + define_bool CONFIG_EISA y fi if [ "$CONFIG_PCI" != "y" ]; then define_bool CONFIG_PCI n fi +define_bool CONFIG_MCA n define_bool CONFIG_SBUS n mainmenu_option next_comment diff --git a/arch/mips64/defconfig b/arch/mips64/defconfig index 8c86e86f3..72f0b52bc 100644 --- a/arch/mips64/defconfig +++ b/arch/mips64/defconfig @@ -25,6 +25,8 @@ CONFIG_COHERENT_IO=y CONFIG_PCI=y CONFIG_QL_ISP_A64=y # CONFIG_ISA is not set +# CONFIG_EISA is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set # diff --git a/arch/mips64/defconfig-ip22 b/arch/mips64/defconfig-ip22 index 1e1e020eb..3848c0c96 100644 --- a/arch/mips64/defconfig-ip22 +++ b/arch/mips64/defconfig-ip22 @@ -18,7 +18,9 @@ CONFIG_BOARD_SCACHE=y CONFIG_ARC_MEMORY=y CONFIG_SGI=y # CONFIG_ISA is not set +# CONFIG_EISA is not set # CONFIG_PCI is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set # diff --git a/arch/mips64/defconfig-ip27 b/arch/mips64/defconfig-ip27 index 8c86e86f3..72f0b52bc 100644 --- a/arch/mips64/defconfig-ip27 +++ b/arch/mips64/defconfig-ip27 @@ -25,6 +25,8 @@ CONFIG_COHERENT_IO=y CONFIG_PCI=y CONFIG_QL_ISP_A64=y # CONFIG_ISA is not set +# CONFIG_EISA is not set +# CONFIG_MCA is not set # CONFIG_SBUS is not set # diff --git a/arch/mips64/kernel/linux32.c b/arch/mips64/kernel/linux32.c index b29514758..2e64aa465 100644 --- a/arch/mips64/kernel/linux32.c +++ b/arch/mips64/kernel/linux32.c @@ -277,7 +277,7 @@ int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) return -ENOMEM; new = 1; } - kaddr = (char *)kmap(page); + kaddr = kmap(page); if (new && offset) memset(kaddr, 0, offset); diff --git a/arch/mips64/kernel/semaphore.c b/arch/mips64/kernel/semaphore.c index 1f47bd929..5a9478f03 100644 --- a/arch/mips64/kernel/semaphore.c +++ b/arch/mips64/kernel/semaphore.c @@ -187,8 +187,7 @@ __down_write(struct rw_semaphore *sem, int count) add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { - set_task_state(tsk, (TASK_UNINTERRUPTIBLE - | TASK_EXCLUSIVE)); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= RW_LOCK_BIAS) break; schedule(); @@ -208,8 +207,7 @@ __down_write(struct rw_semaphore *sem, int count) while (1) { if (test_and_clear_bit(1, &sem->granted)) break; - set_task_state(tsk, (TASK_UNINTERRUPTIBLE - | TASK_EXCLUSIVE)); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if ((sem->granted & 2) == 0) schedule(); } diff --git a/arch/mips64/ld.script.elf32 b/arch/mips64/ld.script.elf32 new file mode 100644 index 000000000..e83f23508 --- /dev/null +++ b/arch/mips64/ld.script.elf32 @@ -0,0 +1,123 @@ +/* 2^^40 *//* 2^^40 *//* 2^^40 *//* 2^^40 *//* max syssegsz *//* 2^^40 - 1 *//* KUSIZE for a 32 bit proc *//* exclusive on write *//* noncoherent *//* exclusive *//* Uncached attr 3, uncac *//* 32-bit compat k1 *//* _ASM_ADDRSPACE_H *//* CONFIG_MAPPED_KERNEL *//* CONFIG_MAPPED_KERNEL */OUTPUT_ARCH(mips) +ENTRY(kernel_entry) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + .init : { *(.init) } =0 + .text : + { + *(.text) + *(.rodata) + *(.rodata1) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + } =0 + .kstrtab : { *(.kstrtab) } + + . = ALIGN(16); /* Exception table */ + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + + __start___dbe_table = .; /* Exception table for data bus errors */ + __dbe_table : { *(__dbe_table) } + __stop___dbe_table = .; + + _etext = .; + + . = ALIGN(16384); + . = . + 0 ; /* for CONFIG_MAPPED_KERNEL */ + .data.init_task : { *(.data.init_task) } + + /* Startup code */ + . = ALIGN(4096); + __init_begin = .; + .text.init : { *(.text.init) } + .data.init : { *(.data.init) } + . = ALIGN(16); + __setup_start = .; + .setup.init : { *(.setup.init) } + __setup_end = .; + __initcall_start = .; + .initcall.init : { *(.initcall.init) } + __initcall_end = .; + . = ALIGN(4096); /* Align double page for init_task_union */ + __init_end = .; + + . = ALIGN(4096); + .data.page_aligned : { *(.data.idt) } + + . = ALIGN(32); + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + + .fini : { *(.fini) } =0 + .reginfo : { *(.reginfo) } + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. It would + be more correct to do this: + . = .; + The current expression does not correctly handle the case of a + text segment ending precisely at the end of a page; it causes the + data segment to skip a page. The above expression does not have + this problem, but it will currently (2/95) cause BFD to allocate + a single segment, combining both text and data, for this case. + This will prevent the text segment from being shared among + multiple executions of the program; I think that is more + important than losing a page of the virtual address space (note + that no actual memory is lost; the page which is skipped can not + be referenced). */ + . = .; + .data : + { + _fdata = . ; + *(.data) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .lit8 : { *(.lit8) } + .lit4 : { *(.lit4) } + .ctors : { *(.ctors) } + .dtors : { *(.dtors) } + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + _edata = .; + + .sbss : { *(.sbss) *(.scommon) } + .bss : + { + *(.dynbss) + *(.bss) + *(COMMON) + _end = . ; + } + + /* Sections to be discarded */ + /DISCARD/ : + { + *(.text.exit) + *(.data.exit) + *(.exitcall.exit) + } + + /* These are needed for ELF backends which have not yet been + converted to the new style linker. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + /* DWARF debug sections. + Symbols in the .debug DWARF section are relative to the beginning of the + section so we begin .debug at 0. It's not clear yet what needs to happen + for the others. */ + .debug 0 : { *(.debug) } + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_sfnames 0 : { *(.debug_sfnames) } + .line 0 : { *(.line) } + /* These must appear regardless of . */ + .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } + .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } +} diff --git a/arch/mips64/mm/fault.c b/arch/mips64/mm/fault.c index 204419e98..c8f4534d4 100644 --- a/arch/mips64/mm/fault.c +++ b/arch/mips64/mm/fault.c @@ -57,6 +57,19 @@ dodebug2(abi64_no_regargs, struct pt_regs regs) printk("Got exception 0x%lx at 0x%lx\n", retaddr, regs.cp0_epc); } +extern spinlock_t console_lock, timerlist_lock; + +/* + * Unlock any spinlocks which will prevent us from getting the + * message out (timerlist_lock is aquired through the + * console unblank code) + */ +void bust_spinlocks(void) +{ + spin_lock_init(&console_lock); + spin_lock_init(&timerlist_lock); +} + /* * This routine handles page faults. It determines the address, * and the problem, and then passes it off to one of the appropriate @@ -181,6 +194,9 @@ no_context: * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ + + bust_spinlocks(); + printk(KERN_ALERT "Cpu %d Unable to handle kernel paging request at " "address %08lx, epc == %08x, ra == %08x\n", smp_processor_id(), address, (unsigned int) regs->cp0_epc, diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 4b871c230..0790a81c5 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c @@ -149,7 +149,7 @@ cpm_interrupt(int irq, void * dev, struct pt_regs * regs) /* After servicing the interrupt, we have to remove the status * indicator. */ - ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cisr |= (1 << vec); + ((immap_t *)IMAP_ADDR)->im_cpic.cpic_cisr = (1 << vec); } diff --git a/arch/ppc/config.in b/arch/ppc/config.in index ef17e6334..34606f99a 100644 --- a/arch/ppc/config.in +++ b/arch/ppc/config.in @@ -98,8 +98,12 @@ bool 'High memory support (experimental)' CONFIG_HIGHMEM bool 'Mac-on-Linux support' CONFIG_MOL define_bool CONFIG_ISA n +define_bool CONFIG_EISA n define_bool CONFIG_SBUS n +# Yes MCA RS/6000s exist but Linux-PPC does not currently support any +define_bool CONFIG_MCA n + if [ "$CONFIG_APUS" = "y" -o "$CONFIG_4xx" = "y" -o \ "$CONFIG_8260" = "y" ]; then define_bool CONFIG_PCI n diff --git a/arch/ppc/configs/apus_defconfig b/arch/ppc/configs/apus_defconfig index 328d5c660..ed930fff2 100644 --- a/arch/ppc/configs/apus_defconfig +++ b/arch/ppc/configs/apus_defconfig @@ -1,139 +1,161 @@ # # Automatically generated make config: don't edit # +# CONFIG_UID16 is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y # # Platform support # CONFIG_PPC=y CONFIG_6xx=y +# CONFIG_4xx is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8260 is not set # CONFIG_8xx is not set -CONFIG_PMAC=y -# CONFIG_PREP is not set -# CONFIG_CHRP is not set -# CONFIG_ALL_PPC is not set +CONFIG_ALL_PPC=y +# CONFIG_GEMINI is not set +# CONFIG_EST8260 is not set # CONFIG_APUS is not set -# CONFIG_MBX is not set # CONFIG_SMP is not set -CONFIG_MACH_SPECIFIC=y +# CONFIG_ALTIVEC is not set # # General setup # -CONFIG_EXPERIMENTAL=y -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y +# CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set +# CONFIG_ISA is not set +# CONFIG_SBUS is not set CONFIG_PCI=y -# CONFIG_PCI_QUIRKS is not set -CONFIG_PCI_OLD_PROC=y CONFIG_NET=y CONFIG_SYSCTL=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y CONFIG_KERNEL_ELF=y CONFIG_BINFMT_MISC=m -# CONFIG_BINFMT_JAVA is not set +# CONFIG_PCI_NAMES is not set +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# # CONFIG_PARPORT is not set # CONFIG_VGA_CONSOLE is not set CONFIG_FB=y CONFIG_FB_COMPAT_XPMAC=y -CONFIG_PMAC_PBOOK=y -CONFIG_MAC_KEYBOARD=y -CONFIG_MAC_FLOPPY=y -CONFIG_MAC_SERIAL=y -CONFIG_ADBMOUSE=y +# CONFIG_PPC_RTC is not set CONFIG_PROC_DEVICETREE=y -# CONFIG_KGDB is not set -# CONFIG_XMON is not set -# CONFIG_TOTALMP is not set +# CONFIG_BOOTX_TEXT is not set +# CONFIG_MOTOROLA_HOTSWAP is not set +# CONFIG_CMDLINE_BOOL is not set # -# Plug and Play support +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play configuration # # CONFIG_PNP is not set +# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -# CONFIG_BLK_DEV_IDEPCI is not set -# CONFIG_BLK_DEV_SL82C105 is not set -CONFIG_BLK_DEV_IDE_PMAC=y -CONFIG_BLK_DEV_IDEDMA_PMAC=y -CONFIG_BLK_DEV_IDEDMA=y -CONFIG_IDEDMA_PMAC_AUTO=y -# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_MD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y -# CONFIG_BLK_DEV_XD is not set -CONFIG_PARIDE_PARPORT=y -# CONFIG_PARIDE is not set -# CONFIG_BLK_DEV_HD is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options # CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set CONFIG_NETLINK=y # CONFIG_RTNETLINK is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_FIREWALL is not set +# CONFIG_NETFILTER is not set # CONFIG_FILTER is not set CONFIG_UNIX=y CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -CONFIG_IP_ALIAS=y +# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set - -# -# (it is safe to leave these untouched) -# -CONFIG_INET_RARP=y -CONFIG_IP_NOSR=y -CONFIG_SKB_LARGE=y # CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set +# CONFIG_ATM is not set # # # # CONFIG_IPX is not set CONFIG_ATALK=m +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set # CONFIG_NET_HW_FLOWCONTROL is not set -# CONFIG_CPU_IS_SLOW is not set + +# +# QoS and/or fair queueing +# # CONFIG_NET_SCHED is not set # +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set + +# # SCSI support # CONFIG_SCSI=y @@ -142,14 +164,17 @@ CONFIG_SCSI=y # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y +CONFIG_SD_EXTRA_DEVS=40 CONFIG_CHR_DEV_ST=y CONFIG_BLK_DEV_SR=y CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_SR_EXTRA_DEVS=2 # CONFIG_CHR_DEV_SG is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # +# CONFIG_SCSI_DEBUG_QUEUES is not set # CONFIG_SCSI_MULTI_LUN is not set CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_LOGGING is not set @@ -157,96 +182,136 @@ CONFIG_SCSI_CONSTANTS=y # # SCSI low-level drivers # +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 is not set # CONFIG_SCSI_AHA1740 is not set CONFIG_SCSI_AIC7XXX=y -# CONFIG_OVERRIDE_CMDS is not set +# CONFIG_AIC7XXX_TCQ_ON_BY_DEFAULT is not set +CONFIG_AIC7XXX_CMDS_PER_DEVICE=8 CONFIG_AIC7XXX_PROC_STATS=y CONFIG_AIC7XXX_RESET_DELAY=15 # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set +# CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_DMA is not set # CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_EATA is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set # CONFIG_SCSI_NCR53C7xx is not set # CONFIG_SCSI_NCR53C8XX is not set +# CONFIG_SCSI_SYM53C8XX is not set # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PCI2000 is not set # CONFIG_SCSI_PCI2220I is not set # CONFIG_SCSI_PSI240I is not set # CONFIG_SCSI_QLOGIC_FAS is not set # CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_SEAGATE is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_ULTRASTOR is not set # CONFIG_SCSI_DEBUG is not set CONFIG_SCSI_MESH=y CONFIG_SCSI_MESH_SYNC_RATE=5 CONFIG_SCSI_MAC53C94=y # +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# # Network device support # CONFIG_NETDEVICES=y + +# +# ARCnet devices +# # CONFIG_ARCNET is not set + +# +# Appletalk devices +# +# CONFIG_APPLETALK is not set # CONFIG_DUMMY is not set +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # CONFIG_ETHERTAP is not set +# CONFIG_NET_SB1000 is not set + +# +# Ethernet (10 or 100Mbit) +# CONFIG_NET_ETHERNET=y CONFIG_MACE=y CONFIG_BMAC=y +# CONFIG_GMAC is not set +# CONFIG_NCR885E is not set +# CONFIG_OAKNET is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_RTL8139 is not set -# CONFIG_YELLOWFIN is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set -CONFIG_NET_EISA=y -# CONFIG_PCNET32 is not set -# CONFIG_AC3200 is not set -# CONFIG_APRICOT is not set -# CONFIG_CS89x0 is not set -CONFIG_DE4X5=y -CONFIG_DEC_ELCP=m -# CONFIG_DGRS is not set -# CONFIG_EEXPRESS_PRO100 is not set -# CONFIG_LNE390 is not set -# CONFIG_NE3210 is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_ES3210 is not set -# CONFIG_EPIC100 is not set -# CONFIG_ZNET is not set +# CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set -# CONFIG_DLCI is not set -# CONFIG_LTPC is not set -# CONFIG_COPS is not set -# CONFIG_IPDDP is not set CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_ASYNC is not set +# CONFIG_PPP_SYNC_TTY is not set +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set # -# CCP compressors for PPP are only built as modules. +# Wireless LAN (non-hamradio) # -# CONFIG_SLIP is not set # CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# # CONFIG_TR is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set -# CONFIG_HOSTESS_SV11 is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set # # Amateur Radio support @@ -254,27 +319,46 @@ CONFIG_PPP=y # CONFIG_HAMRADIO is not set # +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# # ISDN subsystem # # CONFIG_ISDN is not set # -# CD-ROM drivers (not for SCSI or IDE/ATAPI drives) +# Old CD-ROM drivers (not SCSI, not IDE) # # CONFIG_CD_NO_IDESCSI is not set # # Console drivers # + +# +# Frame-buffer support +# +CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y +# CONFIG_FB_RIVA is not set +# CONFIG_FB_CLGEN is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y CONFIG_FB_CONTROL=y CONFIG_FB_PLATINUM=y CONFIG_FB_VALKYRIE=y -CONFIG_FB_ATY=y -CONFIG_FB_IMSTT=y CONFIG_FB_CT65550=y +CONFIG_FB_IMSTT=y # CONFIG_FB_S3TRIO is not set +# CONFIG_FB_VGA16 is not set +# CONFIG_FB_MATROX is not set +CONFIG_FB_ATY=y +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_SIS is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set CONFIG_FBCON_CFB8=y @@ -292,6 +376,21 @@ CONFIG_FONT_SUN12x22=y # CONFIG_FONT_ACORN_8x8 is not set # +# Input core support +# +# CONFIG_INPUT is not set + +# +# Macintosh device drivers +# +# CONFIG_ADB_CUDA is not set +# CONFIG_ADB_PMU is not set +CONFIG_MAC_FLOPPY=y +CONFIG_MAC_SERIAL=y +# CONFIG_SERIAL_CONSOLE is not set +# CONFIG_ADB is not set + +# # Character devices # CONFIG_VT=y @@ -301,58 +400,127 @@ CONFIG_SERIAL=m # CONFIG_SERIAL_NONSTANDARD is not set CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTY_COUNT=256 + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set # CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_JOYSTICK is not set + +# +# Input core support is needed for joysticks +# # CONFIG_QIC02_TAPE is not set + +# +# Watchdog Cards +# # CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set -# CONFIG_VIDEO_DEV is not set +# CONFIG_INTEL_RNG is not set CONFIG_NVRAM=y -# CONFIG_JOYSTICK is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set # -# Filesystems +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems # # CONFIG_QUOTA is not set -# CONFIG_MINIX_FS is not set -CONFIG_EXT2_FS=y -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set +CONFIG_AUTOFS_FS=y +# CONFIG_AUTOFS4_FS is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +CONFIG_HFS_FS=y +# CONFIG_BFS_FS is not set CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m # CONFIG_UMSDOS_FS is not set CONFIG_VFAT_FS=m +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_RAMFS is not set +CONFIG_ISO9660_FS=y +# CONFIG_JOLIET is not set +# CONFIG_MINIX_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_ROOT_NFS is not set CONFIG_NFSD=y +# CONFIG_NFSD_V3 is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y -# CONFIG_CODA_FS is not set # CONFIG_SMB_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=y -# CONFIG_ROMFS_FS is not set -CONFIG_AUTOFS_FS=y -# CONFIG_UFS_FS is not set -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_SMD_DISKLABEL is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -CONFIG_DEVPTS_FS=y -# CONFIG_ADFS_FS is not set -# CONFIG_QNX4FS_FS is not set -CONFIG_MAC_PARTITION=y +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y CONFIG_NLS=y # # Native Language Support # +CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set @@ -369,6 +537,10 @@ CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set # CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_950 is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -378,16 +550,40 @@ CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_ISO8859_7 is not set # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_UTF8 is not set # # Sound # CONFIG_SOUND=y -CONFIG_DMASOUND=y +# CONFIG_DMASOUND_AWACS is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set # CONFIG_SOUND_ES1370 is not set # CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set # CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set # CONFIG_SOUND_OSS is not set +# CONFIG_SOUND_TVMIXER is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_KGDB is not set +# CONFIG_XMON is not set diff --git a/arch/ppc/configs/bseip_defconfig b/arch/ppc/configs/bseip_defconfig index 7233997fd..f0ff611f4 100644 --- a/arch/ppc/configs/bseip_defconfig +++ b/arch/ppc/configs/bseip_defconfig @@ -9,18 +9,27 @@ CONFIG_EXPERIMENTAL=y # +# Loadable module support +# +# CONFIG_MODULES is not set + +# # Platform support # CONFIG_PPC=y # CONFIG_6xx is not set # CONFIG_4xx is not set -# CONFIG_PPC64BRIDGE is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8260 is not set CONFIG_8xx=y CONFIG_SERIAL_CONSOLE=y # CONFIG_RPXLITE is not set # CONFIG_RPXCLASSIC is not set CONFIG_BSEIP=y +# CONFIG_TQM8xxL is not set +# CONFIG_TQM860L is not set +# CONFIG_TQM860 is not set # CONFIG_MBX is not set # CONFIG_WINCEPT is not set # CONFIG_ALL_PPC is not set @@ -29,15 +38,13 @@ CONFIG_MACH_SPECIFIC=y CONFIG_MATH_EMULATION=y # -# Loadable module support -# -# CONFIG_MODULES is not set - -# # General setup # +# CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set # CONFIG_ISA is not set # CONFIG_SBUS is not set +# CONFIG_PCI_QSPAN is not set # CONFIG_PCI is not set CONFIG_NET=y CONFIG_SYSCTL=y @@ -56,6 +63,11 @@ CONFIG_KERNEL_ELF=y # CONFIG_PARPORT is not set # +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# # Plug and Play configuration # # CONFIG_PNP is not set @@ -68,16 +80,25 @@ CONFIG_KERNEL_ELF=y # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_RAID0 is not set -# CONFIG_RAID15_DANGEROUS is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_INITRD=y +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -96,17 +117,11 @@ CONFIG_IP_MULTICAST=y CONFIG_IP_PNP=y CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -CONFIG_IP_ALIAS=y +# CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y - -# -# (it is safe to leave these untouched) -# -CONFIG_SKB_LARGE=y # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set @@ -117,10 +132,11 @@ CONFIG_SKB_LARGE=y # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -155,6 +171,7 @@ CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # CONFIG_ETHERTAP is not set # CONFIG_NET_SB1000 is not set @@ -173,6 +190,7 @@ CONFIG_NET_ETHERNET=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set # CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set @@ -180,8 +198,9 @@ CONFIG_NET_ETHERNET=y # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set @@ -236,6 +255,15 @@ CONFIG_NET_ETHERNET=y # CONFIG_FB is not set # +# Input core support +# +# CONFIG_INPUT is not set + +# +# Macintosh device drivers +# + +# # Character devices # # CONFIG_VT is not set @@ -260,19 +288,19 @@ CONFIG_UNIX98_PTY_COUNT=256 # Joysticks # # CONFIG_JOYSTICK is not set + +# +# Input core support is needed for joysticks +# # CONFIG_QIC02_TAPE is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set +# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set - -# -# Video For Linux -# -# CONFIG_VIDEO_DEV is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -281,9 +309,13 @@ CONFIG_UNIX98_PTY_COUNT=256 # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set -# CONFIG_DRM is not set -# CONFIG_DRM_TDFX is not set # CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set # # File systems @@ -301,6 +333,7 @@ CONFIG_UNIX98_PTY_COUNT=256 # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set @@ -360,6 +393,7 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set # CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_NLS is not set @@ -375,7 +409,9 @@ CONFIG_SCC_ENET=y # CONFIG_SCC1_ENET is not set CONFIG_SCC2_ENET=y # CONFIG_FEC_ENET is not set +# CONFIG_ENET_BIG_BUFFERS is not set CONFIG_8xxSMC2=y +# CONFIG_8xx_ALTSMC2 is not set # CONFIG_8xxSCC is not set # diff --git a/arch/ppc/configs/common_defconfig b/arch/ppc/configs/common_defconfig index a9ae80db0..5574ecbdb 100644 --- a/arch/ppc/configs/common_defconfig +++ b/arch/ppc/configs/common_defconfig @@ -36,6 +36,7 @@ CONFIG_ALTIVEC=y # General setup # # CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set # CONFIG_ISA is not set # CONFIG_SBUS is not set CONFIG_PCI=y @@ -58,7 +59,6 @@ CONFIG_PCI_NAMES=y CONFIG_VGA_CONSOLE=y CONFIG_FB=y CONFIG_FB_COMPAT_XPMAC=y -CONFIG_PMAC_PBOOK=y CONFIG_PPC_RTC=y CONFIG_PROC_DEVICETREE=y CONFIG_BOOTX_TEXT=y @@ -83,18 +83,25 @@ CONFIG_BOOTX_TEXT=y # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_RAID0 is not set # CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID5 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -130,6 +137,7 @@ CONFIG_ATALK=m # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -203,10 +211,11 @@ CONFIG_BLK_DEV_CMD64X=y # CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_PDC202XX is not set # CONFIG_PDC202XX_BURST is not set +# CONFIG_BLK_DEV_OSB4 is not set # CONFIG_BLK_DEV_SIS5513 is not set +# CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_VIA82CXXX_TUNING is not set CONFIG_BLK_DEV_SL82C105=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDEDMA_PMAC=y @@ -262,6 +271,7 @@ CONFIG_AIC7XXX_RESET_DELAY=15 # CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 is not set # CONFIG_SCSI_EATA is not set @@ -273,8 +283,6 @@ CONFIG_AIC7XXX_RESET_DELAY=15 # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_SIM710 is not set # CONFIG_SCSI_NCR53C7xx is not set # CONFIG_SCSI_NCR53C8XX is not set CONFIG_SCSI_SYM53C8XX=y @@ -293,6 +301,8 @@ CONFIG_SCSI_NCR53C8XX_SYNC=20 # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set @@ -342,6 +352,7 @@ CONFIG_GMAC=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set CONFIG_NET_PCI=y CONFIG_PCNET32=y @@ -358,26 +369,28 @@ CONFIG_DE4X5=y # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set # CONFIG_NE3210 is not set +# CONFIG_ES3210 is not set # CONFIG_RTL8129 is not set # CONFIG_8139TOO is not set # CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_ES3210 is not set -# CONFIG_EPIC100 is not set +# CONFIG_WINBOND_840 is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set CONFIG_PPP=y CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y CONFIG_PPP_ASYNC=y # CONFIG_PPP_SYNC_TTY is not set CONFIG_PPP_DEFLATE=y @@ -483,13 +496,15 @@ CONFIG_INPUT_EVDEV=y # # Macintosh device drivers # +CONFIG_ADB_CUDA=y +CONFIG_ADB_PMU=y +CONFIG_PMAC_PBOOK=y +CONFIG_PMAC_BACKLIGHT=y CONFIG_MAC_FLOPPY=y CONFIG_MAC_SERIAL=y # CONFIG_SERIAL_CONSOLE is not set CONFIG_ADB=y -CONFIG_ADB_CUDA=y CONFIG_ADB_MACIO=y -CONFIG_ADB_PMU=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_HID=y CONFIG_MAC_ADBKEYCODES=y @@ -686,6 +701,7 @@ CONFIG_DMASOUND=y # CONFIG_SOUND_CMPCI is not set # CONFIG_SOUND_EMU10K1 is not set # CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set # CONFIG_SOUND_ES1370 is not set # CONFIG_SOUND_ES1371 is not set # CONFIG_SOUND_ESSSOLO1 is not set @@ -715,7 +731,6 @@ CONFIG_SOUND_CS4232=m # CONFIG_SOUND_PAS is not set # CONFIG_PAS_JOYSTICK is not set # CONFIG_SOUND_PSS is not set -# CONFIG_SOUND_SOFTOSS is not set # CONFIG_SOUND_SB is not set # CONFIG_SOUND_AWE32_SYNTH is not set # CONFIG_SOUND_WAVEFRONT is not set @@ -768,6 +783,7 @@ CONFIG_USB_OHCI=y # CONFIG_USB_RIO500 is not set # CONFIG_USB_DSBR is not set # CONFIG_USB_BLUETOOTH is not set +# CONFIG_USB_NET1080 is not set # # USB Human Interface Devices (HID) diff --git a/arch/ppc/configs/est8260_defconfig b/arch/ppc/configs/est8260_defconfig index d317c8517..afb972c03 100644 --- a/arch/ppc/configs/est8260_defconfig +++ b/arch/ppc/configs/est8260_defconfig @@ -38,6 +38,7 @@ CONFIG_MACH_SPECIFIC=y # General setup # # CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set # CONFIG_ISA is not set # CONFIG_SBUS is not set # CONFIG_PCI is not set @@ -81,18 +82,25 @@ CONFIG_KERNEL_ELF=y # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_RAID0 is not set # CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID5 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -130,6 +138,7 @@ CONFIG_SYN_COOKIES=y # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -183,6 +192,7 @@ CONFIG_NET_ETHERNET=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set # CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set @@ -190,8 +200,9 @@ CONFIG_NET_ETHERNET=y # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set diff --git a/arch/ppc/configs/gemini_defconfig b/arch/ppc/configs/gemini_defconfig index 522bd5d5d..44147f58c 100644 --- a/arch/ppc/configs/gemini_defconfig +++ b/arch/ppc/configs/gemini_defconfig @@ -9,12 +9,20 @@ CONFIG_EXPERIMENTAL=y # +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# # Platform support # CONFIG_PPC=y CONFIG_6xx=y # CONFIG_4xx is not set -# CONFIG_PPC64 is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8260 is not set # CONFIG_8xx is not set # CONFIG_ALL_PPC is not set @@ -26,15 +34,10 @@ CONFIG_ALTIVEC=y CONFIG_MACH_SPECIFIC=y # -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y - -# # General setup # +# CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set # CONFIG_ISA is not set # CONFIG_SBUS is not set CONFIG_PCI=y @@ -46,6 +49,7 @@ CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y CONFIG_KERNEL_ELF=y # CONFIG_BINFMT_MISC is not set +# CONFIG_PCI_NAMES is not set # CONFIG_HOTPLUG is not set # CONFIG_PCMCIA is not set @@ -55,33 +59,47 @@ CONFIG_KERNEL_ELF=y # CONFIG_PARPORT is not set # CONFIG_VGA_CONSOLE is not set # CONFIG_FB is not set -# CONFIG_PMAC_PBOOK is not set -# CONFIG_MAC_FLOPPY is not set -# CONFIG_MAC_SERIAL is not set -# CONFIG_ADB is not set +# CONFIG_PPC_RTC is not set # CONFIG_PROC_DEVICETREE is not set # CONFIG_BOOTX_TEXT is not set # CONFIG_MOTOROLA_HOTSWAP is not set # +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# # Plug and Play configuration # # CONFIG_PNP is not set +# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set # -# Additional Block Devices +# Multi-device support (RAID and LVM) # -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_LVM is not set +# CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set -# CONFIG_RAID15_DANGEROUS is not set -# CONFIG_BLK_DEV_RAM is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -98,17 +116,11 @@ CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -CONFIG_IP_ALIAS=y +# CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y - -# -# (it is safe to leave these untouched) -# -CONFIG_SKB_LARGE=y # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set @@ -119,10 +131,11 @@ CONFIG_SKB_LARGE=y # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -167,6 +180,7 @@ CONFIG_SCSI_CONSTANTS=y # # SCSI low-level drivers # +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_7000FASST is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AHA152X is not set @@ -178,6 +192,8 @@ CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set +# CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_DMA is not set @@ -185,17 +201,29 @@ CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_SIM710 is not set -# CONFIG_SCSI_NCR53C7xx_sync is not set -# CONFIG_SCSI_NCR53C7xx_FAST is not set -# CONFIG_SCSI_NCR53C7xx_DISCONNECT is not set +# CONFIG_SCSI_NCR53C7xx is not set +CONFIG_SCSI_NCR53C8XX=y +# CONFIG_SCSI_SYM53C8XX is not set +CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 +CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 +CONFIG_SCSI_NCR53C8XX_SYNC=20 +# CONFIG_SCSI_NCR53C8XX_PROFILE is not set +# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set +# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PCI2000 is not set # CONFIG_SCSI_PCI2220I is not set # CONFIG_SCSI_PSI240I is not set # CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_QLOGIC_ISP is not set +# CONFIG_SCSI_QLOGIC_FC is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set # CONFIG_SCSI_DEBUG is not set @@ -203,6 +231,11 @@ CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_MAC53C94 is not set # +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# # Network device support # CONFIG_NETDEVICES=y @@ -214,6 +247,7 @@ CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # CONFIG_ETHERTAP is not set # CONFIG_NET_SB1000 is not set @@ -232,6 +266,7 @@ CONFIG_NCR885E=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set # CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set @@ -239,8 +274,9 @@ CONFIG_NCR885E=y # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set @@ -295,6 +331,15 @@ CONFIG_NCR885E=y # CONFIG_FB is not set # +# Input core support +# +# CONFIG_INPUT is not set + +# +# Macintosh device drivers +# + +# # Character devices # # CONFIG_VT is not set @@ -320,19 +365,19 @@ CONFIG_UNIX98_PTY_COUNT=256 # Joysticks # # CONFIG_JOYSTICK is not set + +# +# Input core support is needed for joysticks +# # CONFIG_QIC02_TAPE is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set +# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set - -# -# Video For Linux -# -# CONFIG_VIDEO_DEV is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -341,8 +386,13 @@ CONFIG_UNIX98_PTY_COUNT=256 # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set -# CONFIG_DRM is not set # CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set # # File systems @@ -351,27 +401,39 @@ CONFIG_UNIX98_PTY_COUNT=256 # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_RAMFS is not set CONFIG_ISO9660_FS=y # CONFIG_JOLIET is not set # CONFIG_MINIX_FS is not set # CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set CONFIG_DEVPTS_FS=y # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set # # Network File Systems @@ -379,11 +441,23 @@ CONFIG_EXT2_FS=y # CONFIG_CODA_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set +# CONFIG_ROOT_NFS is not set # CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set # # Partition Types diff --git a/arch/ppc/configs/mbx_defconfig b/arch/ppc/configs/mbx_defconfig index 7080efb3e..6230f5877 100644 --- a/arch/ppc/configs/mbx_defconfig +++ b/arch/ppc/configs/mbx_defconfig @@ -1,98 +1,110 @@ # -# Automatically generated by make menuconfig: don't edit +# Automatically generated make config: don't edit # +# CONFIG_UID16 is not set + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +# CONFIG_MODULES is not set # # Platform support # CONFIG_PPC=y # CONFIG_6xx is not set +# CONFIG_4xx is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8260 is not set CONFIG_8xx=y -# CONFIG_PMAC is not set -# CONFIG_PREP is not set -# CONFIG_CHRP is not set -# CONFIG_ALL_PPC is not set -# CONFIG_APUS is not set +CONFIG_SERIAL_CONSOLE=y +# CONFIG_RPXLITE is not set +# CONFIG_RPXCLASSIC is not set +# CONFIG_BSEIP is not set +# CONFIG_TQM8xxL is not set +# CONFIG_TQM860L is not set +# CONFIG_TQM860 is not set CONFIG_MBX=y -CONFIG_MACH_SPECIFIC=y +# CONFIG_WINCEPT is not set +# CONFIG_ALL_PPC is not set # CONFIG_SMP is not set -CONFIG_SERIAL_CONSOLE=y +CONFIG_MACH_SPECIFIC=y +CONFIG_MATH_EMULATION=y # # General setup # -CONFIG_EXPERIMENTAL=y -# CONFIG_MODULES is not set -CONFIG_PCI=y -# CONFIG_PCI_QUIRKS is not set -CONFIG_PCI_OLD_PROC=y +# CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set +# CONFIG_ISA is not set +# CONFIG_SBUS is not set +# CONFIG_PCI_QSPAN is not set +# CONFIG_PCI is not set CONFIG_NET=y # CONFIG_SYSCTL is not set CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y CONFIG_KERNEL_ELF=y # CONFIG_BINFMT_MISC is not set -# CONFIG_BINFMT_JAVA is not set +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# # CONFIG_PARPORT is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_FB is not set -# CONFIG_PMAC_PBOOK is not set -# CONFIG_MAC_KEYBOARD is not set -# CONFIG_MAC_FLOPPY is not set -# CONFIG_MAC_SERIAL is not set -# CONFIG_ADBMOUSE is not set -# CONFIG_BLK_DEV_IDE_PMAC is not set -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_KGDB is not set -# CONFIG_XMON is not set -# CONFIG_TOTALMP is not set -# CONFIG_BOOTX_TEXT is not set # -# Plug and Play support +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play configuration # # CONFIG_PNP is not set +# CONFIG_ISAPNP is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set -CONFIG_BLK_DEV_IDE=y -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_BLK_DEV_CMD646 is not set -CONFIG_BLK_DEV_SL82C105=y -# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_MD is not set # CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_XD is not set -CONFIG_PARIDE_PARPORT=y -# CONFIG_PARIDE is not set -# CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_INITRD is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options # # CONFIG_PACKET is not set # CONFIG_NETLINK is not set -# CONFIG_FIREWALL is not set +# CONFIG_NETFILTER is not set # CONFIG_FILTER is not set CONFIG_UNIX=y CONFIG_INET=y @@ -101,26 +113,29 @@ CONFIG_INET=y CONFIG_IP_PNP=y CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -# CONFIG_IP_ALIAS is not set +# CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set -# CONFIG_INET_RARP is not set -CONFIG_IP_NOSR=y -CONFIG_SKB_LARGE=y # CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set +# CONFIG_ATM is not set + +# +# +# # CONFIG_IPX is not set # CONFIG_ATALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set # CONFIG_NET_HW_FLOWCONTROL is not set -CONFIG_CPU_IS_SLOW=y # # QoS and/or fair queueing @@ -128,6 +143,13 @@ CONFIG_CPU_IS_SLOW=y # CONFIG_NET_SCHED is not set # +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set + +# # SCSI support # # CONFIG_SCSI is not set @@ -136,33 +158,66 @@ CONFIG_CPU_IS_SLOW=y # Network device support # CONFIG_NETDEVICES=y + +# +# ARCnet devices +# # CONFIG_ARCNET is not set # CONFIG_DUMMY is not set +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_NET_SB1000 is not set + +# +# Ethernet (10 or 100Mbit) +# CONFIG_NET_ETHERNET=y # CONFIG_MACE is not set # CONFIG_BMAC is not set +# CONFIG_GMAC is not set +# CONFIG_NCR885E is not set +# CONFIG_OAKNET is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_RTL8139 is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_ACENIC is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set -# CONFIG_NET_EISA is not set +# CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set -# CONFIG_DLCI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# # CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# # CONFIG_TR is not set -# CONFIG_SHAPER is not set -# CONFIG_HOSTESS_SV11 is not set -# CONFIG_COSA is not set +# CONFIG_NET_FC is not set # CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set # # Amateur Radio support @@ -170,12 +225,17 @@ CONFIG_NET_ETHERNET=y # CONFIG_HAMRADIO is not set # +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# # ISDN subsystem # # CONFIG_ISDN is not set # -# CD-ROM drivers (not for SCSI or IDE/ATAPI drives) +# Old CD-ROM drivers (not SCSI, not IDE) # # CONFIG_CD_NO_IDESCSI is not set @@ -184,83 +244,182 @@ CONFIG_NET_ETHERNET=y # # +# Frame-buffer support +# +# CONFIG_FB is not set + +# +# Input core support +# +# CONFIG_INPUT is not set + +# +# Macintosh device drivers +# + +# # Character devices # -CONFIG_VT=y -# CONFIG_VT_CONSOLE is not set -CONFIG_SERIAL=y -CONFIG_SERIAL_CONSOLE=y +# CONFIG_VT is not set +# CONFIG_SERIAL is not set # CONFIG_SERIAL_EXTENDED is not set # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_UNIX98_PTYS is not set -# CONFIG_MOUSE is not set -# CONFIG_QIC02_TAPE is not set -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set # -# Video For Linux +# I2C support # -# CONFIG_VIDEO_DEV is not set +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set # -# Joystick support +# Joysticks # # CONFIG_JOYSTICK is not set # +# Input core support is needed for joysticks +# +# CONFIG_QIC02_TAPE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_INTEL_RNG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set # -# Filesystems +# File systems # # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_BFS_FS is not set # CONFIG_FAT_FS is not set # CONFIG_MSDOS_FS is not set # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set # CONFIG_JOLIET is not set # CONFIG_MINIX_FS is not set # CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # # CONFIG_CODA_FS is not set CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set CONFIG_ROOT_NFS=y # CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set # # Partition Types # -# CONFIG_BSD_DISKLABEL is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set # CONFIG_MAC_PARTITION is not set -# CONFIG_SMD_DISKLABEL is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_MSDOS_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set # CONFIG_NLS is not set # # Sound # # CONFIG_SOUND is not set + +# +# MPC8xx CPM Options +# +CONFIG_SCC_ENET=y +CONFIG_SCC1_ENET=y +# CONFIG_FEC_ENET is not set +CONFIG_ENET_BIG_BUFFERS=y +CONFIG_8xxSMC2=y +# CONFIG_8xx_ALTSMC2 is not set +CONFIG_8xxSCC=y + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +CONFIG_8xx_CPU6=y + +# +# USB support +# +# CONFIG_USB is not set + +# +# Kernel hacking +# +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_KGDB is not set +# CONFIG_XMON is not set diff --git a/arch/ppc/configs/oak_defconfig b/arch/ppc/configs/oak_defconfig index 362c83689..f33966d35 100644 --- a/arch/ppc/configs/oak_defconfig +++ b/arch/ppc/configs/oak_defconfig @@ -1,6 +1,7 @@ # -# Default configuration for the IBM PowerPC 403 "Oak" evaluation boards. +# Automatically generated make config: don't edit # +# CONFIG_UID16 is not set # # Code maturity level options @@ -8,13 +9,21 @@ CONFIG_EXPERIMENTAL=y # +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# # Platform support # CONFIG_PPC=y # CONFIG_6xx is not set CONFIG_4xx=y -# CONFIG_PPC64BRIDGE is not set -# CONFIG_82xx is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8260 is not set # CONFIG_8xx is not set CONFIG_OAK=y # CONFIG_WALNUT is not set @@ -23,35 +32,33 @@ CONFIG_MACH_SPECIFIC=y # CONFIG_MATH_EMULATION is not set # -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y - -# # General setup # +# CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set +# CONFIG_ISA is not set +# CONFIG_SBUS is not set # CONFIG_PCI is not set CONFIG_NET=y CONFIG_SYSCTL=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y CONFIG_KERNEL_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# # CONFIG_PARPORT is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_FB is not set -# CONFIG_PMAC_PBOOK is not set -# CONFIG_MAC_FLOPPY is not set -# CONFIG_MAC_SERIAL is not set -# CONFIG_ADB is not set -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_TOTALMP is not set -# CONFIG_BOOTX_TEXT is not set -# CONFIG_MOTOROLA_HOTSWAP is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set # # Plug and Play configuration @@ -63,22 +70,28 @@ CONFIG_KERNEL_ELF=y # Block devices # # CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_IDE is not set - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_ONLY is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_MD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y -# CONFIG_BLK_DEV_XD is not set -CONFIG_PARIDE_PARPORT=y -# CONFIG_PARIDE is not set -# CONFIG_BLK_DEV_IDE_MODES is not set -# CONFIG_BLK_DEV_HD is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -94,17 +107,11 @@ CONFIG_IP_MULTICAST=y CONFIG_IP_PNP=y CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_RARP=y -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -CONFIG_IP_ALIAS=y +# CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y - -# -# (it is safe to leave these untouched) -# -# CONFIG_SKB_LARGE is not set # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set @@ -115,10 +122,11 @@ CONFIG_SYN_COOKIES=y # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -130,6 +138,13 @@ CONFIG_SYN_COOKIES=y # CONFIG_NET_SCHED is not set # +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set + +# # SCSI support # # CONFIG_SCSI is not set @@ -144,7 +159,9 @@ CONFIG_NETDEVICES=y # # CONFIG_ARCNET is not set # CONFIG_DUMMY is not set +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # CONFIG_NET_SB1000 is not set # @@ -153,25 +170,26 @@ CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y # CONFIG_MACE is not set # CONFIG_BMAC is not set +# CONFIG_GMAC is not set # CONFIG_NCR885E is not set CONFIG_OAKNET=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_RTL8139 is not set -# CONFIG_DM9102 is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set -# CONFIG_NET_EISA is not set +# CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set @@ -184,7 +202,7 @@ CONFIG_OAKNET=y # CONFIG_NET_RADIO is not set # -# Token Ring driver support +# Token Ring devices # # CONFIG_TR is not set # CONFIG_NET_FC is not set @@ -202,6 +220,11 @@ CONFIG_OAKNET=y # CONFIG_HAMRADIO is not set # +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# # ISDN subsystem # # CONFIG_ISDN is not set @@ -221,6 +244,15 @@ CONFIG_OAKNET=y # CONFIG_FB is not set # +# Input core support +# +# CONFIG_INPUT is not set + +# +# Macintosh device drivers +# + +# # Character devices # # CONFIG_VT is not set @@ -240,24 +272,24 @@ CONFIG_SERIAL_CONSOLE=y # # CONFIG_BUSMOUSE is not set # CONFIG_MOUSE is not set -# CONFIG_QIC02_TAPE is not set # -# Watchdog Cards +# Joysticks # -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set +# CONFIG_JOYSTICK is not set # -# Video For Linux +# Input core support is needed for joysticks # -# CONFIG_VIDEO_DEV is not set +# CONFIG_QIC02_TAPE is not set # -# Joystick support +# Watchdog Cards # -# CONFIG_JOYSTICK is not set +# CONFIG_WATCHDOG is not set +# CONFIG_INTEL_RNG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -266,19 +298,22 @@ CONFIG_SERIAL_CONSOLE=y # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set +# CONFIG_AGP is not set # CONFIG_DRM is not set # -# Support for USB +# Multimedia devices # -# CONFIG_USB is not set +# CONFIG_VIDEO_DEV is not set # -# Filesystems +# File systems # # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set @@ -287,39 +322,60 @@ CONFIG_SERIAL_CONSOLE=y # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set # CONFIG_JOLIET is not set -# CONFIG_UDF_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # # CONFIG_CODA_FS is not set CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set CONFIG_ROOT_NFS=y # CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set -# CONFIG_MAC_PARTITION is not set -# CONFIG_MSDOS_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_SUN_PARTITION is not set +CONFIG_MSDOS_PARTITION=y # CONFIG_NLS is not set # @@ -328,6 +384,11 @@ CONFIG_LOCKD=y # CONFIG_SOUND is not set # +# USB support +# +# CONFIG_USB is not set + +# # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set diff --git a/arch/ppc/configs/rpxcllf_defconfig b/arch/ppc/configs/rpxcllf_defconfig index 4dda3d93f..78ee82230 100644 --- a/arch/ppc/configs/rpxcllf_defconfig +++ b/arch/ppc/configs/rpxcllf_defconfig @@ -41,8 +41,10 @@ CONFIG_MATH_EMULATION=y # General setup # # CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set # CONFIG_ISA is not set # CONFIG_SBUS is not set +# CONFIG_PCI_QSPAN is not set # CONFIG_PCI is not set CONFIG_NET=y CONFIG_SYSCTL=y @@ -78,18 +80,25 @@ CONFIG_KERNEL_ELF=y # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_RAID0 is not set # CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID5 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -127,6 +136,7 @@ CONFIG_SYN_COOKIES=y # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -180,6 +190,7 @@ CONFIG_NET_ETHERNET=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set # CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set @@ -187,8 +198,9 @@ CONFIG_NET_ETHERNET=y # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set diff --git a/arch/ppc/configs/rpxlite_defconfig b/arch/ppc/configs/rpxlite_defconfig index bacefe6f7..741d9265f 100644 --- a/arch/ppc/configs/rpxlite_defconfig +++ b/arch/ppc/configs/rpxlite_defconfig @@ -9,18 +9,27 @@ CONFIG_EXPERIMENTAL=y # +# Loadable module support +# +# CONFIG_MODULES is not set + +# # Platform support # CONFIG_PPC=y # CONFIG_6xx is not set # CONFIG_4xx is not set -# CONFIG_PPC64BRIDGE is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8260 is not set CONFIG_8xx=y CONFIG_SERIAL_CONSOLE=y CONFIG_RPXLITE=y # CONFIG_RPXCLASSIC is not set # CONFIG_BSEIP is not set +# CONFIG_TQM8xxL is not set +# CONFIG_TQM860L is not set +# CONFIG_TQM860 is not set # CONFIG_MBX is not set # CONFIG_WINCEPT is not set # CONFIG_ALL_PPC is not set @@ -29,15 +38,13 @@ CONFIG_MACH_SPECIFIC=y CONFIG_MATH_EMULATION=y # -# Loadable module support -# -# CONFIG_MODULES is not set - -# # General setup # +# CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set # CONFIG_ISA is not set # CONFIG_SBUS is not set +# CONFIG_PCI_QSPAN is not set # CONFIG_PCI is not set CONFIG_NET=y CONFIG_SYSCTL=y @@ -56,6 +63,11 @@ CONFIG_KERNEL_ELF=y # CONFIG_PARPORT is not set # +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# # Plug and Play configuration # # CONFIG_PNP is not set @@ -68,16 +80,25 @@ CONFIG_KERNEL_ELF=y # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_RAID0 is not set -# CONFIG_RAID15_DANGEROUS is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_INITRD=y +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -96,17 +117,11 @@ CONFIG_IP_MULTICAST=y CONFIG_IP_PNP=y CONFIG_IP_PNP_BOOTP=y # CONFIG_IP_PNP_RARP is not set -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -CONFIG_IP_ALIAS=y +# CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y - -# -# (it is safe to leave these untouched) -# -CONFIG_SKB_LARGE=y # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set @@ -117,10 +132,11 @@ CONFIG_SKB_LARGE=y # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -155,6 +171,7 @@ CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # CONFIG_ETHERTAP is not set # CONFIG_NET_SB1000 is not set @@ -173,6 +190,7 @@ CONFIG_NET_ETHERNET=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set # CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set @@ -180,8 +198,9 @@ CONFIG_NET_ETHERNET=y # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set @@ -236,6 +255,15 @@ CONFIG_NET_ETHERNET=y # CONFIG_FB is not set # +# Input core support +# +# CONFIG_INPUT is not set + +# +# Macintosh device drivers +# + +# # Character devices # # CONFIG_VT is not set @@ -260,19 +288,19 @@ CONFIG_UNIX98_PTY_COUNT=256 # Joysticks # # CONFIG_JOYSTICK is not set + +# +# Input core support is needed for joysticks +# # CONFIG_QIC02_TAPE is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set +# CONFIG_INTEL_RNG is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set - -# -# Video For Linux -# -# CONFIG_VIDEO_DEV is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -281,9 +309,13 @@ CONFIG_UNIX98_PTY_COUNT=256 # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set -# CONFIG_DRM is not set -# CONFIG_DRM_TDFX is not set # CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set # # File systems @@ -301,6 +333,7 @@ CONFIG_UNIX98_PTY_COUNT=256 # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set @@ -360,6 +393,7 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set # CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set # CONFIG_NLS is not set @@ -375,6 +409,7 @@ CONFIG_SCC_ENET=y # CONFIG_SCC1_ENET is not set CONFIG_SCC2_ENET=y # CONFIG_FEC_ENET is not set +# CONFIG_ENET_BIG_BUFFERS is not set # CONFIG_8xxSMC2 is not set # CONFIG_8xxSCC is not set diff --git a/arch/ppc/configs/walnut_defconfig b/arch/ppc/configs/walnut_defconfig index 73bc24eea..c3e95c6ac 100644 --- a/arch/ppc/configs/walnut_defconfig +++ b/arch/ppc/configs/walnut_defconfig @@ -1,6 +1,7 @@ # -# Default configuration for the IBM PowerPC 405GP "Walnut" evaluation board. +# Automatically generated make config: don't edit # +# CONFIG_UID16 is not set # # Code maturity level options @@ -8,13 +9,21 @@ CONFIG_EXPERIMENTAL=y # +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# # Platform support # CONFIG_PPC=y # CONFIG_6xx is not set CONFIG_4xx=y -# CONFIG_PPC64BRIDGE is not set -# CONFIG_82xx is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8260 is not set # CONFIG_8xx is not set # CONFIG_OAK is not set CONFIG_WALNUT=y @@ -23,35 +32,33 @@ CONFIG_MACH_SPECIFIC=y # CONFIG_MATH_EMULATION is not set # -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y - -# # General setup # -CONFIG_PCI=y +# CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set +# CONFIG_ISA is not set +# CONFIG_SBUS is not set +# CONFIG_PCI is not set CONFIG_NET=y CONFIG_SYSCTL=y CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y CONFIG_KERNEL_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# # CONFIG_PARPORT is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_FB is not set -# CONFIG_PMAC_PBOOK is not set -# CONFIG_MAC_FLOPPY is not set -# CONFIG_MAC_SERIAL is not set -# CONFIG_ADB is not set -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_TOTALMP is not set -# CONFIG_BOOTX_TEXT is not set -# CONFIG_MOTOROLA_HOTSWAP is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set # # Plug and Play configuration @@ -63,22 +70,28 @@ CONFIG_KERNEL_ELF=y # Block devices # # CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_IDE is not set - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_ONLY is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_MD is not set CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y -# CONFIG_BLK_DEV_XD is not set -CONFIG_PARIDE_PARPORT=y -# CONFIG_PARIDE is not set -# CONFIG_BLK_DEV_IDE_MODES is not set -# CONFIG_BLK_DEV_HD is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -94,17 +107,11 @@ CONFIG_IP_MULTICAST=y CONFIG_IP_PNP=y CONFIG_IP_PNP_BOOTP=y CONFIG_IP_PNP_RARP=y -# CONFIG_IP_ROUTER is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set -CONFIG_IP_ALIAS=y +# CONFIG_INET_ECN is not set CONFIG_SYN_COOKIES=y - -# -# (it is safe to leave these untouched) -# -# CONFIG_SKB_LARGE is not set # CONFIG_IPV6 is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set @@ -115,10 +122,11 @@ CONFIG_SYN_COOKIES=y # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_BRIDGE is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -130,6 +138,13 @@ CONFIG_SYN_COOKIES=y # CONFIG_NET_SCHED is not set # +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set + +# # SCSI support # # CONFIG_SCSI is not set @@ -144,7 +159,9 @@ CONFIG_NETDEVICES=y # # CONFIG_ARCNET is not set # CONFIG_DUMMY is not set +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # CONFIG_NET_SB1000 is not set # @@ -153,25 +170,26 @@ CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y # CONFIG_MACE is not set # CONFIG_BMAC is not set +# CONFIG_GMAC is not set # CONFIG_NCR885E is not set # CONFIG_OAKNET is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_RTL8139 is not set -# CONFIG_DM9102 is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set -# CONFIG_NET_EISA is not set +# CONFIG_NET_PCI is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set @@ -184,7 +202,7 @@ CONFIG_NET_ETHERNET=y # CONFIG_NET_RADIO is not set # -# Token Ring driver support +# Token Ring devices # # CONFIG_TR is not set # CONFIG_NET_FC is not set @@ -202,6 +220,11 @@ CONFIG_NET_ETHERNET=y # CONFIG_HAMRADIO is not set # +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# # ISDN subsystem # # CONFIG_ISDN is not set @@ -221,6 +244,15 @@ CONFIG_NET_ETHERNET=y # CONFIG_FB is not set # +# Input core support +# +# CONFIG_INPUT is not set + +# +# Macintosh device drivers +# + +# # Character devices # # CONFIG_VT is not set @@ -234,30 +266,33 @@ CONFIG_SERIAL_CONSOLE=y # I2C support # CONFIG_I2C=y +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_CHARDEV is not set # # Mice # # CONFIG_BUSMOUSE is not set # CONFIG_MOUSE is not set -# CONFIG_QIC02_TAPE is not set # -# Watchdog Cards +# Joysticks # -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set +# CONFIG_JOYSTICK is not set # -# Video For Linux +# Input core support is needed for joysticks # -# CONFIG_VIDEO_DEV is not set +# CONFIG_QIC02_TAPE is not set # -# Joystick support +# Watchdog Cards # -# CONFIG_JOYSTICK is not set +# CONFIG_WATCHDOG is not set +# CONFIG_INTEL_RNG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -266,19 +301,22 @@ CONFIG_I2C=y # Ftape, the floppy tape device driver # # CONFIG_FTAPE is not set +# CONFIG_AGP is not set # CONFIG_DRM is not set # -# Support for USB +# Multimedia devices # -# CONFIG_USB is not set +# CONFIG_VIDEO_DEV is not set # -# Filesystems +# File systems # # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set # CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set @@ -287,39 +325,60 @@ CONFIG_I2C=y # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set # CONFIG_JOLIET is not set -# CONFIG_UDF_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +# CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set +# CONFIG_SYSV_FS_WRITE is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set # # Network File Systems # # CONFIG_CODA_FS is not set CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set CONFIG_ROOT_NFS=y # CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set CONFIG_SUNRPC=y CONFIG_LOCKD=y # CONFIG_SMB_FS is not set # CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_MOUNT_SUBDIR is not set +# CONFIG_NCPFS_NDS_DOMAINS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set -# CONFIG_MAC_PARTITION is not set -# CONFIG_MSDOS_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_SUN_PARTITION is not set +CONFIG_MSDOS_PARTITION=y # CONFIG_NLS is not set # @@ -328,6 +387,11 @@ CONFIG_LOCKD=y # CONFIG_SOUND is not set # +# USB support +# +# CONFIG_USB is not set + +# # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set diff --git a/arch/ppc/defconfig b/arch/ppc/defconfig index 9b3d88212..5574ecbdb 100644 --- a/arch/ppc/defconfig +++ b/arch/ppc/defconfig @@ -36,6 +36,7 @@ CONFIG_ALTIVEC=y # General setup # # CONFIG_HIGHMEM is not set +# CONFIG_MOL is not set # CONFIG_ISA is not set # CONFIG_SBUS is not set CONFIG_PCI=y @@ -58,7 +59,6 @@ CONFIG_PCI_NAMES=y CONFIG_VGA_CONSOLE=y CONFIG_FB=y CONFIG_FB_COMPAT_XPMAC=y -CONFIG_PMAC_PBOOK=y CONFIG_PPC_RTC=y CONFIG_PROC_DEVICETREE=y CONFIG_BOOTX_TEXT=y @@ -83,18 +83,25 @@ CONFIG_BOOTX_TEXT=y # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_LVM is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_RAID0 is not set # CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID5 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_LVM is not set +# CONFIG_LVM_PROC_FS is not set # # Networking options @@ -130,6 +137,7 @@ CONFIG_ATALK=m # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_FASTROUTE is not set @@ -203,10 +211,11 @@ CONFIG_BLK_DEV_CMD64X=y # CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_PDC202XX is not set # CONFIG_PDC202XX_BURST is not set +# CONFIG_BLK_DEV_OSB4 is not set # CONFIG_BLK_DEV_SIS5513 is not set +# CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_VIA82CXXX_TUNING is not set CONFIG_BLK_DEV_SL82C105=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDEDMA_PMAC=y @@ -262,6 +271,7 @@ CONFIG_AIC7XXX_RESET_DELAY=15 # CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 is not set # CONFIG_SCSI_EATA is not set @@ -273,8 +283,6 @@ CONFIG_AIC7XXX_RESET_DELAY=15 # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_SIM710 is not set # CONFIG_SCSI_NCR53C7xx is not set # CONFIG_SCSI_NCR53C8XX is not set CONFIG_SCSI_SYM53C8XX=y @@ -293,6 +301,8 @@ CONFIG_SCSI_NCR53C8XX_SYNC=20 # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set @@ -342,6 +352,7 @@ CONFIG_GMAC=y # CONFIG_NET_VENDOR_RACAL is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set +# CONFIG_HP100 is not set # CONFIG_NET_ISA is not set CONFIG_NET_PCI=y CONFIG_PCNET32=y @@ -358,26 +369,28 @@ CONFIG_DE4X5=y # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set # CONFIG_NE3210 is not set +# CONFIG_ES3210 is not set # CONFIG_RTL8129 is not set # CONFIG_8139TOO is not set # CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set -# CONFIG_ES3210 is not set -# CONFIG_EPIC100 is not set +# CONFIG_WINBOND_840 is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # -# CONFIG_YELLOWFIN is not set # CONFIG_ACENIC is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set CONFIG_PPP=y CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y CONFIG_PPP_ASYNC=y # CONFIG_PPP_SYNC_TTY is not set CONFIG_PPP_DEFLATE=y @@ -483,13 +496,15 @@ CONFIG_INPUT_EVDEV=y # # Macintosh device drivers # +CONFIG_ADB_CUDA=y +CONFIG_ADB_PMU=y +CONFIG_PMAC_PBOOK=y +CONFIG_PMAC_BACKLIGHT=y CONFIG_MAC_FLOPPY=y CONFIG_MAC_SERIAL=y # CONFIG_SERIAL_CONSOLE is not set CONFIG_ADB=y -CONFIG_ADB_CUDA=y CONFIG_ADB_MACIO=y -CONFIG_ADB_PMU=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_HID=y CONFIG_MAC_ADBKEYCODES=y @@ -686,6 +701,7 @@ CONFIG_DMASOUND=y # CONFIG_SOUND_CMPCI is not set # CONFIG_SOUND_EMU10K1 is not set # CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set # CONFIG_SOUND_ES1370 is not set # CONFIG_SOUND_ES1371 is not set # CONFIG_SOUND_ESSSOLO1 is not set @@ -715,7 +731,6 @@ CONFIG_SOUND_CS4232=m # CONFIG_SOUND_PAS is not set # CONFIG_PAS_JOYSTICK is not set # CONFIG_SOUND_PSS is not set -# CONFIG_SOUND_SOFTOSS is not set # CONFIG_SOUND_SB is not set # CONFIG_SOUND_AWE32_SYNTH is not set # CONFIG_SOUND_WAVEFRONT is not set @@ -768,6 +783,7 @@ CONFIG_USB_OHCI=y # CONFIG_USB_RIO500 is not set # CONFIG_USB_DSBR is not set # CONFIG_USB_BLUETOOTH is not set +# CONFIG_USB_NET1080 is not set # # USB Human Interface Devices (HID) @@ -776,11 +792,6 @@ CONFIG_USB_HID=y # CONFIG_USB_WACOM is not set # -# Mac-on-Linux (MOL) support -# -# CONFIG_MOL is not set - -# # Kernel hacking # CONFIG_MAGIC_SYSRQ=y diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index 627cd7a2a..89922aaab 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S @@ -298,12 +298,10 @@ _GLOBAL(_switch) SYNC RFI -#ifdef CONFIG_SMP - .globl ret_from_smpfork -ret_from_smpfork: + .globl ret_from_fork +ret_from_fork: bl schedule_tail b ret_from_except -#endif .globl ret_from_intercept ret_from_intercept: diff --git a/arch/ppc/kernel/hashtable.S b/arch/ppc/kernel/hashtable.S index 1129dd40e..06b7c6f1d 100644 --- a/arch/ppc/kernel/hashtable.S +++ b/arch/ppc/kernel/hashtable.S @@ -90,9 +90,14 @@ hash_page: REST_2GPRS(7, r21) #endif /* Get PTE (linux-style) and check access */ + lis r0,KERNELBASE@h /* check if kernel address */ + cmplw 0,r3,r0 mfspr r2,SPRG3 /* current task's THREAD (phys) */ lwz r5,PGDIR(r2) /* virt page-table root */ - tophys(r5,r5) /* convert to phys addr */ + blt+ 112f /* assume user more likely */ + lis r5,swapper_pg_dir@ha /* if kernel address, use */ + addi r5,r5,swapper_pg_dir@l /* kernel page table */ +112: tophys(r5,r5) /* convert to phys addr */ rlwimi r5,r3,12,20,29 /* insert top 10 bits of address */ lwz r5,0(r5) /* get pmd entry */ rlwinm. r5,r5,0,0,19 /* extract address of pte page */ @@ -152,11 +157,7 @@ hash_page: mfsrin r5,r3 /* get segment reg for segment */ rlwinm r5,r5,0,5,31 sldi r5,r5,12 - -#ifndef CONFIG_SMP /* do this later for SMP */ ori r5,r5,1 /* set V (valid) bit */ -#endif - rlwimi r5,r3,16,20,24 /* put in API (abbrev page index) */ /* Get the address of the primary PTE group in the hash table */ .globl hash_page_patch_A @@ -284,7 +285,9 @@ found_slot: */ found_empty: found_slot: - std r5,0(r3) /* clear V (valid) bit in PTE */ + li r0,1 + andc r5,r5,r0 /* clear V (valid) bit in PTE */ + std r5,0(r3) sync tlbsync sync @@ -299,11 +302,7 @@ found_slot: /* Construct the high word of the PPC-style PTE */ mfsrin r5,r3 /* get segment reg for segment */ rlwinm r5,r5,7,1,24 /* put VSID in 0x7fffff80 bits */ - -#ifndef CONFIG_SMP /* do this later for SMP */ oris r5,r5,0x8000 /* set V (valid) bit */ -#endif - rlwimi r5,r3,10,26,31 /* put in API (abbrev page index) */ /* Get the address of the primary PTE group in the hash table */ .globl hash_page_patch_A @@ -417,7 +416,8 @@ found_slot: */ found_empty: found_slot: - stw r5,0(r3) /* clear V (valid) bit in PTE */ + rlwinm r5,r5,0,1,31 /* clear V (valid) bit in PTE */ + stw r5,0(r3) sync tlbsync sync diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index 5d26e2917..71b5a96c5 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S @@ -521,10 +521,15 @@ InstructionTLBMiss: */ mfctr r0 /* Get PTE (linux-style) and check access */ + mfspr r3,IMISS + lis r1,KERNELBASE@h /* check if kernel address */ + cmplw 0,r3,r1 mfspr r2,SPRG3 lwz r2,PGDIR(r2) - tophys(r2,r2) - mfspr r3,IMISS + blt+ 112f + lis r2,swapper_pg_dir@ha /* if kernel address, use */ + addi r2,r2,swapper_pg_dir@l /* kernel page table */ +112: tophys(r2,r2) rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ lwz r2,0(r2) /* get pmd entry */ rlwinm. r2,r2,0,0,19 /* extract address of pte page */ @@ -588,10 +593,15 @@ DataLoadTLBMiss: */ mfctr r0 /* Get PTE (linux-style) and check access */ + mfspr r3,DMISS + lis r1,KERNELBASE@h /* check if kernel address */ + cmplw 0,r3,r1 mfspr r2,SPRG3 lwz r2,PGDIR(r2) - tophys(r2,r2) - mfspr r3,DMISS + blt+ 112f + lis r2,swapper_pg_dir@ha /* if kernel address, use */ + addi r2,r2,swapper_pg_dir@l /* kernel page table */ +112: tophys(r2,r2) rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ lwz r2,0(r2) /* get pmd entry */ rlwinm. r2,r2,0,0,19 /* extract address of pte page */ @@ -654,10 +664,15 @@ DataStoreTLBMiss: */ mfctr r0 /* Get PTE (linux-style) and check access */ + mfspr r3,DMISS + lis r1,KERNELBASE@h /* check if kernel address */ + cmplw 0,r3,r1 mfspr r2,SPRG3 lwz r2,PGDIR(r2) - tophys(r2,r2) - mfspr r3,DMISS + blt+ 112f + lis r2,swapper_pg_dir@ha /* if kernel address, use */ + addi r2,r2,swapper_pg_dir@l /* kernel page table */ +112: tophys(r2,r2) rlwimi r2,r3,12,20,29 /* insert top 10 bits of address */ lwz r2,0(r2) /* get pmd entry */ rlwinm. r2,r2,0,0,19 /* extract address of pte page */ diff --git a/arch/ppc/kernel/irq.c b/arch/ppc/kernel/irq.c index eef89f352..a0caa4a4c 100644 --- a/arch/ppc/kernel/irq.c +++ b/arch/ppc/kernel/irq.c @@ -343,6 +343,11 @@ int probe_irq_off (unsigned long irqs) return 0; } +unsigned int probe_irq_mask(unsigned long irqs) +{ + return 0; +} + void __init init_IRQ(void) { static int once = 0; diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index e3826293b..94e1cd277 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S @@ -1219,11 +1219,7 @@ _GLOBAL(sys_call_table) .long sys_getresuid /* 165 */ .long sys_query_module .long sys_poll -#ifdef CONFIG_NFSD .long sys_nfsservctl -#else - .long sys_ni_syscall -#endif .long sys_setresgid .long sys_getresgid /* 170 */ .long sys_prctl diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 84faa0e1d..6d6f775f2 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c @@ -344,11 +344,6 @@ pcibios_fixup_pbus_ranges(struct pci_bus * bus, struct pbus_set_ranges_data * ra ranges->mem_end -= bus->resource[1]->start; } -unsigned long resource_fixup(struct pci_dev * dev, struct resource * res, - unsigned long start, unsigned long size) -{ - return start; -} void __init pcibios_fixup_bus(struct pci_bus *bus) { diff --git a/arch/ppc/kernel/ppc8260_pic.c b/arch/ppc/kernel/ppc8260_pic.c index 21cfde0f7..5bd42a11f 100644 --- a/arch/ppc/kernel/ppc8260_pic.c +++ b/arch/ppc/kernel/ppc8260_pic.c @@ -79,7 +79,7 @@ static void m8260_mask_and_ack(unsigned int irq_nr) sipnr = &(immr->im_intctl.ic_sipnrh); ppc_cached_irq_mask[word] &= ~(1 << (31 - bit)); simr[word] = ppc_cached_irq_mask[word]; - sipnr[word] = 1 << bit; + sipnr[word] = 1 << (31 - bit); } struct hw_interrupt_type ppc8260_pic = { diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 9240431e6..827e37540 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c @@ -79,6 +79,7 @@ EXPORT_SYMBOL(do_lost_interrupts); EXPORT_SYMBOL(enable_irq); EXPORT_SYMBOL(disable_irq); EXPORT_SYMBOL(disable_irq_nosync); +EXPORT_SYMBOL(probe_irq_mask); #ifdef CONFIG_SMP EXPORT_SYMBOL(kernel_flag); #endif /* CONFIG_SMP */ @@ -222,6 +223,8 @@ EXPORT_SYMBOL(cuda_poll); #ifdef CONFIG_ADB_PMU EXPORT_SYMBOL(pmu_request); EXPORT_SYMBOL(pmu_poll); +EXPORT_SYMBOL(pmu_suspend); +EXPORT_SYMBOL(pmu_resume); #endif /* CONFIG_ADB_PMU */ #ifdef CONFIG_PMAC_PBOOK EXPORT_SYMBOL(pmu_register_sleep_notifier); @@ -298,6 +301,7 @@ EXPORT_SYMBOL(console_lock); EXPORT_SYMBOL(xmon); #endif EXPORT_SYMBOL(down_read_failed); +EXPORT_SYMBOL(down_write_failed); #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) extern void (*debugger)(struct pt_regs *regs); diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c index 27adc9958..a200b1c78 100644 --- a/arch/ppc/kernel/process.c +++ b/arch/ppc/kernel/process.c @@ -319,11 +319,8 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, { unsigned long msr; struct pt_regs * childregs, *kregs; -#ifdef CONFIG_SMP - extern void ret_from_smpfork(void); -#else - extern void ret_from_except(void); -#endif + extern void ret_from_fork(void); + /* Copy registers */ childregs = ((struct pt_regs *) ((unsigned long)p + sizeof(union task_union) @@ -336,11 +333,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, p->thread.ksp = (unsigned long) childregs - STACK_FRAME_OVERHEAD; p->thread.ksp -= sizeof(struct pt_regs ) + STACK_FRAME_OVERHEAD; kregs = (struct pt_regs *)(p->thread.ksp + STACK_FRAME_OVERHEAD); -#ifdef CONFIG_SMP - kregs->nip = (unsigned long)ret_from_smpfork; -#else - kregs->nip = (unsigned long)ret_from_except; -#endif + kregs->nip = (unsigned long)ret_from_fork; asm volatile("mfmsr %0" : "=r" (msr):); kregs->msr = msr; kregs->gpr[1] = (unsigned long)childregs - STACK_FRAME_OVERHEAD; diff --git a/arch/ppc/kernel/semaphore.c b/arch/ppc/kernel/semaphore.c index f17bc16ce..0ed7eaa4d 100644 --- a/arch/ppc/kernel/semaphore.c +++ b/arch/ppc/kernel/semaphore.c @@ -152,7 +152,7 @@ void down_read_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); do { - __set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + __set_task_state(tsk, TASK_UNINTERRUPTIBLE); spin_unlock_irq(&sem->lock); schedule(); spin_lock_irq(&sem->lock); @@ -169,7 +169,7 @@ void down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); do { - __set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + __set_task_state(tsk, TASK_UNINTERRUPTIBLE); spin_unlock_irq(&sem->lock); schedule(); spin_lock_irq(&sem->lock); diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index cc8d2290a..2c17e7bcb 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c @@ -630,7 +630,7 @@ mmu_context_overflow(void) void flush_page_to_ram(struct page *page) { - unsigned long vaddr = kmap(page); + unsigned long vaddr = (unsigned long) kmap(page); __flush_page_to_ram(vaddr); kunmap(page); } diff --git a/arch/s390/config.in b/arch/s390/config.in index 894e40d5b..4415799ff 100644 --- a/arch/s390/config.in +++ b/arch/s390/config.in @@ -3,6 +3,9 @@ # see Documentation/kbuild/config-language.txt. # +define_bool CONFIG_ISA n +define_bool CONFIG_EISA n +define_bool CONFIG_MCA n define_bool CONFIG_UID16 y mainmenu_name "Linux Kernel Configuration" diff --git a/arch/s390/kernel/semaphore.c b/arch/s390/kernel/semaphore.c index 86aef0185..a0a434581 100644 --- a/arch/s390/kernel/semaphore.c +++ b/arch/s390/kernel/semaphore.c @@ -55,7 +55,7 @@ void __down(struct semaphore * sem) { struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -75,7 +75,7 @@ void __down(struct semaphore * sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_UNINTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_UNINTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -89,7 +89,7 @@ int __down_interruptible(struct semaphore * sem) int retval = 0; struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; add_wait_queue_exclusive(&sem->wait, &wait); spin_lock_irq(&semaphore_lock); @@ -125,7 +125,7 @@ int __down_interruptible(struct semaphore * sem) spin_unlock_irq(&semaphore_lock); schedule(); - tsk->state = TASK_INTERRUPTIBLE|TASK_EXCLUSIVE; + tsk->state = TASK_INTERRUPTIBLE; spin_lock_irq(&semaphore_lock); } spin_unlock_irq(&semaphore_lock); @@ -188,7 +188,7 @@ void down_write_failed_biased(struct rw_semaphore *sem) for (;;) { if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!sem->write_bias_granted) schedule(); } @@ -240,7 +240,7 @@ void down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); diff --git a/arch/sh/config.in b/arch/sh/config.in index f0a51f8d6..0bd1cf4bb 100644 --- a/arch/sh/config.in +++ b/arch/sh/config.in @@ -66,6 +66,8 @@ mainmenu_option next_comment comment 'General setup' define_bool CONFIG_ISA n +define_bool CONFIG_EISA n +define_bool CONFIG_MCA n define_bool CONFIG_SBUS n bool 'Networking support' CONFIG_NET diff --git a/arch/sh/kernel/semaphore.c b/arch/sh/kernel/semaphore.c index 990960aa8..7cdda223c 100644 --- a/arch/sh/kernel/semaphore.c +++ b/arch/sh/kernel/semaphore.c @@ -195,7 +195,7 @@ struct rw_semaphore *down_write_failed_biased(struct rw_semaphore *sem) for (;;) { if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!sem->write_bias_granted) schedule(); } @@ -251,7 +251,7 @@ struct rw_semaphore *down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (atomic_read(&sem->count) < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (atomic_read(&sem->count) >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); diff --git a/arch/sparc/config.in b/arch/sparc/config.in index cb615fa0b..1a75cdf17 100644 --- a/arch/sparc/config.in +++ b/arch/sparc/config.in @@ -1,4 +1,4 @@ -# $Id: config.in,v 1.104 2000/10/04 09:01:38 anton Exp $ +# $Id: config.in,v 1.105 2000/11/12 10:01:41 davem Exp $ # For a description of the syntax of this configuration file, # see Documentation/kbuild/config-language.txt. # @@ -31,6 +31,8 @@ bool 'Symmetric multi-processing support (does not work on sun4/sun4c)' CONFIG_S # Global things across all Sun machines. define_bool CONFIG_ISA n +define_bool CONFIG_EISA n +define_bool CONFIG_MCA n define_bool CONFIG_PCMCIA n define_bool CONFIG_SBUS y define_bool CONFIG_SBUSCHAR y diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c index f61be9932..00c465b10 100644 --- a/arch/sparc/kernel/ebus.c +++ b/arch/sparc/kernel/ebus.c @@ -1,4 +1,4 @@ -/* $Id: ebus.c,v 1.11 2000/10/10 01:07:38 davem Exp $ +/* $Id: ebus.c,v 1.15 2000/11/08 05:06:21 davem Exp $ * ebus.c: PCI to EBus bridge device. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -24,18 +24,9 @@ struct linux_ebus *ebus_chain = 0; -#ifdef CONFIG_SUN_OPENPROMIO -extern int openprom_init(void); -#endif #ifdef CONFIG_SUN_AUXIO extern void auxio_probe(void); #endif -#ifdef CONFIG_OBP_FLASH -extern int flash_init(void); -#endif -#ifdef CONFIG_ENVCTRL -extern int envctrl_init(void); -#endif /* We are together with pcic.c under CONFIG_PCI. */ extern unsigned int pcic_pin_to_irq(unsigned int, char *name); @@ -367,20 +358,7 @@ void __init ebus_init(void) ++num_ebus; } -#ifdef CONFIG_SUN_OPENPROMIO - openprom_init(); -#endif - -#ifdef CONFIG_SUN_BPP - bpp_init(); -#endif #ifdef CONFIG_SUN_AUXIO auxio_probe(); #endif -#ifdef CONFIG_ENVCTRL - envctrl_init(); -#endif -#ifdef CONFIG_OBP_FLASH - flash_init(); -#endif } diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 028612687..e7b4e96de 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c @@ -1,4 +1,4 @@ -/* $Id: pcic.c,v 1.18 2000/09/25 06:09:12 anton Exp $ +/* $Id: pcic.c,v 1.19 2000/11/08 04:49:17 davem Exp $ * pcic.c: Sparc/PCI controller support * * Copyright (C) 1998 V. Roganov and G. Raiko @@ -866,23 +866,6 @@ void pcibios_update_resource(struct pci_dev *pdev, struct resource *res1, { } -#if 0 -void pcibios_update_irq(struct pci_dev *pdev, int irq) -{ -} - -unsigned long resource_fixup(struct pci_dev *pdev, struct resource *res, - unsigned long start, unsigned long size) -{ - return start; -} - -void pcibios_fixup_pbus_ranges(struct pci_bus *pbus, - struct pbus_set_ranges_data *pranges) -{ -} -#endif - void pcibios_align_resource(void *data, struct resource *res, unsigned long size) { } diff --git a/arch/sparc/kernel/semaphore.c b/arch/sparc/kernel/semaphore.c index 4359ec232..d6638be10 100644 --- a/arch/sparc/kernel/semaphore.c +++ b/arch/sparc/kernel/semaphore.c @@ -1,4 +1,4 @@ -/* $Id: semaphore.c,v 1.3 2000/10/14 10:09:00 davem Exp $ +/* $Id: semaphore.c,v 1.4 2000/11/10 04:02:03 davem Exp $ * Generic semaphore code. Buyer beware. Do your own * specific changes in <asm/semaphore-helper.h> */ @@ -166,7 +166,7 @@ void down_write_failed_biased(struct rw_semaphore *sem) for (;;) { if (!ldstub(&sem->write_not_granted)) break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (sem->write_not_granted) schedule(); } @@ -216,7 +216,7 @@ void down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (sem->count < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (sem->count >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index 9cbbb1c9c..85161a3a6 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.94 2000/10/19 00:49:51 davem Exp $ +/* $Id: init.c,v 1.95 2000/11/10 04:49:56 davem Exp $ * linux/arch/sparc/mm/init.c * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -579,8 +579,7 @@ void si_meminfo(struct sysinfo *val) void flush_page_to_ram(struct page *page) { - unsigned long vaddr; - vaddr = kmap(page); - __flush_page_to_ram((unsigned long)page_address(page)); + unsigned long vaddr = (unsigned long) kmap(page); + __flush_page_to_ram(vaddr); kunmap(page); } diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index a91809d03..b32199c13 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -1,4 +1,4 @@ -/* $Id: srmmu.c,v 1.223 2000/10/16 14:32:49 anton Exp $ +/* $Id: srmmu.c,v 1.224 2000/11/09 22:40:05 davem Exp $ * srmmu.c: SRMMU specific routines for memory management. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -1163,7 +1163,7 @@ extern int linux_num_cpus; void (*poke_srmmu)(void) __initdata = NULL; -extern unsigned long bootmem_init(void); +extern void bootmem_init(void); extern void sun_serial_setup(void); void __init srmmu_paging_init(void) diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index a416ecf19..edba89672 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -1,4 +1,4 @@ -/* $Id: sun4c.c,v 1.200 2000/10/16 14:32:49 anton Exp $ +/* $Id: sun4c.c,v 1.201 2000/11/09 22:39:36 davem Exp $ * sun4c.c: Doing in software what should be done in hardware. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -2509,7 +2509,7 @@ void sun4c_update_mmu_cache(struct vm_area_struct *vma, unsigned long address, p extern void sparc_context_init(int); extern unsigned long end; -extern unsigned long bootmem_init(void); +extern void bootmem_init(void); extern unsigned long last_valid_pfn; extern void sun_serial_setup(void); @@ -2524,7 +2524,8 @@ void __init sun4c_paging_init(void) kernel_end += (SUN4C_REAL_PGDIR_SIZE * 4); kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end); - last_valid_pfn = end_pfn = bootmem_init(); + bootmem_init(); + end_pfn = last_valid_pfn; /* This does not logically belong here, but we need to * call it at the moment we are able to use the bootmem diff --git a/arch/sparc/vmlinux.lds b/arch/sparc/vmlinux.lds index bba19d4c5..e449e26fa 100644 --- a/arch/sparc/vmlinux.lds +++ b/arch/sparc/vmlinux.lds @@ -31,6 +31,9 @@ SECTIONS __start___ksymtab = .; __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; + __start___kallsyms = .; /* All kernel symbols */ + __kallsyms : { *(__kallsyms) } + __stop___kallsyms = .; . = ALIGN(4096); __init_begin = .; diff --git a/arch/sparc64/config.in b/arch/sparc64/config.in index a754b796b..19b05e28f 100644 --- a/arch/sparc64/config.in +++ b/arch/sparc64/config.in @@ -29,6 +29,8 @@ bool 'Symmetric multi-processing support' CONFIG_SMP # Global things across all Sun machines. define_bool CONFIG_HAVE_DEC_LOCK y define_bool CONFIG_ISA n +define_bool CONFIG_EISA n +define_bool CONFIG_MCA n define_bool CONFIG_PCMCIA n define_bool CONFIG_SBUS y define_bool CONFIG_SBUSCHAR y diff --git a/arch/sparc64/kernel/dtlb_base.S b/arch/sparc64/kernel/dtlb_base.S index 72120b563..80c74aa18 100644 --- a/arch/sparc64/kernel/dtlb_base.S +++ b/arch/sparc64/kernel/dtlb_base.S @@ -1,4 +1,4 @@ -/* $Id: dtlb_base.S,v 1.7 2000/03/26 09:13:48 davem Exp $ +/* $Id: dtlb_base.S,v 1.8 2000/11/10 08:28:45 davem Exp $ * dtlb_base.S: Front end to DTLB miss replacement strategy. * This is included directly into the trap table. * @@ -57,7 +57,7 @@ srax %g4, VPTE_SHIFT, %g6 ! Create VPTE offset ldxa [%g3 + %g6] ASI_S, %g5 ! Load VPTE 1: brlz,pt %g5, 9f ! Valid, load into TLB - and %g5, (_PAGE_PRESENT|_PAGE_READ), %g4 ! Mask readable bits + nop ! Delay-slot ba,a,pt %xcc, 4f ! Invalid, branch out /* DTLB ** ICACHE line 2: Quick kernel TLB misses */ @@ -68,27 +68,27 @@ nop 9: stxa %g5, [%g0] ASI_DTLB_DATA_IN ! Reload TLB retry ! Trap return - nop +4: rdpr %pstate, %g5 ! Move into alternate globals /* DTLB ** ICACHE line 3: winfixups+real_faults */ -4: cmp %g4, (_PAGE_PRESENT|_PAGE_READ) ! Readable page? - be,pn %xcc, 5f ! Yep, refbit update - sllx %g1, 60, %g4 ! Get valid bit - rdpr %pstate, %g5 ! Move into alternate globals wrpr %g5, PSTATE_AG|PSTATE_MG, %pstate rdpr %tl, %g4 ! See where we came from. cmp %g4, 1 ! Is etrap/rtrap window fault? mov TLB_TAG_ACCESS, %g4 ! Prepare for fault processing - -/* DTLB ** ICACHE line 4: padding */ ldxa [%g4] ASI_DMMU, %g5 ! Load faulting VA page be,pt %xcc, sparc64_realfault_common ! Jump to normal fault handling mov FAULT_CODE_DTLB, %g4 ! It was read from DTLB ba,a,pt %xcc, winfix_trampoline ! Call window fixup code -5: or %g5, _PAGE_ACCESSED, %g5 ! Indicate reference - or %g5, %g4, %g5 ! Set valid - stxa %g5, [%g3 + %g6] ASI_S ! Update PTE table (cant trap) - ba,a,pt %xcc, 9b ! Complete tlb miss + +/* DTLB ** ICACHE line 4: Unused... */ + nop + nop + nop + nop + nop + nop + nop + nop #undef TAG_CONTEXT_BITS #undef VPTE_SHIFT diff --git a/arch/sparc64/kernel/dtlb_prot.S b/arch/sparc64/kernel/dtlb_prot.S index 5e99d5d47..1da370c7c 100644 --- a/arch/sparc64/kernel/dtlb_prot.S +++ b/arch/sparc64/kernel/dtlb_prot.S @@ -1,4 +1,4 @@ -/* $Id: dtlb_prot.S,v 1.20 2000/03/26 09:13:48 davem Exp $ +/* $Id: dtlb_prot.S,v 1.21 2000/11/10 08:28:45 davem Exp $ * dtlb_prot.S: DTLB protection trap strategy. * This is included directly into the trap table. * @@ -6,10 +6,6 @@ * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz) */ -#define TAG_CONTEXT_BITS 0x3ff -#define VPTE_SHIFT (PAGE_SHIFT - 3) -#define MODIFIED_BITS (_PAGE_WRITE | _PAGE_W | _PAGE_MODIFIED | _PAGE_ACCESSED) - /* Ways we can get here: * * [TL == 0] 1) User stores to readonly pages. @@ -18,45 +14,41 @@ */ /* PROT ** ICACHE line 1: User DTLB protection trap */ - ldxa [%g1] ASI_DMMU, %g6 ! Primary or Secondary ctx? - and %g6, 0x10, %g6 ! Get pri/sec ctx bit stxa %g0, [%g1] ASI_DMMU ! Clear SFSR FaultValid bit membar #Sync ! Synchronize ASI stores - ldxa [%g1 + %g1] ASI_DMMU, %g4 ! Load TAG_ACCESS - andn %g4, TAG_CONTEXT_BITS, %g4 ! Clear CTX bits - stxa %g0, [%g4 + %g6] ASI_DMMU_DEMAP ! Perform TLB flush of page - membar #Sync ! Synchronize ASI stores - -/* PROT ** ICACHE line 2: Further normal processing */ - srax %g4, VPTE_SHIFT, %g6 ! Compute VPTE offset - ldxa [%g3 + %g6] ASI_S, %g5 ! Load PTE entry - andcc %g5, _PAGE_WRITE, %g0 ! Writable page? - be,pt %xcc, 1f ! Nope, real fault - or %g5, (MODIFIED_BITS), %g5 ! Mark as writable/modified - stxa %g5, [%g3 + %g6] ASI_S ! Update PTE entry - stxa %g5, [%g0] ASI_DTLB_DATA_IN ! Load PTE into TLB - retry ! Trap return - -/* PROT ** ICACHE line 3: Real user faults */ -1: rdpr %pstate, %g5 ! Move into alternate globals + rdpr %pstate, %g5 ! Move into alternate globals wrpr %g5, PSTATE_AG|PSTATE_MG, %pstate rdpr %tl, %g1 ! Need to do a winfixup? cmp %g1, 1 ! Trap level >1? mov TLB_TAG_ACCESS, %g4 ! Prepare reload of vaddr + nop + +/* PROT ** ICACHE line 2: More real fault processing */ bgu,pn %xcc, winfix_trampoline ! Yes, perform winfixup ldxa [%g4] ASI_DMMU, %g5 ! Put tagaccess in %g5 ba,pt %xcc, sparc64_realfault_common ! Nope, normal fault - -/* PROT ** ICACHE line 4: More real fault processing */ mov FAULT_CODE_DTLB | FAULT_CODE_WRITE, %g4 nop nop nop nop + +/* PROT ** ICACHE line 3: Unused... */ + nop + nop + nop + nop + nop nop nop nop -#undef TAG_CONTEXT_BITS -#undef VPTE_SHIFT -#undef MODIFIED_BITS +/* PROT ** ICACHE line 3: Unused... */ + nop + nop + nop + nop + nop + nop + nop + nop diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index 5872046b1..e175fac27 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c @@ -1,4 +1,4 @@ -/* $Id: ebus.c,v 1.48 2000/08/02 06:22:35 davem Exp $ +/* $Id: ebus.c,v 1.53 2000/11/08 05:08:23 davem Exp $ * ebus.c: PCI to EBus bridge device. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -22,21 +22,9 @@ struct linux_ebus *ebus_chain = 0; -#ifdef CONFIG_SUN_OPENPROMIO -extern int openprom_init(void); -#endif #ifdef CONFIG_SUN_AUXIO extern void auxio_probe(void); #endif -#ifdef CONFIG_OBP_FLASH -extern int flash_init(void); -#endif -#ifdef CONFIG_ENVCTRL -extern int envctrl_init(void); -#endif -#ifdef CONFIG_DISPLAY7SEG -extern int d7s_init(void); -#endif static inline void *ebus_alloc(size_t size) { @@ -372,24 +360,9 @@ void __init ebus_init(void) ++num_ebus; } -#ifdef CONFIG_SUN_OPENPROMIO - openprom_init(); -#endif -#ifdef CONFIG_SUN_BPP - bpp_init(); -#endif #ifdef CONFIG_SUN_AUXIO auxio_probe(); #endif -#ifdef CONFIG_ENVCTRL - envctrl_init(); -#endif -#ifdef CONFIG_OBP_FLASH - flash_init(); -#endif -#ifdef CONFIG_DISPLAY7SEG - d7s_init(); -#endif clock_probe(); power_init(); } diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c index 9f7cd59e9..a510c2aff 100644 --- a/arch/sparc64/kernel/ioctl32.c +++ b/arch/sparc64/kernel/ioctl32.c @@ -1,4 +1,4 @@ -/* $Id: ioctl32.c,v 1.99 2000/10/17 16:20:33 davem Exp $ +/* $Id: ioctl32.c,v 1.103 2000/11/10 05:44:33 davem Exp $ * ioctl32.c: Conversion between 32bit and 64bit native ioctls. * * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) @@ -71,8 +71,9 @@ #include <asm/openpromio.h> #include <asm/envctrl.h> #include <asm/audioio.h> -#include <asm/ethtool.h> +#include <linux/ethtool.h> #include <asm/display7seg.h> +#include <asm/module.h> #include <linux/soundcard.h> #include <linux/atm.h> @@ -3230,6 +3231,7 @@ COMPATIBLE_IOCTL(ENVCTRL_RD_SCSI_TEMPERATURE) COMPATIBLE_IOCTL(ENVCTRL_RD_ETHERNET_TEMPERATURE) COMPATIBLE_IOCTL(ENVCTRL_RD_MTHRBD_TEMPERATURE) COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_VOLTAGE) +COMPATIBLE_IOCTL(ENVCTRL_RD_GLOBALADDRESS) /* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */ COMPATIBLE_IOCTL(D7SIOCWR) COMPATIBLE_IOCTL(D7SIOCTM) @@ -3467,6 +3469,14 @@ COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN) COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1) COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2) COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1)) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2)) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3)) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN)) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT)) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO)) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO)) +COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR)) COMPATIBLE_IOCTL(SOUND_MIXER_READ_MUTE) /* SOUND_MIXER_READ_ENHANCE, same value as READ_MUTE */ /* SOUND_MIXER_READ_LOUD, same value as READ_MUTE */ @@ -3492,6 +3502,14 @@ COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN) COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1) COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2) COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1)) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2)) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3)) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN)) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT)) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO)) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO)) +COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR)) COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE) /* SOUND_MIXER_WRITE_ENHANCE, same value as WRITE_MUTE */ /* SOUND_MIXER_WRITE_LOUD, same value as WRITE_MUTE */ diff --git a/arch/sparc64/kernel/itlb_base.S b/arch/sparc64/kernel/itlb_base.S index 7f0da3d14..bd6a3603d 100644 --- a/arch/sparc64/kernel/itlb_base.S +++ b/arch/sparc64/kernel/itlb_base.S @@ -1,4 +1,4 @@ -/* $Id: itlb_base.S,v 1.9 2000/03/26 09:13:48 davem Exp $ +/* $Id: itlb_base.S,v 1.10 2000/11/10 08:28:45 davem Exp $ * itlb_base.S: Front end to ITLB miss replacement strategy. * This is included directly into the trap table. * @@ -23,22 +23,13 @@ srax %g4, VPTE_SHIFT, %g6 ! Create VPTE offset ldxa [%g3 + %g6] ASI_P, %g5 ! Load VPTE 1: brgez,pn %g5, 3f ! Not valid, branch out - and %g5, (_PAGE_PRESENT|_PAGE_READ), %g4 ! Mask readable bits + nop ! Delay-slot 2: stxa %g5, [%g0] ASI_ITLB_DATA_IN ! Load PTE into TLB retry ! Trap return -3: cmp %g4, (_PAGE_PRESENT|_PAGE_READ) ! Readable page? +3: rdpr %pstate, %g4 ! Move into alternate globals -/* ITLB ** ICACHE line 2: Quick user ref updates */ - bne,pn %xcc, 4f ! Nope, real missing page - sllx %g1, 60, %g4 ! Sliiickkk... - or %g5, _PAGE_ACCESSED, %g5 ! Mark as touched - or %g5, %g4, %g5 ! Allow user to see it - ba,pt %xcc, 2b ! Branch to load TLB - stxa %g5, [%g3 + %g6] ASI_S ! Update PTE table -4: rdpr %pstate, %g4 ! Move into alternate globals +/* ITLB ** ICACHE line 2: Real faults */ wrpr %g4, PSTATE_AG|PSTATE_MG, %pstate - -/* ITLB ** ICACHE line 3: Real faults */ rdpr %tpc, %g5 ! And load faulting VA mov FAULT_CODE_ITLB, %g4 ! It was read from ITLB sparc64_realfault_common: ! Called by TL0 dtlb_miss too @@ -46,10 +37,11 @@ sparc64_realfault_common: ! Called by TL0 dtlb_miss too stx %g5, [%g6 + AOFF_task_thread + AOFF_thread_fault_address] ba,pt %xcc, etrap ! Save state 1: rd %pc, %g7 ! ... + nop + +/* ITLB ** ICACHE line 3: Finish faults + window fixups */ call do_sparc64_fault ! Call fault handler add %sp, STACK_BIAS + REGWIN_SZ, %o0! Compute pt_regs arg - -/* ITLB ** ICACHE line 4: Finish faults + window fixups */ ba,pt %xcc, rtrap_clr_l6 ! Restore cpu state nop winfix_trampoline: @@ -57,6 +49,14 @@ winfix_trampoline: or %g3, 0x7c, %g3 ! Compute offset to branch wrpr %g3, %tnpc ! Write it into TNPC done ! Do it to it + +/* ITLB ** ICACHE line 4: Unused... */ + nop + nop + nop + nop + nop + nop nop nop diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index dd153a24e..1abef824f 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -1,4 +1,4 @@ -/* $Id: pci.c,v 1.18 2000/10/03 11:31:42 anton Exp $ +/* $Id: pci.c,v 1.19 2000/11/08 04:49:17 davem Exp $ * pci.c: UltraSparc PCI controller support. * * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com) @@ -202,12 +202,6 @@ void pcibios_update_irq(struct pci_dev *pdev, int irq) { } -unsigned long resource_fixup(struct pci_dev *pdev, struct resource *res, - unsigned long start, unsigned long size) -{ - return start; -} - void pcibios_fixup_pbus_ranges(struct pci_bus *pbus, struct pbus_set_ranges_data *pranges) { diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 1f3386d53..4534ad59b 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.112 2000/09/06 00:45:01 davem Exp $ +/* $Id: process.c,v 1.113 2000/11/08 08:14:58 davem Exp $ * arch/sparc64/kernel/process.c * * Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) @@ -647,14 +647,21 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) { long retval; - __asm__ __volatile("mov %1, %%g1\n\t" + /* If the parent runs before fn(arg) is called by the child, + * the input registers of this function can be clobbered. + * So we stash 'fn' and 'arg' into global registers which + * will not be modified by the parent. + */ + __asm__ __volatile("mov %4, %%g2\n\t" /* Save FN into global */ + "mov %5, %%g3\n\t" /* Save ARG into global */ + "mov %1, %%g1\n\t" /* Clone syscall nr. */ "mov %2, %%o0\n\t" /* Clone flags. */ "mov 0, %%o1\n\t" /* usp arg == 0 */ "t 0x6d\n\t" /* Linux/Sparc clone(). */ "brz,a,pn %%o1, 1f\n\t" /* Parent, just return. */ " mov %%o0, %0\n\t" - "jmpl %4, %%o7\n\t" /* Call the function. */ - " mov %5, %%o0\n\t" /* Set arg in delay. */ + "jmpl %%g2, %%o7\n\t" /* Call the function. */ + " mov %%g3, %%o0\n\t" /* Set arg in delay. */ "mov %3, %%g1\n\t" "t 0x6d\n\t" /* Linux/Sparc exit(). */ /* Notreached by child. */ @@ -662,7 +669,7 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) "=r" (retval) : "i" (__NR_clone), "r" (flags | CLONE_VM), "i" (__NR_exit), "r" (fn), "r" (arg) : - "g1", "o0", "o1", "memory", "cc"); + "g1", "g2", "g3", "o0", "o1", "memory", "cc"); return retval; } diff --git a/arch/sparc64/kernel/semaphore.c b/arch/sparc64/kernel/semaphore.c index 8cb6e7211..1928d5a0d 100644 --- a/arch/sparc64/kernel/semaphore.c +++ b/arch/sparc64/kernel/semaphore.c @@ -1,4 +1,4 @@ -/* $Id: semaphore.c,v 1.4 2000/10/14 10:09:00 davem Exp $ +/* $Id: semaphore.c,v 1.5 2000/11/10 04:02:03 davem Exp $ * Generic semaphore code. Buyer beware. Do your own * specific changes in <asm/semaphore-helper.h> */ @@ -223,7 +223,7 @@ void down_write_failed_biased(struct rw_semaphore *sem) for (;;) { if (test_and_clear_le_bit(1, &sem->granted)) break; - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (!test_le_bit(1, &sem->granted)) schedule(); } @@ -273,7 +273,7 @@ void down_write_failed(struct rw_semaphore *sem) add_wait_queue_exclusive(&sem->wait, &wait); while (sem->count < 0) { - set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); + set_task_state(tsk, TASK_UNINTERRUPTIBLE); if (sem->count >= 0) break; /* we must attempt to acquire or bias the lock */ schedule(); diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 6e7f59309..e1ae982bf 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -1,4 +1,4 @@ -/* $Id: sparc64_ksyms.c,v 1.95 2000/10/30 21:01:40 davem Exp $ +/* $Id: sparc64_ksyms.c,v 1.98 2000/11/13 10:03:32 davem Exp $ * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -87,7 +87,6 @@ extern long sparc32_open(const char * filename, int flags, int mode); extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *)); extern int unregister_ioctl32_conversion(unsigned int cmd); extern int io_remap_page_range(unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space); -extern void __flush_dcache_page(void *addr); extern int __ashrdi3(int, int); @@ -110,25 +109,14 @@ extern void _do_write_unlock(rwlock_t *rw); extern unsigned long phys_base; -/* One thing to note is that the way the symbols of the mul/div - * support routines are named is a mess, they all start with - * a '.' which makes it a bitch to export, here is the trick: - */ - -#define EXPORT_SYMBOL_PRIVATE(sym) \ -extern int __sparc_priv_ ## sym (int) __asm__("__" #sym); \ -const struct module_symbol __export_priv_##sym \ -__attribute__((section("__ksymtab"))) = \ -{ (unsigned long) &__sparc_priv_ ## sym, "__" #sym } - /* used by various drivers */ #ifdef CONFIG_SMP #ifndef SPIN_LOCK_DEBUG /* Out of line rw-locking implementation. */ -EXPORT_SYMBOL_PRIVATE(read_lock); -EXPORT_SYMBOL_PRIVATE(read_unlock); -EXPORT_SYMBOL_PRIVATE(write_lock); -EXPORT_SYMBOL_PRIVATE(write_unlock); +EXPORT_SYMBOL(__read_lock); +EXPORT_SYMBOL(__read_unlock); +EXPORT_SYMBOL(__write_lock); +EXPORT_SYMBOL(__write_unlock); #endif /* Kernel wide locking */ @@ -137,10 +125,10 @@ EXPORT_SYMBOL(kernel_flag); /* Hard IRQ locking */ EXPORT_SYMBOL(global_irq_holder); EXPORT_SYMBOL(synchronize_irq); -EXPORT_SYMBOL_PRIVATE(global_cli); -EXPORT_SYMBOL_PRIVATE(global_sti); -EXPORT_SYMBOL_PRIVATE(global_save_flags); -EXPORT_SYMBOL_PRIVATE(global_restore_flags); +EXPORT_SYMBOL(__global_cli); +EXPORT_SYMBOL(__global_sti); +EXPORT_SYMBOL(__global_save_flags); +EXPORT_SYMBOL(__global_restore_flags); /* Per-CPU information table */ EXPORT_SYMBOL(cpu_data); @@ -163,27 +151,33 @@ EXPORT_SYMBOL(_do_write_unlock); #endif +/* semaphores */ +EXPORT_SYMBOL(__down); +EXPORT_SYMBOL(__down_interruptible); +EXPORT_SYMBOL(__down_trylock); +EXPORT_SYMBOL(__up); + /* rw semaphores */ EXPORT_SYMBOL_NOVERS(__down_read_failed); EXPORT_SYMBOL_NOVERS(__down_write_failed); EXPORT_SYMBOL_NOVERS(__rwsem_wake); /* Atomic counter implementation. */ -EXPORT_SYMBOL_PRIVATE(atomic_add); -EXPORT_SYMBOL_PRIVATE(atomic_sub); +EXPORT_SYMBOL(__atomic_add); +EXPORT_SYMBOL(__atomic_sub); /* Atomic bit operations. */ -EXPORT_SYMBOL_PRIVATE(test_and_set_bit); -EXPORT_SYMBOL_PRIVATE(test_and_clear_bit); -EXPORT_SYMBOL_PRIVATE(test_and_change_bit); -EXPORT_SYMBOL_PRIVATE(test_and_set_le_bit); -EXPORT_SYMBOL_PRIVATE(test_and_clear_le_bit); +EXPORT_SYMBOL(__test_and_set_bit); +EXPORT_SYMBOL(__test_and_clear_bit); +EXPORT_SYMBOL(__test_and_change_bit); +EXPORT_SYMBOL(__test_and_set_le_bit); +EXPORT_SYMBOL(__test_and_clear_le_bit); EXPORT_SYMBOL(ivector_table); EXPORT_SYMBOL(enable_irq); EXPORT_SYMBOL(disable_irq); -EXPORT_SYMBOL_PRIVATE(flushw_user); +EXPORT_SYMBOL(__flushw_user); EXPORT_SYMBOL(__flush_dcache_page); diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 24c8cd593..9b211d86d 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -1,4 +1,4 @@ -/* $Id: sys_sparc32.c,v 1.165 2000/10/10 04:47:31 davem Exp $ +/* $Id: sys_sparc32.c,v 1.166 2000/11/10 04:49:56 davem Exp $ * sys_sparc32.c: Conversion between 32bit and 64bit native syscalls. * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -2952,7 +2952,7 @@ static int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) return -ENOMEM; new = 1; } - kaddr = (char *)kmap(page); + kaddr = kmap(page); if (new && offset) memset(kaddr, 0, offset); @@ -2967,7 +2967,7 @@ static int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) err = copy_from_user(kaddr + offset, (char *)A(str), bytes_to_copy); flush_page_to_ram(page); - kunmap((unsigned long)kaddr); + kunmap(page); if (err) return -EFAULT; diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index 75d5c096e..a5f5411f5 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c @@ -601,7 +601,6 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) int try_port; int ret; struct socket *socket; - struct dentry *dentry; struct inode *inode; struct file *file; @@ -609,8 +608,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr) if(!file) return 0; - dentry = file->f_dentry; - inode = dentry->d_inode; + inode = file->f_dentry->d_inode; socket = &inode->u.socket_i; local.sin_family = AF_INET; diff --git a/arch/sparc64/lib/Makefile b/arch/sparc64/lib/Makefile index fa057936a..77531321d 100644 --- a/arch/sparc64/lib/Makefile +++ b/arch/sparc64/lib/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.23 2000/07/10 20:57:34 davem Exp $ +# $Id: Makefile,v 1.24 2000/11/01 07:33:47 davem Exp $ # Makefile for Sparc64 library files.. # @@ -8,7 +8,8 @@ OBJS = PeeCeeI.o blockops.o debuglocks.o strlen.o strncmp.o \ memscan.o strncpy_from_user.o strlen_user.o memcmp.o checksum.o \ VIScopy.o VISbzero.o VISmemset.o VIScsum.o VIScsumcopy.o \ VIScsumcopyusr.o VISsave.o atomic.o rwlock.o bitops.o \ - dec_and_lock.o + dec_and_lock.o U3memcpy.o U3copy_from_user.o U3copy_to_user.o \ + U3copy_in_user.o lib.a: $(OBJS) $(AR) rcs lib.a $(OBJS) diff --git a/arch/sparc64/lib/U3copy_from_user.S b/arch/sparc64/lib/U3copy_from_user.S new file mode 100644 index 000000000..b1003e607 --- /dev/null +++ b/arch/sparc64/lib/U3copy_from_user.S @@ -0,0 +1,500 @@ +/* $Id: U3copy_from_user.S,v 1.3 2000/11/01 09:29:19 davem Exp $ + * U3memcpy.S: UltraSparc-III optimized copy from userspace. + * + * Copyright (C) 1999, 2000 David S. Miller (davem@redhat.com) + */ + +#ifdef __KERNEL__ +#include <asm/visasm.h> +#include <asm/asi.h> +#undef SMALL_COPY_USES_FPU +#define EXNV(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + ba,pt %xcc, U3cfu_fixup; \ + a, b, %o1; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EX(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + ba,pt %xcc, U3cfu_fixup; \ + a, b, %o1; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EX2(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + and %o2, (0x40 - 1), %o1; \ + add %o1, %o4, %o1; \ + ba,pt %xcc, U3cfu_fixup; \ + add %o1, 0x1c0, %o1; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EX3(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + and %o2, (0x40 - 1), %o1; \ + sll %g3, 6, %g3; \ + add %o1, 0x80, %o1; \ + ba,pt %xcc, U3cfu_fixup; \ + add %o1, %g3, %o1; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EX4(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + and %o2, (0x40 - 1), %o1; \ + add %o1, 0x40, %o1; \ + ba,pt %xcc, U3cfu_fixup; \ + add %o1, %g3, %o1; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#else +#define ASI_BLK_P 0xf0 +#define FPRS_FEF 0x04 +#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs +#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs +#define SMALL_COPY_USES_FPU +#define EXNV(x,y,a,b) x,y; +#define EX(x,y,a,b) x,y; +#define EX2(x,y) x,y; +#define EX3(x,y) x,y; +#define EX4(x,y) x,y; +#endif + + /* Special/non-trivial issues of this code: + * + * 1) %o5 is preserved from VISEntryHalf to VISExitHalf + * 2) Only low 32 FPU registers are used so that only the + * lower half of the FPU register set is dirtied by this + * code. This is especially important in the kernel. + * 3) This code never prefetches cachelines past the end + * of the source buffer. + */ + + .text + .align 32 + + /* The cheetah's flexible spine, oversized liver, enlarged heart, + * slender muscular body, and claws make it the swiftest hunter + * in Africa and the fastest animal on land. Can reach speeds + * of up to 2.4GB per second. + */ + + .globl U3copy_from_user +U3copy_from_user: /* %o0=dst, %o1=src, %o2=len */ +#ifndef __KERNEL__ + /* Save away original 'dst' for memcpy return value. */ + mov %o0, %g3 ! A0 Group +#endif + /* Anything to copy at all? */ + cmp %o2, 0 ! A1 + ble,pn %icc, U3copy_from_user_short_ret! BR + + /* Extremely small copy? */ + cmp %o2, 31 ! A0 Group + ble,pn %icc, U3copy_from_user_short ! BR + + /* Large enough to use unrolled prefetch loops? */ + cmp %o2, 0x100 ! A1 + bge,a,pt %icc, U3copy_from_user_enter ! BR Group + andcc %o0, 0x3f, %g2 ! A0 + + ba,pt %xcc, U3copy_from_user_toosmall ! BR Group + andcc %o0, 0x7, %g2 ! A0 + + .align 32 +U3copy_from_user_short: + /* Copy %o2 bytes from src to dst, one byte at a time. */ + EXNV(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g0)! MS Group + add %o1, 0x1, %o1 ! A0 + add %o0, 0x1, %o0 ! A1 + subcc %o2, 1, %o2 ! A0 Group + + bg,pt %icc, U3copy_from_user_short ! BR + stb %o3, [%o0 + -1] ! MS Group (1-cycle stall) + +U3copy_from_user_short_ret: +#ifdef __KERNEL__ + retl ! BR Group (0-4 cycle stall) + clr %o0 ! A0 +#else + retl ! BR Group (0-4 cycle stall) + mov %g3, %o0 ! A0 +#endif + + /* Here len >= (6 * 64) and condition codes reflect execution + * of "andcc %o0, 0x7, %g2", done by caller. + */ + .align 64 +U3copy_from_user_enter: + /* Is 'dst' already aligned on an 64-byte boundary? */ + be,pt %xcc, 2f ! BR + + /* Compute abs((dst & 0x3f) - 0x40) into %g2. This is the number + * of bytes to copy to make 'dst' 64-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x40, %g2 ! A0 Group + sub %g0, %g2, %g2 ! A0 Group + sub %o2, %g2, %o2 ! A0 Group + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: EXNV(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g2)! MS (Group) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + stb %o3, [%o0 + -1] ! MS Group + +2: VISEntryHalf ! MS+MS + and %o1, 0x7, %g1 ! A1 + ba,pt %xcc, U3copy_from_user_begin ! BR + alignaddr %o1, %g0, %o1 ! MS (Break-after) + + .align 64 +U3copy_from_user_begin: + prefetcha [%o1 + 0x000] %asi, #one_read ! MS Group1 + prefetcha [%o1 + 0x040] %asi, #one_read ! MS Group2 + andn %o2, (0x40 - 1), %o4 ! A0 + prefetcha [%o1 + 0x080] %asi, #one_read ! MS Group3 + cmp %o4, 0x140 ! A0 + prefetcha [%o1 + 0x0c0] %asi, #one_read ! MS Group4 + EX(ldda [%o1 + 0x000] %asi, %f0, add %o2, %g0) ! MS Group5 (%f0 results at G8) + bge,a,pt %icc, 1f ! BR + + prefetcha [%o1 + 0x100] %asi, #one_read ! MS Group6 +1: EX(ldda [%o1 + 0x008] %asi, %f2, add %o2, %g0) ! AX (%f2 results at G9) + cmp %o4, 0x180 ! A1 + bge,a,pt %icc, 1f ! BR + prefetcha [%o1 + 0x140] %asi, #one_read ! MS Group7 +1: EX(ldda [%o1 + 0x010] %asi, %f4, add %o2, %g0) ! AX (%f4 results at G10) + cmp %o4, 0x1c0 ! A1 + bge,a,pt %icc, 1f ! BR + + prefetcha [%o1 + 0x180] %asi, #one_read ! MS Group8 +1: faligndata %f0, %f2, %f16 ! FGA Group9 (%f16 at G12) + EX(ldda [%o1 + 0x018] %asi, %f6, add %o2, %g0) ! AX (%f6 results at G12) + faligndata %f2, %f4, %f18 ! FGA Group10 (%f18 results at G13) + EX(ldda [%o1 + 0x020] %asi, %f8, add %o2, %g0) ! MS (%f8 results at G13) + faligndata %f4, %f6, %f20 ! FGA Group12 (1-cycle stall,%f20 at G15) + EX(ldda [%o1 + 0x028] %asi, %f10, add %o2, %g0) ! MS (%f10 results at G15) + faligndata %f6, %f8, %f22 ! FGA Group13 (%f22 results at G16) + + EX(ldda [%o1 + 0x030] %asi, %f12, add %o2, %g0) ! MS (%f12 results at G16) + faligndata %f8, %f10, %f24 ! FGA Group15 (1-cycle stall,%f24 at G18) + EX(ldda [%o1 + 0x038] %asi, %f14, add %o2, %g0) ! MS (%f14 results at G18) + faligndata %f10, %f12, %f26 ! FGA Group16 (%f26 results at G19) + EX(ldda [%o1 + 0x040] %asi, %f0, add %o2, %g0) ! MS (%f0 results at G19) + + /* We only use the first loop if len > (7 * 64). */ + subcc %o4, 0x1c0, %o4 ! A0 Group17 + bg,pt %icc, U3copy_from_user_loop1 ! BR + add %o1, 0x40, %o1 ! A1 + + add %o4, 0x140, %o4 ! A0 Group18 + ba,pt %xcc, U3copy_from_user_loop2 ! BR + srl %o4, 6, %o3 ! A0 Group19 + nop + nop + nop + nop + nop + + nop + nop + + /* This loop performs the copy and queues new prefetches. + * We drop into the second loop when len <= (5 * 64). Note + * that this (5 * 64) factor has been subtracted from len + * already. + */ +U3copy_from_user_loop1: + EX2(ldda [%o1 + 0x008] %asi, %f2) ! MS Group2 (%f2 results at G5) + faligndata %f12, %f14, %f28 ! FGA (%f28 results at G5) + EX2(ldda [%o1 + 0x010] %asi, %f4) ! MS Group3 (%f4 results at G6) + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall, %f30 at G7) + stda %f16, [%o0] ASI_BLK_P ! MS + EX2(ldda [%o1 + 0x018] %asi, %f6) ! AX (%f6 results at G7) + + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + EX2(ldda [%o1 + 0x020] %asi, %f8) ! MS (%f8 results at G15) + faligndata %f2, %f4, %f18 ! FGA Group13 (%f18 results at G16) + EX2(ldda [%o1 + 0x028] %asi, %f10) ! MS (%f10 results at G16) + faligndata %f4, %f6, %f20 ! FGA Group14 (%f20 results at G17) + EX2(ldda [%o1 + 0x030] %asi, %f12) ! MS (%f12 results at G17) + faligndata %f6, %f8, %f22 ! FGA Group15 (%f22 results at G18) + EX2(ldda [%o1 + 0x038] %asi, %f14) ! MS (%f14 results at G18) + + faligndata %f8, %f10, %f24 ! FGA Group16 (%f24 results at G19) + EX2(ldda [%o1 + 0x040] %asi, %f0) ! AX (%f0 results at G19) + prefetcha [%o1 + 0x180] %asi, #one_read ! MS + faligndata %f10, %f12, %f26 ! FGA Group17 (%f26 results at G20) + subcc %o4, 0x40, %o4 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3copy_from_user_loop1 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + +U3copy_from_user_loop2_enter: + mov 5, %o3 ! A1 + + /* This loop performs on the copy, no new prefetches are + * queued. We do things this way so that we do not perform + * any spurious prefetches past the end of the src buffer. + */ +U3copy_from_user_loop2: + EX3(ldda [%o1 + 0x008] %asi, %f2) ! MS + faligndata %f12, %f14, %f28 ! FGA Group2 + EX3(ldda [%o1 + 0x010] %asi, %f4) ! MS + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall) + stda %f16, [%o0] ASI_BLK_P ! MS + EX3(ldda [%o1 + 0x018] %asi, %f6) ! AX + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + + EX3(ldda [%o1 + 0x020] %asi, %f8) ! MS + faligndata %f2, %f4, %f18 ! FGA Group13 + EX3(ldda [%o1 + 0x028] %asi, %f10) ! MS + faligndata %f4, %f6, %f20 ! FGA Group14 + EX3(ldda [%o1 + 0x030] %asi, %f12) ! MS + faligndata %f6, %f8, %f22 ! FGA Group15 + EX3(ldda [%o1 + 0x038] %asi, %f14) ! MS + faligndata %f8, %f10, %f24 ! FGA Group16 + + EX3(ldda [%o1 + 0x040] %asi, %f0) ! AX + faligndata %f10, %f12, %f26 ! FGA Group17 + subcc %o3, 0x01, %o3 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3copy_from_user_loop2 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + + /* Finally we copy the last full 64-byte block. */ +U3copy_from_user_loopfini: + EX3(ldda [%o1 + 0x008] %asi, %f2) ! MS + faligndata %f12, %f14, %f28 ! FGA + EX3(ldda [%o1 + 0x010] %asi, %f4) ! MS Group19 + faligndata %f14, %f0, %f30 ! FGA + stda %f16, [%o0] ASI_BLK_P ! MS Group20 + EX3(ldda [%o1 + 0x018] %asi, %f6) ! AX + faligndata %f0, %f2, %f16 ! FGA Group11 (7-cycle stall) + EX3(ldda [%o1 + 0x020] %asi, %f8) ! MS + faligndata %f2, %f4, %f18 ! FGA Group12 + EX3(ldda [%o1 + 0x028] %asi, %f10) ! MS + faligndata %f4, %f6, %f20 ! FGA Group13 + EX3(ldda [%o1 + 0x030] %asi, %f12) ! MS + faligndata %f6, %f8, %f22 ! FGA Group14 + EX3(ldda [%o1 + 0x038] %asi, %f14) ! MS + faligndata %f8, %f10, %f24 ! FGA Group15 + cmp %g1, 0 ! A0 + be,pt %icc, 1f ! BR + add %o0, 0x40, %o0 ! A1 + EX4(ldda [%o1 + 0x040] %asi, %f0) ! MS +1: faligndata %f10, %f12, %f26 ! FGA Group16 + faligndata %f12, %f14, %f28 ! FGA Group17 + faligndata %f14, %f0, %f30 ! FGA Group18 + stda %f16, [%o0] ASI_BLK_P ! MS + add %o0, 0x40, %o0 ! A0 + add %o1, 0x40, %o1 ! A1 + membar #Sync ! MS Group26 (7-cycle stall) + + /* Now we copy the (len modulo 64) bytes at the end. + * Note how we borrow the %f0 loaded above. + * + * Also notice how this code is careful not to perform a + * load past the end of the src buffer just like similar + * code found in U3copy_from_user_toosmall processing. + */ +U3copy_from_user_loopend: + and %o2, 0x3f, %o2 ! A0 Group + andcc %o2, 0x38, %g2 ! A0 Group + be,pn %icc, U3copy_from_user_endcruft ! BR + subcc %g2, 0x8, %g2 ! A1 + be,pn %icc, U3copy_from_user_endcruft ! BR Group + cmp %g1, 0 ! A0 + + be,a,pt %icc, 1f ! BR Group + EX(ldda [%o1 + 0x00] %asi, %f0, add %o2, %g0) ! MS + +1: EX(ldda [%o1 + 0x08] %asi, %f2, add %o2, %g0) ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f0, %f2, %f8 ! FGA Group + std %f8, [%o0 + 0x00] ! MS (XXX does it stall here? XXX) + be,pn %icc, U3copy_from_user_endcruft ! BR + add %o0, 0x8, %o0 ! A0 + EX(ldda [%o1 + 0x08] %asi, %f0, add %o2, %g0) ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA + std %f8, [%o0 + 0x00] ! MS (XXX does it stall here? XXX) + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A0 Group + + /* If anything is left, we copy it one byte at a time. + * Note that %g1 is (src & 0x3) saved above before the + * alignaddr was performed. + */ +U3copy_from_user_endcruft: + cmp %o2, 0 + add %o1, %g1, %o1 + VISExitHalf + be,pn %icc, U3copy_from_user_short_ret + nop + ba,a,pt %xcc, U3copy_from_user_short + + /* If we get here, then 32 <= len < (6 * 64) */ +U3copy_from_user_toosmall: + +#ifdef SMALL_COPY_USES_FPU + + /* Is 'dst' already aligned on an 8-byte boundary? */ + be,pt %xcc, 2f ! BR Group + + /* Compute abs((dst & 7) - 8) into %g2. This is the number + * of bytes to copy to make 'dst' 8-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x8, %g2 ! A0 + sub %g0, %g2, %g2 ! A0 Group (reg-dep) + sub %o2, %g2, %o2 ! A0 Group (reg-dep) + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: EXNV(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g2)! MS (Group) (%o3 in 3 cycles) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + stb %o3, [%o0 + -1] ! MS Group + +2: VISEntryHalf ! MS+MS + + /* Compute (len - (len % 8)) into %g2. This is guarenteed + * to be nonzero. + */ + andn %o2, 0x7, %g2 ! A0 Group + + /* You may read this and believe that it allows reading + * one 8-byte longword past the end of src. It actually + * does not, as %g2 is subtracted as loads are done from + * src, so we always stop before running off the end. + * Also, we are guarenteed to have at least 0x10 bytes + * to move here. + */ + sub %g2, 0x8, %g2 ! A0 Group (reg-dep) + alignaddr %o1, %g0, %g1 ! MS (Break-after) + EX(ldda [%g1 + 0x00] %asi, %f0, add %o2, %g0) ! MS Group (1-cycle stall) + add %g1, 0x8, %g1 ! A0 + +1: EX(ldda [%g1 + 0x00] %asi, %f2, add %o2, %g0) ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + + faligndata %f0, %f2, %f8 ! FGA Group (1-cycle stall) + std %f8, [%o0 + 0x00] ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + be,pn %icc, 2f ! BR + + add %o0, 0x8, %o0 ! A1 + EX(ldda [%g1 + 0x00] %asi, %f0, add %o2, %g0) ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA Group (1-cycle stall) + std %f8, [%o0 + 0x00] ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A1 + + /* Nothing left to copy? */ +2: cmp %o2, 0 ! A0 Group + VISExitHalf ! A0+MS + be,pn %icc, U3copy_from_user_short_ret! BR Group + nop ! A0 + ba,a,pt %xcc, U3copy_from_user_short ! BR Group + +#else /* !(SMALL_COPY_USES_FPU) */ + + xor %o1, %o0, %g2 + andcc %g2, 0x7, %g0 + bne,pn %icc, U3copy_from_user_short + andcc %o1, 0x7, %g2 + + be,pt %xcc, 2f + sub %g2, 0x8, %g2 + sub %g0, %g2, %g2 + sub %o2, %g2, %o2 + +1: EXNV(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g2) + add %o1, 0x1, %o1 + add %o0, 0x1, %o0 + subcc %g2, 0x1, %g2 + bg,pt %icc, 1b + stb %o3, [%o0 + -1] + +2: andn %o2, 0x7, %g2 + sub %o2, %g2, %o2 + +3: EXNV(ldxa [%o1 + 0x00] %asi, %o3, add %o2, %g2) + add %o1, 0x8, %o1 + add %o0, 0x8, %o0 + subcc %g2, 0x8, %g2 + bg,pt %icc, 3b + stx %o3, [%o0 + -8] + + cmp %o2, 0 + bne,pn %icc, U3copy_from_user_short + nop + ba,a,pt %xcc, U3copy_from_user_short_ret + +#endif /* !(SMALL_COPY_USES_FPU) */ + +#ifdef __KERNEL__ + .globl U3cfu_fixup +U3cfu_fixup: + /* Since this is copy_from_user(), zero out the rest of the + * kernel buffer. + */ + cmp %o1, 0 + ble,pn %icc, 2f + mov %o1, %g2 + +1: subcc %g2, 1, %g2 + stb %g0, [%o0] + bne,pt %icc, 1b + add %o0, 1, %o0 + +2: retl + mov %o1, %o0 +#endif diff --git a/arch/sparc64/lib/U3copy_in_user.S b/arch/sparc64/lib/U3copy_in_user.S new file mode 100644 index 000000000..0fc169b9d --- /dev/null +++ b/arch/sparc64/lib/U3copy_in_user.S @@ -0,0 +1,531 @@ +/* $Id: U3copy_in_user.S,v 1.3 2000/11/01 09:29:19 davem Exp $ + * U3memcpy.S: UltraSparc-III optimized copy within userspace. + * + * Copyright (C) 1999, 2000 David S. Miller (davem@redhat.com) + */ + +#ifdef __KERNEL__ +#include <asm/visasm.h> +#include <asm/asi.h> +#undef SMALL_COPY_USES_FPU +#define EXNV(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: retl; \ + a, b, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXNV2(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: a, b, %o0; \ + retl; \ + add %o0, 1, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXNV3(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: a, b, %o0; \ + retl; \ + add %o0, 8, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EX(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + retl; \ + a, b, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK1(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + add %o4, 0x1c0, %o1; \ + and %o2, (0x40 - 1), %o2; \ + retl; \ + add %o1, %o2, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK2(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + sll %o3, 6, %o3; \ + and %o2, (0x40 - 1), %o2; \ + add %o3, 0x80, %o1; \ + retl; \ + add %o1, %o2, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK3(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + and %o2, (0x40 - 1), %o2; \ + retl; \ + add %o2, 0x80, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK4(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + and %o2, (0x40 - 1), %o2; \ + retl; \ + add %o2, 0x40, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#else +#define ASI_AIUS 0x80 +#define ASI_BLK_AIUS 0xf0 +#define FPRS_FEF 0x04 +#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs +#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs +#define SMALL_COPY_USES_FPU +#define EXNV(x,y,a,b) x,y; +#define EXNV2(x,y,a,b) x,y; +#define EXNV3(x,y,a,b) x,y; +#define EX(x,y,a,b) x,y; +#define EXBLK1(x,y) x,y; +#define EXBLK2(x,y) x,y; +#define EXBLK3(x,y) x,y; +#define EXBLK4(x,y) x,y; +#endif + + /* Special/non-trivial issues of this code: + * + * 1) %o5 is preserved from VISEntryHalf to VISExitHalf + * 2) Only low 32 FPU registers are used so that only the + * lower half of the FPU register set is dirtied by this + * code. This is especially important in the kernel. + * 3) This code never prefetches cachelines past the end + * of the source buffer. + * + * XXX Actually, Cheetah can buffer up to 8 concurrent + * XXX prefetches, revisit this... + */ + + .text + .align 32 + + /* The cheetah's flexible spine, oversized liver, enlarged heart, + * slender muscular body, and claws make it the swiftest hunter + * in Africa and the fastest animal on land. Can reach speeds + * of up to 2.4GB per second. + */ + + .globl U3copy_in_user +U3copy_in_user: /* %o0=dst, %o1=src, %o2=len */ + /* Writing to %asi is _expensive_ so we hardcode it. + * Reading %asi to check for KERNEL_DS is comparatively + * cheap. + */ + rd %asi, %g1 ! MS Group (4 cycles) + cmp %g1, ASI_AIUS ! A0 Group + bne U3memcpy ! BR + nop ! A1 +#ifndef __KERNEL__ + /* Save away original 'dst' for memcpy return value. */ + mov %o0, %g3 ! A0 Group +#endif + /* Anything to copy at all? */ + cmp %o2, 0 ! A1 + ble,pn %icc, U3copy_in_user_short_ret ! BR + + /* Extremely small copy? */ + cmp %o2, 31 ! A0 Group + ble,pn %icc, U3copy_in_user_short ! BR + + /* Large enough to use unrolled prefetch loops? */ + cmp %o2, 0x100 ! A1 + bge,a,pt %icc, U3copy_in_user_enter ! BR Group + andcc %o0, 0x3f, %g2 ! A0 + + ba,pt %xcc, U3copy_in_user_toosmall ! BR Group + andcc %o0, 0x7, %g2 ! A0 + + .align 32 +U3copy_in_user_short: + /* Copy %o2 bytes from src to dst, one byte at a time. */ + EXNV(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g0)! MS Group + add %o1, 0x1, %o1 ! A0 + add %o0, 0x1, %o0 ! A1 + subcc %o2, 1, %o2 ! A0 Group + + bg,pt %icc, U3copy_in_user_short ! BR + EXNV(stba %o3, [%o0 + -1] %asi, add %o2, 1) ! MS Group (1-cycle stall) + +U3copy_in_user_short_ret: +#ifdef __KERNEL__ + retl ! BR Group (0-4 cycle stall) + clr %o0 ! A0 +#else + retl ! BR Group (0-4 cycle stall) + mov %g3, %o0 ! A0 +#endif + + /* Here len >= (6 * 64) and condition codes reflect execution + * of "andcc %o0, 0x7, %g2", done by caller. + */ + .align 64 +U3copy_in_user_enter: + /* Is 'dst' already aligned on an 64-byte boundary? */ + be,pt %xcc, 2f ! BR + + /* Compute abs((dst & 0x3f) - 0x40) into %g2. This is the number + * of bytes to copy to make 'dst' 64-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x40, %g2 ! A0 Group + sub %g0, %g2, %g2 ! A0 Group + sub %o2, %g2, %o2 ! A0 Group + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: EXNV(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g2)! MS (Group) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) ! MS Group + +2: VISEntryHalf ! MS+MS + and %o1, 0x7, %g1 ! A1 + ba,pt %xcc, U3copy_in_user_begin ! BR + alignaddr %o1, %g0, %o1 ! MS (Break-after) + + .align 64 +U3copy_in_user_begin: + prefetch [%o1 + 0x000], #one_read ! MS Group1 + prefetch [%o1 + 0x040], #one_read ! MS Group2 + andn %o2, (0x40 - 1), %o4 ! A0 + prefetch [%o1 + 0x080], #one_read ! MS Group3 + cmp %o4, 0x140 ! A0 + prefetch [%o1 + 0x0c0], #one_read ! MS Group4 + EX(ldda [%o1 + 0x000] %asi, %f0, add %o2, %g0) ! MS Group5 (%f0 results at G8) + bge,a,pt %icc, 1f ! BR + + prefetch [%o1 + 0x100], #one_read ! MS Group6 +1: EX(ldda [%o1 + 0x008] %asi, %f2, add %o2, %g0) ! AX (%f2 results at G9) + cmp %o4, 0x180 ! A1 + bge,a,pt %icc, 1f ! BR + prefetch [%o1 + 0x140], #one_read ! MS Group7 +1: EX(ldda [%o1 + 0x010] %asi, %f4, add %o2, %g0) ! AX (%f4 results at G10) + cmp %o4, 0x1c0 ! A1 + bge,a,pt %icc, 1f ! BR + + prefetch [%o1 + 0x180], #one_read ! MS Group8 +1: faligndata %f0, %f2, %f16 ! FGA Group9 (%f16 at G12) + EX(ldda [%o1 + 0x018] %asi, %f6, add %o2, %g0) ! AX (%f6 results at G12) + faligndata %f2, %f4, %f18 ! FGA Group10 (%f18 results at G13) + EX(ldda [%o1 + 0x020] %asi, %f8, add %o2, %g0) ! MS (%f8 results at G13) + faligndata %f4, %f6, %f20 ! FGA Group12 (1-cycle stall,%f20 at G15) + EX(ldda [%o1 + 0x028] %asi, %f10, add %o2, %g0) ! MS (%f10 results at G15) + faligndata %f6, %f8, %f22 ! FGA Group13 (%f22 results at G16) + + EX(ldda [%o1 + 0x030] %asi, %f12, add %o2, %g0) ! MS (%f12 results at G16) + faligndata %f8, %f10, %f24 ! FGA Group15 (1-cycle stall,%f24 at G18) + EX(ldda [%o1 + 0x038] %asi, %f14, add %o2, %g0) ! MS (%f14 results at G18) + faligndata %f10, %f12, %f26 ! FGA Group16 (%f26 results at G19) + EX(ldda [%o1 + 0x040] %asi, %f0, add %o2, %g0) ! MS (%f0 results at G19) + + /* We only use the first loop if len > (7 * 64). */ + subcc %o4, 0x1c0, %o4 ! A0 Group17 + bg,pt %icc, U3copy_in_user_loop1 ! BR + add %o1, 0x40, %o1 ! A1 + + add %o4, 0x140, %o4 ! A0 Group18 + ba,pt %xcc, U3copy_in_user_loop2 ! BR + srl %o4, 6, %o3 ! A0 Group19 + nop + nop + nop + nop + nop + + nop + nop + + /* This loop performs the copy and queues new prefetches. + * We drop into the second loop when len <= (5 * 64). Note + * that this (5 * 64) factor has been subtracted from len + * already. + */ +U3copy_in_user_loop1: + EXBLK1(ldda [%o1 + 0x008] %asi, %f2) ! MS Group2 (%f2 results at G5) + faligndata %f12, %f14, %f28 ! FGA (%f28 results at G5) + EXBLK1(ldda [%o1 + 0x010] %asi, %f4) ! MS Group3 (%f4 results at G6) + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall, %f30 at G7) + EXBLK1(stda %f16, [%o0] ASI_BLK_AIUS) ! MS + EXBLK1(ldda [%o1 + 0x018] %asi, %f6) ! AX (%f6 results at G7) + + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + EXBLK1(ldda [%o1 + 0x020] %asi, %f8) ! MS (%f8 results at G15) + faligndata %f2, %f4, %f18 ! FGA Group13 (%f18 results at G16) + EXBLK1(ldda [%o1 + 0x028] %asi, %f10) ! MS (%f10 results at G16) + faligndata %f4, %f6, %f20 ! FGA Group14 (%f20 results at G17) + EXBLK1(ldda [%o1 + 0x030] %asi, %f12) ! MS (%f12 results at G17) + faligndata %f6, %f8, %f22 ! FGA Group15 (%f22 results at G18) + EXBLK1(ldda [%o1 + 0x038] %asi, %f14) ! MS (%f14 results at G18) + + faligndata %f8, %f10, %f24 ! FGA Group16 (%f24 results at G19) + EXBLK1(ldda [%o1 + 0x040] %asi, %f0) ! AX (%f0 results at G19) + prefetch [%o1 + 0x180], #one_read ! MS + faligndata %f10, %f12, %f26 ! FGA Group17 (%f26 results at G20) + subcc %o4, 0x40, %o4 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3copy_in_user_loop1 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + +U3copy_in_user_loop2_enter: + mov 5, %o3 ! A1 + + /* This loop performs on the copy, no new prefetches are + * queued. We do things this way so that we do not perform + * any spurious prefetches past the end of the src buffer. + */ +U3copy_in_user_loop2: + EXBLK2(ldda [%o1 + 0x008] %asi, %f2) ! MS + faligndata %f12, %f14, %f28 ! FGA Group2 + EXBLK2(ldda [%o1 + 0x010] %asi, %f4) ! MS + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall) + EXBLK2(stda %f16, [%o0] ASI_BLK_AIUS) ! MS + EXBLK2(ldda [%o1 + 0x018] %asi, %f6) ! AX + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + + EXBLK2(ldda [%o1 + 0x020] %asi, %f8) ! MS + faligndata %f2, %f4, %f18 ! FGA Group13 + EXBLK2(ldda [%o1 + 0x028] %asi, %f10) ! MS + faligndata %f4, %f6, %f20 ! FGA Group14 + EXBLK2(ldda [%o1 + 0x030] %asi, %f12) ! MS + faligndata %f6, %f8, %f22 ! FGA Group15 + EXBLK2(ldda [%o1 + 0x038] %asi, %f14) ! MS + faligndata %f8, %f10, %f24 ! FGA Group16 + + EXBLK2(ldda [%o1 + 0x040] %asi, %f0) ! AX + faligndata %f10, %f12, %f26 ! FGA Group17 + subcc %o3, 0x01, %o3 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3copy_in_user_loop2 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + + /* Finally we copy the last full 64-byte block. */ +U3copy_in_user_loopfini: + EXBLK3(ldda [%o1 + 0x008] %asi, %f2) ! MS + faligndata %f12, %f14, %f28 ! FGA + EXBLK3(ldda [%o1 + 0x010] %asi, %f4) ! MS Group19 + faligndata %f14, %f0, %f30 ! FGA + EXBLK3(stda %f16, [%o0] ASI_BLK_AIUS) ! MS Group20 + EXBLK4(ldda [%o1 + 0x018] %asi, %f6) ! AX + faligndata %f0, %f2, %f16 ! FGA Group11 (7-cycle stall) + EXBLK4(ldda [%o1 + 0x020] %asi, %f8) ! MS + faligndata %f2, %f4, %f18 ! FGA Group12 + EXBLK4(ldda [%o1 + 0x028] %asi, %f10) ! MS + faligndata %f4, %f6, %f20 ! FGA Group13 + EXBLK4(ldda [%o1 + 0x030] %asi, %f12) ! MS + faligndata %f6, %f8, %f22 ! FGA Group14 + EXBLK4(ldda [%o1 + 0x038] %asi, %f14) ! MS + faligndata %f8, %f10, %f24 ! FGA Group15 + cmp %g1, 0 ! A0 + be,pt %icc, 1f ! BR + add %o0, 0x40, %o0 ! A1 + EXBLK4(ldda [%o1 + 0x040] %asi, %f0) ! MS +1: faligndata %f10, %f12, %f26 ! FGA Group16 + faligndata %f12, %f14, %f28 ! FGA Group17 + faligndata %f14, %f0, %f30 ! FGA Group18 + EXBLK4(stda %f16, [%o0] ASI_BLK_AIUS) ! MS + add %o0, 0x40, %o0 ! A0 + add %o1, 0x40, %o1 ! A1 + membar #Sync ! MS Group26 (7-cycle stall) + + /* Now we copy the (len modulo 64) bytes at the end. + * Note how we borrow the %f0 loaded above. + * + * Also notice how this code is careful not to perform a + * load past the end of the src buffer just like similar + * code found in U3copy_in_user_toosmall processing. + */ +U3copy_in_user_loopend: + and %o2, 0x3f, %o2 ! A0 Group + andcc %o2, 0x38, %g2 ! A0 Group + be,pn %icc, U3copy_in_user_endcruft ! BR + subcc %g2, 0x8, %g2 ! A1 + be,pn %icc, U3copy_in_user_endcruft ! BR Group + cmp %g1, 0 ! A0 + + be,a,pt %icc, 1f ! BR Group + EX(ldda [%o1 + 0x00] %asi, %f0, add %o2, %g0) ! MS + +1: EX(ldda [%o1 + 0x08] %asi, %f2, add %o2, %g0) ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f0, %f2, %f8 ! FGA Group + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS (XXX does it stall here? XXX) + be,pn %icc, U3copy_in_user_endcruft ! BR + add %o0, 0x8, %o0 ! A0 + EX(ldda [%o1 + 0x08] %asi, %f0, add %o2, %g0) ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS (XXX does it stall here? XXX) + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A0 Group + + /* If anything is left, we copy it one byte at a time. + * Note that %g1 is (src & 0x3) saved above before the + * alignaddr was performed. + */ +U3copy_in_user_endcruft: + cmp %o2, 0 + add %o1, %g1, %o1 + VISExitHalf + be,pn %icc, U3copy_in_user_short_ret + nop + ba,a,pt %xcc, U3copy_in_user_short + + /* If we get here, then 32 <= len < (6 * 64) */ +U3copy_in_user_toosmall: + +#ifdef SMALL_COPY_USES_FPU + + /* Is 'dst' already aligned on an 8-byte boundary? */ + be,pt %xcc, 2f ! BR Group + + /* Compute abs((dst & 7) - 8) into %g2. This is the number + * of bytes to copy to make 'dst' 8-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x8, %g2 ! A0 + sub %g0, %g2, %g2 ! A0 Group (reg-dep) + sub %o2, %g2, %o2 ! A0 Group (reg-dep) + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: EXNV2(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g2)! MS (Group) (%o3 in 3 cycles) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) ! MS Group + +2: VISEntryHalf ! MS+MS + + /* Compute (len - (len % 8)) into %g2. This is guarenteed + * to be nonzero. + */ + andn %o2, 0x7, %g2 ! A0 Group + + /* You may read this and believe that it allows reading + * one 8-byte longword past the end of src. It actually + * does not, as %g2 is subtracted as loads are done from + * src, so we always stop before running off the end. + * Also, we are guarenteed to have at least 0x10 bytes + * to move here. + */ + sub %g2, 0x8, %g2 ! A0 Group (reg-dep) + alignaddr %o1, %g0, %g1 ! MS (Break-after) + EX(ldda [%g1 + 0x00] %asi, %f0, add %o2, %g0) ! MS Group (1-cycle stall) + add %g1, 0x8, %g1 ! A0 + +1: EX(ldda [%g1 + 0x00] %asi, %f2, add %o2, %g0) ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + + faligndata %f0, %f2, %f8 ! FGA Group (1-cycle stall) + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + be,pn %icc, 2f ! BR + + add %o0, 0x8, %o0 ! A1 + EX(ldda [%g1 + 0x00] %asi, %f0, add %o2, %g0) ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA Group (1-cycle stall) + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A1 + + /* Nothing left to copy? */ +2: cmp %o2, 0 ! A0 Group + VISExitHalf ! A0+MS + be,pn %icc, U3copy_in_user_short_ret ! BR Group + nop ! A0 + ba,a,pt %xcc, U3copy_in_user_short ! BR Group + +#else /* !(SMALL_COPY_USES_FPU) */ + + xor %o1, %o0, %g2 + andcc %g2, 0x7, %g0 + bne,pn %icc, U3copy_in_user_short + andcc %o1, 0x7, %g2 + + be,pt %xcc, 2f + sub %g2, 0x8, %g2 + sub %g0, %g2, %g2 + sub %o2, %g2, %o2 + +1: EXNV2(lduba [%o1 + 0x00] %asi, %o3, add %o2, %g2) + add %o1, 0x1, %o1 + add %o0, 0x1, %o0 + subcc %g2, 0x1, %g2 + bg,pt %icc, 1b + EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) + +2: andn %o2, 0x7, %g2 + sub %o2, %g2, %o2 + +3: EXNV3(ldxa [%o1 + 0x00] %asi, %o3, add %o2, %g2) + add %o1, 0x8, %o1 + add %o0, 0x8, %o0 + subcc %g2, 0x8, %g2 + bg,pt %icc, 3b + EXNV3(stxa %o3, [%o0 + -8] %asi, add %o2, %g2) + + cmp %o2, 0 + bne,pn %icc, U3copy_in_user_short + nop + ba,a,pt %xcc, U3copy_in_user_short_ret + +#endif /* !(SMALL_COPY_USES_FPU) */ diff --git a/arch/sparc64/lib/U3copy_to_user.S b/arch/sparc64/lib/U3copy_to_user.S new file mode 100644 index 000000000..e08b1290b --- /dev/null +++ b/arch/sparc64/lib/U3copy_to_user.S @@ -0,0 +1,528 @@ +/* $Id: U3copy_to_user.S,v 1.3 2000/11/01 09:29:19 davem Exp $ + * U3memcpy.S: UltraSparc-III optimized copy to userspace. + * + * Copyright (C) 1999, 2000 David S. Miller (davem@redhat.com) + */ + +#ifdef __KERNEL__ +#include <asm/visasm.h> +#include <asm/asi.h> +#undef SMALL_COPY_USES_FPU +#define EXNV(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: retl; \ + a, b, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXNV2(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: a, b, %o0; \ + retl; \ + add %o0, 1, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXNV3(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: a, b, %o0; \ + retl; \ + add %o0, 8, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EX(x,y,a,b) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + retl; \ + a, b, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK1(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + add %o4, 0x1c0, %o1; \ + and %o2, (0x40 - 1), %o2; \ + retl; \ + add %o1, %o2, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK2(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + sll %o3, 6, %o3; \ + and %o2, (0x40 - 1), %o2; \ + add %o3, 0x80, %o1; \ + retl; \ + add %o1, %o2, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK3(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + and %o2, (0x40 - 1), %o2; \ + retl; \ + add %o2, 0x80, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#define EXBLK4(x,y) \ +98: x,y; \ + .section .fixup; \ + .align 4; \ +99: VISExitHalf; \ + and %o2, (0x40 - 1), %o2; \ + retl; \ + add %o2, 0x40, %o0; \ + .section __ex_table; \ + .align 4; \ + .word 98b, 99b; \ + .text; \ + .align 4; +#else +#define ASI_AIUS 0x80 +#define ASI_BLK_AIUS 0xf0 +#define FPRS_FEF 0x04 +#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs +#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs +#define SMALL_COPY_USES_FPU +#define EXNV(x,y,a,b) x,y; +#define EXNV2(x,y,a,b) x,y; +#define EXNV3(x,y,a,b) x,y; +#define EX(x,y,a,b) x,y; +#define EXBLK1(x,y) x,y; +#define EXBLK2(x,y) x,y; +#define EXBLK3(x,y) x,y; +#define EXBLK4(x,y) x,y; +#endif + + /* Special/non-trivial issues of this code: + * + * 1) %o5 is preserved from VISEntryHalf to VISExitHalf + * 2) Only low 32 FPU registers are used so that only the + * lower half of the FPU register set is dirtied by this + * code. This is especially important in the kernel. + * 3) This code never prefetches cachelines past the end + * of the source buffer. + */ + + .text + .align 32 + + /* The cheetah's flexible spine, oversized liver, enlarged heart, + * slender muscular body, and claws make it the swiftest hunter + * in Africa and the fastest animal on land. Can reach speeds + * of up to 2.4GB per second. + */ + + .globl U3copy_to_user +U3copy_to_user: /* %o0=dst, %o1=src, %o2=len */ + /* Writing to %asi is _expensive_ so we hardcode it. + * Reading %asi to check for KERNEL_DS is comparatively + * cheap. + */ + rd %asi, %g1 ! MS Group (4 cycles) + cmp %g1, ASI_AIUS ! A0 Group + bne U3memcpy ! BR + nop ! A1 +#ifndef __KERNEL__ + /* Save away original 'dst' for memcpy return value. */ + mov %o0, %g3 ! A0 Group +#endif + /* Anything to copy at all? */ + cmp %o2, 0 ! A1 + ble,pn %icc, U3copy_to_user_short_ret ! BR + + /* Extremely small copy? */ + cmp %o2, 31 ! A0 Group + ble,pn %icc, U3copy_to_user_short ! BR + + /* Large enough to use unrolled prefetch loops? */ + cmp %o2, 0x100 ! A1 + bge,a,pt %icc, U3copy_to_user_enter ! BR Group + andcc %o0, 0x3f, %g2 ! A0 + + ba,pt %xcc, U3copy_to_user_toosmall ! BR Group + andcc %o0, 0x7, %g2 ! A0 + + .align 32 +U3copy_to_user_short: + /* Copy %o2 bytes from src to dst, one byte at a time. */ + ldub [%o1 + 0x00], %o3 ! MS Group + add %o1, 0x1, %o1 ! A0 + add %o0, 0x1, %o0 ! A1 + subcc %o2, 1, %o2 ! A0 Group + + bg,pt %icc, U3copy_to_user_short ! BR + EXNV(stba %o3, [%o0 + -1] %asi, add %o2, 1) ! MS Group (1-cycle stall) + +U3copy_to_user_short_ret: +#ifdef __KERNEL__ + retl ! BR Group (0-4 cycle stall) + clr %o0 ! A0 +#else + retl ! BR Group (0-4 cycle stall) + mov %g3, %o0 ! A0 +#endif + + /* Here len >= (6 * 64) and condition codes reflect execution + * of "andcc %o0, 0x7, %g2", done by caller. + */ + .align 64 +U3copy_to_user_enter: + /* Is 'dst' already aligned on an 64-byte boundary? */ + be,pt %xcc, 2f ! BR + + /* Compute abs((dst & 0x3f) - 0x40) into %g2. This is the number + * of bytes to copy to make 'dst' 64-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x40, %g2 ! A0 Group + sub %g0, %g2, %g2 ! A0 Group + sub %o2, %g2, %o2 ! A0 Group + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: ldub [%o1 + 0x00], %o3 ! MS (Group) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) ! MS Group + +2: VISEntryHalf ! MS+MS + and %o1, 0x7, %g1 ! A1 + ba,pt %xcc, U3copy_to_user_begin ! BR + alignaddr %o1, %g0, %o1 ! MS (Break-after) + + .align 64 +U3copy_to_user_begin: + prefetch [%o1 + 0x000], #one_read ! MS Group1 + prefetch [%o1 + 0x040], #one_read ! MS Group2 + andn %o2, (0x40 - 1), %o4 ! A0 + prefetch [%o1 + 0x080], #one_read ! MS Group3 + cmp %o4, 0x140 ! A0 + prefetch [%o1 + 0x0c0], #one_read ! MS Group4 + ldd [%o1 + 0x000], %f0 ! MS Group5 (%f0 results at G8) + bge,a,pt %icc, 1f ! BR + + prefetch [%o1 + 0x100], #one_read ! MS Group6 +1: ldd [%o1 + 0x008], %f2 ! AX (%f2 results at G9) + cmp %o4, 0x180 ! A1 + bge,a,pt %icc, 1f ! BR + prefetch [%o1 + 0x140], #one_read ! MS Group7 +1: ldd [%o1 + 0x010], %f4 ! AX (%f4 results at G10) + cmp %o4, 0x1c0 ! A1 + bge,a,pt %icc, 1f ! BR + + prefetch [%o1 + 0x180], #one_read ! MS Group8 +1: faligndata %f0, %f2, %f16 ! FGA Group9 (%f16 at G12) + ldd [%o1 + 0x018], %f6 ! AX (%f6 results at G12) + faligndata %f2, %f4, %f18 ! FGA Group10 (%f18 results at G13) + ldd [%o1 + 0x020], %f8 ! MS (%f8 results at G13) + faligndata %f4, %f6, %f20 ! FGA Group12 (1-cycle stall,%f20 at G15) + ldd [%o1 + 0x028], %f10 ! MS (%f10 results at G15) + faligndata %f6, %f8, %f22 ! FGA Group13 (%f22 results at G16) + + ldd [%o1 + 0x030], %f12 ! MS (%f12 results at G16) + faligndata %f8, %f10, %f24 ! FGA Group15 (1-cycle stall,%f24 at G18) + ldd [%o1 + 0x038], %f14 ! MS (%f14 results at G18) + faligndata %f10, %f12, %f26 ! FGA Group16 (%f26 results at G19) + ldd [%o1 + 0x040], %f0 ! MS (%f0 results at G19) + + /* We only use the first loop if len > (7 * 64). */ + subcc %o4, 0x1c0, %o4 ! A0 Group17 + bg,pt %icc, U3copy_to_user_loop1 ! BR + add %o1, 0x40, %o1 ! A1 + + add %o4, 0x140, %o4 ! A0 Group18 + ba,pt %xcc, U3copy_to_user_loop2 ! BR + srl %o4, 6, %o3 ! A0 Group19 + nop + nop + nop + nop + nop + + nop + nop + + /* This loop performs the copy and queues new prefetches. + * We drop into the second loop when len <= (5 * 64). Note + * that this (5 * 64) factor has been subtracted from len + * already. + */ +U3copy_to_user_loop1: + ldd [%o1 + 0x008], %f2 ! MS Group2 (%f2 results at G5) + faligndata %f12, %f14, %f28 ! FGA (%f28 results at G5) + ldd [%o1 + 0x010], %f4 ! MS Group3 (%f4 results at G6) + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall, %f30 at G7) + EXBLK1(stda %f16, [%o0] ASI_BLK_AIUS) ! MS + ldd [%o1 + 0x018], %f6 ! AX (%f6 results at G7) + + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + ldd [%o1 + 0x020], %f8 ! MS (%f8 results at G15) + faligndata %f2, %f4, %f18 ! FGA Group13 (%f18 results at G16) + ldd [%o1 + 0x028], %f10 ! MS (%f10 results at G16) + faligndata %f4, %f6, %f20 ! FGA Group14 (%f20 results at G17) + ldd [%o1 + 0x030], %f12 ! MS (%f12 results at G17) + faligndata %f6, %f8, %f22 ! FGA Group15 (%f22 results at G18) + ldd [%o1 + 0x038], %f14 ! MS (%f14 results at G18) + + faligndata %f8, %f10, %f24 ! FGA Group16 (%f24 results at G19) + ldd [%o1 + 0x040], %f0 ! AX (%f0 results at G19) + prefetch [%o1 + 0x180], #one_read ! MS + faligndata %f10, %f12, %f26 ! FGA Group17 (%f26 results at G20) + subcc %o4, 0x40, %o4 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3copy_to_user_loop1 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + +U3copy_to_user_loop2_enter: + mov 5, %o3 ! A1 + + /* This loop performs on the copy, no new prefetches are + * queued. We do things this way so that we do not perform + * any spurious prefetches past the end of the src buffer. + */ +U3copy_to_user_loop2: + ldd [%o1 + 0x008], %f2 ! MS + faligndata %f12, %f14, %f28 ! FGA Group2 + ldd [%o1 + 0x010], %f4 ! MS + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall) + EXBLK2(stda %f16, [%o0] ASI_BLK_AIUS) ! MS + ldd [%o1 + 0x018], %f6 ! AX + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + + ldd [%o1 + 0x020], %f8 ! MS + faligndata %f2, %f4, %f18 ! FGA Group13 + ldd [%o1 + 0x028], %f10 ! MS + faligndata %f4, %f6, %f20 ! FGA Group14 + ldd [%o1 + 0x030], %f12 ! MS + faligndata %f6, %f8, %f22 ! FGA Group15 + ldd [%o1 + 0x038], %f14 ! MS + faligndata %f8, %f10, %f24 ! FGA Group16 + + ldd [%o1 + 0x040], %f0 ! AX + faligndata %f10, %f12, %f26 ! FGA Group17 + subcc %o3, 0x01, %o3 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3copy_to_user_loop2 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + + /* Finally we copy the last full 64-byte block. */ +U3copy_to_user_loopfini: + ldd [%o1 + 0x008], %f2 ! MS + faligndata %f12, %f14, %f28 ! FGA + ldd [%o1 + 0x010], %f4 ! MS Group19 + faligndata %f14, %f0, %f30 ! FGA + EXBLK3(stda %f16, [%o0] ASI_BLK_AIUS) ! MS Group20 + ldd [%o1 + 0x018], %f6 ! AX + faligndata %f0, %f2, %f16 ! FGA Group11 (7-cycle stall) + ldd [%o1 + 0x020], %f8 ! MS + faligndata %f2, %f4, %f18 ! FGA Group12 + ldd [%o1 + 0x028], %f10 ! MS + faligndata %f4, %f6, %f20 ! FGA Group13 + ldd [%o1 + 0x030], %f12 ! MS + faligndata %f6, %f8, %f22 ! FGA Group14 + ldd [%o1 + 0x038], %f14 ! MS + faligndata %f8, %f10, %f24 ! FGA Group15 + cmp %g1, 0 ! A0 + be,pt %icc, 1f ! BR + add %o0, 0x40, %o0 ! A1 + ldd [%o1 + 0x040], %f0 ! MS +1: faligndata %f10, %f12, %f26 ! FGA Group16 + faligndata %f12, %f14, %f28 ! FGA Group17 + faligndata %f14, %f0, %f30 ! FGA Group18 + EXBLK4(stda %f16, [%o0] ASI_BLK_AIUS) ! MS + add %o0, 0x40, %o0 ! A0 + add %o1, 0x40, %o1 ! A1 + membar #Sync ! MS Group26 (7-cycle stall) + + /* Now we copy the (len modulo 64) bytes at the end. + * Note how we borrow the %f0 loaded above. + * + * Also notice how this code is careful not to perform a + * load past the end of the src buffer just like similar + * code found in U3copy_to_user_toosmall processing. + */ +U3copy_to_user_loopend: + and %o2, 0x3f, %o2 ! A0 Group + andcc %o2, 0x38, %g2 ! A0 Group + be,pn %icc, U3copy_to_user_endcruft ! BR + subcc %g2, 0x8, %g2 ! A1 + be,pn %icc, U3copy_to_user_endcruft ! BR Group + cmp %g1, 0 ! A0 + + be,a,pt %icc, 1f ! BR Group + ldd [%o1 + 0x00], %f0 ! MS + +1: ldd [%o1 + 0x08], %f2 ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f0, %f2, %f8 ! FGA Group + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS (XXX does it stall here? XXX) + be,pn %icc, U3copy_to_user_endcruft ! BR + add %o0, 0x8, %o0 ! A0 + ldd [%o1 + 0x08], %f0 ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS (XXX does it stall here? XXX) + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A0 Group + + /* If anything is left, we copy it one byte at a time. + * Note that %g1 is (src & 0x3) saved above before the + * alignaddr was performed. + */ +U3copy_to_user_endcruft: + cmp %o2, 0 + add %o1, %g1, %o1 + VISExitHalf + be,pn %icc, U3copy_to_user_short_ret + nop + ba,a,pt %xcc, U3copy_to_user_short + + /* If we get here, then 32 <= len < (6 * 64) */ +U3copy_to_user_toosmall: + +#ifdef SMALL_COPY_USES_FPU + + /* Is 'dst' already aligned on an 8-byte boundary? */ + be,pt %xcc, 2f ! BR Group + + /* Compute abs((dst & 7) - 8) into %g2. This is the number + * of bytes to copy to make 'dst' 8-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x8, %g2 ! A0 + sub %g0, %g2, %g2 ! A0 Group (reg-dep) + sub %o2, %g2, %o2 ! A0 Group (reg-dep) + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: ldub [%o1 + 0x00], %o3 ! MS (Group) (%o3 in 3 cycles) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) ! MS Group + +2: VISEntryHalf ! MS+MS + + /* Compute (len - (len % 8)) into %g2. This is guarenteed + * to be nonzero. + */ + andn %o2, 0x7, %g2 ! A0 Group + + /* You may read this and believe that it allows reading + * one 8-byte longword past the end of src. It actually + * does not, as %g2 is subtracted as loads are done from + * src, so we always stop before running off the end. + * Also, we are guarenteed to have at least 0x10 bytes + * to move here. + */ + sub %g2, 0x8, %g2 ! A0 Group (reg-dep) + alignaddr %o1, %g0, %g1 ! MS (Break-after) + ldd [%g1 + 0x00], %f0 ! MS Group (1-cycle stall) + add %g1, 0x8, %g1 ! A0 + +1: ldd [%g1 + 0x00], %f2 ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + + faligndata %f0, %f2, %f8 ! FGA Group (1-cycle stall) + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + be,pn %icc, 2f ! BR + + add %o0, 0x8, %o0 ! A1 + ldd [%g1 + 0x00], %f0 ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA Group (1-cycle stall) + EX(stda %f8, [%o0 + 0x00] %asi, add %o2, 0x8) ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A1 + + /* Nothing left to copy? */ +2: cmp %o2, 0 ! A0 Group + VISExitHalf ! A0+MS + be,pn %icc, U3copy_to_user_short_ret ! BR Group + nop ! A0 + ba,a,pt %xcc, U3copy_to_user_short ! BR Group + +#else /* !(SMALL_COPY_USES_FPU) */ + + xor %o1, %o0, %g2 + andcc %g2, 0x7, %g0 + bne,pn %icc, U3copy_to_user_short + andcc %o1, 0x7, %g2 + + be,pt %xcc, 2f + sub %g2, 0x8, %g2 + sub %g0, %g2, %g2 + sub %o2, %g2, %o2 + +1: ldub [%o1 + 0x00], %o3 + add %o1, 0x1, %o1 + add %o0, 0x1, %o0 + subcc %g2, 0x1, %g2 + bg,pt %icc, 1b + EXNV2(stba %o3, [%o0 + -1] %asi, add %o2, %g2) + +2: andn %o2, 0x7, %g2 + sub %o2, %g2, %o2 + +3: ldx [%o1 + 0x00], %o3 + add %o1, 0x8, %o1 + add %o0, 0x8, %o0 + subcc %g2, 0x8, %g2 + bg,pt %icc, 3b + EXNV3(stxa %o3, [%o0 + -8] %asi, add %o2, %g2) + + cmp %o2, 0 + bne,pn %icc, U3copy_to_user_short + nop + ba,a,pt %xcc, U3copy_to_user_short_ret + +#endif /* !(SMALL_COPY_USES_FPU) */ diff --git a/arch/sparc64/lib/U3memcpy.S b/arch/sparc64/lib/U3memcpy.S new file mode 100644 index 000000000..d38289145 --- /dev/null +++ b/arch/sparc64/lib/U3memcpy.S @@ -0,0 +1,409 @@ +/* $Id: U3memcpy.S,v 1.2 2000/11/01 09:29:19 davem Exp $ + * U3memcpy.S: UltraSparc-III optimized memcpy. + * + * Copyright (C) 1999, 2000 David S. Miller (davem@redhat.com) + */ + +#ifdef __KERNEL__ +#include <asm/visasm.h> +#include <asm/asi.h> +#undef SMALL_COPY_USES_FPU +#else +#define ASI_BLK_P 0xf0 +#define FPRS_FEF 0x04 +#define VISEntryHalf rd %fprs, %o5; wr %g0, FPRS_FEF, %fprs +#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs +#define SMALL_COPY_USES_FPU +#endif + + /* Special/non-trivial issues of this code: + * + * 1) %o5 is preserved from VISEntryHalf to VISExitHalf + * 2) Only low 32 FPU registers are used so that only the + * lower half of the FPU register set is dirtied by this + * code. This is especially important in the kernel. + * 3) This code never prefetches cachelines past the end + * of the source buffer. + */ + + .text + .align 32 + + /* The cheetah's flexible spine, oversized liver, enlarged heart, + * slender muscular body, and claws make it the swiftest hunter + * in Africa and the fastest animal on land. Can reach speeds + * of up to 2.4GB per second. + */ + + .globl U3memcpy +U3memcpy: /* %o0=dst, %o1=src, %o2=len */ +#ifndef __KERNEL__ + /* Save away original 'dst' for memcpy return value. */ + mov %o0, %g3 ! A0 Group +#endif + /* Anything to copy at all? */ + cmp %o2, 0 ! A1 + ble,pn %icc, U3memcpy_short_ret ! BR + + /* Extremely small copy? */ + cmp %o2, 31 ! A0 Group + ble,pn %icc, U3memcpy_short ! BR + + /* Large enough to use unrolled prefetch loops? */ + cmp %o2, 0x100 ! A1 + bge,a,pt %icc, U3memcpy_enter ! BR Group + andcc %o0, 0x3f, %g2 ! A0 + + ba,pt %xcc, U3memcpy_toosmall ! BR Group + andcc %o0, 0x7, %g2 ! A0 + + .align 32 +U3memcpy_short: + /* Copy %o2 bytes from src to dst, one byte at a time. */ + ldub [%o1 + 0x00], %o3 ! MS Group + add %o1, 0x1, %o1 ! A0 + add %o0, 0x1, %o0 ! A1 + subcc %o2, 1, %o2 ! A0 Group + + bg,pt %icc, U3memcpy_short ! BR + stb %o3, [%o0 + -1] ! MS Group (1-cycle stall) + +U3memcpy_short_ret: +#ifdef __KERNEL__ + retl ! BR Group (0-4 cycle stall) + clr %o0 ! A0 +#else + retl ! BR Group (0-4 cycle stall) + mov %g3, %o0 ! A0 +#endif + + /* Here len >= (6 * 64) and condition codes reflect execution + * of "andcc %o0, 0x7, %g2", done by caller. + */ + .align 64 +U3memcpy_enter: + /* Is 'dst' already aligned on an 64-byte boundary? */ + be,pt %xcc, 2f ! BR + + /* Compute abs((dst & 0x3f) - 0x40) into %g2. This is the number + * of bytes to copy to make 'dst' 64-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x40, %g2 ! A0 Group + sub %g0, %g2, %g2 ! A0 Group + sub %o2, %g2, %o2 ! A0 Group + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: ldub [%o1 + 0x00], %o3 ! MS (Group) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + stb %o3, [%o0 + -1] ! MS Group + +2: VISEntryHalf ! MS+MS + and %o1, 0x7, %g1 ! A1 + ba,pt %xcc, U3memcpy_begin ! BR + alignaddr %o1, %g0, %o1 ! MS (Break-after) + + .align 64 +U3memcpy_begin: + prefetch [%o1 + 0x000], #one_read ! MS Group1 + prefetch [%o1 + 0x040], #one_read ! MS Group2 + andn %o2, (0x40 - 1), %o4 ! A0 + prefetch [%o1 + 0x080], #one_read ! MS Group3 + cmp %o4, 0x140 ! A0 + prefetch [%o1 + 0x0c0], #one_read ! MS Group4 + ldd [%o1 + 0x000], %f0 ! MS Group5 (%f0 results at G8) + bge,a,pt %icc, 1f ! BR + + prefetch [%o1 + 0x100], #one_read ! MS Group6 +1: ldd [%o1 + 0x008], %f2 ! AX (%f2 results at G9) + cmp %o4, 0x180 ! A1 + bge,a,pt %icc, 1f ! BR + prefetch [%o1 + 0x140], #one_read ! MS Group7 +1: ldd [%o1 + 0x010], %f4 ! AX (%f4 results at G10) + cmp %o4, 0x1c0 ! A1 + bge,a,pt %icc, 1f ! BR + + prefetch [%o1 + 0x180], #one_read ! MS Group8 +1: faligndata %f0, %f2, %f16 ! FGA Group9 (%f16 at G12) + ldd [%o1 + 0x018], %f6 ! AX (%f6 results at G12) + faligndata %f2, %f4, %f18 ! FGA Group10 (%f18 results at G13) + ldd [%o1 + 0x020], %f8 ! MS (%f8 results at G13) + faligndata %f4, %f6, %f20 ! FGA Group12 (1-cycle stall,%f20 at G15) + ldd [%o1 + 0x028], %f10 ! MS (%f10 results at G15) + faligndata %f6, %f8, %f22 ! FGA Group13 (%f22 results at G16) + + ldd [%o1 + 0x030], %f12 ! MS (%f12 results at G16) + faligndata %f8, %f10, %f24 ! FGA Group15 (1-cycle stall,%f24 at G18) + ldd [%o1 + 0x038], %f14 ! MS (%f14 results at G18) + faligndata %f10, %f12, %f26 ! FGA Group16 (%f26 results at G19) + ldd [%o1 + 0x040], %f0 ! MS (%f0 results at G19) + + /* We only use the first loop if len > (7 * 64). */ + subcc %o4, 0x1c0, %o4 ! A0 Group17 + bg,pt %icc, U3memcpy_loop1 ! BR + add %o1, 0x40, %o1 ! A1 + + add %o4, 0x140, %o4 ! A0 Group18 + ba,pt %xcc, U3memcpy_loop2 ! BR + srl %o4, 6, %o3 ! A0 Group19 + nop + nop + nop + nop + nop + + nop + nop + + /* This loop performs the copy and queues new prefetches. + * We drop into the second loop when len <= (5 * 64). Note + * that this (5 * 64) factor has been subtracted from len + * already. + */ +U3memcpy_loop1: + ldd [%o1 + 0x008], %f2 ! MS Group2 (%f2 results at G5) + faligndata %f12, %f14, %f28 ! FGA (%f28 results at G5) + ldd [%o1 + 0x010], %f4 ! MS Group3 (%f4 results at G6) + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall, %f30 at G7) + stda %f16, [%o0] ASI_BLK_P ! MS + ldd [%o1 + 0x018], %f6 ! AX (%f6 results at G7) + + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + ldd [%o1 + 0x020], %f8 ! MS (%f8 results at G15) + faligndata %f2, %f4, %f18 ! FGA Group13 (%f18 results at G16) + ldd [%o1 + 0x028], %f10 ! MS (%f10 results at G16) + faligndata %f4, %f6, %f20 ! FGA Group14 (%f20 results at G17) + ldd [%o1 + 0x030], %f12 ! MS (%f12 results at G17) + faligndata %f6, %f8, %f22 ! FGA Group15 (%f22 results at G18) + ldd [%o1 + 0x038], %f14 ! MS (%f14 results at G18) + + faligndata %f8, %f10, %f24 ! FGA Group16 (%f24 results at G19) + ldd [%o1 + 0x040], %f0 ! AX (%f0 results at G19) + prefetch [%o1 + 0x180], #one_read ! MS + faligndata %f10, %f12, %f26 ! FGA Group17 (%f26 results at G20) + subcc %o4, 0x40, %o4 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3memcpy_loop1 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + +U3memcpy_loop2_enter: + mov 5, %o3 ! A1 + + /* This loop performs on the copy, no new prefetches are + * queued. We do things this way so that we do not perform + * any spurious prefetches past the end of the src buffer. + */ +U3memcpy_loop2: + ldd [%o1 + 0x008], %f2 ! MS + faligndata %f12, %f14, %f28 ! FGA Group2 + ldd [%o1 + 0x010], %f4 ! MS + faligndata %f14, %f0, %f30 ! FGA Group4 (1-cycle stall) + stda %f16, [%o0] ASI_BLK_P ! MS + ldd [%o1 + 0x018], %f6 ! AX + faligndata %f0, %f2, %f16 ! FGA Group12 (7-cycle stall) + + ldd [%o1 + 0x020], %f8 ! MS + faligndata %f2, %f4, %f18 ! FGA Group13 + ldd [%o1 + 0x028], %f10 ! MS + faligndata %f4, %f6, %f20 ! FGA Group14 + ldd [%o1 + 0x030], %f12 ! MS + faligndata %f6, %f8, %f22 ! FGA Group15 + ldd [%o1 + 0x038], %f14 ! MS + faligndata %f8, %f10, %f24 ! FGA Group16 + + ldd [%o1 + 0x040], %f0 ! AX + faligndata %f10, %f12, %f26 ! FGA Group17 + subcc %o3, 0x01, %o3 ! A0 + add %o1, 0x40, %o1 ! A1 + bg,pt %xcc, U3memcpy_loop2 ! BR + add %o0, 0x40, %o0 ! A0 Group18 + + /* Finally we copy the last full 64-byte block. */ +U3memcpy_loopfini: + ldd [%o1 + 0x008], %f2 ! MS + faligndata %f12, %f14, %f28 ! FGA + ldd [%o1 + 0x010], %f4 ! MS Group19 + faligndata %f14, %f0, %f30 ! FGA + stda %f16, [%o0] ASI_BLK_P ! MS Group20 + ldd [%o1 + 0x018], %f6 ! AX + faligndata %f0, %f2, %f16 ! FGA Group11 (7-cycle stall) + ldd [%o1 + 0x020], %f8 ! MS + faligndata %f2, %f4, %f18 ! FGA Group12 + ldd [%o1 + 0x028], %f10 ! MS + faligndata %f4, %f6, %f20 ! FGA Group13 + ldd [%o1 + 0x030], %f12 ! MS + faligndata %f6, %f8, %f22 ! FGA Group14 + ldd [%o1 + 0x038], %f14 ! MS + faligndata %f8, %f10, %f24 ! FGA Group15 + cmp %g1, 0 ! A0 + be,pt %icc, 1f ! BR + add %o0, 0x40, %o0 ! A1 + ldd [%o1 + 0x040], %f0 ! MS +1: faligndata %f10, %f12, %f26 ! FGA Group16 + faligndata %f12, %f14, %f28 ! FGA Group17 + faligndata %f14, %f0, %f30 ! FGA Group18 + stda %f16, [%o0] ASI_BLK_P ! MS + add %o0, 0x40, %o0 ! A0 + add %o1, 0x40, %o1 ! A1 + membar #Sync ! MS Group26 (7-cycle stall) + + /* Now we copy the (len modulo 64) bytes at the end. + * Note how we borrow the %f0 loaded above. + * + * Also notice how this code is careful not to perform a + * load past the end of the src buffer just like similar + * code found in U3memcpy_toosmall processing. + */ +U3memcpy_loopend: + and %o2, 0x3f, %o2 ! A0 Group + andcc %o2, 0x38, %g2 ! A0 Group + be,pn %icc, U3memcpy_endcruft ! BR + subcc %g2, 0x8, %g2 ! A1 + be,pn %icc, U3memcpy_endcruft ! BR Group + cmp %g1, 0 ! A0 + + be,a,pt %icc, 1f ! BR Group + ldd [%o1 + 0x00], %f0 ! MS + +1: ldd [%o1 + 0x08], %f2 ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f0, %f2, %f8 ! FGA Group + std %f8, [%o0 + 0x00] ! MS (XXX does it stall here? XXX) + be,pn %icc, U3memcpy_endcruft ! BR + add %o0, 0x8, %o0 ! A0 + ldd [%o1 + 0x08], %f0 ! MS Group + add %o1, 0x8, %o1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA + std %f8, [%o0 + 0x00] ! MS (XXX does it stall here? XXX) + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A0 Group + + /* If anything is left, we copy it one byte at a time. + * Note that %g1 is (src & 0x3) saved above before the + * alignaddr was performed. + */ +U3memcpy_endcruft: + cmp %o2, 0 + add %o1, %g1, %o1 + VISExitHalf + be,pn %icc, U3memcpy_short_ret + nop + ba,a,pt %xcc, U3memcpy_short + + /* If we get here, then 32 <= len < (6 * 64) */ +U3memcpy_toosmall: + +#ifdef SMALL_COPY_USES_FPU + + /* Is 'dst' already aligned on an 8-byte boundary? */ + be,pt %xcc, 2f ! BR Group + + /* Compute abs((dst & 7) - 8) into %g2. This is the number + * of bytes to copy to make 'dst' 8-byte aligned. We pre- + * subtract this from 'len'. + */ + sub %g2, 0x8, %g2 ! A0 + sub %g0, %g2, %g2 ! A0 Group (reg-dep) + sub %o2, %g2, %o2 ! A0 Group (reg-dep) + + /* Copy %g2 bytes from src to dst, one byte at a time. */ +1: ldub [%o1 + 0x00], %o3 ! MS (Group) (%o3 in 3 cycles) + add %o1, 0x1, %o1 ! A1 + add %o0, 0x1, %o0 ! A0 Group + subcc %g2, 0x1, %g2 ! A1 + + bg,pt %icc, 1b ! BR Group + stb %o3, [%o0 + -1] ! MS Group + +2: VISEntryHalf ! MS+MS + + /* Compute (len - (len % 8)) into %g2. This is guarenteed + * to be nonzero. + */ + andn %o2, 0x7, %g2 ! A0 Group + + /* You may read this and believe that it allows reading + * one 8-byte longword past the end of src. It actually + * does not, as %g2 is subtracted as loads are done from + * src, so we always stop before running off the end. + * Also, we are guarenteed to have at least 0x10 bytes + * to move here. + */ + sub %g2, 0x8, %g2 ! A0 Group (reg-dep) + alignaddr %o1, %g0, %g1 ! MS (Break-after) + ldd [%g1 + 0x00], %f0 ! MS Group (1-cycle stall) + add %g1, 0x8, %g1 ! A0 + +1: ldd [%g1 + 0x00], %f2 ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + subcc %g2, 0x8, %g2 ! A0 Group + + faligndata %f0, %f2, %f8 ! FGA Group (1-cycle stall) + std %f8, [%o0 + 0x00] ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + be,pn %icc, 2f ! BR + + add %o0, 0x8, %o0 ! A1 + ldd [%g1 + 0x00], %f0 ! MS Group + add %g1, 0x8, %g1 ! A0 + sub %o2, 0x8, %o2 ! A1 + + subcc %g2, 0x8, %g2 ! A0 Group + faligndata %f2, %f0, %f8 ! FGA Group (1-cycle stall) + std %f8, [%o0 + 0x00] ! MS Group (2-cycle stall) + add %o1, 0x8, %o1 ! A0 + + bne,pn %icc, 1b ! BR + add %o0, 0x8, %o0 ! A1 + + /* Nothing left to copy? */ +2: cmp %o2, 0 ! A0 Group + VISExitHalf ! A0+MS + be,pn %icc, U3memcpy_short_ret ! BR Group + nop ! A0 + ba,a,pt %xcc, U3memcpy_short ! BR Group + +#else /* !(SMALL_COPY_USES_FPU) */ + + xor %o1, %o0, %g2 + andcc %g2, 0x7, %g0 + bne,pn %icc, U3memcpy_short + andcc %o1, 0x7, %g2 + + be,pt %xcc, 2f + sub %g2, 0x8, %g2 + sub %g0, %g2, %g2 + sub %o2, %g2, %o2 + +1: ldub [%o1 + 0x00], %o3 + add %o1, 0x1, %o1 + add %o0, 0x1, %o0 + subcc %g2, 0x1, %g2 + bg,pt %icc, 1b + stb %o3, [%o0 + -1] + +2: andn %o2, 0x7, %g2 + sub %o2, %g2, %o2 + +3: ldx [%o1 + 0x00], %o3 + add %o1, 0x8, %o1 + add %o0, 0x8, %o0 + subcc %g2, 0x8, %g2 + bg,pt %icc, 3b + stx %o3, [%o0 + -8] + + cmp %o2, 0 + bne,pn %icc, U3memcpy_short + nop + ba,a,pt %xcc, U3memcpy_short_ret + +#endif /* !(SMALL_COPY_USES_FPU) */ diff --git a/arch/sparc64/lib/VIScopy.S b/arch/sparc64/lib/VIScopy.S index 56634f83f..b944a0ae7 100644 --- a/arch/sparc64/lib/VIScopy.S +++ b/arch/sparc64/lib/VIScopy.S @@ -1,4 +1,4 @@ -/* $Id: VIScopy.S,v 1.23 2000/03/26 09:13:49 davem Exp $ +/* $Id: VIScopy.S,v 1.25 2000/11/01 09:29:19 davem Exp $ * VIScopy.S: High speed copy operations utilizing the UltraSparc * Visual Instruction Set. * @@ -361,6 +361,38 @@ bcopy: or %o0, 0, %g3 ! IEU0 Group clr %o0 ! IEU0 +#ifdef __KERNEL__ +#define BRANCH_ALWAYS 0x10680000 +#define NOP 0x01000000 +#define ULTRA3_DO_PATCH(OLD, NEW) \ + sethi %hi(NEW), %g1; \ + or %g1, %lo(NEW), %g1; \ + sethi %hi(OLD), %g2; \ + or %g2, %lo(OLD), %g2; \ + sub %g1, %g2, %g1; \ + sethi %hi(BRANCH_ALWAYS), %g3; \ + srl %g1, 2, %g1; \ + or %g3, %lo(BRANCH_ALWAYS), %g3; \ + or %g3, %g1, %g3; \ + stw %g3, [%g2]; \ + sethi %hi(NOP), %g3; \ + or %g3, %lo(NOP), %g3; \ + stw %g3, [%g2 + 0x4]; \ + flush %g2; + + .globl cheetah_patch_copyops +cheetah_patch_copyops: + ULTRA3_DO_PATCH(memcpy, U3memcpy) + ULTRA3_DO_PATCH(__copy_from_user, U3copy_from_user) + ULTRA3_DO_PATCH(__copy_to_user, U3copy_to_user) + ULTRA3_DO_PATCH(__copy_in_user, U3copy_in_user) + retl + nop +#undef BRANCH_ALWAYS +#undef NOP +#undef ULTRA3_DO_PATCH +#endif /* __KERNEL__ */ + .align 32 #ifdef __KERNEL__ __memcpy_384plus: diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 65fbd6e37..6da2d0b85 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.157 2000/10/19 00:49:52 davem Exp $ +/* $Id: init.c,v 1.159 2000/11/06 06:59:04 davem Exp $ * arch/sparc64/mm/init.c * * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu) @@ -99,6 +99,20 @@ int do_check_pgt_cache(int low, int high) return freed; } +extern void __update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); + +void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) +{ + struct page *page = pte_page(pte); + + if (VALID_PAGE(page) && page->mapping && + test_bit(PG_dcache_dirty, &page->flags)) { + __flush_dcache_page(page->virtual, 1); + clear_bit(PG_dcache_dirty, &page->flags); + } + __update_mmu_cache(vma, address, pte); +} + /* * BAD_PAGE is the page that is used for page faults when linux * is out-of-memory. Older versions of linux just did a diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 7940218d2..daaf580a0 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S @@ -1,4 +1,4 @@ -/* $Id: ultra.S,v 1.46 2000/08/05 13:30:33 davem Exp $ +/* $Id: ultra.S,v 1.48 2000/11/06 06:59:04 davem Exp $ * ultra.S: Don't expand these all over the place... * * Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com) @@ -208,27 +208,58 @@ iflush2:sub %o1, 0x20, %g3 .align 64 .globl __flush_dcache_page -__flush_dcache_page: +__flush_dcache_page: /* %o0=kaddr, %o1=flush_icache */ sub %o0, %g4, %o0 - clr %o1 + clr %o4 srlx %o0, 11, %o0 sethi %hi(1 << 14), %o2 -1: ldxa [%o1] ASI_DCACHE_TAG, %o3 - andn %o3, 0x3, %o3 - cmp %o0, %o3 - bne,pt %xcc, 2f - nop - stxa %g0, [%o1] ASI_DCACHE_TAG - membar #Sync -2: add %o1, (1 << 5), %o1 - cmp %o1, %o2 - bne,pt %xcc, 1b - nop +1: ldxa [%o4] ASI_DCACHE_TAG, %o3 ! LSU Group + add %o4, (1 << 5), %o4 ! IEU0 + ldxa [%o4] ASI_DCACHE_TAG, %g1 ! LSU Group + add %o4, (1 << 5), %o4 ! IEU0 + ldxa [%o4] ASI_DCACHE_TAG, %g2 ! LSU Group o3 available + add %o4, (1 << 5), %o4 ! IEU0 + andn %o3, 0x3, %o3 ! IEU1 + ldxa [%o4] ASI_DCACHE_TAG, %g3 ! LSU Group + add %o4, (1 << 5), %o4 ! IEU0 + andn %g1, 0x3, %g1 ! IEU1 + cmp %o0, %o3 ! IEU1 Group + be,a,pn %xcc, dflush1 ! CTI + sub %o4, (4 << 5), %o4 ! IEU0 (Group) + cmp %o0, %g1 ! IEU1 Group + andn %g2, 0x3, %g2 ! IEU0 + be,a,pn %xcc, dflush2 ! CTI + sub %o4, (3 << 5), %o4 ! IEU0 (Group) + cmp %o0, %g2 ! IEU1 Group + andn %g3, 0x3, %g3 ! IEU0 + be,a,pn %xcc, dflush3 ! CTI + sub %o4, (2 << 5), %o4 ! IEU0 (Group) + cmp %o0, %g3 ! IEU1 Group + be,a,pn %xcc, dflush4 ! CTI + sub %o4, (1 << 5), %o4 ! IEU0 +2: cmp %o4, %o2 ! IEU1 Group + bne,pt %xcc, 1b ! CTI + nop ! IEU0 + /* The I-cache does not snoop local stores so we - * better flush that too. + * better flush that too when necessary. */ - ba,pt %xcc, __flush_icache_page + brnz,pt %o1, __flush_icache_page sllx %o0, 11, %o0 + retl + nop + +dflush1:stxa %g0, [%o4] ASI_DCACHE_TAG + add %o4, (1 << 5), %o4 +dflush2:stxa %g0, [%o4] ASI_DCACHE_TAG + add %o4, (1 << 5), %o4 +dflush3:stxa %g0, [%o4] ASI_DCACHE_TAG + add %o4, (1 << 5), %o4 +dflush4:stxa %g0, [%o4] ASI_DCACHE_TAG + add %o4, (1 << 5), %o4 + membar #Sync + ba,pt %xcc, 2b + nop .align 32 __prefill_dtlb: @@ -250,8 +281,8 @@ __prefill_itlb: retl wrpr %g7, %pstate - .globl update_mmu_cache -update_mmu_cache: /* %o0=vma, %o1=address, %o2=pte */ + .globl __update_mmu_cache +__update_mmu_cache: /* %o0=vma, %o1=address, %o2=pte */ ldub [%g6 + AOFF_task_thread + AOFF_thread_fault_code], %o3 srlx %o1, 13, %o1 ldx [%o0 + 0x0], %o4 /* XXX vma->vm_mm */ diff --git a/arch/sparc64/solaris/ioctl.c b/arch/sparc64/solaris/ioctl.c index 0e899da18..4a10c1b4c 100644 --- a/arch/sparc64/solaris/ioctl.c +++ b/arch/sparc64/solaris/ioctl.c @@ -464,8 +464,8 @@ static inline int solaris_S(struct file *filp, unsigned int fd, unsigned int cmd struct sol_socket_struct *sock; struct module_info *mi; - if (! (ino = filp->f_dentry->d_inode) || - ! ino->i_sock) + ino = filp->f_dentry->d_inode; + if (! ino->i_sock) return -EBADF; sock = filp->private_data; if (! sock) { diff --git a/arch/sparc64/solaris/socket.c b/arch/sparc64/solaris/socket.c index 3013d43cf..9b910a633 100644 --- a/arch/sparc64/solaris/socket.c +++ b/arch/sparc64/solaris/socket.c @@ -265,7 +265,7 @@ extern __inline__ struct socket *sockfd_lookup(int fd, int *err) } inode = file->f_dentry->d_inode; - if (!inode || !inode->i_sock || !socki_lookup(inode)) { + if (!inode->i_sock || !socki_lookup(inode)) { *err = -ENOTSOCK; fput(file); return NULL; diff --git a/arch/sparc64/vmlinux.lds b/arch/sparc64/vmlinux.lds index f686decfb..91d4575d0 100644 --- a/arch/sparc64/vmlinux.lds +++ b/arch/sparc64/vmlinux.lds @@ -35,6 +35,9 @@ SECTIONS __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; __kstrtab : { *(.kstrtab) } + __start___kallsyms = .; /* All kernel symbols */ + __kallsyms : { *(__kallsyms) } + __stop___kallsyms = .; . = ALIGN(8192); __init_begin = .; .text.init : { *(.text.init) } |