aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorFrancesco VIRLINZI <francesco.virlinzi@st.com>2009-03-24 09:30:01 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-03-30 18:42:37 -0400
commit3b4df71b364e230fb7b02356d1f8fce64838ddc7 (patch)
tree0a5241ecf7c7a020f7470de27dd383e8846f8c1a /arch/sh
parent1c58b0b1a1412ceb6b25dad81bc537bf0fe6ad46 (diff)
sh: Sanitize asm/mmu.h for assembly use.
This patch adds the ifndef __ASSEMBLY__ preprocessor to allow the defines in the file to be used also in assembly code. Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/include/asm/mmu.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h
index 6c43625bb1a5..f5963037c9d6 100644
--- a/arch/sh/include/asm/mmu.h
+++ b/arch/sh/include/asm/mmu.h
@@ -1,22 +1,6 @@
1#ifndef __MMU_H 1#ifndef __MMU_H
2#define __MMU_H 2#define __MMU_H
3 3
4/* Default "unsigned long" context */
5typedef unsigned long mm_context_id_t[NR_CPUS];
6
7typedef struct {
8#ifdef CONFIG_MMU
9 mm_context_id_t id;
10 void *vdso;
11#else
12 unsigned long end_brk;
13#endif
14#ifdef CONFIG_BINFMT_ELF_FDPIC
15 unsigned long exec_fdpic_loadmap;
16 unsigned long interp_fdpic_loadmap;
17#endif
18} mm_context_t;
19
20/* 4/*
21 * Privileged Space Mapping Buffer (PMB) definitions 5 * Privileged Space Mapping Buffer (PMB) definitions
22 */ 6 */
@@ -41,6 +25,24 @@ typedef struct {
41 25
42#define PMB_NO_ENTRY (-1) 26#define PMB_NO_ENTRY (-1)
43 27
28#ifndef __ASSEMBLY__
29
30/* Default "unsigned long" context */
31typedef unsigned long mm_context_id_t[NR_CPUS];
32
33typedef struct {
34#ifdef CONFIG_MMU
35 mm_context_id_t id;
36 void *vdso;
37#else
38 unsigned long end_brk;
39#endif
40#ifdef CONFIG_BINFMT_ELF_FDPIC
41 unsigned long exec_fdpic_loadmap;
42 unsigned long interp_fdpic_loadmap;
43#endif
44} mm_context_t;
45
44struct pmb_entry; 46struct pmb_entry;
45 47
46struct pmb_entry { 48struct pmb_entry {
@@ -70,6 +72,7 @@ void pmb_free(struct pmb_entry *pmbe);
70long pmb_remap(unsigned long virt, unsigned long phys, 72long pmb_remap(unsigned long virt, unsigned long phys,
71 unsigned long size, unsigned long flags); 73 unsigned long size, unsigned long flags);
72void pmb_unmap(unsigned long addr); 74void pmb_unmap(unsigned long addr);
75#endif /* __ASSEMBLY__ */
73 76
74#endif /* __MMU_H */ 77#endif /* __MMU_H */
75 78