diff options
author | Michael Schmitz <schmitzmic@googlemail.com> | 2010-11-01 14:54:00 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-07-30 15:21:39 -0400 |
commit | 217bbd81885587b462311fab1b04172926c59f1e (patch) | |
tree | c914306226654e239683e3c374c57ba85d9a5d9a /arch/m68k/mm | |
parent | b7785e954348465e1926d9c10ff3e49c207d4ec6 (diff) |
m68k/atari: Reserve some ST-RAM early on for device buffer use
Based on an original patch from Michael Schmitz:
Because mem_init() is now called before device init, devices that rely on
ST-RAM may find all ST-RAM already allocated to other users by the time
device init happens. In particular, a large initrd RAM disk may use up
enough of ST-RAM to cause atari_stram_alloc() to resort to
__get_dma_pages() allocation.
In the current state of Atari memory management, all of RAM is marked
DMA capable, so __get_dma_pages() may well return RAM that is not in actual
fact DMA capable. Using this for frame buffer or SCSI DMA buffer causes
subtle failure.
The ST-RAM allocator has been changed to allocate memory from a pool of
reserved ST-RAM of configurable size, set aside on ST-RAM init (i.e.
before mem_init()). As long as this pool is not exhausted, allocation of
real ST-RAM can be guaranteed.
Other changes:
- Replace the custom allocator in the ST-RAM pool by the existing allocator
in the resource subsystem,
- Remove mem_init_done and its hook, as memory init is now done before
device init,
- Remove /proc/stram, as ST-RAM usage now shows up under /proc/iomem, e.g.
005f2000-006f1fff : ST-RAM Pool
005f2000-0063dfff : atafb
0063e000-00641fff : ataflop
00642000-00642fff : SCSI
Signed-off-by: Michael Schmitz <schmitz@debian.org>
[Andreas Schwab <schwab@linux-m68k.org>: Use memparse()]
[Geert: Use the resource subsystem instead of a custom allocator]
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mm')
-rw-r--r-- | arch/m68k/mm/init_mm.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/m68k/mm/init_mm.c b/arch/m68k/mm/init_mm.c index 9113c2f17607..bbe525434ccb 100644 --- a/arch/m68k/mm/init_mm.c +++ b/arch/m68k/mm/init_mm.c | |||
@@ -83,11 +83,6 @@ void __init mem_init(void) | |||
83 | int initpages = 0; | 83 | int initpages = 0; |
84 | int i; | 84 | int i; |
85 | 85 | ||
86 | #ifdef CONFIG_ATARI | ||
87 | if (MACH_IS_ATARI) | ||
88 | atari_stram_mem_init_hook(); | ||
89 | #endif | ||
90 | |||
91 | /* this will put all memory onto the freelists */ | 86 | /* this will put all memory onto the freelists */ |
92 | totalram_pages = num_physpages = 0; | 87 | totalram_pages = num_physpages = 0; |
93 | for_each_online_pgdat(pgdat) { | 88 | for_each_online_pgdat(pgdat) { |