summaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r--arch/ppc/kernel/apus_setup.c12
-rw-r--r--arch/ppc/kernel/chrp_setup.c4
-rw-r--r--arch/ppc/kernel/gemini_prom.S7
-rw-r--r--arch/ppc/kernel/gemini_setup.c6
-rw-r--r--arch/ppc/kernel/hashtable.S32
-rw-r--r--arch/ppc/kernel/head.S30
-rw-r--r--arch/ppc/kernel/head_8xx.S14
-rw-r--r--arch/ppc/kernel/idle.c8
-rw-r--r--arch/ppc/kernel/irq.c14
-rw-r--r--arch/ppc/kernel/misc.S4
-rw-r--r--arch/ppc/kernel/open_pic.c4
-rw-r--r--arch/ppc/kernel/pmac_pic.c4
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c10
-rw-r--r--arch/ppc/kernel/prep_setup.c6
-rw-r--r--arch/ppc/kernel/process.c30
-rw-r--r--arch/ppc/kernel/ptrace.c18
-rw-r--r--arch/ppc/kernel/setup.c6
-rw-r--r--arch/ppc/kernel/time.c8
18 files changed, 103 insertions, 114 deletions
diff --git a/arch/ppc/kernel/apus_setup.c b/arch/ppc/kernel/apus_setup.c
index a54efc6fd..b93bd8193 100644
--- a/arch/ppc/kernel/apus_setup.c
+++ b/arch/ppc/kernel/apus_setup.c
@@ -108,18 +108,6 @@ void (*mach_floppy_eject) (void) __apusdata = NULL;
#ifdef CONFIG_HEARTBEAT
void (*mach_heartbeat) (int) __apusdata = NULL;
extern void apus_heartbeat (void);
-static int heartbeat_enabled = 1;
-
-void enable_heartbeat(void)
-{
- heartbeat_enabled = 1;
-}
-
-void disable_heartbeat(void)
-{
- heartbeat_enabled = 0;
- mach_heartbeat(0);
-}
#endif
extern unsigned long amiga_model;
diff --git a/arch/ppc/kernel/chrp_setup.c b/arch/ppc/kernel/chrp_setup.c
index 21abfc84f..3b541c26f 100644
--- a/arch/ppc/kernel/chrp_setup.c
+++ b/arch/ppc/kernel/chrp_setup.c
@@ -422,10 +422,10 @@ void __init chrp_init_IRQ(void)
request_irq(openpic_to_irq(HYDRA_INT_ADB_NMI),
xmon_irq, 0, "NMI", 0);
#endif /* CONFIG_XMON */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
request_irq(openpic_to_irq(OPENPIC_VEC_IPI),
openpic_ipi_action, 0, "IPI0", 0);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
}
void __init
diff --git a/arch/ppc/kernel/gemini_prom.S b/arch/ppc/kernel/gemini_prom.S
index f91e992f4..0904bb0eb 100644
--- a/arch/ppc/kernel/gemini_prom.S
+++ b/arch/ppc/kernel/gemini_prom.S
@@ -10,6 +10,7 @@
#include "ppc_asm.tmpl"
#include "ppc_defs.h"
+#include <linux/config.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/gemini.h>
@@ -25,7 +26,7 @@
_GLOBAL(prom_init)
_GLOBAL(gemini_prom_init)
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Since the MMU's on, get stuff in rom space that we'll need */
lis r4,GEMINI_CPUSTAT@h
ori r4,r4,GEMINI_CPUSTAT@l
@@ -74,14 +75,14 @@ prom_no_mmu:
addi r3,r3,1
bdnz 3b
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* The 750 book (and Mot/IBM support) says that this will "assist" snooping
when in SMP. Not sure yet whether this should stay or leave... */
mfspr r4,HID0
ori r4,r4,HID0_ABE
mtspr HID0,r4
sync
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
blr
/* apparently, SMon doesn't pay attention to HID0[SRST]. Disable the MMU and
diff --git a/arch/ppc/kernel/gemini_setup.c b/arch/ppc/kernel/gemini_setup.c
index fcf3a701c..ae9a0bd5c 100644
--- a/arch/ppc/kernel/gemini_setup.c
+++ b/arch/ppc/kernel/gemini_setup.c
@@ -303,7 +303,7 @@ printk("3\n");
/* standard stuff */
cache |= ((1<<reg)<<25);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* A couple errata for the 750's (both IBM and Motorola silicon)
note that you can get missed cache lines on MP implementations.
The workaround - if you call it that - is to make the L2
@@ -351,7 +351,7 @@ void __init gemini_init_IRQ(void)
for( i=0; i < NR_IRQS; i++ )
irq_desc[i].handler = &open_pic;
openpic_init(1);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
request_irq(OPENPIC_VEC_IPI, openpic_ipi_action,
0, "IPI0", 0);
request_irq(OPENPIC_VEC_IPI+1, openpic_ipi_action,
@@ -360,7 +360,7 @@ void __init gemini_init_IRQ(void)
0, "IPI2 (stop CPU)", 0);
request_irq(OPENPIC_VEC_IPI+3, openpic_ipi_action,
0, "IPI3 (reschedule)", 0);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
}
#define gemini_rtc_read(x) (readb(GEMINI_RTC+(x)))
diff --git a/arch/ppc/kernel/hashtable.S b/arch/ppc/kernel/hashtable.S
index 5593ebe18..58045be1d 100644
--- a/arch/ppc/kernel/hashtable.S
+++ b/arch/ppc/kernel/hashtable.S
@@ -52,7 +52,7 @@ Hash_msk = (((1 << Hash_bits) - 1) * 64)
.globl hash_page
hash_page:
-#ifdef __SMP__
+#ifdef CONFIG_SMP
SAVE_2GPRS(7,r21)
eieio
lis r2,hash_table_lock@h
@@ -88,7 +88,7 @@ hash_page:
rlwimi r5,r3,12,20,29 /* insert top 10 bits of address */
lwz r5,0(r5) /* get pmd entry */
rlwinm. r5,r5,0,0,19 /* extract address of pte page */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
beq- hash_page_out /* return if no mapping */
#else
/* XXX it seems like the 601 will give a machine fault on the
@@ -102,7 +102,7 @@ hash_page:
lwz r6,0(r2) /* get linux-style pte */
ori r4,r4,1 /* set _PAGE_PRESENT bit in access */
andc. r0,r4,r6 /* check access & ~permission */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
bne- hash_page_out /* return if access not permitted */
#else
bnelr-
@@ -128,7 +128,7 @@ hash_page:
rlwinm r5,r5,7,1,24 /* put VSID in 0x7fffff80 bits */
#endif /* CONFIG_PPC64 */
-#ifndef __SMP__ /* do this later for SMP */
+#ifndef CONFIG_SMP /* do this later for SMP */
#ifdef CONFIG_PPC64
ori r5,r5,1 /* set V (valid) bit */
#else /* CONFIG_PPC64 */
@@ -280,7 +280,7 @@ hash_page_patch_C:
addi r4,r4,1
stw r4,htab_evicts@l(r2)
-#ifndef __SMP__
+#ifndef CONFIG_SMP
/* Store PTE in PTEG */
found_empty:
#ifdef CONFIG_PPC64
@@ -296,7 +296,7 @@ found_slot:
#endif
sync
-#else /* __SMP__ */
+#else /* CONFIG_SMP */
/*
* Between the tlbie above and updating the hash table entry below,
* another CPU could read the hash table entry and put it in its TLB.
@@ -324,7 +324,7 @@ found_slot:
sync
oris r5,r5,0x8000
stw r5,0(r3) /* finally set V bit in PTE */
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/*
* Update the hash table miss count. We only want misses here
@@ -342,7 +342,7 @@ found_slot:
addi r3,r3,1
stw r3,htab_reloads@l(r2)
-#ifdef __SMP__
+#ifdef CONFIG_SMP
lis r2,hash_table_lock@ha
tophys(r2,r2)
li r0,0
@@ -373,7 +373,7 @@ found_slot:
lwz r21,GPR21(r21)
rfi
-#ifdef __SMP__
+#ifdef CONFIG_SMP
hash_page_out:
lis r2,hash_table_lock@ha
tophys(r2,r2)
@@ -386,7 +386,7 @@ hash_page_out:
.globl hash_table_lock
hash_table_lock:
.long 0
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
.data
next_slot:
@@ -404,13 +404,13 @@ _GLOBAL(flush_hash_segments)
bne+ 99f
tlbia
sync
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync
sync
#endif
blr
99:
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Note - we had better not do anything which could generate
a hash table miss while we have the hash table locked,
or we'll get a deadlock. -paulus */
@@ -451,7 +451,7 @@ _GLOBAL(flush_hash_segments)
sync
tlbia
sync
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync
sync
lis r3,hash_table_lock@ha
@@ -473,13 +473,13 @@ _GLOBAL(flush_hash_page)
bne+ 99f
tlbie r4 /* in hw tlb too */
sync
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync
sync
#endif
blr
99:
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* Note - we had better not do anything which could generate
a hash table miss while we have the hash table locked,
or we'll get a deadlock. -paulus */
@@ -531,7 +531,7 @@ _GLOBAL(flush_hash_page)
4: sync
tlbie r4 /* in hw tlb too */
sync
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync
sync
li r0,0
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
index dab413c15..218bb4ebb 100644
--- a/arch/ppc/kernel/head.S
+++ b/arch/ppc/kernel/head.S
@@ -189,11 +189,11 @@ __after_prom_start:
#endif /* CONFIG_PPC64 */
4: tophys(r8,r11)
-#ifdef __SMP__
+#ifdef CONFIG_SMP
ori r8,r8,0x12 /* R/W access, M=1 */
#else
ori r8,r8,2 /* R/W access */
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#ifdef CONFIG_APUS
ori r11,r11,BL_8M<<2|0x2 /* set up 8MB BAT registers for 604 */
#else
@@ -782,7 +782,7 @@ load_up_fpu:
* horrendously complex, especially when a task switches from one CPU
* to another. Instead we call giveup_fpu in switch_to.
*/
-#ifndef __SMP__
+#ifndef CONFIG_SMP
lis r6,0 /* get __pa constant */
tophys(r6,r6)
addis r3,r6,last_task_used_math@ha
@@ -801,18 +801,18 @@ load_up_fpu:
andc r4,r4,r20 /* disable FP for previous task */
stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
1:
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* enable use of FP after return */
ori r23,r23,MSR_FP|MSR_FE0|MSR_FE1
mfspr r5,SPRG3 /* current task's THREAD (phys) */
lfd fr0,THREAD_FPSCR-4(r5)
mtfsf 0xff,fr0
REST_32FPRS(0, r5)
-#ifndef __SMP__
+#ifndef CONFIG_SMP
subi r4,r5,THREAD
sub r4,r4,r6
stw r4,last_task_used_math@l(r3)
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* restore registers and return */
lwz r3,_CCR(r21)
lwz r4,_LINK(r21)
@@ -868,7 +868,7 @@ load_up_altivec:
* horrendously complex, especially when a task switches from one CPU
* to another. Instead we call giveup_altivec in switch_to.
*/
-#ifndef __SMP__
+#ifndef CONFIG_SMP
#ifndef CONFIG_APUS
lis r6,-KERNELBASE@h
#else
@@ -892,7 +892,7 @@ load_up_altivec:
andc r4,r4,r20 /* disable altivec for previous task */
stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
1:
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* enable use of AltiVec after return */
oris r23,r23,MSR_VEC@h
mfspr r5,SPRG3 /* current task's THREAD (phys) */
@@ -900,11 +900,11 @@ load_up_altivec:
LVX(vr0,r20,r5)
MTVSCR(vr0)
REST_32VR(0,r20,r5)
-#ifndef __SMP__
+#ifndef CONFIG_SMP
subi r4,r5,THREAD
sub r4,r4,r6
stw r4,last_task_used_altivec@l(r3)
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* restore registers and return */
lwz r3,_CCR(r21)
lwz r4,_LINK(r21)
@@ -967,11 +967,11 @@ giveup_altivec:
andc r4,r4,r3 /* disable AltiVec for previous task */
stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
1:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
li r5,0
lis r4,last_task_used_altivec@ha
stw r5,last_task_used_altivec@l(r4)
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
blr
#endif /* CONFIG_ALTIVEC */
@@ -1002,11 +1002,11 @@ giveup_fpu:
andc r4,r4,r3 /* disable FP for previous task */
stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
1:
-#ifndef __SMP__
+#ifndef CONFIG_SMP
li r5,0
lis r4,last_task_used_math@ha
stw r5,last_task_used_math@l(r4)
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
blr
/*
@@ -1432,7 +1432,7 @@ start_here:
SYNC /* Force all PTE updates to finish */
tlbia /* Clear all TLB entries */
sync /* wait for tlbia/tlbie to finish */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync /* ... on all CPUs */
sync
#endif
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
index 94cd67d3b..83f276585 100644
--- a/arch/ppc/kernel/head_8xx.S
+++ b/arch/ppc/kernel/head_8xx.S
@@ -698,7 +698,7 @@ __secondary_hold:
* This is where the main kernel code starts.
*/
start_here:
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* if we're the second cpu stack and r2 are different
* and we want to not clear the bss -- Cort */
lis r5,first_cpu_booted@h
@@ -715,7 +715,7 @@ start_here:
lwz r2,0(r2)
b 10f
99:
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* ptr to current */
lis r2,init_task_union@h
ori r2,r2,init_task_union@l
@@ -734,9 +734,9 @@ start_here:
3: stwu r0,4(r8)
bdnz 3b
2:
-#ifdef __SMP__
+#ifdef CONFIG_SMP
10:
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* stack */
addi r1,r2,TASK_UNION_SIZE
li r0,0
@@ -779,7 +779,7 @@ start_here:
SYNC /* Force all PTE updates to finish */
tlbia /* Clear all TLB entries */
sync /* wait for tlbia/tlbie to finish */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync /* ... on all CPUs */
sync
#endif
@@ -794,7 +794,7 @@ start_here:
li r4,MSR_KERNEL
lis r3,start_kernel@h
ori r3,r3,start_kernel@l
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* the second time through here we go to
* start_secondary(). -- Cort
*/
@@ -807,7 +807,7 @@ start_here:
lis r3,start_secondary@h
ori r3,r3,start_secondary@l
10:
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
mtspr SRR0,r3
mtspr SRR1,r4
rfi /* enable MMU and jump to start_kernel */
diff --git a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c
index 7cf97b873..1d3dfd299 100644
--- a/arch/ppc/kernel/idle.c
+++ b/arch/ppc/kernel/idle.c
@@ -61,7 +61,7 @@ int idled(void)
if ( !current->need_resched && htab_reclaim_on ) htab_reclaim();
if ( !current->need_resched ) power_save();
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (current->need_resched)
#endif
schedule();
@@ -162,11 +162,11 @@ unsigned long get_zero_page_fast(void)
: "=&r" (tmp), "=&r" (page), "+m" (zero_cache)
: "r" (&zero_quicklist)
: "cc" );
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* if another cpu beat us above this can happen -- Cort */
if ( page == 0 )
return 0;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* we can update zerocount after the fact since it is not
* used for anything but control of a loop which doesn't
* matter since it won't affect anything if it zeros one
@@ -253,7 +253,7 @@ void zero_paged(void)
/* atomically add this page to the list */
asm ( "101:lwarx %0,0,%2\n" /* reserve zero_cache */
" stw %0,0(%3)\n" /* update *pageptr */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
" sync\n" /* let store settle */
#endif
" stwcx. %3,0,%2\n" /* update zero_cache in mem */
diff --git a/arch/ppc/kernel/irq.c b/arch/ppc/kernel/irq.c
index e4b279032..c0cc492ad 100644
--- a/arch/ppc/kernel/irq.c
+++ b/arch/ppc/kernel/irq.c
@@ -237,13 +237,13 @@ int get_irq_list(char *buf)
if ( !action || !action->handler )
continue;
len += sprintf(buf+len, "%3d: ", i);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
for (j = 0; j < smp_num_cpus; j++)
len += sprintf(buf+len, "%10u ",
kstat.irqs[cpu_logical_map(j)][i]);
#else
len += sprintf(buf+len, "%10u ", kstat_irqs(i));
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
if ( irq_desc[i].handler )
len += sprintf(buf+len, " %s ", irq_desc[i].handler->typename );
else
@@ -254,7 +254,7 @@ int get_irq_list(char *buf)
}
len += sprintf(buf+len, "\n");
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* should this be per processor send/receive? */
len += sprintf(buf+len, "IPI: %10lu\n", ipi_count);
#endif
@@ -343,7 +343,7 @@ void __init init_IRQ(void)
ppc_md.init_IRQ();
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
unsigned char global_irq_holder = NO_PROC_ID;
unsigned volatile int global_irq_lock;
atomic_t global_irq_count;
@@ -611,7 +611,7 @@ void __global_restore_flags(unsigned long flags)
}
}
}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
static struct proc_dir_entry * root_irq_dir;
static struct proc_dir_entry * irq_dir [NR_IRQS];
@@ -733,7 +733,7 @@ static void register_irq_proc (unsigned int irq)
irq_dir[irq] = proc_mkdir(name, root_irq_dir);
/* create /proc/irq/1234/smp_affinity */
- entry = create_proc_entry("smp_affinity", 0700, irq_dir[irq]);
+ entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
entry->nlink = 1;
entry->data = (void *)irq;
@@ -754,7 +754,7 @@ void init_irq_proc (void)
root_irq_dir = proc_mkdir("irq", 0);
/* create /proc/irq/prof_cpu_mask */
- entry = create_proc_entry("prof_cpu_mask", 0700, root_irq_dir);
+ entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
entry->nlink = 1;
entry->data = (void *)&prof_cpu_mask;
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index 8444bb4a0..e4fbefbc3 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -142,7 +142,7 @@ _GLOBAL(_tlbia)
sync
tlbia
sync
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync
sync
#endif
@@ -154,7 +154,7 @@ _GLOBAL(_tlbia)
_GLOBAL(_tlbie)
tlbie r3
sync
-#ifdef __SMP__
+#ifdef CONFIG_SMP
tlbsync
sync
#endif
diff --git a/arch/ppc/kernel/open_pic.c b/arch/ppc/kernel/open_pic.c
index 9438c57ee..a3c6cc4dd 100644
--- a/arch/ppc/kernel/open_pic.c
+++ b/arch/ppc/kernel/open_pic.c
@@ -101,12 +101,12 @@ void no_action(int ir1, void *dev, struct pt_regs *regs)
{
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
{
smp_message_recv(cpl-OPENPIC_VEC_IPI);
}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#ifdef __i386__
static inline u_int in_le32(volatile u_int *addr)
diff --git a/arch/ppc/kernel/pmac_pic.c b/arch/ppc/kernel/pmac_pic.c
index f2794ae5a..b58d69fc9 100644
--- a/arch/ppc/kernel/pmac_pic.c
+++ b/arch/ppc/kernel/pmac_pic.c
@@ -183,7 +183,7 @@ pmac_get_irq(struct pt_regs *regs)
int irq;
unsigned long bits = 0;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
void pmac_smp_message_recv(void);
/* IPI's are a hack on the powersurge -- Cort */
@@ -197,7 +197,7 @@ pmac_get_irq(struct pt_regs *regs)
pmac_smp_message_recv();
return -2; /* ignore, already handled */
}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* Yeah, I know, this could be a separate get_irq function */
if (has_openpic)
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 87c8d4082..7d4c038ec 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -35,9 +35,9 @@
#include <asm/dma.h>
#include <asm/machdep.h>
#include <asm/hw_irq.h>
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#include <asm/smplock.h>
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#include "time.h"
/* Tell string.h we don't want memcpy etc. as cpp defines */
@@ -76,9 +76,9 @@ EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(disable_irq_nosync);
EXPORT_SYMBOL(local_irq_count);
EXPORT_SYMBOL(local_bh_count);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
EXPORT_SYMBOL(kernel_flag);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
EXPORT_SYMBOL(isa_io_base);
@@ -189,7 +189,7 @@ EXPORT_SYMBOL(giveup_fpu);
EXPORT_SYMBOL(enable_kernel_fp);
EXPORT_SYMBOL(flush_icache_range);
EXPORT_SYMBOL(xchg_u32);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
EXPORT_SYMBOL(__global_cli);
EXPORT_SYMBOL(__global_sti);
EXPORT_SYMBOL(__global_save_flags);
diff --git a/arch/ppc/kernel/prep_setup.c b/arch/ppc/kernel/prep_setup.c
index 19ae61450..cb1110eca 100644
--- a/arch/ppc/kernel/prep_setup.c
+++ b/arch/ppc/kernel/prep_setup.c
@@ -118,7 +118,7 @@ prep_get_cpuinfo(char *buffer)
extern char *Motherboard_map_name;
int len, i;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define CD(X) (cpu_data[n].X)
#else
#define CD(X) (X)
@@ -624,10 +624,10 @@ prep_init_IRQ(void)
for ( i = 0 ; i < 16 ; i++ )
irq_desc[i].handler = &i8259_pic;
i8259_init();
-#ifdef __SMP__
+#ifdef CONFIG_SMP
request_irq(openpic_to_irq(OPENPIC_VEC_SPURIOUS), openpic_ipi_action,
0, "IPI0", 0);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
}
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c
index 5c01d3c72..ce8e039c0 100644
--- a/arch/ppc/kernel/process.c
+++ b/arch/ppc/kernel/process.c
@@ -154,7 +154,7 @@ dump_altivec(struct pt_regs *regs, elf_vrregset_t *vrregs)
void
enable_kernel_altivec(void)
{
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (current->thread.regs && (current->thread.regs->msr & MSR_VEC))
giveup_altivec(current);
else
@@ -169,14 +169,14 @@ enable_kernel_altivec(void)
void
enable_kernel_fp(void)
{
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if (current->thread.regs && (current->thread.regs->msr & MSR_FP))
giveup_fpu(current);
else
giveup_fpu(NULL); /* just enables FP for kernel */
#else
giveup_fpu(last_task_used_math);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
}
int
@@ -208,7 +208,7 @@ _switch_to(struct task_struct *prev, struct task_struct *new,
new->comm,new->pid,new->thread.regs->nip,new->processor,
new->fs->root,prev->fs->root);
#endif
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* avoid complexity of lazy save/restore of fpu
* by just saving it every time we switch out if
* this task used the fpu during the last quantum.
@@ -236,7 +236,7 @@ _switch_to(struct task_struct *prev, struct task_struct *new,
#endif /* CONFIG_ALTIVEC */
prev->last_processor = prev->processor;
current_set[smp_processor_id()] = new;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/* Avoid the trap. On smp this this never happens since
* we don't set last_task_used_altivec -- Cort
*/
@@ -265,9 +265,9 @@ void show_regs(struct pt_regs * regs)
printk("\nlast math %p last altivec %p", last_task_used_math,
last_task_used_altivec);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
printk(" CPU: %d last CPU: %d", current->processor,current->last_processor);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
printk("\n");
for (i = 0; i < 32; i++)
@@ -319,7 +319,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
{
unsigned long msr;
struct pt_regs * childregs, *kregs;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern void ret_from_smpfork(void);
#else
extern void ret_from_except(void);
@@ -336,7 +336,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
p->thread.ksp = (unsigned long) childregs - STACK_FRAME_OVERHEAD;
p->thread.ksp -= sizeof(struct pt_regs ) + STACK_FRAME_OVERHEAD;
kregs = (struct pt_regs *)(p->thread.ksp + STACK_FRAME_OVERHEAD);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
kregs->nip = (unsigned long)ret_from_smpfork;
#else
kregs->nip = (unsigned long)ret_from_except;
@@ -378,9 +378,9 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
childregs->msr &= ~MSR_VEC;
#endif /* CONFIG_ALTIVEC */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
p->last_processor = NO_PROC_ID;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
return 0;
}
@@ -447,14 +447,14 @@ asmlinkage int sys_clone(int p1, int p2, int p3, int p4, int p5, int p6,
int res;
lock_kernel();
res = do_fork(clone_flags, regs->gpr[1], regs);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* When we clone the idle task we keep the same pid but
* the return value of 0 for both causes problems.
* -- Cort
*/
if ((current->pid == 0) && (current == &init_task))
res = 1;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
unlock_kernel();
return res;
}
@@ -466,14 +466,14 @@ asmlinkage int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
int res;
res = do_fork(SIGCHLD, regs->gpr[1], regs);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
/* When we clone the idle task we keep the same pid but
* the return value of 0 for both causes problems.
* -- Cort
*/
if ((current->pid == 0) && (current == &init_task))
res = 1;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
return res;
}
diff --git a/arch/ppc/kernel/ptrace.c b/arch/ppc/kernel/ptrace.c
index 3a4e3b797..fe0bfcea2 100644
--- a/arch/ppc/kernel/ptrace.c
+++ b/arch/ppc/kernel/ptrace.c
@@ -100,7 +100,7 @@ static unsigned long get_long(struct task_struct * tsk,
repeat:
pgdir = pgd_offset(vma->vm_mm, addr);
if (pgd_none(*pgdir)) {
- handle_mm_fault(tsk, vma, addr, 0);
+ handle_mm_fault(tsk->mm, vma, addr, 0);
goto repeat;
}
if (pgd_bad(*pgdir)) {
@@ -110,7 +110,7 @@ repeat:
}
pgmiddle = pmd_offset(pgdir,addr);
if (pmd_none(*pgmiddle)) {
- handle_mm_fault(tsk, vma, addr, 0);
+ handle_mm_fault(tsk->mm, vma, addr, 0);
goto repeat;
}
if (pmd_bad(*pgmiddle)) {
@@ -120,7 +120,7 @@ repeat:
}
pgtable = pte_offset(pgmiddle, addr);
if (!pte_present(*pgtable)) {
- handle_mm_fault(tsk, vma, addr, 0);
+ handle_mm_fault(tsk->mm, vma, addr, 0);
goto repeat;
}
page = pte_page(*pgtable);
@@ -151,7 +151,7 @@ static void put_long(struct task_struct * tsk, struct vm_area_struct * vma,
repeat:
pgdir = pgd_offset(vma->vm_mm, addr);
if (!pgd_present(*pgdir)) {
- handle_mm_fault(tsk, vma, addr, 1);
+ handle_mm_fault(tsk->mm, vma, addr, 1);
goto repeat;
}
if (pgd_bad(*pgdir)) {
@@ -161,7 +161,7 @@ repeat:
}
pgmiddle = pmd_offset(pgdir,addr);
if (pmd_none(*pgmiddle)) {
- handle_mm_fault(tsk, vma, addr, 1);
+ handle_mm_fault(tsk->mm, vma, addr, 1);
goto repeat;
}
if (pmd_bad(*pgmiddle)) {
@@ -171,12 +171,12 @@ repeat:
}
pgtable = pte_offset(pgmiddle, addr);
if (!pte_present(*pgtable)) {
- handle_mm_fault(tsk, vma, addr, 1);
+ handle_mm_fault(tsk->mm, vma, addr, 1);
goto repeat;
}
page = pte_page(*pgtable);
if (!pte_write(*pgtable)) {
- handle_mm_fault(tsk, vma, addr, 1);
+ handle_mm_fault(tsk->mm, vma, addr, 1);
goto repeat;
}
/* this is a hack for non-kernel-mapped video buffers and similar */
@@ -198,7 +198,7 @@ repeat:
static int read_long(struct task_struct * tsk, unsigned long addr,
unsigned long * result)
{
- struct vm_area_struct * vma = find_extend_vma(tsk, addr);
+ struct vm_area_struct * vma = find_extend_vma(tsk->mm, addr);
if (!vma)
return -EIO;
@@ -240,7 +240,7 @@ static int read_long(struct task_struct * tsk, unsigned long addr,
static int write_long(struct task_struct * tsk, unsigned long addr,
unsigned long data)
{
- struct vm_area_struct * vma = find_extend_vma(tsk, addr);
+ struct vm_area_struct * vma = find_extend_vma(tsk->mm, addr);
if (!vma)
return -EIO;
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 30595e694..2b771ef14 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -204,7 +204,7 @@ int get_cpuinfo(char *buffer)
unsigned int pvr;
unsigned short maj, min;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define CPU_PRESENT(x) (cpu_callin_map[(x)])
#define GET_PVR ((long int)(cpu_data[i].pvr))
#define CD(x) (cpu_data[i].x)
@@ -355,13 +355,13 @@ int get_cpuinfo(char *buffer)
bogosum += CD(loops_per_sec);
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
if ( i )
len += sprintf(buffer+len, "\n");
len += sprintf(buffer+len,"total bogomips\t: %lu.%02lu\n",
(bogosum+2500)/500000,
(bogosum+2500)/5000 % 100);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/*
* Ooh's and aah's info about zero'd pages in idle task
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
index b695da797..b821249d9 100644
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -74,7 +74,7 @@ int timer_interrupt(struct pt_regs * regs)
unsigned long cpu = smp_processor_id();
hardirq_enter(cpu);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
{
unsigned int loops = 100000000;
while (test_bit(0, &global_irq_lock)) {
@@ -93,7 +93,7 @@ int timer_interrupt(struct pt_regs * regs)
}
}
}
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
dval = get_dec();
/*
@@ -133,7 +133,7 @@ int timer_interrupt(struct pt_regs * regs)
last_rtc_update = xtime.tv_sec;
}
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
smp_local_timer_interrupt(regs);
#endif
@@ -155,7 +155,7 @@ void do_gettimeofday(struct timeval *tv)
cli();
*tv = xtime;
/* XXX we don't seem to have the decrementers synced properly yet */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
tv->tv_usec += (decrementer_count - get_dec())
* count_period_num / count_period_den;
if (tv->tv_usec >= 1000000) {