aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/pmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/pmb.c')
-rw-r--r--arch/sh/mm/pmb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index e43ec600afc..18623ba751b 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -341,6 +341,8 @@ int pmb_bolt_mapping(unsigned long vaddr, phys_addr_t phys,
341 unsigned long flags, pmb_flags; 341 unsigned long flags, pmb_flags;
342 int i, mapped; 342 int i, mapped;
343 343
344 if (size < SZ_16M)
345 return -EINVAL;
344 if (!pmb_addr_valid(vaddr, size)) 346 if (!pmb_addr_valid(vaddr, size))
345 return -EFAULT; 347 return -EFAULT;
346 if (pmb_mapping_exists(vaddr, phys, size)) 348 if (pmb_mapping_exists(vaddr, phys, size))
@@ -680,7 +682,7 @@ static void __init pmb_merge(struct pmb_entry *head)
680 /* 682 /*
681 * The merged page size must be valid. 683 * The merged page size must be valid.
682 */ 684 */
683 if (!pmb_size_valid(newsize)) 685 if (!depth || !pmb_size_valid(newsize))
684 return; 686 return;
685 687
686 head->flags &= ~PMB_SZ_MASK; 688 head->flags &= ~PMB_SZ_MASK;