android_kernel_samsung_msm8976/arch/m68k/mm
Michael Schmitz 217bbd8188 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>
2011-07-30 21:21:39 +02:00
..
cache.c
fault.c m68k: Add helper function handle_kernel_fault() 2011-03-16 19:10:40 +01:00
hwtest.c
init.c m68k: merge m68k and m68knommu arch directories 2011-03-25 14:05:13 +10:00
init_mm.c m68k/atari: Reserve some ST-RAM early on for device buffer use 2011-07-30 21:21:39 +02:00
init_no.c m68knommu: clean up mm/init_no.c 2011-05-24 10:03:51 +10:00
kmap.c m68k: mv kmap_mm.c to kmap.c 2011-05-24 10:03:50 +10:00
Makefile m68k: merge the mmu and non-mmu mm/Makefile 2011-05-24 10:03:50 +10:00
memory.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
motorola.c m68k/mm: Set all online nodes in N_NORMAL_MEMORY 2011-04-27 17:36:00 +02:00
sun3kmap.c
sun3mmu.c mm: drop unneeded pgdat argument from free_area_init_node() 2008-07-24 10:47:16 -07:00