summaryrefslogtreecommitdiffstats
path: root/arch/mips64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-29 01:41:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-29 01:41:54 +0000
commitf969d69ba9f952e5bdd38278e25e26a3e4a61a70 (patch)
treeb3530d803df59d726afaabebc6626987dee1ca05 /arch/mips64
parenta10ce7ef2066b455d69187643ddf2073bfc4db24 (diff)
Merge with 2.3.27.
Diffstat (limited to 'arch/mips64')
-rw-r--r--arch/mips64/Makefile3
-rw-r--r--arch/mips64/config.in6
-rw-r--r--arch/mips64/defconfig1
-rw-r--r--arch/mips64/defconfig-ip229
-rw-r--r--arch/mips64/defconfig-ip271
-rw-r--r--arch/mips64/kernel/mips64_ksyms.c4
-rw-r--r--arch/mips64/kernel/process.c36
-rw-r--r--arch/mips64/kernel/r4k_tlb_debug.c5
-rw-r--r--arch/mips64/kernel/scall_o32.S5
-rw-r--r--arch/mips64/kernel/syscall.c133
-rw-r--r--arch/mips64/mm/init.c19
-rw-r--r--arch/mips64/mm/umap.c4
12 files changed, 137 insertions, 89 deletions
diff --git a/arch/mips64/Makefile b/arch/mips64/Makefile
index d7ffcedb9..218c22ec4 100644
--- a/arch/mips64/Makefile
+++ b/arch/mips64/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.4 2000/01/17 23:32:46 ralf Exp $
+# $Id: Makefile,v 1.5 2000/01/21 22:34:03 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
@@ -141,6 +141,7 @@ archclean:
@$(MAKEBOOT) clean
$(MAKE) -C arch/$(ARCH)/kernel clean
$(MAKE) -C arch/$(ARCH)/tools clean
+ rm -f vmlinux.64
archmrproper:
diff --git a/arch/mips64/config.in b/arch/mips64/config.in
index 823c375a6..4325d507e 100644
--- a/arch/mips64/config.in
+++ b/arch/mips64/config.in
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.7 2000/01/20 23:50:27 ralf Exp $
+# $Id: config.in,v 1.8 2000/01/27 23:45:25 ralf Exp $
#
# For a description of the syntax of this configuration file,
# see the Configure script.
@@ -182,6 +182,10 @@ if [ "$CONFIG_VT" = "y" ]; then
endmenu
fi
+if [ "$CONFIG_PROC_FS" = "y" ]; then
+ define_bool CONFIG_KCORE_ELF y
+fi
+
mainmenu_option next_comment
comment 'Sound'
diff --git a/arch/mips64/defconfig b/arch/mips64/defconfig
index ab794d555..d57fa71c6 100644
--- a/arch/mips64/defconfig
+++ b/arch/mips64/defconfig
@@ -280,6 +280,7 @@ CONFIG_MSDOS_PARTITION=y
CONFIG_SGI_PARTITION=y
# CONFIG_SUN_PARTITION is not set
# CONFIG_NLS is not set
+CONFIG_KCORE_ELF=y
#
# Sound
diff --git a/arch/mips64/defconfig-ip22 b/arch/mips64/defconfig-ip22
index b270cb5dd..fb7026b19 100644
--- a/arch/mips64/defconfig-ip22
+++ b/arch/mips64/defconfig-ip22
@@ -195,6 +195,10 @@ CONFIG_VT_CONSOLE=y
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
# CONFIG_QIC02_TAPE is not set
+
+#
+# Watchdog Cards
+#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
@@ -218,6 +222,10 @@ CONFIG_VT_CONSOLE=y
# CONFIG_FTAPE is not set
#
+# PCMCIA character device support
+#
+
+#
# USB drivers - not for the faint of heart
#
# CONFIG_USB is not set
@@ -274,6 +282,7 @@ CONFIG_SGI_PARTITION=y
# Console drivers
#
CONFIG_SGI_NEWPORT_CONSOLE=y
+CONFIG_KCORE_ELF=y
#
# Sound
diff --git a/arch/mips64/defconfig-ip27 b/arch/mips64/defconfig-ip27
index ab794d555..d57fa71c6 100644
--- a/arch/mips64/defconfig-ip27
+++ b/arch/mips64/defconfig-ip27
@@ -280,6 +280,7 @@ CONFIG_MSDOS_PARTITION=y
CONFIG_SGI_PARTITION=y
# CONFIG_SUN_PARTITION is not set
# CONFIG_NLS is not set
+CONFIG_KCORE_ELF=y
#
# Sound
diff --git a/arch/mips64/kernel/mips64_ksyms.c b/arch/mips64/kernel/mips64_ksyms.c
index cc077a486..d0647e4c5 100644
--- a/arch/mips64/kernel/mips64_ksyms.c
+++ b/arch/mips64/kernel/mips64_ksyms.c
@@ -1,4 +1,4 @@
-/* $Id: mips64_ksyms.c,v 1.4 1999/11/19 20:35:22 ralf Exp $
+/* $Id: mips64_ksyms.c,v 1.5 2000/01/17 23:32:46 ralf Exp $
*
* Export MIPS64-specific functions needed for loadable modules.
*
@@ -111,3 +111,5 @@ EXPORT_SYMBOL(unregister_fpe);
#ifdef CONFIG_VT
EXPORT_SYMBOL(screen_info);
#endif
+
+EXPORT_SYMBOL(get_wchan);
diff --git a/arch/mips64/kernel/process.c b/arch/mips64/kernel/process.c
index fa10427e7..f6998a6bb 100644
--- a/arch/mips64/kernel/process.c
+++ b/arch/mips64/kernel/process.c
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.7 1999/12/21 12:40:52 ralf Exp $
+/* $Id: process.c,v 1.4 2000/01/16 01:34:01 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
@@ -177,3 +177,37 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
return retval;
}
+
+/*
+ * These bracket the sleeping functions..
+ */
+extern void scheduling_functions_start_here(void);
+extern void scheduling_functions_end_here(void);
+#define first_sched ((unsigned long) scheduling_functions_start_here)
+#define last_sched ((unsigned long) scheduling_functions_end_here)
+
+unsigned long get_wchan(struct task_struct *p)
+{
+ unsigned long schedule_frame;
+ unsigned long pc;
+
+ if (!p || p == current || p->state == TASK_RUNNING)
+ return 0;
+
+ pc = thread_saved_pc(&p->thread);
+ if (pc == (unsigned long) interruptible_sleep_on
+ || pc == (unsigned long) sleep_on) {
+ schedule_frame = ((unsigned long *)p->thread.reg30)[9];
+ return ((unsigned long *)schedule_frame)[15];
+ }
+ if (pc == (unsigned long) interruptible_sleep_on_timeout
+ || pc == (unsigned long) sleep_on_timeout) {
+ schedule_frame = ((unsigned long *)p->thread.reg30)[9];
+ return ((unsigned long *)schedule_frame)[16];
+ }
+ if (pc >= first_sched && pc < last_sched) {
+ printk(KERN_DEBUG "Bug in %s\n", __FUNCTION__);
+ }
+
+ return pc;
+}
diff --git a/arch/mips64/kernel/r4k_tlb_debug.c b/arch/mips64/kernel/r4k_tlb_debug.c
index a9d41cb46..e9ae2d604 100644
--- a/arch/mips64/kernel/r4k_tlb_debug.c
+++ b/arch/mips64/kernel/r4k_tlb_debug.c
@@ -1,4 +1,4 @@
-/* $Id: r4k_tlb_debug.c,v 1.6 1999/11/23 17:12:49 ralf Exp $
+/* $Id: r4k_tlb_debug.c,v 1.2 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
@@ -19,6 +19,9 @@
#include <asm/ptrace.h>
#include <asm/system.h>
+asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
+ unsigned long address);
+
asmlinkage void tlb_refill_debug(struct pt_regs regs)
{
show_regs(&regs);
diff --git a/arch/mips64/kernel/scall_o32.S b/arch/mips64/kernel/scall_o32.S
index 56b087a7b..f33a4afb2 100644
--- a/arch/mips64/kernel/scall_o32.S
+++ b/arch/mips64/kernel/scall_o32.S
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: scall_o32.S,v 1.3 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
@@ -267,7 +267,7 @@ illegal_syscall:
sys sys32_sigpending 1
sys sys_sethostname 2
sys sys_setrlimit 2 /* 4075 */
- sys sys_getrlimit 2
+ sys sys_old_getrlimit 2
sys sys_getrusage 2
sys sys_gettimeofday 2
sys sys_settimeofday 2
@@ -401,6 +401,7 @@ illegal_syscall:
sys sys_sendfile 3
sys sys_ni_syscall 0
sys sys_ni_syscall 0
+ sys sys_getrlimit 2 /* 4210 */
.endm
.macro sys function, nargs
diff --git a/arch/mips64/kernel/syscall.c b/arch/mips64/kernel/syscall.c
index 31273522c..8273d5285 100644
--- a/arch/mips64/kernel/syscall.c
+++ b/arch/mips64/kernel/syscall.c
@@ -1,4 +1,4 @@
-/* $Id: syscall.c,v 1.3 1999/10/19 20:51:46 ralf Exp $
+/* $Id: syscall.c,v 1.1 1999/12/04 03:59:00 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
@@ -240,86 +240,71 @@ asmlinkage int sys_ipc (uint call, int first, int second,
version = call >> 16; /* hack for backward compatibility */
call &= 0xffff;
- if (call <= SEMCTL)
- switch (call) {
- case SEMOP:
- return sys_semop (first, (struct sembuf *)ptr, second);
- case SEMGET:
- return sys_semget (first, second, third);
- case SEMCTL: {
- union semun fourth;
+ switch (call) {
+ case SEMOP:
+ return sys_semop (first, (struct sembuf *)ptr, second);
+ case SEMGET:
+ return sys_semget (first, second, third);
+ case SEMCTL: {
+ union semun fourth;
+ if (!ptr)
+ return -EINVAL;
+ if (get_user(fourth.__pad, (void **) ptr))
+ return -EFAULT;
+ return sys_semctl (first, second, third, fourth);
+ }
+
+ case MSGSND:
+ return sys_msgsnd (first, (struct msgbuf *) ptr,
+ second, third);
+ case MSGRCV:
+ switch (version) {
+ case 0: {
+ struct ipc_kludge tmp;
if (!ptr)
return -EINVAL;
- if (get_user(fourth.__pad, (void **) ptr))
+
+ if (copy_from_user(&tmp,
+ (struct ipc_kludge *) ptr,
+ sizeof (tmp)))
return -EFAULT;
- return sys_semctl (first, second, third, fourth);
- }
- default:
- return -EINVAL;
+ return sys_msgrcv (first, tmp.msgp, second,
+ tmp.msgtyp, third);
}
-
- if (call <= MSGCTL)
- switch (call) {
- case MSGSND:
- return sys_msgsnd (first, (struct msgbuf *) ptr,
- second, third);
- case MSGRCV:
- switch (version) {
- case 0: {
- struct ipc_kludge tmp;
- if (!ptr)
- return -EINVAL;
-
- if (copy_from_user(&tmp,
- (struct ipc_kludge *) ptr,
- sizeof (tmp)))
- return -EFAULT;
- return sys_msgrcv (first, tmp.msgp, second,
- tmp.msgtyp, third);
- }
- default:
- return sys_msgrcv (first,
- (struct msgbuf *) ptr,
- second, fifth, third);
- }
- case MSGGET:
- return sys_msgget ((key_t) first, second);
- case MSGCTL:
- return sys_msgctl (first, second,
- (struct msqid_ds *) ptr);
default:
- return -EINVAL;
+ return sys_msgrcv (first,
+ (struct msgbuf *) ptr,
+ second, fifth, third);
}
- if (call <= SHMCTL)
- switch (call) {
- case SHMAT:
- switch (version) {
- default: {
- ulong raddr;
- ret = sys_shmat (first, (char *) ptr,
- second, &raddr);
- if (ret)
- return ret;
- return put_user (raddr, (ulong *) third);
- }
- case 1: /* iBCS2 emulator entry point */
- if (!segment_eq(get_fs(), get_ds()))
- return -EINVAL;
- return sys_shmat (first, (char *) ptr,
- second, (ulong *) third);
- }
- case SHMDT:
- return sys_shmdt ((char *)ptr);
- case SHMGET:
- return sys_shmget (first, second, third);
- case SHMCTL:
- return sys_shmctl (first, second,
- (struct shmid_ds *) ptr);
- default:
- return -EINVAL;
+ case MSGGET:
+ return sys_msgget ((key_t) first, second);
+ case MSGCTL:
+ return sys_msgctl (first, second, (struct msqid_ds *) ptr);
+
+ case SHMAT:
+ switch (version) {
+ default: {
+ ulong raddr;
+ ret = sys_shmat (first, (char *) ptr, second, &raddr);
+ if (ret)
+ return ret;
+ return put_user (raddr, (ulong *) third);
}
-
- return -EINVAL;
+ case 1: /* iBCS2 emulator entry point */
+ if (!segment_eq(get_fs(), get_ds()))
+ return -EINVAL;
+ return sys_shmat (first, (char *) ptr, second, (ulong *) third);
+ }
+ case SHMDT:
+ return sys_shmdt ((char *)ptr);
+ case SHMGET:
+ return sys_shmget (first, second, third);
+ case SHMCTL:
+ return sys_shmctl (first, second,
+ (struct shmid_ds *) ptr);
+ default:
+ return -EINVAL;
+ }
}
/*
diff --git a/arch/mips64/mm/init.c b/arch/mips64/mm/init.c
index d4da03f56..06b047ef9 100644
--- a/arch/mips64/mm/init.c
+++ b/arch/mips64/mm/init.c
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.8 2000/01/27 23:21:57 ralf Exp $
+/* $Id: init.c,v 1.9 2000/01/27 23:45:25 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
@@ -20,6 +20,7 @@
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
+#include <linux/highmem.h>
#include <linux/swap.h>
#include <linux/swapctl.h>
#ifdef CONFIG_BLK_DEV_INITRD
@@ -342,11 +343,17 @@ extern char __init_begin, __init_end;
void __init paging_init(void)
{
+ unsigned int zones_size[2];
+
/* Initialize the entire pgd. */
pgd_init((unsigned long)swapper_pg_dir);
pgd_init((unsigned long)swapper_pg_dir + PAGE_SIZE / 2);
pmd_init((unsigned long)invalid_pmd_table);
- return free_area_init(max_low_pfn);
+
+ zones_size[0] = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
+ zones_size[1] = max_low_pfn - zones_size[0];
+
+ free_area_init(zones_size);
}
extern int page_is_ram(unsigned long pagenr);
@@ -374,9 +381,9 @@ void __init mem_init(void)
datasize = (unsigned long) &_edata - (unsigned long) &_fdata;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
- printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
+ printk("Memory: %uk/%luk available (%ldk kernel code, %ldk reserved, "
"%ldk data, %ldk init)\n",
- (unsigned long) nr_free_pages << (PAGE_SHIFT-10),
+ (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
ram << (PAGE_SHIFT-10),
codesize >> 10,
reservedpages << (PAGE_SHIFT-10),
@@ -412,10 +419,10 @@ si_meminfo(struct sysinfo *val)
{
val->totalram = totalram_pages;
val->sharedram = 0;
- val->freeram = nr_free_pages;
+ val->freeram = nr_free_pages();
val->bufferram = atomic_read(&buffermem_pages);
val->totalhigh = 0;
- val->freehigh = 0;
+ val->freehigh = nr_free_highpages();
val->mem_unit = PAGE_SIZE;
return;
diff --git a/arch/mips64/mm/umap.c b/arch/mips64/mm/umap.c
index dc80a2eff..5fefe091d 100644
--- a/arch/mips64/mm/umap.c
+++ b/arch/mips64/mm/umap.c
@@ -1,4 +1,4 @@
-/* $Id: umap.c,v 1.2 1999/12/04 03:59:01 ralf Exp $
+/* $Id: umap.c,v 1.3 2000/01/27 01:05:24 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
@@ -118,7 +118,7 @@ static inline void free_pte(pte_t page)
current->mm->rss--;
return;
}
- swap_free(page);
+ swap_free(pte_to_swp_entry(page));
}
static inline void forget_pte(pte_t page)