diff options
author | Mikael Starvik <mikael.starvik@axis.com> | 2005-07-27 14:44:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:00 -0400 |
commit | 7cf32cad153d63ac4f6f2d5dd16ddd32ad72d578 (patch) | |
tree | 1072d64f49092ba87ff0d5079e37f58f646f7356 /arch/cris/kernel/setup.c | |
parent | 2e0cea1decf7f21df0496571c218df3b3b8cce99 (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>
Diffstat (limited to 'arch/cris/kernel/setup.c')
-rw-r--r-- | arch/cris/kernel/setup.c | 26 |
1 files changed, 14 insertions, 12 deletions
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; | |||
29 | extern int root_mountflags; | 30 | extern int root_mountflags; |
30 | extern char _etext, _edata, _end; | 31 | extern char _etext, _edata, _end; |
31 | 32 | ||
32 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; | 33 | char cris_command_line[COMMAND_LINE_SIZE] = { 0, }; |
33 | 34 | ||
34 | extern const unsigned long text_start, edata; /* set by the linker script */ | 35 | extern const unsigned long text_start, edata; /* set by the linker script */ |
35 | extern unsigned long dram_start, dram_end; | 36 | extern 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 | ||
168 | static void *c_start(struct seq_file *m, loff_t *pos) | 171 | static 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 | ||
174 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 176 | static 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 | ||
180 | static void c_stop(struct seq_file *m, void *v) | 182 | static void c_stop(struct seq_file *m, void *v) |