diff options
author | Michael Neuling <mikey@neuling.org> | 2015-10-28 00:54:06 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-12-19 06:13:12 -0500 |
commit | c395465da68bfc3a238d5bc15f862e33e6e9ecec (patch) | |
tree | 0d337e9be2ae4a34b8ccd9314c5265499746ff33 /arch/powerpc/include/asm/paca.h | |
parent | 1b855e167b90fcb353977c08932d0a52eb8ae5b9 (diff) |
powerpc: Add function to copy mm_context_t to the paca
This adds a function to copy the mm->context to the paca. This is
only a basic conversion for now but will be used more extensively in
the next patch.
This also adds #ifdef CONFIG_PPC_BOOK3S around this code since it's
not used elsewhere.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/paca.h')
-rw-r--r-- | arch/powerpc/include/asm/paca.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h index 70bd4381f8e6..1cc6e0828907 100644 --- a/arch/powerpc/include/asm/paca.h +++ b/arch/powerpc/include/asm/paca.h | |||
@@ -131,7 +131,9 @@ struct paca_struct { | |||
131 | struct tlb_core_data tcd; | 131 | struct tlb_core_data tcd; |
132 | #endif /* CONFIG_PPC_BOOK3E */ | 132 | #endif /* CONFIG_PPC_BOOK3E */ |
133 | 133 | ||
134 | #ifdef CONFIG_PPC_BOOK3S | ||
134 | mm_context_t context; | 135 | mm_context_t context; |
136 | #endif | ||
135 | 137 | ||
136 | /* | 138 | /* |
137 | * then miscellaneous read-write fields | 139 | * then miscellaneous read-write fields |
@@ -194,6 +196,15 @@ struct paca_struct { | |||
194 | #endif | 196 | #endif |
195 | }; | 197 | }; |
196 | 198 | ||
199 | #ifdef CONFIG_PPC_BOOK3S | ||
200 | static inline void copy_mm_to_paca(mm_context_t *context) | ||
201 | { | ||
202 | get_paca()->context = *context; | ||
203 | } | ||
204 | #else | ||
205 | static inline void copy_mm_to_paca(mm_context_t *context){} | ||
206 | #endif | ||
207 | |||
197 | extern struct paca_struct *paca; | 208 | extern struct paca_struct *paca; |
198 | extern void initialise_paca(struct paca_struct *new_paca, int cpu); | 209 | extern void initialise_paca(struct paca_struct *new_paca, int cpu); |
199 | extern void setup_paca(struct paca_struct *new_paca); | 210 | extern void setup_paca(struct paca_struct *new_paca); |