summaryrefslogtreecommitdiff
path: root/arch/m68k/include
diff options
context:
space:
mode:
authorMichael Schmitz <schmitzmic@gmail.com>2014-03-31 12:06:05 +0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2014-05-27 00:41:24 +0400
commitfded332bf40349788c83399751fd3764fddc4b51 (patch)
treecfcfdf84e1a20ee40a135f63664160f36eb2f053 /arch/m68k/include
parentc7208164e66f63e3ec1759b98087849286410741 (diff)
downloadlinux-fded332bf40349788c83399751fd3764fddc4b51.tar.xz
m68k/atari - stram: alloc ST-RAM pool even if kernel not in ST-RAM
With the kernel loaded to FastRAM (TT-RAM), none of the ST-RAM address range is mapped by init_mem, and ST-RAM is not accessible through the normal allocation pathways as a result. Implement ST-RAM pool allocation to be based on physical addresses always (it already was when the kernel was loaded in ST-RAM). Return kernel virtual addresses as per normal. The current test for the kernel residing in ST-RAM always returns true. Use the bootinfo memory chunk order instead - with the kernel in FastRAM, ST-RAM (phys. 0x0) is not the first chunk. In case the kernel is running from FastRAM, delay mapping of ST-RAM pool until after mem_init. Provide helper functions for those users of ST-RAM that need to be aware of the backing physical addresses. Kudos to Geert for his hints on getting this started. Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include')
-rw-r--r--arch/m68k/include/asm/atari_stram.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/atari_stram.h b/arch/m68k/include/asm/atari_stram.h
index 62e27598af91..4e771c22d6a9 100644
--- a/arch/m68k/include/asm/atari_stram.h
+++ b/arch/m68k/include/asm/atari_stram.h
@@ -8,6 +8,8 @@
/* public interface */
void *atari_stram_alloc(unsigned long size, const char *owner);
void atari_stram_free(void *);
+void *atari_stram_to_virt(unsigned long phys);
+unsigned long atari_stram_to_phys(void *);
/* functions called internally by other parts of the kernel */
void atari_stram_init(void);