Skip to contentSkip to conversation

ARM: nommu: avoid mapping vectors page when !CONFIG_MMU

PATCH New Will Deacon 3 participants 4 messages Jan 11, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: nommu: avoid mapping vectors page when !CONFIG_MMU

When running without an MMU, we do not need to install a mapping for the vectors page. Attempting to do so causes a compile-time error because install_special_mapping is not defined.

This patch adds compile-time guards to the vector mapping functions so that we can build nommu configurations once more.

---
 arch/arm/kernel/process.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/kernel/process.c +2 -0
index e76fcaa..94bbedb 100644
@@ -483,6 +483,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
 	return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
 }
 
+#ifdef CONFIG_MMU
 /*
  * The vectors page is always readable from user space for the
  * atomic helpers and the signal restart code.  Let's declare a mapping
@@ -503,3 +504,4 @@ const char *arch_vma_name(struct vm_area_struct *vma)
 {
 	return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
 }
+#endif
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ARM: nommu: avoid mapping vectors page when !CONFIG_MMU

Quoted 6 lines · Will Deacon

When running without an MMU, we do not need to install a mapping for the vectors page. Attempting to do so causes a compile-time error because install_special_mapping is not defined.

This patch adds compile-time guards to the vector mapping functions so that we can build nommu configurations once more.

I had a similar patch a few days ago doing the same thing... when Greg's acked it, please submit to the patch system, thanks.

#2 lore raw

PATCH 1/1 ARM: nommu: avoid mapping vectors page when !CONFIG_MMU

In reply to Will Deacon

Hi Will,

Quoted 9 lines · Will Deacon

When running without an MMU, we do not need to install a mapping for the vectors page. Attempting to do so causes a compile-time error because install_special_mapping is not defined.

This patch adds compile-time guards to the vector mapping functions so that we can build nommu configurations once more.

I hit this a couple of days ago too, looks good.

Regards
Greg

Quoted 20 lines
  arch/arm/kernel/process.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/kernel/process.c +2 -0
index e76fcaa..94bbedb 100644
@@ -483,6 +483,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
  	return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
  }
 
+#ifdef CONFIG_MMU
  /*
   * The vectors page is always readable from user space for the
   * atomic helpers and the signal restart code.  Let's declare a mapping
@@ -503,3 +504,4 @@ const char *arch_vma_name(struct vm_area_struct *vma)
  {
  	return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
  }
+#endif
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg at snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close,                            FAX:         +61 7 3891 3630
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
#3 lore raw

PATCH 1/1 ARM: nommu: avoid mapping vectors page when !CONFIG_MMU

Hi Greg,

Quoted 7 lines
Quoted 7 lines

When running without an MMU, we do not need to install a mapping for the vectors page. Attempting to do so causes a compile-time error because install_special_mapping is not defined.

This patch adds compile-time guards to the vector mapping functions so that we can build nommu configurations once more.

Quoted 6 lines
Quoted 2 lines

I hit this a couple of days ago too, looks good.

Thanks. Submitted to Russell as 6619/1.

Will