All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm: fixmap: implement __set_fixmap()
@ 2014-04-04 21:27 ` Rabin Vincent
  0 siblings, 0 replies; 20+ messages in thread
From: Rabin Vincent @ 2014-04-04 21:27 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, Kees Cook, Laura Abbott, Jon Medhurst, Rabin Vincent

This is used from set_fixmap() and clear_fixmap() via
asm-generic/fixmap.h.

Signed-off-by: Rabin Vincent <rabin@rab.in>
---
Needs "arm: use generic fixmap.h", available in linux-next.

 arch/arm/include/asm/fixmap.h | 2 ++
 arch/arm/mm/mmu.c             | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h
index 68ea615..55ed076 100644
--- a/arch/arm/include/asm/fixmap.h
+++ b/arch/arm/include/asm/fixmap.h
@@ -23,6 +23,8 @@ enum fixed_addresses {
 	__end_of_fixed_addresses
 };
 
+void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot);
+
 #include <asm-generic/fixmap.h>
 
 #endif
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 3e16307..61bdfb1 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -22,6 +22,7 @@
 #include <asm/cputype.h>
 #include <asm/sections.h>
 #include <asm/cachetype.h>
+#include <asm/fixmap.h>
 #include <asm/sections.h>
 #include <asm/setup.h>
 #include <asm/smp_plat.h>
@@ -388,6 +389,12 @@ SET_MEMORY_FN(rw, pte_set_rw)
 SET_MEMORY_FN(x, pte_set_x)
 SET_MEMORY_FN(nx, pte_set_nx)
 
+void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
+{
+	BUG_ON(idx >= __end_of_fixed_addresses);
+	set_top_pte(__fix_to_virt(idx), pfn_pte(__phys_to_pfn(phys), prot));
+}
+
 /*
  * Adjust the PMD section entries according to the CPU in use.
  */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-04-25  0:52 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04 21:27 [PATCH 1/2] arm: fixmap: implement __set_fixmap() Rabin Vincent
2014-04-04 21:27 ` Rabin Vincent
2014-04-04 21:27 ` [PATCH 2/2] arm: use fixmap for text patching when text is RO Rabin Vincent
2014-04-04 21:27   ` Rabin Vincent
2014-04-07 13:57   ` Jon Medhurst (Tixy)
2014-04-07 13:57     ` Jon Medhurst (Tixy)
2014-04-07 18:04     ` Kees Cook
2014-04-07 18:04       ` Kees Cook
2014-04-08  9:31       ` Jon Medhurst (Tixy)
2014-04-08  9:31         ` Jon Medhurst (Tixy)
2014-04-10 19:34     ` Rabin Vincent
2014-04-10 19:34       ` Rabin Vincent
2014-04-23 21:09   ` Kees Cook
2014-04-23 21:09     ` Kees Cook
2014-04-23 22:51     ` Doug Anderson
2014-04-23 22:51       ` Doug Anderson
2014-04-24 21:28   ` [PATCHv2 " Rabin Vincent
2014-04-24 21:28     ` Rabin Vincent
2014-04-25  0:52 ` [PATCH 1/2] arm: fixmap: implement __set_fixmap() Doug Anderson
2014-04-25  0:52   ` Doug Anderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.