summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
commitba2dacab305c598cd4c34a604f8e276bf5bab5ff (patch)
tree78670a0139bf4d5ace617b29b7eba82bbc74d602 /arch/sparc64/kernel
parentb77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff)
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/cpu.c3
-rw-r--r--arch/sparc64/kernel/head.S2
-rw-r--r--arch/sparc64/kernel/ioctl32.c6
-rw-r--r--arch/sparc64/kernel/irq.c32
-rw-r--r--arch/sparc64/kernel/pci_common.c12
-rw-r--r--arch/sparc64/kernel/process.c10
-rw-r--r--arch/sparc64/kernel/setup.c8
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c4
-rw-r--r--arch/sparc64/kernel/sys_sparc.c2
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c30
-rw-r--r--arch/sparc64/kernel/sys_sunos32.c2
-rw-r--r--arch/sparc64/kernel/time.c4
-rw-r--r--arch/sparc64/kernel/traps.c4
-rw-r--r--arch/sparc64/kernel/ttable.S2
-rw-r--r--arch/sparc64/kernel/unaligned.c12
15 files changed, 68 insertions, 65 deletions
diff --git a/arch/sparc64/kernel/cpu.c b/arch/sparc64/kernel/cpu.c
index dbcc0d45f..8e1a0367c 100644
--- a/arch/sparc64/kernel/cpu.c
+++ b/arch/sparc64/kernel/cpu.c
@@ -4,6 +4,7 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -48,7 +49,7 @@ struct cpu_iu_info linux_sparc_chips[] = {
#define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))
-#ifdef __SMP__
+#ifdef CONFIG_SMP
char *sparc_cpu_type[64] = { "cpu-oops", "cpu-oops1", "cpu-oops2", "cpu-oops3" };
char *sparc_fpu_type[64] = { "fpu-oops", "fpu-oops1", "fpu-oops2", "fpu-oops3" };
#else
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 7eefa9f65..b3fade43e 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -366,7 +366,7 @@ setup_tba: /* i0 = is_starfire */
/* Setup Interrupt globals */
wrpr %o1, (PSTATE_IG|PSTATE_IE), %pstate
-#ifndef __SMP__
+#ifndef CONFIG_SMP
sethi %hi(__up_workvec), %g5
or %g5, %lo(__up_workvec), %g6
#else
diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c
index c7e2fecfb..4eb22ea47 100644
--- a/arch/sparc64/kernel/ioctl32.c
+++ b/arch/sparc64/kernel/ioctl32.c
@@ -1,4 +1,4 @@
-/* $Id: ioctl32.c,v 1.88 2000/04/14 10:10:34 davem Exp $
+/* $Id: ioctl32.c,v 1.89 2000/05/06 10:38:42 davem Exp $
* ioctl32.c: Conversion between 32bit and 64bit native ioctls.
*
* Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com)
@@ -31,6 +31,7 @@
#include <linux/fd.h>
#include <linux/ppp_defs.h>
#include <linux/if_ppp.h>
+#include <linux/if_pppox.h>
#include <linux/mtio.h>
#include <linux/cdrom.h>
#include <linux/loop.h>
@@ -2763,6 +2764,9 @@ COMPATIBLE_IOCTL(PPPIOCSMRRU)
COMPATIBLE_IOCTL(PPPIOCCONNECT)
COMPATIBLE_IOCTL(PPPIOCDISCONN)
COMPATIBLE_IOCTL(PPPIOCATTCHAN)
+/* PPPOX */
+COMPATIBLE_IOCTL(PPPOEIOCSFWD);
+COMPATIBLE_IOCTL(PPPOEIOCDFWD);
/* CDROM stuff */
COMPATIBLE_IOCTL(CDROMPAUSE)
COMPATIBLE_IOCTL(CDROMRESUME)
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 6bb01d4c1..16ec61db0 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -36,7 +36,7 @@
#define SA_IMAP_MASKED 0x100
#define SA_DMA_SYNC 0x200
-#ifdef __SMP__
+#ifdef CONFIG_SMP
static void distribute_irqs(void);
#endif
@@ -55,7 +55,7 @@ static void distribute_irqs(void);
struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (64)));
-#ifndef __SMP__
+#ifndef CONFIG_SMP
unsigned int __up_workvec[16] __attribute__ ((aligned (64)));
#define irq_work(__cpu, __pil) &(__up_workvec[(void)(__cpu), (__pil)])
#else
@@ -79,7 +79,7 @@ int get_irq_list(char *buf)
{
int i, len = 0;
struct irqaction *action;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int j;
#endif
@@ -87,7 +87,7 @@ int get_irq_list(char *buf)
if(!(action = *(i + irq_action)))
continue;
len += sprintf(buf + len, "%3d: ", i);
-#ifndef __SMP__
+#ifndef CONFIG_SMP
len += sprintf(buf + len, "%10u ", kstat_irqs(i));
#else
for (j = 0; j < smp_num_cpus; j++)
@@ -409,7 +409,7 @@ int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *)
}
restore_flags(flags);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
distribute_irqs();
#endif
return 0;
@@ -540,7 +540,7 @@ out:
/* Only uniprocessor needs this IRQ/BH locking depth, on SMP it
* lives in the brlock table for cache reasons.
*/
-#ifndef __SMP__
+#ifndef CONFIG_SMP
unsigned int local_irq_count;
unsigned int local_bh_count;
#else
@@ -679,7 +679,7 @@ void __global_restore_flags(unsigned long flags)
}
}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
void catch_disabled_ivec(struct pt_regs *regs)
{
@@ -709,7 +709,7 @@ void handler_irq(int irq, struct pt_regs *regs)
{
struct ino_bucket *bp, *nbp;
int cpu = smp_processor_id();
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern int this_is_starfire;
int should_forward = (this_is_starfire == 0 &&
irq < 10 &&
@@ -732,7 +732,7 @@ void handler_irq(int irq, struct pt_regs *regs)
}
#endif
-#ifndef __SMP__
+#ifndef CONFIG_SMP
/*
* Check for TICK_INT on level 14 softint.
*/
@@ -745,7 +745,7 @@ void handler_irq(int irq, struct pt_regs *regs)
kstat.irqs[cpu][irq]++;
/* Sliiiick... */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
bp = ((irq != 0) ?
__bucket(xchg32(irq_work(cpu, irq), 0)) :
&pil0_dummy_bucket);
@@ -771,7 +771,7 @@ void handler_irq(int irq, struct pt_regs *regs)
}
/* Only the dummy bucket lacks IMAP/ICLR. */
if(bp->pil != 0) {
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Ok, here is what is going on:
* 1) Retargeting IRQs on Starfire is very
* expensive so just forget about it on them.
@@ -915,7 +915,7 @@ int request_fast_irq(unsigned int irq,
restore_flags(flags);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
distribute_irqs();
#endif
return 0;
@@ -941,14 +941,14 @@ void init_timers(void (*cfunc)(int, void *, struct pt_regs *),
unsigned long pstate;
extern unsigned long timer_tick_offset;
int node, err;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern void smp_tick_init(void);
#endif
node = linux_cpus[0].prom_node;
*clock = prom_getint(node, "clock-frequency");
timer_tick_offset = *clock / HZ;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
smp_tick_init();
#endif
@@ -1015,7 +1015,7 @@ void init_timers(void (*cfunc)(int, void *, struct pt_regs *),
sti();
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
static int retarget_one_irq(struct irqaction *p, int goal_cpu)
{
extern int this_is_starfire;
@@ -1142,7 +1142,7 @@ void __init init_IRQ(void)
map_prom_timers();
kill_prom_timer();
memset(&ivector_table[0], 0, sizeof(ivector_table));
-#ifndef __SMP__
+#ifndef CONFIG_SMP
memset(&__up_workvec[0], 0, sizeof(__up_workvec));
#endif
}
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index 5cd905244..14473724f 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -1,4 +1,4 @@
-/* $Id: pci_common.c,v 1.11 2000/04/26 10:48:02 davem Exp $
+/* $Id: pci_common.c,v 1.12 2000/05/01 06:32:49 davem Exp $
* pci_common.c: PCI controller common support.
*
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
@@ -497,10 +497,10 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt
pwalk->bus->number != pbm->pci_first_busno)
pwalk = pwalk->bus->self;
- bus_pcp = pwalk->bus->self->sysdata;
-
+ bus_pcp = pwalk->sysdata;
pregs = bus_pcp->prom_regs;
- offset = prom_getint(bus_pcp->prom_node,
+
+ offset = prom_getint(dev_pcp->prom_node,
"fcode-rom-offset");
/* Did PROM know better and assign an interrupt other
@@ -509,8 +509,8 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt
* correct 'interrupts' property, unless it is quadhme.
*/
if (offset == -1 ||
- !strcmp(bus_pcp->prom_name, "SUNW,qfe") ||
- !strcmp(bus_pcp->prom_name, "qfe")) {
+ !strcmp(dev_pcp->prom_name, "SUNW,qfe") ||
+ !strcmp(dev_pcp->prom_name, "qfe")) {
/*
* No, use low slot number bits of child as IRQ line.
*/
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index fb0e8f411..f691e9ca5 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -42,7 +42,7 @@
/* #define VERBOSE_SHOWREGS */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
/*
* the idle loop on a Sparc... ;)
@@ -259,13 +259,13 @@ void show_stackframe32(struct sparc_stackf32 *sf)
} while ((size -= sizeof(unsigned)));
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
static spinlock_t regdump_lock = SPIN_LOCK_UNLOCKED;
#endif
void __show_regs(struct pt_regs * regs)
{
-#ifdef __SMP__
+#ifdef CONFIG_SMP
unsigned long flags;
spin_lock_irqsave(&regdump_lock, flags);
@@ -287,7 +287,7 @@ void __show_regs(struct pt_regs * regs)
regs->u_regs[12], regs->u_regs[13], regs->u_regs[14],
regs->u_regs[15]);
show_regwindow(regs);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
spin_unlock_irqrestore(&regdump_lock, flags);
#endif
}
@@ -317,7 +317,7 @@ void show_regs(struct pt_regs *regs)
extern long etrap, etraptl1;
#endif
__show_regs(regs);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
{
extern void smp_report_regs(void);
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index f0c9460fa..824097fa0 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -603,7 +603,7 @@ int get_cpuinfo(char *buffer)
"type\t\t: sun4u\n"
"ncpus probed\t: %d\n"
"ncpus active\t: %d\n"
-#ifndef __SMP__
+#ifndef CONFIG_SMP
"BogoMips\t: %lu.%02lu\n"
#endif
,
@@ -611,15 +611,15 @@ int get_cpuinfo(char *buffer)
sparc_fpu_type[cpuid],
prom_rev, prom_prev >> 16, (prom_prev >> 8) & 0xff, prom_prev & 0xff,
linux_num_cpus, smp_num_cpus
-#ifndef __SMP__
+#ifndef CONFIG_SMP
, loops_per_sec/500000, (loops_per_sec/5000) % 100
#endif
);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
len += smp_bogo(buffer + len);
#endif
len += mmu_info(buffer + len);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
len += smp_info(buffer + len);
#endif
#undef ZS_LOG
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index f68d6ee9e..7bf31c104 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -89,7 +89,7 @@ extern int __ashrdi3(int, int);
extern void dump_thread(struct pt_regs *, struct user *);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern spinlock_t kernel_flag;
extern int smp_num_cpus;
#ifdef SPIN_LOCK_DEBUG
@@ -117,7 +117,7 @@ __attribute__((section("__ksymtab"))) = \
{ (unsigned long) &__sparc_priv_ ## sym, "__" #sym }
/* used by various drivers */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#ifndef SPIN_LOCK_DEBUG
/* Out of line rw-locking implementation. */
EXPORT_SYMBOL_PRIVATE(read_lock);
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 16edc28f6..c48a0a52d 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.38 2000/04/13 07:30:34 jj Exp $
+/* $Id: sys_sparc.c,v 1.39 2000/04/27 02:49:03 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 7bb75f4ae..657ceacaa 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.145 2000/04/13 07:30:34 jj Exp $
+/* $Id: sys_sparc32.c,v 1.146 2000/05/09 04:48:34 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -1584,25 +1584,23 @@ static int cp_new_stat32(struct inode *inode, struct stat32 *statbuf)
asmlinkage int sys32_newstat(char * filename, struct stat32 *statbuf)
{
- struct dentry *dentry;
+ struct nameidata nd;
int error;
lock_kernel();
- dentry = namei(filename);
-
- error = PTR_ERR(dentry);
- if (!IS_ERR(dentry)) {
- struct inode *inode = dentry->d_inode;
+ error = user_path_walk(filename, &nd);
+ if (!error) {
+ struct inode *inode = nd.dentry->d_inode;
if (inode->i_op &&
inode->i_op->revalidate)
- error = inode->i_op->revalidate(dentry);
+ error = inode->i_op->revalidate(nd.dentry);
else
error = 0;
if (!error)
error = cp_new_stat32(inode, statbuf);
- dput(dentry);
+ path_release(&nd);
}
unlock_kernel();
return error;
@@ -1610,25 +1608,23 @@ asmlinkage int sys32_newstat(char * filename, struct stat32 *statbuf)
asmlinkage int sys32_newlstat(char * filename, struct stat32 *statbuf)
{
- struct dentry *dentry;
+ struct nameidata nd;
int error;
lock_kernel();
- dentry = lnamei(filename);
-
- error = PTR_ERR(dentry);
- if (!IS_ERR(dentry)) {
- struct inode *inode = dentry->d_inode;
+ error = user_path_walk_link(filename, &nd);
+ if (!error) {
+ struct inode *inode = nd.dentry->d_inode;
if (inode->i_op &&
inode->i_op->revalidate)
- error = inode->i_op->revalidate(dentry);
+ error = inode->i_op->revalidate(nd.dentry);
else
error = 0;
if (!error)
error = cp_new_stat32(inode, statbuf);
- dput(dentry);
+ path_release(&nd);
}
unlock_kernel();
return error;
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
index 1370d0231..8fbb16374 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.45 2000/04/13 00:55:49 davem Exp $
+/* $Id: sys_sunos32.c,v 1.46 2000/04/27 02:49:03 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/kernel/time.c b/arch/sparc64/kernel/time.c
index a955e75df..c630356e1 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -102,7 +102,7 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
write_lock(&xtime_lock);
do {
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if ((regs->tstate & TSTATE_PRIV) != 0)
sparc64_do_profile(regs->tpc, regs->u_regs[UREG_RETPC]);
#endif
@@ -155,7 +155,7 @@ static void timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
write_unlock(&xtime_lock);
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
void timer_tick_interrupt(struct pt_regs *regs)
{
write_lock(&xtime_lock);
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 29032a901..cf20ffc1a 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -688,7 +688,7 @@ void die_if_kernel(char *str, struct pt_regs *regs)
instruction_dump ((unsigned int *) regs->tpc);
} else
user_instruction_dump ((unsigned int *) regs->tpc);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
smp_report_regs();
#endif
@@ -854,7 +854,7 @@ void do_tof_tl1(struct pt_regs *regs)
#ifdef CONFIG_EC_FLUSH_TRAP
void cache_flush_trap(struct pt_regs *regs)
{
-#ifndef __SMP__
+#ifndef CONFIG_SMP
unsigned node = linux_cpus[get_cpuid()].prom_node;
#else
#error cache_flush_trap not supported on sparc64/SMP yet
diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S
index 257d56d6b..027d2e124 100644
--- a/arch/sparc64/kernel/ttable.S
+++ b/arch/sparc64/kernel/ttable.S
@@ -45,7 +45,7 @@ tl0_irq7: TRAP_IRQ(handler_irq, 7) TRAP_IRQ(handler_irq, 8)
tl0_irq9: TRAP_IRQ(handler_irq, 9) TRAP_IRQ(handler_irq, 10)
tl0_irq11: TRAP_IRQ(handler_irq, 11) TRAP_IRQ(handler_irq, 12)
tl0_irq13: TRAP_IRQ(handler_irq, 13)
-#ifndef __SMP__
+#ifndef CONFIG_SMP
tl0_irq14: TRAP_IRQ(handler_irq, 14)
#else
tl0_irq14: TICK_SMP_IRQ
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
index 989e965a9..f43204c3b 100644
--- a/arch/sparc64/kernel/unaligned.c
+++ b/arch/sparc64/kernel/unaligned.c
@@ -1,4 +1,4 @@
-/* $Id: unaligned.c,v 1.19 2000/03/16 11:53:05 jj Exp $
+/* $Id: unaligned.c,v 1.20 2000/04/29 08:05:21 anton Exp $
* unaligned.c: Unaligned load/store trap handling with special
* cases for the kernel to do them more quickly.
*
@@ -360,10 +360,12 @@ void kernel_mna_trap_fault(struct pt_regs *regs, unsigned int insn)
} else
printk(KERN_ALERT "Unable to handle kernel paging request in mna handler");
printk(KERN_ALERT " at virtual address %016lx\n",address);
- printk(KERN_ALERT "current->mm->context = %016lx\n",
- (unsigned long) current->mm->context);
- printk(KERN_ALERT "current->mm->pgd = %016lx\n",
- (unsigned long) current->mm->pgd);
+ printk(KERN_ALERT "current->{mm,active_mm}->context = %016lx\n",
+ (current->mm ? current->mm->context :
+ current->active_mm->context));
+ printk(KERN_ALERT "current->{mm,active_mm}->pgd = %016lx\n",
+ (current->mm ? (unsigned long) current->mm->pgd :
+ (unsigned long) current->active_mm->pgd));
die_if_kernel("Oops", regs);
/* Not reached */
}