From: Max Filippov Date: Sun, 14 Oct 2012 23:55:37 +0000 (+0400) Subject: xtensa: fix boot parameters parsing X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=f4349b6e01c8927a04795885702a173b6a60573c;p=deliverable%2Flinux.git xtensa: fix boot parameters parsing Boot parameter tags with handlers are ignored like this: [ 0.000000] Ignoring tag 0x00001003 [ 0.000000] Ignoring tag 0x00001001 [ 0.000000] Ignoring tag 0x00001004 because neither tagtable entries nor tag handlers appear in the vmlinux. Fix tagtable definition attributes so that tag entries are not dropped. Fix end of memory bank calculation in parse_tag_mem: it is intended to round down to page size, but instead did something strange leading to hang right after boot. Signed-off-by: Max Filippov Signed-off-by: Chris Zankel --- diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 270360d9806c..b237988ba6d7 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -100,7 +100,7 @@ typedef struct tagtable { } tagtable_t; #define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \ - __attribute__((unused, __section__(".taglist"))) = { tag, fn } + __attribute__((used, section(".taglist"))) = { tag, fn } /* parse current tag */ @@ -120,7 +120,7 @@ static int __init parse_tag_mem(const bp_tag_t *tag) } sysmem.bank[sysmem.nr_banks].type = mi->type; sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(mi->start); - sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_SIZE; + sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_MASK; sysmem.nr_banks++; return 0;