Thread (4 messages) flat view 4 messages, 3 authors, 2011-01-11
STALE5716d REVIEWED: 1 (0M)

1 review trailer.

[PATCH] ARM: nommu: avoid mapping vectors page when !CONFIG_MMU

From: Greg Ungerer <hidden>
Date: 2011-01-11 12:33:09

Hi Will,

On 11/01/11 22:02, Will Deacon wrote:
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.

Cc: Greg Ungerer<redacted>
Signed-off-by: Will Deacon<redacted>
I hit this a couple of days ago too, looks good.

Acked-by: Greg Ungerer <redacted>

Regards
Greg

quoted hunk ↗ jump to hunk
  arch/arm/kernel/process.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index e76fcaa..94bbedb 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -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

-- 
------------------------------------------------------------------------
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help