uAmiga: misc
diff --git a/arch/m68k/include/asm/pgtable.h b/arch/m68k/include/asm/pgtable.h
index b5c3c20..59a9300 100644
--- a/arch/m68k/include/asm/pgtable.h
+++ b/arch/m68k/include/asm/pgtable.h
@@ -1,4 +1,4 @@
-#if defined(__uClinux__) && !defined(CONFIG_UAMIGA)
+#if defined(__uClinux__)
 #include "pgtable_no.h"
 #else
 #include "pgtable_mm.h"
diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c
index 54fc50c..0fbf912 100644
--- a/arch/m68k/kernel/dma.c
+++ b/arch/m68k/kernel/dma.c
@@ -1,4 +1,4 @@
-#if defined(CONFIG_MMU) || defined(CONFIG_UAMIGA)
+#if defined(CONFIG_MMU)
 #include "dma_mm.c"
 #else
 #include "dma_no.c"
diff --git a/arch/m68k/mm/Makefile_mm b/arch/m68k/mm/Makefile_mm
index 237c9a7..f898b7f 100644
--- a/arch/m68k/mm/Makefile_mm
+++ b/arch/m68k/mm/Makefile_mm
@@ -7,4 +7,4 @@
 obj-$(CONFIG_MMU)		+= cache.o hwtest.o
 obj-$(CONFIG_MMU_MOTOROLA)	+= kmap.o memory.o motorola.o
 obj-$(CONFIG_MMU_SUN3)		+= sun3kmap.o sun3mmu.o
-obj-$(CONFIG_NOMMU)		+=
+obj-$(CONFIG_NOMMU)		+= init_no.o kmap_no.o
diff --git a/arch/m68k/mm/init_mm.c b/arch/m68k/mm/init_mm.c
index 8bc8425..d1eb574 100644
--- a/arch/m68k/mm/init_mm.c
+++ b/arch/m68k/mm/init_mm.c
@@ -32,7 +32,9 @@
 #include <asm/sections.h>
 #include <asm/tlb.h>
 
+#ifdef CONFIG_MMU
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
+#endif
 
 pg_data_t pg_data_map[MAX_NUMNODES];
 EXPORT_SYMBOL(pg_data_map);
@@ -113,7 +115,7 @@
 		}
 	}
 
-#ifndef CONFIG_SUN3
+#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3)
 	/* insert pointer tables allocated so far into the tablelist */
 	init_pointer_table((unsigned long)kernel_pg_dir);
 	for (i = 0; i < PTRS_PER_PGD; i++) {
@@ -124,7 +126,7 @@
 	/* insert also pointer table that we used to unmap the zero page */
 	if (zero_pgtable)
 		init_pointer_table((unsigned long)zero_pgtable);
-#endif
+#endif /* CONFIG_MMU && !CONFIG_SUN3 */
 
 	printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n",
 	       nr_free_pages() << (PAGE_SHIFT-10),
diff --git a/arch/m68k/mm/init_no.c b/arch/m68k/mm/init_no.c
index 32b01b3..8a54b0d 100644
--- a/arch/m68k/mm/init_no.c
+++ b/arch/m68k/mm/init_no.c
@@ -60,7 +60,11 @@
 
 static unsigned long empty_bad_page;
 
+#ifdef CONFIG_UAMIGA
+extern void *empty_zero_page;
+#else
 void *empty_zero_page;
+#endif
 
 extern unsigned long memory_start;
 extern unsigned long memory_end;
@@ -80,7 +84,11 @@
 #ifdef DEBUG
 	unsigned long start_mem = PAGE_ALIGN(memory_start);
 #endif
+#ifdef CONFIG_UAMIGA
+	unsigned long end_mem   = m68k_memory[0].addr+m68k_memory[0].size;
+#else
 	unsigned long end_mem   = memory_end & PAGE_MASK;
+#endif
 
 #ifdef DEBUG
 	printk (KERN_DEBUG "start_mem is %#lx\nvirtual_end is %#lx\n",
@@ -116,6 +124,7 @@
 	}
 }
 
+#ifndef CONFIG_UAMIGA
 void __init mem_init(void)
 {
 	int codek = 0, datak = 0, initk = 0;
@@ -166,6 +175,8 @@
 }
 #endif
 
+#endif /* !CONFIG_UAMIGA */
+
 void
 free_initmem()
 {