Skip to contentSkip to conversation

powerpc: should mem_end be assigned to dt_struct_end in flatten_device_tree()?

DISCUSSION Roel Kluin 2 participants 2 messages Jan 14, 2010 – Jan 15, 2010

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

vi arch/powerpc/kernel/prom_init.c +1961 and note that in flatten_device_tree() we do a

	RELOC(dt_struct_end) = PAGE_ALIGN(mem_start);

should that maybe be

	RELOC(dt_struct_end) = PAGE_ALIGN(mem_end);

thanks,

Roel

#1 lore raw
Quoted 9 lines · Roel Kluin

vi arch/powerpc/kernel/prom_init.c +1961 and note that in flatten_device_tree() we do a

        RELOC(dt_struct_end) = PAGE_ALIGN(mem_start);

should that maybe be

        RELOC(dt_struct_end) = PAGE_ALIGN(mem_end);

Nope.

mem_start is a "cursor", it moves as things gets pushed into the flat device-tree blob. We thus snapshot its value after pushing the last bit of the structure. mem_end is just the max boundary past which we can no longer push things.

Cheers,
Ben.