diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-07-11 13:30:38 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-11 13:30:38 -0400 |
commit | b14c6d428a54fb3235e69fd78fba9080c96645be (patch) | |
tree | e10ffca9b1ad628155d340dd020335e71775efa7 /arch/sh/boot/compressed/misc_32.c | |
parent | 07e88e1bfc128681a80578724fde6a872f413862 (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/compressed/misc_32.c')
-rw-r--r-- | arch/sh/boot/compressed/misc_32.c | 17 |
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 b86e3596918b..4eb27e61f8e3 100644 --- a/arch/sh/boot/compressed/misc_32.c +++ b/arch/sh/boot/compressed/misc_32.c | |||
@@ -26,7 +26,10 @@ | |||
26 | #undef memcpy | 26 | #undef memcpy |
27 | #define memzero(s, n) memset ((s), 0, (n)) | 27 | #define memzero(s, n) memset ((s), 0, (n)) |
28 | 28 | ||
29 | static void error(char *m); | 29 | /* cache.c */ |
30 | #define CACHE_ENABLE 0 | ||
31 | #define CACHE_DISABLE 1 | ||
32 | int cache_control(unsigned int command); | ||
30 | 33 | ||
31 | extern char input_data[]; | 34 | extern char input_data[]; |
32 | extern int input_len; | 35 | extern int input_len; |
@@ -111,9 +114,15 @@ static void error(char *x) | |||
111 | while(1); /* Halt */ | 114 | while(1); /* Halt */ |
112 | } | 115 | } |
113 | 116 | ||
117 | #ifdef CONFIG_SUPERH64 | ||
118 | #define stackalign 8 | ||
119 | #else | ||
120 | #define stackalign 4 | ||
121 | #endif | ||
122 | |||
114 | #define STACK_SIZE (4096) | 123 | #define STACK_SIZE (4096) |
115 | long user_stack [STACK_SIZE]; | 124 | long __attribute__ ((aligned(stackalign))) user_stack[STACK_SIZE]; |
116 | long* stack_start = &user_stack[STACK_SIZE]; | 125 | long *stack_start = &user_stack[STACK_SIZE]; |
117 | 126 | ||
118 | void decompress_kernel(void) | 127 | void decompress_kernel(void) |
119 | { | 128 | { |
@@ -129,6 +138,8 @@ void decompress_kernel(void) | |||
129 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; | 138 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; |
130 | 139 | ||
131 | puts("Uncompressing Linux... "); | 140 | puts("Uncompressing Linux... "); |
141 | cache_control(CACHE_ENABLE); | ||
132 | decompress(input_data, input_len, NULL, NULL, output, NULL, error); | 142 | decompress(input_data, input_len, NULL, NULL, output, NULL, error); |
143 | cache_control(CACHE_DISABLE); | ||
133 | puts("Ok, booting the kernel.\n"); | 144 | puts("Ok, booting the kernel.\n"); |
134 | } | 145 | } |