Date: Mon, 31 Aug 1998 23:44:44 +0200 (CEST)
From: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
To: Jes Sorensen <Jes.Sorensen@cern.ch>
cc: linux-m68k@lists.linux-m68k.org
Subject: Re: L68K: 2.1.119 is out
In-Reply-To: <199808281833.UAA03229@valhall.cern.ch>
Sender: owner-linux-m68k@phil.uni-sb.de


Here is my first bunch of patches:

  - Call zorro_init() from init/main.c (cfr. PCI)
  - Call zorro_proc_init() from drivers/zorro/zorro.c (cfr. PCI)
  - Remove unused IDE enums
  - Add prototype for ide_replace_subdriver()
  - fs/{nfs/write,proc/root}.c: reduce diff against Linus' tree
  - include/asm-m68k/{hard,soft}irq.h: add missing barrier() (cfr. other ports)
  - init/main.c: move dio_init() to the place it belongs

I tried to back out the patch to kernel/kmod.c, but it seems like Andrea[s]
Arcangeli's fix for fs/exec.c wasn't sufficient :-(

Video patches (upgrade to vger) will follow soon.

I'll also try the latest IDE patch from Andre M. Hedrick (the one from a few
minutes ago: http://www.cs.kuleuven.ac.be/~geert/bin/andre-ide-19980831.gz)

I took a closer look at the diff against Linus' tree. What about:

  fs/fcntl.c
  fs/proc/array.c
  include/linux/linkage.h
  kernel/signal.c
  scripts/Configure

Other thing I noticed: lp_m68k_init(void) is declared in both
include/linux/{lp_m68k,tty}.h.

diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/arch/m68k/amiga/config.c m68k/arch/m68k/amiga/config.c
--- jes-2.1.119/arch/m68k/amiga/config.c	Mon Aug 10 09:20:32 1998
+++ m68k/arch/m68k/amiga/config.c	Sun Aug 30 22:36:47 1998
@@ -20,6 +20,7 @@
 #include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/init.h>
+#include <linux/zorro.h>
 
 #include <asm/bootinfo.h>
 #include <asm/setup.h>
@@ -29,7 +30,6 @@
 #include <asm/amigaints.h>
 #include <asm/irq.h>
 #include <asm/machdep.h>
-#include <linux/zorro.h>
 
 unsigned long amiga_model;
 unsigned long amiga_eclock;
@@ -421,10 +421,6 @@
    */
   if (AMIGAHW_PRESENT(MAGIC_REKICK))
 	  *(unsigned char *)ZTWO_VADDR(0xde0002) |= 0x80;
-
-#ifdef CONFIG_ZORRO
-  zorro_init();
-#endif
 }
 
 static unsigned short jiffy_ticks;
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/drivers/block/ide.h m68k/drivers/block/ide.h
--- jes-2.1.119/drivers/block/ide.h	Mon Aug 10 09:23:35 1998
+++ m68k/drivers/block/ide.h	Mon Aug 31 21:31:32 1998
@@ -311,8 +311,7 @@
 		ide_cmd640,	ide_dtc2278,	ide_ali14xx,
 		ide_qd6580,	ide_umc8672,	ide_ht6560b,
 		ide_pdc4030,	ide_rz1000,	ide_trm290,
-		ide_cmd646,	ide_4drives,	ide_gayle,
-		ide_falcon,	ide_mac,	ide_buddha
+		ide_cmd646,	ide_4drives
 	} hwif_chipset_t;
 
 typedef struct ide_pci_devid_s {
@@ -730,6 +729,7 @@
 ide_drive_t *ide_scan_devices (byte media, const char *name, ide_driver_t *driver, int n);
 int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int version);
 int ide_unregister_subdriver (ide_drive_t *drive);
+int ide_replace_subdriver(ide_drive_t *drive, const char *driver);
 void ide_setup_ports(ide_hwif_t *hwif, ide_ioreg_t base, const int *offsets,
 		     ide_ioreg_t irqport, ide_ack_intr_t *ack_intr);
 
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/drivers/zorro/zorro.c m68k/drivers/zorro/zorro.c
--- jes-2.1.119/drivers/zorro/zorro.c	Thu Jun 18 21:06:19 1998
+++ m68k/drivers/zorro/zorro.c	Sun Aug 30 22:36:47 1998
@@ -10,7 +10,7 @@
  *    for more details.
  */
 
-
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -226,4 +226,8 @@
     if (disabled_z2mem)
 	printk("%dK of Zorro II memory will not be used as system memory\n",
 	       disabled_z2mem>>10);
+
+#ifdef CONFIG_PROC_FS
+    zorro_proc_init();
+#endif
 }
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/fs/nfs/write.c m68k/fs/nfs/write.c
--- jes-2.1.119/fs/nfs/write.c	Sun Aug 30 20:41:00 1998
+++ m68k/fs/nfs/write.c	Sun Aug 30 22:36:46 1998
@@ -461,7 +461,7 @@
 {
 	struct wait_queue	wait = { current, NULL };
 	struct page		*page = req->wb_page;
-	int			retval;
+	int retval;
 	sigset_t		oldmask;
 	struct rpc_clnt		*clnt = NFS_CLIENT(req->wb_inode);
 
@@ -474,7 +474,6 @@
 		if (!PageLocked(page))
 			break;
 		retval = -ERESTARTSYS;
-		/* IS_SOFT is a timeout item .. */
 		if (signalled())
 			break;
 		schedule();
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/fs/proc/root.c m68k/fs/proc/root.c
--- jes-2.1.119/fs/proc/root.c	Sun Aug 30 20:41:16 1998
+++ m68k/fs/proc/root.c	Sun Aug 30 22:36:46 1998
@@ -718,13 +718,6 @@
 #endif
 
 	proc_bus = create_proc_entry("bus", S_IFDIR, 0);
-
-#ifdef CONFIG_PCI
-	pci_proc_init();
-#endif
-#ifdef CONFIG_ZORRO
-	zorro_proc_init();
-#endif
 }
 
 /*
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/include/asm-m68k/hardirq.h m68k/include/asm-m68k/hardirq.h
--- jes-2.1.119/include/asm-m68k/hardirq.h	Sun Aug 30 20:41:28 1998
+++ m68k/include/asm-m68k/hardirq.h	Sun Aug 30 22:39:49 1998
@@ -13,6 +13,6 @@
 #define hardirq_enter(cpu)	(local_irq_count[cpu]++)
 #define hardirq_exit(cpu)	(local_irq_count[cpu]--)
 
-#define synchronize_irq()	do { } while (0)
+#define synchronize_irq()	barrier()
 
 #endif
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/include/asm-m68k/softirq.h m68k/include/asm-m68k/softirq.h
--- jes-2.1.119/include/asm-m68k/softirq.h	Mon Aug 10 09:33:26 1998
+++ m68k/include/asm-m68k/softirq.h	Sun Aug 30 22:39:24 1998
@@ -61,6 +61,6 @@
 /* These are for the irq's testing the lock */
 #define softirq_trylock(cpu)  (local_bh_count[cpu] ? 0 : (local_bh_count[cpu]=1))
 #define softirq_endlock(cpu)  (local_bh_count[cpu] = 0)
-#define synchronize_bh()	do { } while (0)
+#define synchronize_bh()	barrier()
 
 #endif
diff -u --recursive --exclude-from=/home/geert/diff-excludes-linux --new-file jes-2.1.119/init/main.c m68k/init/main.c
--- jes-2.1.119/init/main.c	Sun Aug 30 20:41:33 1998
+++ m68k/init/main.c	Mon Aug 31 00:12:11 1998
@@ -51,6 +51,10 @@
 #include <linux/dio.h>
 #endif
 
+#ifdef CONFIG_ZORRO
+#include <linux/zorro.h>
+#endif
+
 #ifdef CONFIG_MTRR
 #  include <asm/mtrr.h>
 #endif
@@ -1142,9 +1146,6 @@
 #ifdef CONFIG_SYSCTL
 	sysctl_init();
 #endif
-#ifdef CONFIG_DIO
-	dio_init();
-#endif
 
 	/*
 	 * Ok, at this point all CPU's should be initialized, so
@@ -1164,6 +1165,12 @@
 #endif
 #ifdef CONFIG_ARCH_ACORN
 	ecard_init();
+#endif
+#ifdef CONFIG_ZORRO
+	zorro_init();
+#endif
+#ifdef CONFIG_DIO
+	dio_init();
 #endif
 
 	/* 

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

