MIPS: Move definition of SMP processor id register to header file
The definition of the CP0 register used to save the smp processor id is repicated in many files, move them all to thread_info.h. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5708/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
1a9db0a9ea
commit
c2377a42cd
@@ -35,10 +35,11 @@ do { \
|
||||
#define TLBMISS_HANDLER_SETUP() \
|
||||
do { \
|
||||
TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir); \
|
||||
write_c0_xcontext((unsigned long) smp_processor_id() << 51); \
|
||||
write_c0_xcontext((unsigned long) smp_processor_id() << \
|
||||
SMP_CPUID_REGSHIFT); \
|
||||
} while (0)
|
||||
|
||||
#else /* CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/
|
||||
#else /* !CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/
|
||||
|
||||
/*
|
||||
* For the fast tlb miss handlers, we keep a per cpu array of pointers
|
||||
@@ -50,18 +51,11 @@ extern unsigned long pgd_current[];
|
||||
#define TLBMISS_HANDLER_SETUP_PGD(pgd) \
|
||||
pgd_current[smp_processor_id()] = (unsigned long)(pgd)
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
#define TLBMISS_HANDLER_SETUP() \
|
||||
write_c0_context((unsigned long) smp_processor_id() << 25); \
|
||||
write_c0_context((unsigned long) smp_processor_id() << \
|
||||
SMP_CPUID_REGSHIFT); \
|
||||
back_to_back_c0_hazard(); \
|
||||
TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
|
||||
#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
#define TLBMISS_HANDLER_SETUP() \
|
||||
write_c0_context((unsigned long) smp_processor_id() << 26); \
|
||||
back_to_back_c0_hazard(); \
|
||||
TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
|
||||
#endif
|
||||
#endif /* CONFIG_MIPS_PGD_C0_CONTEXT*/
|
||||
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
|
||||
|
||||
|
Reference in New Issue
Block a user