Resent-Date: Fri, 4 Dec 1998 11:33:20 +0100 (MET)
Subject: z2ram-patches
To: jskov@cygnus.co.uk (Jesper Skov)
Date: Fri, 4 Dec 1998 11:32:15 +0100 (CET)
From: Joerg Dorchain <dorchain@wirbel.com>
Cc: linux-m68k@phil.uni-sb.de (Linux Liste)
Resent-From: linux-m68k@phil.uni-sb.de

Hi all,

I don't know if this is  the right way, but the folowing patch lets me
compile z2ram with jespers patch on my amiga. Sorry, not tested yet


Joerg



--- drivers/block/z2ram.c.jesper	Thu Dec  3 14:26:01 1998
+++ drivers/block/z2ram.c	Fri Dec  4 12:11:03 1998
@@ -39,16 +39,13 @@
 #include <asm/setup.h>
 #include <asm/bitops.h>
 #include <asm/amigahw.h>
-#ifdef CONFIG_APUS
+#if defined(CONFIG_APUS) || defined(CONFIG_AMIGA)
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #endif
 #include <linux/zorro.h>
 
 
-extern int num_memory;
-extern struct mem_info memory[NUM_MEMINFO];
-
 #define TRUE                  (1)
 #define FALSE                 (0)
 
@@ -190,14 +187,14 @@
 		int index = device - Z2MINOR_MEMLIST1 + 1;
 		unsigned long size, paddr, vaddr;
 
-		if (index >= num_memory) {
+		if (index >= m68k_num_memory) {
 			printk( KERN_ERR DEVICE_NAME
 				": no such entry in z2ram_map\n" );
 			return -ENOMEM;
 		}
 
-		paddr = memory[index].addr;
-		size = memory[index].size & ~(Z2RAM_CHUNKSIZE-1);
+		paddr = m68k_memory[index].addr;
+		size = m68k_memory[index].size & ~(Z2RAM_CHUNKSIZE-1);
 
 #ifdef __powerpc__
 		/* FIXME: ioremap doesn't build correct memory tables. */
--- arch/m68k/kernel/m68k_ksyms.c.orig	Fri Dec  4 12:14:39 1998
+++ arch/m68k/kernel/m68k_ksyms.c	Fri Dec  4 12:13:44 1998
@@ -37,6 +37,7 @@
 EXPORT_SYMBOL(mm_end_of_chunk);
 #endif
 EXPORT_SYMBOL(mm_vtop_fallback);
+EXPORT_SYMBOL(m68k_num_memory);
 EXPORT_SYMBOL(m68k_memory);
 EXPORT_SYMBOL(kernel_map);
 EXPORT_SYMBOL(m68k_debug_device);

