summaryrefslogtreecommitdiffstats
path: root/arch/sparc
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/sparc
parentb77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff)
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/defconfig1
-rw-r--r--arch/sparc/kernel/entry.S10
-rw-r--r--arch/sparc/kernel/head.S10
-rw-r--r--arch/sparc/kernel/irq.c16
-rw-r--r--arch/sparc/kernel/process.c22
-rw-r--r--arch/sparc/kernel/setup.c10
-rw-r--r--arch/sparc/kernel/signal.c5
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c8
-rw-r--r--arch/sparc/kernel/sun4c_irq.c4
-rw-r--r--arch/sparc/kernel/sun4d_irq.c27
-rw-r--r--arch/sparc/kernel/sun4m_irq.c7
-rw-r--r--arch/sparc/kernel/sys_sunos.c2
-rw-r--r--arch/sparc/kernel/time.c2
-rw-r--r--arch/sparc/kernel/traps.c13
-rw-r--r--arch/sparc/kernel/unaligned.c12
-rw-r--r--arch/sparc/lib/atomic.S7
-rw-r--r--arch/sparc/lib/bitops.S21
-rw-r--r--arch/sparc/lib/rwsem.S9
-rw-r--r--arch/sparc/mm/btfixup.c2
-rw-r--r--arch/sparc/mm/fault.c19
-rw-r--r--arch/sparc/mm/hypersparc.S13
-rw-r--r--arch/sparc/mm/init.c2
-rw-r--r--arch/sparc/mm/srmmu.c24
-rw-r--r--arch/sparc/mm/sun4c.c2
-rw-r--r--arch/sparc/mm/swift.S9
-rw-r--r--arch/sparc/mm/tsunami.S7
-rw-r--r--arch/sparc/mm/viking.S21
27 files changed, 152 insertions, 133 deletions
diff --git a/arch/sparc/defconfig b/arch/sparc/defconfig
index f2059871c..b9c76ef4a 100644
--- a/arch/sparc/defconfig
+++ b/arch/sparc/defconfig
@@ -268,6 +268,7 @@ CONFIG_MINIX_FS=m
CONFIG_HPFS_FS=m
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 226e53897..8141d0e24 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -294,7 +294,7 @@ bad_trap_handler:
real_irq_entry:
SAVE_ALL
-#ifdef __SMP__
+#ifdef CONFIG_SMP
.globl patchme_maybe_smp_msg
cmp %l7, 12
@@ -319,7 +319,7 @@ patch_handler_irq:
RESTORE_ALL
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* SMP per-cpu ticker interrupts are handled specially. */
smp4m_ticker:
bne real_irq_continue+4
@@ -479,7 +479,7 @@ linux_trap_ipi15_sun4d:
/* FIXME */
1: b,a 1b
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* This routine handles illegal instructions and privileged
* instruction attempts from user code.
@@ -1462,7 +1462,7 @@ C_LABEL(ret_from_syscall):
b C_LABEL(ret_sys_call)
ld [%sp + REGWIN_SZ + PT_I0], %o0
-#ifdef __SMP__
+#ifdef CONFIG_SMP
.globl C_LABEL(ret_from_smpfork)
C_LABEL(ret_from_smpfork):
wr %l0, PSR_ET, %psr
@@ -1806,7 +1806,7 @@ C_LABEL(udelay):
sethi %hi(0x10c6), %o1
call .umul
or %o1, %lo(0x10c6), %o1
-#ifndef __SMP__
+#ifndef CONFIG_SMP
sethi %hi(C_LABEL(loops_per_sec)), %o3
call .umul
ld [%o3 + %lo(C_LABEL(loops_per_sec))], %o1
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
index 56b3da66a..30df8a0f2 100644
--- a/arch/sparc/kernel/head.S
+++ b/arch/sparc/kernel/head.S
@@ -92,7 +92,7 @@ __stext:
_stext:
start:
C_LABEL(trapbase):
-#ifdef __SMP__
+#ifdef CONFIG_SMP
C_LABEL(trapbase_cpu0):
#endif
/* We get control passed to us here at t_zero. */
@@ -124,7 +124,7 @@ t_irq12:TRAP_ENTRY_INTERRUPT(12) /* IRQ Zilog serial chip */
t_irq13:TRAP_ENTRY_INTERRUPT(13) /* IRQ Audio Intr. */
t_irq14:TRAP_ENTRY_INTERRUPT(14) /* IRQ Timer #2 */
.globl t_nmi
-#ifndef __SMP__
+#ifndef CONFIG_SMP
t_nmi: NMI_TRAP /* Level 15 (NMI) */
#else
t_nmi: TRAP_ENTRY(0x1f, linux_trap_ipi15_sun4m)
@@ -203,7 +203,7 @@ dbtrap2:BAD_TRAP(0xff) /* Debugger/PROM breakpoint #2 */
.globl C_LABEL(end_traptable)
C_LABEL(end_traptable):
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Trap tables for the other cpus. */
.globl C_LABEL(trapbase_cpu1), C_LABEL(trapbase_cpu2), C_LABEL(trapbase_cpu3)
C_LABEL(trapbase_cpu1):
@@ -885,7 +885,7 @@ sun4d_init:
or %g5, %g3, %g5
st %g5, [%g4]
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Get our CPU id out of bootbus */
set SUN4D_BOOTBUS_CPUID, %g3
lduba [%g3] ASI_M_CTL, %g3
@@ -1030,7 +1030,7 @@ sun4c_continue_boot:
*/
set C_LABEL(init_task_union), %g6
set C_LABEL(current_set), %g2
-#ifdef __SMP__
+#ifdef CONFIG_SMP
sethi %hi(C_LABEL(boot_cpu_id4)), %g3
ldub [%g3 + %lo(C_LABEL(boot_cpu_id4))], %g3
st %g6, [%g2]
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 07aefa660..5eaa8beda 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -101,7 +101,7 @@ int get_irq_list(char *buf)
{
int i, len = 0;
struct irqaction * action;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int j;
#endif
@@ -115,7 +115,7 @@ int get_irq_list(char *buf)
if (!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++)
@@ -195,7 +195,7 @@ void free_irq(unsigned int irq, void *dev_id)
restore_flags(flags);
}
-#ifndef __SMP__
+#ifndef CONFIG_SMP
unsigned int local_bh_count;
unsigned int local_irq_count;
@@ -427,7 +427,7 @@ void __global_restore_flags(unsigned long flags)
}
}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs)
{
@@ -456,13 +456,13 @@ void handler_irq(int irq, struct pt_regs * regs)
{
struct irqaction * action;
int cpu = smp_processor_id();
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern void smp4m_irq_rotate(int cpu);
#endif
irq_enter(cpu, irq);
disable_pil_irq(irq);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Only rotate on lower priority IRQ's (scsi, ethernet, etc.). */
if(irq < 10)
smp4m_irq_rotate(cpu);
@@ -505,7 +505,7 @@ int request_fast_irq(unsigned int irq,
struct irqaction *action;
unsigned long flags;
unsigned int cpu_irq;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
struct tt_entry *trap_table;
extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3;
#endif
@@ -559,7 +559,7 @@ int request_fast_irq(unsigned int irq,
table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP;
INSTANTIATE(sparc_ttable)
-#ifdef __SMP__
+#ifdef CONFIG_SMP
trap_table = &trapbase_cpu1; INSTANTIATE(trap_table)
trap_table = &trapbase_cpu2; INSTANTIATE(trap_table)
trap_table = &trapbase_cpu3; INSTANTIATE(trap_table)
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index d167d5de7..96cd44aea 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -45,7 +45,7 @@ extern void fpsave(unsigned long *, unsigned long *, void *, unsigned long *);
struct task_struct *last_task_used_math = NULL;
struct task_struct *current_set[NR_CPUS] = {&init_task, };
-#ifndef __SMP__
+#ifndef CONFIG_SMP
#define SUN4C_FAULT_HIGH 100
@@ -229,7 +229,7 @@ void show_backtrace(void)
__show_backtrace(fp);
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
void smp_show_backtrace_all_cpus(void)
{
xc0((smpfunc_t) show_backtrace);
@@ -320,7 +320,7 @@ void show_thread(struct thread_struct *thread)
*/
void exit_thread(void)
{
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if(last_task_used_math == current) {
#else
if(current->flags & PF_USEDFPU) {
@@ -329,7 +329,7 @@ void exit_thread(void)
put_psr(get_psr() | PSR_EF);
fpsave(&current->thread.float_regs[0], &current->thread.fsr,
&current->thread.fpqueue[0], &current->thread.fpqdepth);
-#ifndef __SMP__
+#ifndef CONFIG_SMP
last_task_used_math = NULL;
#else
current->flags &= ~PF_USEDFPU;
@@ -343,7 +343,7 @@ void flush_thread(void)
/* No new signal delivery by default */
current->thread.new_signal = 0;
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if(last_task_used_math == current) {
#else
if(current->flags & PF_USEDFPU) {
@@ -352,7 +352,7 @@ void flush_thread(void)
put_psr(get_psr() | PSR_EF);
fpsave(&current->thread.float_regs[0], &current->thread.fsr,
&current->thread.fpqueue[0], &current->thread.fpqdepth);
-#ifndef __SMP__
+#ifndef CONFIG_SMP
last_task_used_math = NULL;
#else
current->flags &= ~PF_USEDFPU;
@@ -453,7 +453,7 @@ clone_stackframe(struct sparc_stackf *dst, struct sparc_stackf *src)
* allocate the task_struct and kernel stack in
* do_fork().
*/
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern void ret_from_smpfork(void);
#else
extern void ret_from_syscall(void);
@@ -466,7 +466,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
struct reg_window *new_stack;
unsigned long stack_offset;
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if(last_task_used_math == current) {
#else
if(current->flags & PF_USEDFPU) {
@@ -474,7 +474,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
put_psr(get_psr() | PSR_EF);
fpsave(&p->thread.float_regs[0], &p->thread.fsr,
&p->thread.fpqueue[0], &p->thread.fpqdepth);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
current->flags &= ~PF_USEDFPU;
#endif
}
@@ -490,7 +490,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
copy_regwin(new_stack, (((struct reg_window *) regs) - 1));
p->thread.ksp = (unsigned long) new_stack;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
p->thread.kpc = (((unsigned long) ret_from_smpfork) - 0x8);
p->thread.kpsr = current->thread.fork_kpsr | PSR_PIL;
#else
@@ -604,7 +604,7 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
fpregs->pr_q_entrysize = 8;
return 1;
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (current->flags & PF_USEDFPU) {
put_psr(get_psr() | PSR_EF);
fpsave(&current->thread.float_regs[0], &current->thread.fsr,
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index 8c70c9f75..25ea5cb8d 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -80,7 +80,7 @@ void prom_sync_me(void)
{
unsigned long prom_tbr, flags;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
global_irq_holder = NO_PROC_ID;
*((unsigned char *)&global_irq_lock) = 0;
*((unsigned char *)&global_bh_lock) = 0;
@@ -478,7 +478,7 @@ int get_cpuinfo(char *buffer)
"type\t\t: %s\n"
"ncpus probed\t: %d\n"
"ncpus active\t: %d\n"
-#ifndef __SMP__
+#ifndef CONFIG_SMP
"BogoMips\t: %lu.%02lu\n"
#endif
,
@@ -487,15 +487,15 @@ int get_cpuinfo(char *buffer)
romvec->pv_romvers, prom_rev, romvec->pv_printrev >> 16, (short)romvec->pv_printrev,
&cputypval,
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_info(buffer + len);
#endif
len += mmu_info(buffer + len);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
len += smp_info(buffer + len);
#endif
return len;
diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c
index 0af0b63d7..41a8a68b7 100644
--- a/arch/sparc/kernel/signal.c
+++ b/arch/sparc/kernel/signal.c
@@ -7,6 +7,7 @@
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
*/
+#include <linux/config.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/signal.h>
@@ -197,7 +198,7 @@ static inline int
restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t *fpu)
{
int err;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (current->flags & PF_USEDFPU)
regs->psr &= ~PSR_EF;
#else
@@ -554,7 +555,7 @@ static inline int
save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t *fpu)
{
int err = 0;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (current->flags & PF_USEDFPU) {
put_psr(get_psr() | PSR_EF);
fpsave(&current->thread.float_regs[0], &current->thread.fsr,
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 7b7a0eb61..d4944b502 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -73,7 +73,7 @@ extern int __divdi3(int, int);
extern void dump_thread(struct pt_regs *, struct user *);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern spinlock_t kernel_flag;
#endif
@@ -108,7 +108,7 @@ EXPORT_SYMBOL_PRIVATE(_rw_read_enter);
EXPORT_SYMBOL_PRIVATE(_rw_read_exit);
EXPORT_SYMBOL_PRIVATE(_rw_write_enter);
#endif
-#ifdef __SMP__
+#ifdef CONFIG_SMP
EXPORT_SYMBOL(__global_save_flags);
EXPORT_SYMBOL(__global_restore_flags);
EXPORT_SYMBOL(__global_sti);
@@ -135,7 +135,7 @@ EXPORT_SYMBOL_PRIVATE(_set_le_bit);
EXPORT_SYMBOL_PRIVATE(_clear_le_bit);
/* IRQ implementation. */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
EXPORT_SYMBOL(kernel_flag);
EXPORT_SYMBOL(global_irq_holder);
EXPORT_SYMBOL(global_irq_lock);
@@ -158,7 +158,7 @@ EXPORT_SYMBOL(io_remap_page_range);
/* EXPORT_SYMBOL(iounit_map_dma_page); */
/* Btfixup stuff cannot have versions, it would be complicated too much */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(___xchg32));
#else
EXPORT_SYMBOL_NOVERS(BTFIXUP_CALL(__smp_processor_id));
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
index a8efdd12a..3f33ca265 100644
--- a/arch/sparc/kernel/sun4c_irq.c
+++ b/arch/sparc/kernel/sun4c_irq.c
@@ -182,7 +182,7 @@ static void __init sun4c_init_timers(void (*counter_fn)(int, void *, struct pt_r
claim_ticker14(NULL, PROFILE_IRQ, 0);
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
static void sun4c_nop(void) {}
#endif
@@ -222,7 +222,7 @@ void __init sun4c_init_IRQ(void)
BTFIXUPSET_CALL(load_profile_irq, sun4c_load_profile_irq, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(__irq_itoa, sun4m_irq_itoa, BTFIXUPCALL_NORM);
init_timers = sun4c_init_timers;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
BTFIXUPSET_CALL(set_cpu_int, sun4c_nop, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(clear_cpu_int, sun4c_nop, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(set_irq_udt, sun4c_nop, BTFIXUPCALL_NOP);
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index dbbb4edca..7d8fab67f 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -6,6 +6,7 @@
* Heavily based on arch/sparc/kernel/irq.c.
*/
+#include <linux/config.h>
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/linkage.h>
@@ -47,7 +48,7 @@ struct sun4d_timer_regs *sun4d_timers;
extern struct irqaction static_irqaction[MAX_STATIC_ALLOC];
extern int static_irq_count;
unsigned char cpu_leds[32];
-#ifdef __SMP__
+#ifdef CONFIG_SMP
unsigned char sbus_tid[32];
#endif
@@ -67,7 +68,7 @@ static int sbus_to_pil[] = {
};
static int nsbi;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
spinlock_t sun4d_imsk_lock = SPIN_LOCK_UNLOCKED;
#endif
@@ -75,7 +76,7 @@ int sun4d_get_irq_list(char *buf)
{
int i, j = 0, k = 0, len = 0, sbusl;
struct irqaction * action;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int x;
#endif
@@ -94,7 +95,7 @@ int sun4d_get_irq_list(char *buf)
continue;
}
found_it: len += sprintf(buf+len, "%3d: ", i);
-#ifndef __SMP__
+#ifndef CONFIG_SMP
len += sprintf(buf+len, "%10u ", kstat_irqs(i));
#else
for (x = 0; x < smp_num_cpus; x++)
@@ -320,13 +321,13 @@ int sun4d_request_irq(unsigned int irq,
static void sun4d_disable_irq(unsigned int irq)
{
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int tid = sbus_tid[(irq >> 5) - 1];
unsigned long flags;
#endif
if (irq < NR_IRQS) return;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
spin_lock_irqsave(&sun4d_imsk_lock, flags);
cc_set_imsk_other(tid, cc_get_imsk_other(tid) | (1 << sbus_to_pil[(irq >> 2) & 7]));
spin_unlock_irqrestore(&sun4d_imsk_lock, flags);
@@ -337,13 +338,13 @@ static void sun4d_disable_irq(unsigned int irq)
static void sun4d_enable_irq(unsigned int irq)
{
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int tid = sbus_tid[(irq >> 5) - 1];
unsigned long flags;
#endif
if (irq < NR_IRQS) return;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
spin_lock_irqsave(&sun4d_imsk_lock, flags);
cc_set_imsk_other(tid, cc_get_imsk_other(tid) & ~(1 << sbus_to_pil[(irq >> 2) & 7]));
spin_unlock_irqrestore(&sun4d_imsk_lock, flags);
@@ -352,7 +353,7 @@ static void sun4d_enable_irq(unsigned int irq)
#endif
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
static void sun4d_set_cpu_int(int cpu, int level)
{
sun4d_send_ipi(cpu, level);
@@ -441,7 +442,7 @@ static void __init sun4d_init_timers(void (*counter_fn)(int, void *, struct pt_r
/* Map the User Timer registers. */
memset(&r, 0, sizeof(r));
-#ifdef __SMP__
+#ifdef CONFIG_SMP
r.start = CSR_BASE(boot_cpu_id)+BW_TIMER_LIMIT;
#else
r.start = CSR_BASE(0)+BW_TIMER_LIMIT;
@@ -469,7 +470,7 @@ static void __init sun4d_init_timers(void (*counter_fn)(int, void *, struct pt_r
for(cpu = 0; cpu < linux_num_cpus; cpu++)
sun4d_load_profile_irq((linux_cpus[cpu].mid >> 3), 0);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
{
unsigned long flags;
extern unsigned long lvl14_save[4];
@@ -507,7 +508,7 @@ void __init sun4d_init_sbi_irq(void)
sbus_actions = (struct sbus_action *)kmalloc (nsbi * 8 * 4 * sizeof(struct sbus_action), GFP_ATOMIC);
memset (sbus_actions, 0, (nsbi * 8 * 4 * sizeof(struct sbus_action)));
for_each_sbus(sbus) {
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern unsigned char boot_cpu_id;
set_sbi_tid(sbus->devid, boot_cpu_id << 3);
@@ -544,7 +545,7 @@ void __init sun4d_init_IRQ(void)
BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(__irq_itoa, sun4d_irq_itoa, BTFIXUPCALL_NORM);
init_timers = sun4d_init_timers;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
BTFIXUPSET_CALL(set_cpu_int, sun4d_set_cpu_int, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(clear_cpu_int, sun4d_clear_ipi, BTFIXUPCALL_NOP);
BTFIXUPSET_CALL(set_irq_udt, sun4d_set_udt, BTFIXUPCALL_NOP);
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index 0f3cf9564..2c79caf33 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -9,6 +9,7 @@
* Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk)
*/
+#include <linux/config.h>
#include <linux/ptrace.h>
#include <linux/errno.h>
#include <linux/linkage.h>
@@ -167,7 +168,7 @@ static void sun4m_enable_pil_irq(unsigned int pil)
sun4m_interrupts->clear = cpu_pil_to_imask[pil];
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
static void sun4m_send_ipi(int cpu, int level)
{
unsigned long mask;
@@ -286,7 +287,7 @@ static void __init sun4m_init_timers(void (*counter_fn)(int, void *, struct pt_r
} else {
sun4m_timers->cpu_timers[0].l14_timer_limit = 0;
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
{
unsigned long flags;
extern unsigned long lvl14_save[4];
@@ -374,7 +375,7 @@ void __init sun4m_init_IRQ(void)
BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(__irq_itoa, sun4m_irq_itoa, BTFIXUPCALL_NORM);
init_timers = sun4m_init_timers;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
BTFIXUPSET_CALL(set_cpu_int, sun4m_send_ipi, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(clear_cpu_int, sun4m_clear_ipi, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(set_irq_udt, sun4m_set_udt, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c
index bb2c4b472..c889af1d8 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.121 2000/04/13 00:55:48 davem Exp $
+/* $Id: sys_sunos.c,v 1.122 2000/04/27 02:49:03 davem Exp $
* sys_sunos.c: SunOS specific syscall compatibility support.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 68105c421..31fcc6166 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -113,7 +113,7 @@ void timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
/* last time the cmos clock got updated */
static long last_rtc_update=0;
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if(!user_mode(regs))
sparc_do_profile(regs->pc, regs->u_regs[UREG_RETPC]);
#endif
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
index d7159f9ff..4717d9bd3 100644
--- a/arch/sparc/kernel/traps.c
+++ b/arch/sparc/kernel/traps.c
@@ -9,6 +9,7 @@
* I hate traps on the sparc, grrr...
*/
+#include <linux/config.h>
#include <linux/sched.h> /* for jiffies */
#include <linux/kernel.h>
#include <linux/signal.h>
@@ -243,7 +244,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
put_psr(get_psr() | PSR_EF); /* Allow FPU ops. */
regs->psr |= PSR_EF;
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if(last_task_used_math == current)
goto out;
if(last_task_used_math) {
@@ -269,7 +270,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
}
current->flags |= PF_USEDFPU;
#endif
-#ifndef __SMP__
+#ifndef CONFIG_SMP
out:
#endif
unlock_kernel();
@@ -289,7 +290,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
siginfo_t info;
unsigned long fsr;
int ret = 0;
-#ifndef __SMP__
+#ifndef CONFIG_SMP
struct task_struct *fpt = last_task_used_math;
#else
struct task_struct *fpt = current;
@@ -300,7 +301,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
* error into our fake static buffer and hope it don't
* happen again. Thank you crashme...
*/
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if(!fpt) {
#else
if(!(fpt->flags & PF_USEDFPU)) {
@@ -345,7 +346,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
}
/* nope, better SIGFPE the offending process... */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
fpt->flags &= ~PF_USEDFPU;
#endif
if(psr & PSR_PS) {
@@ -382,7 +383,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
info.si_code = FPE_FLTRES;
}
send_sig_info(SIGFPE, &info, fpt);
-#ifndef __SMP__
+#ifndef CONFIG_SMP
last_task_used_math = NULL;
#endif
regs->psr &= ~PSR_EF;
diff --git a/arch/sparc/kernel/unaligned.c b/arch/sparc/kernel/unaligned.c
index 2f051a6aa..0f718bac8 100644
--- a/arch/sparc/kernel/unaligned.c
+++ b/arch/sparc/kernel/unaligned.c
@@ -1,4 +1,4 @@
-/* $Id: unaligned.c,v 1.21 2000/03/15 08:50:16 anton Exp $
+/* $Id: unaligned.c,v 1.22 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.
*
@@ -351,10 +351,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 %08lx\n",address);
- printk(KERN_ALERT "current->mm->context = %08lx\n",
- (unsigned long) current->mm->context);
- printk(KERN_ALERT "current->mm->pgd = %08lx\n",
- (unsigned long) current->mm->pgd);
+ printk(KERN_ALERT "current->{mm,active_mm}->context = %08lx\n",
+ (current->mm ? current->mm->context :
+ current->active_mm->context));
+ printk(KERN_ALERT "current->{mm,active_mm}->pgd = %08lx\n",
+ (current->mm ? (unsigned long) current->mm->pgd :
+ (unsigned long) current->active_mm->pgd));
die_if_kernel("Oops", regs);
/* Not reached */
}
diff --git a/arch/sparc/lib/atomic.S b/arch/sparc/lib/atomic.S
index 76c4d8164..31da5750b 100644
--- a/arch/sparc/lib/atomic.S
+++ b/arch/sparc/lib/atomic.S
@@ -3,6 +3,7 @@
* Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
*/
+#include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
@@ -13,7 +14,7 @@
.globl __atomic_begin
__atomic_begin:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
.globl ___xchg32_sun4c
___xchg32_sun4c:
rd %psr, %g3
@@ -51,7 +52,7 @@ ___atomic_add:
or %g3, PSR_PIL, %g7 ! Disable interrupts
wr %g7, 0x0, %psr ! Set %psr
nop; nop; nop; ! Let the bits set
-#ifdef __SMP__
+#ifdef CONFIG_SMP
1: ldstub [%g1 + 3], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
bne 1b ! Nope...
@@ -77,7 +78,7 @@ ___atomic_sub:
or %g3, PSR_PIL, %g7 ! Disable interrupts
wr %g7, 0x0, %psr ! Set %psr
nop; nop; nop; ! Let the bits set
-#ifdef __SMP__
+#ifdef CONFIG_SMP
1: ldstub [%g1 + 3], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
bne 1b ! Nope...
diff --git a/arch/sparc/lib/bitops.S b/arch/sparc/lib/bitops.S
index 10fc42738..30e70f949 100644
--- a/arch/sparc/lib/bitops.S
+++ b/arch/sparc/lib/bitops.S
@@ -3,6 +3,7 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
+#include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
@@ -27,7 +28,7 @@ ___set_bit:
or %g3, PSR_PIL, %g5
wr %g5, 0x0, %psr
nop; nop; nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
@@ -36,7 +37,7 @@ ___set_bit:
ld [%g1], %g7
or %g7, %g2, %g5
and %g7, %g2, %g2
-#ifdef __SMP__
+#ifdef CONFIG_SMP
st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
stb %g0, [%g5]
@@ -56,7 +57,7 @@ ___clear_bit:
or %g3, PSR_PIL, %g5
wr %g5, 0x0, %psr
nop; nop; nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
@@ -65,7 +66,7 @@ ___clear_bit:
ld [%g1], %g7
andn %g7, %g2, %g5
and %g7, %g2, %g2
-#ifdef __SMP__
+#ifdef CONFIG_SMP
st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
stb %g0, [%g5]
@@ -85,7 +86,7 @@ ___change_bit:
or %g3, PSR_PIL, %g5
wr %g5, 0x0, %psr
nop; nop; nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
@@ -94,7 +95,7 @@ ___change_bit:
ld [%g1], %g7
xor %g7, %g2, %g5
and %g7, %g2, %g2
-#ifdef __SMP__
+#ifdef CONFIG_SMP
st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
stb %g0, [%g5]
@@ -114,7 +115,7 @@ ___set_le_bit:
or %g3, PSR_PIL, %g5
wr %g5, 0x0, %psr
nop; nop; nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
@@ -123,7 +124,7 @@ ___set_le_bit:
ldub [%g1], %g7
or %g7, %g2, %g5
and %g7, %g2, %g2
-#ifdef __SMP__
+#ifdef CONFIG_SMP
stb %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
stb %g0, [%g5]
@@ -142,7 +143,7 @@ ___clear_le_bit:
or %g3, PSR_PIL, %g5
wr %g5, 0x0, %psr
nop; nop; nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
@@ -151,7 +152,7 @@ ___clear_le_bit:
ldub [%g1], %g7
andn %g7, %g2, %g5
and %g7, %g2, %g2
-#ifdef __SMP__
+#ifdef CONFIG_SMP
stb %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
stb %g0, [%g5]
diff --git a/arch/sparc/lib/rwsem.S b/arch/sparc/lib/rwsem.S
index 0396bf2bc..ebbfd3255 100644
--- a/arch/sparc/lib/rwsem.S
+++ b/arch/sparc/lib/rwsem.S
@@ -4,6 +4,7 @@
* Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com)
*/
+#include <linux/config.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
@@ -21,7 +22,7 @@ ___down_read:
nop
nop
nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
1: ldstub [%g1 + 4], %g7
tst %g7
bne 1b
@@ -72,7 +73,7 @@ ___down_write:
sethi %hi(0x01000000), %g2
nop
nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
1: ldstub [%g1 + 4], %g7
tst %g7
bne 1b
@@ -123,7 +124,7 @@ ___up_read:
nop
nop
nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
1: ldstub [%g1 + 4], %g7
tst %g7
bne 1b
@@ -168,7 +169,7 @@ ___up_write:
sethi %hi(0x01000000), %g2
nop
nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
1: ldstub [%g1 + 4], %g7
tst %g7
bne 1b
diff --git a/arch/sparc/mm/btfixup.c b/arch/sparc/mm/btfixup.c
index 9b766f4eb..72b8cff3d 100644
--- a/arch/sparc/mm/btfixup.c
+++ b/arch/sparc/mm/btfixup.c
@@ -322,7 +322,7 @@ void __init btfixup(void)
} else
p = q + count;
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
flush_cacheall = (void (*)(void))BTFIXUPVAL_CALL(local_flush_cache_all);
#else
flush_cacheall = (void (*)(void))BTFIXUPVAL_CALL(flush_cache_all);
diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c
index a2af935cb..4c86d7658 100644
--- a/arch/sparc/mm/fault.c
+++ b/arch/sparc/mm/fault.c
@@ -1,4 +1,4 @@
-/* $Id: fault.c,v 1.115 2000/04/25 04:13:25 davem Exp $
+/* $Id: fault.c,v 1.116 2000/05/03 06:37:03 davem Exp $
* fault.c: Page fault handlers for the Sparc.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -249,12 +249,17 @@ good_area:
* make sure we exit gracefully rather than endlessly redo
* the fault.
*/
- {
- int fault = handle_mm_fault(mm, vma, address, write);
- if (fault < 0)
- goto out_of_memory;
- if (!fault)
- goto do_sigbus;
+ switch (handle_mm_fault(mm, vma, address, write)) {
+ case 1:
+ current->min_flt++;
+ break;
+ case 2:
+ current->maj_flt++;
+ break;
+ case 0:
+ goto do_sigbus;
+ default:
+ goto out_of_memory;
}
up(&mm->mmap_sem);
return;
diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S
index 19b698a9b..5c1c0143d 100644
--- a/arch/sparc/mm/hypersparc.S
+++ b/arch/sparc/mm/hypersparc.S
@@ -9,6 +9,7 @@
#include <asm/asi.h>
#include <asm/page.h>
#include <asm/pgtsrmmu.h>
+#include <linux/config.h>
#include <linux/init.h>
#define WINDOW_FLUSH(tmp1, tmp2) \
@@ -47,7 +48,7 @@ hypersparc_flush_cache_all:
/* We expand the window flush to get maximum performance. */
hypersparc_flush_cache_mm:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g1
cmp %g1, -1
be hypersparc_flush_cache_mm_out
@@ -84,7 +85,7 @@ hypersparc_flush_cache_mm_out:
/* The things we do for performance... */
hypersparc_flush_cache_range:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g1
cmp %g1, -1
be hypersparc_flush_cache_range_out
@@ -174,7 +175,7 @@ hypersparc_flush_cache_range_out:
hypersparc_flush_cache_page:
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
ld [%o0 + AOFF_mm_context], %g2
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %g2, -1
be hypersparc_flush_cache_page_out
#endif
@@ -282,7 +283,7 @@ hypersparc_flush_tlb_mm:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o1
lda [%g1] ASI_M_MMUREGS, %g5
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o1, -1
be hypersparc_flush_tlb_mm_out
#endif
@@ -297,7 +298,7 @@ hypersparc_flush_tlb_range:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o3, -1
be hypersparc_flush_tlb_range_out
#endif
@@ -320,7 +321,7 @@ hypersparc_flush_tlb_page:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o3, -1
be hypersparc_flush_tlb_page_out
#endif
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
index 2fa3a2c56..87e30eda1 100644
--- a/arch/sparc/mm/init.c
+++ b/arch/sparc/mm/init.c
@@ -86,7 +86,7 @@ void show_mem(void)
printk("%ld pages of RAM\n", totalram_pages);
printk("%d free pages\n", nr_free_pages());
printk("%ld pages in page table cache\n",pgtable_cache_size);
-#ifndef __SMP__
+#ifndef CONFIG_SMP
if (sparc_cpu_model == sun4m || sparc_cpu_model == sun4d)
printk("%ld entries in page dir cache\n",pgd_cache_size);
#endif
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 96aee65d6..1fa50e946 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -57,7 +57,7 @@ extern struct resource sparc_iomap;
extern unsigned long last_valid_pfn;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define FLUSH_BEGIN(mm)
#define FLUSH_END
#else
@@ -77,7 +77,7 @@ BTFIXUPDEF_CALL(void, flush_chunk, unsigned long)
#define flush_page_for_dma(page) BTFIXUP_CALL(flush_page_for_dma)(page)
int flush_page_for_dma_global = 1;
#define flush_chunk(chunk) BTFIXUP_CALL(flush_chunk)(chunk)
-#ifdef __SMP__
+#ifdef CONFIG_SMP
BTFIXUPDEF_CALL(void, local_flush_page_for_dma, unsigned long)
#define local_flush_page_for_dma(page) BTFIXUP_CALL(local_flush_page_for_dma)(page)
@@ -513,7 +513,7 @@ static void srmmu_set_pte_nocache_viking(pte_t *ptep, pte_t pteval)
static void srmmu_quick_kernel_fault(unsigned long address)
{
-#ifdef __SMP__
+#ifdef CONFIG_SMP
printk("CPU[%d]: Kernel faults at addr=0x%08lx\n",
smp_processor_id(), address);
while (1) ;
@@ -1464,7 +1464,7 @@ static void __init init_vac_layout(void)
{
int nd, cache_lines;
char node_str[128];
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int cpu = 0;
unsigned long max_size = 0;
unsigned long min_line_size = 0x10000000;
@@ -1488,7 +1488,7 @@ static void __init init_vac_layout(void)
vac_cache_size = cache_lines * vac_line_size;
vac_badbits = (vac_cache_size - 1) & PAGE_MASK;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if(vac_cache_size > max_size)
max_size = vac_cache_size;
if(vac_line_size < min_line_size)
@@ -1505,7 +1505,7 @@ static void __init init_vac_layout(void)
prom_printf("No CPU nodes found, halting.\n");
prom_halt();
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
vac_cache_size = max_size;
vac_line_size = min_line_size;
vac_badbits = (vac_cache_size - 1) & PAGE_MASK;
@@ -1998,7 +1998,7 @@ static void __init poke_viking(void)
mreg &= ~(VIKING_ACENABLE);
srmmu_set_mmureg(mreg);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Avoid unnecessary cross calls. */
BTFIXUPCOPY_CALL(flush_cache_all, local_flush_cache_all);
BTFIXUPCOPY_CALL(flush_cache_mm, local_flush_cache_mm);
@@ -2052,7 +2052,7 @@ static void __init init_viking(void)
BTFIXUPSET_CALL(flush_cache_page, viking_flush_cache_page, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(flush_cache_range, viking_flush_cache_range, BTFIXUPCALL_NORM);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (sparc_cpu_model == sun4d) {
BTFIXUPSET_CALL(flush_tlb_all, sun4dsmp_flush_tlb_all, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(flush_tlb_mm, sun4dsmp_flush_tlb_mm, BTFIXUPCALL_NORM);
@@ -2263,7 +2263,7 @@ static void __init patch_window_trap_handlers(void)
PATCH_BRANCH(sparc_ttable[SP_TRAP_DACC].inst_three, srmmu_fault);
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Local cross-calls. */
static void smp_flush_page_for_dma(unsigned long page)
{
@@ -2299,7 +2299,7 @@ void __init ld_mmu_srmmu(void)
pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF;
/* Functions */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2);
#endif
BTFIXUPSET_CALL(get_pte_fast, srmmu_get_pte_fast, BTFIXUPCALL_RETINT(0));
@@ -2383,7 +2383,7 @@ void __init ld_mmu_srmmu(void)
get_srmmu_type();
patch_window_trap_handlers();
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* El switcheroo... */
BTFIXUPCOPY_CALL(local_flush_cache_all, flush_cache_all);
@@ -2417,7 +2417,7 @@ void __init ld_mmu_srmmu(void)
ld_mmu_iounit();
else
ld_mmu_iommu();
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (sparc_cpu_model == sun4d)
sun4d_init_smp();
else
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 24fc68c5a..9671e7ee7 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -2625,7 +2625,7 @@ void __init ld_mmu_sun4c(void)
_SUN4C_PAGE_IO | _SUN4C_PAGE_NOCACHE;
/* Functions */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4c, BTFIXUPCALL_NORM);
#endif
BTFIXUPSET_CALL(get_pte_fast, sun4c_pte_get, BTFIXUPCALL_NORM);
diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S
index 914f3071d..f8e2635bc 100644
--- a/arch/sparc/mm/swift.S
+++ b/arch/sparc/mm/swift.S
@@ -4,6 +4,7 @@
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
*/
+#include <linux/config.h>
#include <asm/psr.h>
#include <asm/asi.h>
#include <asm/page.h>
@@ -64,7 +65,7 @@ swift_flush_cache_all:
.globl swift_flush_cache_mm
swift_flush_cache_mm:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
be swift_flush_cache_mm_out
@@ -131,7 +132,7 @@ swift_flush_cache_range:
swift_flush_cache_page:
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
70:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
be swift_flush_cache_page_out
@@ -237,7 +238,7 @@ swift_flush_sig_insns:
.globl swift_flush_tlb_all
swift_flush_tlb_mm:
swift_flush_tlb_range:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
be swift_flush_tlb_all_out
@@ -255,7 +256,7 @@ swift_flush_tlb_page:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o3, -1
be swift_flush_tlb_page_out
nop
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S
index 07c5ed620..932713eef 100644
--- a/arch/sparc/mm/tsunami.S
+++ b/arch/sparc/mm/tsunami.S
@@ -4,6 +4,7 @@
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
*/
+#include <linux/config.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
#include <asm/asi.h>
@@ -37,7 +38,7 @@ tsunami_flush_cache_page:
tsunami_flush_cache_mm:
tsunami_flush_cache_range:
ld [%o0 + AOFF_mm_context], %g2
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %g2, -1
be tsunami_flush_cache_out
#endif
@@ -60,7 +61,7 @@ tsunami_flush_sig_insns:
/* More slick stuff... */
tsunami_flush_tlb_mm:
tsunami_flush_tlb_range:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
be tsunami_flush_tlb_out
@@ -83,7 +84,7 @@ tsunami_flush_tlb_page:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o3, -1
be tsunami_flush_tlb_page_out
#endif
diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S
index bee2865dc..4e74f34e4 100644
--- a/arch/sparc/mm/viking.S
+++ b/arch/sparc/mm/viking.S
@@ -6,6 +6,7 @@
* Copyright (C) 1999 Pavel Semerad (semerad@ss1000.ms.mff.cuni.cz)
*/
+#include <linux/config.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
#include <asm/asi.h>
@@ -16,7 +17,7 @@
#include <asm/cprefix.h>
#include <asm/btfixup.h>
-#ifdef __SMP__
+#ifdef CONFIG_SMP
.data
.align 4
sun4dsmp_flush_tlb_spin:
@@ -124,12 +125,12 @@ viking_mxcc_flush_chunk:
restore %g0, %g0, %g0;
viking_flush_cache_page:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
#endif
viking_flush_cache_mm:
viking_flush_cache_range:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g1
cmp %g1, -1
bne viking_flush_cache_all
@@ -151,7 +152,7 @@ viking_flush_tlb_mm:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o1
lda [%g1] ASI_M_MMUREGS, %g5
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o1, -1
be 1f
#endif
@@ -160,7 +161,7 @@ viking_flush_tlb_mm:
sta %g0, [%g2] ASI_M_FLUSH_PROBE
retl
sta %g5, [%g1] ASI_M_MMUREGS
-#ifndef __SMP__
+#ifndef CONFIG_SMP
1: retl
nop
#endif
@@ -169,7 +170,7 @@ viking_flush_tlb_range:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o3, -1
be 2f
#endif
@@ -184,7 +185,7 @@ viking_flush_tlb_range:
sta %g0, [%o1] ASI_M_FLUSH_PROBE
retl
sta %g5, [%g1] ASI_M_MMUREGS
-#ifndef __SMP__
+#ifndef CONFIG_SMP
2: retl
nop
#endif
@@ -194,7 +195,7 @@ viking_flush_tlb_page:
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
-#ifndef __SMP__
+#ifndef CONFIG_SMP
cmp %o3, -1
be 1f
#endif
@@ -203,7 +204,7 @@ viking_flush_tlb_page:
sta %g0, [%o1] ASI_M_FLUSH_PROBE
retl
sta %g5, [%g1] ASI_M_MMUREGS
-#ifndef __SMP__
+#ifndef CONFIG_SMP
1: retl
nop
#endif
@@ -214,7 +215,7 @@ viking_flush_sig_insns:
retl
nop
-#ifdef __SMP__
+#ifdef CONFIG_SMP
.globl sun4dsmp_flush_tlb_all, sun4dsmp_flush_tlb_mm
.globl sun4dsmp_flush_tlb_range, sun4dsmp_flush_tlb_page
sun4dsmp_flush_tlb_all: