summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/config.in8
-rw-r--r--arch/i386/defconfig1
-rw-r--r--arch/i386/kernel/microcode.c4
-rw-r--r--arch/i386/kernel/setup.c3
-rw-r--r--arch/i386/kernel/signal.c1
-rw-r--r--arch/i386/kernel/traps.c179
-rw-r--r--arch/i386/kernel/vm86.c12
-rw-r--r--arch/mips/kernel/fpe.c6
-rw-r--r--arch/mips/kernel/irixioctl.c10
-rw-r--r--arch/mips/kernel/irixsig.c95
-rw-r--r--arch/mips/kernel/signal.c4
-rw-r--r--arch/mips/kernel/sysmips.c12
-rw-r--r--arch/mips/kernel/traps.c15
-rw-r--r--arch/mips64/kernel/signal.c4
-rw-r--r--arch/mips64/kernel/signal32.c4
-rw-r--r--arch/mips64/kernel/traps.c13
-rw-r--r--arch/sparc/config.in2
-rw-r--r--arch/sparc/defconfig8
-rw-r--r--arch/sparc/kernel/Makefile4
-rw-r--r--arch/sparc/kernel/irq.c24
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c23
-rw-r--r--arch/sparc/kernel/sys_sparc.c2
-rw-r--r--arch/sparc/kernel/sys_sunos.c4
-rw-r--r--arch/sparc/mm/srmmu.c8
-rw-r--r--arch/sparc/mm/sun4c.c5
-rw-r--r--arch/sparc/vmlinux.lds2
-rw-r--r--arch/sparc64/config.in2
-rw-r--r--arch/sparc64/defconfig6
-rw-r--r--arch/sparc64/kernel/Makefile5
-rw-r--r--arch/sparc64/kernel/irq.c16
-rw-r--r--arch/sparc64/kernel/process.c6
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c8
-rw-r--r--arch/sparc64/kernel/sys_sparc.c2
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c2
-rw-r--r--arch/sparc64/kernel/sys_sunos32.c2
-rw-r--r--arch/sparc64/prom/misc.c6
-rw-r--r--arch/sparc64/solaris/fs.c2
-rw-r--r--arch/sparc64/solaris/misc.c2
-rw-r--r--arch/sparc64/vmlinux.lds2
39 files changed, 238 insertions, 276 deletions
diff --git a/arch/i386/config.in b/arch/i386/config.in
index 81cd0241d..7344e802c 100644
--- a/arch/i386/config.in
+++ b/arch/i386/config.in
@@ -21,7 +21,7 @@ choice 'Processor family' \
"386 CONFIG_M386 \
486 CONFIG_M486 \
586/K5/5x86/6x86/6x86MX CONFIG_M586 \
- Pentium/Pentium-MMX CONFIG_M586TSC \
+ Pentium-Classic/Pentium-MMX CONFIG_M586TSC \
Pentium-Pro/Celeron/Pentium-II CONFIG_M686 \
Pentium-III CONFIG_M686FXSR \
K6/K6-II/K6-III CONFIG_MK6 \
@@ -29,7 +29,7 @@ choice 'Processor family' \
Crusoe CONFIG_MCRUSOE \
Winchip-C6 CONFIG_MWINCHIPC6 \
Winchip-2 CONFIG_MWINCHIP2 \
- Winchip-2A/3 CONFIG_MWINCHIP3D" Pentium-Pro
+ Winchip-2A/Winchip-3 CONFIG_MWINCHIP3D" Pentium-Pro
#
# Define implied options from the CPU selection here
#
@@ -73,8 +73,6 @@ if [ "$CONFIG_M686FXSR" = "y" ]; then
define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
define_bool CONFIG_X86_FXSR y
define_bool CONFIG_X86_XMM y
-else
- define_bool CONFIG_X86_FXSR n
fi
if [ "$CONFIG_MK6" = "y" ]; then
define_int CONFIG_X86_L1_CACHE_BYTES 32
@@ -209,7 +207,7 @@ tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
bool 'Power Management support' CONFIG_PM
-bool ' ACPI support' CONFIG_ACPI $CONFIG_PM
+dep_bool ' ACPI support' CONFIG_ACPI $CONFIG_PM
if [ "$CONFIG_ACPI" != "n" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
bool ' ACPI interpreter (EXPERIMENTAL)' CONFIG_ACPI_INTERPRETER
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index ee4f04c6a..068aceaf2 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -36,7 +36,6 @@ CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_PGE=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
-# CONFIG_X86_FXSR is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index 7d7a58741..c693b2dc2 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -11,6 +11,8 @@
*
* http://developer.intel.com/design/pentiumii/manuals/243192.htm
*
+ * For more information, go to http://www.urbanmyth.org/microcode
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
@@ -226,7 +228,7 @@ static void do_update_one(void *arg)
}
wrmsr(0x79, (unsigned int)(m->bits), 0);
- __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx", "cc");
+ __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
rdmsr(0x8B, val[0], val[1]);
req->err = 0;
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 771caa7e7..dc61a920b 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1635,7 +1635,8 @@ int get_cpuinfo(char * buffer)
x86_cap_flags[10] = "sep";
if (c->x86 < 6)
x86_cap_flags[16] = "fcmov";
- x86_cap_flags[16] = "pat";
+ else
+ x86_cap_flags[16] = "pat";
x86_cap_flags[22] = "mmxext";
x86_cap_flags[24] = "fxsr";
x86_cap_flags[30] = "3dnowext";
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
index cc4843b8a..116816f1f 100644
--- a/arch/i386/kernel/signal.c
+++ b/arch/i386/kernel/signal.c
@@ -682,7 +682,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
/* FALLTHRU */
default:
- lock_kernel();
sigaddset(&current->signal, signr);
recalc_sigpending(current);
current->flags |= PF_SIGNALED;
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 370c89385..a9ea15597 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -19,8 +19,6 @@
#include <linux/ptrace.h>
#include <linux/timer.h>
#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
@@ -77,68 +75,6 @@ static inline void console_verbose(void)
console_loglevel = 15;
}
-#define DO_ERROR(trapnr, signr, str, name, tsk) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- die_if_no_fixup(str,regs,error_code); \
- force_sig(signr, tsk); \
-}
-
-#define DO_ERROR_INFO(trapnr, signr, str, name, tsk, sicode, siaddr) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- siginfo_t info; \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- die_if_no_fixup(str,regs,error_code); \
- info.si_signo = signr; \
- info.si_errno = 0; \
- info.si_code = sicode; \
- info.si_addr = (void *)siaddr; \
- force_sig_info(signr, &info, tsk); \
-}
-
-#define DO_VM86_ERROR(trapnr, signr, str, name, tsk) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- lock_kernel(); \
- if (regs->eflags & VM_MASK) { \
- if (!handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr)) \
- goto out; \
- /* else fall through */ \
- } \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- force_sig(signr, tsk); \
- die_if_kernel(str,regs,error_code); \
-out: \
- unlock_kernel(); \
-}
-
-#define DO_VM86_ERROR_INFO(trapnr, signr, str, name, tsk, sicode, siaddr) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
-{ \
- siginfo_t info; \
- lock_kernel(); \
- if (regs->eflags & VM_MASK) { \
- if (!handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr)) \
- goto out; \
- /* else fall through */ \
- } \
- tsk->thread.error_code = error_code; \
- tsk->thread.trap_no = trapnr; \
- info.si_signo = signr; \
- info.si_errno = 0; \
- info.si_code = sicode; \
- info.si_addr = (void *)siaddr; \
- force_sig_info(signr, &info, tsk); \
- die_if_kernel(str,regs,error_code); \
-out: \
- unlock_kernel(); \
-}
-
asmlinkage void divide_error(void);
asmlinkage void debug(void);
asmlinkage void nmi(void);
@@ -285,20 +221,6 @@ static inline void die_if_kernel(const char * str, struct pt_regs * regs, long e
die(str, regs, err);
}
-static void die_if_no_fixup(const char * str, struct pt_regs * regs, long err)
-{
- if (!(regs->eflags & VM_MASK) && !(3 & regs->xcs))
- {
- unsigned long fixup;
- fixup = search_exception_table(regs->eip);
- if (fixup) {
- regs->eip = fixup;
- return;
- }
- die(str, regs, err);
- }
-}
-
static inline unsigned long get_cr2(void)
{
unsigned long address;
@@ -308,19 +230,88 @@ static inline unsigned long get_cr2(void)
return address;
}
-DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, current, FPE_INTDIV, regs->eip)
-DO_VM86_ERROR( 3, SIGTRAP, "int3", int3, current)
-DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow, current)
-DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds, current)
-DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, current, ILL_ILLOPN, regs->eip)
-DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available, current)
-DO_ERROR( 8, SIGSEGV, "double fault", double_fault, current)
-DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun, current)
-DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS, current)
-DO_ERROR(11, SIGBUS, "segment not present", segment_not_present, current)
-DO_ERROR(12, SIGBUS, "stack segment", stack_segment, current)
-DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, current, BUS_ADRALN, get_cr2())
-DO_ERROR(18, SIGSEGV, "reserved", reserved, current)
+static void inline do_trap(int trapnr, int signr, char *str, int vm86,
+ struct pt_regs * regs, long error_code, siginfo_t *info)
+{
+ if (vm86 && regs->eflags & VM_MASK)
+ goto vm86_trap;
+ if (!(regs->xcs & 3))
+ goto kernel_trap;
+
+ trap_signal: {
+ struct task_struct *tsk = current;
+ tsk->thread.error_code = error_code;
+ tsk->thread.trap_no = trapnr;
+ if (info)
+ force_sig_info(signr, info, tsk);
+ else
+ force_sig(signr, tsk);
+ return;
+ }
+
+ kernel_trap: {
+ unsigned long fixup = search_exception_table(regs->eip);
+ if (fixup)
+ regs->eip = fixup;
+ else
+ die(str, regs, error_code);
+ return;
+ }
+
+ vm86_trap: {
+ int ret = handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, trapnr);
+ if (ret) goto trap_signal;
+ return;
+ }
+}
+
+#define DO_ERROR(trapnr, signr, str, name) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \
+}
+
+#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ siginfo_t info; \
+ info.si_signo = signr; \
+ info.si_errno = 0; \
+ info.si_code = sicode; \
+ info.si_addr = (void *)siaddr; \
+ do_trap(trapnr, signr, str, 0, regs, error_code, &info); \
+}
+
+#define DO_VM86_ERROR(trapnr, signr, str, name) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ do_trap(trapnr, signr, str, 1, regs, error_code, NULL); \
+}
+
+#define DO_VM86_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
+asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+{ \
+ siginfo_t info; \
+ info.si_signo = signr; \
+ info.si_errno = 0; \
+ info.si_code = sicode; \
+ info.si_addr = (void *)siaddr; \
+ do_trap(trapnr, signr, str, 1, regs, error_code, &info); \
+}
+
+DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->eip)
+DO_VM86_ERROR( 3, SIGTRAP, "int3", int3)
+DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
+DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
+DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, ILL_ILLOPN, regs->eip)
+DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available)
+DO_ERROR( 8, SIGSEGV, "double fault", double_fault)
+DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun)
+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)
{
@@ -336,9 +327,7 @@ asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
return;
gp_in_vm86:
- lock_kernel();
handle_vm86_fault((struct kernel_vm86_regs *) regs, error_code);
- unlock_kernel();
return;
gp_in_kernel:
@@ -561,9 +550,7 @@ asmlinkage void do_debug(struct pt_regs * regs, long error_code)
return;
debug_vm86:
- lock_kernel();
handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1);
- unlock_kernel();
return;
clear_dr7:
@@ -752,12 +739,10 @@ asmlinkage void math_state_restore(struct pt_regs regs)
asmlinkage void math_emulate(long arg)
{
- lock_kernel();
printk("math-emulation not enabled and no coprocessor found.\n");
printk("killing %s.\n",current->comm);
force_sig(SIGFPE,current);
schedule();
- unlock_kernel();
}
#endif /* CONFIG_MATH_EMULATION */
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
index fa803c165..9875a3bdb 100644
--- a/arch/i386/kernel/vm86.c
+++ b/arch/i386/kernel/vm86.c
@@ -69,7 +69,6 @@ struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs)
struct pt_regs *ret;
unsigned long tmp;
- lock_kernel();
if (!current->thread.vm86_info) {
printk("no vm86_info: BAD\n");
do_exit(SIGSEGV);
@@ -87,7 +86,6 @@ struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs)
tss->esp0 = current->thread.esp0 = current->thread.saved_esp0;
current->thread.saved_esp0 = 0;
ret = KVM86->regs32;
- unlock_kernel();
return ret;
}
@@ -138,7 +136,6 @@ asmlinkage int sys_vm86old(struct vm86_struct * v86)
struct task_struct *tsk;
int tmp, ret = -EPERM;
- lock_kernel();
tsk = current;
if (tsk->thread.saved_esp0)
goto out;
@@ -154,7 +151,6 @@ asmlinkage int sys_vm86old(struct vm86_struct * v86)
do_sys_vm86(&info, tsk);
ret = 0; /* we never return here */
out:
- unlock_kernel();
return ret;
}
@@ -169,7 +165,6 @@ asmlinkage int sys_vm86(unsigned long subfunction, struct vm86plus_struct * v86)
struct task_struct *tsk;
int tmp, ret;
- lock_kernel();
tsk = current;
switch (subfunction) {
case VM86_REQUEST_IRQ:
@@ -204,7 +199,6 @@ asmlinkage int sys_vm86(unsigned long subfunction, struct vm86plus_struct * v86)
do_sys_vm86(&info, tsk);
ret = 0; /* we never return here */
out:
- unlock_kernel();
return ret;
}
@@ -258,7 +252,6 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
tsk->thread.screen_bitmap = info->screen_bitmap;
if (info->flags & VM86_SCREEN_BITMAP)
mark_screen_rdonly(tsk);
- unlock_kernel();
__asm__ __volatile__(
"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t"
"movl %0,%%esp\n\t"
@@ -274,7 +267,6 @@ static inline void return_to_32bit(struct kernel_vm86_regs * regs16, int retval)
regs32 = save_v86_state(regs16);
regs32->eax = retval;
- unlock_kernel();
__asm__ __volatile__("movl %0,%%esp\n\t"
"jmp ret_from_sys_call"
: : "r" (regs32), "b" (current));
@@ -432,7 +424,6 @@ cannot_handle:
return_to_32bit(regs, VM86_INTx + (i << 8));
}
-/* This must be called with the kernel lock held. */
int handle_vm86_trap(struct kernel_vm86_regs * regs, long error_code, int trapno)
{
if (VMPI.is_vm86pus) {
@@ -456,7 +447,6 @@ int handle_vm86_trap(struct kernel_vm86_regs * regs, long error_code, int trapno
return 0;
}
-/* This must be called with the kernel lock held. */
void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
{
unsigned char *csp, *ssp;
@@ -586,7 +576,6 @@ static void irq_handler(int intno, void *dev_id, struct pt_regs * regs) {
int irq_bit;
unsigned long flags;
- lock_kernel();
save_flags(flags);
cli();
irq_bit = 1 << intno;
@@ -598,7 +587,6 @@ static void irq_handler(int intno, void *dev_id, struct pt_regs * regs) {
/* else user will poll for IRQs */
out:
restore_flags(flags);
- unlock_kernel();
}
static inline void free_vm86_irq(int irqnumber)
diff --git a/arch/mips/kernel/fpe.c b/arch/mips/kernel/fpe.c
index 66703471c..2d82d8c31 100644
--- a/arch/mips/kernel/fpe.c
+++ b/arch/mips/kernel/fpe.c
@@ -4,9 +4,7 @@
* in the kernel space a lot easier. So far this handler in the released
* kernel source is just a dummy.
*
- * Copyright (C) 1997 Ralf Baechle
- *
- * $Id: fpe.c,v 1.3 1998/04/05 11:23:50 ralf Exp $
+ * Copyright (C) 1997, 2000 Ralf Baechle
*/
#include <linux/kernel.h>
#include <linux/module.h>
@@ -24,7 +22,6 @@ MODULE_SUPPORTED_DEVICE("MIPS FPU");
static void do_fpe(struct pt_regs *regs, unsigned int fcr31)
{
- lock_kernel();
#ifdef CONF_DEBUG_EXCEPTIONS
show_regs(regs);
#endif
@@ -34,7 +31,6 @@ static void do_fpe(struct pt_regs *regs, unsigned int fcr31)
goto out;
force_sig(SIGFPE, current);
out:
- unlock_kernel();
}
/*
diff --git a/arch/mips/kernel/irixioctl.c b/arch/mips/kernel/irixioctl.c
index 10ca5b15e..a30ae52c7 100644
--- a/arch/mips/kernel/irixioctl.c
+++ b/arch/mips/kernel/irixioctl.c
@@ -1,4 +1,4 @@
-/* $Id: irixioctl.c,v 1.6 1999/02/06 05:12:56 adevries Exp $
+/*
* irixioctl.c: A fucking mess...
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
@@ -48,7 +48,7 @@ static struct tty_struct *get_tty(int fd)
static struct tty_struct *get_real_tty(struct tty_struct *tp)
{
- if(tp->driver.type == TTY_DRIVER_TYPE_PTY &&
+ if (tp->driver.type == TTY_DRIVER_TYPE_PTY &&
tp->driver.subtype == PTY_TYPE_MASTER)
return tp->link;
else
@@ -61,7 +61,6 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
mm_segment_t old_fs;
int error = 0;
- lock_kernel();
#ifdef DEBUG_IOCTLS
printk("[%s:%d] irix_ioctl(%d, ", current->comm, current->pid, fd);
#endif
@@ -87,7 +86,7 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
old_fs = get_fs(); set_fs(get_ds());
error = sys_ioctl(fd, TCGETS, (unsigned long) &kt);
set_fs(old_fs);
- if(error)
+ if (error)
break;
__put_user(kt.c_iflag, &it->c_iflag);
__put_user(kt.c_oflag, &it->c_oflag);
@@ -106,7 +105,7 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
#ifdef DEBUG_IOCTLS
printk("TCSETS, %08lx) ", arg);
#endif
- if(!access_ok(VERIFY_READ, it, sizeof(*it))) {
+ if (!access_ok(VERIFY_READ, it, sizeof(*it))) {
error = -EFAULT;
break;
}
@@ -259,6 +258,5 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
#ifdef DEBUG_IOCTLS
printk("error=%d\n", error);
#endif
- unlock_kernel();
return error;
}
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index ffebb5037..7254ee95d 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -2,10 +2,9 @@
* irixsig.c: WHEEE, IRIX signals! YOW, am I compatable or what?!?!
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * $Id: irixsig.c,v 1.13 1999/10/09 00:00:58 ralf Exp $
+ * Copyright (C) 1997 - 2000 Ralf Baechle (ralf@gnu.org)
+ * Copyright (C) 2000 Silicon Graphics, Inc.
*/
-
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
@@ -132,10 +131,8 @@ static void inline
setup_irix_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
int signr, sigset_t *oldmask, siginfo_t *info)
{
- lock_kernel();
printk("Aiee: setup_tr_frame wants to be written");
do_exit(SIGSEGV);
- unlock_kernel();
}
static inline void handle_signal(unsigned long sig, struct k_sigaction *ka,
@@ -267,8 +264,8 @@ asmlinkage int do_irix_signal(sigset_t *oldset, struct pt_regs *regs)
/* FALLTHRU */
default:
- lock_kernel();
sigaddset(&current->signal, signr);
+ recalc_sigpending(current);
current->flags |= PF_SIGNALED;
do_exit(exit_code);
/* NOTREACHED */
@@ -432,23 +429,24 @@ irix_sigaction(int sig, const struct sigaction *act,
asmlinkage int irix_sigpending(irix_sigset_t *set)
{
- lock_kernel();
+ int err;
+
if (verify_area(VERIFY_WRITE, set, sizeof(*set)) < 0)
return -EFAULT;
/* fill in "set" with signals pending but blocked. */
spin_lock_irq(&current->sigmask_lock);
- __put_user(current->blocked.sig[0] & current->signal.sig[0],
- &set->sig[0]);
- __put_user(current->blocked.sig[1] & current->signal.sig[1],
- &set->sig[1]);
- __put_user(current->blocked.sig[2] & current->signal.sig[2],
- &set->sig[2]);
- __put_user(current->blocked.sig[3] & current->signal.sig[3],
- &set->sig[3]);
+ err = __put_user(current->blocked.sig[0] & current->signal.sig[0],
+ &set->sig[0]);
+ err |= __put_user(current->blocked.sig[1] & current->signal.sig[1],
+ &set->sig[1]);
+ err |= __put_user(current->blocked.sig[2] & current->signal.sig[2],
+ &set->sig[2]);
+ err |= __put_user(current->blocked.sig[3] & current->signal.sig[3],
+ &set->sig[3]);
spin_unlock_irq(&current->sigmask_lock);
- return 0;
+ return err;
}
asmlinkage int irix_sigprocmask(int how, irix_sigset_t *new, irix_sigset_t *old)
@@ -456,10 +454,9 @@ asmlinkage int irix_sigprocmask(int how, irix_sigset_t *new, irix_sigset_t *old)
sigset_t oldbits, newbits;
int error;
-
- if(new) {
+ if (new) {
error = verify_area(VERIFY_READ, new, sizeof(*new));
- if(error)
+ if (error)
return error;
__copy_from_user(&newbits, new, sizeof(unsigned long)*4);
sigdelsetmask(&newbits, ~_BLOCKABLE);
@@ -568,7 +565,6 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info,
sigset_t kset;
int i, sig, error, timeo = 0;
- lock_kernel();
#ifdef DEBUG_SIG
printk("[%s:%d] irix_sigpoll_sys(%p,%p,%p)\n",
current->comm, current->pid, set, info, tp);
@@ -639,7 +635,6 @@ asmlinkage int irix_sigpoll_sys(unsigned long *set, struct irix5_siginfo *info,
error = -EINTR;
out:
- unlock_kernel();
return error;
}
@@ -665,39 +660,40 @@ asmlinkage int irix_waitsys(int type, int pid, struct irix5_siginfo *info,
DECLARE_WAITQUEUE(wait, current);
struct task_struct *p;
- lock_kernel();
- if(!info) {
+ if (!info) {
retval = -EINVAL;
goto out;
}
retval = verify_area(VERIFY_WRITE, info, sizeof(*info));
if(retval)
goto out;
- if(ru) {
+ if (ru) {
retval = verify_area(VERIFY_WRITE, ru, sizeof(*ru));
if(retval)
goto out;
}
- if(options & ~(W_MASK)) {
+ if (options & ~(W_MASK)) {
retval = -EINVAL;
goto out;
}
- if(type != P_PID && type != P_PGID && type != P_ALL) {
+ if (type != P_PID && type != P_PGID && type != P_ALL) {
retval = -EINVAL;
goto out;
}
add_wait_queue(&current->wait_chldexit, &wait);
repeat:
flag = 0;
- for(p = current->p_cptr; p; p = p->p_osptr) {
- if((type == P_PID) && p->pid != pid)
+ current->state = TASK_INTERRUPTIBLE;
+ read_lock(&tasklist_lock);
+ for (p = current->p_cptr; p; p = p->p_osptr) {
+ if ((type == P_PID) && p->pid != pid)
continue;
- if((type == P_PGID) && p->pgrp != pid)
+ if ((type == P_PGID) && p->pgrp != pid)
continue;
- if((p->exit_signal != SIGCHLD))
+ if ((p->exit_signal != SIGCHLD))
continue;
flag = 1;
- switch(p->state) {
+ switch (p->state) {
case TASK_STOPPED:
if (!p->exit_code)
continue;
@@ -743,12 +739,13 @@ repeat:
continue;
}
}
- if(flag) {
+ read_unlock(&tasklist_lock);
+ if (flag) {
retval = 0;
- if(options & W_NOHANG)
+ if (options & W_NOHANG)
goto end_waitsys;
retval = -ERESTARTSYS;
- if(signal_pending(current))
+ if (signal_pending(current))
goto end_waitsys;
current->state = TASK_INTERRUPTIBLE;
schedule();
@@ -756,10 +753,10 @@ repeat:
}
retval = -ECHILD;
end_waitsys:
+ current->state = TASK_RUNNING;
remove_wait_queue(&current->wait_chldexit, &wait);
out:
- unlock_kernel();
return retval;
}
@@ -782,8 +779,7 @@ asmlinkage int irix_getcontext(struct pt_regs *regs)
struct irix5_context *ctx;
unsigned long flags;
- lock_kernel();
- if(regs->regs[2] == 1000)
+ if (regs->regs[2] == 1000)
base = 1;
ctx = (struct irix5_context *) regs->regs[base + 4];
@@ -806,7 +802,7 @@ asmlinkage int irix_getcontext(struct pt_regs *regs)
__put_user(0, &ctx->weird_graphics_thing);
__put_user(0, &ctx->regs[0]);
- for(i = 1; i < 32; i++)
+ for (i = 1; i < 32; i++)
__put_user(regs->regs[i], &ctx->regs[i]);
__put_user(regs->lo, &ctx->regs[32]);
__put_user(regs->hi, &ctx->regs[33]);
@@ -824,7 +820,6 @@ asmlinkage int irix_getcontext(struct pt_regs *regs)
error = 0;
out:
- unlock_kernel();
return error;
}
@@ -833,7 +828,6 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs)
int error, base = 0;
struct irix5_context *ctx;
- lock_kernel();
if(regs->regs[2] == 1000)
base = 1;
ctx = (struct irix5_context *) regs->regs[base + 4];
@@ -844,15 +838,15 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs)
#endif
error = verify_area(VERIFY_READ, ctx, sizeof(*ctx));
- if(error)
+ if (error)
goto out;
- if(ctx->flags & 0x02) {
+ if (ctx->flags & 0x02) {
/* XXX sigstack garbage, todo... */
printk("Wheee, cannot do sigstack stuff in setcontext\n");
}
- if(ctx->flags & 0x04) {
+ if (ctx->flags & 0x04) {
int i;
/* XXX extra control block stuff... todo... */
@@ -863,7 +857,7 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs)
regs->cp0_epc = ctx->regs[35];
}
- if(ctx->flags & 0x08) {
+ if (ctx->flags & 0x08) {
/* XXX fpu context, blah... */
printk("Wheee, cannot restore FPU context yet...\n");
}
@@ -871,7 +865,6 @@ asmlinkage unsigned long irix_setcontext(struct pt_regs *regs)
error = regs->regs[2];
out:
- unlock_kernel();
return error;
}
@@ -881,7 +874,6 @@ asmlinkage int irix_sigstack(struct irix_sigstack *new, struct irix_sigstack *ol
{
int error;
- lock_kernel();
#ifdef DEBUG_SIG
printk("[%s:%d] irix_sigstack(%p,%p)\n",
current->comm, current->pid, new, old);
@@ -898,8 +890,8 @@ asmlinkage int irix_sigstack(struct irix_sigstack *new, struct irix_sigstack *ol
goto out;
}
error = 0;
+
out:
- unlock_kernel();
return error;
}
@@ -910,18 +902,17 @@ asmlinkage int irix_sigaltstack(struct irix_sigaltstack *new,
{
int error;
- lock_kernel();
#ifdef DEBUG_SIG
printk("[%s:%d] irix_sigaltstack(%p,%p)\n",
current->comm, current->pid, new, old);
#endif
- if(new) {
+ if (new) {
error = verify_area(VERIFY_READ, new, sizeof(*new));
if(error)
goto out;
}
- if(old) {
+ if (old) {
error = verify_area(VERIFY_WRITE, old, sizeof(*old));
if(error)
goto out;
@@ -930,7 +921,6 @@ asmlinkage int irix_sigaltstack(struct irix_sigaltstack *new,
out:
error = 0;
- unlock_kernel();
return error;
}
@@ -943,7 +933,6 @@ asmlinkage int irix_sigsendset(struct irix_procset *pset, int sig)
{
int error;
- lock_kernel();
error = verify_area(VERIFY_READ, pset, sizeof(*pset));
if(error)
goto out;
@@ -953,10 +942,8 @@ asmlinkage int irix_sigsendset(struct irix_procset *pset, int sig)
pset->cmd, pset->ltype, pset->lid, pset->rtype, pset->rid,
sig);
#endif
-
error = -EINVAL;
out:
- unlock_kernel();
return error;
}
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 18abc6699..5a9992141 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -1,5 +1,4 @@
-/* $Id: signal.c,v 1.24 2000/02/04 07:40:23 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -663,7 +662,6 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
/* FALLTHRU */
default:
- lock_kernel();
sigaddset(&current->signal, signr);
recalc_sigpending(current);
current->flags |= PF_SIGNALED;
diff --git a/arch/mips/kernel/sysmips.c b/arch/mips/kernel/sysmips.c
index 1602013ec..c9058df2c 100644
--- a/arch/mips/kernel/sysmips.c
+++ b/arch/mips/kernel/sysmips.c
@@ -5,9 +5,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
- *
- * $Id: sysmips.c,v 1.8 2000/02/05 06:47:08 ralf Exp $
+ * Copyright (C) 1995, 1996, 1997, 2000 by Ralf Baechle
*/
#include <linux/errno.h>
#include <linux/linkage.h>
@@ -53,9 +51,7 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3)
char *name;
int flags, tmp, len, retval;
- lock_kernel();
- switch(cmd)
- {
+ switch(cmd) {
case SETNAME:
retval = -EPERM;
if (!capable(CAP_SYS_ADMIN))
@@ -72,9 +68,10 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3)
if (len == 0 || len > __NEW_UTS_LEN)
goto out;
- /* Fiiiixmeeee... */
copy_from_user(system_utsname.nodename, name, len);
+ down_write(&uts_sem);
system_utsname.nodename[len] = '\0';
+ up_write(&uts_sem);
retval = 0;
goto out;
@@ -112,7 +109,6 @@ sys_sysmips(int cmd, int arg1, int arg2, int arg3)
}
out:
- unlock_kernel();
return retval;
}
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 3af7202f7..bc1bd5749 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1,5 +1,4 @@
-/* $Id: traps.c,v 1.28 2000/03/13 10:33:02 raiko Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -332,7 +331,6 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
return;
}
#endif
- lock_kernel();
if (fcr31 & 0x20000) {
/* Retry instruction with flush to zero ... */
if (!(fcr31 & (1<<24))) {
@@ -344,7 +342,7 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
"ctc1\t%0,$31"
: /* No outputs */
: "r" (fcr31));
- goto out;
+ return;
}
pc = regs->cp0_epc + ((regs->cp0_cause & CAUSEF_BD) ? 4 : 0);
if (get_user(insn, (unsigned int *)pc)) {
@@ -358,12 +356,9 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
}
if (compute_return_epc(regs))
- goto out;
+ return;
//force_sig(SIGFPE, current);
printk(KERN_DEBUG "Should send SIGFPE to %s\n", current->comm);
-
-out:
- unlock_kernel();
}
static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode)
@@ -430,7 +425,6 @@ void do_ri(struct pt_regs *regs)
{
unsigned int opcode;
- lock_kernel();
if (!get_insn_opcode(regs, &opcode)) {
if ((opcode & OPCODE) == LL)
simulate_ll(regs, opcode);
@@ -440,7 +434,6 @@ void do_ri(struct pt_regs *regs)
printk("[%s:%ld] Illegal instruction at %08lx ra=%08lx\n",
current->comm, current->pid, regs->cp0_epc, regs->regs[31]);
}
- unlock_kernel();
if (compute_return_epc(regs))
return;
force_sig(SIGILL, current);
@@ -526,10 +519,8 @@ void simulate_sc(struct pt_regs *regp, unsigned int opcode)
void do_ri(struct pt_regs *regs)
{
- lock_kernel();
printk("[%s:%d] Illegal instruction at %08lx ra=%08lx\n",
current->comm, current->pid, regs->cp0_epc, regs->regs[31]);
- unlock_kernel();
if (compute_return_epc(regs))
return;
force_sig(SIGILL, current);
diff --git a/arch/mips64/kernel/signal.c b/arch/mips64/kernel/signal.c
index 8252d8a1c..7250885ee 100644
--- a/arch/mips64/kernel/signal.c
+++ b/arch/mips64/kernel/signal.c
@@ -1,5 +1,4 @@
-/* $Id: signal.c,v 1.4 2000/01/17 23:32:46 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -696,7 +695,6 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
/* FALLTHRU */
default:
- lock_kernel();
sigaddset(&current->signal, signr);
recalc_sigpending(current);
current->flags |= PF_SIGNALED;
diff --git a/arch/mips64/kernel/signal32.c b/arch/mips64/kernel/signal32.c
index 3fc21d31f..7bad6a10b 100644
--- a/arch/mips64/kernel/signal32.c
+++ b/arch/mips64/kernel/signal32.c
@@ -1,5 +1,4 @@
-/* $Id: signal32.c,v 1.4 2000/03/15 22:46:55 kanoj Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -771,7 +770,6 @@ printk("%s: delivering signal.\n", current->comm);
/* FALLTHRU */
default:
- lock_kernel();
sigaddset(&current->signal, signr);
recalc_sigpending(current);
current->flags |= PF_SIGNALED;
diff --git a/arch/mips64/kernel/traps.c b/arch/mips64/kernel/traps.c
index f5346da1e..f9b322534 100644
--- a/arch/mips64/kernel/traps.c
+++ b/arch/mips64/kernel/traps.c
@@ -1,5 +1,4 @@
-/* $Id: traps.c,v 1.4 2000/01/20 23:50:27 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
@@ -241,7 +240,6 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
return;
}
#endif
- lock_kernel();
if (fcr31 & 0x20000) {
/* Retry instruction with flush to zero ... */
if (!(fcr31 & (1<<24))) {
@@ -253,7 +251,7 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
"ctc1\t%0,$31"
: /* No outputs */
: "r" (fcr31));
- goto out;
+ return;
}
pc = regs->cp0_epc + ((regs->cp0_cause & CAUSEF_BD) ? 4 : 0);
if (get_user(insn, (unsigned int *)pc)) {
@@ -267,12 +265,9 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
}
if (compute_return_epc(regs))
- goto out;
+ return;
//force_sig(SIGFPE, current);
printk(KERN_DEBUG "Should send SIGFPE to %s\n", current->comm);
-
-out:
- unlock_kernel();
}
static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode)
@@ -331,11 +326,9 @@ void do_tr(struct pt_regs *regs)
void do_ri(struct pt_regs *regs)
{
- lock_kernel();
printk("Cpu%d[%s:%ld] Illegal instruction at %08lx ra=%08lx\n",
smp_processor_id(), current->comm, current->pid, regs->cp0_epc,
regs->regs[31]);
- unlock_kernel();
if (compute_return_epc(regs))
return;
force_sig(SIGILL, current);
diff --git a/arch/sparc/config.in b/arch/sparc/config.in
index 6513c6ad7..e79dfd803 100644
--- a/arch/sparc/config.in
+++ b/arch/sparc/config.in
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.94 2000/06/04 22:23:10 anton Exp $
+# $Id: config.in,v 1.98 2000/07/06 01:41:29 davem Exp $
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/config-language.txt.
#
diff --git a/arch/sparc/defconfig b/arch/sparc/defconfig
index 8d2f5b78e..cc5dfe78a 100644
--- a/arch/sparc/defconfig
+++ b/arch/sparc/defconfig
@@ -80,6 +80,11 @@ CONFIG_FONT_SUN8x16=y
# CONFIG_FBCON_FONTS is not set
#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
# Misc Linux/SPARC drivers
#
CONFIG_SUN_OPENPROMIO=m
@@ -107,6 +112,7 @@ CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=m
CONFIG_MD_STRIPED=m
CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_NBD=m
@@ -261,6 +267,7 @@ CONFIG_MSDOS_FS=m
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
CONFIG_EFS_FS=m
+# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
CONFIG_ISO9660_FS=m
@@ -294,7 +301,6 @@ CONFIG_NFS_FS=y
# CONFIG_ROOT_NFS is not set
CONFIG_NFSD=m
# CONFIG_NFSD_V3 is not set
-# CONFIG_NFSD_TCP is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_SMB_FS=m
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index e8524e430..623ab7958 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.55 2000/05/23 23:09:08 davem Exp $
+# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
@@ -69,6 +69,7 @@ check_asm: dummy
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
@@ -94,6 +95,7 @@ check_asm: dummy
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 77a6f4769..c0480ab5a 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -1,4 +1,4 @@
-/* $Id: irq.c,v 1.103 2000/05/09 17:40:13 davem Exp $
+/* $Id: irq.c,v 1.104 2000/06/30 10:18:38 davem Exp $
* arch/sparc/kernel/irq.c: Interrupt request handling routines. On the
* Sparc the IRQ's are basically 'cast in stone'
* and you are supposed to probe the prom's device
@@ -196,14 +196,14 @@ void free_irq(unsigned int irq, void *dev_id)
}
#ifndef CONFIG_SMP
-unsigned int local_bh_count;
-unsigned int local_irq_count;
+unsigned int __local_bh_count;
+unsigned int __local_irq_count;
#else
/* SMP interrupt locking on Sparc. */
-unsigned int local_bh_count[NR_CPUS];
-unsigned int local_irq_count[NR_CPUS];
+unsigned int __local_bh_count[NR_CPUS];
+unsigned int __local_irq_count[NR_CPUS];
/* Who has global_irq_lock. */
unsigned char global_irq_holder = NO_PROC_ID;
@@ -229,14 +229,14 @@ static void show(char * str)
printk("irq: %d [ ", atomic_read(&global_irq_count));
for (i = 0; i < NR_CPUS; i++) {
- printk("%d ", local_irq_count[i]);
+ printk("%d ", __local_irq_count[i]);
}
printk("]\n");
printk("bh: %d [ ", (spin_is_locked(&global_bh_lock) ? 1 : 0));
for (i = 0; i < NR_CPUS; i++) {
- printk("%d ", local_bh_count[cpu]);
+ printk("%d ", __local_bh_count[cpu]);
}
printk("]\n");
@@ -263,7 +263,7 @@ static inline void wait_on_irq(int cpu)
* already executing in one..
*/
if (!atomic_read(&global_irq_count)) {
- if (local_bh_count[cpu] || !spin_is_locked(&global_bh_lock))
+ if (__local_bh_count[cpu] || !spin_is_locked(&global_bh_lock))
break;
}
@@ -282,7 +282,7 @@ static inline void wait_on_irq(int cpu)
continue;
if (spin_is_locked (&global_irq_lock))
continue;
- if (!local_bh_count[cpu] && spin_is_locked(&global_bh_lock))
+ if (!__local_bh_count[cpu] && spin_is_locked(&global_bh_lock))
continue;
if (spin_trylock(&global_irq_lock))
break;
@@ -358,7 +358,7 @@ void __global_cli(void)
if ((flags & PSR_PIL) != PSR_PIL) {
int cpu = smp_processor_id();
__cli();
- if (!local_irq_count[cpu])
+ if (!__local_irq_count[cpu])
get_irqlock(cpu);
}
}
@@ -367,7 +367,7 @@ void __global_sti(void)
{
int cpu = smp_processor_id();
- if (!local_irq_count[cpu])
+ if (!__local_irq_count[cpu])
release_irqlock(cpu);
__sti();
}
@@ -394,7 +394,7 @@ unsigned long __global_save_flags(void)
retval = 2 + local_enabled;
/* check for global flags if we're not in an interrupt */
- if (!local_irq_count[smp_processor_id()]) {
+ if (!__local_irq_count[smp_processor_id()]) {
if (local_enabled)
retval = 1;
if (global_irq_holder == (unsigned char) smp_processor_id())
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 186f12825..db524c814 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -1,4 +1,4 @@
-/* $Id: sparc_ksyms.c,v 1.97 2000/05/09 17:40:13 davem Exp $
+/* $Id: sparc_ksyms.c,v 1.99 2000/06/30 10:18:38 davem Exp $
* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -42,6 +42,9 @@
#include <asm/sbus.h>
#include <asm/dma.h>
#endif
+#ifdef CONFIG_PCI
+#include <asm/pci.h>
+#endif
#include <asm/a.out.h>
#include <asm/io-unit.h>
@@ -143,8 +146,8 @@ EXPORT_SYMBOL(global_bh_lock);
EXPORT_SYMBOL(global_irq_count);
EXPORT_SYMBOL(synchronize_irq);
#endif
-EXPORT_SYMBOL(local_irq_count);
-EXPORT_SYMBOL(local_bh_count);
+EXPORT_SYMBOL(__local_irq_count);
+EXPORT_SYMBOL(__local_bh_count);
EXPORT_SYMBOL(udelay);
EXPORT_SYMBOL(mstk48t02_regs);
@@ -189,7 +192,17 @@ EXPORT_SYMBOL(sbus_iounmap);
EXPORT_SYMBOL(sbus_ioremap);
#endif
#if CONFIG_PCI
-/* We do not have modular drivers for PCI devices yet. */
+/* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
+EXPORT_SYMBOL(ioremap);
+EXPORT_SYMBOL(iounmap);
+
+EXPORT_SYMBOL(insl);
+EXPORT_SYMBOL(outsl);
+EXPORT_SYMBOL(pci_alloc_consistent);
+EXPORT_SYMBOL(pci_free_consistent);
+EXPORT_SYMBOL(pci_map_single);
+EXPORT_SYMBOL(pci_unmap_single);
+EXPORT_SYMBOL(pci_dma_sync_single);
#endif
/* Solaris/SunOS binary compatibility */
@@ -228,7 +241,7 @@ EXPORT_SYMBOL(__prom_getsibling);
/* sparc library symbols */
EXPORT_SYMBOL(bcopy);
EXPORT_SYMBOL_NOVERS(memscan);
-EXPORT_SYMBOL(strlen);
+EXPORT_SYMBOL_NOVERS(strlen);
EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strcpy);
EXPORT_SYMBOL(strncpy);
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c
index 04358e900..66221c796 100644
--- a/arch/sparc/kernel/sys_sparc.c
+++ b/arch/sparc/kernel/sys_sparc.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc.c,v 1.64 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sparc.c,v 1.65 2000/07/06 01:41:29 davem Exp $
* linux/arch/sparc/kernel/sys_sparc.c
*
* This file contains various random system calls that
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c
index 77565401f..1ba500986 100644
--- a/arch/sparc/kernel/sys_sunos.c
+++ b/arch/sparc/kernel/sys_sunos.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sunos.c,v 1.126 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sunos.c,v 1.128 2000/07/06 01:41:29 davem Exp $
* sys_sunos.c: SunOS specific syscall compatibility support.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -652,6 +652,8 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)
if (!file)
goto out;
+ inode = file->f_dentry->d_inode;
+
socket = &inode->u.socket_i;
local.sin_family = AF_INET;
local.sin_addr.s_addr = INADDR_ANY;
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 213ff8b1e..d1431a5c0 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -1,4 +1,4 @@
-/* $Id: srmmu.c,v 1.214 2000/06/22 01:28:44 anton Exp $
+/* $Id: srmmu.c,v 1.215 2000/06/30 13:25:28 anton Exp $
* srmmu.c: SRMMU specific routines for memory management.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -125,7 +125,7 @@ int srmmu_cache_pagetables;
void *srmmu_nocache_pool;
void *srmmu_nocache_bitmap;
int srmmu_nocache_low;
-unsigned long srmmu_nocache_used;
+int srmmu_nocache_used;
spinlock_t srmmu_nocache_spinlock;
/* This makes sense. Honest it does - Anton */
@@ -1266,8 +1266,8 @@ static int srmmu_mmu_info(char *buf)
return sprintf(buf,
"MMU type\t: %s\n"
"contexts\t: %d\n"
- "nocache total\t: %lu\n"
- "nocache used\t: %lu\n"
+ "nocache total\t: %ld\n"
+ "nocache used\t: %d\n"
, srmmu_name,
num_contexts,
SRMMU_NOCACHE_SIZE,
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 944195694..af82be871 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -1,4 +1,4 @@
-/* $Id: sun4c.c,v 1.194 2000/06/05 06:08:45 anton Exp $
+/* $Id: sun4c.c,v 1.195 2000/06/30 13:25:28 anton Exp $
* sun4c.c: Doing in software what should be done in hardware.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -2360,8 +2360,11 @@ static int sun4c_check_pgt_cache(int low, int high)
do {
if (pgd_quicklist)
sun4c_free_pgd_slow(sun4c_get_pgd_fast()), freed++;
+ /* Only two level page tables at the moment, sun4 3 level mmu is not supported - Anton */
+#if 0
if (pmd_quicklist)
sun4c_free_pmd_slow(sun4c_get_pmd_fast()), freed++;
+#endif
if (pte_quicklist)
sun4c_free_pte_slow(sun4c_get_pte_fast()), freed++;
} while (pgtable_cache_size > low);
diff --git a/arch/sparc/vmlinux.lds b/arch/sparc/vmlinux.lds
index dbe55e5fe..bba19d4c5 100644
--- a/arch/sparc/vmlinux.lds
+++ b/arch/sparc/vmlinux.lds
@@ -73,5 +73,5 @@ SECTIONS
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_sfnames 0 : { *(.debug_sfnames) }
.line 0 : { *(.line) }
- /DISCARD/ : { *(.text.exit) *(.data.exit) }
+ /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
}
diff --git a/arch/sparc64/config.in b/arch/sparc64/config.in
index 1a12dd236..5cd76d3af 100644
--- a/arch/sparc64/config.in
+++ b/arch/sparc64/config.in
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.115 2000/06/20 04:36:22 ecd Exp $
+# $Id: config.in,v 1.116 2000/07/06 01:41:29 davem Exp $
# For a description of the syntax of this configuration file,
# see the Configure script.
#
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 7ecaa1a9f..6612852e4 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -125,6 +125,11 @@ CONFIG_SPARCAUDIO_CS4231=y
# CONFIG_SPARCAUDIO_DUMMY is not set
#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
# Block devices
#
CONFIG_BLK_DEV_FD=y
@@ -397,6 +402,7 @@ CONFIG_MSDOS_FS=m
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=m
CONFIG_EFS_FS=m
+# CONFIG_JFFS_FS is not set
CONFIG_CRAMFS=m
CONFIG_RAMFS=m
CONFIG_ISO9660_FS=m
diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
index d861c41c0..7697c63e5 100644
--- a/arch/sparc64/kernel/Makefile
+++ b/arch/sparc64/kernel/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.55 2000/05/27 00:49:35 davem Exp $
+# $Id: Makefile,v 1.56 2000/07/06 01:41:29 davem Exp $
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
@@ -91,6 +91,7 @@ check_asm: dummy
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
@@ -120,6 +121,7 @@ check_asm: dummy
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
@@ -145,6 +147,7 @@ check_asm: dummy
@echo 'struct task_struct _task;' >> check_asm.c
@echo 'struct mm_struct _mm;' >> check_asm.c
@echo 'struct thread_struct _thread;' >> check_asm.c
+ @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c
@echo 'int main(void) {' >> check_asm.c
$(SH) ./check_asm.sh task tmp.i check_asm.c
$(SH) ./check_asm.sh mm tmp.i check_asm.c
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index a4904efb3..12925b1c2 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -1,4 +1,4 @@
-/* $Id: irq.c,v 1.88 2000/06/26 19:40:27 davem Exp $
+/* $Id: irq.c,v 1.89 2000/06/30 10:18:38 davem Exp $
* irq.c: UltraSparc IRQ handling/init/registry.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -552,8 +552,8 @@ out:
* lives in the brlock table for cache reasons.
*/
#ifndef CONFIG_SMP
-unsigned int local_irq_count;
-unsigned int local_bh_count;
+unsigned int __local_irq_count;
+unsigned int __local_bh_count;
#else
/* Who has global_irq_lock. */
@@ -605,14 +605,14 @@ again:
spinlock_t *lock;
if (!irqs_running() &&
- (local_bh_count || !spin_is_locked(&global_bh_lock)))
+ (local_bh_count(smp_processor_id()) || !spin_is_locked(&global_bh_lock)))
break;
br_write_unlock(BR_GLOBALIRQ_LOCK);
lock = &__br_write_locks[BR_GLOBALIRQ_LOCK].lock;
while (irqs_running() ||
spin_is_locked(lock) ||
- (!local_bh_count && spin_is_locked(&global_bh_lock))) {
+ (!local_bh_count(smp_processor_id()) && spin_is_locked(&global_bh_lock))) {
if (!--count) {
show("wait_on_irq");
count = (~0 >> 1);
@@ -635,7 +635,7 @@ void __global_cli(void)
if(flags == 0) {
int cpu = smp_processor_id();
__cli();
- if (! local_irq_count)
+ if (! local_irq_count(cpu))
get_irqlock(cpu);
}
}
@@ -644,7 +644,7 @@ void __global_sti(void)
{
int cpu = smp_processor_id();
- if (! local_irq_count)
+ if (! local_irq_count(cpu))
release_irqlock(cpu);
__sti();
}
@@ -656,7 +656,7 @@ unsigned long __global_save_flags(void)
__save_flags(flags);
local_enabled = ((flags == 0) ? 1 : 0);
retval = 2 + local_enabled;
- if (! local_irq_count) {
+ if (! local_irq_count(smp_processor_id())) {
if (local_enabled)
retval = 1;
if (global_irq_holder == (unsigned char) smp_processor_id())
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 060d1c477..dd8b8274d 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.107 2000/05/09 17:40:14 davem Exp $
+/* $Id: process.c,v 1.108 2000/06/30 10:18:38 davem Exp $
* arch/sparc64/kernel/process.c
*
* Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -270,7 +270,9 @@ void __show_regs(struct pt_regs * regs)
spin_lock_irqsave(&regdump_lock, flags);
printk("CPU[%d]: local_irq_count[%u] irqs_running[%d]\n",
- smp_processor_id(), local_irq_count, irqs_running());
+ smp_processor_id(),
+ local_irq_count(smp_processor_id()),
+ irqs_running());
#endif
printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x\n", regs->tstate,
regs->tpc, regs->tnpc, regs->y);
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 942f37640..eccc7885a 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.85 2000/05/23 02:14:25 davem Exp $
+/* $Id: sparc64_ksyms.c,v 1.86 2000/06/30 10:18:38 davem Exp $
* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -85,7 +85,6 @@ extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned
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 bcopy (const char *, char *, int);
extern int __ashrdi3(int, int);
extern void dump_thread(struct pt_regs *, struct user *);
@@ -158,8 +157,8 @@ EXPORT_SYMBOL(_do_write_unlock);
#endif
#else
-EXPORT_SYMBOL(local_bh_count);
-EXPORT_SYMBOL(local_irq_count);
+EXPORT_SYMBOL(__local_bh_count);
+EXPORT_SYMBOL(__local_irq_count);
#endif
/* rw semaphores */
@@ -263,7 +262,6 @@ EXPORT_SYMBOL(__prom_getchild);
EXPORT_SYMBOL(__prom_getsibling);
/* sparc library symbols */
-EXPORT_SYMBOL(bcopy);
EXPORT_SYMBOL(__strlen);
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
EXPORT_SYMBOL(strlen);
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 42ba3907b..48cf27f38 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc.c,v 1.42 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sparc.c,v 1.43 2000/07/06 01:41:29 davem Exp $
* linux/arch/sparc64/kernel/sys_sparc.c
*
* This file contains various random system calls that
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 607633aec..8f3339bfa 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.153 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sparc32.c,v 1.154 2000/07/06 01:41:29 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
index bad3d5e2f..4d2a9173d 100644
--- a/arch/sparc64/kernel/sys_sunos32.c
+++ b/arch/sparc64/kernel/sys_sunos32.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sunos32.c,v 1.50 2000/06/26 23:20:24 davem Exp $
+/* $Id: sys_sunos32.c,v 1.51 2000/07/06 01:41:29 davem Exp $
* sys_sunos32.c: SunOS binary compatability layer on sparc64.
*
* Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index a9ee22cd7..3ac73f8e2 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.18 2000/05/09 17:40:14 davem Exp $
+/* $Id: misc.c,v 1.19 2000/06/30 10:18:38 davem Exp $
* misc.c: Miscellaneous prom functions that don't belong
* anywhere else.
*
@@ -67,7 +67,7 @@ prom_cmdline(void)
irq_exit(smp_processor_id(), 0);
smp_capture();
#else
- local_irq_count--;
+ local_irq_count(smp_processor_id())--;
#endif
p1275_cmd ("enter", P1275_INOUT(0,0));
@@ -77,7 +77,7 @@ prom_cmdline(void)
irq_enter(smp_processor_id(), 0);
spin_unlock_wait(&__br_write_locks[BR_GLOBALIRQ_LOCK].lock);
#else
- local_irq_count++;
+ local_irq_count(smp_processor_id())++;
#endif
#ifdef CONFIG_SUN_CONSOLE
diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c
index f4a9df85d..5be9c5d49 100644
--- a/arch/sparc64/solaris/fs.c
+++ b/arch/sparc64/solaris/fs.c
@@ -1,4 +1,4 @@
-/* $Id: fs.c,v 1.19 2000/05/09 04:48:35 davem Exp $
+/* $Id: fs.c,v 1.20 2000/07/06 01:41:30 davem Exp $
* fs.c: fs related syscall emulation for Solaris
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c
index 4878a2366..5d711d576 100644
--- a/arch/sparc64/solaris/misc.c
+++ b/arch/sparc64/solaris/misc.c
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.27 2000/05/09 17:40:14 davem Exp $
+/* $Id: misc.c,v 1.28 2000/07/06 01:41:30 davem Exp $
* misc.c: Miscelaneous syscall emulation for Solaris
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/vmlinux.lds b/arch/sparc64/vmlinux.lds
index c0b5c31d0..f686decfb 100644
--- a/arch/sparc64/vmlinux.lds
+++ b/arch/sparc64/vmlinux.lds
@@ -74,5 +74,5 @@ SECTIONS
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_sfnames 0 : { *(.debug_sfnames) }
.line 0 : { *(.line) }
- /DISCARD/ : { *(.text.exit) *(.data.exit) }
+ /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) }
}