To: linux-m68k@phil.uni-sb.de
Subject: Re: L68K: 2.1.55
References: <d3oh5ulhlg.fsf@cern.ch> <dmm4t7mcntd.fsf@dcsun4.comp.brad.ac.uk>
From: Jes Sorensen <Jes.Sorensen@cern.ch>
Date: 16 Sep 1997 09:18:29 +0200
In-Reply-To: James Troup's message of 15 Sep 1997 21:41:18 +0100
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: linux-m68k@phil.uni-sb.de

>>>>> "James" == James Troup <J.J.Troup@comp.brad.ac.uk> writes:

James> Here's some stuff I did (beware: I suck) to get 2.1.55 to
James> compile, and some stuff from Martin.

James>  o Define flush_icache_range as flush_icache, I don't know if
James> this is the Right thing to do, all other architectures except
James> ppc define flush_icache_range as a do-nothing function.  But
James> then most others architectures define most flush_.*cache
James> functions like that and m68k doesn't.

I noticed this one initially, but forgot about it again since I don't
use modules. Please try my corrected patch below.

James>  o Include <asm/setup.h> in fs/fat/inode.c, this is needed
James> because if CONFIG_ATARI is defined it checks MACH_IS_ATARI.  I
James> didn't conditionalize the inclusion because I was told it would
James> upset Jes to have YAF#ifdef in there :)

You are damn right about this one .... I will take a look at cleaning
it up.

James>  o Remove bogus atarihdreg.h inclusion from falcon_ide.c, if it
James> exists it's not in the 2.1.55 source.

James>  o If CONFIG_ATARI is defined include <asm/atari_stdma.h> in
James> asm/ide.h for stdma_* functions' prototypes and <asm/hardirq.h>
James> for in_interrupt's prototype.

OK, I kinda expect Geert to flood me with a giant IDE patch so I will
keep these ones on hold.

James> Martin's patches fix the atari keyboard stuff and compilation
James> of fbmem.c.

I don't mind moving atakeyb.c but the main reason why I moved the
Amiga one was that we actually need it outside arch/m68k ;-)

James> I'm sure all this will be invalidated by some mega patch from
James> Andreas, but what the hell...

Everything else would be a surprise ;-)

Jes

--- /pack/kom/linux/test/linux-2.1.55/kernel/module.c	Thu Sep 11 18:09:02 1997
+++ linux/kernel/module.c	Tue Sep 16 09:04:17 1997
@@ -300,9 +300,6 @@
 	   to make the I and D caches consistent.  */
 	flush_icache_range((unsigned long)mod, (unsigned long)mod + mod->size);
 
-	flush_pages_to_ram((unsigned long)mod,
-			   (mod->size + PAGE_SIZE - 1) / PAGE_SIZE);
-
 	/* Update module references.  */
 	mod->next = mod_tmp.next;
 	mod->refs = NULL;
--- /pack/kom/linux/test/linux-2.1.55/include/asm-m68k/pgtable.h	Thu Jul 17 16:58:29 1997
+++ linux/include/asm-m68k/pgtable.h	Tue Sep 16 09:12:14 1997
@@ -136,9 +136,12 @@
 }
 
 /* Push n pages at kernel virtual address and clear the icache */
-extern inline void flush_pages_to_ram (unsigned long address, int n)
+extern inline void flush_icache_range (unsigned long address,
+				       unsigned long endaddr)
 {
     if (CPU_IS_040_OR_060) {
+	short n = (endaddr - address + PAGE_SIZE - 1) / PAGE_SIZE;
+
 	while (n--) {
 	    __asm__ __volatile__ ("nop\n\t"
 				  ".chip 68040\n\t"
@@ -158,6 +161,7 @@
 			: "di" (FLUSH_I));
     }
 }
+
 
 /*
  * flush all user-space atc entries.
