[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] [patch] introduce get_romfs_len for suzaku
Hi,
subject says all. this patch introduce a macro 'get_romfs_len'.
--
yashi
---
* add new macro: get_romfs_len()
suzaku.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: linux-suzaku/arch/microblaze/kernel/suzaku.c
===================================================================
--- linux-suzaku.orig/arch/microblaze/kernel/suzaku.c 2004-08-20 12:59:20.000000000 +0900
+++ linux-suzaku/arch/microblaze/kernel/suzaku.c 2004-08-20 17:19:27.881503820 +0900
@@ -69,6 +69,9 @@ unsigned long mach_gettimeoffset(void)
return offset;
}
+/* Bytes to words, round up */
+#define get_romfs_len(addr) (((unsigned int *)(addr))[2])
+
/* mach_early_init() is called very early, after the kernel stack and SDA
pointers are configured, but before BSS/SBSS are zeroed etc. Be careful
what you do in here. The bss and sbss sections are zeroed in here */
@@ -98,8 +101,7 @@ void __init mach_early_init (void)
} while (src < &_intv_load_end);
/* Copy ROMFS above bss */
- src = (unsigned int *)__bss_start;
- len = src[2]; /* Bytes to words, round up */
+ len = get_romfs_len(__bss_start);
/* Use memmove to handle likely case of memory overlap */
memmove(__bss_stop,__bss_start,len);
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/