MIPS: traps: Add CPU PM callback for trap configuration
Implement a CPU power management callback for restoring trap related CPU configuration after CPU power up from a low power state. The following state is restored: - Status register - HWREna register - Exception vector configuration registers - Context/XContext register Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
This commit is contained in:
@@ -31,11 +31,15 @@ do { \
|
||||
} while (0)
|
||||
|
||||
#ifdef CONFIG_MIPS_PGD_C0_CONTEXT
|
||||
|
||||
#define TLBMISS_HANDLER_RESTORE() \
|
||||
write_c0_xcontext((unsigned long) smp_processor_id() << \
|
||||
SMP_CPUID_REGSHIFT)
|
||||
|
||||
#define TLBMISS_HANDLER_SETUP() \
|
||||
do { \
|
||||
TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir); \
|
||||
write_c0_xcontext((unsigned long) smp_processor_id() << \
|
||||
SMP_CPUID_REGSHIFT); \
|
||||
TLBMISS_HANDLER_RESTORE(); \
|
||||
} while (0)
|
||||
|
||||
#else /* !CONFIG_MIPS_PGD_C0_CONTEXT: using pgd_current*/
|
||||
@@ -47,9 +51,12 @@ do { \
|
||||
*/
|
||||
extern unsigned long pgd_current[];
|
||||
|
||||
#define TLBMISS_HANDLER_SETUP() \
|
||||
#define TLBMISS_HANDLER_RESTORE() \
|
||||
write_c0_context((unsigned long) smp_processor_id() << \
|
||||
SMP_CPUID_REGSHIFT); \
|
||||
SMP_CPUID_REGSHIFT)
|
||||
|
||||
#define TLBMISS_HANDLER_SETUP() \
|
||||
TLBMISS_HANDLER_RESTORE(); \
|
||||
back_to_back_c0_hazard(); \
|
||||
TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
|
||||
#endif /* CONFIG_MIPS_PGD_C0_CONTEXT*/
|
||||
|
Reference in New Issue
Block a user