diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-11-26 22:06:26 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-12-05 20:45:39 -0500 |
commit | 510c72ad2dd4e05e6908755f51ac89482c6eb987 (patch) | |
tree | fa2e9e9a674e38dd523d937329627560f0bd6b64 /arch/sh/mm/pg-dma.c | |
parent | 1dc41e58a553e612e3d0349bb60eef08f9462bde (diff) |
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 'arch/sh/mm/pg-dma.c')
-rw-r--r-- | arch/sh/mm/pg-dma.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/sh/mm/pg-dma.c b/arch/sh/mm/pg-dma.c index 1406d2e348ca..bb23679369d6 100644 --- a/arch/sh/mm/pg-dma.c +++ b/arch/sh/mm/pg-dma.c | |||
@@ -39,8 +39,6 @@ static void copy_page_dma(void *to, void *from) | |||
39 | 39 | ||
40 | static void clear_page_dma(void *to) | 40 | static void clear_page_dma(void *to) |
41 | { | 41 | { |
42 | extern unsigned long empty_zero_page[1024]; | ||
43 | |||
44 | /* | 42 | /* |
45 | * We get invoked quite early on, if the DMAC hasn't been initialized | 43 | * We get invoked quite early on, if the DMAC hasn't been initialized |
46 | * yet, fall back on the slow manual implementation. | 44 | * yet, fall back on the slow manual implementation. |