Skip to contentSkip to conversation

m68k/atari: Use the resource subsystem to allocate from the ST-RAM pool

PATCH New Geert Uytterhoeven 1 participant 1 message Jun 5, 2011 m68k architecture

lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

PATCH 1/1 m68k/atari: Use the resource subsystem to allocate from the ST-RAM pool

- 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
---
 arch/m68k/Kconfig.mmu               |    6 -
 arch/m68k/atari/stram.c             |  437 +++++------------------------------
 arch/m68k/include/asm/atari_stram.h |    3 +-
 arch/m68k/mm/init_mm.c              |    5 -
 4 files changed, 63 insertions(+), 388 deletions(-)
arch/m68k/Kconfig.mmu +0 -6
index 04b7acc..20e27d1 100644
@@ -396,12 +396,6 @@ config AMIGA_PCMCIA
 	  Include support in the kernel for pcmcia on Amiga 1200 and Amiga
 	  600. If you intend to use pcmcia cards say Y; otherwise say N.
 
-config STRAM_PROC
-	bool "ST-RAM statistics in /proc"
-	depends on ATARI
-	help
-	  Say Y here to report ST-RAM usage statistics in /proc/stram.
-
 config HEARTBEAT
 	bool "Use power LED as a heartbeat" if AMIGA || APOLLO || ATARI || MAC ||Q40
 	default y if !AMIGA && !APOLLO && !ATARI && !MAC && !Q40 && HP300
arch/m68k/atari/stram.c +62 -375

501 lines not on this page · raw message

arch/m68k/include/asm/atari_stram.h +1 -2
index 7546d13..62e2759 100644
@@ -6,12 +6,11 @@
  */
 
 /* public interface */
-void *atari_stram_alloc(long size, const char *owner);
+void *atari_stram_alloc(unsigned long size, const char *owner);
 void atari_stram_free(void *);
 
 /* functions called internally by other parts of the kernel */
 void atari_stram_init(void);
 void atari_stram_reserve_pages(void *start_mem);
-void atari_stram_mem_init_hook (void);
 
 #endif /*_M68K_ATARI_STRAM_H */
arch/m68k/mm/init_mm.c +0 -5
index 9113c2f..bbe5254 100644
@@ -83,11 +83,6 @@ void __init mem_init(void)
 	int initpages = 0;
 	int i;
 
-#ifdef CONFIG_ATARI
-	if (MACH_IS_ATARI)
-		atari_stram_mem_init_hook();
-#endif
-
 	/* this will put all memory onto the freelists */
 	totalram_pages = num_physpages = 0;
 	for_each_online_pgdat(pgdat) {
Signature · 1 line
1.7.0.4