X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-h8300%2Fprocessor.h;h=c6f0a7108ef37e3eb0d84668d37e79c42ba5f215;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=31494109a13e239f5352898ef28b2678bd01fe30;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-h8300/processor.h b/include/asm-h8300/processor.h index 31494109a..c6f0a7108 100644 --- a/include/asm-h8300/processor.h +++ b/include/asm-h8300/processor.h @@ -23,12 +23,12 @@ #include #include -extern inline unsigned long rdusp(void) { +static inline unsigned long rdusp(void) { extern unsigned int sw_usp; return(sw_usp); } -extern inline void wrusp(unsigned long usp) { +static inline void wrusp(unsigned long usp) { extern unsigned int sw_usp; sw_usp = usp; } @@ -45,11 +45,6 @@ extern inline void wrusp(unsigned long usp) { */ #define TASK_UNMAPPED_BASE 0 -/* - * Bus types - */ -#define MCA_bus 0 - struct thread_struct { unsigned long ksp; /* kernel stack pointer */ unsigned long usp; /* user stack pointer */ @@ -61,9 +56,15 @@ struct thread_struct { } breakinfo; }; -#define INIT_THREAD { \ - sizeof(init_stack) + (unsigned long) init_stack, 0, \ - PS_S, 0, {(unsigned short *)-1, 0}, \ +#define INIT_THREAD { \ + .ksp = sizeof(init_stack) + (unsigned long)init_stack, \ + .usp = 0, \ + .ccr = PS_S, \ + .esp0 = 0, \ + .breakinfo = { \ + .addr = (unsigned short *)-1, \ + .inst = 0 \ + } \ } /* @@ -78,6 +79,7 @@ do { \ set_fs(USER_DS); /* reads from user space */ \ (_regs)->pc = (_pc); \ (_regs)->ccr &= 0x00; /* clear kernel flag */ \ + (_regs)->er5 = current->mm->start_data; /* GOT base */ \ wrusp((unsigned long)(_usp) - sizeof(unsigned long)*3); \ } while(0) #endif @@ -88,6 +90,7 @@ do { \ (_regs)->pc = (_pc); \ (_regs)->ccr = 0x00; /* clear kernel flag */ \ (_regs)->exr = 0x78; /* enable all interrupts */ \ + (_regs)->er5 = current->mm->start_data; /* GOT base */ \ /* 14 = space for retaddr(4), vector(4), er0(4) and ext(2) on stack */ \ wrusp(((unsigned long)(_usp)) - 14); \ } while(0)