aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Starvik <mikael.starvik@axis.com>2005-07-27 14:44:38 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:26:00 -0400
commit7cf32cad153d63ac4f6f2d5dd16ddd32ad72d578 (patch)
tree1072d64f49092ba87ff0d5079e37f58f646f7356
parent2e0cea1decf7f21df0496571c218df3b3b8cce99 (diff)
[PATCH] CRIS update: misc patches
* Start threads with IRQs enabled. * Move symbol exports to arch specific file. * Prepare for real command line in the future. * Handle csum for partition that crosses flash boundary. * Set utsname. Signed-off-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/cris/arch-v10/boot/compressed/head.S22
-rw-r--r--arch/cris/arch-v10/boot/rescue/head.S33
-rw-r--r--arch/cris/arch-v10/kernel/entry.S54
-rw-r--r--arch/cris/arch-v10/kernel/kgdb.c17
-rw-r--r--arch/cris/arch-v10/kernel/process.c3
-rw-r--r--arch/cris/kernel/crisksyms.c21
-rw-r--r--arch/cris/kernel/setup.c26
-rw-r--r--include/asm-cris/arch-v10/system.h2
-rw-r--r--include/asm-cris/axisflashmap.h3
9 files changed, 121 insertions, 60 deletions
diff --git a/arch/cris/arch-v10/boot/compressed/head.S b/arch/cris/arch-v10/boot/compressed/head.S
index 4cbdd4b1d9d6..e73f44c998d9 100644
--- a/arch/cris/arch-v10/boot/compressed/head.S
+++ b/arch/cris/arch-v10/boot/compressed/head.S
@@ -13,7 +13,8 @@
13#include <asm/arch/sv_addr_ag.h> 13#include <asm/arch/sv_addr_ag.h>
14 14
15#define RAM_INIT_MAGIC 0x56902387 15#define RAM_INIT_MAGIC 0x56902387
16 16#define COMMAND_LINE_MAGIC 0x87109563
17
17 ;; Exported symbols 18 ;; Exported symbols
18 19
19 .globl _input_data 20 .globl _input_data
@@ -88,6 +89,12 @@ basse: move.d pc, r5
88 cmp.d r2, r1 89 cmp.d r2, r1
89 bcs 1b 90 bcs 1b
90 nop 91 nop
92
93 ;; Save command line magic and address.
94 move.d _cmd_line_magic, $r12
95 move.d $r10, [$r12]
96 move.d _cmd_line_addr, $r12
97 move.d $r11, [$r12]
91 98
92 ;; Do the decompression and save compressed size in _inptr 99 ;; Do the decompression and save compressed size in _inptr
93 100
@@ -98,7 +105,13 @@ basse: move.d pc, r5
98 105
99 move.d [_input_data], r9 ; flash address of compressed kernel 106 move.d [_input_data], r9 ; flash address of compressed kernel
100 add.d [_inptr], r9 ; size of compressed kernel 107 add.d [_inptr], r9 ; size of compressed kernel
101 108
109 ;; Restore command line magic and address.
110 move.d _cmd_line_magic, $r10
111 move.d [$r10], $r10
112 move.d _cmd_line_addr, $r11
113 move.d [$r11], $r11
114
102 ;; Enter the decompressed kernel 115 ;; Enter the decompressed kernel
103 move.d RAM_INIT_MAGIC, r8 ; Tell kernel that DRAM is initialized 116 move.d RAM_INIT_MAGIC, r8 ; Tell kernel that DRAM is initialized
104 jump 0x40004000 ; kernel is linked to this address 117 jump 0x40004000 ; kernel is linked to this address
@@ -107,5 +120,8 @@ basse: move.d pc, r5
107 120
108_input_data: 121_input_data:
109 .dword 0 ; used by the decompressor 122 .dword 0 ; used by the decompressor
110 123_cmd_line_magic:
124 .dword 0
125_cmd_line_addr:
126 .dword 0
111#include "../../lib/hw_settings.S" 127#include "../../lib/hw_settings.S"
diff --git a/arch/cris/arch-v10/boot/rescue/head.S b/arch/cris/arch-v10/boot/rescue/head.S
index 8689ea972c46..addb2194de0f 100644
--- a/arch/cris/arch-v10/boot/rescue/head.S
+++ b/arch/cris/arch-v10/boot/rescue/head.S
@@ -1,4 +1,4 @@
1/* $Id: head.S,v 1.6 2003/04/09 08:12:43 pkj Exp $ 1/* $Id: head.S,v 1.7 2005/03/07 12:11:06 starvik Exp $
2 * 2 *
3 * Rescue code, made to reside at the beginning of the 3 * Rescue code, made to reside at the beginning of the
4 * flash-memory. when it starts, it checks a partition 4 * flash-memory. when it starts, it checks a partition
@@ -121,12 +121,13 @@
121 ;; 0x80000000 if loaded in flash (as it should be) 121 ;; 0x80000000 if loaded in flash (as it should be)
122 ;; since etrax actually starts at address 2 when booting from flash, we 122 ;; since etrax actually starts at address 2 when booting from flash, we
123 ;; put a nop (2 bytes) here first so we dont accidentally skip the di 123 ;; put a nop (2 bytes) here first so we dont accidentally skip the di
124 124
125 nop 125 nop
126 di 126 di
127 127
128 jump in_cache ; enter cached area instead 128 jump in_cache ; enter cached area instead
129in_cache: 129in_cache:
130
130 131
131 ;; first put a jump test to give a possibility of upgrading the rescue code 132 ;; first put a jump test to give a possibility of upgrading the rescue code
132 ;; without erasing/reflashing the sector. we put a longword of -1 here and if 133 ;; without erasing/reflashing the sector. we put a longword of -1 here and if
@@ -325,9 +326,29 @@ flash_ok:
325 ;; result will be in r0 326 ;; result will be in r0
326checksum: 327checksum:
327 moveq 0, $r0 328 moveq 0, $r0
3281: addu.b [$r1+], $r0 329 moveq CONFIG_ETRAX_FLASH1_SIZE, $r6
329 subq 1, $r2 330
330 bne 1b 331 ;; If the first physical flash memory is exceeded wrap to the second one.
332 btstq 26, $r1 ; Are we addressing first flash?
333 bpl 1f
334 nop
335 clear.d $r6
336
3371: test.d $r6 ; 0 = no wrapping
338 beq 2f
339 nop
340 lslq 20, $r6 ; Convert MB to bytes
341 sub.d $r1, $r6
342
3432: addu.b [$r1+], $r0
344 subq 1, $r6 ; Flash memory left
345 beq 3f
346 subq 1, $r2 ; Length left
347 bne 2b
331 nop 348 nop
332 ret 349 ret
333 nop 350 nop
351
3523: move.d MEM_CSE1_START, $r1 ; wrap to second flash
353 ba 2b
354 nop
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S
index 1bc44f481c34..c0163bf94a50 100644
--- a/arch/cris/arch-v10/kernel/entry.S
+++ b/arch/cris/arch-v10/kernel/entry.S
@@ -1,4 +1,4 @@
1/* $Id: entry.S,v 1.23 2004/10/19 13:07:37 starvik Exp $ 1/* $Id: entry.S,v 1.28 2005/06/20 05:06:30 starvik Exp $
2 * 2 *
3 * linux/arch/cris/entry.S 3 * linux/arch/cris/entry.S
4 * 4 *
@@ -7,6 +7,22 @@
7 * Authors: Bjorn Wesen (bjornw@axis.com) 7 * Authors: Bjorn Wesen (bjornw@axis.com)
8 * 8 *
9 * $Log: entry.S,v $ 9 * $Log: entry.S,v $
10 * Revision 1.28 2005/06/20 05:06:30 starvik
11 * Remove unnecessary diff to kernel.org tree
12 *
13 * Revision 1.27 2005/03/04 08:16:16 starvik
14 * Merge of Linux 2.6.11.
15 *
16 * Revision 1.26 2005/01/11 13:49:47 starvik
17 * Added NMI handler.
18 *
19 * Revision 1.25 2004/12/27 11:18:32 starvik
20 * Merge of Linux 2.6.10 (not functional yet).
21 *
22 * Revision 1.24 2004/12/22 10:41:23 starvik
23 * Updates to make v10 compile with the latest SMP aware generic code (even
24 * though v10 will never have SMP).
25 *
10 * Revision 1.23 2004/10/19 13:07:37 starvik 26 * Revision 1.23 2004/10/19 13:07:37 starvik
11 * Merge of Linux 2.6.9 27 * Merge of Linux 2.6.9
12 * 28 *
@@ -279,6 +295,7 @@
279#ifdef CONFIG_PREEMPT 295#ifdef CONFIG_PREEMPT
280 ; Check if preemptive kernel scheduling should be done 296 ; Check if preemptive kernel scheduling should be done
281_resume_kernel: 297_resume_kernel:
298 di
282 ; Load current task struct 299 ; Load current task struct
283 movs.w -8192, $r0 ; THREAD_SIZE = 8192 300 movs.w -8192, $r0 ; THREAD_SIZE = 8192
284 and.d $sp, $r0 301 and.d $sp, $r0
@@ -291,12 +308,7 @@ _need_resched:
291 bpl _Rexit 308 bpl _Rexit
292 nop 309 nop
293 ; Ok, lets's do some preemptive kernel scheduling 310 ; Ok, lets's do some preemptive kernel scheduling
294 move.d PREEMPT_ACTIVE, $r10 311 jsr preempt_schedule_irq
295 move.d $r10, [$r0+TI_preempt_count] ; Mark as active
296 ei
297 jsr schedule
298 clear.d [$r0+TI_preempt_count] ; Mark as inactive
299 di
300 ; Load new task struct 312 ; Load new task struct
301 movs.w -8192, $r0 ; THREAD_SIZE = 8192 313 movs.w -8192, $r0 ; THREAD_SIZE = 8192
302 and.d $sp, $r0 314 and.d $sp, $r0
@@ -590,15 +602,15 @@ mmu_bus_fault:
590 move.d $r0, [$sp+16] 602 move.d $r0, [$sp+16]
5911: btstq 12, $r1 ; Refill? 6031: btstq 12, $r1 ; Refill?
592 bpl 2f 604 bpl 2f
593 lsrq PMD_SHIFT, $r1 ; Get PMD index into PGD (bit 24-31) 605 lsrq 24, $r1 ; Get PGD index (bit 24-31)
594 move.d [current_pgd], $r0 ; PGD for the current process 606 move.d [per_cpu__current_pgd], $r0 ; PGD for the current process
595 move.d [$r0+$r1.d], $r0 ; Get PMD 607 move.d [$r0+$r1.d], $r0 ; Get PMD
596 beq 2f 608 beq 2f
597 nop 609 nop
598 and.w PAGE_MASK, $r0 ; Remove PMD flags 610 and.w PAGE_MASK, $r0 ; Remove PMD flags
599 move.d [R_MMU_CAUSE], $r1 611 move.d [R_MMU_CAUSE], $r1
600 lsrq PAGE_SHIFT, $r1 612 lsrq PAGE_SHIFT, $r1
601 and.d 0x7ff, $r1 ; Get PTE index into PMD (bit 13-24) 613 and.d 0x7ff, $r1 ; Get PTE index into PGD (bit 13-23)
602 move.d [$r0+$r1.d], $r1 ; Get PTE 614 move.d [$r0+$r1.d], $r1 ; Get PTE
603 beq 2f 615 beq 2f
604 nop 616 nop
@@ -656,11 +668,6 @@ hwbreakpoint:
656 nop 668 nop
657 669
658IRQ1_interrupt: 670IRQ1_interrupt:
659
660#if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM)
661;; If we receive a watchdog interrupt while it is not expected, then set
662;; up a canonical frame and dump register contents before dying.
663
664 ;; this prologue MUST match the one in irq.h and the struct in ptregs.h!!! 671 ;; this prologue MUST match the one in irq.h and the struct in ptregs.h!!!
665 move $brp,[$sp=$sp-16]; instruction pointer and room for a fake SBFS frame 672 move $brp,[$sp=$sp-16]; instruction pointer and room for a fake SBFS frame
666 push $srp 673 push $srp
@@ -672,9 +679,16 @@ IRQ1_interrupt:
672 push $r10 ; push orig_r10 679 push $r10 ; push orig_r10
673 clear.d [$sp=$sp-4] ; frametype == 0, normal frame 680 clear.d [$sp=$sp-4] ; frametype == 0, normal frame
674 681
675;; We don't check that we actually were bit by the watchdog as opposed to 682 move.d [R_IRQ_MASK0_RD], $r1 ; External NMI or watchdog?
676;; an external NMI, since there is currently no handler for external NMI. 683 and.d 0x80000000, $r1
677 684 beq wdog
685 move.d $sp, $r10
686 jsr handle_nmi
687 setf m ; Enable NMI again
688 retb ; Return from NMI
689 nop
690wdog:
691#if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM)
678;; Check if we're waiting for reset to happen, as signalled by 692;; Check if we're waiting for reset to happen, as signalled by
679;; hard_reset_now setting cause_of_death to a magic value. If so, just 693;; hard_reset_now setting cause_of_death to a magic value. If so, just
680;; get stuck until reset happens. 694;; get stuck until reset happens.
@@ -1118,6 +1132,10 @@ sys_call_table:
1118 .long sys_mq_getsetattr 1132 .long sys_mq_getsetattr
1119 .long sys_ni_syscall /* reserved for kexec */ 1133 .long sys_ni_syscall /* reserved for kexec */
1120 .long sys_waitid 1134 .long sys_waitid
1135 .long sys_ni_syscall /* 285 */ /* available */
1136 .long sys_add_key
1137 .long sys_request_key
1138 .long sys_keyctl
1121 1139
1122 /* 1140 /*
1123 * NOTE!! This doesn't have to be exact - we just have 1141 * NOTE!! This doesn't have to be exact - we just have
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c
index 7d368c877ee9..b72e6a91a639 100644
--- a/arch/cris/arch-v10/kernel/kgdb.c
+++ b/arch/cris/arch-v10/kernel/kgdb.c
@@ -18,6 +18,10 @@
18*! Jul 21 1999 Bjorn Wesen eLinux port 18*! Jul 21 1999 Bjorn Wesen eLinux port
19*! 19*!
20*! $Log: kgdb.c,v $ 20*! $Log: kgdb.c,v $
21*! Revision 1.6 2005/01/14 10:12:17 starvik
22*! KGDB on separate port.
23*! Console fixes from 2.4.
24*!
21*! Revision 1.5 2004/10/07 13:59:08 starvik 25*! Revision 1.5 2004/10/07 13:59:08 starvik
22*! Corrected call to set_int_vector 26*! Corrected call to set_int_vector
23*! 27*!
@@ -71,7 +75,7 @@
71*! 75*!
72*!--------------------------------------------------------------------------- 76*!---------------------------------------------------------------------------
73*! 77*!
74*! $Id: kgdb.c,v 1.5 2004/10/07 13:59:08 starvik Exp $ 78*! $Id: kgdb.c,v 1.6 2005/01/14 10:12:17 starvik Exp $
75*! 79*!
76*! (C) Copyright 1999, Axis Communications AB, LUND, SWEDEN 80*! (C) Copyright 1999, Axis Communications AB, LUND, SWEDEN
77*! 81*!
@@ -225,6 +229,7 @@
225#include <linux/kernel.h> 229#include <linux/kernel.h>
226#include <linux/delay.h> 230#include <linux/delay.h>
227#include <linux/linkage.h> 231#include <linux/linkage.h>
232#include <linux/reboot.h>
228 233
229#include <asm/setup.h> 234#include <asm/setup.h>
230#include <asm/ptrace.h> 235#include <asm/ptrace.h>
@@ -1344,12 +1349,11 @@ handle_exception (int sigval)
1344 } 1349 }
1345} 1350}
1346 1351
1347/* The jump is to the address 0x00000002. Performs a complete re-start 1352/* Performs a complete re-start from scratch. */
1348 from scratch. */
1349static void 1353static void
1350kill_restart () 1354kill_restart ()
1351{ 1355{
1352 __asm__ volatile ("jump 2"); 1356 machine_restart("");
1353} 1357}
1354 1358
1355/********************************** Breakpoint *******************************/ 1359/********************************** Breakpoint *******************************/
@@ -1506,6 +1510,11 @@ kgdb_handle_serial:
1506 bne goback 1510 bne goback
1507 nop 1511 nop
1508 1512
1513 move.d [reg+0x5E], $r10 ; Get DCCR
1514 btstq 8, $r10 ; Test the U-flag.
1515 bmi goback
1516 nop
1517
1509;; 1518;;
1510;; Handle the communication 1519;; Handle the communication
1511;; 1520;;
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c
index 87ff37790827..69e28b4057e8 100644
--- a/arch/cris/arch-v10/kernel/process.c
+++ b/arch/cris/arch-v10/kernel/process.c
@@ -1,4 +1,4 @@
1/* $Id: process.c,v 1.9 2004/10/19 13:07:37 starvik Exp $ 1/* $Id: process.c,v 1.12 2004/12/27 11:18:32 starvik Exp $
2 * 2 *
3 * linux/arch/cris/kernel/process.c 3 * linux/arch/cris/kernel/process.c
4 * 4 *
@@ -101,6 +101,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
101 regs.r11 = (unsigned long)fn; 101 regs.r11 = (unsigned long)fn;
102 regs.r12 = (unsigned long)arg; 102 regs.r12 = (unsigned long)arg;
103 regs.irp = (unsigned long)kernel_thread_helper; 103 regs.irp = (unsigned long)kernel_thread_helper;
104 regs.dccr = 1 << I_DCCR_BITNR;
104 105
105 /* Ok, create the new process.. */ 106 /* Ok, create the new process.. */
106 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL); 107 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c
index 7141bbecd7e4..85833d704ebb 100644
--- a/arch/cris/kernel/crisksyms.c
+++ b/arch/cris/kernel/crisksyms.c
@@ -27,13 +27,13 @@ extern void __Udiv(void);
27extern void __Umod(void); 27extern void __Umod(void);
28extern void __Div(void); 28extern void __Div(void);
29extern void __Mod(void); 29extern void __Mod(void);
30extern void __ashldi3(void);
30extern void __ashrdi3(void); 31extern void __ashrdi3(void);
31extern void iounmap(void *addr); 32extern void __lshrdi3(void);
33extern void iounmap(volatile void * __iomem);
32 34
33/* Platform dependent support */ 35/* Platform dependent support */
34EXPORT_SYMBOL(dump_thread); 36EXPORT_SYMBOL(dump_thread);
35EXPORT_SYMBOL(enable_irq);
36EXPORT_SYMBOL(disable_irq);
37EXPORT_SYMBOL(kernel_thread); 37EXPORT_SYMBOL(kernel_thread);
38EXPORT_SYMBOL(get_cmos_time); 38EXPORT_SYMBOL(get_cmos_time);
39EXPORT_SYMBOL(loops_per_usec); 39EXPORT_SYMBOL(loops_per_usec);
@@ -57,7 +57,9 @@ EXPORT_SYMBOL(__Udiv);
57EXPORT_SYMBOL(__Umod); 57EXPORT_SYMBOL(__Umod);
58EXPORT_SYMBOL(__Div); 58EXPORT_SYMBOL(__Div);
59EXPORT_SYMBOL(__Mod); 59EXPORT_SYMBOL(__Mod);
60EXPORT_SYMBOL(__ashldi3);
60EXPORT_SYMBOL(__ashrdi3); 61EXPORT_SYMBOL(__ashrdi3);
62EXPORT_SYMBOL(__lshrdi3);
61 63
62/* Memory functions */ 64/* Memory functions */
63EXPORT_SYMBOL(__ioremap); 65EXPORT_SYMBOL(__ioremap);
@@ -69,23 +71,10 @@ EXPORT_SYMBOL(__down);
69EXPORT_SYMBOL(__down_interruptible); 71EXPORT_SYMBOL(__down_interruptible);
70EXPORT_SYMBOL(__down_trylock); 72EXPORT_SYMBOL(__down_trylock);
71 73
72/* Export shadow registers for the CPU I/O pins */
73EXPORT_SYMBOL(genconfig_shadow);
74EXPORT_SYMBOL(port_pa_data_shadow);
75EXPORT_SYMBOL(port_pa_dir_shadow);
76EXPORT_SYMBOL(port_pb_data_shadow);
77EXPORT_SYMBOL(port_pb_dir_shadow);
78EXPORT_SYMBOL(port_pb_config_shadow);
79EXPORT_SYMBOL(port_g_data_shadow);
80
81/* Userspace access functions */ 74/* Userspace access functions */
82EXPORT_SYMBOL(__copy_user_zeroing); 75EXPORT_SYMBOL(__copy_user_zeroing);
83EXPORT_SYMBOL(__copy_user); 76EXPORT_SYMBOL(__copy_user);
84 77
85/* Cache flush functions */
86EXPORT_SYMBOL(flush_etrax_cache);
87EXPORT_SYMBOL(prepare_rx_descriptor);
88
89#undef memcpy 78#undef memcpy
90#undef memset 79#undef memset
91extern void * memset(void *, int, __kernel_size_t); 80extern void * memset(void *, int, __kernel_size_t);
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index 6ec2671078bf..d11206e467ab 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -17,6 +17,7 @@
17#include <asm/pgtable.h> 17#include <asm/pgtable.h>
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19#include <linux/tty.h> 19#include <linux/tty.h>
20#include <linux/utsname.h>
20 21
21#include <asm/setup.h> 22#include <asm/setup.h>
22 23
@@ -29,7 +30,7 @@ struct screen_info screen_info;
29extern int root_mountflags; 30extern int root_mountflags;
30extern char _etext, _edata, _end; 31extern char _etext, _edata, _end;
31 32
32static char command_line[COMMAND_LINE_SIZE] = { 0, }; 33char cris_command_line[COMMAND_LINE_SIZE] = { 0, };
33 34
34extern const unsigned long text_start, edata; /* set by the linker script */ 35extern const unsigned long text_start, edata; /* set by the linker script */
35extern unsigned long dram_start, dram_end; 36extern unsigned long dram_start, dram_end;
@@ -147,34 +148,35 @@ setup_arch(char **cmdline_p)
147 148
148 paging_init(); 149 paging_init();
149 150
150 /* We don't use a command line yet, so just re-initialize it without 151 *cmdline_p = cris_command_line;
151 saving anything that might be there. */
152
153 *cmdline_p = command_line;
154 152
155#ifdef CONFIG_ETRAX_CMDLINE 153#ifdef CONFIG_ETRAX_CMDLINE
156 strlcpy(command_line, CONFIG_ETRAX_CMDLINE, COMMAND_LINE_SIZE); 154 if (!strcmp(cris_command_line, "")) {
157 command_line[COMMAND_LINE_SIZE - 1] = '\0'; 155 strlcpy(cris_command_line, CONFIG_ETRAX_CMDLINE, COMMAND_LINE_SIZE);
156 cris_command_line[COMMAND_LINE_SIZE - 1] = '\0';
157 }
158#endif
158 159
159 /* Save command line for future references. */ 160 /* Save command line for future references. */
160 memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 161 memcpy(saved_command_line, cris_command_line, COMMAND_LINE_SIZE);
161 saved_command_line[COMMAND_LINE_SIZE - 1] = '\0'; 162 saved_command_line[COMMAND_LINE_SIZE - 1] = '\0';
162#endif
163 163
164 /* give credit for the CRIS port */ 164 /* give credit for the CRIS port */
165 show_etrax_copyright(); 165 show_etrax_copyright();
166
167 /* Setup utsname */
168 strcpy(system_utsname.machine, cris_machine_name);
166} 169}
167 170
168static void *c_start(struct seq_file *m, loff_t *pos) 171static void *c_start(struct seq_file *m, loff_t *pos)
169{ 172{
170 /* We only got one CPU... */ 173 return *pos < NR_CPUS ? (void *)(int)(*pos + 1): NULL;
171 return *pos < 1 ? (void *)1 : NULL;
172} 174}
173 175
174static void *c_next(struct seq_file *m, void *v, loff_t *pos) 176static void *c_next(struct seq_file *m, void *v, loff_t *pos)
175{ 177{
176 ++*pos; 178 ++*pos;
177 return NULL; 179 return c_start(m, pos);
178} 180}
179 181
180static void c_stop(struct seq_file *m, void *v) 182static void c_stop(struct seq_file *m, void *v)
diff --git a/include/asm-cris/arch-v10/system.h b/include/asm-cris/arch-v10/system.h
index 781ca30229a8..6cc35642b8ab 100644
--- a/include/asm-cris/arch-v10/system.h
+++ b/include/asm-cris/arch-v10/system.h
@@ -11,6 +11,8 @@ extern inline unsigned long rdvr(void) {
11 return vr; 11 return vr;
12} 12}
13 13
14#define cris_machine_name "cris"
15
14/* read/write the user-mode stackpointer */ 16/* read/write the user-mode stackpointer */
15 17
16extern inline unsigned long rdusp(void) { 18extern inline unsigned long rdusp(void) {
diff --git a/include/asm-cris/axisflashmap.h b/include/asm-cris/axisflashmap.h
index 600bb8715d89..7a8d3114e682 100644
--- a/include/asm-cris/axisflashmap.h
+++ b/include/asm-cris/axisflashmap.h
@@ -40,4 +40,7 @@ struct partitiontable_entry {
40#define PARTITION_TYPE_KERNEL 0x0002 40#define PARTITION_TYPE_KERNEL 0x0002
41#define PARTITION_TYPE_JFFS 0x0003 41#define PARTITION_TYPE_JFFS 0x0003
42 42
43/* The master mtd for the entire flash. */
44extern struct mtd_info* axisflash_mtd;
45
43#endif 46#endif