]> git.baikalelectronics.ru Git - kernel.git/commit
sh: Fixup various PAGE_SIZE == 4096 assumptions.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 27 Nov 2006 03:06:26 +0000 (12:06 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 6 Dec 2006 01:45:39 +0000 (10:45 +0900)
commit270e0d05ef1a6c86b7e95a4cc2d3b27cc8ecf154
treefa2e9e9a674e38dd523d937329627560f0bd6b64
parent04ecb8e88ed164bc8cc51d7933e5d0bb77d56060
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>
arch/sh/kernel/cpu/sh3/entry.S
arch/sh/kernel/head.S
arch/sh/kernel/relocate_kernel.S
arch/sh/mm/cache-sh4.c
arch/sh/mm/clear_page.S
arch/sh/mm/copy_page.S
arch/sh/mm/init.c
arch/sh/mm/pg-dma.c
include/asm-sh/entry-macros.S
include/asm-sh/pgtable.h
include/asm-sh/thread_info.h