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>
This commit is contained in:

committed by
Michael Ellerman

parent
1b855e167b
commit
c395465da6
@@ -131,7 +131,9 @@ struct paca_struct {
|
||||
struct tlb_core_data tcd;
|
||||
#endif /* CONFIG_PPC_BOOK3E */
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
mm_context_t context;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* then miscellaneous read-write fields
|
||||
@@ -194,6 +196,15 @@ struct paca_struct {
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
static inline void copy_mm_to_paca(mm_context_t *context)
|
||||
{
|
||||
get_paca()->context = *context;
|
||||
}
|
||||
#else
|
||||
static inline void copy_mm_to_paca(mm_context_t *context){}
|
||||
#endif
|
||||
|
||||
extern struct paca_struct *paca;
|
||||
extern void initialise_paca(struct paca_struct *new_paca, int cpu);
|
||||
extern void setup_paca(struct paca_struct *new_paca);
|
||||
|
Reference in New Issue
Block a user