summaryrefslogtreecommitdiffstats
path: root/arch/mips64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-09 21:34:29 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-09 21:34:29 +0000
commit913c94403b96b4c381bd40f9588839612d71d2e9 (patch)
tree810e669fed6232fa9d37f8ce830d046d319c9cf0 /arch/mips64
parent9f2b43b25e6ab17ac47b7754a157e01075cb5ba9 (diff)
Kill warnings in the 64-bit kernel.
Diffstat (limited to 'arch/mips64')
-rw-r--r--arch/mips64/arc/identify.c5
-rw-r--r--arch/mips64/kernel/ioctl32.c19
-rw-r--r--arch/mips64/kernel/linux32.c2
-rw-r--r--arch/mips64/kernel/mips64_ksyms.c9
-rw-r--r--arch/mips64/kernel/ptrace.c14
-rw-r--r--arch/mips64/kernel/signal.c4
-rw-r--r--arch/mips64/kernel/signal32.c28
-rw-r--r--arch/mips64/kernel/syscall.c55
-rw-r--r--arch/mips64/kernel/traps.c7
-rw-r--r--arch/mips64/sgi-ip27/ip27-init.c39
-rw-r--r--arch/mips64/sgi-ip27/ip27-klnuma.c1
-rw-r--r--arch/mips64/sgi-ip27/ip27-memory.c9
-rw-r--r--arch/mips64/sgi-ip27/ip27-pci.c7
-rw-r--r--arch/mips64/sgi-ip27/ip27-reset.c9
-rw-r--r--arch/mips64/sgi-ip27/ip27-setup.c11
-rw-r--r--arch/mips64/sgi-ip27/ip27-timer.c9
16 files changed, 115 insertions, 113 deletions
diff --git a/arch/mips64/arc/identify.c b/arch/mips64/arc/identify.c
index ab2d553ad..732d6db5e 100644
--- a/arch/mips64/arc/identify.c
+++ b/arch/mips64/arc/identify.c
@@ -1,5 +1,4 @@
-/* $Id: identify.c,v 1.5 1999/11/19 20:35:21 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.
@@ -39,7 +38,7 @@ static struct smatch mach_table[] = {
int prom_flags;
static struct smatch * __init
-string_to_mach(char *s)
+string_to_mach(const char *s)
{
int i;
diff --git a/arch/mips64/kernel/ioctl32.c b/arch/mips64/kernel/ioctl32.c
index b0b22a50d..87174861f 100644
--- a/arch/mips64/kernel/ioctl32.c
+++ b/arch/mips64/kernel/ioctl32.c
@@ -1,4 +1,4 @@
-/* $Id$
+/*
* ioctl32.c: Conversion between 32bit and 64bit native ioctls.
*
* Copyright (C) 2000 Silicon Graphics, Inc.
@@ -35,23 +35,6 @@ struct timeval32 {
#define EXT2_IOC32_GETVERSION _IOR('v', 1, int)
#define EXT2_IOC32_SETVERSION _IOW('v', 2, int)
-static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
- struct timeval32 *up = (struct timeval32 *)arg;
- struct timeval ktv;
- mm_segment_t old_fs = get_fs();
- int err;
-
- set_fs(KERNEL_DS);
- err = sys_ioctl(fd, cmd, (unsigned long)&ktv);
- set_fs(old_fs);
- if(!err) {
- err = put_user(ktv.tv_sec, &up->tv_sec);
- err |= __put_user(ktv.tv_usec, &up->tv_usec);
- }
- return err;
-}
-
struct ifmap32 {
unsigned int mem_start;
unsigned int mem_end;
diff --git a/arch/mips64/kernel/linux32.c b/arch/mips64/kernel/linux32.c
index dfdc82d24..70746da22 100644
--- a/arch/mips64/kernel/linux32.c
+++ b/arch/mips64/kernel/linux32.c
@@ -957,7 +957,7 @@ sys32_readv(int fd, struct iovec32 *vector, u32 count)
struct file *file;
ssize_t ret;
- file = -EBADF;
+ ret = -EBADF;
file = fget(fd);
if (!file)
goto bad_file;
diff --git a/arch/mips64/kernel/mips64_ksyms.c b/arch/mips64/kernel/mips64_ksyms.c
index 5b77f3050..c65f05865 100644
--- a/arch/mips64/kernel/mips64_ksyms.c
+++ b/arch/mips64/kernel/mips64_ksyms.c
@@ -1,13 +1,12 @@
-/* $Id: mips64_ksyms.c,v 1.8 2000/02/24 00:12:41 ralf Exp $
- *
+/*
* Export MIPS64-specific functions needed for loadable modules.
*
* 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.
*
- * Copyright (C) 1996, 1997, 1998, 1999 by Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
+ * Copyright (C) 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <linux/config.h>
#include <linux/module.h>
@@ -18,7 +17,6 @@
#include <linux/in6.h>
#include <linux/pci.h>
-#include <asm/checksum.h>
#include <asm/dma.h>
#include <asm/floppy.h>
#include <asm/io.h>
@@ -27,6 +25,7 @@
#include <asm/semaphore.h>
#include <asm/softirq.h>
#include <asm/uaccess.h>
+#include <asm/checksum.h>
extern void *__bzero(void *__s, size_t __count);
extern long __strncpy_from_user_nocheck_asm(char *__to,
diff --git a/arch/mips64/kernel/ptrace.c b/arch/mips64/kernel/ptrace.c
index fd8695931..579fc8855 100644
--- a/arch/mips64/kernel/ptrace.c
+++ b/arch/mips64/kernel/ptrace.c
@@ -1,5 +1,4 @@
-/* $Id: ptrace.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
* for more details.
@@ -29,9 +28,10 @@
#include <asm/system.h>
#include <asm/uaccess.h>
-/* Tracing a 32-bit process with a 64-bit strace and vice verca will not
- work. I don't know how to fix this. */
-
+/*
+ * Tracing a 32-bit process with a 64-bit strace and vice versa will not
+ * work. I don't know how to fix this.
+ */
asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
{
struct task_struct *child;
@@ -110,7 +110,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
ret = -EIO;
if (copied != sizeof(tmp))
break;
- ret = put_user(tmp, (unsigned int *) data);
+ ret = put_user(tmp, (unsigned int *) (unsigned long) data);
break;
}
@@ -173,7 +173,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
ret = -EIO;
goto out_tsk;
}
- ret = put_user(tmp, (unsigned *) data);
+ ret = put_user(tmp, (unsigned *) (unsigned long) data);
break;
}
/* when I and D space are separate, this will have to be fixed. */
diff --git a/arch/mips64/kernel/signal.c b/arch/mips64/kernel/signal.c
index 7250885ee..81daadab8 100644
--- a/arch/mips64/kernel/signal.c
+++ b/arch/mips64/kernel/signal.c
@@ -4,8 +4,8 @@
* for more details.
*
* Copyright (C) 1991, 1992 Linus Torvalds
- * Copyright (C) 1994 - 1999 Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
+ * Copyright (C) 1994 - 2000 Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <linux/config.h>
#include <linux/sched.h>
diff --git a/arch/mips64/kernel/signal32.c b/arch/mips64/kernel/signal32.c
index 7bad6a10b..047cc381a 100644
--- a/arch/mips64/kernel/signal32.c
+++ b/arch/mips64/kernel/signal32.c
@@ -231,10 +231,12 @@ asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act,
if (!access_ok(VERIFY_READ, act, sizeof(*act)))
return -EFAULT;
- err |= __get_user(new_ka.sa.sa_handler, &act->sa_handler);
+ err |= __get_user((u32)(u64)new_ka.sa.sa_handler,
+ &act->sa_handler);
err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
err |= __get_user(mask, &act->sa_mask.sig[0]);
- err |= __get_user(new_ka.sa.sa_restorer, &act->sa_restorer);
+ err |= __get_user((u32)(u64)new_ka.sa.sa_restorer,
+ &act->sa_restorer);
if (err)
return -EFAULT;
@@ -247,12 +249,14 @@ asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act,
if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
return -EFAULT;
err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
- err |= __put_user(old_ka.sa.sa_handler, &oact->sa_handler);
+ err |= __put_user((u32)(u64)old_ka.sa.sa_handler,
+ &oact->sa_handler);
err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig);
err |= __put_user(0, &oact->sa_mask.sig[1]);
err |= __put_user(0, &oact->sa_mask.sig[2]);
err |= __put_user(0, &oact->sa_mask.sig[3]);
- err |= __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer);
+ err |= __put_user((u32)(u64)old_ka.sa.sa_restorer,
+ &oact->sa_restorer);
if (err)
return -EFAULT;
}
@@ -858,9 +862,11 @@ asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act,
if (!access_ok(VERIFY_READ, act, sizeof(*act)))
return -EFAULT;
- err |= __get_user (new_sa.sa.sa_handler, &act->sa_handler);
- err |= __get_user (new_sa.sa.sa_flags, &act->sa_flags);
- err |= __get_user (new_sa.sa.sa_restorer, &act->sa_restorer);
+ err |= __get_user((u32)(u64)new_sa.sa.sa_handler,
+ &act->sa_handler);
+ err |= __get_user(new_sa.sa.sa_flags, &act->sa_flags);
+ err |= __get_user((u32)(u64)new_sa.sa.sa_restorer,
+ &act->sa_restorer);
err |= get_sigset(&new_sa.sa.sa_mask, &act->sa_mask);
if (err)
return -EFAULT;
@@ -874,9 +880,11 @@ asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act,
if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
return -EFAULT;
- err |= __put_user (new_sa.sa.sa_handler, &oact->sa_handler);
- err |= __put_user (new_sa.sa.sa_flags, &oact->sa_flags);
- err |= __put_user (new_sa.sa.sa_restorer, &oact->sa_restorer);
+ err |= __put_user((u32)(u64)new_sa.sa.sa_handler,
+ &oact->sa_handler);
+ err |= __put_user(new_sa.sa.sa_flags, &oact->sa_flags);
+ err |= __put_user((u32)(u64)new_sa.sa.sa_restorer,
+ &oact->sa_restorer);
err |= put_sigset(&new_sa.sa.sa_mask, &oact->sa_mask);
if (err)
return -EFAULT;
diff --git a/arch/mips64/kernel/syscall.c b/arch/mips64/kernel/syscall.c
index 10559378a..55685248a 100644
--- a/arch/mips64/kernel/syscall.c
+++ b/arch/mips64/kernel/syscall.c
@@ -1,11 +1,10 @@
-/* $Id: syscall.c,v 1.3 2000/02/04 07:40: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
* for more details.
*
- * Copyright (C) 1995 - 1999 by Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
+ * Copyright (C) 1995 - 2000 by Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <linux/errno.h>
#include <linux/linkage.h>
@@ -21,6 +20,7 @@
#include <linux/sem.h>
#include <linux/msg.h>
#include <linux/shm.h>
+#include <linux/slab.h>
#include <asm/ipc.h>
#include <asm/cachectl.h>
#include <asm/offset.h>
@@ -170,39 +170,46 @@ sys_sysmips(int cmd, long arg1, int arg2, int arg3)
char *name;
int flags, tmp, len, errno;
- switch(cmd)
- {
- case SETNAME:
+ switch(cmd) {
+ case SETNAME: {
+ char nodename[__NEW_UTS_LEN + 1];
+
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
name = (char *) arg1;
- len = strlen_user(name);
- if (len == 0 || len > __NEW_UTS_LEN)
- return -EINVAL;
- down(&uts_sem);
- errno = -EFAULT;
- if (!copy_from_user(system_utsname.nodename, name, len)) {
- system_utsname.nodename[len] = '\0';
- errno = 0;
- }
- up(&uts_sem);
- return errno;
+ len = strncpy_from_user(nodename, name, sizeof(nodename));
+ if (len < 0)
+ return -EFAULT;
- case MIPS_ATOMIC_SET:
+ down_write(&uts_sem);
+ strncpy(system_utsname.nodename, name, len);
+ up_write(&uts_sem);
+ system_utsname.nodename[len] = '\0';
+ return 0;
+ }
+
+ case MIPS_ATOMIC_SET: {
/* This is broken in case of page faults and SMP ...
- Risc/OS fauls after maximum 20 tries with EAGAIN. */
+ Risc/OS faults after maximum 20 tries with EAGAIN. */
+ unsigned int tmp;
+
p = (int *) arg1;
errno = verify_area(VERIFY_WRITE, p, sizeof(*p));
if (errno)
return errno;
+ errno = 0;
save_and_cli(flags);
- errno = *p;
- *p = arg2;
+ errno |= __get_user(tmp, p);
+ errno |= __put_user(arg2, p);
restore_flags(flags);
- return errno; /* This is broken ... */
+ if (errno)
+ return tmp;
+
+ return tmp; /* This is broken ... */
+ }
case MIPS_FIXADE:
tmp = current->thread.mflags & ~3;
@@ -226,7 +233,7 @@ sys_sysmips(int cmd, long arg1, int arg2, int arg3)
* This is really horribly ugly.
*/
asmlinkage int sys_ipc (uint call, int first, int second,
- int third, void *ptr, long fifth)
+ unsigned long third, void *ptr, long fifth)
{
int version, ret;
diff --git a/arch/mips64/kernel/traps.c b/arch/mips64/kernel/traps.c
index f9b322534..997aee0c7 100644
--- a/arch/mips64/kernel/traps.c
+++ b/arch/mips64/kernel/traps.c
@@ -183,7 +183,7 @@ void die(const char * str, struct pt_regs * regs, unsigned long err)
spin_lock_irq(&die_lock);
printk("%s: %04lx\n", str, err & 0xffff);
show_regs(regs);
- printk("Process %s (pid: %ld, stackpage=%08lx)\n",
+ printk("Process %s (pid: %d, stackpage=%08lx)\n",
current->comm, current->pid, (unsigned long) current);
show_stack((unsigned long *) regs->regs[29]);
show_trace((unsigned long *) regs->regs[29]);
@@ -233,6 +233,7 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
{
unsigned long pc;
unsigned int insn;
+ extern void simfp(unsigned int);
#ifdef CONFIG_MIPS_FPE_MODULE
if (fpe_handler != NULL) {
@@ -326,7 +327,7 @@ void do_tr(struct pt_regs *regs)
void do_ri(struct pt_regs *regs)
{
- printk("Cpu%d[%s:%ld] Illegal instruction at %08lx ra=%08lx\n",
+ printk("Cpu%d[%s:%d] Illegal instruction at %08lx ra=%08lx\n",
smp_processor_id(), current->comm, current->pid, regs->cp0_epc,
regs->regs[31]);
if (compute_return_epc(regs))
@@ -387,7 +388,7 @@ void do_reserved(struct pt_regs *regs)
* caused by a new unknown cpu type or after another deadly
* hard/software error.
*/
- panic("Caught reserved exception %d - should not happen.",
+ panic("Caught reserved exception %ld - should not happen.",
(regs->cp0_cause & 0x1f) >> 2);
}
diff --git a/arch/mips64/sgi-ip27/ip27-init.c b/arch/mips64/sgi-ip27/ip27-init.c
index dbb3e8cb5..1afd32deb 100644
--- a/arch/mips64/sgi-ip27/ip27-init.c
+++ b/arch/mips64/sgi-ip27/ip27-init.c
@@ -35,7 +35,6 @@
#define CNODEMASK_SETB(p, bit) ((p) |= 1ULL << (bit))
cpumask_t boot_cpumask;
-static volatile cpumask_t boot_barrier;
hubreg_t region_mask = 0;
static int fine_mode = 0;
int maxcpus;
@@ -162,24 +161,6 @@ cpuid_t cpu_node_probe(cpumask_t *boot_cpumask, int *numnodes)
return(highest + 1);
}
-/*
- * Takes as first input the PROM assigned cpu id, and the kernel
- * assigned cpu id as the second.
- */
-static void alloc_cpupda(cpuid_t cpu, int cpunum)
-{
- cnodeid_t node;
- nasid_t nasid;
-
- node = get_cpu_cnode(cpu);
- nasid = COMPACT_TO_NASID_NODEID(node);
-
- cputonasid(cpunum) = nasid;
- cputocnode(cpunum) = node;
- cputoslice(cpunum) = get_cpu_slice(cpu);
- cpu_data[cpunum].p_cpuid = cpu;
-}
-
int cpu_enabled(cpuid_t cpu)
{
if (cpu == CPU_NONE)
@@ -388,6 +369,24 @@ cnodeid_t get_compact_nodeid(void)
#ifdef CONFIG_SMP
+/*
+ * Takes as first input the PROM assigned cpu id, and the kernel
+ * assigned cpu id as the second.
+ */
+static void alloc_cpupda(cpuid_t cpu, int cpunum)
+{
+ cnodeid_t node;
+ nasid_t nasid;
+
+ node = get_cpu_cnode(cpu);
+ nasid = COMPACT_TO_NASID_NODEID(node);
+
+ cputonasid(cpunum) = nasid;
+ cputocnode(cpunum) = node;
+ cputoslice(cpunum) = get_cpu_slice(cpu);
+ cpu_data[cpunum].p_cpuid = cpu;
+}
+
void __init smp_callin(void)
{
#if 0
@@ -406,6 +405,8 @@ int __init start_secondary(void)
return cpu_idle();
}
+static volatile cpumask_t boot_barrier;
+
void cboot(void)
{
CPUMASK_CLRB(boot_barrier, getcpuid()); /* needs atomicity */
diff --git a/arch/mips64/sgi-ip27/ip27-klnuma.c b/arch/mips64/sgi-ip27/ip27-klnuma.c
index 1b36208eb..84d1a5465 100644
--- a/arch/mips64/sgi-ip27/ip27-klnuma.c
+++ b/arch/mips64/sgi-ip27/ip27-klnuma.c
@@ -6,6 +6,7 @@
#include <linux/init.h>
#include <linux/mmzone.h>
#include <linux/kernel.h>
+#include <linux/string.h>
#include <asm/page.h>
#include <asm/sn/types.h>
diff --git a/arch/mips64/sgi-ip27/ip27-memory.c b/arch/mips64/sgi-ip27/ip27-memory.c
index afa900313..4900ff777 100644
--- a/arch/mips64/sgi-ip27/ip27-memory.c
+++ b/arch/mips64/sgi-ip27/ip27-memory.c
@@ -1,5 +1,4 @@
-/* $Id: ip27-memory.c,v 1.2 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
* for more details.
@@ -27,13 +26,15 @@
#include <asm/sn/arch.h>
#include <asm/mmzone.h>
+/* ip27-klnuma.c */
+extern pfn_t node_getfirstfree(cnodeid_t cnode);
+
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
#define SLOT_IGNORED 0xffff
short slot_lastfilled_cache[MAX_COMPACT_NODES];
unsigned short slot_psize_cache[MAX_COMPACT_NODES][MAX_MEM_SLOTS];
static pfn_t numpages;
-static pfn_t pagenr = 0;
plat_pg_data_t *plat_node_data[MAX_COMPACT_NODES];
bootmem_data_t plat_node_bdata[MAX_COMPACT_NODES];
@@ -241,6 +242,8 @@ prom_free_prom_memory (void)
#ifdef CONFIG_DISCONTIGMEM
+static pfn_t pagenr = 0;
+
void __init paging_init(void)
{
cnodeid_t node;
diff --git a/arch/mips64/sgi-ip27/ip27-pci.c b/arch/mips64/sgi-ip27/ip27-pci.c
index 5065156ab..b4cd6cabf 100644
--- a/arch/mips64/sgi-ip27/ip27-pci.c
+++ b/arch/mips64/sgi-ip27/ip27-pci.c
@@ -1,5 +1,4 @@
-/* $Id: ip27-pci.c,v 1.8 2000/02/16 01:07:30 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.
@@ -187,8 +186,6 @@ pci_swizzle(struct pci_dev *dev, u8 *pinp)
static int __init
pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- int rv;
-
if ((dev->bus->number >= MAX_PCI_BUSSES) || (pin != 1) || \
(slot >= MAX_DEVICES_PER_PCIBUS)) {
printk("Increase supported PCI busses %d,%d,%d\n", \
@@ -363,7 +360,7 @@ pci_fixup_isp2x00(struct pci_dev *d)
printk("PCI: Fixing isp2x00 in [bus:slot.fn] %s\n", d->slot_name);
/* set the resource struct for this device */
- start = (u32) bridge; /* yes, we want to lose the upper 32 bits here */
+ start = (u32) (u64)bridge; /* yes, we want to lose the upper 32 bits here */
start |= BRIDGE_DEVIO(slot);
d->resource[0].start = start;
diff --git a/arch/mips64/sgi-ip27/ip27-reset.c b/arch/mips64/sgi-ip27/ip27-reset.c
index c624e8cb3..40eff73c1 100644
--- a/arch/mips64/sgi-ip27/ip27-reset.c
+++ b/arch/mips64/sgi-ip27/ip27-reset.c
@@ -18,8 +18,6 @@
#include <asm/irq.h>
#include <asm/system.h>
#include <asm/sgialib.h>
-#include <asm/sgi/sgihpc.h>
-#include <asm/sgi/sgint23.h>
#include <asm/sn/addrs.h>
#include <asm/sn/arch.h>
#include <asm/sn/gda.h>
@@ -29,10 +27,14 @@ void machine_restart(char *command) __attribute__((noreturn));
void machine_halt(void) __attribute__((noreturn));
void machine_power_off(void) __attribute__((noreturn));
+#define noreturn while(1); /* Silence gcc. */
+
/* XXX How to pass the reboot command to the firmware??? */
void machine_restart(char *command)
{
+#if 0
int i;
+#endif
printk("Reboot started from CPU %d\n", smp_processor_id());
#ifdef CONFIG_SMP
@@ -45,6 +47,7 @@ void machine_restart(char *command)
#else
LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
#endif
+ noreturn;
}
void machine_halt(void)
@@ -58,11 +61,13 @@ void machine_halt(void)
REMOTE_HUB_S(COMPACT_TO_NASID_NODEID(i), PROMOP_REG,
PROMOP_RESTART);
LOCAL_HUB_S(NI_PORT_RESET, NPR_PORTRESET | NPR_LOCALRESET);
+ noreturn;
}
void machine_power_off(void)
{
/* To do ... */
+ noreturn;
}
void ip27_reboot_setup(void)
diff --git a/arch/mips64/sgi-ip27/ip27-setup.c b/arch/mips64/sgi-ip27/ip27-setup.c
index e76f696e1..fbd8d1fa7 100644
--- a/arch/mips64/sgi-ip27/ip27-setup.c
+++ b/arch/mips64/sgi-ip27/ip27-setup.c
@@ -1,13 +1,12 @@
-/* $Id: ip27-setup.c,v 1.7 2000/03/07 15:45:29 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.
*
* SGI IP27 specific setup.
*
- * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
- * Copyright (C) 1999 Silcon Graphics, Inc.
+ * Copyright (C) 1999, 2000 Ralf Baechle (ralf@gnu.org)
+ * Copyright (C) 1999, 2000 Silcon Graphics, Inc.
*/
#include <linux/config.h>
#include <linux/init.h>
@@ -129,7 +128,7 @@ void __init pcibr_setup(cnodeid_t nid)
widget_id = *(volatile widgetreg_t *)
(RAW_NODE_SWIN_BASE(nasid, 0x0) + WIDGET_ID);
partnum = XWIDGET_PART_NUM(widget_id);
- printk("Cpu %d, Nasid 0x%lx, pcibr_setup(): found partnum= 0x%x",
+ printk("Cpu %d, Nasid 0x%x, pcibr_setup(): found partnum= 0x%x",
smp_processor_id(), nasid, partnum);
if (partnum == BRIDGE_WIDGET_PART_NUM) {
/*
@@ -152,7 +151,7 @@ void __init pcibr_setup(cnodeid_t nid)
KLTYPE_MIDPLANE8)) == NULL)
printk("argh\n");
else
- printk("brd= 0x%x\n", brd);
+ printk("brd = 0x%lx\n", (unsigned long) brd);
if ((xbow_p = (klxbow_t *)
find_component(brd, NULL, KLSTRUCT_XBOW)) == NULL)
printk("argh\n");
diff --git a/arch/mips64/sgi-ip27/ip27-timer.c b/arch/mips64/sgi-ip27/ip27-timer.c
index 6f56d3c49..a6bcdcc95 100644
--- a/arch/mips64/sgi-ip27/ip27-timer.c
+++ b/arch/mips64/sgi-ip27/ip27-timer.c
@@ -1,7 +1,6 @@
-/* $Id: ip27-timer.c,v 1.3 2000/02/18 09:54:40 ulfc Exp $
- *
- * Copytight (C) 1999 Ralf Baechle (ralf@gnu.org)
- * Copytight (C) 1999 Silicon Graphics, Inc.
+/*
+ * Copytight (C) 1999, 2000 Ralf Baechle (ralf@gnu.org)
+ * Copytight (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <linux/init.h>
#include <linux/kernel.h>
@@ -92,7 +91,6 @@ void rt_timer_interrupt(struct pt_regs *regs)
{
int cpu = smp_processor_id();
int cpuA = ((cputoslice(cpu)) == 0);
- int user = user_mode(regs);
int irq = 7; /* XXX Assign number */
write_lock(&xtime_lock);
@@ -113,6 +111,7 @@ again:
#ifdef CONFIG_SMP
if (current->pid) {
unsigned int *inc, *inc2;
+ int user = user_mode(regs);
update_one_process(current, 1, user, !user, cpu);
if (--current->counter <= 0) {