summaryrefslogtreecommitdiff
path: root/arch/ppc64/kernel
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2003-07-29 10:00:32 +1000
committerAnton Blanchard <anton@samba.org>2003-07-29 10:00:32 +1000
commit16675c518364f45262ef272524802f8d6c8b5eee (patch)
treea914f6fa01c6b29d2bb4073cc949d4ca9d2166cb /arch/ppc64/kernel
parenta479e93c6d500c18f3eaef369bb790bb3a5da0b8 (diff)
ppc64: add asm/sections.h
Diffstat (limited to 'arch/ppc64/kernel')
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c8
-rw-r--r--arch/ppc64/kernel/process.c3
-rw-r--r--arch/ppc64/kernel/setup.c4
-rw-r--r--arch/ppc64/kernel/time.c5
-rw-r--r--arch/ppc64/kernel/traps.c4
5 files changed, 10 insertions, 14 deletions
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index b4d54e1c8337..fa1e3317a52a 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -39,6 +39,7 @@
#include "iSeries_setup.h"
#include <asm/naca.h>
#include <asm/paca.h>
+#include <asm/sections.h>
#include <asm/iSeries/LparData.h>
#include <asm/iSeries/HvCallHpt.h>
#include <asm/iSeries/HvLpConfig.h>
@@ -91,9 +92,6 @@ extern unsigned long embedded_sysmap_end;
extern unsigned long iSeries_recal_tb;
extern unsigned long iSeries_recal_titan;
-extern char _stext;
-extern char _etext;
-
static int mf_initialized = 0;
struct MemoryBlock {
@@ -387,7 +385,7 @@ iSeries_init(unsigned long r3, unsigned long r4, unsigned long r5,
if (p > cmd_line && p[-1] != ' ')
continue;
dprof_shift = simple_strtoul(q, &q, 0);
- dprof_len = (unsigned long)&_etext - (unsigned long)&_stext;
+ dprof_len = (unsigned long)_etext - (unsigned long)_stext;
dprof_len >>= dprof_shift;
size = ((dprof_len * sizeof(unsigned int)) + (PAGE_SIZE-1)) & PAGE_MASK;
dprof_buffer = (unsigned int *)((klimit + (PAGE_SIZE-1)) & PAGE_MASK);
@@ -868,7 +866,7 @@ static void iSeries_setup_dprofile(void)
paca[i].prof_shift = dprof_shift;
paca[i].prof_len = dprof_len-1;
paca[i].prof_buffer = dprof_buffer;
- paca[i].prof_stext = (unsigned *)&_stext;
+ paca[i].prof_stext = (unsigned *)_stext;
mb();
paca[i].prof_enabled = 1;
}
diff --git a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c
index c22a54fe544f..df5d9ffe60c5 100644
--- a/arch/ppc64/kernel/process.c
+++ b/arch/ppc64/kernel/process.c
@@ -46,6 +46,7 @@
#include <asm/iSeries/HvCallHpt.h>
#include <asm/hardirq.h>
#include <asm/cputable.h>
+#include <asm/sections.h>
struct task_struct *last_task_used_math = NULL;
@@ -424,8 +425,6 @@ void initialize_paca_hardware_interrupt_stack(void)
}
}
-extern char _stext[], _etext[], __init_begin[], __init_end[];
-
char *ppc_find_proc_name(unsigned *p, char *buf, unsigned buflen)
{
unsigned long tb_flags;
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c
index 3a1c3d8447eb..b5d5db07a447 100644
--- a/arch/ppc64/kernel/setup.c
+++ b/arch/ppc64/kernel/setup.c
@@ -38,6 +38,7 @@
#include <asm/paca.h>
#include <asm/ppcdebug.h>
#include <asm/time.h>
+#include <asm/sections.h>
extern unsigned long klimit;
/* extern void *stab; */
@@ -489,7 +490,6 @@ extern void sort_exception_table(void);
void __init setup_arch(char **cmdline_p)
{
extern int panic_timeout;
- extern char _etext[], _edata[];
extern void do_init_bootmem(void);
calibrate_delay = ppc64_calibrate_delay;
@@ -516,7 +516,7 @@ void __init setup_arch(char **cmdline_p)
init_mm.start_code = PAGE_OFFSET;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
- init_mm.brk = (unsigned long) klimit;
+ init_mm.brk = klimit;
/* Save unparsed command line copy for /proc/cmdline */
strcpy(saved_command_line, cmd_line);
diff --git a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c
index 262d46277e73..6657873853b3 100644
--- a/arch/ppc64/kernel/time.c
+++ b/arch/ppc64/kernel/time.c
@@ -58,10 +58,10 @@
#include <asm/iSeries/HvCallXm.h>
#endif
#include <asm/uaccess.h>
-
#include <asm/time.h>
#include <asm/ppcdebug.h>
#include <asm/prom.h>
+#include <asm/sections.h>
void smp_local_timer_interrupt(struct pt_regs *);
@@ -108,7 +108,6 @@ static inline void ppc64_do_profile(struct pt_regs *regs)
{
unsigned long nip;
extern unsigned long prof_cpu_mask;
- extern char _stext;
profile_hook(regs);
@@ -127,7 +126,7 @@ static inline void ppc64_do_profile(struct pt_regs *regs)
if (!((1<<smp_processor_id()) & prof_cpu_mask))
return;
- nip -= (unsigned long) &_stext;
+ nip -= (unsigned long)_stext;
nip >>= prof_shift;
/*
* Don't ignore out-of-bounds EIP values silently,
diff --git a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
index 97b2b5173dc6..564f01f8df6e 100644
--- a/arch/ppc64/kernel/traps.c
+++ b/arch/ppc64/kernel/traps.c
@@ -348,12 +348,12 @@ check_bug_trap(struct pt_regs *regs)
/* this is a WARN_ON rather than BUG/BUG_ON */
printk(KERN_ERR "Badness in %s at %s:%d\n",
bug->function, bug->file,
- bug->line & ~BUG_WARNING_TRAP);
+ (unsigned int)bug->line & ~BUG_WARNING_TRAP);
dump_stack();
return 1;
}
printk(KERN_CRIT "kernel BUG in %s at %s:%d!\n",
- bug->function, bug->file, bug->line);
+ bug->function, bug->file, (unsigned int)bug->line);
return 0;
}