mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[POWERPC] Add IRQSTACKS support on ppc32
This makes it possible to use separate stacks for hard and soft IRQs on 32-bit powerpc as well as on 64-bit. The code for 32-bit is just the 32-bit analog of the 64-bit code. * Added allocation and initialization of the irq stacks. We limit the stacks to be in lowmem for ppc32. * Implemented ppc32 versions of call_do_softirq() and call_handle_irq() to switch the stack pointers * Reworked how we do stack overflow detection. We now keep around the limit of the stack in the thread_struct and compare against the limit to see if we've overflowed. We can now use this on ppc64 if desired. [ [email protected]: Fixed bug on 6xx where we need to reload r9 with the thread_info pointer. ] Signed-off-by: Kumar Gala <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
This commit is contained in:
parent
dd18434ff0
commit
85218827cc
8 changed files with 66 additions and 5 deletions
|
|
@ -138,6 +138,8 @@ typedef struct {
|
|||
|
||||
struct thread_struct {
|
||||
unsigned long ksp; /* Kernel stack pointer */
|
||||
unsigned long ksp_limit; /* if ksp <= ksp_limit stack overflow */
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
unsigned long ksp_vsid;
|
||||
#endif
|
||||
|
|
@ -182,11 +184,14 @@ struct thread_struct {
|
|||
#define ARCH_MIN_TASKALIGN 16
|
||||
|
||||
#define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack)
|
||||
#define INIT_SP_LIMIT \
|
||||
(_ALIGN_UP(sizeof(init_thread_info), 16) + (unsigned long) &init_stack)
|
||||
|
||||
|
||||
#ifdef CONFIG_PPC32
|
||||
#define INIT_THREAD { \
|
||||
.ksp = INIT_SP, \
|
||||
.ksp_limit = INIT_SP_LIMIT, \
|
||||
.fs = KERNEL_DS, \
|
||||
.pgdir = swapper_pg_dir, \
|
||||
.fpexc_mode = MSR_FE0 | MSR_FE1, \
|
||||
|
|
@ -194,6 +199,7 @@ struct thread_struct {
|
|||
#else
|
||||
#define INIT_THREAD { \
|
||||
.ksp = INIT_SP, \
|
||||
.ksp_limit = INIT_SP_LIMIT, \
|
||||
.regs = (struct pt_regs *)INIT_SP - 1, /* XXX bogus, I think */ \
|
||||
.fs = KERNEL_DS, \
|
||||
.fpr = {0}, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue