11 #include <linux/types.h>
12 #include <linux/kernel.h>
14 #include <linux/kdev_t.h>
17 #include <linux/slab.h>
23 #include <linux/module.h>
25 #include <asm/setup.h>
26 #include <asm/machdep.h>
28 #include <asm/pgtable.h>
42 static int kernel_in_stram;
44 static struct resource stram_pool = {
48 static unsigned long pool_size = 1024*1024;
51 static int __init atari_stram_setup(
char *
arg)
77 kernel_in_stram = (stram_start == 0);
86 panic(
"atari_stram_init: no ST-RAM found!");
100 if (!kernel_in_stram)
104 stram_pool.
end = stram_pool.
start + pool_size - 1;
107 pr_debug(
"atari_stram pool: size = %lu bytes, resource = %pR\n",
108 pool_size, &stram_pool);
117 pr_debug(
"atari_stram_alloc: allocate %lu bytes\n", size);
130 pr_err(
"atari_stram_alloc: allocate_resource() failed %d!\n",
136 pr_debug(
"atari_stram_alloc: returning %pR\n", res);
137 return (
void *)res->
start;
144 unsigned long start = (
unsigned long)addr;
150 pr_err(
"atari_stram_free: trying to free nonexistent region "
155 size = resource_size(res);
156 pr_debug(
"atari_stram_free: free %lu bytes at %p\n", size, addr);