diff options
Diffstat (limited to 'include/asm-um')
-rw-r--r-- | include/asm-um/emergency-restart.h | 6 | ||||
-rw-r--r-- | include/asm-um/ldt.h | 5 | ||||
-rw-r--r-- | include/asm-um/mmu_context.h | 10 | ||||
-rw-r--r-- | include/asm-um/page.h | 4 | ||||
-rw-r--r-- | include/asm-um/ptrace-i386.h | 4 | ||||
-rw-r--r-- | include/asm-um/thread_info.h | 2 | ||||
-rw-r--r-- | include/asm-um/vm86.h | 6 |
7 files changed, 31 insertions, 6 deletions
diff --git a/include/asm-um/emergency-restart.h b/include/asm-um/emergency-restart.h new file mode 100644 index 000000000000..108d8c48e42e --- /dev/null +++ b/include/asm-um/emergency-restart.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/include/asm-um/ldt.h b/include/asm-um/ldt.h new file mode 100644 index 000000000000..e908439d338a --- /dev/null +++ b/include/asm-um/ldt.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #ifndef __UM_LDT_H | ||
2 | #define __UM_LDT_H | ||
3 | |||
4 | #include "asm/arch/ldt.h" | ||
5 | #endif | ||
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 89bff310b7a9..095bb627b96a 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -7,19 +7,23 @@ | |||
7 | #define __UM_MMU_CONTEXT_H | 7 | #define __UM_MMU_CONTEXT_H |
8 | 8 | ||
9 | #include "linux/sched.h" | 9 | #include "linux/sched.h" |
10 | #include "linux/config.h" | ||
10 | #include "choose-mode.h" | 11 | #include "choose-mode.h" |
12 | #include "um_mmu.h" | ||
11 | 13 | ||
12 | #define get_mmu_context(task) do ; while(0) | 14 | #define get_mmu_context(task) do ; while(0) |
13 | #define activate_context(tsk) do ; while(0) | 15 | #define activate_context(tsk) do ; while(0) |
14 | 16 | ||
15 | #define deactivate_mm(tsk,mm) do { } while (0) | 17 | #define deactivate_mm(tsk,mm) do { } while (0) |
16 | 18 | ||
19 | extern void force_flush_all(void); | ||
20 | |||
17 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | 21 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) |
18 | { | 22 | { |
23 | if (old != new) | ||
24 | force_flush_all(); | ||
19 | } | 25 | } |
20 | 26 | ||
21 | extern void switch_mm_skas(int mm_fd); | ||
22 | |||
23 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 27 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
24 | struct task_struct *tsk) | 28 | struct task_struct *tsk) |
25 | { | 29 | { |
@@ -30,7 +34,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
30 | cpu_set(cpu, next->cpu_vm_mask); | 34 | cpu_set(cpu, next->cpu_vm_mask); |
31 | if(next != &init_mm) | 35 | if(next != &init_mm) |
32 | CHOOSE_MODE((void) 0, | 36 | CHOOSE_MODE((void) 0, |
33 | switch_mm_skas(next->context.skas.mm_fd)); | 37 | switch_mm_skas(&next->context.skas.id)); |
34 | } | 38 | } |
35 | } | 39 | } |
36 | 40 | ||
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 5afee8a8cdf3..f58aedadeb4e 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -104,8 +104,8 @@ extern void *to_virt(unsigned long phys); | |||
104 | * casting is the right thing, but 32-bit UML can't have 64-bit virtual | 104 | * casting is the right thing, but 32-bit UML can't have 64-bit virtual |
105 | * addresses | 105 | * addresses |
106 | */ | 106 | */ |
107 | #define __pa(virt) to_phys((void *) (unsigned long) virt) | 107 | #define __pa(virt) to_phys((void *) (unsigned long) (virt)) |
108 | #define __va(phys) to_virt((unsigned long) phys) | 108 | #define __va(phys) to_virt((unsigned long) (phys)) |
109 | 109 | ||
110 | #define page_to_pfn(page) ((page) - mem_map) | 110 | #define page_to_pfn(page) ((page) - mem_map) |
111 | #define pfn_to_page(pfn) (mem_map + (pfn)) | 111 | #define pfn_to_page(pfn) (mem_map + (pfn)) |
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h index 04222f35c43e..fe882b9d917e 100644 --- a/include/asm-um/ptrace-i386.h +++ b/include/asm-um/ptrace-i386.h | |||
@@ -32,6 +32,10 @@ | |||
32 | #define PT_REGS_SYSCALL_RET(r) PT_REGS_EAX(r) | 32 | #define PT_REGS_SYSCALL_RET(r) PT_REGS_EAX(r) |
33 | #define PT_FIX_EXEC_STACK(sp) do ; while(0) | 33 | #define PT_FIX_EXEC_STACK(sp) do ; while(0) |
34 | 34 | ||
35 | /* Cope with a conditional i386 definition. */ | ||
36 | #undef profile_pc | ||
37 | #define profile_pc(regs) PT_REGS_IP(regs) | ||
38 | |||
35 | #define user_mode(r) UPT_IS_USER(&(r)->regs) | 39 | #define user_mode(r) UPT_IS_USER(&(r)->regs) |
36 | 40 | ||
37 | #endif | 41 | #endif |
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 1feaaf148ef1..97267f059ef5 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h | |||
@@ -17,7 +17,7 @@ struct thread_info { | |||
17 | struct exec_domain *exec_domain; /* execution domain */ | 17 | struct exec_domain *exec_domain; /* execution domain */ |
18 | unsigned long flags; /* low level flags */ | 18 | unsigned long flags; /* low level flags */ |
19 | __u32 cpu; /* current CPU */ | 19 | __u32 cpu; /* current CPU */ |
20 | __s32 preempt_count; /* 0 => preemptable, | 20 | int preempt_count; /* 0 => preemptable, |
21 | <0 => BUG */ | 21 | <0 => BUG */ |
22 | mm_segment_t addr_limit; /* thread address space: | 22 | mm_segment_t addr_limit; /* thread address space: |
23 | 0-0xBFFFFFFF for user | 23 | 0-0xBFFFFFFF for user |
diff --git a/include/asm-um/vm86.h b/include/asm-um/vm86.h new file mode 100644 index 000000000000..7801f82de1f4 --- /dev/null +++ b/include/asm-um/vm86.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __UM_VM86_H | ||
2 | #define __UM_VM86_H | ||
3 | |||
4 | #include "asm/arch/vm86.h" | ||
5 | |||
6 | #endif | ||