diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-11-27 12:06:26 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-12-06 10:45:39 +0900 |
commit | 510c72ad2dd4e05e6908755f51ac89482c6eb987 (patch) | |
tree | fa2e9e9a674e38dd523d937329627560f0bd6b64 /include/asm-sh/thread_info.h | |
parent | 1dc41e58a553e612e3d0349bb60eef08f9462bde (diff) | |
download | op-kernel-dev-510c72ad2dd4e05e6908755f51ac89482c6eb987.zip op-kernel-dev-510c72ad2dd4e05e6908755f51ac89482c6eb987.tar.gz |
sh: Fixup various PAGE_SIZE == 4096 assumptions.
There were a number of places that made evil PAGE_SIZE == 4k
assumptions that ended up breaking when trying to play with
8k and 64k page sizes, this fixes those up.
The most significant change is the way we load THREAD_SIZE,
previously this was done via:
mov #(THREAD_SIZE >> 8), reg
shll8 reg
to avoid a memory access and allow the immediate load. With
a 64k PAGE_SIZE, we're out of range for the immediate load
size without resorting to special instructions available in
later ISAs (movi20s and so on). The "workaround" for this is
to bump up the shift to 10 and insert a shll2, which gives a
bit more flexibility while still being much cheaper than a
memory access.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/thread_info.h')
-rw-r--r-- | include/asm-sh/thread_info.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index 3ebc3f9..0c01dc5 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h @@ -90,13 +90,7 @@ static inline struct thread_info *current_thread_info(void) #endif #define free_thread_info(ti) kfree(ti) -#else /* !__ASSEMBLY__ */ - -/* how to get the thread information struct from ASM */ -#define GET_THREAD_INFO(reg) \ - stc r7_bank, reg - -#endif +#endif /* __ASSEMBLY__ */ /* * thread information flags |