Re: [PATCH] HACK: Atari ST-RAM allocator using fixed pool of bootmem
On Thursday 3. January 2008, Michael Schmitz wrote:
> Slightly less hackish implementation of that hack attached. This (on top
> of my max_dma_address patch before) does solve the ramdisk related atafb
> problems without resorting to artificial RAM limits. Stephen, please try
> this patch.
You can reserve a specific area using reserve_bootmem, so that you don't have
to rely on alloc_bootmem_low returning memory from the correct zone, e.g. in
atari_stram_reserve_pages you already have a pointer to the start of free
In general stram.c could use a major cleanup. It would be better if it used
resources like amiga/chipram.c.
> @@ -90,11 +90,15 @@
> /* values for flags field */
> #define BLOCK_FREE 0x01 /* free structure in the BLOCKs pool */
> #define BLOCK_KMALLOCED 0x02 /* structure allocated by kmalloc() */
> +#define BLOCK_POOL 0x04 /* block allocated from static pool */
> #define BLOCK_GFP 0x08 /* block allocated with __get_dma_pages() */
In the end it should simply use a single allocation type, if there is
something that needs ST-RAM before the allocator is initialized, it either
has to be delayed or special cased.