Since start_kernel() comes with __init, so the caller _start() must be
with __init.
The start.c is not in use and is removed from Makefile.
Signed-off-by: Thomas Chou <[EMAIL PROTECTED]>
---
linux-2.6.x/arch/nios2nommu/kernel/Makefile | 2 +-
linux-2.6.x/arch/nios2nommu/kernel/head.S | 14 ++++++++++----
linux-2.6.x/arch/nios2nommu/kernel/traps.c | 4 ++--
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/linux-2.6.x/arch/nios2nommu/kernel/Makefile
b/linux-2.6.x/arch/nios2nommu/kernel/Makefile
index a056ff1..e9a44cf 100644
--- a/linux-2.6.x/arch/nios2nommu/kernel/Makefile
+++ b/linux-2.6.x/arch/nios2nommu/kernel/Makefile
@@ -12,7 +12,7 @@ extra-y := head.o init_task.o vmlinux.lds
obj-y := entry.o traps.o irq.o syscalltable.o \
process.o signal.o setup.o sys_nios2.o \
semaphore.o io.o usb.o\
- time.o ptrace.o start.o nios2_ksyms.o
+ time.o ptrace.o nios2_ksyms.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_CONSOLE) += console.o
diff --git a/linux-2.6.x/arch/nios2nommu/kernel/head.S
b/linux-2.6.x/arch/nios2nommu/kernel/head.S
index 9b0eeec..2d63d28 100644
--- a/linux-2.6.x/arch/nios2nommu/kernel/head.S
+++ b/linux-2.6.x/arch/nios2nommu/kernel/head.S
@@ -23,6 +23,8 @@
*
*/
+#include <linux/linkage.h>
+#include <linux/init.h>
#include <asm/asm-offsets.h>
#include <asm/asm-macros.h>
@@ -68,9 +70,10 @@ _current_thread:
* if the code resides in flash (looks for "Nios" at offset 0x0c from
* the potential executable image).
*/
- .text
- .global _start
-_start:
+
+__INIT
+
+ENTRY(_start)
wrctl status,r0 /* Disable interrupts */
/* Flush all cache lines within the instruction cache */
@@ -234,7 +237,7 @@ finish_move:
movia r1,nios2_boot_init // save args r4-r7 passed from u-boot
callr r1
- movia r1,main // call main as a subroutine
+ movia r1,start_kernel // call main as a subroutine
callr r1
//------------------------------------------------------------------
@@ -245,4 +248,7 @@ finish_move:
/* End of startup code */
.set at
+ENDPROC(_start)
+
+__FINIT
diff --git a/linux-2.6.x/arch/nios2nommu/kernel/traps.c
b/linux-2.6.x/arch/nios2nommu/kernel/traps.c
index e5471b9..c5cf686 100644
--- a/linux-2.6.x/arch/nios2nommu/kernel/traps.c
+++ b/linux-2.6.x/arch/nios2nommu/kernel/traps.c
@@ -93,7 +93,7 @@ int kstack_depth_to_print = 48;
void show_stack(struct task_struct *task, unsigned long *stack)
{
unsigned long *endstack, addr;
- extern char _start, _etext;
+ extern char _stext, _etext;
int i;
if (!stack) {
@@ -127,7 +127,7 @@ void show_stack(struct task_struct *task, unsigned long
*stack)
* down the cause of the crash will be able to figure
* out the call path that was taken.
*/
- if (((addr >= (unsigned long) &_start) &&
+ if (((addr >= (unsigned long) &_stext) &&
(addr <= (unsigned long) &_etext))) {
if (i % 4 == 0)
printk(KERN_EMERG "\n ");
--
1.5.3.3
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev