Skip to content

Commit

Permalink
sh: Do not try merging two 128MB PMB mappings
Browse files Browse the repository at this point in the history
There is a logic error in pmb_merge() that means we will incorrectly try
to merge two 128MB PMB mappings into one mapping. However, 256MB isn't a
valid PMB map size and pmb_merge() will actually drop the second 128MB
mapping.

This patch allows my SDK7786 board to boot when configured with
CONFIG_MEMORY_SIZE=0x10000000.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
  • Loading branch information
Matt Fleming committed Apr 25, 2010
1 parent 9c3d936 commit c7b03fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/mm/pmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ static void __init pmb_merge(struct pmb_entry *head)
/*
* The merged page size must be valid.
*/
if (!pmb_size_valid(newsize))
if (!depth || !pmb_size_valid(newsize))
return;

head->flags &= ~PMB_SZ_MASK;
Expand Down

0 comments on commit c7b03fa

Please sign in to comment.