aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel
diff options
context:
space:
mode:
authorMikael Starvik <mikael.starvik@axis.com>2005-07-27 11:44:38 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 16:26:00 -0700
commit7cf32cad153d63ac4f6f2d5dd16ddd32ad72d578 (patch)
tree1072d64f49092ba87ff0d5079e37f58f646f7356 /arch/cris/kernel
parent[PATCH] CRIS update: IRQ (diff)
downloadlinux-dev-7cf32cad153d63ac4f6f2d5dd16ddd32ad72d578.tar.xz
linux-dev-7cf32cad153d63ac4f6f2d5dd16ddd32ad72d578.zip
[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.c21
-rw-r--r--arch/cris/kernel/setup.c26
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);
extern void __Umod(void);
extern void __Div(void);
extern void __Mod(void);
+extern void __ashldi3(void);
extern void __ashrdi3(void);
-extern void iounmap(void *addr);
+extern void __lshrdi3(void);
+extern void iounmap(volatile void * __iomem);
/* Platform dependent support */
EXPORT_SYMBOL(dump_thread);
-EXPORT_SYMBOL(enable_irq);
-EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(get_cmos_time);
EXPORT_SYMBOL(loops_per_usec);
@@ -57,7 +57,9 @@ EXPORT_SYMBOL(__Udiv);
EXPORT_SYMBOL(__Umod);
EXPORT_SYMBOL(__Div);
EXPORT_SYMBOL(__Mod);
+EXPORT_SYMBOL(__ashldi3);
EXPORT_SYMBOL(__ashrdi3);
+EXPORT_SYMBOL(__lshrdi3);
/* Memory functions */
EXPORT_SYMBOL(__ioremap);
@@ -69,23 +71,10 @@ EXPORT_SYMBOL(__down);
EXPORT_SYMBOL(__down_interruptible);
EXPORT_SYMBOL(__down_trylock);
-/* Export shadow registers for the CPU I/O pins */
-EXPORT_SYMBOL(genconfig_shadow);
-EXPORT_SYMBOL(port_pa_data_shadow);
-EXPORT_SYMBOL(port_pa_dir_shadow);
-EXPORT_SYMBOL(port_pb_data_shadow);
-EXPORT_SYMBOL(port_pb_dir_shadow);
-EXPORT_SYMBOL(port_pb_config_shadow);
-EXPORT_SYMBOL(port_g_data_shadow);
-
/* Userspace access functions */
EXPORT_SYMBOL(__copy_user_zeroing);
EXPORT_SYMBOL(__copy_user);
-/* Cache flush functions */
-EXPORT_SYMBOL(flush_etrax_cache);
-EXPORT_SYMBOL(prepare_rx_descriptor);
-
#undef memcpy
#undef memset
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 @@
#include <asm/pgtable.h>
#include <linux/seq_file.h>
#include <linux/tty.h>
+#include <linux/utsname.h>
#include <asm/setup.h>
@@ -29,7 +30,7 @@ struct screen_info screen_info;
extern int root_mountflags;
extern char _etext, _edata, _end;
-static char command_line[COMMAND_LINE_SIZE] = { 0, };
+char cris_command_line[COMMAND_LINE_SIZE] = { 0, };
extern const unsigned long text_start, edata; /* set by the linker script */
extern unsigned long dram_start, dram_end;
@@ -147,34 +148,35 @@ setup_arch(char **cmdline_p)
paging_init();
- /* We don't use a command line yet, so just re-initialize it without
- saving anything that might be there. */
-
- *cmdline_p = command_line;
+ *cmdline_p = cris_command_line;
#ifdef CONFIG_ETRAX_CMDLINE
- strlcpy(command_line, CONFIG_ETRAX_CMDLINE, COMMAND_LINE_SIZE);
- command_line[COMMAND_LINE_SIZE - 1] = '\0';
+ if (!strcmp(cris_command_line, "")) {
+ strlcpy(cris_command_line, CONFIG_ETRAX_CMDLINE, COMMAND_LINE_SIZE);
+ cris_command_line[COMMAND_LINE_SIZE - 1] = '\0';
+ }
+#endif
/* Save command line for future references. */
- memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
+ memcpy(saved_command_line, cris_command_line, COMMAND_LINE_SIZE);
saved_command_line[COMMAND_LINE_SIZE - 1] = '\0';
-#endif
/* give credit for the CRIS port */
show_etrax_copyright();
+
+ /* Setup utsname */
+ strcpy(system_utsname.machine, cris_machine_name);
}
static void *c_start(struct seq_file *m, loff_t *pos)
{
- /* We only got one CPU... */
- return *pos < 1 ? (void *)1 : NULL;
+ return *pos < NR_CPUS ? (void *)(int)(*pos + 1): NULL;
}
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
++*pos;
- return NULL;
+ return c_start(m, pos);
}
static void c_stop(struct seq_file *m, void *v)