Skip to content

Commit

Permalink
xtensa: fix boot parameters parsing
Browse files Browse the repository at this point in the history
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 <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
  • Loading branch information
Max Filippov authored and Chris Zankel committed Oct 16, 2012
1 parent 1bbedc3 commit f4349b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/xtensa/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand All @@ -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;
Expand Down

0 comments on commit f4349b6

Please sign in to comment.