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 | |
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')
-rw-r--r-- | arch/cris/kernel/crisksyms.c | 21 | ||||
-rw-r--r-- | arch/cris/kernel/setup.c | 26 |
2 files changed, 19 insertions, 28 deletions
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); | |||
27 | extern void __Umod(void); | 27 | extern void __Umod(void); |
28 | extern void __Div(void); | 28 | extern void __Div(void); |
29 | extern void __Mod(void); | 29 | extern void __Mod(void); |
30 | extern void __ashldi3(void); | ||
30 | extern void __ashrdi3(void); | 31 | extern void __ashrdi3(void); |
31 | extern void iounmap(void *addr); | 32 | extern void __lshrdi3(void); |
33 | extern void iounmap(volatile void * __iomem); | ||
32 | 34 | ||
33 | /* Platform dependent support */ | 35 | /* Platform dependent support */ |
34 | EXPORT_SYMBOL(dump_thread); | 36 | EXPORT_SYMBOL(dump_thread); |
35 | EXPORT_SYMBOL(enable_irq); | ||
36 | EXPORT_SYMBOL(disable_irq); | ||
37 | EXPORT_SYMBOL(kernel_thread); | 37 | EXPORT_SYMBOL(kernel_thread); |
38 | EXPORT_SYMBOL(get_cmos_time); | 38 | EXPORT_SYMBOL(get_cmos_time); |
39 | EXPORT_SYMBOL(loops_per_usec); | 39 | EXPORT_SYMBOL(loops_per_usec); |
@@ -57,7 +57,9 @@ EXPORT_SYMBOL(__Udiv); | |||
57 | EXPORT_SYMBOL(__Umod); | 57 | EXPORT_SYMBOL(__Umod); |
58 | EXPORT_SYMBOL(__Div); | 58 | EXPORT_SYMBOL(__Div); |
59 | EXPORT_SYMBOL(__Mod); | 59 | EXPORT_SYMBOL(__Mod); |
60 | EXPORT_SYMBOL(__ashldi3); | ||
60 | EXPORT_SYMBOL(__ashrdi3); | 61 | EXPORT_SYMBOL(__ashrdi3); |
62 | EXPORT_SYMBOL(__lshrdi3); | ||
61 | 63 | ||
62 | /* Memory functions */ | 64 | /* Memory functions */ |
63 | EXPORT_SYMBOL(__ioremap); | 65 | EXPORT_SYMBOL(__ioremap); |
@@ -69,23 +71,10 @@ EXPORT_SYMBOL(__down); | |||
69 | EXPORT_SYMBOL(__down_interruptible); | 71 | EXPORT_SYMBOL(__down_interruptible); |
70 | EXPORT_SYMBOL(__down_trylock); | 72 | EXPORT_SYMBOL(__down_trylock); |
71 | 73 | ||
72 | /* Export shadow registers for the CPU I/O pins */ | ||
73 | EXPORT_SYMBOL(genconfig_shadow); | ||
74 | EXPORT_SYMBOL(port_pa_data_shadow); | ||
75 | EXPORT_SYMBOL(port_pa_dir_shadow); | ||
76 | EXPORT_SYMBOL(port_pb_data_shadow); | ||
77 | EXPORT_SYMBOL(port_pb_dir_shadow); | ||
78 | EXPORT_SYMBOL(port_pb_config_shadow); | ||
79 | EXPORT_SYMBOL(port_g_data_shadow); | ||
80 | |||
81 | /* Userspace access functions */ | 74 | /* Userspace access functions */ |
82 | EXPORT_SYMBOL(__copy_user_zeroing); | 75 | EXPORT_SYMBOL(__copy_user_zeroing); |
83 | EXPORT_SYMBOL(__copy_user); | 76 | EXPORT_SYMBOL(__copy_user); |
84 | 77 | ||
85 | /* Cache flush functions */ | ||
86 | EXPORT_SYMBOL(flush_etrax_cache); | ||
87 | EXPORT_SYMBOL(prepare_rx_descriptor); | ||
88 | |||
89 | #undef memcpy | 78 | #undef memcpy |
90 | #undef memset | 79 | #undef memset |
91 | extern void * memset(void *, int, __kernel_size_t); | 80 | extern 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; | |||
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) |