Lines Matching +full:long +full:- +full:ram +full:- +full:code
2 * Functions for ST-RAM allocations
4 * Copyright 1994-97 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
35 * The ST-RAM allocator allocates memory from a pool of reserved ST-RAM of
36 * configurable size, set aside on ST-RAM init.
37 * As long as this pool is not exhausted, allocation of real ST-RAM can be
41 /* set if kernel is in ST-RAM */
45 .name = "ST-RAM Pool"
48 static unsigned long pool_size = 1024*1024;
50 static unsigned long stram_virt_offset;
73 * determine whether kernel code resides in ST-RAM in atari_stram_init()
74 * (then ST-RAM is the first memory block at virtual 0x0) in atari_stram_init()
84 /* Should never come here! (There is always ST-Ram!) */ in atari_stram_init()
85 panic("atari_stram_init: no ST-RAM found!"); in atari_stram_init()
91 * ST-RAM management, if the kernel resides in ST-RAM.
96 pr_debug("atari_stram pool: kernel in ST-RAM, using alloc_bootmem!\n"); in atari_stram_reserve_pages()
103 stram_pool.end = stram_pool.start + pool_size - 1; in atari_stram_reserve_pages()
116 * ST-RAM management, if the kernel does not reside in ST-RAM.
122 * Skip page 0, as the fhe first 2 KiB are supervisor-only! in atari_stram_map_pages()
124 pr_debug("atari_stram pool: kernel not in ST-RAM, using ioremap!\n"); in atari_stram_map_pages()
126 stram_pool.end = stram_pool.start + pool_size - 1; in atari_stram_map_pages()
128 stram_virt_offset = (unsigned long) ioremap(stram_pool.start, in atari_stram_map_pages()
129 resource_size(&stram_pool)) - stram_pool.start; in atari_stram_map_pages()
140 void *atari_stram_to_virt(unsigned long phys) in atari_stram_to_virt()
147 unsigned long atari_stram_to_phys(void *virt) in atari_stram_to_phys()
149 return (unsigned long)(virt - stram_virt_offset); in atari_stram_to_phys()
154 void *atari_stram_alloc(unsigned long size, const char *owner) in atari_stram_alloc()
168 res->name = owner; in atari_stram_alloc()
179 return atari_stram_to_virt(res->start); in atari_stram_alloc()
186 unsigned long start = atari_stram_to_phys(addr); in atari_stram_free()
188 unsigned long size; in atari_stram_free()