aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/boot
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-11 13:30:38 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-07-11 13:30:38 -0400
commitb14c6d428a54fb3235e69fd78fba9080c96645be (patch)
treee10ffca9b1ad628155d340dd020335e71775efa7 /arch/sh/boot
parent07e88e1bfc128681a80578724fde6a872f413862 (diff)
sh: Consolidate the sh64 changes in arch/sh/boot/compressed/misc_32.c
This makes some minor changes to misc_32.c so that it can be used by sh64. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boot')
-rw-r--r--arch/sh/boot/compressed/misc_32.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/sh/boot/compressed/misc_32.c b/arch/sh/boot/compressed/misc_32.c
index b86e3596918..4eb27e61f8e 100644
--- a/arch/sh/boot/compressed/misc_32.c
+++ b/arch/sh/boot/compressed/misc_32.c
@@ -26,7 +26,10 @@
#undef memcpy
#define memzero(s, n) memset ((s), 0, (n))
-static void error(char *m);
+/* cache.c */
+#define CACHE_ENABLE 0
+#define CACHE_DISABLE 1
+int cache_control(unsigned int command);
extern char input_data[];
extern int input_len;
@@ -111,9 +114,15 @@ static void error(char *x)
while(1); /* Halt */
}
+#ifdef CONFIG_SUPERH64
+#define stackalign 8
+#else
+#define stackalign 4
+#endif
+
#define STACK_SIZE (4096)
-long user_stack [STACK_SIZE];
-long* stack_start = &user_stack[STACK_SIZE];
+long __attribute__ ((aligned(stackalign))) user_stack[STACK_SIZE];
+long *stack_start = &user_stack[STACK_SIZE];
void decompress_kernel(void)
{
@@ -129,6 +138,8 @@ void decompress_kernel(void)
free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
puts("Uncompressing Linux... ");
+ cache_control(CACHE_ENABLE);
decompress(input_data, input_len, NULL, NULL, output, NULL, error);
+ cache_control(CACHE_DISABLE);
puts("Ok, booting the kernel.\n");
}