## Automatically generated incremental diff
## From:   linux-2.5.64-bk6
## To:     linux-2.5.64-bk7
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.5.64-bk6/CREDITS linux-2.5.64-bk7/CREDITS
--- linux-2.5.64-bk6/CREDITS	Tue Mar  4 19:29:31 2003
+++ linux-2.5.64-bk7/CREDITS	Mon Mar 31 12:29:48 2003
@@ -3492,9 +3492,9 @@
 
 N: Marc Zyngier
 E: maz@wild-wind.fr.eu.org
+W: http://www.misterjones.org
 D: MD driver
-S: 11 rue Victor HUGO
-S: 95560 Montsoult
+D: EISA/sysfs subsystem
 S: France
 
 # Don't add your name here, unless you really _are_ after Marc
diff -urN linux-2.5.64-bk6/Documentation/DocBook/journal-api.tmpl linux-2.5.64-bk7/Documentation/DocBook/journal-api.tmpl
--- linux-2.5.64-bk6/Documentation/DocBook/journal-api.tmpl	Tue Mar  4 19:28:56 2003
+++ linux-2.5.64-bk7/Documentation/DocBook/journal-api.tmpl	Mon Mar 31 12:29:48 2003
@@ -216,7 +216,7 @@
 <para>
 A new feature of jbd since 2.5.25 is commit callbacks with the new
 journal_callback_set() function you can now ask the journalling layer
-to call you back when the transaction is finally commited to disk, so that
+to call you back when the transaction is finally committed to disk, so that
 you can do some of your own management. The key to this is the journal_callback
 struct, this maintains the internal callback information but you can
 extend it like this:-
@@ -232,7 +232,7 @@
 </programlisting>
 
 <para>
-this would be useful if you needed to know when data was commited to a 
+this would be useful if you needed to know when data was committed to a 
 particular inode.
 </para>
 
diff -urN linux-2.5.64-bk6/Documentation/DocBook/sis900.tmpl linux-2.5.64-bk7/Documentation/DocBook/sis900.tmpl
--- linux-2.5.64-bk6/Documentation/DocBook/sis900.tmpl	Tue Mar  4 19:29:22 2003
+++ linux-2.5.64-bk7/Documentation/DocBook/sis900.tmpl	Mon Mar 31 12:29:48 2003
@@ -536,7 +536,7 @@
 <ListItem>
 <Para>
 November 13, 2000, Revision 1.07, seventh release, 630E problem fixed 
-and furthur clean up.
+and further clean up.
 </Para>
 </ListItem>
 
diff -urN linux-2.5.64-bk6/Documentation/arm/Booting linux-2.5.64-bk7/Documentation/arm/Booting
--- linux-2.5.64-bk6/Documentation/arm/Booting	Tue Mar  4 19:29:31 2003
+++ linux-2.5.64-bk7/Documentation/arm/Booting	Mon Mar 31 12:29:48 2003
@@ -47,7 +47,7 @@
 used for debugging purposes, or communication with the target.)
 
 As an alternative, the boot loader can pass the relevant 'console='
-option to the kernel via the tagged lists specifing the port, and
+option to the kernel via the tagged lists specifying the port, and
 serial format options as described in
 
        linux/Documentation/kernel-parameters.txt.
diff -urN linux-2.5.64-bk6/Documentation/arm/SA1100/serial_UART linux-2.5.64-bk7/Documentation/arm/SA1100/serial_UART
--- linux-2.5.64-bk6/Documentation/arm/SA1100/serial_UART	Tue Mar  4 19:29:16 2003
+++ linux-2.5.64-bk7/Documentation/arm/SA1100/serial_UART	Mon Mar 31 12:29:48 2003
@@ -39,7 +39,7 @@
 name. The classic example is the content of the /etc/inittab file where
 you might have a getty process started on ttyS0.  In this case:
 
-- replace occurences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc.
+- replace occurrences of ttyS0 with ttySA0, ttyS1 with ttySA1, etc.
 
 - don't forget to add 'ttySA0', 'console', or the appropriate tty name
   in /etc/securetty for root to be allowed to login as well.
diff -urN linux-2.5.64-bk6/Documentation/arm/Setup linux-2.5.64-bk7/Documentation/arm/Setup
--- linux-2.5.64-bk6/Documentation/arm/Setup	Tue Mar  4 19:29:00 2003
+++ linux-2.5.64-bk7/Documentation/arm/Setup	Mon Mar 31 12:29:48 2003
@@ -97,7 +97,7 @@
  initrd_size
 
    This describes the kernel virtual start address and size of the
-   inital ramdisk.
+   initial ramdisk.
 
  rd_start
 
diff -urN linux-2.5.64-bk6/Documentation/arm/XScale/IOP3XX/dma.txt linux-2.5.64-bk7/Documentation/arm/XScale/IOP3XX/dma.txt
--- linux-2.5.64-bk6/Documentation/arm/XScale/IOP3XX/dma.txt	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/arm/XScale/IOP3XX/dma.txt	Mon Mar 31 12:29:48 2003
@@ -142,7 +142,7 @@
 	/* User's responsibility to keep buffers cached coherent */
 	cpu_dcache_clean(sgl->data, sgl->data + 1024);
 
-    	/* queing the buffer, this function will sleep since no callback */
+    	/* queuing the buffer, this function will sleep since no callback */
     	err = dma_queue_buffer(channel, sgl_head);
 
     	/* now we are woken from DMA complete */
@@ -186,7 +186,7 @@
 int dma_flush_all(dmach_t channel);
 
 This completely flushes all queued buffers and on-going DMA transfers on a
-given channel. This is called when DMA channel errors have occured.
+given channel. This is called when DMA channel errors have occurred.
 
 
 void dma_free(dmach_t channel);
diff -urN linux-2.5.64-bk6/Documentation/arm/mem_alignment linux-2.5.64-bk7/Documentation/arm/mem_alignment
--- linux-2.5.64-bk6/Documentation/arm/mem_alignment	Tue Mar  4 19:29:16 2003
+++ linux-2.5.64-bk7/Documentation/arm/mem_alignment	Mon Mar 31 12:29:48 2003
@@ -51,7 +51,7 @@
 	echo 1 > /proc/sys/debug/alignment
 
 You can also read the content of the same file to get statistical
-information on unaligned access occurences plus the current mode of
+information on unaligned access occurrences plus the current mode of
 operation for user space code.
 
 
diff -urN linux-2.5.64-bk6/Documentation/block/biodoc.txt linux-2.5.64-bk7/Documentation/block/biodoc.txt
--- linux-2.5.64-bk6/Documentation/block/biodoc.txt	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/block/biodoc.txt	Mon Mar 31 12:29:48 2003
@@ -635,9 +635,9 @@
 be one of the many segments in the current bio (i.e i/o completion unit).
 The nr_sectors value refers to the total number of sectors in the whole
 request that remain to be transferred (no change). The purpose of the
-hard_xxx values is for block to remember these counts everytime it hands
+hard_xxx values is for block to remember these counts every time it hands
 over the request to the driver. These values are updated by block on
-end_that_request_first, i.e. everytime the driver completes a part of the
+end_that_request_first, i.e. every time the driver completes a part of the
 transfer and invokes block end*request helpers to mark this. The
 driver should not modify these values. The block layer sets up the
 nr_sectors and current_nr_sectors fields (based on the corresponding
diff -urN linux-2.5.64-bk6/Documentation/computone.txt linux-2.5.64-bk7/Documentation/computone.txt
--- linux-2.5.64-bk6/Documentation/computone.txt	Tue Mar  4 19:29:34 2003
+++ linux-2.5.64-bk7/Documentation/computone.txt	Mon Mar 31 12:29:48 2003
@@ -539,7 +539,7 @@
 X		for PORTNO in $MINORS
 X		do
 X			if test ! -c /dev/ttyF$PORTNO ; then
-X				# We got the harware but no device - make it
+X				# We got the hardware but no device - make it
 X				mknod /dev/ttyF$PORTNO c $TTYMAJOR $PORTNO
 X			fi	
 X		done
@@ -552,7 +552,7 @@
 X		for PORTNO in $MINORS
 X		do
 X			if test ! -c /dev/cuf$PORTNO ; then
-X				# We got the harware but no device - make it
+X				# We got the hardware but no device - make it
 X				mknod /dev/cuf$PORTNO c $CUAMAJOR $PORTNO
 X			fi	
 X		done
diff -urN linux-2.5.64-bk6/Documentation/cpqarray.txt linux-2.5.64-bk7/Documentation/cpqarray.txt
--- linux-2.5.64-bk6/Documentation/cpqarray.txt	Tue Mar  4 19:29:19 2003
+++ linux-2.5.64-bk7/Documentation/cpqarray.txt	Mon Mar 31 12:29:48 2003
@@ -49,9 +49,9 @@
 -----------------
 
 If you want to use an EISA controller you'll have to supply some
-insmod/lilo paramaters.  If the driver is compiled into the kernel, must
+insmod/lilo parameters.  If the driver is compiled into the kernel, must
 give it the controller's IO port address at boot time (it is no longer
-necessary to specifiy the IRQ).  For example, if you had two SMART-2/E
+necessary to specify the IRQ).  For example, if you had two SMART-2/E
 controllers, in EISA slots 1 and 2 you'd give it a boot argument like
 this:
 
diff -urN linux-2.5.64-bk6/Documentation/cpu-freq/cpu-drivers.txt linux-2.5.64-bk7/Documentation/cpu-freq/cpu-drivers.txt
--- linux-2.5.64-bk6/Documentation/cpu-freq/cpu-drivers.txt	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/Documentation/cpu-freq/cpu-drivers.txt	Mon Mar 31 12:29:48 2003
@@ -35,7 +35,7 @@
 
 So, you just got a brand-new CPU / chipset with datasheets and want to
 add cpufreq support for this CPU / chipset? Great. Here are some hints
-on what is neccessary:
+on what is necessary:
 
 
 1.1 Initialization
@@ -54,7 +54,7 @@
 cpufreq_driver.init -		A pointer to the per-CPU initialization 
 				function.
 
-cpufreq_driver.verify -		A pointer to a "verfication" funciton.
+cpufreq_driver.verify -		A pointer to a "verification" funciton.
 
 cpufreq_driver.setpolicy _or_ 
 cpufreq_driver.target -		See below on the differences.
@@ -72,7 +72,7 @@
 --------------------------
 
 Whenever a new CPU is registered with the device model, or after the
-cpufreq driver registers itself, the per-CPU initialization fucntion 
+cpufreq driver registers itself, the per-CPU initialization function 
 cpufreq_driver.init is called. It takes a struct cpufreq_policy
 *policy as argument. What to do now?
 
@@ -94,7 +94,7 @@
 				this CPU (if appropriate)
 policy->min, 
 policy->max, 
-policy->policy and, if neccessary,
+policy->policy and, if necessary,
 policy->governor		must contain the "default policy" for
 				this CPU. A few moments later,
 				cpufreq_driver.verify and either
diff -urN linux-2.5.64-bk6/Documentation/cpu-freq/governors.txt linux-2.5.64-bk7/Documentation/cpu-freq/governors.txt
--- linux-2.5.64-bk6/Documentation/cpu-freq/governors.txt	Tue Mar  4 19:29:22 2003
+++ linux-2.5.64-bk7/Documentation/cpu-freq/governors.txt	Mon Mar 31 12:29:48 2003
@@ -98,7 +98,7 @@
 -------------
 
 The CPUfreq governor "userspace" allows the user, or any userspace
-program running with UID "root", to set the CPU to a specifc frequency
+program running with UID "root", to set the CPU to a specific frequency
 by making a sysfs file "scaling_setspeed" available in the CPU-device
 directory.
 
diff -urN linux-2.5.64-bk6/Documentation/cpu-freq/user-guide.txt linux-2.5.64-bk7/Documentation/cpu-freq/user-guide.txt
--- linux-2.5.64-bk6/Documentation/cpu-freq/user-guide.txt	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/Documentation/cpu-freq/user-guide.txt	Mon Mar 31 12:29:48 2003
@@ -58,7 +58,8 @@
 Intel Pentium 4, Intel Xeon
 National Semiconductors Geode GX
 Transmeta Crusoe
-varios processors on some ACPI 2.0-compatible systems [**]
+VIA Cyrix 3 / C3
+various processors on some ACPI 2.0-compatible systems [**]
 
 [*] only certain Intel mobile PIII processors are supported. If you
 know that you own a speedstep-capable processor, pass the option
@@ -81,9 +82,9 @@
 2. "Policy" / "Governor" ?
 ==========================
 
-Some CPU frequency scaling-capable processor switch between varios
+Some CPU frequency scaling-capable processor switch between various
 frequencies and operating voltages "on the fly" without any kernel or
-user involvement. This guarantuees very fast switching to a frequency
+user involvement. This guarantees very fast switching to a frequency
 which is high enough to serve the user's needs, but low enough to save
 power.
 
@@ -93,7 +94,7 @@
 
 On these systems, all you can do is select the lower and upper
 frequency limit as well as whether you want more aggressive
-power-saving or more instantly avaialble processing power.
+power-saving or more instantly available processing power.
 
 
 2.2 Governor
diff -urN linux-2.5.64-bk6/Documentation/devices.txt linux-2.5.64-bk7/Documentation/devices.txt
--- linux-2.5.64-bk6/Documentation/devices.txt	Tue Mar  4 19:29:16 2003
+++ linux-2.5.64-bk7/Documentation/devices.txt	Mon Mar 31 12:29:48 2003
@@ -898,7 +898,7 @@
 		    ...
 
 		Network Block Device is somehow similar to loopback
-		devices: If you read from it, it sends packet accross
+		devices: If you read from it, it sends packet across
 		network asking server for data. If you write to it, it
 		sends packet telling server to write. It could be used
 		to mounting filesystems over the net, swapping over
diff -urN linux-2.5.64-bk6/Documentation/driver-model/driver.txt linux-2.5.64-bk7/Documentation/driver-model/driver.txt
--- linux-2.5.64-bk6/Documentation/driver-model/driver.txt	Tue Mar  4 19:29:19 2003
+++ linux-2.5.64-bk7/Documentation/driver-model/driver.txt	Mon Mar 31 12:29:48 2003
@@ -36,7 +36,7 @@
 ~~~~~~~~~~~~~~
 
 The driver must initialize at least the name and bus fields. It should
-also initalize the devclass field (when it arrives), so it may obtain
+also initialize the devclass field (when it arrives), so it may obtain
 the proper linkage internally. It should also initialize as many of
 the callbacks as possible, though each is optional.
 
@@ -93,7 +93,7 @@
        },
 };
 
-Some may find the syntax of embedded struct intialization awkward or
+Some may find the syntax of embedded struct initialization awkward or
 even a bit ugly. So far, it's the best way we've found to do what we want...
 
 Registration
@@ -198,7 +198,7 @@
 	int	(*suspend)	(struct device * dev, u32 state, u32 level);
 
 suspend is called to put the device in a low power state. There are
-several stages to sucessfully suspending a device, which is denoted in
+several stages to successfully suspending a device, which is denoted in
 the @level parameter. Breaking the suspend transition into several
 stages affords the platform flexibility in performing device power
 management based on the requirements of the system and the
@@ -206,7 +206,7 @@
 
 SUSPEND_NOTIFY notifies the device that a suspend transition is about
 to happen. This happens on system power state transition to verify
-that all devices can sucessfully suspend.
+that all devices can successfully suspend.
 
 A driver may choose to fail on this call, which should cause the
 entire suspend transition to fail. A driver should fail only if it
diff -urN linux-2.5.64-bk6/Documentation/driver-model/platform.txt linux-2.5.64-bk7/Documentation/driver-model/platform.txt
--- linux-2.5.64-bk6/Documentation/driver-model/platform.txt	Tue Mar  4 19:29:34 2003
+++ linux-2.5.64-bk7/Documentation/driver-model/platform.txt	Mon Mar 31 12:29:48 2003
@@ -34,7 +34,7 @@
 gives them a common parent if they don't already have one. 
 
 But, besides the organizational benefits, the platform bus can also
-accomodate firmware-based enumeration. 
+accommodate firmware-based enumeration. 
 
 
 Device Discovery
diff -urN linux-2.5.64-bk6/Documentation/eisa.txt linux-2.5.64-bk7/Documentation/eisa.txt
--- linux-2.5.64-bk6/Documentation/eisa.txt	Wed Dec 31 16:00:00 1969
+++ linux-2.5.64-bk7/Documentation/eisa.txt	Mon Mar 31 12:29:48 2003
@@ -0,0 +1,164 @@
+EISA bus support (Marc Zyngier <maz@wild-wind.fr.eu.org>)
+
+This document groups random notes about porting EISA drivers to the
+new EISA/sysfs API.
+
+Starting from version 2.5.59, the EISA bus is almost given the same
+status as other much more mainstream busses such as PCI or USB. This
+has been possible through sysfs, which defines a nice enough set of
+abstractions to manage busses, devices and drivers.
+
+Although the new API is quite simple to use, converting existing
+drivers to the new infrastructure is not an easy task (mostly because
+detection code is generally also used to probe ISA cards). Moreover,
+most EISA drivers are among the oldest Linux drivers so, as you can
+imagine, some dust has settled here over the years.
+
+The EISA infrastructure is made up of three parts :
+
+    - The bus code implements most of the generic code. It is shared
+    among all the architectures that the EISA code runs on. It
+    implements bus probing (detecting EISA cards avaible on the bus),
+    allocates I/O resources, allows fancy naming through sysfs, and
+    offers interfaces for driver to register.
+
+    - The bus root driver implements the glue between the bus hardware
+    and the generic bus code. It is responsible for discovering the
+    device implementing the bus, and setting it up to be latter probed
+    by the bus code. This can go from something as simple as reserving
+    an I/O region on x86, to the rather more complex, like the hppa
+    EISA code. This is the part to implement in order to have EISA
+    running on an "new" platform.
+
+    - The driver offers the bus a list of devices that it manages, and
+    implements the necessary callbacks to probe and release devices
+    whenever told to.
+
+Every function/structure below lives in <linux/eisa.h>, which depends
+heavily on <linux/device.h>.
+
+** Bus root driver :
+
+int eisa_root_register (struct eisa_root_device *root);
+
+The eisa_root_register function is used to declare a device as the
+root of an EISA bus. The eisa_root_device structure holds a reference
+to this device, as well as some parameters for probing purposes.
+
+struct eisa_root_device {
+        struct list_head node;
+        struct device   *dev;    /* Pointer to bridge device */
+        struct resource *res;
+        unsigned long    bus_base_addr;
+        int              slots;  /* Max slot number */
+        int              bus_nr; /* Set by eisa_root_register */
+};
+
+node          : used for eisa_root_register internal purpose
+dev           : pointer to the root device
+res           : root device I/O resource
+bus_base_addr : slot 0 address on this bus
+slots	      : max slot number to probe
+bus_nr	      : unique bus id, set by eisa_root_register
+
+** Driver :
+
+int eisa_driver_register (struct eisa_driver *edrv);
+void eisa_driver_unregister (struct eisa_driver *edrv);
+
+Clear enough ?
+
+struct eisa_device_id {
+        char sig[EISA_SIG_LEN];
+	unsigned long driver_data;
+};
+
+struct eisa_driver {
+        const struct eisa_device_id *id_table;
+        struct device_driver         driver;
+};
+
+id_table	: an array of NULL terminated EISA id strings,
+		  followed by an empty string. Each string can be
+		  paired with a driver-dependant value (driver_data).
+
+driver		: a generic driver, such as described in
+		  Documentation/driver-model/driver.txt. Only .name,
+		  .probe and .remove members are mandatory.
+
+An example is the 3c509 driver :
+
+struct eisa_device_id el3_eisa_ids[] = {
+        { "TCM5092" },
+        { "TCM5093" },
+        { "" }
+};
+
+struct eisa_driver el3_eisa_driver = {
+        .id_table = el3_eisa_ids,
+        .driver   = {
+                .name    = "3c509",
+                .probe   = el3_eisa_probe,
+                .remove  = __devexit_p (el3_device_remove)
+        }
+};
+
+** Device :
+
+The sysfs framework calls .probe and .remove functions upon device
+discovery and removal (note that the .remove function is only called
+when driver is built as a module).
+
+Both functions are passed a pointer to a 'struct device', which is
+encapsulated in a 'struct eisa_device' described as follows :
+
+struct eisa_device {
+        struct eisa_device_id id;
+        int                   slot;
+        unsigned long         base_addr;
+        struct resource       res;
+        struct device         dev; /* generic device */
+};
+
+id	: EISA id, as read from device. id.driver_data is set from the
+	  matching driver EISA id.
+slot	: slot number which the device was detected on
+res	: I/O resource allocated to this device
+dev	: generic device (see Documentation/driver-model/device.txt)
+
+You can get the 'struct eisa_device' from 'struct device' using the
+'to_eisa_device' macro.
+
+** Misc stuff :
+
+void eisa_set_drvdata (struct eisa_device *edev, void *data);
+
+Stores data into the device's driver_data area.
+
+void *eisa_get_drvdata (struct eisa_device *edev):
+
+Gets the pointer previously stored into the device's driver_data area.
+
+** Random notes :
+
+Converting an EISA driver to the new API mostly involves *deleting*
+code (since probing is now in the core EISA code). Unfortunately, most
+drivers share their probing routine between ISA, MCA and EISA. Special
+care must be taken when ripping out the EISA code, so other busses
+won't suffer from these surgical strikes...
+
+You *must not* expect any EISA device to be detected when returning
+from eisa_driver_register, since the chances are that the bus has not
+yet been probed. In fact, that's what happens most of the time (the
+bus root driver usually kicks in rather late in the boot process).
+Unfortunately, most drivers are doing the probing by themselves, and
+expect to have explored the whole machine when they exit their probe
+routine.
+
+** Thanks :
+
+I'd like to thank the following people for their help :
+- Xavier Benigni for lending me a wonderful Alpha Jensen,
+- James Bottomley, Jeff Garzik for getting this stuff into the kernel,
+- Andries Brouwer for contributing numerous EISA ids,
+- Catrin Jones for coping with too many machines at home
diff -urN linux-2.5.64-bk6/Documentation/filesystems/Exporting linux-2.5.64-bk7/Documentation/filesystems/Exporting
--- linux-2.5.64-bk6/Documentation/filesystems/Exporting	Tue Mar  4 19:29:16 2003
+++ linux-2.5.64-bk7/Documentation/filesystems/Exporting	Mon Mar 31 12:29:48 2003
@@ -45,7 +45,7 @@
    to already have a (non-connected) dentry, and must be able to move
    that dentry into place (based on the parent and name in the
    ->lookup).   This is particuarly needed for directories as
-   it is a dcache invarient that directories only have one dentry.
+   it is a dcache invariant that directories only have one dentry.
 
 To implement these features, the dcache has:
 
diff -urN linux-2.5.64-bk6/Documentation/filesystems/devfs/README linux-2.5.64-bk7/Documentation/filesystems/devfs/README
--- linux-2.5.64-bk6/Documentation/filesystems/devfs/README	Tue Mar  4 19:29:17 2003
+++ linux-2.5.64-bk7/Documentation/filesystems/devfs/README	Mon Mar 31 12:29:48 2003
@@ -56,7 +56,7 @@
 Operational issues (essential reading)
 
 Instructions for the impatient
-Permissions persistence accross reboots
+Permissions persistence across reboots
 Dealing with drivers without devfs support
 All the way with Devfs
 Other Issues
@@ -1466,13 +1466,6 @@
 keep using the old major and minor numbers. Devfs will take whatever
 values are given for major&minor and pass them onto userspace.
 
-Alternatively, you can have devfs choose unique device numbers for
-you. When you register a character or block device using
-devfs_register you can provide the optional
-DEVFS_FL_AUTO_DEVNUM flag, which will then automatically allocate a
-unique device number (the allocation is separated for the character
-and block devices).
-
 This device number is a 16 bit number, so this leaves plenty of space
 for large numbers of discs and partitions. This scheme can also be
 used for character devices, in particular the tty devices, which are
diff -urN linux-2.5.64-bk6/Documentation/filesystems/directory-locking linux-2.5.64-bk7/Documentation/filesystems/directory-locking
--- linux-2.5.64-bk6/Documentation/filesystems/directory-locking	Tue Mar  4 19:29:31 2003
+++ linux-2.5.64-bk7/Documentation/filesystems/directory-locking	Mon Mar 31 12:29:48 2003
@@ -110,4 +110,4 @@
 	Notice that "directory" in the above == "anything that might have
 children", so if we are going to introduce hybrid objects we will need
 either to make sure that link(2) doesn't work for them or to make changes
-in is_subdir() that would make it work even in presense of such beasts.
+in is_subdir() that would make it work even in presence of such beasts.
diff -urN linux-2.5.64-bk6/Documentation/filesystems/ext3.txt linux-2.5.64-bk7/Documentation/filesystems/ext3.txt
--- linux-2.5.64-bk6/Documentation/filesystems/ext3.txt	Tue Mar  4 19:29:16 2003
+++ linux-2.5.64-bk7/Documentation/filesystems/ext3.txt	Mon Mar 31 12:29:48 2003
@@ -48,11 +48,11 @@
 
 sb=n			Use alternate superblock at this location.
 
-data=journal		All data are commited into the journal prior 
+data=journal		All data are committed into the journal prior 
 			to being written into the main file system.
 		
 data=ordered	(*)	All data are forced directly out to the main file 
-			system prior to its metadata being commited to 
+			system prior to its metadata being committed to 
 			the journal.
 		
 data=writeback  	Data ordering is not preserved, data may be 
diff -urN linux-2.5.64-bk6/Documentation/filesystems/proc.txt linux-2.5.64-bk7/Documentation/filesystems/proc.txt
--- linux-2.5.64-bk6/Documentation/filesystems/proc.txt	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/Documentation/filesystems/proc.txt	Mon Mar 31 12:29:48 2003
@@ -344,7 +344,7 @@
 Each column represents the number of pages of a certain order which are 
 available.  In this case, there are 0 chunks of 2^0*PAGE_SIZE available in 
 ZONE_DMA, 4 chunks of 2^1*PAGE_SIZE in ZONE_DMA, 101 chunks of 2^4*PAGE_SIZE 
-availble in ZONE_NORMAL, etc... 
+available in ZONE_NORMAL, etc... 
 
 
 1.3 IDE devices in /proc/ide
diff -urN linux-2.5.64-bk6/Documentation/filesystems/sysfs.txt linux-2.5.64-bk7/Documentation/filesystems/sysfs.txt
--- linux-2.5.64-bk6/Documentation/filesystems/sysfs.txt	Tue Mar  4 19:28:59 2003
+++ linux-2.5.64-bk7/Documentation/filesystems/sysfs.txt	Mon Mar 31 12:29:48 2003
@@ -55,7 +55,7 @@
 value per file, so it is socially acceptable to express an array of
 values of the same type. 
 
-Mixing types, expressing mulitple lines of data, and doing fancy
+Mixing types, expressing multiple lines of data, and doing fancy
 formatting of data is heavily frowned upon. Doing these things may get
 you publically humiliated and your code rewritten without notice. 
 
diff -urN linux-2.5.64-bk6/Documentation/ia64/IRQ-redir.txt linux-2.5.64-bk7/Documentation/ia64/IRQ-redir.txt
--- linux-2.5.64-bk6/Documentation/ia64/IRQ-redir.txt	Tue Mar  4 19:29:30 2003
+++ linux-2.5.64-bk7/Documentation/ia64/IRQ-redir.txt	Mon Mar 31 12:29:48 2003
@@ -29,7 +29,7 @@
 The output of the command
      cat /proc/irq/IRQ#/smp_affinity
 gives the target CPU mask for the specified interrupt vector. If the CPU
-mask is preceeded by the character "r", the interrupt is redirectable
+mask is preceded by the character "r", the interrupt is redirectable
 (i.e. lowest priority mode routing is used), otherwise its route is
 fixed.
 
diff -urN linux-2.5.64-bk6/Documentation/ide.txt linux-2.5.64-bk7/Documentation/ide.txt
--- linux-2.5.64-bk6/Documentation/ide.txt	Tue Mar  4 19:29:30 2003
+++ linux-2.5.64-bk7/Documentation/ide.txt	Mon Mar 31 12:29:48 2003
@@ -4,7 +4,7 @@
 ==============================================================================
 
    
-   The hdparm utility can be used to controll various IDE features on a
+   The hdparm utility can be used to control various IDE features on a
    running system. It is packaged separately.  Please Look for it on popular
    linux FTP sites.
    
@@ -37,7 +37,7 @@
 ================================================================================
 Common pitfalls:
 
-- 40-conductor IDE cables are capable of transfering data in DMA modes up to
+- 40-conductor IDE cables are capable of transferring data in DMA modes up to
   udma2, but no faster.
 
 - If possible devices should be attached to separate channels if they are
diff -urN linux-2.5.64-bk6/Documentation/input/ff.txt linux-2.5.64-bk7/Documentation/input/ff.txt
--- linux-2.5.64-bk6/Documentation/input/ff.txt	Tue Mar  4 19:29:24 2003
+++ linux-2.5.64-bk7/Documentation/input/ff.txt	Mon Mar 31 12:29:48 2003
@@ -163,7 +163,7 @@
 ~~~~~~~~~~~~~~~~~~~~
 Not all devices have the same strength. Therefore, users should set a gain
 factor depending on how strong they want effects to be. This setting is
-persistent accross access to the driver, so you should not care about it if
+persistent across access to the driver, so you should not care about it if
 you are writing games, as another utility probably already set this for you.
 
 /* Set the gain of the device
@@ -200,7 +200,7 @@
 Proceed as if you wanted to upload a new effect, except that instead of
 setting the id field to -1, you set it to the wanted effect id.
 Normally, the effect is not stopped and restarted. However, depending on the
-type of device, not all paramaters can be dynamically updated. For example,
+type of device, not all parameters can be dynamically updated. For example,
 the direction of an effect cannot be updated with iforce devices. In this
 case, the driver stops the effect, up-load it, and restart it.
 
diff -urN linux-2.5.64-bk6/Documentation/isdn/INTERFACE linux-2.5.64-bk7/Documentation/isdn/INTERFACE
--- linux-2.5.64-bk6/Documentation/isdn/INTERFACE	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/isdn/INTERFACE	Mon Mar 31 12:29:48 2003
@@ -735,7 +735,7 @@
       driver      = driver-Id
       command     = ISDN_STAT_PROT
       arg         = The lower 8 Bits define the addressed protocol as defined
-                    in ISDN_PTYPE..., the upper bits are used to differenciate
+                    in ISDN_PTYPE..., the upper bits are used to differentiate
                     the protocol specific STAT.  
       
       para        = protocol and function specific. See isdnif.h for detail.
diff -urN linux-2.5.64-bk6/Documentation/kbuild/kconfig-language.txt linux-2.5.64-bk7/Documentation/kbuild/kconfig-language.txt
--- linux-2.5.64-bk6/Documentation/kbuild/kconfig-language.txt	Tue Mar  4 19:29:15 2003
+++ linux-2.5.64-bk7/Documentation/kbuild/kconfig-language.txt	Mon Mar 31 12:29:48 2003
@@ -69,7 +69,7 @@
   default values are visible, only the first defined one is active.
   Default values are not limited to the menu entry, where they are
   defined, this means the default can be defined somewhere else or be
-  overriden by an earlier definition.
+  overridden by an earlier definition.
   The default value is only assigned to the config symbol if no other
   value was set by the user (via the input prompt above). If an input
   prompt is visible the default value is presented to the user and can
@@ -142,7 +142,7 @@
 --------------
 
 The position of a menu entry in the tree is determined in two ways. First
-it can be specified explicitely:
+it can be specified explicitly:
 
 menu "Network device support"
 	depends NET
diff -urN linux-2.5.64-bk6/Documentation/kbuild/makefiles.txt linux-2.5.64-bk7/Documentation/kbuild/makefiles.txt
--- linux-2.5.64-bk6/Documentation/kbuild/makefiles.txt	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/kbuild/makefiles.txt	Mon Mar 31 12:29:48 2003
@@ -561,7 +561,7 @@
 
 Usually kbuild descends down in subdirectories due to "obj-* := dir/",
 but in the architecture makefiles where the kbuild infrastructure
-is not sufficent this sometimes needs to be explicit.
+is not sufficient this sometimes needs to be explicit.
 
 	Example:
 		#arch/i386/boot/Makefile
diff -urN linux-2.5.64-bk6/Documentation/kernel-doc-nano-HOWTO.txt linux-2.5.64-bk7/Documentation/kernel-doc-nano-HOWTO.txt
--- linux-2.5.64-bk6/Documentation/kernel-doc-nano-HOWTO.txt	Tue Mar  4 19:29:18 2003
+++ linux-2.5.64-bk7/Documentation/kernel-doc-nano-HOWTO.txt	Mon Mar 31 12:29:48 2003
@@ -21,7 +21,7 @@
 
   This is a program for converting SGML template files into SGML
   files. When a file is referenced it is searched for symbols
-  exported (EXPORT_SYMBOL), to be able to distingush between internal
+  exported (EXPORT_SYMBOL), to be able to distinguish between internal
   and external functions.
   It invokes kernel-doc, giving it the list of functions that
   are to be documented.
diff -urN linux-2.5.64-bk6/Documentation/kernel-docs.txt linux-2.5.64-bk7/Documentation/kernel-docs.txt
--- linux-2.5.64-bk6/Documentation/kernel-docs.txt	Tue Mar  4 19:29:24 2003
+++ linux-2.5.64-bk7/Documentation/kernel-docs.txt	Mon Mar 31 12:29:48 2003
@@ -488,7 +488,7 @@
        memory allocation.
        Description: Article written for people wishing to make their data
        acquisition boards work on their GNU/Linux machines. Gives a basic
-       overview on writting drivers, from the naming of functions to
+       overview on writing drivers, from the naming of functions to
        interrupt handling.
        Notes: Two-parts article. Part II is at
        http://www.ednmag.com/ednmag/reg/2000/07062000/14df.htm
diff -urN linux-2.5.64-bk6/Documentation/kobject.txt linux-2.5.64-bk7/Documentation/kobject.txt
--- linux-2.5.64-bk6/Documentation/kobject.txt	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/Documentation/kobject.txt	Mon Mar 31 12:29:48 2003
@@ -7,7 +7,7 @@
 
 0. Introduction
 
-The kobject infrastructure performs basic object managment that larger
+The kobject infrastructure performs basic object management that larger
 data structures and subsystems can leverage, rather than reimplement
 similar functionality. This functionality consists primarily concerns:
 
diff -urN linux-2.5.64-bk6/Documentation/magic-number.txt linux-2.5.64-bk7/Documentation/magic-number.txt
--- linux-2.5.64-bk6/Documentation/magic-number.txt	Tue Mar  4 19:29:23 2003
+++ linux-2.5.64-bk7/Documentation/magic-number.txt	Mon Mar 31 12:29:48 2003
@@ -146,7 +146,7 @@
 NMI_MAGIC             0x48414d4d455201 nmi_s        include/asm-mips64/sn/nmi.h
 
 Note that there are also defined special per-driver magic numbers in sound
-memory managment. See include/sound/sndmagic.h for complete list of them. Many
+memory management. See include/sound/sndmagic.h for complete list of them. Many
 OSS sound drivers have their magic numbers constructed from the soundcard PCI
 ID - these are not listed here as well.
 
diff -urN linux-2.5.64-bk6/Documentation/networking/3c359.txt linux-2.5.64-bk7/Documentation/networking/3c359.txt
--- linux-2.5.64-bk6/Documentation/networking/3c359.txt	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/networking/3c359.txt	Mon Mar 31 12:29:48 2003
@@ -41,7 +41,7 @@
 message_level: Controls level of messages created by the driver. Defaults to 0:
 which only displays start-up and critical messages.  Presently any non-zero 
 value will display all soft messages as well.  NB This does not turn 
-debuging messages on, that must be done by modified the source code.
+debugging messages on, that must be done by modified the source code.
 
 Variable MTU size:
 
diff -urN linux-2.5.64-bk6/Documentation/networking/3c509.txt linux-2.5.64-bk7/Documentation/networking/3c509.txt
--- linux-2.5.64-bk6/Documentation/networking/3c509.txt	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/Documentation/networking/3c509.txt	Mon Mar 31 12:29:48 2003
@@ -106,7 +106,7 @@
 8  transceiver type and duplex mode taken from card's EEPROM config settings
 12 10baseT (RJ-45 connector); force full-duplex mode
 
-Prior to driver version 1.18c, only tranceiver codes 0-4 were supported. Note
+Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note
 that the new transceiver codes 8 and 12 are the *only* ones that will enable
 full-duplex mode, no matter what the card's detected EEPROM settings might be.
 This insured that merely upgrading the driver from an earlier version would
@@ -146,7 +146,7 @@
 Tx Carrier Errors Reported in /proc/net/dev 
 If an EtherLink III appears to transmit packets, but the "Tx carrier errors"
 field in /proc/net/dev increments as quickly as the Tx packet count, you
-likely have an unterminated network or the incorrect media tranceiver selected. 
+likely have an unterminated network or the incorrect media transceiver selected. 
 
 3c509B card is not detected on machines with an ISA PnP BIOS. 
 While the updated driver works with most PnP BIOS programs, it does not work
diff -urN linux-2.5.64-bk6/Documentation/networking/NAPI_HOWTO.txt linux-2.5.64-bk7/Documentation/networking/NAPI_HOWTO.txt
--- linux-2.5.64-bk6/Documentation/networking/NAPI_HOWTO.txt	Tue Mar  4 19:29:22 2003
+++ linux-2.5.64-bk7/Documentation/networking/NAPI_HOWTO.txt	Mon Mar 31 12:29:48 2003
@@ -85,7 +85,7 @@
 	In this case your only choice is to move all to dev->poll()
 
 	II) Clear-on-write (COW)
-	 i) you clear the status by writting a 1 in the bit-location you want.
+	 i) you clear the status by writing a 1 in the bit-location you want.
 		These are the majority of the NICs and work the best with NAPI.
 		Put only receive events in dev->poll(); leave the rest in
 		the old interrupt handler.
@@ -200,7 +200,7 @@
 /* two new additions */
 /* first register my poll method */
 dev->poll = my_poll;
-/* next register my weight/quanta; can be overriden in /proc */
+/* next register my weight/quanta; can be overridden in /proc */
 dev->weight = 16;
 .
 .
@@ -346,10 +346,10 @@
 netif_rx_schedule_prep() returns 1 if device is in running state and
 gets successfully added to the core poll list. If we get a zero value
 we can _almost_ assume are already added to the list (instead of not running. 
-Logic based on the fact that you shouldnt get interrupt if not running)
+Logic based on the fact that you shouldn't get interrupt if not running)
 We rectify this by disabling rx and rxnobuf interrupts.
 
-II) that receive_packets(dev) and make_rx_buffs_avail() may have dissapeared.
+II) that receive_packets(dev) and make_rx_buffs_avail() may have disappeared.
 These functionalities are still around actually......
 
 infact, receive_packets(dev) is very close to my_poll() and 
@@ -442,7 +442,7 @@
 	int rx_work_limit = dev->quota;
 
 /************************ end note note *********************************/		
-    do {  // outer beggining loop starts here
+    do {  // outer beginning loop starts here
 
 	clear_rx_status_register_bit();
 
diff -urN linux-2.5.64-bk6/Documentation/networking/bonding.txt linux-2.5.64-bk7/Documentation/networking/bonding.txt
--- linux-2.5.64-bk6/Documentation/networking/bonding.txt	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/Documentation/networking/bonding.txt	Mon Mar 31 12:29:48 2003
@@ -304,7 +304,7 @@
 Configuring Multiple ARP Targets
 ================================
 
-While ARP monitoring can be done with just one target, it can be usefull
+While ARP monitoring can be done with just one target, it can be useful
 in a High Availability setup to have several targets to monitor. In the
 case of just one target,  the target itself may go down or have a problem
 making it unresponsive to ARP requests. Having an additional target (or
diff -urN linux-2.5.64-bk6/Documentation/networking/ifenslave.c linux-2.5.64-bk7/Documentation/networking/ifenslave.c
--- linux-2.5.64-bk6/Documentation/networking/ifenslave.c	Tue Mar  4 19:29:01 2003
+++ linux-2.5.64-bk7/Documentation/networking/ifenslave.c	Mon Mar 31 12:29:48 2003
@@ -540,7 +540,7 @@
 
 static short mif_flags;
 
-/* Get the inteface configuration from the kernel. */
+/* Get the interface configuration from the kernel. */
 static int if_getconfig(char *ifname)
 {
 	struct ifreq ifr;
diff -urN linux-2.5.64-bk6/Documentation/networking/sis900.txt linux-2.5.64-bk7/Documentation/networking/sis900.txt
--- linux-2.5.64-bk6/Documentation/networking/sis900.txt	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/Documentation/networking/sis900.txt	Mon Mar 31 12:29:48 2003
@@ -243,7 +243,7 @@
 Chapter 7. Revision History
 
      * November 13, 2000, Revision 1.07, seventh release, 630E problem
-       fixed and furthur clean up.
+       fixed and further clean up.
      * November 4, 1999, Revision 1.06, Second release, lots of clean up
        and optimization.
      * August 8, 1999, Revision 1.05, Initial Public Release
diff -urN linux-2.5.64-bk6/Documentation/networking/sk98lin.txt linux-2.5.64-bk7/Documentation/networking/sk98lin.txt
--- linux-2.5.64-bk6/Documentation/networking/sk98lin.txt	Tue Mar  4 19:29:30 2003
+++ linux-2.5.64-bk7/Documentation/networking/sk98lin.txt	Mon Mar 31 12:29:48 2003
@@ -138,7 +138,7 @@
 options sk98lin ...
 
 For "...", use the same syntax as described below for the command
-line paramaters of modprobe.
+line parameters of modprobe.
 You either have to reboot your computer or unload and reload
 the driver to activate the new parameters.
 The syntax of the driver parameters is:
@@ -276,7 +276,7 @@
 
 Large frames (also called jumbo frames) are now supported by the
 driver. This can result in a greatly improved throughput if
-transfering large amounts of data.
+transferring large amounts of data.
 To enable large frames, set the MTU (maximum transfer unit)
 of the interface to the value you wish (up to 9000). The command
 for this is:
@@ -489,7 +489,7 @@
   established (#10402)
 - Installation problems with RedHat 6.0 (#10409)
 New Features:
-- Connection state ouput at "network connection up"
+- Connection state output at "network connection up"
 Known limitations:
 - None
 
diff -urN linux-2.5.64-bk6/Documentation/networking/tuntap.txt linux-2.5.64-bk7/Documentation/networking/tuntap.txt
--- linux-2.5.64-bk6/Documentation/networking/tuntap.txt	Tue Mar  4 19:29:17 2003
+++ linux-2.5.64-bk7/Documentation/networking/tuntap.txt	Mon Mar 31 12:29:48 2003
@@ -40,7 +40,7 @@
   
   Set permissions:
      e.g. chmod 0700 /dev/net/tun
-     if you want the device only accesible by root. Giving regular users the
+     if you want the device only accessible by root. Giving regular users the
      right to assign network devices is NOT a good idea. Users could assign
      bogus network interfaces to trick firewalls or administrators.
 
diff -urN linux-2.5.64-bk6/Documentation/networking/wan-router.txt linux-2.5.64-bk7/Documentation/networking/wan-router.txt
--- linux-2.5.64-bk6/Documentation/networking/wan-router.txt	Tue Mar  4 19:29:00 2003
+++ linux-2.5.64-bk7/Documentation/networking/wan-router.txt	Mon Mar 31 12:29:48 2003
@@ -577,7 +577,7 @@
 bata2-2.2.1	Feb 20 2001
 
 			o Bug fixes to the CHDLC device drivers.
-				The driver had compilation problmes under kernels
+				The driver had compilation problems under kernels
 				2.2.14 or lower.
 
 			o Bug fixes to the Setup installation script.
diff -urN linux-2.5.64-bk6/Documentation/networking/wanpipe.txt linux-2.5.64-bk7/Documentation/networking/wanpipe.txt
--- linux-2.5.64-bk6/Documentation/networking/wanpipe.txt	Tue Mar  4 19:29:02 2003
+++ linux-2.5.64-bk7/Documentation/networking/wanpipe.txt	Mon Mar 31 12:29:48 2003
@@ -577,7 +577,7 @@
 bata2-2.2.1	Feb 20 2001
 
 			o Bug fixes to the CHDLC device drivers.
-				The driver had compilation problmes under kernels
+				The driver had compilation problems under kernels
 				2.2.14 or lower.
 
 			o Bug fixes to the Setup installation script.
diff -urN linux-2.5.64-bk6/Documentation/oops-tracing.txt linux-2.5.64-bk7/Documentation/oops-tracing.txt
--- linux-2.5.64-bk6/Documentation/oops-tracing.txt	Tue Mar  4 19:29:03 2003
+++ linux-2.5.64-bk7/Documentation/oops-tracing.txt	Mon Mar 31 12:29:48 2003
@@ -219,7 +219,7 @@
   2: 'F' if any module was force loaded by insmod -f, ' ' if all
      modules were loaded normally.
 
-  3: 'S' if the oops occured on an SMP kernel running on hardware that
+  3: 'S' if the oops occurred on an SMP kernel running on hardware that
       hasn't been certified as safe to run multiprocessor.
 	  Currently this occurs only on various Athlons that are not
 	  SMP capable.
diff -urN linux-2.5.64-bk6/Documentation/pnp.txt linux-2.5.64-bk7/Documentation/pnp.txt
--- linux-2.5.64-bk6/Documentation/pnp.txt	Tue Mar  4 19:28:59 2003
+++ linux-2.5.64-bk7/Documentation/pnp.txt	Mon Mar 31 12:29:48 2003
@@ -96,7 +96,7 @@
 	All Plug and Play drivers, protocols, and services meet at a central location 
 called the Plug and Play Layer.  This layer is responsible for the exchange of 
 information between PnP drivers and PnP protocols.  Thus it automatically 
-forwards commands to the proper protocol.  This makes writting PnP drivers 
+forwards commands to the proper protocol.  This makes writing PnP drivers 
 significantly easier.
 
 The following functions are available from the Plug and Play Layer:
diff -urN linux-2.5.64-bk6/Documentation/s390/Debugging390.txt linux-2.5.64-bk7/Documentation/s390/Debugging390.txt
--- linux-2.5.64-bk6/Documentation/s390/Debugging390.txt	Tue Mar  4 19:29:02 2003
+++ linux-2.5.64-bk7/Documentation/s390/Debugging390.txt	Mon Mar 31 12:29:48 2003
@@ -52,7 +52,7 @@
  
 16  General propose registers, 32 bit on s/390 64 bit on z/Architecture, r0-r15 or gpr0-gpr15 used for arithmetic & addressing. 
 
-16 Control registers, 32 bit on s/390 64 bit on z/Architecture, ( cr0-cr15 kernel usage only ) used for memory managment,
+16 Control registers, 32 bit on s/390 64 bit on z/Architecture, ( cr0-cr15 kernel usage only ) used for memory management,
 interrupt control,debugging control etc.
 
 16 Access registers ( ar0-ar15 ) 32 bit on s/390 & z/Architecture
@@ -243,7 +243,7 @@
 spaces for the user & kernel.
 
 This means we can support 2GB of non Extended RAM on s/390, & more
-with the Extended memory managment swap device & 
+with the Extended memory management swap device & 
 currently 4TB of physical memory currently on z/Architecture.
 
 
@@ -385,7 +385,7 @@
 of extra space on the callers stack which is obviously freed
 up on function exit ( e.g. the caller may choose to allocate nothing
 of a buffer of 4k if required for temporary purposes ), it generates 
-very efficent code ( a few cycles  ) when compared to alternatives 
+very efficient code ( a few cycles  ) when compared to alternatives 
 like malloc.
 
 automatics: These are local variables on the stack,
@@ -1091,7 +1091,7 @@
 The VM Debugger is case insensitive.
 
 VM's strengths are usually other debuggers weaknesses you can get at any resource
-no matter how sensitive e.g. memory managment resources,change address translation
+no matter how sensitive e.g. memory management resources,change address translation
 in the PSW. For kernel hacking you will reap dividends if you get good at it.
 
 The VM Debugger displays operators but not operands, probably because some
@@ -1194,7 +1194,7 @@
 Displaying & modifying Registers
 --------------------------------
 D G will display all the gprs
-Adding a extra G to all the commands is neccessary to access the full 64 bit 
+Adding a extra G to all the commands is necessary to access the full 64 bit 
 content in VM on z/Architecture obviously this isn't required for access registers
 as these are still 32 bit.
 e.g. DGG instead of DG 
@@ -1280,7 +1280,7 @@
 
 Tracing particular processes
 ----------------------------
-The kernels text segment is intentionally at an address in memory that it will
+The kernel's text segment is intentionally at an address in memory that it will
 very seldom collide with text segments of user programs ( thanks Martin ),
 this simplifies debugging the kernel.
 However it is quite common for user processes to have addresses which collide
@@ -1425,7 +1425,7 @@
 shutdown -h now or halt.
 do a Q CPUS to find out how many cpus you have
 detach each one of them from cp except cpu 0 
-by issueing a 
+by issuing a 
 DETACH CPU 01-(number of cpus in configuration)
 & boot linux again.
 TR SIGP will trace inter processor signal processor instructions.
@@ -1671,7 +1671,7 @@
 ( & many other instructions ) they consist of a length field & an absolute address field.
 For each IO typically get 1 or 2 interrupts one for channel end ( primary status ) when the
 channel is idle & the second for device end ( secondary status ) sometimes you get both
-concurrently, you check how the IO went on by issueing a TEST SUBCHANNEL at each interrupt,
+concurrently, you check how the IO went on by issuing a TEST SUBCHANNEL at each interrupt,
 from which you receive an Interruption response block (IRB). If you get channel & device end 
 status in the IRB without channel checks etc. your IO probably went okay. If you didn't you
 probably need a doctorto examine the IRB & extended status word etc.
@@ -2153,14 +2153,14 @@
 current working directory.
 This is very useful in that a customer can mail a core dump to a technical support department
 & the technical support department can reconstruct what happened.
-Provided the have an indentical copy of this program with debugging symbols compiled in & 
+Provided the have an identical copy of this program with debugging symbols compiled in & 
 the source base of this build is available.
 In short it is far more useful than something like a crash log could ever hope to be.
 
 In theory all that is missing to restart a core dumped program is a kernel patch which
 will do the following.
 1) Make a new kernel task structure
-2) Reload all the dumped pages back into the kernels memory managment structures.
+2) Reload all the dumped pages back into the kernel's memory management structures.
 3) Do the required clock fixups
 4) Get all files & network connections for the process back into an identical state ( really difficult ).
 5) A few more difficult things I haven't thought of.
@@ -2374,7 +2374,7 @@
 e.g. 
 to switch on the lcs "debug feature"
 echo 5 > /proc/s390dbf/lcs/level
-& then after the error occured.
+& then after the error occurred.
 cat /proc/s390dbf/lcs/sprintf >/logfile
 the logfile now contains some information which may help
 tech support resolve a problem in the field.
@@ -2462,9 +2462,9 @@
 SGI's lcrash tool which allows one to look at kernel structures in a
 running kernel.
 
-It also complements a tool called dumptool which dumps all the kernels
+It also complements a tool called dumptool which dumps all the kernel's
 memory pages & registers to either a tape or a disk.
-This can be used by tech support or an ambitous end user do
+This can be used by tech support or an ambitious end user do
 post mortem debugging of a machine like gdb core dumps.
 
 Going into how to use this tool in detail will be explained
diff -urN linux-2.5.64-bk6/Documentation/s390/cds.txt linux-2.5.64-bk7/Documentation/s390/cds.txt
--- linux-2.5.64-bk6/Documentation/s390/cds.txt	Tue Mar  4 19:29:33 2003
+++ linux-2.5.64-bk7/Documentation/s390/cds.txt	Mon Mar 31 12:29:48 2003
@@ -214,7 +214,7 @@
 cdev   - the ccw_device the data is requested for.
 buffer - Pointer to a buffer pointer. The read_conf_data() routine
          will allocate a buffer and initialize the buffer pointer
-         accordingly. It's the device driver's responsability to
+         accordingly. It's the device driver's responsibility to
          release the kernel memory if no longer needed. 
 length - Length of the buffer allocated and retrieved.
 lpm    - Logical path mask to be used for retrieving the data. If
@@ -224,7 +224,7 @@
           0 - Successful completion
 -ENODEV     - cdev invalid.
 -EINVAL     - An invalid parameter was detected, or the function was called early.
--EIO        - An irrecoverable I/O error occured or the device is
+-EIO        - An irrecoverable I/O error occurred or the device is
               not operational.
 -ENOMEM     - The read_conf_data() routine couldn't obtain storage.
 -EOPNOTSUPP - The device doesn't support the read configuration 
@@ -428,7 +428,7 @@
 can handle lost data on the network to allow for enhanced I/O processing.
 
 Unless the channel subsystem at any time presents a secondary status interrupt,
-exploiting this feature will cause only primary status interrups to be
+exploiting this feature will cause only primary status interrupts to be
 presented to the device driver while overlapping I/O is performed. When a
 secondary status without error (alert status) is presented, this indicates
 successful completion for all overlapping ccw_device_start() requests that have
diff -urN linux-2.5.64-bk6/Documentation/s390/driver-model.txt linux-2.5.64-bk7/Documentation/s390/driver-model.txt
--- linux-2.5.64-bk6/Documentation/s390/driver-model.txt	Tue Mar  4 19:28:53 2003
+++ linux-2.5.64-bk7/Documentation/s390/driver-model.txt	Mon Mar 31 12:29:48 2003
@@ -53,7 +53,7 @@
 
 a. Each driver can provide one or more parameter interfaces where parameters can
    be specified. These interfaces are also in the driver's responsibility.
-b. After a. has been performed, if neccessary, the device is finally brought up
+b. After a. has been performed, if necessary, the device is finally brought up
    via the 'online' interface.
 
 
@@ -145,7 +145,7 @@
 
 
 The handler field of the struct ccw_device is meant to be set to the interrupt
-handler for the device. In order to accomodate drivers which use several 
+handler for the device. In order to accommodate drivers which use several 
 distinct handlers (e.g. multi subchannel devices), this is a member of ccw_device
 instead of ccw_driver.
 The handler is registered with the common layer during set_online() processing
diff -urN linux-2.5.64-bk6/Documentation/scsi/ChangeLog.ncr53c8xx linux-2.5.64-bk7/Documentation/scsi/ChangeLog.ncr53c8xx
--- linux-2.5.64-bk6/Documentation/scsi/ChangeLog.ncr53c8xx	Tue Mar  4 19:29:31 2003
+++ linux-2.5.64-bk7/Documentation/scsi/ChangeLog.ncr53c8xx	Mon Mar 31 12:29:48 2003
@@ -247,7 +247,7 @@
 	- Add the 53c876 description to the chip table. This is only useful 
 	  for printing the right name of the controller.
 	- DEL-441 Item 2 work-around for the 53c876 rev <= 5 (0x15).
-	- Add additionnal checking of INQUIRY data:
+	- Add additional checking of INQUIRY data:
 	  Check INQUIRY data received length is at least 7. Byte 7 of 
 	  inquiry data contains device features bits and the driver might 
 	  be confused by garbage. Also check peripheral qualifier.
@@ -420,7 +420,7 @@
 	- Split DATA_IN and DATA_OUT scripts into 2 sub-scripts.
 	  64 segments are moved from on-chip RAM scripts.
 	  If more segments, a script in main memory is used for the 
-	  additionnal segments.
+	  additional segments.
 	- Since the SCRIPTS processor continues SCRIPTS execution after 
 	  having won arbitration, do some stuff prior to testing any SCSI 
 	  phase on reselection. This should have the vertue to process 
@@ -475,7 +475,7 @@
         ------------------------------
 	- Use FAST-5 instead of SLOW for slow scsi devices according to 
 	  new SPI-2 draft.
-	- Make some changes in order to accomodate with 875 rev <= 3 
+	- Make some changes in order to accommodate with 875 rev <= 3 
 	  device errata listing 397. Minor consequences are:
 	  . Leave use of PCI Write and Invalidate under user control.
 	    Now, by default the driver does not enable PCI MWI and option
diff -urN linux-2.5.64-bk6/Documentation/scsi/ChangeLog.sym53c8xx linux-2.5.64-bk7/Documentation/scsi/ChangeLog.sym53c8xx
--- linux-2.5.64-bk6/Documentation/scsi/ChangeLog.sym53c8xx	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/scsi/ChangeLog.sym53c8xx	Mon Mar 31 12:29:48 2003
@@ -15,7 +15,7 @@
 	- In ncr_soft_reset(), only try to ABORT the current operation 
 	  for chips that support SRUN bit in ISTAT1 and if SCRIPTS are 
 	  currently running, as 896 and 1010 manuals suggest.
-	- In the CCB abort path, donnot assume that the CCB is currently 
+	- In the CCB abort path, do not assume that the CCB is currently 
 	  queued to SCRIPTS. This is not always true, notably after a 
 	  QUEUE FULL status or when using untagged commands.
 
@@ -562,7 +562,7 @@
 	* version pre-sym53c8xx-0.10
 	- Add the 53c876 description to the chip table. This is only useful 
 	  for printing the right name of the controller.
-	- Add additionnal checking of INQUIRY data:
+	- Add additional checking of INQUIRY data:
 	  Check INQUIRY data received length is at least 7. Byte 7 of 
 	  inquiry data contains device features bits and the driver might 
 	  be confused by garbage. Also check peripheral qualifier.
diff -urN linux-2.5.64-bk6/Documentation/scsi/ChangeLog.sym53c8xx_2 linux-2.5.64-bk7/Documentation/scsi/ChangeLog.sym53c8xx_2
--- linux-2.5.64-bk6/Documentation/scsi/ChangeLog.sym53c8xx_2	Tue Mar  4 19:29:17 2003
+++ linux-2.5.64-bk7/Documentation/scsi/ChangeLog.sym53c8xx_2	Mon Mar 31 12:29:48 2003
@@ -32,7 +32,7 @@
 	  missing free of this memory on instance detach.
 	- Check against GPIO3 pulled low for HVD controllers (driver did 
 	  just the opposite).
-	  Misdetection of BUS mode was triggerred on module reload only, 
+	  Misdetection of BUS mode was triggered on module reload only, 
 	  since BIOS settings were trusted instead on first load.
 
 Wed Feb 7 21:00 2001 Gerard Roudier 
@@ -71,7 +71,7 @@
 	  #LUN <= 7.
 	- Set busy_itl in LCB to 1 if the LCB is allocated and a 
 	  SCSI command is active. This is a simplification.
-	- In sym_hcb_free(), donnot scan the free_ccbq if no CCBs 
+	- In sym_hcb_free(), do not scan the free_ccbq if no CCBs 
 	  has been allocated. This fixes a panic if attach failed.
 	- Add DT/ST (double/simple transition) in the transfer 
 	  negotiation announce.
diff -urN linux-2.5.64-bk6/Documentation/scsi/dpti.txt linux-2.5.64-bk7/Documentation/scsi/dpti.txt
--- linux-2.5.64-bk6/Documentation/scsi/dpti.txt	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/scsi/dpti.txt	Mon Mar 31 12:29:48 2003
@@ -75,7 +75,7 @@
  * to the board.  
  *
  * The files dpti_ioctl.h dptsig.h osd_defs.h osd_util.h sys_info.h are part of the
- * interface files for Adaptecs managment routines.  These define the structures used
+ * interface files for Adaptec's management routines.  These define the structures used
  * in the ioctls.  They are written to be portable.  They are hard to read, but I need
  * to use them 'as is' or I can miss changes in the interface.
  *
diff -urN linux-2.5.64-bk6/Documentation/scsi/ibmmca.txt linux-2.5.64-bk7/Documentation/scsi/ibmmca.txt
--- linux-2.5.64-bk6/Documentation/scsi/ibmmca.txt	Tue Mar  4 19:29:31 2003
+++ linux-2.5.64-bk7/Documentation/scsi/ibmmca.txt	Mon Mar 31 12:29:48 2003
@@ -810,9 +810,9 @@
       commandline parameter is added, called 'activity'.
    2) Added the READ_CONTROL bit for test_unit_ready SCSI-command.
    3) Added some suppress_exception bits to read_device_capacity and
-      all device_inquiry occurences in the driver code.
+      all device_inquiry occurrences in the driver code.
    4) Complaints about the various KERNEL_VERSION implementations are
-      taken into account. Every local_LinuxKernelVersion occurence is
+      taken into account. Every local_LinuxKernelVersion occurrence is
       now replaced by KERNEL_VERSION, defined in linux/version.h. 
       Corresponding changes were applied to ibmmca.h, too. This was a
       contribution to all kernel-parts by Philipp Hahn.
@@ -866,7 +866,7 @@
    2) Adapter-information and autoadaption to address-space is done.
    3) Auto-probing for maximum synchronous SCSI transfer rate is working.
    4) Optimization to some embedded function calls is applied.
-   5) Added some comment for the user to wait for SCSI-devices beeing probed.
+   5) Added some comment for the user to wait for SCSI-devices being probed.
    6) Finished version 3.2 for Kernel 2.4.0. It least, I thought it is but...
    - Michael Lang
    
@@ -966,7 +966,7 @@
 		                ------DA
 				
 		    where '-' stays dark, 'D' shows the SCSI-device id
-		    and 'A' shows the SCSI hostindex, beeing currently 
+		    and 'A' shows the SCSI hostindex, being currently 
 		    accessed. During boottime, this will give the message
 		    
 		                SCSIini*
@@ -1091,7 +1091,7 @@
 	now. Normally you really won't need to activate this flag in the
 	kernel configuration, as all post 1989 SCSI-devices should accept
 	the reset-signal, when the computer is switched on. The SCSI-
-	subsystem generates this reset while beeing initialized. This flag
+	subsystem generates this reset while being initialized. This flag
 	is really reserved for users with very old, very strange or self-made
 	SCSI-devices.
      Q: Why is the SCSI-order of my drives mirrored to the device-order
diff -urN linux-2.5.64-bk6/Documentation/scsi/ncr53c8xx.txt linux-2.5.64-bk7/Documentation/scsi/ncr53c8xx.txt
--- linux-2.5.64-bk6/Documentation/scsi/ncr53c8xx.txt	Tue Mar  4 19:28:53 2003
+++ linux-2.5.64-bk7/Documentation/scsi/ncr53c8xx.txt	Mon Mar 31 12:29:48 2003
@@ -238,7 +238,7 @@
 optimizations based on actual head positions and its mechanical 
 characteristics. This feature may also reduce average command latency.
 In order to really gain advantage of this feature, devices must have 
-a reasonnable cache size (No miracle is to be expected for a low-end 
+a reasonable cache size (No miracle is to be expected for a low-end 
 hard disk with 128 KB or less).
 Some kown SCSI devices do not properly support tagged command queuing.
 Generally, firmware revisions that fix this kind of problems are available 
@@ -592,7 +592,7 @@
     Some SCSI-2 devices do not report this feature in byte 7 of inquiry 
     response but do support it properly (TAMARACK scanners for example).
 
-CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT   (default and only reasonnable answer: n)
+CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT   (default and only reasonable answer: n)
     If you suspect a device of yours does not properly support disconnections,
     you can answer "y". Then, all SCSI devices will never disconnect the bus 
     even while performing long SCSI operations.
@@ -827,7 +827,7 @@
 
     Available option bits:
         0x0:   No check.
-        0x1:   Check and donnot attach the controller on error.  
+        0x1:   Check and do not attach the controller on error.  
         0x2:   Check and just warn on error.
         0x4:   Disable SCSI bus integrity checking.
 
@@ -850,7 +850,7 @@
 
 10.2.22 Enable use of IMMEDIATE ARBITRATION
         (only supported by the sym53c8xx driver. See 10.7 for more details)
-        iarb:0    donnot use this feature.
+        iarb:0    do not use this feature.
         iarb:#x   use this feature according to bit fields as follow:
 
     bit 0 (1) : enable IARB each time the initiator has been reselected 
@@ -880,7 +880,7 @@
   settle time			10 seconds		settle:10
   differential support		from BIOS settings	diff:1
   irq mode			from BIOS settings	irqm:1
-  SCSI BUS check		donnot attach on error	buschk:1
+  SCSI BUS check		do not attach on error	buschk:1
   immediate arbitration		disabled		iarb:0
 
 10.3 Advised boot setup commands
@@ -1272,7 +1272,7 @@
 - terminations at both end of the SCSI chain
 - linux syslog messages (some of them may help you)
 
-If you donnot find the source of problems, you can configure the
+If you do not find the source of problems, you can configure the
 driver with no features enabled.
 
 - only asynchronous data transfers
@@ -1345,14 +1345,14 @@
 Field C : SIST io register (SCSI Interrupt Status)
   Bit 0x08 : SGE  SCSI GROSS ERROR
              Indicates that the chip detected a severe error condition 
-             on the SCSI BUS that prevents the SCSI protocol from functionning
+             on the SCSI BUS that prevents the SCSI protocol from functioning
              properly.
-  Bit 0x04 : UDC  Undexpected Disconnection
+  Bit 0x04 : UDC  Unexpected Disconnection
              Indicates that the device released the SCSI BUS when the chip 
              was not expecting this to happen. A device may behave so to 
              indicate the SCSI initiator that an error condition not reportable              using the SCSI protocol has occurred.
   Bit 0x02 : RST  SCSI BUS Reset
-             Generally SCSI targets donnot reset the SCSI BUS, although any 
+             Generally SCSI targets do not reset the SCSI BUS, although any 
              device on the BUS can reset it at any time.
   Bit 0x01 : PAR  Parity
              SCSI parity error detected.
diff -urN linux-2.5.64-bk6/Documentation/scsi/sym53c8xx_2.txt linux-2.5.64-bk7/Documentation/scsi/sym53c8xx_2.txt
--- linux-2.5.64-bk6/Documentation/scsi/sym53c8xx_2.txt	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/Documentation/scsi/sym53c8xx_2.txt	Mon Mar 31 12:29:48 2003
@@ -205,7 +205,7 @@
 optimizations based on actual head positions and its mechanical 
 characteristics. This feature may also reduce average command latency.
 In order to really gain advantage of this feature, devices must have 
-a reasonnable cache size (No miracle is to be expected for a low-end 
+a reasonable cache size (No miracle is to be expected for a low-end 
 hard disk with 128 KB or less).
 Some kown old SCSI devices do not properly support tagged command queuing.
 Generally, firmware revisions that fix this kind of problems are available 
@@ -579,7 +579,7 @@
 
     Available option bits:
         0x0:   No check.
-        0x1:   Check and donnot attach the controller on error.  
+        0x1:   Check and do not attach the controller on error.  
         0x2:   Check and just warn on error.
 
 10.2.16 Exclude a host from being attached
@@ -698,7 +698,7 @@
 - terminations at both end of the SCSI chain
 - linux syslog messages (some of them may help you)
 
-If you donnot find the source of problems, you can configure the
+If you do not find the source of problems, you can configure the
 driver or devices in the NVRAM with minimal features.
 
 - only asynchronous data transfers
@@ -756,14 +756,14 @@
 Field C : SIST io register (SCSI Interrupt Status)
   Bit 0x08 : SGE  SCSI GROSS ERROR
              Indicates that the chip detected a severe error condition 
-             on the SCSI BUS that prevents the SCSI protocol from functionning
+             on the SCSI BUS that prevents the SCSI protocol from functioning
              properly.
-  Bit 0x04 : UDC  Undexpected Disconnection
+  Bit 0x04 : UDC  Unexpected Disconnection
              Indicates that the device released the SCSI BUS when the chip 
              was not expecting this to happen. A device may behave so to 
-             indicate the SCSI initiator that an error condition not reportable              using the SCSI protocol has occured.
+             indicate the SCSI initiator that an error condition not reportable              using the SCSI protocol has occurred.
   Bit 0x02 : RST  SCSI BUS Reset
-             Generally SCSI targets donnot reset the SCSI BUS, although any 
+             Generally SCSI targets do not reset the SCSI BUS, although any 
              device on the BUS can reset it at any time.
   Bit 0x01 : PAR  Parity
              SCSI parity error detected.
diff -urN linux-2.5.64-bk6/Documentation/sonypi.txt linux-2.5.64-bk7/Documentation/sonypi.txt
--- linux-2.5.64-bk6/Documentation/sonypi.txt	Tue Mar  4 19:28:53 2003
+++ linux-2.5.64-bk7/Documentation/sonypi.txt	Mon Mar 31 12:29:48 2003
@@ -130,7 +130,7 @@
 	  tested) when using the driver with the fnkeyinit parameter. I cannot
 	  reproduce it on my laptop and not all users have this problem.
 	  This happens because the fnkeyinit parameter enables the ACPI 
-	  mode (but without additionnal ACPI control, like processor 
+	  mode (but without additional ACPI control, like processor 
 	  speed handling etc). Use ACPI instead of APM if it works on your
 	  laptop.
 	
diff -urN linux-2.5.64-bk6/Documentation/sound/alsa/ALSA-Configuration.txt linux-2.5.64-bk7/Documentation/sound/alsa/ALSA-Configuration.txt
--- linux-2.5.64-bk6/Documentation/sound/alsa/ALSA-Configuration.txt	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/Documentation/sound/alsa/ALSA-Configuration.txt	Mon Mar 31 12:29:48 2003
@@ -659,7 +659,7 @@
     Module supports autoprobe and multiple chips (max 8).
     Note: on some notebooks the buffer address cannot be detected
     automatically, or causes hang-up during initialization.
-    In such a case, specify the buffer top address explicity via
+    In such a case, specify the buffer top address explicitly via
     buffer_top option.
     For example,
       Sony F250: buffer_top=0x25a800
diff -urN linux-2.5.64-bk6/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl linux-2.5.64-bk7/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
--- linux-2.5.64-bk6/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl	Mon Mar 31 12:29:48 2003
@@ -2807,7 +2807,7 @@
         </para>
 
         <para>
-          If you aquire a spinlock in the interrupt handler, and the
+          If you acquire a spinlock in the interrupt handler, and the
         lock is used in other pcm callbacks, too, then you have to
         release the lock before calling
         <function>snd_pcm_period_elapsed()</function>, because
diff -urN linux-2.5.64-bk6/Documentation/sound/oss/NEWS linux-2.5.64-bk7/Documentation/sound/oss/NEWS
--- linux-2.5.64-bk6/Documentation/sound/oss/NEWS	Tue Mar  4 19:29:33 2003
+++ linux-2.5.64-bk7/Documentation/sound/oss/NEWS	Mon Mar 31 12:29:48 2003
@@ -19,7 +19,7 @@
 
 Before Linux 2.4 you had to specify the resources for sounddrivers
 statically linked into the kernel at compile time
-(in make config/menuconfig/xconfig). In Linux 2.4 the ressources are
+(in make config/menuconfig/xconfig). In Linux 2.4 the resources are
 now specified at the boot-time kernel commandline (e.g. the lilo
 'append=' line or everything that's after the kernel name in grub).
 Read the Configure.help entry for your card for the parameters.
diff -urN linux-2.5.64-bk6/Documentation/sound/oss/PSS-updates linux-2.5.64-bk7/Documentation/sound/oss/PSS-updates
--- linux-2.5.64-bk6/Documentation/sound/oss/PSS-updates	Tue Mar  4 19:29:54 2003
+++ linux-2.5.64-bk7/Documentation/sound/oss/PSS-updates	Mon Mar 31 12:29:48 2003
@@ -22,12 +22,12 @@
 	This parameter takes a port address as its parameter.  Any available port 
 address can be specified to enable the CDROM port, except for 0x0 and -1 as 
 these values would leave the port disabled.  Like the joystick port, the cdrom 
-port will require that an appropiate CDROM driver be loaded before you can make 
+port will require that an appropriate CDROM driver be loaded before you can make 
 use of the newly enabled CDROM port.  Like the joystick port option above, 
 remember to load the CDROM driver AFTER the pss sound driver.  While it may 
 differ on some PSS sound cards, all the PSS sound cards that I have seen have a 
 builtin Wearnes CDROM port.  If this is the case with your PSS sound card you 
-should load aztcd with the appropiate port option that matches the port you 
+should load aztcd with the appropriate port option that matches the port you 
 assigned to the CDROM port when you loaded your pss sound driver.  (ex. 
 modprobe pss pss_cdrom_port=0x340 && modprobe aztcd aztcd=0x340)  The default 
 setting of this parameter leaves the CDROM port disabled to maintain full 
@@ -44,7 +44,7 @@
 value will only attept to configure the CDROM and joystick ports.  This 
 parameter can be used by a user who only wished to use the builtin joystick 
 and/or CDROM port(s) of his PSS sound card.  If this driver is loaded with this 
-parameter and with the paramter below set to true then a user can safely unload 
+parameter and with the parameter below set to true then a user can safely unload 
 this driver with the following command "rmmod pss && rmmod ad1848 && rmmod 
 mpu401 && rmmod sound && rmmod soundcore" and retain the full functionality of 
 his CDROM and/or joystick port(s) while gaining back the memory previously used 
diff -urN linux-2.5.64-bk6/Documentation/sound/oss/cs46xx linux-2.5.64-bk7/Documentation/sound/oss/cs46xx
--- linux-2.5.64-bk6/Documentation/sound/oss/cs46xx	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/Documentation/sound/oss/cs46xx	Mon Mar 31 12:29:48 2003
@@ -78,7 +78,7 @@
 driver to disable compilation of the CS_DBGOUT print statements:
 #define CSDEBUG 1
  
-Please see the defintions for cs_debuglevel and cs_debugmask for additional
+Please see the definitions for cs_debuglevel and cs_debugmask for additional
 information on the debug levels and sections.
 
 There is also a csdbg executable to allow runtime manipulation of these 
diff -urN linux-2.5.64-bk6/Documentation/specialix.txt linux-2.5.64-bk7/Documentation/specialix.txt
--- linux-2.5.64-bk6/Documentation/specialix.txt	Tue Mar  4 19:29:02 2003
+++ linux-2.5.64-bk7/Documentation/specialix.txt	Mon Mar 31 12:29:48 2003
@@ -326,7 +326,7 @@
 
 
   Fixed bugs and restrictions:
-       - During intialization, interrupts are blindly turned on.
+       - During initialization, interrupts are blindly turned on.
             Having a shadow variable would cause an extra memory
             access on every IO instruction. 
        - The interrupt (on the card) should be disabled when we
diff -urN linux-2.5.64-bk6/Documentation/swsusp.txt linux-2.5.64-bk7/Documentation/swsusp.txt
--- linux-2.5.64-bk6/Documentation/swsusp.txt	Tue Mar  4 19:28:53 2003
+++ linux-2.5.64-bk7/Documentation/swsusp.txt	Mon Mar 31 12:29:48 2003
@@ -90,7 +90,7 @@
 function do_software_suspend, it is called. Here we shrink everything including
 dcache, inodes, buffers and memory (here mainly processes are swapped out). We
 count how many pages we need to duplicate (we have to be atomical!) then we
-create an appropiate sized page directory. It will point to the original and
+create an appropriate sized page directory. It will point to the original and
 the new (copied) address of the page. We get the free pages by
 __get_free_pages() but since it changes state we have to be able to track it
 later so it also flips in a bit in page's flags (a new Nosave flag). We
diff -urN linux-2.5.64-bk6/Documentation/uml/UserModeLinux-HOWTO.txt linux-2.5.64-bk7/Documentation/uml/UserModeLinux-HOWTO.txt
--- linux-2.5.64-bk6/Documentation/uml/UserModeLinux-HOWTO.txt	Tue Mar  4 19:29:03 2003
+++ linux-2.5.64-bk7/Documentation/uml/UserModeLinux-HOWTO.txt	Mon Mar 31 12:29:48 2003
@@ -2509,7 +2509,7 @@
   1100..88..  ssttoopp
 
   This puts the UML in a loop reading mconsole requests until a 'go'
-  mconsole command is recieved. This is very useful for making backups
+  mconsole command is received. This is very useful for making backups
   of UML filesystems, as the UML can be stopped, then synced via 'sysrq
   s', so that everything is written to the filesystem. You can then copy
   the filesystem and then send the UML 'go' via mconsole.
diff -urN linux-2.5.64-bk6/Documentation/usb/URB.txt linux-2.5.64-bk7/Documentation/usb/URB.txt
--- linux-2.5.64-bk6/Documentation/usb/URB.txt	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/Documentation/usb/URB.txt	Mon Mar 31 12:29:48 2003
@@ -86,7 +86,7 @@
 
 Return value is a pointer to the allocated URB, 0 if allocation failed.
 The parameter isoframes specifies the number of isochronous transfer frames
-you want to schedule. For CTRL/BULK/INT, use 0.  The mem_flags paramter
+you want to schedule. For CTRL/BULK/INT, use 0.  The mem_flags parameter
 holds standard memory allocation flags, letting you control (among other
 things) whether the underlying code may block or not.
 
diff -urN linux-2.5.64-bk6/Documentation/usb/hiddev.txt linux-2.5.64-bk7/Documentation/usb/hiddev.txt
--- linux-2.5.64-bk6/Documentation/usb/hiddev.txt	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/Documentation/usb/hiddev.txt	Mon Mar 31 12:29:48 2003
@@ -173,7 +173,7 @@
 usage to be retrieved can be specified as above, or the user can
 choose to fill in the report_type field and specify the report_id as
 HID_REPORT_ID_UNKNOWN. In this case, the hiddev_usage_ref will be
-filled in with the report and field infomation associated with this
+filled in with the report and field information associated with this
 usage if it is found. 
 
 HIDIOCSUSAGE - struct hiddev_usage_ref (write)
diff -urN linux-2.5.64-bk6/Documentation/usb/philips.txt linux-2.5.64-bk7/Documentation/usb/philips.txt
--- linux-2.5.64-bk6/Documentation/usb/philips.txt	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/Documentation/usb/philips.txt	Mon Mar 31 12:29:48 2003
@@ -27,9 +27,9 @@
    Specifies the desired framerate. Is an integer in the range of 4-30.
 
 fbufs
-   This paramter specifies the number of internal buffers to use for storing 
+   This parameter specifies the number of internal buffers to use for storing 
    frames from the cam. This will help if the process that reads images from 
-   the cam is a bit slow or momentarely busy. However, on slow machines it 
+   the cam is a bit slow or momentarily busy. However, on slow machines it
    only introduces lag, so choose carefully. The default is 3, which is 
    reasonable. You can set it between 2 and 5.
 
diff -urN linux-2.5.64-bk6/Documentation/usb/scanner.txt linux-2.5.64-bk7/Documentation/usb/scanner.txt
--- linux-2.5.64-bk6/Documentation/usb/scanner.txt	Tue Mar  4 19:29:54 2003
+++ linux-2.5.64-bk7/Documentation/usb/scanner.txt	Mon Mar 31 12:29:48 2003
@@ -282,7 +282,7 @@
 	}
 
 	if((fpout=fopen("out.dat", "w+")) == NULL) {
-		perror("Unable to open ouput file");
+		perror("Unable to open output file");
 		exit(1);
 	}
 
diff -urN linux-2.5.64-bk6/Documentation/video4linux/bttv/Sound-FAQ linux-2.5.64-bk7/Documentation/video4linux/bttv/Sound-FAQ
--- linux-2.5.64-bk6/Documentation/video4linux/bttv/Sound-FAQ	Tue Mar  4 19:29:56 2003
+++ linux-2.5.64-bk7/Documentation/video4linux/bttv/Sound-FAQ	Mon Mar 31 12:29:48 2003
@@ -15,18 +15,18 @@
 
 	bttv0: model: BT848(Hauppauge old) [autodetected]
 
-You should verify this is correct.  If it is'nt, you have to pass the
+You should verify this is correct.  If it isn't, you have to pass the
 correct board type as insmod argument, "insmod bttv card=2" for
 example.  The file CARDLIST has a list of valid arguments for card.
-If your card is'nt listed there, you might check the source code for
-new entries which are not listed yet.  If there is'nt one for your
+If your card isn't listed there, you might check the source code for
+new entries which are not listed yet.  If there isn't one for your
 card, you can check if one of the existing entries does work for you
 (just trial and error...).
 
 Some boards have an extra processor for sound to do stereo decoding
 and other nice features.  The msp34xx chips are used by Hauppauge for
 example.  If your board has one, you might have to load a helper
-module like msp3400.o to make sound work.  If there is'nt one for the
+module like msp3400.o to make sound work.  If there isn't one for the
 chip used on your board:  Bad luck.  Start writing a new one.  Well,
 you might want to check the video4linux mailing list archive first...
 
diff -urN linux-2.5.64-bk6/Documentation/video4linux/zr36120.txt linux-2.5.64-bk7/Documentation/video4linux/zr36120.txt
--- linux-2.5.64-bk6/Documentation/video4linux/zr36120.txt	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/Documentation/video4linux/zr36120.txt	Mon Mar 31 12:29:48 2003
@@ -146,10 +146,10 @@
 The consequence is that, when loading the driver as a module,
 the module may tell you it's out of memory, but 'free' says
 otherwise. The reason is simple; the modules wants its memory
-contingious, not fragmented, and after a long uptime there
+contiguous, not fragmented, and after a long uptime there
 probably isn't a fragment of memory large enough...
 
-The driver uses a double buffering scheme, which should realy
+The driver uses a double buffering scheme, which should really
 be an n-way buffer, depending on the size of allocated framebuffer
 and the requested grab-size/format.
 This current version also fixes a dead-lock situation during irq
diff -urN linux-2.5.64-bk6/Documentation/vm/hugetlbpage.txt linux-2.5.64-bk7/Documentation/vm/hugetlbpage.txt
--- linux-2.5.64-bk6/Documentation/vm/hugetlbpage.txt	Tue Mar  4 19:28:59 2003
+++ linux-2.5.64-bk7/Documentation/vm/hugetlbpage.txt	Mon Mar 31 12:29:48 2003
@@ -69,7 +69,7 @@
 
 	mount none /mnt/huge -t hugetlbfs
 
-This commands mounts a (psuedo) filesystem of type hugetlbfs on the directory
+This command mounts a (pseudo) filesystem of type hugetlbfs on the directory
 /mnt/huge.  Any files created on /mnt/huge uses hugepages.  An example is
 given at the end of this document.
 
diff -urN linux-2.5.64-bk6/Makefile linux-2.5.64-bk7/Makefile
--- linux-2.5.64-bk6/Makefile	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/Makefile	Mon Mar 31 12:29:48 2003
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 64
-EXTRAVERSION = bk6
+EXTRAVERSION = -bk7
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
diff -urN linux-2.5.64-bk6/arch/i386/kernel/cpu/cpufreq/powernow-k7.c linux-2.5.64-bk7/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
--- linux-2.5.64-bk6/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	Mon Mar 31 12:29:48 2003
@@ -239,12 +239,17 @@
 		__asm__("\tcli\n");
 	rdmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
 	fidvidctl.bits.SGTC = latency;	/* Stop grant timeout counter */
+
 	fidvidctl.bits.FID = fid;
-	fidvidctl.bits.VID = vid;
-	/* Note, we could set these lazily. Ie, only do voltage transition
-	   if its changed since last time (Some speeds have the same voltage) */
 	fidvidctl.bits.FIDC = 1;
-	fidvidctl.bits.VIDC = 1;
+
+	/* Set the voltage lazily. Ie, only do voltage transition
+	   if its changed since last time (Some speeds have the same voltage) */
+	if (fidvidctl.bits.VID != vid) {
+		fidvidctl.bits.VID = vid;
+		fidvidctl.bits.VIDC = 1;
+	}
+
 	wrmsrl (MSR_K7_FID_VID_CTL, fidvidctl.val);
 	if (have_a0 == 1)
 		__asm__("\tsti\n");
diff -urN linux-2.5.64-bk6/arch/i386/kernel/microcode.c linux-2.5.64-bk7/arch/i386/kernel/microcode.c
--- linux-2.5.64-bk6/arch/i386/kernel/microcode.c	Tue Mar  4 19:29:03 2003
+++ linux-2.5.64-bk7/arch/i386/kernel/microcode.c	Mon Mar 31 12:29:48 2003
@@ -372,7 +372,6 @@
 		ret = (ssize_t)len;
 	}
 out_fsize:
-	devfs_set_file_size(devfs_handle, mc_fsize);
 	vfree(microcode);
 out_unlock:
 	up_write(&microcode_rwsem);
@@ -388,7 +387,6 @@
 			if (mc_applied) {
 				int bytes = NR_CPUS * sizeof(struct microcode);
 
-				devfs_set_file_size(devfs_handle, 0);
 				kfree(mc_applied);
 				mc_applied = NULL;
 				printk(KERN_INFO "microcode: freed %d bytes\n", bytes);
diff -urN linux-2.5.64-bk6/arch/m68knommu/Kconfig linux-2.5.64-bk7/arch/m68knommu/Kconfig
--- linux-2.5.64-bk6/arch/m68knommu/Kconfig	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/m68knommu/Kconfig	Mon Mar 31 12:29:48 2003
@@ -102,7 +102,7 @@
 	  really need to know, so you can select the AUTO option. On some
 	  boards you need to know the real clock frequency to determine other
 	  system timing (for example baud rate dividors, etc). Some processors
-	  have an internal PLL and you can seletc a frequency to set that too.
+	  have an internal PLL and you can select a frequency to run at.
 	  You need to know a little about the internals of your processor to
 	  set this. If in doubt choose the AUTO option.
 
@@ -675,11 +675,12 @@
 config MAGIC_SYSRQ
 	bool "Magic SysRq key"
 	help
-	  Enables console device to interprent special characters as
+	  Enables console device to interpret special characters as
 	  commands to dump state information.
 
 config HIGHPROFILE
 	bool "Use fast second timer for profiling"
+	depends on COLDFIRE
 	help
 	  Use a fast secondary clock to produce profiling information.
 
@@ -699,7 +700,7 @@
 	bool "Disable BDM signals"
 	depends on (EXPERIMENTAL && COLDFIRE)
 	help
-	  Disable the CPU's BDM signals.
+	  Disable the ColdFire CPU's BDM signals.
 
 endmenu
 
diff -urN linux-2.5.64-bk6/arch/m68knommu/kernel/comempci.c linux-2.5.64-bk7/arch/m68knommu/kernel/comempci.c
--- linux-2.5.64-bk6/arch/m68knommu/kernel/comempci.c	Tue Mar  4 19:29:19 2003
+++ linux-2.5.64-bk7/arch/m68knommu/kernel/comempci.c	Mon Mar 31 12:29:48 2003
@@ -3,7 +3,7 @@
 /*
  *	comemlite.c -- PCI access code for embedded CO-MEM Lite PCI controller.
  *
- *	(C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com).
+ *	(C) Copyright 1999-2003, Greg Ungerer (gerg@snapgear.com).
  *	(C) Copyright 2000, Lineo (www.lineo.com)
  */
 
@@ -60,8 +60,8 @@
  *	really assign any resources we like to devices, as long as
  *	they do not clash with other PCI devices.
  */
-unsigned int	pci_iobase = 0x100;		/* Arbitary start address */
-unsigned int	pci_membase = 0x00010000;	/* Arbitary start address */
+unsigned int	pci_iobase = PCIBIOS_MIN_IO;	/* Arbitary start address */
+unsigned int	pci_membase = PCIBIOS_MIN_MEM;	/* Arbitary start address */
 
 #define	PCI_MINIO	0x100			/* 256 byte minimum I/O */
 #define	PCI_MINMEM	0x00010000		/* 64k minimum chunk */
@@ -75,7 +75,7 @@
 
 /*****************************************************************************/
 
-void 		pci_interrupt(int irq, void *id, struct pt_regs *fp);
+void	pci_interrupt(int irq, void *id, struct pt_regs *fp);
 
 /*****************************************************************************/
 
@@ -105,7 +105,7 @@
 
 /*****************************************************************************/
 
-int pcibios_assignres(int slot)
+int pcibios_assign_resource_slot(int slot)
 {
 	volatile unsigned long	*rp;
 	volatile unsigned char	*ip;
@@ -113,7 +113,7 @@
 	int			bar;
 
 #ifdef DEBUGPCI
-	printk("pcibios_assignres(slot=%x)\n", slot);
+	printk("pcibios_assign_resource_slot(slot=%x)\n", slot);
 #endif
 
 	rp = (volatile unsigned long *) COMEM_BASE;
@@ -224,7 +224,7 @@
 
 /*****************************************************************************/
 
-int pcibios_enable(int slot)
+int pcibios_enable_slot(int slot)
 {
 	volatile unsigned long	*rp;
 	volatile unsigned short	*wp;
@@ -232,7 +232,7 @@
 	unsigned short		cmd;
 
 #ifdef DEBUGPCI
-	printk("pcibios_enbale(slot=%x)\n", slot);
+	printk("pcibios_enbale_slot(slot=%x)\n", slot);
 #endif
 
 	rp = (volatile unsigned long *) COMEM_BASE;
@@ -256,7 +256,34 @@
 
 /*****************************************************************************/
 
-unsigned long pcibios_init(unsigned long mem_start, unsigned long mem_end)
+void pcibios_assign_resources(void)
+{
+	volatile unsigned long	*rp;
+	unsigned long		sel, id;
+	int			slot;
+
+	rp = (volatile unsigned long *) COMEM_BASE;
+
+	/*
+	 *	Do a quick scan of the PCI bus and see what is here.
+	 */
+	for (slot = COMEM_MINDEV; (slot <= COMEM_MAXDEV); slot++) {
+		sel = COMEM_DA_CFGRD | COMEM_DA_ADDR(0x1 << (slot + 16));
+		rp[LREG(COMEM_DAHBASE)] = sel;
+		rp[LREG(COMEM_PCIBUS)] = 0; /* Clear bus */
+		id = rp[LREG(COMEM_PCIBUS)];
+		if ((id != 0) && ((id & 0xffff0000) != (sel & 0xffff0000))) {
+			printk("PCI: slot=%d id=%08x\n", slot, (int) id);
+			pci_slotmask |= 0x1 << slot;
+			pcibios_assign_resource_slot(slot);
+			pcibios_enable_slot(slot);
+		}
+	}
+}
+
+/*****************************************************************************/
+
+int pcibios_init(void)
 {
 	volatile unsigned long	*rp;
 	unsigned long		sel, id;
@@ -276,7 +303,7 @@
 	rp = (volatile unsigned long *) COMEM_BASE;
 	if ((rp[LREG(COMEM_LBUSCFG)] & 0xff) != 0x50) {
 		printk("PCI: no PCI bus present\n");
-		return(mem_start);
+		return(0);
 	}
 
 #ifdef COMEM_BRIDGEDEV
@@ -291,34 +318,18 @@
 	id = rp[LREG(COMEM_PCIBUS)];
 	if ((id == 0) || ((id & 0xffff0000) == (sel & 0xffff0000))) {
 		printk("PCI: no PCI bus bridge present\n");
-		return(mem_start);
+		return(0);
 	}
 
 	printk("PCI: bridge device at slot=%d id=%08x\n", slot, (int) id);
 	pci_slotmask |= 0x1 << slot;
 	pci_shmemaddr = pci_membase;
-	pcibios_assignres(slot);
-	pcibios_enable(slot);
+	pcibios_assign_resource_slot(slot);
+	pcibios_enable_slot(slot);
 #endif
 
 	pci_bus_is_present = 1;
 
-	/*
-	 *	Do a quick scan of the PCI bus and see what is here.
-	 */
-	for (slot = COMEM_MINDEV; (slot <= COMEM_MAXDEV); slot++) {
-		sel = COMEM_DA_CFGRD | COMEM_DA_ADDR(0x1 << (slot + 16));
-		rp[LREG(COMEM_DAHBASE)] = sel;
-		rp[LREG(COMEM_PCIBUS)] = 0; /* Clear bus */
-		id = rp[LREG(COMEM_PCIBUS)];
-		if ((id != 0) && ((id & 0xffff0000) != (sel & 0xffff0000))) {
-			printk("PCI: slot=%d id=%08x\n", slot, (int) id);
-			pci_slotmask |= 0x1 << slot;
-			pcibios_assignres(slot);
-			pcibios_enable(slot);
-		}
-	}
-
 	/* Get PCI irq for local vectoring */
 	if (request_irq(COMEM_IRQ, pci_interrupt, 0, "PCI bridge", NULL)) {
 		printk("PCI: failed to acquire interrupt %d\n", COMEM_IRQ);
@@ -326,18 +337,55 @@
 		mcf_autovector(COMEM_IRQ);
 	}
 
-	return(mem_start);
+	pcibios_assign_resources();
+
+	return(0);
 }
 
 /*****************************************************************************/
 
-unsigned long pcibios_fixup(unsigned long mem_start, unsigned long mem_end)
+char *pcibios_setup(char *option)
+{
+	/* Nothing for us to handle. */
+	return(option);
+}
+/*****************************************************************************/
+
+struct pci_fixup pcibios_fixups[] = { { 0 } };
+
+void pcibios_fixup_bus(struct pci_bus *b)
 {
-	return(mem_start);
 }
 
 /*****************************************************************************/
 
+void pcibios_align_resource(void *data, struct resource *res, unsigned long size, unsigned long align)
+{
+}
+
+/*****************************************************************************/
+
+int pcibios_enable_device(struct pci_dev *dev, int mask)
+{
+	int slot;
+
+	slot = PCI_SLOT(dev->devfn);
+	if ((dev->bus == 0) && (pci_slotmask & (1 << slot)))
+		pcibios_enable_slot(slot);
+	return(0);
+}
+
+/*****************************************************************************/
+
+void pcibios_update_resource(struct pci_dev *dev, struct resource *root, struct resource *r, int resource)
+{
+	printk("%s(%d): no support for changing PCI resources...\n",
+		__FILE__, __LINE__);
+}
+
+
+/*****************************************************************************/
+
 /*
  *	Local routines to interrcept the standard I/O and vector handling
  *	code. Don't include this 'till now - initialization code above needs
@@ -921,3 +969,23 @@
 }
 
 /*****************************************************************************/
+
+void *pci_alloc_consistent(struct pci_dev *dev, size_t size, dma_addr_t *dma_addr)
+{
+	void *mp;
+	if ((mp = pci_bmalloc(size)) != NULL) {
+		dma_addr = mp - (COMEM_BASE + COMEM_SHMEM);
+		return(mp);
+	}
+	*dma_addr = (dma_addr_t) NULL;
+	return(NULL);
+}
+
+/*****************************************************************************/
+
+void pci_free_consistent(struct pci_dev *dev, size_t size, void *cpu_addr, dma_addr_t dma_addr)
+{
+	pci_bmfree(cpu_addr, size);
+}
+
+/*****************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/kernel/entry.S linux-2.5.64-bk7/arch/m68knommu/kernel/entry.S
--- linux-2.5.64-bk6/arch/m68knommu/kernel/entry.S	Tue Mar  4 19:29:18 2003
+++ linux-2.5.64-bk7/arch/m68knommu/kernel/entry.S	Mon Mar 31 12:29:48 2003
@@ -84,6 +84,9 @@
 	jmp	schedule
 
 ENTRY(ret_from_fork)
+	movel	%d1,%sp@-
+	jsr	schedule_tail
+	addql	#4,%sp
 	jra	ret_from_exception
 
 ENTRY(sys_fork)
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5206/config.c linux-2.5.64-bk7/arch/m68knommu/platform/5206/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/5206/config.c	Tue Mar  4 19:29:23 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5206/config.c	Mon Mar 31 12:29:48 2003
@@ -25,6 +25,14 @@
 
 /***************************************************************************/
 
+void coldfire_tick(void);
+void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+unsigned long coldfire_timer_offset(void);
+void coldfire_trap_init(void);
+void coldfire_reset(void);
+
+/***************************************************************************/
+
 /*
  *	DMA channel base address table.
  */
@@ -33,47 +41,8 @@
         MCF_MBAR + MCFDMA_BASE1,
 };
 
-unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
-
-/***************************************************************************/
-
-void coldfire_tick(void)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-}
-
-/***************************************************************************/
-
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *))
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	/* Set up TIMER 1 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / HZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER1ICR);
-
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL5 | MCFSIM_ICR_PRI3;
-	request_irq(29, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER1);
-}
-
 /***************************************************************************/
 
-/*
- *	Program the vector to be an auto-vectored.
- */
-
 void mcf_autovector(unsigned int vec)
 {
 	volatile unsigned char  *mbar;
@@ -91,65 +60,35 @@
 
 /***************************************************************************/
 
-extern e_vector	*_ramvec;
-
-void set_evector(int vecnum, void (*handler)(void))
-{
-	if (vecnum >= 0 && vecnum <= 255)
-		_ramvec[vecnum] = handler;
-}
-
-/***************************************************************************/
-
-/* assembler routines */
-asmlinkage void buserr(void);
-asmlinkage void trap(void);
-asmlinkage void system_call(void);
-asmlinkage void inthandler(void);
-
-void coldfire_trap_init(void)
+void mcf_settimericr(unsigned int timer, unsigned int level)
 {
-	int i;
-
-#ifndef ENABLE_dBUG
-	mcf_setimr(MCFSIM_IMR_MASKALL);
-#endif
+	volatile unsigned char *icrp;
+	unsigned int icr, imr;
 
-	/*
-	 *	There is a common trap handler and common interrupt
-	 *	handler that handle almost every vector. We treat
-	 *	the system call and bus error special, they get their
-	 *	own first level handlers.
-	 */
-#ifndef ENABLE_dBUG
-	for (i = 3; (i <= 23); i++)
-		_ramvec[i] = trap;
-	for (i = 33; (i <= 63); i++)
-		_ramvec[i] = trap;
-#endif
-
-	for (i = 24; (i <= 30); i++)
-		_ramvec[i] = inthandler;
-#ifndef ENABLE_dBUG
-	_ramvec[31] = inthandler;  // Disables the IRQ7 button
-#endif
-
-	for (i = 64; (i < 255); i++)
-		_ramvec[i] = inthandler;
-	_ramvec[255] = 0;
-
-	_ramvec[2] = buserr;
-	_ramvec[32] = system_call;
+	if (timer <= 2) {
+		switch (timer) {
+		case 2:  icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break;
+		default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break;
+		}
+
+		icrp = (volatile unsigned char *) (MCF_MBAR + icr);
+		*icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
+		mcf_setimr(mcf_getimr() & ~imr);
+	}
 }
 
 /***************************************************************************/
 
 void config_BSP(char *commandp, int size)
 {
+	mcf_setimr(MCFSIM_IMR_MASKALL);
 	memset(commandp, 0, size);
+
 	mach_sched_init = coldfire_timer_init;
 	mach_tick = coldfire_tick;
+	mach_gettimeoffset = coldfire_timer_offset;
 	mach_trap_init = coldfire_trap_init;
+	mach_reset = coldfire_reset;
 }
 
 /***************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5206e/config.c linux-2.5.64-bk7/arch/m68knommu/platform/5206e/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/5206e/config.c	Tue Mar  4 19:29:15 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5206e/config.c	Mon Mar 31 12:29:48 2003
@@ -20,17 +20,16 @@
 #include <asm/mcftimer.h>
 #include <asm/mcfsim.h>
 #include <asm/mcfdma.h>
-
-#ifdef CONFIG_NETtel
 #include <asm/irq.h>
 #include <asm/delay.h>
-#endif
 
 /***************************************************************************/
 
-#ifdef CONFIG_NETtel
-void	reset_setupbutton(void);
-#endif
+void coldfire_tick(void);
+void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+unsigned long coldfire_timer_offset(void);
+void coldfire_trap_init(void);
+void coldfire_reset(void);
 
 /***************************************************************************/
 
@@ -42,53 +41,8 @@
         MCF_MBAR + MCFDMA_BASE1,
 };
 
-unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
-
-/***************************************************************************/
-
-void coldfire_tick(void)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-}
-
 /***************************************************************************/
 
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *))
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	/* Set up TIMER 1 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / HZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER1ICR);
-
-#ifdef CONFIG_NETtel
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3;
-	request_irq(30, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-	reset_setupbutton();
-#else
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL5 | MCFSIM_ICR_PRI3;
-	request_irq(29, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-#endif
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER1);
-}
-
-/***************************************************************************/
-
-/*
- *	Program the vector to be an auto-vectored.
- */
-
 void mcf_autovector(unsigned int vec)
 {
 	volatile unsigned char  *mbar;
@@ -106,117 +60,29 @@
 
 /***************************************************************************/
 
-extern e_vector	*_ramvec;
-
-void set_evector(int vecnum, void (*handler)(void))
-{
-	if (vecnum >= 0 && vecnum <= 255)
-		_ramvec[vecnum] = handler;
-}
-
-/***************************************************************************/
-
-/* assembler routines */
-asmlinkage void buserr(void);
-asmlinkage void trap(void);
-asmlinkage void system_call(void);
-asmlinkage void inthandler(void);
-
-void coldfire_trap_init(void)
+void mcf_settimericr(unsigned int timer, unsigned int level)
 {
-	int i;
-#ifdef MCF_MEMORY_PROTECT
-	extern unsigned long _end;
-	extern unsigned long memory_end;
-#endif
-
-#ifndef ENABLE_dBUG
-	mcf_setimr(MCFSIM_IMR_MASKALL);
-#endif
-
-	/*
-	 *	There is a common trap handler and common interrupt
-	 *	handler that handle almost every vector. We treat
-	 *	the system call and bus error special, they get their
-	 *	own first level handlers.
-	 */
-#ifndef ENABLE_dBUG
-	for (i = 3; (i <= 23); i++)
-		_ramvec[i] = trap;
-	for (i = 33; (i <= 63); i++)
-		_ramvec[i] = trap;
-#endif
-
-	for (i = 24; (i <= 30); i++)
-		_ramvec[i] = inthandler;
-#ifndef ENABLE_dBUG
-	_ramvec[31] = inthandler;  // Disables the IRQ7 button
-#endif
-
-	for (i = 64; (i < 255); i++)
-		_ramvec[i] = inthandler;
-	_ramvec[255] = 0;
-
-	_ramvec[2] = buserr;
-	_ramvec[32] = system_call;
-}
-
-/***************************************************************************/
+	volatile unsigned char *icrp;
+	unsigned int icr, imr;
 
-#ifdef CONFIG_NETtel
-
-/*
- *	Routines to support the NETtel software reset button.
- */
-void reset_button(int irq, void *dev_id, struct pt_regs *regs)
-{
-	extern void	flash_eraseconfig(void);
-	static int	inbutton = 0;
-
-	/*
-	 *	IRQ7 is not maskable by the CPU core. It is possible
-	 *	that switch bounce may get us back here before we have
-	 *	really serviced the interrupt.
-	 */
-	if (inbutton)
-		return;
-	inbutton = 1;
-	/* Disable interrupt at SIM - best we can do... */
-	mcf_setimr(mcf_getimr() | MCFSIM_IMR_EINT7);
-	/* Try and de-bounce the switch a little... */
-	udelay(10000);
-
-	flash_eraseconfig();
-
-	/* Don't leave here 'till button is no longer pushed! */
-	for (;;) {
-		if ((mcf_getipr() & MCFSIM_IMR_EINT7) == 0)
-			break;
+	if (timer <= 2) {
+		switch (timer) {
+		case 2:  icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break;
+		default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break;
+		}
+
+		icrp = (volatile unsigned char *) (MCF_MBAR + icr);
+		*icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
+		mcf_setimr(mcf_getimr() & ~imr);
 	}
-
-	HARD_RESET_NOW();
-	/* Should never get here... */
-
-	inbutton = 0;
-	/* Interrupt service done, enable it again */
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_EINT7);
 }
 
 /***************************************************************************/
 
-void reset_setupbutton(void)
-{
-	mcf_autovector(31);
-	request_irq(31, reset_button, (SA_INTERRUPT | IRQ_FLG_FAST),
-		"Reset Button", NULL);
-}
-
-#endif /* CONFIG_NETtel */
-
-/***************************************************************************/
-
 void config_BSP(char *commandp, int size)
 {
+	mcf_setimr(MCFSIM_IMR_MASKALL);
+
 #ifdef CONFIG_NETtel
 	/* Copy command line from FLASH to local buffer... */
 	memcpy(commandp, (char *) 0xf0004000, size);
@@ -227,7 +93,9 @@
 
 	mach_sched_init = coldfire_timer_init;
 	mach_tick = coldfire_tick;
+	mach_gettimeoffset = coldfire_timer_offset;
 	mach_trap_init = coldfire_trap_init;
+	mach_reset = coldfire_reset;
 }
 
 /***************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5249/config.c linux-2.5.64-bk7/arch/m68knommu/platform/5249/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/5249/config.c	Tue Mar  4 19:29:22 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5249/config.c	Mon Mar 31 12:29:48 2003
@@ -25,7 +25,11 @@
 
 /***************************************************************************/
 
-void	coldfire_profile_init(void);
+void coldfire_tick(void);
+void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+unsigned long coldfire_timer_offset(void);
+void coldfire_trap_init(void);
+void coldfire_reset(void);
 
 /***************************************************************************/
 
@@ -39,105 +43,8 @@
         MCF_MBAR + MCFDMA_BASE3,
 };
 
-unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
-
-/***************************************************************************/
-
-void coldfire_tick(void)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-}
-
-/***************************************************************************/
-
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *))
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	/* Set up TIMER 1 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / HZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER1ICR);
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL5 | MCFSIM_ICR_PRI3;
-	request_irq(29, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-
-#ifdef CONFIG_HIGHPROFILE
-	coldfire_profile_init();
-#endif
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER1);
-}
-
-/***************************************************************************/
-#ifdef CONFIG_HIGHPROFILE
 /***************************************************************************/
 
-#define	PROFILEHZ	1013
-
-/*
- *	Use the other timer to provide high accuracy profiling info.
- */
-
-void coldfire_profile_tick(int irq, void *dummy, struct pt_regs *regs)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer2 */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE2);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-
-        if (!user_mode(regs)) {
-                if (prof_buffer && current->pid) {
-                        extern int _stext;
-                        unsigned long ip = instruction_pointer(regs);
-                        ip -= (unsigned long) &_stext;
-                        ip >>= prof_shift;
-                        if (ip < prof_len)
-                                prof_buffer[ip]++;
-                }
-        }
-}
-
-void coldfire_profile_init(void)
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	printk("PROFILE: lodging timer2=%d as profile timer\n", PROFILEHZ);
-
-	/* Set up TIMER 2 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE2);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / PROFILEHZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER2ICR);
-
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3;
-	request_irq(31, coldfire_profile_tick, (SA_INTERRUPT | IRQ_FLG_FAST),
-		"Profile Timer", NULL);
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER2);
-}
-
-/***************************************************************************/
-#endif	/* CONFIG_HIGHPROFILE */
-/***************************************************************************/
-
-/*
- *	Program the vector to be an auto-vectored.
- */
-
 void mcf_autovector(unsigned int vec)
 {
 	volatile unsigned char  *mbar;
@@ -152,78 +59,35 @@
 
 /***************************************************************************/
 
-extern e_vector	*_ramvec;
-
-void set_evector(int vecnum, void (*handler)(void))
-{
-	if (vecnum >= 0 && vecnum <= 255)
-		_ramvec[vecnum] = handler;
-}
-
-/***************************************************************************/
-
-/* assembler routines */
-asmlinkage void buserr(void);
-asmlinkage void trap(void);
-asmlinkage void system_call(void);
-asmlinkage void inthandler(void);
-
-void __init coldfire_trap_init(void)
+void mcf_settimericr(unsigned int timer, unsigned int level)
 {
-	int i;
+	volatile unsigned char *icrp;
+	unsigned int icr, imr;
 
-#ifndef ENABLE_dBUG
-	mcf_setimr(MCFSIM_IMR_MASKALL);
-#endif
-
-	/*
-	 *	There is a common trap handler and common interrupt
-	 *	handler that handle almost every vector. We treat
-	 *	the system call and bus error special, they get their
-	 *	own first level handlers.
-	 */
-#ifndef ENABLE_dBUG
-	for (i = 3; (i <= 23); i++)
-		_ramvec[i] = trap;
-	for (i = 33; (i <= 63); i++)
-		_ramvec[i] = trap;
-#endif
-
-	for (i = 24; (i <= 30); i++)
-		_ramvec[i] = inthandler;
-#ifndef ENABLE_dBUG
-	_ramvec[31] = inthandler;  // Disables the IRQ7 button
-#endif
-
-	for (i = 64; (i < 255); i++)
-		_ramvec[i] = inthandler;
-	_ramvec[255] = 0;
-
-	_ramvec[2] = buserr;
-	_ramvec[32] = system_call;
+	if (timer <= 2) {
+		switch (timer) {
+		case 2:  icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break;
+		default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break;
+		}
+
+		icrp = (volatile unsigned char *) (MCF_MBAR + icr);
+		*icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
+		mcf_setimr(mcf_getimr() & ~imr);
+	}
 }
 
 /***************************************************************************/
 
 void config_BSP(char *commandp, int size)
 {
+	mcf_setimr(MCFSIM_IMR_MASKALL);
 	memset(commandp, 0, size);
 
 	mach_sched_init = coldfire_timer_init;
 	mach_tick = coldfire_tick;
+	mach_gettimeoffset = coldfire_timer_offset;
 	mach_trap_init = coldfire_trap_init;
+	mach_reset = coldfire_reset;
 }
 
 /***************************************************************************/
-#ifdef TRAP_DBG_INTERRUPT
-
-asmlinkage void dbginterrupt_c(struct frame *fp)
-{
-	extern void dump(struct pt_regs *fp);
-	printk("%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__);
-        dump((struct pt_regs *) fp);
-	asm("halt");
-}
-
-#endif
-/***************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5272/config.c linux-2.5.64-bk7/arch/m68knommu/platform/5272/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/5272/config.c	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5272/config.c	Mon Mar 31 12:29:48 2003
@@ -26,7 +26,15 @@
 
 /***************************************************************************/
 
-void	reset_setupbutton(void);
+void coldfire_tick(void);
+void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+unsigned long coldfire_timer_offset(void);
+void coldfire_trap_init(void);
+void coldfire_reset(void);
+
+extern unsigned int mcf_timervector;
+extern unsigned int mcf_profilevector;
+extern unsigned int mcf_timerlevel;
 
 /***************************************************************************/
 
@@ -37,50 +45,21 @@
         MCF_MBAR + MCFDMA_BASE0,
 };
 
-unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
-
 /***************************************************************************/
 
-void coldfire_tick(void)
+void mcf_disableall(void)
 {
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE4);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-}
-
-/***************************************************************************/
-
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *))
-{
-	volatile unsigned short	*timerp;
 	volatile unsigned long	*icrp;
 
-	/* Set up TIMER 4 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE4);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / HZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
 	icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
-	*icrp = 0x0000000d; /* TMR4 with priority 5 */
-	request_irq(72, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-
-#ifdef CONFIG_RESETSWITCH
-	/* This is not really the right place to do this... */
-	reset_setupbutton();
-#endif
+	icrp[0] = 0x88888888;
+	icrp[1] = 0x88888888;
+	icrp[2] = 0x88888888;
+	icrp[3] = 0x88888888;
 }
 
 /***************************************************************************/
 
-/*
- *	Program the vector to be an auto-vectored.
- */
-
 void mcf_autovector(unsigned int vec)
 {
 	/* Everything is auto-vectored on the 5272 */
@@ -88,68 +67,20 @@
 
 /***************************************************************************/
 
-extern e_vector	*_ramvec;
-
-void set_evector(int vecnum, void (*handler)(void))
+void mcf_settimericr(int timer, int level)
 {
-	if (vecnum >= 0 && vecnum <= 255)
-		_ramvec[vecnum] = handler;
-}
-
-/***************************************************************************/
-
-/* assembler routines */
-asmlinkage void buserr(void);
-asmlinkage void trap(void);
-asmlinkage void system_call(void);
-asmlinkage void inthandler(void);
-
-void coldfire_trap_init(void)
-{
-	int i;
-
-#ifndef ENABLE_dBUG
-	volatile unsigned long	*icrp;
-
-	icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
-	icrp[0] = 0x88888888;
-	icrp[1] = 0x88888888;
-	icrp[2] = 0x88888888;
-	icrp[3] = 0x88888888;
-#endif
-
-	/*
-	 *	There is a common trap handler and common interrupt
-	 *	handler that handle almost every vector. We treat
-	 *	the system call and bus error special, they get their
-	 *	own first level handlers.
-	 */
-#ifndef ENABLE_dBUG
-	for (i = 3; (i <= 23); i++)
-		_ramvec[i] = trap;
-	for (i = 33; (i <= 63); i++)
-		_ramvec[i] = trap;
-#endif
+	volatile unsigned long *icrp;
+	unsigned int icr;
 
-	for (i = 24; (i <= 30); i++)
-		_ramvec[i] = inthandler;
-#ifndef ENABLE_dBUG
-	_ramvec[31] = inthandler;  // Disables the IRQ7 button
-#endif
-
-	for (i = 64; (i < 255); i++)
-		_ramvec[i] = inthandler;
-	_ramvec[255] = 0;
-
-	_ramvec[2] = buserr;
-	_ramvec[32] = system_call;
-}
-
-/***************************************************************************/
+	switch (timer) {
+	case 2:  icr = MCFSIM_ICR2; break;
+	case 3:  icr = MCFSIM_ICR3; break;
+	case 4:  icr = MCFSIM_ICR4; break;
+	default: icr = MCFSIM_ICR1; break;
+	}
 
-void coldfire_reset(void)
-{
-	HARD_RESET_NOW();
+	icrp = (volatile unsigned long *) (MCF_MBAR + icr);
+	*icrp = (0x8 | level) << ((4 - timer) * 4);
 }
 
 /***************************************************************************/
@@ -164,8 +95,9 @@
 	*pivrp = 0x40;
 #endif
 
-#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
-    defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3)
+	mcf_disableall();
+
+#if defined(CONFIG_NETtel)
 	/* Copy command line from FLASH to local buffer... */
 	memcpy(commandp, (char *) 0xf0004000, size);
 	commandp[size-1] = 0;
@@ -177,71 +109,13 @@
 	memset(commandp, 0, size);
 #endif
 
+	mcf_timervector = 69;
+	mcf_profilevector = 70;
 	mach_sched_init = coldfire_timer_init;
 	mach_tick = coldfire_tick;
+	mach_gettimeoffset = coldfire_timer_offset;
 	mach_trap_init = coldfire_trap_init;
 	mach_reset = coldfire_reset;
 }
 
 /***************************************************************************/
-#ifdef CONFIG_RESETSWITCH
-/***************************************************************************/
-
-/*
- *	Routines to support the NETtel software reset button.
- */
-void reset_button(int irq, void *dev_id, struct pt_regs *regs)
-{
-	volatile unsigned long	*icrp, *isrp;
-	extern void		flash_eraseconfig(void);
-	static int		inbutton = 0;
-
-	/*
-	 *	IRQ7 is not maskable by the CPU core. It is possible
-	 *	that switch bounce mey get us back here before we have
-	 *	really serviced the interrupt.
-	 */
-	if (inbutton)
-		return;
-	inbutton = 1;
-
-	/* Disable interrupt at SIM - best we can do... */
-	icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
-	*icrp = (*icrp & 0x07777777) | 0x80000000;
-
-	/* Try and de-bounce the switch a little... */
-	udelay(10000);
-
-	flash_eraseconfig();
-
-	/* Don't leave here 'till button is no longer pushed! */
-	isrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ISR);
-	for (;;) {
-		if (*isrp & 0x80000000)
-			break;
-	}
-
-	HARD_RESET_NOW();
-	/* Should never get here... */
-
-	inbutton = 0;
-	/* Interrupt service done, acknowledge it */
-	icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
-	*icrp = (*icrp & 0x07777777) | 0xf0000000;
-}
-
-/***************************************************************************/
-
-void reset_setupbutton(void)
-{
-	volatile unsigned long	*icrp;
-
-	icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
-	*icrp = (*icrp & 0x07777777) | 0xf0000000;
-	request_irq(65, reset_button, (SA_INTERRUPT | IRQ_FLG_FAST),
-		"Reset Button", NULL);
-}
-
-/***************************************************************************/
-#endif /* CONFIG_RESETSWITCH */
-/***************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5307/Makefile linux-2.5.64-bk7/arch/m68knommu/platform/5307/Makefile
--- linux-2.5.64-bk6/arch/m68knommu/platform/5307/Makefile	Tue Mar  4 19:29:33 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5307/Makefile	Mon Mar 31 12:29:48 2003
@@ -16,7 +16,7 @@
 AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1
 endif
 
-obj-$(CONFIG_COLDFIRE)	+= entry.o
+obj-$(CONFIG_COLDFIRE)	+= entry.o timers.o vectors.o
 obj-$(CONFIG_M5307)	+= config.o
 
 ifeq ($(CONFIG_M5307),y)
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5307/config.c linux-2.5.64-bk7/arch/m68knommu/platform/5307/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/5307/config.c	Tue Mar  4 19:29:00 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5307/config.c	Mon Mar 31 12:29:48 2003
@@ -23,17 +23,19 @@
 #include <asm/mcfsim.h>
 #include <asm/mcfdma.h>
 #include <asm/delay.h>
-
-#if defined(CONFIG_eLIA)
-#include <asm/elia.h>
-#endif
-
 #include <asm/mcfwdebug.h>
 
 /***************************************************************************/
 
-void	reset_setupbutton(void);
-void	coldfire_profile_init(void);
+void coldfire_tick(void);
+void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+unsigned long coldfire_timer_offset(void);
+void coldfire_trap_init(void);
+void coldfire_reset(void);
+
+extern unsigned int mcf_timervector;
+extern unsigned int mcf_profilevector;
+extern unsigned int mcf_timerlevel;
 
 /***************************************************************************/
 
@@ -47,118 +49,8 @@
         MCF_MBAR + MCFDMA_BASE3,
 };
 
-unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
-
 /***************************************************************************/
 
-void coldfire_tick(void)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-}
-
-/***************************************************************************/
-
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *))
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	/* Set up TIMER 1 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / HZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER1ICR);
-
-#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
-		defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
-		defined(CONFIG_CLEOPATRA) 
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3;
-	request_irq(30, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-#else
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL5 | MCFSIM_ICR_PRI3;
-	request_irq(29, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-#endif
-
-#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
-		defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3)
-	/* This is not really the right place to do this... */
-	reset_setupbutton();
-#endif
-#ifdef CONFIG_HIGHPROFILE
-	coldfire_profile_init();
-#endif
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER1);
-}
-
-/***************************************************************************/
-#ifdef CONFIG_HIGHPROFILE
-/***************************************************************************/
-
-#define	PROFILEHZ	1013
-
-/*
- *	Use the other timer to provide high accuracy profiling info.
- */
-
-void coldfire_profile_tick(int irq, void *dummy, struct pt_regs *regs)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer2 */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE2);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-
-        if (!user_mode(regs)) {
-                if (prof_buffer && current->pid) {
-                        extern int _stext;
-                        unsigned long ip = instruction_pointer(regs);
-                        ip -= (unsigned long) &_stext;
-                        ip >>= prof_shift;
-                        if (ip < prof_len)
-                                prof_buffer[ip]++;
-                }
-        }
-}
-
-void coldfire_profile_init(void)
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	printk("PROFILE: lodging timer2=%d as profile timer\n", PROFILEHZ);
-
-	/* Set up TIMER 2 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE2);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / PROFILEHZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER2ICR);
-
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3;
-	request_irq(31, coldfire_profile_tick, (SA_INTERRUPT | IRQ_FLG_FAST),
-		"Profile Timer", NULL);
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER2);
-}
-
-/***************************************************************************/
-#endif	/* CONFIG_HIGHPROFILE */
-/***************************************************************************/
-
-/*
- *	Program the vector to be an auto-vectored.
- */
-
 void mcf_autovector(unsigned int vec)
 {
 	volatile unsigned char  *mbar;
@@ -173,165 +65,57 @@
 
 /***************************************************************************/
 
-extern e_vector	*_ramvec;
-
-void set_evector(int vecnum, void (*handler)(void))
-{
-	if (vecnum >= 0 && vecnum <= 255)
-		_ramvec[vecnum] = handler;
-}
-
-/***************************************************************************/
-
-/* assembler routines */
-asmlinkage void buserr(void);
-asmlinkage void trap(void);
-asmlinkage void system_call(void);
-asmlinkage void inthandler(void);
-
-#ifdef TRAP_DBG_INTERRUPT
-asmlinkage void dbginterrupt(void);
-#endif
-
-void __init coldfire_trap_init(void)
-{
-	int i;
-
-#ifndef ENABLE_dBUG
-	mcf_setimr(MCFSIM_IMR_MASKALL);
-#endif
-
-	/*
-	 *	There is a common trap handler and common interrupt
-	 *	handler that handle almost every vector. We treat
-	 *	the system call and bus error special, they get their
-	 *	own first level handlers.
-	 */
-#ifndef ENABLE_dBUG
-	for (i = 3; (i <= 23); i++)
-		_ramvec[i] = trap;
-	for (i = 33; (i <= 63); i++)
-		_ramvec[i] = trap;
-#endif
-#ifdef TRAP_DBG_INTERRUPT
-	_ramvec[12] = dbginterrupt;
-#endif
-
-	for (i = 24; (i <= 30); i++)
-		_ramvec[i] = inthandler;
-#ifndef ENABLE_dBUG
-	_ramvec[31] = inthandler;  // Disables the IRQ7 button
-#endif
-
-	for (i = 64; (i < 255); i++)
-		_ramvec[i] = inthandler;
-	_ramvec[255] = 0;
-
-	_ramvec[2] = buserr;
-	_ramvec[32] = system_call;
-#ifdef MCF_BDM_DISABLE
-	/* Disable the BDM clocking.  This also turns off most of the rest of
-	 * the BDM device.  This is good for EMC reasons.  This option is not
-	 * incompatible with the memory protection option.
-	 */
-	wdebug(MCFDEBUG_CSR, MCFDEBUG_CSR_PSTCLK);
-#endif
-
-}
-
-/***************************************************************************/
-
-#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
-	defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3)
-
-/*
- *	Routines to support the NETtel software reset button.
- */
-void reset_button(int irq, void *dev_id, struct pt_regs *regs)
+void mcf_settimericr(unsigned int timer, unsigned int level)
 {
-	extern void	flash_eraseconfig(void);
-	static int	inbutton = 0;
+	volatile unsigned char *icrp;
+	unsigned int icr, imr;
 
-	/*
-	 *	IRQ7 is not maskable by the CPU core. It is possible
-	 *	that switch bounce mey get us back here before we have
-	 *	really serviced the interrupt.
-	 */
-	if (inbutton)
-		return;
-	inbutton = 1;
-	/* Disable interrupt at SIM - best we can do... */
-	mcf_setimr(mcf_getimr() | MCFSIM_IMR_EINT7);
-	/* Try and de-bounce the switch a little... */
-	udelay(10000);
-
-	flash_eraseconfig();
-
-	/* Don't leave here 'till button is no longer pushed! */
-	for (;;) {
-		if ((mcf_getipr() & MCFSIM_IMR_EINT7) == 0)
-			break;
+	if (timer <= 2) {
+		switch (timer) {
+		case 2:  icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break;
+		default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break;
+		}
+
+		icrp = (volatile unsigned char *) (MCF_MBAR + icr);
+		*icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
+		mcf_setimr(mcf_getimr() & ~imr);
 	}
-
-	HARD_RESET_NOW();
-	/* Should never get here... */
-
-	inbutton = 0;
-	/* Interrupt service done, enable it again */
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_EINT7);
-}
-
-/***************************************************************************/
-
-void reset_setupbutton(void)
-{
-	volatile unsigned char	*mbar;
-
-	mbar = (volatile unsigned char *) MCF_MBAR;
-	*(mbar + MCFSIM_AVR) |= MCFSIM_IMR_EINT7;
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_EINT7);
-	request_irq(31, reset_button, (SA_INTERRUPT | IRQ_FLG_FAST),
-		"Reset Button", NULL);
-}
-
-#endif /* CONFIG_NETtel || CONFIG_eLIA || CONFIG_DISKtel || CONFIG_SECUREEDGEMP3 */
-
-/***************************************************************************/
-
-void coldfire_reset(void)
-{
-	HARD_RESET_NOW();
 }
 
 /***************************************************************************/
 
 void config_BSP(char *commandp, int size)
 {
+	mcf_setimr(MCFSIM_IMR_MASKALL);
+
 #if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
-    defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3)
+    defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
+    defined(CONFIG_CLEOPATRA)
 	/* Copy command line from FLASH to local buffer... */
 	memcpy(commandp, (char *) 0xf0004000, size);
 	commandp[size-1] = 0;
+	/* Different timer setup - to prevent device clash */
+	mcf_timervector = 30;
+	mcf_profilevector = 31;
+	mcf_timerlevel = 6;
 #else
 	memset(commandp, 0, size);
-#endif /* CONFIG_NETtel || CONFIG_eLIA || CONFIG_DISKtel || CONFIG_SECUREEDGEMP3 */
+#endif
 
 	mach_sched_init = coldfire_timer_init;
 	mach_tick = coldfire_tick;
+	mach_gettimeoffset = coldfire_timer_offset;
 	mach_trap_init = coldfire_trap_init;
 	mach_reset = coldfire_reset;
-}
 
-/***************************************************************************/
-#ifdef TRAP_DBG_INTERRUPT
-
-asmlinkage void dbginterrupt_c(struct frame *fp)
-{
-	extern void dump(struct pt_regs *fp);
-	printk("%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__);
-	dump((struct pt_regs *) fp);
-	asm("halt");
+#ifdef MCF_BDM_DISABLE
+	/*
+	 * Disable the BDM clocking.  This also turns off most of the rest of
+	 * the BDM device.  This is good for EMC reasons. This option is not
+	 * incompatible with the memory protection option.
+	 */
+	wdebug(MCFDEBUG_CSR, MCFDEBUG_CSR_PSTCLK);
+#endif
 }
 
-#endif
 /***************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5307/timers.c linux-2.5.64-bk7/arch/m68knommu/platform/5307/timers.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/5307/timers.c	Wed Dec 31 16:00:00 1969
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5307/timers.c	Mon Mar 31 12:29:48 2003
@@ -0,0 +1,127 @@
+/***************************************************************************/
+
+/*
+ *	linux/arch/m68knommu/platform/5307/timers.c
+ *
+ *	Copyright (C) 1999-2003, Greg Ungerer (gerg@snapgear.com)
+ */
+
+/***************************************************************************/
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/param.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <asm/irq.h>
+#include <asm/traps.h>
+#include <asm/machdep.h>
+#include <asm/coldfire.h>
+#include <asm/mcftimer.h>
+#include <asm/mcfsim.h>
+
+/***************************************************************************/
+
+/*
+ *	Default the timer and vector to use for ColdFire. Some ColdFire
+ *	CPU's and some boards may want different. Their sub-architecture
+ *	startup code (in config.c) can change these if they want.
+ */
+unsigned int	mcf_timervector = 29;
+unsigned int	mcf_profilevector = 31;
+unsigned int	mcf_timerlevel = 5;
+
+static volatile struct mcftimer *mcf_timerp;
+
+/***************************************************************************/
+
+void coldfire_tick(void)
+{
+	/* Reset the ColdFire timer */
+	mcf_timerp->ter = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
+}
+
+void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *))
+{
+	/* Set up an internal TIMER as poll clock */
+	mcf_timerp = (volatile struct mcftimer *) (MCF_MBAR + MCFTIMER_BASE1);
+	mcf_timerp->tmr = MCFTIMER_TMR_DISABLE;
+
+	mcf_timerp->trr = (unsigned short) ((MCF_BUSCLK / 16) / HZ);
+	mcf_timerp->tmr = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
+		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
+
+	request_irq(mcf_timervector, handler, SA_INTERRUPT, "timer", NULL);
+	mcf_settimericr(1, mcf_timerlevel);
+
+#ifdef CONFIG_HIGHPROFILE
+	coldfire_profile_init();
+#endif
+}
+
+/***************************************************************************/
+
+unsigned long coldfire_timer_offset(void)
+{
+	unsigned long trr, tcn;
+
+	/* Get the values as longs for accurate calculation. */
+	tcn = mcf_timerp->tcn;
+	trr = mcf_timerp->trr;
+	return((tcn * (1000000 / HZ)) / trr);
+}
+
+/***************************************************************************/
+#ifdef CONFIG_HIGHPROFILE
+/***************************************************************************/
+
+/*
+ *	Choose a reasonably fast profile timer. Make it an odd value to
+ *	try and get good coverage of kernal operations.
+ */
+#define	PROFILEHZ	1013
+
+static volatile struct mcftimer *mcf_proftp;
+
+/*
+ *	Use the other timer to provide high accuracy profiling info.
+ */
+
+void coldfire_profile_tick(int irq, void *dummy, struct pt_regs *regs)
+{
+	/* Reset ColdFire timer2 */
+	mcf_proftp->ter = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
+
+        if (!user_mode(regs)) {
+                if (prof_buffer && current->pid) {
+                        extern int _stext;
+                        unsigned long ip = instruction_pointer(regs);
+                        ip -= (unsigned long) &_stext;
+                        ip >>= prof_shift;
+                        if (ip < prof_len)
+                                prof_buffer[ip]++;
+                }
+        }
+}
+
+void coldfire_profile_init(void)
+{
+	printk("PROFILE: lodging TIMER2 @ %dHz as profile timer\n", PROFILEHZ);
+
+	/* Set up TIMER 2 as high speed profile clock */
+	mcf_proftp = (volatile struct mcftimer *) (MCF_MBAR + MCFTIMER_BASE2);
+	mcf_proftp->tmr = MCFTIMER_TMR_DISABLE;
+
+	mcf_proftp->trr = (unsigned short) ((MCF_CLK / 16) / PROFILEHZ);
+	mcf_proftp->tmr = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
+		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
+
+	request_irq(mcf_profilevector, coldfire_profile_tick,
+		(SA_INTERRUPT | IRQ_FLG_FAST), "profile timer", NULL);
+	mcf_settimericr(2, 7);
+}
+
+/***************************************************************************/
+#endif	/* CONFIG_HIGHPROFILE */
+/***************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/5407/config.c linux-2.5.64-bk7/arch/m68knommu/platform/5407/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/5407/config.c	Tue Mar  4 19:29:30 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/5407/config.c	Mon Mar 31 12:29:48 2003
@@ -26,7 +26,15 @@
 
 /***************************************************************************/
 
-void	coldfire_profile_init(void);
+void coldfire_tick(void);
+void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *));
+unsigned long coldfire_timer_offset(void);
+void coldfire_trap_init(void);
+void coldfire_reset(void);
+
+extern unsigned int mcf_timervector;
+extern unsigned int mcf_profilevector;
+extern unsigned int mcf_timerlevel;
 
 /***************************************************************************/
 
@@ -40,111 +48,8 @@
         MCF_MBAR + MCFDMA_BASE3,
 };
 
-unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
-
-/***************************************************************************/
-
-void coldfire_tick(void)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-}
-
-/***************************************************************************/
-
-void coldfire_timer_init(void (*handler)(int, void *, struct pt_regs *))
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	/* Set up TIMER 1 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE1);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / HZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER1ICR);
-
-#if defined(CONFIG_CLEOPATRA)
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI3;
-	request_irq(30, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-#else
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL5 | MCFSIM_ICR_PRI3;
-	request_irq(29, handler, SA_INTERRUPT, "ColdFire Timer", NULL);
-#endif
-
-#ifdef CONFIG_HIGHPROFILE
-	coldfire_profile_init();
-#endif
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER1);
-}
-
-/***************************************************************************/
-#ifdef CONFIG_HIGHPROFILE
-/***************************************************************************/
-
-#define	PROFILEHZ	1013
-
-/*
- *	Use the other timer to provide high accuracy profiling info.
- */
-
-void coldfire_profile_tick(int irq, void *dummy, struct pt_regs *regs)
-{
-	volatile unsigned char	*timerp;
-
-	/* Reset the ColdFire timer2 */
-	timerp = (volatile unsigned char *) (MCF_MBAR + MCFTIMER_BASE2);
-	timerp[MCFTIMER_TER] = MCFTIMER_TER_CAP | MCFTIMER_TER_REF;
-
-        if (!user_mode(regs)) {
-                if (prof_buffer && current->pid) {
-                        extern int _stext;
-                        unsigned long ip = instruction_pointer(regs);
-                        ip -= (unsigned long) &_stext;
-                        ip >>= prof_shift;
-                        if (ip < prof_len)
-                                prof_buffer[ip]++;
-                }
-        }
-}
-
-void coldfire_profile_init(void)
-{
-	volatile unsigned short	*timerp;
-	volatile unsigned char	*icrp;
-
-	printk("PROFILE: lodging timer2=%d as profile timer\n", PROFILEHZ);
-
-	/* Set up TIMER 2 as poll clock */
-	timerp = (volatile unsigned short *) (MCF_MBAR + MCFTIMER_BASE2);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_DISABLE;
-
-	timerp[MCFTIMER_TRR] = (unsigned short) ((MCF_CLK / 16) / PROFILEHZ);
-	timerp[MCFTIMER_TMR] = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
-		MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE;
-
-	icrp = (volatile unsigned char *) (MCF_MBAR + MCFSIM_TIMER2ICR);
-
-	*icrp = MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL7 | MCFSIM_ICR_PRI3;
-	request_irq(31, coldfire_profile_tick, (SA_INTERRUPT | IRQ_FLG_FAST),
-		"Profile Timer", NULL);
-	mcf_setimr(mcf_getimr() & ~MCFSIM_IMR_TIMER2);
-}
-
-/***************************************************************************/
-#endif	/* CONFIG_HIGHPROFILE */
 /***************************************************************************/
 
-/*
- *	Program the vector to be an auto-vectored.
- */
-
 void mcf_autovector(unsigned int vec)
 {
 	volatile unsigned char  *mbar;
@@ -159,78 +64,42 @@
 
 /***************************************************************************/
 
-extern e_vector	*_ramvec;
-
-void set_evector(int vecnum, void (*handler)(void))
+void mcf_settimericr(unsigned int timer, unsigned int level)
 {
-	if (vecnum >= 0 && vecnum <= 255)
-		_ramvec[vecnum] = handler;
-}
-
-/***************************************************************************/
-
-/* assembler routines */
-asmlinkage void buserr(void);
-asmlinkage void trap(void);
-asmlinkage void system_call(void);
-asmlinkage void inthandler(void);
-
-void __init coldfire_trap_init(void)
-{
-	int i;
-
-#ifndef ENABLE_dBUG
-	mcf_setimr(MCFSIM_IMR_MASKALL);
-#endif
-
-	/*
-	 *	There is a common trap handler and common interrupt
-	 *	handler that handle almost every vector. We treat
-	 *	the system call and bus error special, they get their
-	 *	own first level handlers.
-	 */
-#ifndef ENABLE_dBUG
-	for (i = 3; (i <= 23); i++)
-		_ramvec[i] = trap;
-	for (i = 33; (i <= 63); i++)
-		_ramvec[i] = trap;
-#endif
-
-	for (i = 24; (i <= 30); i++)
-		_ramvec[i] = inthandler;
-#ifndef ENABLE_dBUG
-	_ramvec[31] = inthandler;  // Disables the IRQ7 button
-#endif
+	volatile unsigned char *icrp;
+	unsigned int icr, imr;
 
-	for (i = 64; (i < 255); i++)
-		_ramvec[i] = inthandler;
-	_ramvec[255] = 0;
-
-	_ramvec[2] = buserr;
-	_ramvec[32] = system_call;
+	if (timer <= 2) {
+		switch (timer) {
+		case 2:  icr = MCFSIM_TIMER2ICR; imr = MCFSIM_IMR_TIMER2; break;
+		default: icr = MCFSIM_TIMER1ICR; imr = MCFSIM_IMR_TIMER1; break;
+		}
+
+		icrp = (volatile unsigned char *) (MCF_MBAR + icr);
+		*icrp = MCFSIM_ICR_AUTOVEC | (level << 2) | MCFSIM_ICR_PRI3;
+		mcf_setimr(mcf_getimr() & ~imr);
+	}
 }
 
 /***************************************************************************/
 
 void config_BSP(char *commandp, int size)
 {
+	mcf_setimr(MCFSIM_IMR_MASKALL);
 	memset(commandp, 0, size);
 
+#if defined(CONFIG_CLEOPATRA)
+	/* Different timer setup - to prevent device clash */
+	mcf_timervector = 30;
+	mcf_profilevector = 31;
+	mcf_timerlevel = 6;
+#endif
+
 	mach_sched_init = coldfire_timer_init;
 	mach_tick = coldfire_tick;
+	mach_gettimeoffset = coldfire_timer_offset;
 	mach_trap_init = coldfire_trap_init;
+	mach_reset = coldfire_reset;
 }
 
 /***************************************************************************/
-#ifdef TRAP_DBG_INTERRUPT
-
-asmlinkage void dbginterrupt_c(struct frame *fp)
-{
-	extern void dump(struct pt_regs *fp);
-	printk("%s(%d): BUS ERROR TRAP\n", __FILE__, __LINE__);
-        dump((struct pt_regs *) fp);
-	asm("halt");
-}
-
-#endif
-/***************************************************************************/
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68328/entry.S linux-2.5.64-bk7/arch/m68knommu/platform/68328/entry.S
--- linux-2.5.64-bk6/arch/m68knommu/platform/68328/entry.S	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68328/entry.S	Mon Mar 31 12:29:48 2003
@@ -14,6 +14,7 @@
 #include <linux/sys.h>
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
+#include <asm/unistd.h>
 #include <asm/errno.h>
 #include <asm/setup.h>
 #include <asm/segment.h>
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68328/ints.c linux-2.5.64-bk7/arch/m68knommu/platform/68328/ints.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/68328/ints.c	Tue Mar  4 19:29:15 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68328/ints.c	Mon Mar 31 12:29:48 2003
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
+#include <linux/errno.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68360/commproc.c linux-2.5.64-bk7/arch/m68knommu/platform/68360/commproc.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/68360/commproc.c	Tue Mar  4 19:29:34 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68360/commproc.c	Mon Mar 31 12:29:48 2003
@@ -71,7 +71,7 @@
 static	void	cpm_error_interrupt(void *);
 
 /* prototypes: */
-void cpm_install_handler(int vec, void (*handler)(void *), void *dev_id);
+void cpm_install_handler(int vec, void (*handler)(), void *dev_id);
 void m360_cpm_reset(void);
 
 
@@ -207,7 +207,7 @@
 /* Install a CPM interrupt handler.
 */
 void
-cpm_install_handler(int vec, void (*handler)(void *), void *dev_id)
+cpm_install_handler(int vec, void (*handler)(), void *dev_id)
 {
 
 	request_irq(vec, handler, IRQ_FLG_LOCK, "timer", dev_id);
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68360/entry.S linux-2.5.64-bk7/arch/m68knommu/platform/68360/entry.S
--- linux-2.5.64-bk6/arch/m68knommu/platform/68360/entry.S	Tue Mar  4 19:29:31 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68360/entry.S	Mon Mar 31 12:29:48 2003
@@ -16,6 +16,7 @@
 #include <linux/sys.h>
 #include <linux/linkage.h>
 #include <asm/thread_info.h>
+#include <asm/unistd.h>
 #include <asm/errno.h>
 #include <asm/setup.h>
 #include <asm/segment.h>
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68360/ints.c linux-2.5.64-bk7/arch/m68knommu/platform/68360/ints.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/68360/ints.c	Tue Mar  4 19:28:52 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68360/ints.c	Mon Mar 31 12:29:48 2003
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
+#include <linux/errno.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/Makefile linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/Makefile
--- linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/Makefile	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/Makefile	Mon Mar 31 12:29:48 2003
@@ -2,11 +2,5 @@
 # Makefile for arch/m68knommu/platform/68VZ328.
 #
 
-obj-y := $(BOARD)/config.o
-
-EXTRA_TARGETS := $(BOARD)/bootlogo.rh $(BOARD)/crt0_$(MODEL).o
-
-$(obj)/$(BOARD)/bootlogo.rh: $(src)/../68EZ328/bootlogo.h
-	perl $(src)/../68328/bootlogo.pl < $(src)/../68EZ328/bootlogo.h \
-		> $(obj)/$(BOARD)/bootlogo.rh
+obj-y := $(BOARD)/
 
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/de2/Makefile linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/de2/Makefile
--- linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/de2/Makefile	Wed Dec 31 16:00:00 1969
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/de2/Makefile	Mon Mar 31 12:29:48 2003
@@ -0,0 +1,12 @@
+#
+# Makefile for arch/m68knommu/platform/68VZ328/de2.
+#
+
+obj-y := config.o
+
+EXTRA_TARGETS := bootlogo.rh crt0_$(MODEL).o
+
+$(obj)/bootlogo.rh: $(src)/../../68EZ328/bootlogo.h
+	perl $(src)/../../68328/bootlogo.pl < $(src)/../../68EZ328/bootlogo.h \
+		> $(obj)/bootlogo.rh
+
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/de2/config.c linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/de2/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/de2/config.c	Tue Mar  4 19:29:03 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/de2/config.c	Mon Mar 31 12:29:48 2003
@@ -147,5 +147,5 @@
 	mach_reset           = dragen2_reset;
 	mach_gettod          = dragen2_gettod;
 
-	config_M68VZ328_irq();
+	config_M68328_irq();
 }
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/ucdimm/Makefile linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/ucdimm/Makefile
--- linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/ucdimm/Makefile	Wed Dec 31 16:00:00 1969
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/ucdimm/Makefile	Mon Mar 31 12:29:48 2003
@@ -0,0 +1,12 @@
+#
+# Makefile for arch/m68knommu/platform/68VZ328/ucdimm.
+#
+
+obj-y := config.o
+
+EXTRA_TARGETS := bootlogo.rh crt0_$(MODEL).o
+
+$(obj)/bootlogo.rh: $(src)/../../68EZ328/bootlogo.h
+	perl $(src)/../../68328/bootlogo.pl < $(src)/../../68EZ328/bootlogo.h \
+		> $(obj)/bootlogo.rh
+
diff -urN linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/ucdimm/config.c linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/ucdimm/config.c
--- linux-2.5.64-bk6/arch/m68knommu/platform/68VZ328/ucdimm/config.c	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/arch/m68knommu/platform/68VZ328/ucdimm/config.c	Mon Mar 31 12:29:48 2003
@@ -115,5 +115,5 @@
 	mach_gettod          = BSP_gettod;
 	mach_reset           = BSP_reset;
 
-	config_M68VZ328_irq();
+	config_M68328_irq();
 }
diff -urN linux-2.5.64-bk6/arch/parisc/kernel/sys_parisc32.c linux-2.5.64-bk7/arch/parisc/kernel/sys_parisc32.c
--- linux-2.5.64-bk6/arch/parisc/kernel/sys_parisc32.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/parisc/kernel/sys_parisc32.c	Mon Mar 31 12:29:48 2003
@@ -316,35 +316,6 @@
     return -ENOSYS;
 }
 
-extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
-
-asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	switch (cmd) {
-	case F_GETLK:
-	case F_SETLK:
-	case F_SETLKW:
-		{
-			struct flock f;
-			long ret;
-			
-			if (get_compat_flock(&f, (struct compat_flock *)arg))
-				return -EFAULT;
-			KERNEL_SYSCALL(ret, sys_fcntl, fd, cmd, (unsigned long)&f);
-			if (ret) return ret;
-			if (f.l_start >= 0x7fffffffUL ||
-			    f.l_len >= 0x7fffffffUL ||
-			    f.l_start + f.l_len >= 0x7fffffffUL)
-				return -EOVERFLOW;
-			if (put_compat_flock(&f, (struct compat_flock *)arg))
-				return -EFAULT;
-			return 0;
-		}
-	default:
-		return sys_fcntl(fd, cmd, (unsigned long)arg);
-	}
-}
-
 #ifdef CONFIG_SYSCTL
 
 struct __sysctl_args32 {
@@ -1300,28 +1271,6 @@
 	return err;
 }
 
-/* LFS */
-
-extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);
-
-asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	switch (cmd) {
-		case F_GETLK64:
-			cmd = F_GETLK;
-			break;
-		case F_SETLK64:
-			cmd = F_SETLK;
-			break;
-		case F_SETLKW64:
-			cmd = F_SETLKW;
-			break;
-		default:
-			break;
-	}
-	return sys32_fcntl(fd, cmd, arg);
-}
-
 /* EXPORT/UNEXPORT */
 struct nfsctl_export32 {
 	char		ex_client[NFSCLNT_IDMAX+1];
diff -urN linux-2.5.64-bk6/arch/parisc/kernel/syscall.S linux-2.5.64-bk7/arch/parisc/kernel/syscall.S
--- linux-2.5.64-bk6/arch/parisc/kernel/syscall.S	Tue Mar  4 19:29:55 2003
+++ linux-2.5.64-bk7/arch/parisc/kernel/syscall.S	Mon Mar 31 12:29:48 2003
@@ -409,8 +409,7 @@
 	ENTRY_SAME(getpeername)
 	/* This one's a huge ugly mess */
 	ENTRY_DIFF(ioctl)
-	/* struct flock? */
-	ENTRY_DIFF(fcntl)		/* 55 */
+	ENTRY_COMP(fcntl)		/* 55 */
 	ENTRY_SAME(socketpair)
 	ENTRY_SAME(setpgid)
 	ENTRY_SAME(send)
@@ -589,7 +588,7 @@
 	ENTRY_OURS(truncate64)
 	ENTRY_OURS(ftruncate64)		/* 200 */
 	ENTRY_SAME(getdents64)
-	ENTRY_DIFF(fcntl64)
+	ENTRY_COMP(fcntl64)
 	ENTRY_SAME(ni_syscall)
 	ENTRY_SAME(ni_syscall)
 	ENTRY_SAME(ni_syscall)		/* 205 */
diff -urN linux-2.5.64-bk6/arch/s390x/kernel/entry.S linux-2.5.64-bk7/arch/s390x/kernel/entry.S
--- linux-2.5.64-bk6/arch/s390x/kernel/entry.S	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/s390x/kernel/entry.S	Mon Mar 31 12:29:48 2003
@@ -452,7 +452,7 @@
         .long  SYSCALL(sys_umount,sys32_umount_wrapper)
         .long  SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old lock syscall */
         .long  SYSCALL(sys_ioctl,sys32_ioctl_wrapper)
-        .long  SYSCALL(sys_fcntl,sys32_fcntl_wrapper)   /* 55 */
+        .long  SYSCALL(sys_fcntl,compat_sys_fcntl_wrapper)   /* 55 */
         .long  SYSCALL(sys_ni_syscall,sys_ni_syscall) /* intel mpx syscall */
         .long  SYSCALL(sys_setpgid,sys32_setpgid_wrapper)
         .long  SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old ulimit syscall */
@@ -618,7 +618,7 @@
         .long  SYSCALL(sys_mincore,sys32_mincore_wrapper)
         .long  SYSCALL(sys_madvise,sys32_madvise_wrapper)
 	.long  SYSCALL(sys_getdents64,sys32_getdents64_wrapper)/* 220 */
-	.long  SYSCALL(sys_ni_syscall,sys32_fcntl64_wrapper)
+	.long  SYSCALL(sys_ni_syscall,compat_sys_fcntl64_wrapper)
 	.long  SYSCALL(sys_readahead,sys32_readahead)
 	.long  SYSCALL(sys_ni_syscall,sys32_sendfile64)
 	.long  SYSCALL(sys_setxattr,sys32_setxattr_wrapper)
diff -urN linux-2.5.64-bk6/arch/s390x/kernel/linux32.c linux-2.5.64-bk7/arch/s390x/kernel/linux32.c
--- linux-2.5.64-bk6/arch/s390x/kernel/linux32.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/s390x/kernel/linux32.c	Mon Mar 31 12:29:48 2003
@@ -834,57 +834,6 @@
 	return err;
 }
 
-extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
-
-asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	switch (cmd) {
-	case F_GETLK:
-		{
-			struct flock f;
-			mm_segment_t old_fs;
-			long ret;
-			
-			if(get_compat_flock(&f, (struct compat_flock *)A(arg)))
-				return -EFAULT;
-			old_fs = get_fs(); set_fs (KERNEL_DS);
-			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
-			set_fs (old_fs);
-			if (ret) return ret;
-			if (f.l_start >= 0x7fffffffUL ||
-			    f.l_start + f.l_len >= 0x7fffffffUL)
-				return -EOVERFLOW;
-			if(put_compat_flock(&f, (struct compat_flock *)A(arg)))
-				return -EFAULT;
-			return 0;
-		}
-	case F_SETLK:
-	case F_SETLKW:
-		{
-			struct flock f;
-			mm_segment_t old_fs;
-			long ret;
-			
-			if(get_compat_flock(&f, (struct compat_flock *)A(arg)))
-				return -EFAULT;
-			old_fs = get_fs(); set_fs (KERNEL_DS);
-			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
-			set_fs (old_fs);
-			if (ret) return ret;
-			return 0;
-		}
-	default:
-		return sys_fcntl(fd, cmd, (unsigned long)arg);
-	}
-}
-
-asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	if (cmd >= F_GETLK64 && cmd <= F_SETLKW64)
-		return sys_fcntl(fd, cmd + F_GETLK - F_GETLK64, arg);
-	return sys32_fcntl(fd, cmd, arg);
-}
-
 extern asmlinkage long sys_truncate(const char * path, unsigned long length);
 extern asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
 
diff -urN linux-2.5.64-bk6/arch/s390x/kernel/linux32.h linux-2.5.64-bk7/arch/s390x/kernel/linux32.h
--- linux-2.5.64-bk6/arch/s390x/kernel/linux32.h	Tue Mar  4 19:29:51 2003
+++ linux-2.5.64-bk7/arch/s390x/kernel/linux32.h	Mon Mar 31 12:29:48 2003
@@ -21,10 +21,6 @@
         __s32   msgtyp;
 };
 
-#define F_GETLK64       12
-#define F_SETLK64       13
-#define F_SETLKW64      14    
-
 struct old_sigaction32 {
        __u32			sa_handler;	/* Really a pointer, but need to deal with 32 bits */
        compat_old_sigset_t	sa_mask;	/* A 32 bit mask */
diff -urN linux-2.5.64-bk6/arch/s390x/kernel/wrapper32.S linux-2.5.64-bk7/arch/s390x/kernel/wrapper32.S
--- linux-2.5.64-bk6/arch/s390x/kernel/wrapper32.S	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/s390x/kernel/wrapper32.S	Mon Mar 31 12:29:48 2003
@@ -227,12 +227,12 @@
 	llgfr	%r4,%r4			# unsigned int
 	jg	sys32_ioctl		# branch to system call
 
-	.globl  sys32_fcntl_wrapper 
-sys32_fcntl_wrapper:
+	.globl  compat_sys_fcntl_wrapper 
+compat_sys_fcntl_wrapper:
 	llgfr	%r2,%r2			# unsigned int
 	llgfr	%r3,%r3			# unsigned int 
 	llgfr	%r4,%r4			# unsigned long
-	jg	sys32_fcntl		# branch to system call
+	jg	compat_sys_fcntl	# branch to system call
 
 	.globl  sys32_setpgid_wrapper 
 sys32_setpgid_wrapper:
@@ -1050,12 +1050,12 @@
 	llgfr	%r4,%r4			# unsigned int
 	jg	sys_getdents64		# branch to system call
 
-	.globl  sys32_fcntl64_wrapper 
-sys32_fcntl64_wrapper:
+	.globl  compat_sys_fcntl64_wrapper 
+compat_sys_fcntl64_wrapper:
 	llgfr	%r2,%r2			# unsigned int
 	llgfr	%r3,%r3			# unsigned int 
 	llgfr	%r4,%r4			# unsigned long
-	jg	sys32_fcntl64		# branch to system call
+	jg	compat_sys_fcntl64	# branch to system call
 
 	.globl	sys32_stat64_wrapper
 sys32_stat64_wrapper:
diff -urN linux-2.5.64-bk6/arch/sparc64/kernel/sparc64_ksyms.c linux-2.5.64-bk7/arch/sparc64/kernel/sparc64_ksyms.c
--- linux-2.5.64-bk6/arch/sparc64/kernel/sparc64_ksyms.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/sparc64/kernel/sparc64_ksyms.c	Mon Mar 31 12:29:48 2003
@@ -137,6 +137,11 @@
 EXPORT_SYMBOL_NOVERS(mcount);
 #endif
 
+/* Uniprocessor clock frequency */
+#ifndef CONFIG_SMP
+EXPORT_SYMBOL(up_clock_tick);
+#endif
+
 /* Per-CPU information table */
 EXPORT_SYMBOL(cpu_data);
 
diff -urN linux-2.5.64-bk6/arch/sparc64/kernel/sys_sparc32.c linux-2.5.64-bk7/arch/sparc64/kernel/sys_sparc32.c
--- linux-2.5.64-bk6/arch/sparc64/kernel/sys_sparc32.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/sparc64/kernel/sys_sparc32.c	Mon Mar 31 12:29:48 2003
@@ -804,41 +804,6 @@
 	return err;
 }
 
-extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
-
-asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	switch (cmd) {
-	case F_GETLK:
-	case F_SETLK:
-	case F_SETLKW:
-		{
-			struct flock f;
-			mm_segment_t old_fs;
-			long ret;
-			
-			if (get_compat_flock(&f, (struct compat_flock *)arg))
-				return -EFAULT;
-			old_fs = get_fs(); set_fs (KERNEL_DS);
-			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
-			set_fs (old_fs);
-			if (ret) return ret;
-			if (put_compat_flock(&f, (struct compat_flock *)arg))
-				return -EFAULT;
-			return 0;
-		}
-	default:
-		return sys_fcntl(fd, cmd, (unsigned long)arg);
-	}
-}
-
-asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	if (cmd >= F_GETLK64 && cmd <= F_SETLKW64)
-		return sys_fcntl(fd, cmd + F_GETLK - F_GETLK64, arg);
-	return sys32_fcntl(fd, cmd, arg);
-}
-
 extern asmlinkage long sys_truncate(const char * path, unsigned long length);
 extern asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
 
diff -urN linux-2.5.64-bk6/arch/sparc64/kernel/systbls.S linux-2.5.64-bk7/arch/sparc64/kernel/systbls.S
--- linux-2.5.64-bk6/arch/sparc64/kernel/systbls.S	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/sparc64/kernel/systbls.S	Mon Mar 31 12:29:48 2003
@@ -37,7 +37,7 @@
 	.word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys32_getgroups16
 /*80*/	.word sys32_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64
 	.word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
-/*90*/	.word sys_dup2, sys_setfsuid, sys32_fcntl, sys32_select, sys_setfsgid
+/*90*/	.word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid
 	.word sys_fsync, sys_setpriority32, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
 /*100*/ .word sys_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending
 	.word sys32_rt_sigtimedwait, sys32_rt_sigqueueinfo, sys32_rt_sigsuspend, sys_setresuid, sys_getresuid
@@ -50,7 +50,7 @@
 /*140*/	.word sys32_sendfile64, sys_nis_syscall, compat_sys_futex, sys_gettid, sys32_getrlimit
 	.word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
 /*150*/	.word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
-	.word sys32_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
+	.word compat_sys_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
 /*160*/	.word sys32_sched_setaffinity, sys32_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall
 	.word sys_quotactl, sys_set_tid_address, sys32_mount, sys_ustat, sys_setxattr
 /*170*/	.word sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr, sys32_getdents
@@ -172,7 +172,7 @@
 	.word compat_sys_setitimer, sunos_nosys, sys_swapon
 	.word compat_sys_getitimer, sys_gethostname, sys_sethostname
 	.word sunos_getdtablesize, sys_dup2, sunos_nop
-	.word sys32_fcntl, sunos_select, sunos_nop
+	.word compat_sys_fcntl, sunos_select, sunos_nop
 	.word sys_fsync, sys_setpriority32, sys_socket
 	.word sys_connect, sunos_accept
 /*100*/	.word sys_getpriority, sunos_send, sunos_recv
diff -urN linux-2.5.64-bk6/arch/sparc64/kernel/us3_cpufreq.c linux-2.5.64-bk7/arch/sparc64/kernel/us3_cpufreq.c
--- linux-2.5.64-bk6/arch/sparc64/kernel/us3_cpufreq.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/sparc64/kernel/us3_cpufreq.c	Mon Mar 31 12:29:48 2003
@@ -79,9 +79,9 @@
 				void *data)
 {
 	struct cpufreq_freqs *freq = data;
+#ifdef CONFIG_SMP
 	unsigned int cpu = freq->cpu;
 
-#ifdef CONFIG_SMP
 	if (!us3_freq_table[cpu].ref_freq) {
 		us3_freq_table[cpu].ref_freq = freq->old;
 		us3_freq_table[cpu].udelay_val_ref = cpu_data[cpu].udelay_val;
diff -urN linux-2.5.64-bk6/arch/x86_64/ia32/Makefile linux-2.5.64-bk7/arch/x86_64/ia32/Makefile
--- linux-2.5.64-bk6/arch/x86_64/ia32/Makefile	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/x86_64/ia32/Makefile	Mon Mar 31 12:29:48 2003
@@ -3,5 +3,5 @@
 #
 
 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
-	ia32_signal.o \
+	ia32_signal.o tls32.o \
 	ia32_binfmt.o fpu32.o ptrace32.o ipc32.o syscall32.o
diff -urN linux-2.5.64-bk6/arch/x86_64/ia32/ia32entry.S linux-2.5.64-bk7/arch/x86_64/ia32/ia32entry.S
--- linux-2.5.64-bk6/arch/x86_64/ia32/ia32entry.S	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/x86_64/ia32/ia32entry.S	Mon Mar 31 12:29:48 2003
@@ -255,7 +255,7 @@
 	.quad sys_umount			/* new_umount */
 	.quad ni_syscall			/* old lock syscall holder */
 	.quad sys32_ioctl
-	.quad sys32_fcntl64		/* 55 */
+	.quad compat_sys_fcntl64		/* 55 */
 	.quad ni_syscall			/* old mpx syscall holder */
 	.quad sys_setpgid
 	.quad ni_syscall			/* old ulimit syscall holder */
@@ -421,7 +421,7 @@
 	.quad sys_mincore
 	.quad sys_madvise
 	.quad sys_getdents64	/* 220 getdents64 */ 
-	.quad sys32_fcntl64	
+	.quad compat_sys_fcntl64	
 	.quad sys_ni_syscall	/* tux */
 	.quad sys_ni_syscall    /* security */
 	.quad sys_gettid	
diff -urN linux-2.5.64-bk6/arch/x86_64/ia32/sys_ia32.c linux-2.5.64-bk7/arch/x86_64/ia32/sys_ia32.c
--- linux-2.5.64-bk6/arch/x86_64/ia32/sys_ia32.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/arch/x86_64/ia32/sys_ia32.c	Mon Mar 31 12:29:48 2003
@@ -1016,102 +1016,6 @@
 	return ret;
 }
 
-extern asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg);
-asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg);
-
-
-asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	switch (cmd) {
-	case F_GETLK:
-	case F_SETLK:
-	case F_SETLKW:
-		{
-			struct flock f;
-			mm_segment_t old_fs;
-			long ret;
-			
-			if (get_compat_flock(&f, (struct compat_flock *)arg))
-				return -EFAULT;
-			old_fs = get_fs(); set_fs (KERNEL_DS);
-			ret = sys_fcntl(fd, cmd, (unsigned long)&f);
-			set_fs (old_fs);
-			if (ret) return ret;
-			if (put_compat_flock(&f, (struct compat_flock *)arg))
-				return -EFAULT;
-			return 0;
-		}
-	case F_GETLK64: 
-	case F_SETLK64: 
-	case F_SETLKW64: 
-		return sys32_fcntl64(fd,cmd,arg); 
-
-	default:
-		return sys_fcntl(fd, cmd, (unsigned long)arg);
-	}
-}
-
-static inline int get_flock64(struct ia32_flock64 *fl32, struct flock *fl64)
-{
-	if (access_ok(fl32, sizeof(struct ia32_flock64), VERIFY_WRITE)) {
-		int ret = __get_user(fl64->l_type, &fl32->l_type); 
-		ret |= __get_user(fl64->l_whence, &fl32->l_whence);
-		ret |= __get_user(fl64->l_start, &fl32->l_start); 
-		ret |= __get_user(fl64->l_len, &fl32->l_len); 
-		ret |= __get_user(fl64->l_pid, &fl32->l_pid); 
-		return ret; 
-		}
-	return -EFAULT; 
-}
-
-static inline int put_flock64(struct ia32_flock64 *fl32, struct flock *fl64)
-{
-	if (access_ok(fl32, sizeof(struct ia32_flock64), VERIFY_WRITE)) {
-		int ret = __put_user(fl64->l_type, &fl32->l_type); 
-		ret |= __put_user(fl64->l_whence, &fl32->l_whence);
-		ret |= __put_user(fl64->l_start, &fl32->l_start); 
-		ret |= __put_user(fl64->l_len, &fl32->l_len); 
-		ret |= __put_user(fl64->l_pid, &fl32->l_pid); 
-		return ret; 
-	}
-	return -EFAULT; 
-}
-
-asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	struct flock fl64;  
-	mm_segment_t oldfs = get_fs(); 
-	int ret = 0; 
-	int oldcmd = cmd;
-	unsigned long oldarg = arg;
-
-	switch (cmd) {
-	case F_GETLK64: 
-		cmd = F_GETLK; 
-		goto cnv;
-	case F_SETLK64: 
-		cmd = F_SETLK; 
-		goto cnv; 
-	case F_SETLKW64:
-		cmd = F_SETLKW; 
-	cnv:
-		ret = get_flock64((struct ia32_flock64 *)arg, &fl64); 
-		arg = (unsigned long)&fl64; 
-		set_fs(KERNEL_DS); 
-		break; 
-	case F_GETLK:
-	case F_SETLK:
-	case F_SETLKW:
-		return sys32_fcntl(fd,cmd,arg); 
-	}
-	if (!ret)
-		ret = sys_fcntl(fd, cmd, arg);
-	set_fs(oldfs); 
-	if (oldcmd == F_GETLK64 && !ret)
-		ret = put_flock64((struct ia32_flock64 *)oldarg, &fl64); 
-	return ret; 
-}
-
 int sys32_ni_syscall(int call)
 { 
 	printk(KERN_INFO "IA32 syscall %d from %s not implemented\n", call,
diff -urN linux-2.5.64-bk6/drivers/base/bus.c linux-2.5.64-bk7/drivers/base/bus.c
--- linux-2.5.64-bk6/drivers/base/bus.c	Tue Mar  4 19:29:03 2003
+++ linux-2.5.64-bk7/drivers/base/bus.c	Mon Mar 31 12:29:48 2003
@@ -282,23 +282,25 @@
  *	Walk the list of drivers that the bus has and call bus_match() 
  *	for each pair. If a compatible pair is found, break out and return.
  */
-static void device_attach(struct device * dev)
+static int device_attach(struct device * dev)
 {
  	struct bus_type * bus = dev->bus;
 	struct list_head * entry;
 
 	if (dev->driver) {
 		device_bind_driver(dev);
-		return;
+		return 1;
 	}
 
 	if (bus->match) {
 		list_for_each(entry,&bus->drivers.list) {
 			struct device_driver * drv = to_drv(entry);
 			if (!bus_match(dev,drv))
-				break;
+				return 1;
 		}
 	}
+
+	return 0;
 }
 
 
@@ -476,6 +478,38 @@
 	}
 }
 
+
+/* Helper for bus_rescan_devices's iter */
+static int bus_rescan_devices_helper(struct device *dev, void *data)
+{
+	int *count = data;
+
+	if (!dev->driver && device_attach(dev))
+		(*count)++;
+
+	return 0;
+}
+
+
+/**
+ *	bus_rescan_devices - rescan devices on the bus for possible drivers
+ *	@bus:	the bus to scan.
+ *
+ *	This function will look for devices on the bus with no driver
+ *	attached and rescan it against existing drivers to see if it
+ *	matches any. Calls device_attach(). Returns the number of devices
+ *	that were sucessfully bound to a driver.
+ */
+int bus_rescan_devices(struct bus_type * bus)
+{
+	int count = 0;
+
+	bus_for_each_dev(bus, NULL, &count, bus_rescan_devices_helper);
+
+	return count;
+}
+
+
 struct bus_type * get_bus(struct bus_type * bus)
 {
 	return bus ? container_of(subsys_get(&bus->subsys),struct bus_type,subsys) : NULL;
@@ -560,6 +594,7 @@
 EXPORT_SYMBOL(bus_remove_device);
 EXPORT_SYMBOL(bus_register);
 EXPORT_SYMBOL(bus_unregister);
+EXPORT_SYMBOL(bus_rescan_devices);
 EXPORT_SYMBOL(get_bus);
 EXPORT_SYMBOL(put_bus);
 EXPORT_SYMBOL(find_bus);
diff -urN linux-2.5.64-bk6/drivers/block/ll_rw_blk.c linux-2.5.64-bk7/drivers/block/ll_rw_blk.c
--- linux-2.5.64-bk6/drivers/block/ll_rw_blk.c	Mon Mar 31 12:29:45 2003
+++ linux-2.5.64-bk7/drivers/block/ll_rw_blk.c	Mon Mar 31 12:29:48 2003
@@ -1040,7 +1040,8 @@
 
 static void blk_unplug_work(void *data)
 {
-	generic_unplug_device(data);
+	request_queue_t *q = data;
+	q->unplug_fn(q);
 }
 
 static void blk_unplug_timeout(unsigned long data)
diff -urN linux-2.5.64-bk6/drivers/eisa/eisa-bus.c linux-2.5.64-bk7/drivers/eisa/eisa-bus.c
--- linux-2.5.64-bk6/drivers/eisa/eisa-bus.c	Tue Mar  4 19:29:04 2003
+++ linux-2.5.64-bk7/drivers/eisa/eisa-bus.c	Mon Mar 31 12:29:48 2003
@@ -83,8 +83,10 @@
 		return 0;
 
 	while (strlen (eids->sig)) {
-		if (!strcmp (eids->sig, edev->id.sig))
+		if (!strcmp (eids->sig, edev->id.sig)) {
+			edev->id.driver_data = eids->driver_data;
 			return 1;
+		}
 
 		eids++;
 	}
diff -urN linux-2.5.64-bk6/drivers/eisa/virtual_root.c linux-2.5.64-bk7/drivers/eisa/virtual_root.c
--- linux-2.5.64-bk6/drivers/eisa/virtual_root.c	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/drivers/eisa/virtual_root.c	Mon Mar 31 12:29:48 2003
@@ -13,14 +13,19 @@
 #include <linux/module.h>
 #include <linux/init.h>
 
-/* The default EISA device parent (virtual root device). */
-static struct device eisa_root_dev = {
-       .name        = "Virtual EISA Bridge",
-       .bus_id      = "eisa",
+/* The default EISA device parent (virtual root device).
+ * Now use a platform device, since that's the obvious choice. */
+
+static struct platform_device eisa_root_dev = {
+	.name = "eisa",
+	.id   = 0,
+	.dev  = {
+		.name = "Virtual EISA Bridge",
+	},
 };
 
 static struct eisa_root_device eisa_bus_root = {
-	.dev           = &eisa_root_dev,
+	.dev           = &eisa_root_dev.dev,
 	.bus_base_addr = 0,
 	.res	       = &ioport_resource,
 	.slots	       = EISA_MAX_SLOTS,
@@ -30,16 +35,16 @@
 {
 	int r;
 	
-        if ((r = device_register (&eisa_root_dev))) {
+        if ((r = platform_device_register (&eisa_root_dev))) {
                 return r;
         }
 
-	eisa_root_dev.driver_data = &eisa_bus_root;
+	eisa_root_dev.dev.driver_data = &eisa_bus_root;
 
 	if (eisa_root_register (&eisa_bus_root)) {
 		/* A real bridge may have been registered before
 		 * us. So quietly unregister. */
-		device_unregister (&eisa_root_dev);
+		platform_device_unregister (&eisa_root_dev);
 		return -1;
 	}
 
diff -urN linux-2.5.64-bk6/drivers/i2c/i2c-algo-bit.c linux-2.5.64-bk7/drivers/i2c/i2c-algo-bit.c
--- linux-2.5.64-bk6/drivers/i2c/i2c-algo-bit.c	Tue Mar  4 19:29:19 2003
+++ linux-2.5.64-bk7/drivers/i2c/i2c-algo-bit.c	Mon Mar 31 12:29:48 2003
@@ -41,27 +41,13 @@
 #define DEBPROTO(x) if (i2c_debug>=9) { x; }
  	/* debug the protocol by showing transferred bits */
 
-/* debugging - slow down transfer to have a look at the data .. 	*/
-/* I use this with two leds&resistors, each one connected to sda,scl 	*/
-/* respectively. This makes sure that the algorithm works. Some chips   */
-/* might not like this, as they have an internal timeout of some mils	*/
-/*
-#define SLO_IO      jif=jiffies;while(time_before_eq(jiffies, jif+i2c_table[minor].veryslow))\
-                        cond_resched();
-*/
-
 
 /* ----- global variables ---------------------------------------------	*/
 
-#ifdef SLO_IO
-	int jif;
-#endif
-
 /* module parameters:
  */
 static int i2c_debug;
 static int bit_test;	/* see if the line-setting functions work	*/
-static int bit_scan;	/* have a look at what's hanging 'round		*/
 
 /* --- setting states on the bus with the right timing: ---------------	*/
 
@@ -86,9 +72,6 @@
 {
 	setscl(adap,0);
 	udelay(adap->udelay);
-#ifdef SLO_IO
-	SLO_IO
-#endif
 }
 
 /*
@@ -97,32 +80,28 @@
  */
 static inline int sclhi(struct i2c_algo_bit_data *adap)
 {
-	int start=jiffies;
+	unsigned long start;
 
 	setscl(adap,1);
 
-	udelay(adap->udelay);
-
 	/* Not all adapters have scl sense line... */
 	if (adap->getscl == NULL )
 		return 0;
 
- 	while (! getscl(adap) ) {	
+	start=jiffies;
+	while (! getscl(adap) ) {	
  		/* the hw knows how to read the clock line,
  		 * so we wait until it actually gets high.
  		 * This is safer as some chips may hold it low
  		 * while they are processing data internally. 
  		 */
-		setscl(adap,1);
 		if (time_after_eq(jiffies, start+adap->timeout)) {
 			return -ETIMEDOUT;
 		}
 		cond_resched();
 	}
 	DEBSTAT(printk(KERN_DEBUG "needed %ld jiffies\n", jiffies-start));
-#ifdef SLO_IO
-	SLO_IO
-#endif
+	udelay(adap->udelay);
 	return 0;
 } 
 
@@ -175,7 +154,6 @@
 	struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 
 	/* assert: scl is low */
-	DEB2(printk(KERN_DEBUG " i2c_outb:%2.2X\n",c&0xff));
 	for ( i=7 ; i>=0 ; i-- ) {
 		sb = c & ( 1 << i );
 		setsda(adap,sb);
@@ -183,6 +161,7 @@
 		DEBPROTO(printk(KERN_DEBUG "%d",sb!=0));
 		if (sclhi(adap)<0) { /* timed out */
 			sdahi(adap); /* we don't want to block the net */
+			DEB2(printk(KERN_DEBUG " i2c_outb: 0x%02x, timeout at bit #%d\n", c&0xff, i));
 			return -ETIMEDOUT;
 		};
 		/* do arbitration here: 
@@ -193,11 +172,12 @@
 	}
 	sdahi(adap);
 	if (sclhi(adap)<0){ /* timeout */
-		return -ETIMEDOUT;
+	    DEB2(printk(KERN_DEBUG " i2c_outb: 0x%02x, timeout at ack\n", c&0xff));
+	    return -ETIMEDOUT;
 	};
 	/* read ack: SDA should be pulled down by slave */
 	ack=getsda(adap);	/* ack: sda is pulled low ->success.	 */
-	DEB2(printk(KERN_DEBUG " i2c_outb: getsda() =  0x%2.2x\n", ~ack ));
+	DEB2(printk(KERN_DEBUG " i2c_outb: 0x%02x , getsda() = %d\n", c & 0xff, ack));
 
 	DEBPROTO( printk(KERN_DEBUG "[%2.2x]",c&0xff) );
 	DEBPROTO(if (0==ack){ printk(KERN_DEBUG " A ");} else printk(KERN_DEBUG " NA ") );
@@ -216,11 +196,10 @@
 	struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 
 	/* assert: scl is low */
-	DEB2(printk(KERN_DEBUG "i2c_inb.\n"));
-
 	sdahi(adap);
 	for (i=0;i<8;i++) {
 		if (sclhi(adap)<0) { /* timeout */
+			DEB2(printk(KERN_DEBUG " i2c_inb: timeout at bit #%d\n", 7-i));
 			return -ETIMEDOUT;
 		};
 		indata *= 2;
@@ -229,7 +208,9 @@
 		scllo(adap);
 	}
 	/* assert: scl is low */
-	DEBPROTO(printk(KERN_DEBUG " %2.2x", indata & 0xff));
+	DEB2(printk(KERN_DEBUG "i2c_inb: 0x%02x\n", indata & 0xff));
+
+	DEBPROTO(printk(KERN_DEBUG " 0x%02x", indata & 0xff));
 	return (int) (indata & 0xff);
 }
 
@@ -337,30 +318,35 @@
 		i2c_start(adap);
 		udelay(adap->udelay);
 	}
-	DEB2(if (i) printk(KERN_DEBUG "i2c-algo-bit.o: needed %d retries for %d\n",
-	                   i,addr));
+	DEB2(if (i)
+	     printk(KERN_DEBUG "i2c-algo-bit.o: Used %d tries to %s client at 0x%02x : %s\n",
+		    i+1, addr & 1 ? "read" : "write", addr>>1,
+		    ret==1 ? "success" : ret==0 ? "no ack" : "failed, timeout?" )
+	    );
 	return ret;
 }
 
-static int sendbytes(struct i2c_adapter *i2c_adap,const char *buf, int count)
+static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
 {
 	struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 	char c;
-	const char *temp = buf;
+	const char *temp = msg->buf;
+	int count = msg->len;
+	unsigned short nak_ok = msg->flags & I2C_M_IGNORE_NAK; 
 	int retval;
 	int wrcount=0;
 
 	while (count > 0) {
 		c = *temp;
-		DEB2(printk(KERN_DEBUG "i2c-algo-bit.o: %s i2c_write: writing %2.2X\n",
+		DEB2(printk(KERN_DEBUG "i2c-algo-bit.o: %s sendbytes: writing %2.2X\n",
 			    i2c_adap->name, c&0xff));
 		retval = i2c_outb(i2c_adap,c);
-		if (retval>0) {
+		if ((retval>0) || (nak_ok && (retval==0)))  { /* ok or ignored NAK */
 			count--; 
 			temp++;
 			wrcount++;
 		} else { /* arbitration or no acknowledge */
-			printk(KERN_ERR "i2c-algo-bit.o: %s i2c_write: error - bailout.\n",
+			printk(KERN_ERR "i2c-algo-bit.o: %s sendbytes: error - bailout.\n",
 			       i2c_adap->name);
 			i2c_stop(adap);
 			return (retval<0)? retval : -EFAULT;
@@ -374,12 +360,13 @@
 	return wrcount;
 }
 
-static inline int readbytes(struct i2c_adapter *i2c_adap,char *buf,int count)
+static inline int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
 {
-	char *temp = buf;
 	int inval;
 	int rdcount=0;   	/* counts bytes read */
 	struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
+	char *temp = msg->buf;
+	int count = msg->len;
 
 	while (count > 0) {
 		inval = i2c_inb(i2c_adap);
@@ -388,7 +375,7 @@
 			*temp = inval;
 			rdcount++;
 		} else {   /* read timed out */
-			printk(KERN_ERR "i2c-algo-bit.o: i2c_read: i2c_inb timed out.\n");
+			printk(KERN_ERR "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n");
 			break;
 		}
 
@@ -401,7 +388,7 @@
 		}
 		if (sclhi(adap)<0) {	/* timeout */
 			sdahi(adap);
-			printk(KERN_ERR "i2c-algo-bit.o: i2c_read: Timeout at ack\n");
+			printk(KERN_ERR "i2c-algo-bit.o: readbytes: Timeout at ack\n");
 			return -ETIMEDOUT;
 		};
 		scllo(adap);
@@ -416,31 +403,34 @@
  * try_address) and transmits the address in the necessary format to handle
  * reads, writes as well as 10bit-addresses.
  * returns:
- *  0 everything went okay, the chip ack'ed
+ *  0 everything went okay, the chip ack'ed, or IGNORE_NAK flag was set
  * -x an error occurred (like: -EREMOTEIO if the device did not answer, or
  *	-ETIMEDOUT, for example if the lines are stuck...) 
  */
-static inline int bit_doAddress(struct i2c_adapter *i2c_adap,
-                                struct i2c_msg *msg, int retries) 
+static inline int bit_doAddress(struct i2c_adapter *i2c_adap, struct i2c_msg *msg) 
 {
 	unsigned short flags = msg->flags;
+	unsigned short nak_ok = msg->flags & I2C_M_IGNORE_NAK;
 	struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 
 	unsigned char addr;
-	int ret;
+	int ret, retries;
+
+	retries = nak_ok ? 0 : i2c_adap->retries;
+	
 	if ( (flags & I2C_M_TEN)  ) { 
 		/* a ten bit address */
 		addr = 0xf0 | (( msg->addr >> 7) & 0x03);
 		DEB2(printk(KERN_DEBUG "addr0: %d\n",addr));
 		/* try extended address code...*/
 		ret = try_address(i2c_adap, addr, retries);
-		if (ret!=1) {
+		if ((ret != 1) && !nak_ok)  {
 			printk(KERN_ERR "died at extended address code.\n");
 			return -EREMOTEIO;
 		}
 		/* the remaining 8 bit address */
 		ret = i2c_outb(i2c_adap,msg->addr & 0x7f);
-		if (ret != 1) {
+		if ((ret != 1) && !nak_ok) {
 			/* the chip did not ack / xmission error occurred */
 			printk(KERN_ERR "died at 2nd address code.\n");
 			return -EREMOTEIO;
@@ -450,7 +440,7 @@
 			/* okay, now switch into reading mode */
 			addr |= 0x01;
 			ret = try_address(i2c_adap, addr, retries);
-			if (ret!=1) {
+			if ((ret!=1) && !nak_ok) {
 				printk(KERN_ERR "died at extended address code.\n");
 				return -EREMOTEIO;
 			}
@@ -462,10 +452,10 @@
 		if (flags & I2C_M_REV_DIR_ADDR )
 			addr ^= 1;
 		ret = try_address(i2c_adap, addr, retries);
-		if (ret!=1) {
+		if ((ret!=1) && !nak_ok)
 			return -EREMOTEIO;
-		}
 	}
+
 	return 0;
 }
 
@@ -476,31 +466,33 @@
 	struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 	
 	int i,ret;
+	unsigned short nak_ok;
 
 	i2c_start(adap);
 	for (i=0;i<num;i++) {
 		pmsg = &msgs[i];
+		nak_ok = pmsg->flags & I2C_M_IGNORE_NAK; 
 		if (!(pmsg->flags & I2C_M_NOSTART)) {
 			if (i) {
 				i2c_repstart(adap);
 			}
-			ret = bit_doAddress(i2c_adap,pmsg,i2c_adap->retries);
-			if (ret != 0) {
-				DEB2(printk(KERN_DEBUG "i2c-algo-bit.o: NAK from device adr %#2x msg #%d\n"
-				       ,msgs[i].addr,i));
-				return (ret<0) ? ret : -EREMOTEIO;
+			ret = bit_doAddress(i2c_adap, pmsg);
+			if ((ret != 0) && !nak_ok) {
+			    DEB2(printk(KERN_DEBUG "i2c-algo-bit.o: NAK from device addr %2.2x msg #%d\n"
+					,msgs[i].addr,i));
+			    return (ret<0) ? ret : -EREMOTEIO;
 			}
 		}
 		if (pmsg->flags & I2C_M_RD ) {
 			/* read bytes into buffer*/
-			ret = readbytes(i2c_adap,pmsg->buf,pmsg->len);
+			ret = readbytes(i2c_adap, pmsg);
 			DEB2(printk(KERN_DEBUG "i2c-algo-bit.o: read %d bytes.\n",ret));
 			if (ret < pmsg->len ) {
 				return (ret<0)? ret : -EREMOTEIO;
 			}
 		} else {
 			/* write bytes from buffer */
-			ret = sendbytes(i2c_adap,pmsg->buf,pmsg->len);
+			ret = sendbytes(i2c_adap, pmsg);
 			DEB2(printk(KERN_DEBUG "i2c-algo-bit.o: wrote %d bytes.\n",ret));
 			if (ret < pmsg->len ) {
 				return (ret<0) ? ret : -EREMOTEIO;
@@ -511,12 +503,6 @@
 	return num;
 }
 
-static int algo_control(struct i2c_adapter *adapter, 
-	unsigned int cmd, unsigned long arg)
-{
-	return 0;
-}
-
 static u32 bit_func(struct i2c_adapter *adap)
 {
 	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR | 
@@ -530,7 +516,6 @@
 	.name		= "Bit-shift algorithm",
 	.id		= I2C_ALGO_BIT,
 	.master_xfer	= bit_xfer,
-	.algo_control	= algo_control,
 	.functionality	= bit_func,
 };
 
@@ -539,7 +524,6 @@
  */
 int i2c_bit_add_bus(struct i2c_adapter *adap)
 {
-	int i;
 	struct i2c_algo_bit_data *bit_adap = adap->algo_data;
 
 	if (bit_test) {
@@ -559,23 +543,6 @@
 	adap->timeout = 100;	/* default values, should	*/
 	adap->retries = 3;	/* be replaced by defines	*/
 
-	/* scan bus */
-	if (bit_scan) {
-		int ack;
-		printk(KERN_INFO " i2c-algo-bit.o: scanning bus %s.\n",
-		       adap->name);
-		for (i = 0x00; i < 0xff; i+=2) {
-			i2c_start(bit_adap);
-			ack = i2c_outb(adap,i);
-			i2c_stop(bit_adap);
-			if (ack>0) {
-				printk("(%02x)",i>>1); 
-			} else 
-				printk("."); 
-		}
-		printk("\n");
-	}
-
 	i2c_add_adapter(adap);
 	return 0;
 }
@@ -583,14 +550,7 @@
 
 int i2c_bit_del_bus(struct i2c_adapter *adap)
 {
-	int res;
-
-	if ((res = i2c_del_adapter(adap)) < 0)
-		return res;
-
-	DEB2(printk(KERN_DEBUG "i2c-algo-bit.o: adapter unregistered: %s\n",adap->name));
-
-	return 0;
+	return i2c_del_adapter(adap);
 }
 
 EXPORT_SYMBOL(i2c_bit_add_bus);
@@ -601,10 +561,8 @@
 MODULE_LICENSE("GPL");
 
 MODULE_PARM(bit_test, "i");
-MODULE_PARM(bit_scan, "i");
 MODULE_PARM(i2c_debug,"i");
 
 MODULE_PARM_DESC(bit_test, "Test the lines of the bus to see if it is stuck");
-MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus");
 MODULE_PARM_DESC(i2c_debug,
-            "debug level - 0 off; 1 normal; 2,3 more verbose; 9 bit-protocol");
+		 "debug level - 0 off; 1 normal; 2,3 more verbose; 9 bit-protocol");
diff -urN linux-2.5.64-bk6/drivers/i2c/i2c-algo-ibm_ocp.c linux-2.5.64-bk7/drivers/i2c/i2c-algo-ibm_ocp.c
--- linux-2.5.64-bk6/drivers/i2c/i2c-algo-ibm_ocp.c	Tue Mar  4 19:29:30 2003
+++ linux-2.5.64-bk7/drivers/i2c/i2c-algo-ibm_ocp.c	Mon Mar 31 12:29:48 2003
@@ -55,20 +55,12 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <linux/version.h>
 #include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/ioport.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
-
 #include <linux/i2c.h>
-#include "i2c-algo-ibm_ocp.h"
-//ACC#include <asm/ocp.h>
-
-#ifdef MODULE_LICENSE
-MODULE_LICENSE("GPL");
-#endif
+#include <linux/i2c-algo-ibm_ocp.h>
+#include <asm/ocp.h>
 
 
 /* ----- global defines ----------------------------------------------- */
@@ -79,26 +71,13 @@
  	/* debug the protocol by showing transferred bits */
 #define DEF_TIMEOUT 5
 
-/* debugging - slow down transfer to have a look at the data .. 	*/
-/* I use this with two leds&resistors, each one connected to sda,scl 	*/
-/* respectively. This makes sure that the algorithm works. Some chips   */
-/* might not like this, as they have an internal timeout of some mils	*/
-/*
-#define SLO_IO      jif=jiffies;while(time_before_eq(jiffies,jif+i2c_table[minor].veryslow))\
-                        if (need_resched) schedule();
-*/
-
 
 /* ----- global variables ---------------------------------------------	*/
 
-#ifdef SLO_IO
-	int jif;
-#endif
 
 /* module parameters:
  */
 static int i2c_debug=0;
-static int iic_scan=0;	/* have a look at what's hanging 'round		*/
 
 /* --- setting states on the bus with the right timing: ---------------	*/
 
@@ -758,7 +737,7 @@
         // Check to see if the bus is busy
         //
         ret = iic_inb(adap, iic->extsts);
-        // Mask off the irrelevant bits
+        // Mask off the irrelevent bits
         ret = ret & 0x70;
         // When the bus is free, the BCS bits in the EXTSTS register are 0b100
         if(ret != 0x40) return IIC_ERR_LOST_ARB;
@@ -858,17 +837,13 @@
 /* -----exported algorithm data: -------------------------------------	*/
 
 static struct i2c_algorithm iic_algo = {
-	"IBM on-chip IIC algorithm",
-	I2C_ALGO_OCP,
-	iic_xfer,
-	NULL,
-	NULL,				/* slave_xmit		*/
-	NULL,				/* slave_recv		*/
-	algo_control,			/* ioctl		*/
-	iic_func,			/* functionality	*/
+	.name		= "IBM on-chip IIC algorithm",
+	.id		= I2C_ALGO_OCP,
+	.master_xfer	= iic_xfer,
+	.algo_control	= algo_control,
+	.functionality	= iic_func,
 };
 
-
 /* 
  * registering functions to load algorithms at runtime 
  */
@@ -892,19 +867,8 @@
 	adap->timeout = 100;	/* default values, should	*/
 	adap->retries = 3;		/* be replaced by defines	*/
 
-#ifdef MODULE
-	MOD_INC_USE_COUNT;
-#endif
-
 	iic_init(iic_adap);
 	i2c_add_adapter(adap);
-
-	/* scan bus */
-	/* By default scanning the bus is turned off. */
-	if (iic_scan) {
-		printk(KERN_INFO " i2c-algo-iic.o: scanning bus %s.\n",
-		       adap->name);
-	}
 	return 0;
 }
 
@@ -914,31 +878,7 @@
 //
 int i2c_ocp_del_bus(struct i2c_adapter *adap)
 {
-	int res;
-	if ((res = i2c_del_adapter(adap)) < 0)
-		return res;
-	DEB2(printk(KERN_DEBUG "i2c-algo-iic.o: adapter unregistered: %s\n",adap->name));
-
-#ifdef MODULE
-	MOD_DEC_USE_COUNT;
-#endif
-	return 0;
-}
-
-
-//
-// Done
-//
-int __init i2c_algo_iic_init (void)
-{
-	printk(KERN_INFO "IBM On-chip iic (i2c) algorithm module 2002.27.03\n");
-	return 0;
-}
-
-
-void i2c_algo_iic_exit(void)
-{
-	return;
+	return i2c_del_adapter(adap);
 }
 
 
@@ -951,16 +891,10 @@
 //
 MODULE_AUTHOR("MontaVista Software <www.mvista.com>");
 MODULE_DESCRIPTION("PPC 405 iic algorithm");
+MODULE_LICENSE("GPL");
 
-MODULE_PARM(iic_test, "i");
-MODULE_PARM(iic_scan, "i");
 MODULE_PARM(i2c_debug,"i");
 
-MODULE_PARM_DESC(iic_test, "Test if the I2C bus is available");
-MODULE_PARM_DESC(iic_scan, "Scan for active chips on the bus");
 MODULE_PARM_DESC(i2c_debug,
         "debug level - 0 off; 1 normal; 2,3 more verbose; 9 iic-protocol");
 
-
-module_init(i2c_algo_iic_init);
-module_exit(i2c_algo_iic_exit);
diff -urN linux-2.5.64-bk6/drivers/i2c/i2c-algo-pcf.c linux-2.5.64-bk7/drivers/i2c/i2c-algo-pcf.c
--- linux-2.5.64-bk6/drivers/i2c/i2c-algo-pcf.c	Tue Mar  4 19:29:32 2003
+++ linux-2.5.64-bk7/drivers/i2c/i2c-algo-pcf.c	Mon Mar 31 12:29:48 2003
@@ -49,7 +49,6 @@
 /* module parameters:
  */
 static int i2c_debug=0;
-static int pcf_scan=0;	/* have a look at what's hanging 'round		*/
 
 /* --- setting states on the bus with the right timing: ---------------	*/
 
@@ -423,12 +422,6 @@
 	return (i);
 }
 
-static int algo_control(struct i2c_adapter *adapter, 
-	unsigned int cmd, unsigned long arg)
-{
-	return 0;
-}
-
 static u32 pcf_func(struct i2c_adapter *adap)
 {
 	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR | 
@@ -438,14 +431,10 @@
 /* -----exported algorithm data: -------------------------------------	*/
 
 static struct i2c_algorithm pcf_algo = {
-	"PCF8584 algorithm",
-	I2C_ALGO_PCF,
-	pcf_xfer,
-	NULL,
-	NULL,				/* slave_xmit		*/
-	NULL,				/* slave_recv		*/
-	algo_control,			/* ioctl		*/
-	pcf_func,			/* functionality	*/
+	.name		= "PCF8584 algorithm",
+	.id		= I2C_ALGO_PCF,
+	.master_xfer	= pcf_xfer,
+	.functionality	= pcf_func,
 };
 
 /* 
@@ -453,8 +442,8 @@
  */
 int i2c_pcf_add_bus(struct i2c_adapter *adap)
 {
-	int i, status;
 	struct i2c_algo_pcf_data *pcf_adap = adap->algo_data;
+	int rval;
 
 	DEB2(printk(KERN_DEBUG "i2c-algo-pcf.o: hw routines for %s registered.\n",
 	            adap->name));
@@ -467,36 +456,10 @@
 	adap->timeout = 100;		/* default values, should	*/
 	adap->retries = 3;		/* be replaced by defines	*/
 
-	if ((i = pcf_init_8584(pcf_adap))) {
-		return i;
-	}
-
-	i2c_add_adapter(adap);
-
-	/* scan bus */
-	if (pcf_scan) {
-		printk(KERN_INFO " i2c-algo-pcf.o: scanning bus %s.\n",
-		       adap->name);
-		for (i = 0x00; i < 0xff; i+=2) {
-			if (wait_for_bb(pcf_adap)) {
-    			printk(KERN_INFO " i2c-algo-pcf.o: scanning bus %s - TIMEOUTed.\n",
-		           adap->name);
-			    break;
-			}
-			i2c_outb(pcf_adap, i);
-			i2c_start(pcf_adap);
-			if ((wait_for_pin(pcf_adap, &status) >= 0) && 
-			    ((status & I2C_PCF_LRB) == 0)) { 
-				printk("(%02x)",i>>1); 
-			} else {
-				printk("."); 
-			}
-			i2c_stop(pcf_adap);
-			udelay(pcf_adap->udelay);
-		}
-		printk("\n");
-	}
-	return 0;
+	rval = pcf_init_8584(pcf_adap);
+	if (!rval)
+		i2c_add_adapter(adap);
+	return rval;
 }
 
 
@@ -512,9 +475,6 @@
 MODULE_DESCRIPTION("I2C-Bus PCF8584 algorithm");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(pcf_scan, "i");
 MODULE_PARM(i2c_debug,"i");
-
-MODULE_PARM_DESC(pcf_scan, "Scan for active chips on the bus");
 MODULE_PARM_DESC(i2c_debug,
         "debug level - 0 off; 1 normal; 2,3 more verbose; 9 pcf-protocol");
diff -urN linux-2.5.64-bk6/drivers/i2c/i2c-core.c linux-2.5.64-bk7/drivers/i2c/i2c-core.c
--- linux-2.5.64-bk6/drivers/i2c/i2c-core.c	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/drivers/i2c/i2c-core.c	Mon Mar 31 12:29:48 2003
@@ -21,49 +21,24 @@
    All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl>
    SMBus 2.0 support by Mark Studebaker <mdsxyz123@yahoo.com>                */
 
-/* $Id: i2c-core.c,v 1.89 2002/11/03 16:47:16 mds Exp $ */
+/* $Id: i2c-core.c,v 1.95 2003/01/22 05:25:08 kmalkki Exp $ */
 
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
 #include <linux/proc_fs.h>
-#include <linux/config.h>
 #include <linux/i2c.h>
-
-/* ----- compatibility stuff ----------------------------------------------- */
-
-#include <linux/version.h>
 #include <linux/init.h>
-
 #include <asm/uaccess.h>
 
-/* ----- global defines ---------------------------------------------------- */
-
-/* exclusive access to the bus */
-#define I2C_LOCK(adap) down(&adap->lock)
-#define I2C_UNLOCK(adap) up(&adap->lock) 
-
-#define ADAP_LOCK()	down(&adap_lock)
-#define ADAP_UNLOCK()	up(&adap_lock)
-
-#define DRV_LOCK()	down(&driver_lock)
-#define DRV_UNLOCK()	up(&driver_lock)
 
 #define DEB(x) if (i2c_debug>=1) x;
 #define DEB2(x) if (i2c_debug>=2) x;
 
-/* ----- global variables -------------------------------------------------- */
-
-/**** lock for writing to global variables: the adapter & driver list */
-static DECLARE_MUTEX(adap_lock);
-static DECLARE_MUTEX(driver_lock);
-
-/**** adapter list */
 static struct i2c_adapter *adapters[I2C_ADAP_MAX];
-
-/**** drivers list */
 static struct i2c_driver *drivers[I2C_DRIVER_MAX];
+static DECLARE_MUTEX(core_lists);
 
 /**** debug level */
 static int i2c_debug;
@@ -89,9 +64,9 @@
  */
 int i2c_add_adapter(struct i2c_adapter *adap)
 {
-	int i,j,res;
+	int res = 0, i, j;
 
-	ADAP_LOCK();
+	down(&core_lists);
 	for (i = 0; i < I2C_ADAP_MAX; i++)
 		if (NULL == adapters[i])
 			break;
@@ -99,45 +74,41 @@
 		printk(KERN_WARNING 
 		       " i2c-core.o: register_adapter(%s) - enlarge I2C_ADAP_MAX.\n",
 			adap->name);
-		goto fail;
+		res = -ENOMEM;
+		goto out_unlock;
 	}
 
-	adapters[i] = adap;
-	ADAP_UNLOCK();
-	
-	/* init data types */
-	init_MUTEX(&adap->lock);
-
 	res = i2cproc_register(adap, i);
 	if (res)
-		return res;
+		goto out_unlock;
+
+	adapters[i] = adap;
+
+	init_MUTEX(&adap->bus);
+	init_MUTEX(&adap->list);
 
 	/* inform drivers of new adapters */
-	DRV_LOCK();	
 	for (j=0;j<I2C_DRIVER_MAX;j++)
 		if (drivers[j]!=NULL && 
 		    (drivers[j]->flags&(I2C_DF_NOTIFY|I2C_DF_DUMMY)))
 			/* We ignore the return code; if it fails, too bad */
 			drivers[j]->attach_adapter(adap);
-	DRV_UNLOCK();
+	up(&core_lists);
 	
 	DEB(printk(KERN_DEBUG "i2c-core.o: adapter %s registered as adapter %d.\n",
 	           adap->name,i));
 
-	return 0;	
-
- fail:
-	ADAP_UNLOCK();
-	return -ENOMEM;
+ out_unlock:
+	up(&core_lists);
+	return res;;
 }
 
 
 int i2c_del_adapter(struct i2c_adapter *adap)
 {
-	int i,j,res;
-
-	ADAP_LOCK();
+	int res = 0, i, j;
 
+	down(&core_lists);
 	for (i = 0; i < I2C_ADAP_MAX; i++)
 		if (adap == adapters[i])
 			break;
@@ -145,7 +116,7 @@
 		printk( KERN_WARNING "i2c-core.o: unregister_adapter adap [%s] not found.\n",
 			adap->name);
 		res = -ENODEV;
-		goto ERROR0;
+		goto out_unlock;
 	}
 
 	/* DUMMY drivers do not register their clients, so we have to
@@ -153,23 +124,20 @@
 	 * *detach* it! Of course, each dummy driver should know about
 	 * this or hell will break loose...
 	 */
-	DRV_LOCK();
 	for (j = 0; j < I2C_DRIVER_MAX; j++) 
 		if (drivers[j] && (drivers[j]->flags & I2C_DF_DUMMY))
 			if ((res = drivers[j]->attach_adapter(adap))) {
 				printk(KERN_WARNING "i2c-core.o: can't detach adapter %s "
 				       "while detaching driver %s: driver not "
 				       "detached!",adap->name,drivers[j]->name);
-				goto ERROR1;	
+				goto out_unlock;
 			}
-	DRV_UNLOCK();
-
 
 	/* detach any active clients. This must be done first, because
 	 * it can fail; in which case we give upp. */
 	for (j=0;j<I2C_CLIENT_MAX;j++) {
 		struct i2c_client *client = adap->clients[j];
-		if (client!=NULL)
+		if (client!=NULL) {
 		    /* detaching devices is unconditional of the set notify
 		     * flag, as _all_ clients that reside on the adapter
 		     * must be deleted, as this would cause invalid states.
@@ -179,23 +147,19 @@
 					"unregistered, because client at "
 					"address %02x can't be detached. ",
 					adap->name, client->addr);
-				goto ERROR0;
+				goto out_unlock;
 			}
+		}
 	}
 
 	i2cproc_remove(i);
 
 	adapters[i] = NULL;
-	
-	ADAP_UNLOCK();	
+
 	DEB(printk(KERN_DEBUG "i2c-core.o: adapter unregistered: %s\n",adap->name));
-	return 0;
 
-ERROR0:
-	ADAP_UNLOCK();
-	return res;
-ERROR1:
-	DRV_UNLOCK();
+ out_unlock:
+	up(&core_lists);
 	return res;
 }
 
@@ -208,8 +172,9 @@
 
 int i2c_add_driver(struct i2c_driver *driver)
 {
-	int i;
-	DRV_LOCK();
+	int res = 0, i;
+
+	down(&core_lists);
 	for (i = 0; i < I2C_DRIVER_MAX; i++)
 		if (NULL == drivers[i])
 			break;
@@ -218,35 +183,34 @@
 		       " i2c-core.o: register_driver(%s) "
 		       "- enlarge I2C_DRIVER_MAX.\n",
 			driver->name);
-		DRV_UNLOCK();
-		return -ENOMEM;
+		res = -ENOMEM;
+		goto out_unlock;
 	}
 
 	drivers[i] = driver;
 	
-	DRV_UNLOCK();	/* driver was successfully added */
-	
 	DEB(printk(KERN_DEBUG "i2c-core.o: driver %s registered.\n",driver->name));
 	
-	ADAP_LOCK();
-
 	/* now look for instances of driver on our adapters
 	 */
 	if (driver->flags& (I2C_DF_NOTIFY|I2C_DF_DUMMY)) {
-		for (i=0;i<I2C_ADAP_MAX;i++)
+		for (i=0;i<I2C_ADAP_MAX;i++) {
 			if (adapters[i]!=NULL)
 				/* Ignore errors */
 				driver->attach_adapter(adapters[i]);
+		}
 	}
-	ADAP_UNLOCK();
-	return 0;
+
+ out_unlock:
+	up(&core_lists);
+	return res;
 }
 
 int i2c_del_driver(struct i2c_driver *driver)
 {
-	int i,j,k,res;
+	int res = 0, i, j, k;
 
-	DRV_LOCK();
+	down(&core_lists);
 	for (i = 0; i < I2C_DRIVER_MAX; i++)
 		if (driver == drivers[i])
 			break;
@@ -254,19 +218,20 @@
 		printk(KERN_WARNING " i2c-core.o: unregister_driver: "
 				    "[%s] not found\n",
 			driver->name);
-		DRV_UNLOCK();
-		return -ENODEV;
+		res = -ENODEV;
+		goto out_unlock;
 	}
+
 	/* Have a look at each adapter, if clients of this driver are still
 	 * attached. If so, detach them to be able to kill the driver 
 	 * afterwards.
 	 */
 	DEB2(printk(KERN_DEBUG "i2c-core.o: unregister_driver - looking for clients.\n"));
+
 	/* removing clients does not depend on the notify flag, else 
 	 * invalid operation might (will!) result, when using stale client
 	 * pointers.
 	 */
-	ADAP_LOCK(); /* should be moved inside the if statement... */
 	for (k=0;k<I2C_ADAP_MAX;k++) {
 		struct i2c_adapter *adap = adapters[k];
 		if (adap == NULL) /* skip empty entries. */
@@ -285,8 +250,7 @@
 				       "not be detached properly; driver "
 				       "not unloaded!",driver->name,
 				       adap->name);
-				ADAP_UNLOCK();
-				return res;
+				goto out_unlock;
 			}
 		} else {
 			for (j=0;j<I2C_CLIENT_MAX;j++) { 
@@ -309,37 +273,51 @@
 						       driver->name,
 						       client->addr,
 						       adap->name);
-						ADAP_UNLOCK();
-						return res;
+						goto out_unlock;
 					}
 				}
 			}
 		}
 	}
-	ADAP_UNLOCK();
 	drivers[i] = NULL;
-	DRV_UNLOCK();
 	
 	DEB(printk(KERN_DEBUG "i2c-core.o: driver unregistered: %s\n",driver->name));
+
+ out_unlock:
+	up(&core_lists);
 	return 0;
 }
 
-int i2c_check_addr (struct i2c_adapter *adapter, int addr)
+static int __i2c_check_addr(struct i2c_adapter *adapter, int addr)
 {
 	int i;
-	for (i = 0; i < I2C_CLIENT_MAX ; i++) 
+
+	for (i = 0; i < I2C_CLIENT_MAX ; i++)
 		if (adapter->clients[i] && (adapter->clients[i]->addr == addr))
 			return -EBUSY;
+
 	return 0;
 }
 
+int i2c_check_addr(struct i2c_adapter *adapter, int addr)
+{
+	int rval;
+
+	down(&adapter->list);
+	rval = __i2c_check_addr(adapter, addr);
+	up(&adapter->list);
+
+	return rval;
+}
+
 int i2c_attach_client(struct i2c_client *client)
 {
 	struct i2c_adapter *adapter = client->adapter;
-	int i;
+	int res =  -EBUSY, i;
 
-	if (i2c_check_addr(client->adapter,client->addr))
-		return -EBUSY;
+	down(&adapter->list);
+	if (__i2c_check_addr(client->adapter,client->addr))
+		goto out_unlock_list;
 
 	for (i = 0; i < I2C_CLIENT_MAX; i++)
 		if (NULL == adapter->clients[i])
@@ -348,11 +326,12 @@
 		printk(KERN_WARNING 
 		       " i2c-core.o: attach_client(%s) - enlarge I2C_CLIENT_MAX.\n",
 			client->name);
-		return -ENOMEM;
+		res = -ENOMEM;
+		goto out_unlock_list;
 	}
 
 	adapter->clients[i] = client;
-	adapter->client_count++;
+	up(&adapter->list);
 	
 	if (adapter->client_register) 
 		if (adapter->client_register(client)) 
@@ -366,39 +345,45 @@
 		client->usage_count = 0;
 	
 	return 0;
+
+ out_unlock_list:
+	up(&adapter->list);
+	return res;
 }
 
 
 int i2c_detach_client(struct i2c_client *client)
 {
 	struct i2c_adapter *adapter = client->adapter;
-	int i,res;
+	int res = 0, i;
+	
+	if ((client->flags & I2C_CLIENT_ALLOW_USE) && (client->usage_count > 0))
+		return -EBUSY;
 
-	for (i = 0; i < I2C_CLIENT_MAX; i++)
+	if (adapter->client_unregister)  {
+		res = adapter->client_unregister(client);
+		if (res) {
+			printk(KERN_ERR "i2c-core.o: client_unregister [%s] failed, "
+			       "client not detached",client->name);
+			return res;
+		}
+	}
+
+	down(&adapter->list);
+	for (i = 0; i < I2C_CLIENT_MAX; i++) {
 		if (client == adapter->clients[i])
 			break;
+	}
+
 	if (I2C_CLIENT_MAX == i) {
 		printk(KERN_WARNING " i2c-core.o: unregister_client "
 				    "[%s] not found\n",
 			client->name);
 		return -ENODEV;
-	}
-	
-	if( (client->flags & I2C_CLIENT_ALLOW_USE) && 
-	    (client->usage_count>0))
-		return -EBUSY;
-	
-	if (adapter->client_unregister != NULL) 
-		if ((res = adapter->client_unregister(client))) {
-			printk(KERN_ERR "i2c-core.o: client_unregister [%s] failed, "
-			       "client not detached",client->name);
-			return res;
-		}
-
-	adapter->clients[i] = NULL;
-	adapter->client_count--;
+	} else
+		adapter->clients[i] = NULL;
+	up(&adapter->list);
 
-	DEB(printk(KERN_DEBUG "i2c-core.o: client [%s] unregistered.\n",client->name));
 	return 0;
 }
 
@@ -470,8 +455,12 @@
 {
 	int i;
 	int nr = 0;
+
 	/* Note that it is safe to write a `little' beyond len. Yes, really. */
-	for (i = 0; (i < I2C_ADAP_MAX) && (nr < len); i++)
+	/* Fuck you.  Will convert this to seq_file later.  --hch */
+
+	down(&core_lists);
+	for (i = 0; (i < I2C_ADAP_MAX) && (nr < len); i++) {
 		if (adapters[i]) {
 			nr += sprintf(buf+nr, "i2c-%d\t", i);
 			if (adapters[i]->algo->smbus_xfer) {
@@ -487,6 +476,9 @@
 			              adapters[i]->name,
 			              adapters[i]->algo->name);
 		}
+	}
+	up(&core_lists);
+
 	return nr;
 }
 
@@ -587,9 +579,8 @@
 	remove_proc_entry(name, proc_bus);
 }
 
-static int i2cproc_init(void)
+static int __init i2cproc_init(void)
 {
-
 	struct proc_dir_entry *proc_bus_i2c;
 
 	proc_bus_i2c = create_proc_entry("i2c",0,proc_bus);
@@ -625,9 +616,9 @@
  	 	DEB2(printk(KERN_DEBUG "i2c-core.o: master_xfer: %s with %d msgs.\n",
 		            adap->name,num));
 
-		I2C_LOCK(adap);
+		down(&adap->bus);
 		ret = adap->algo->master_xfer(adap,msgs,num);
-		I2C_UNLOCK(adap);
+		up(&adap->bus);
 
 		return ret;
 	} else {
@@ -652,9 +643,9 @@
 		DEB2(printk(KERN_DEBUG "i2c-core.o: master_send: writing %d bytes on %s.\n",
 			count,client->adapter->name));
 	
-		I2C_LOCK(adap);
+		down(&adap->bus);
 		ret = adap->algo->master_xfer(adap,&msg,1);
-		I2C_UNLOCK(adap);
+		up(&adap->bus);
 
 		/* if everything went ok (i.e. 1 msg transmitted), return #bytes
 		 * transmitted, else error code.
@@ -682,9 +673,9 @@
 		DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: reading %d bytes on %s.\n",
 			count,client->adapter->name));
 	
-		I2C_LOCK(adap);
+		down(&adap->bus);
 		ret = adap->algo->master_xfer(adap,&msg,1);
-		I2C_UNLOCK(adap);
+		up(&adap->bus);
 	
 		DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: return:%d (count:%d, addr:0x%02x)\n",
 			ret, count, client->addr));
@@ -1299,10 +1290,10 @@
 	}
 
 	if (adapter->algo->smbus_xfer) {
-		I2C_LOCK(adapter);
+		down(&adapter->bus);
 		res = adapter->algo->smbus_xfer(adapter,addr,flags,read_write,
 		                                command,size,data);
-		I2C_UNLOCK(adapter);
+		up(&adapter->bus);
 	} else
 		res = i2c_smbus_xfer_emulated(adapter,addr,flags,read_write,
 	                                      command,size,data);
diff -urN linux-2.5.64-bk6/drivers/media/radio/miropcm20-rds.c linux-2.5.64-bk7/drivers/media/radio/miropcm20-rds.c
--- linux-2.5.64-bk6/drivers/media/radio/miropcm20-rds.c	Tue Mar  4 19:28:58 2003
+++ linux-2.5.64-bk7/drivers/media/radio/miropcm20-rds.c	Mon Mar 31 12:29:48 2003
@@ -12,8 +12,9 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
-#include <asm/uaccess.h>
+#include <linux/miscdevice.h>
 #include <linux/devfs_fs_kernel.h>
+#include <asm/uaccess.h>
 #include "miropcm20-rds-core.h"
 
 static char * text_buffer;
@@ -103,28 +104,39 @@
 	}
 }
 
-static struct file_operations rds_f_ops = {
+static struct file_operations rds_fops = {
 	.owner		= THIS_MODULE,
 	.read		= rds_f_read,
 	.open		= rds_f_open,
 	.release	= rds_f_release
 };
 
+static struct miscdevice rds_miscdev = {
+	.minor		= MISC_DYNAMIC_MINOR,
+	.name		= "radiotext"
+	.fops		= &rds_fops,
+};
 
 static int __init miropcm20_rds_init(void)
 {
-	if (!devfs_register(NULL, "v4l/rds/radiotext", 
-				   DEVFS_FL_DEFAULT | DEVFS_FL_AUTO_DEVNUM,
-				   0, 0, S_IRUGO | S_IFCHR, &rds_f_ops, NULL))
-		return -EINVAL;
+	int error;
 
-	printk("miropcm20-rds: userinterface driver loaded.\n");
-	return 0;
+	error = misc_register(&rds_miscdev);
+	if (error)
+		return error;
+
+	error = devfs_mk_symlink(NULL, "v4l/rds/radiotext", 0,
+				 "../misc/radiotext", NULL, NULL);
+	if (error)
+		misc_deregister(&rds_miscdev)
+
+	return error;
 }
 
 static void __exit miropcm20_rds_cleanup(void)
 {
 	devfs_remove("v4l/rds/radiotext");
+	misc_deregister(&rds_miscdev)
 }
 
 module_init(miropcm20_rds_init);
diff -urN linux-2.5.64-bk6/drivers/serial/68328serial.h linux-2.5.64-bk7/drivers/serial/68328serial.h
--- linux-2.5.64-bk6/drivers/serial/68328serial.h	Tue Mar  4 19:29:36 2003
+++ linux-2.5.64-bk7/drivers/serial/68328serial.h	Mon Mar 31 12:29:49 2003
@@ -161,8 +161,8 @@
 	int			xmit_head;
 	int			xmit_tail;
 	int			xmit_cnt;
-	struct workqueue	tqueue;
-	struct workqueue	tqueue_hangup;
+	struct work_struct	tqueue;
+	struct work_struct	tqueue_hangup;
 	struct termios		normal_termios;
 	struct termios		callout_termios;
 	wait_queue_head_t	open_wait;
diff -urN linux-2.5.64-bk6/drivers/serial/68360serial.c linux-2.5.64-bk7/drivers/serial/68360serial.c
--- linux-2.5.64-bk6/drivers/serial/68360serial.c	Tue Mar  4 19:29:52 2003
+++ linux-2.5.64-bk7/drivers/serial/68360serial.c	Mon Mar 31 12:29:49 2003
@@ -74,8 +74,6 @@
 static char *serial_name = "CPM UART driver";
 static char *serial_version = "0.03";
 
-static DECLARE_TASK_QUEUE(tq_serial);
-
 static struct tty_driver serial_driver, callout_driver;
 static int serial_refcount;
 int serial_console_setup(struct console *co, char *options);
@@ -243,7 +241,7 @@
 	int			magic;
 	int			flags;
 
-	struct serial_state		*state;
+	struct serial_state	*state;
  	/* struct serial_struct	*state; */
  	/* struct async_struct	*state; */
 	
@@ -261,12 +259,10 @@
 	int			blocked_open; /* # of blocked opens */
 	long			session; /* Session of opening process */
 	long			pgrp; /* pgrp of opening process */
-	struct tq_struct	tqueue;
-	struct tq_struct	tqueue_hangup;
+	struct work_struct	tqueue;
+	struct work_struct	tqueue_hangup;
  	wait_queue_head_t	open_wait; 
  	wait_queue_head_t	close_wait; 
-/*	struct wait_queue     *open_wait; */
-/*	struct wait_queue	   *close_wait;i */
 
 	
 /* CPM Buffer Descriptor pointers.
@@ -324,7 +320,7 @@
 #elif defined(CONFIG_CONSOLE_115200)
   #define CONSOLE_BAUDRATE 115200
 #else
-  #warn "console baud rate undefined"
+  #warning "console baud rate undefined"
   #define CONSOLE_BAUDRATE 9600
 #endif
 
@@ -405,18 +401,6 @@
  * -----------------------------------------------------------------------
  */
 
-/*
- * This routine is used by the interrupt handler to schedule
- * processing in the software interrupt portion of the driver.
- */
-static _INLINE_ void rs_sched_event(ser_info_t *info,
-				  int event)
-{
-	info->event |= 1 << event;
-	queue_task(&info->tqueue, &tq_serial);
-	mark_bh(SERIAL_BH);
-}
-
 static _INLINE_ void receive_chars(ser_info_t *info)
 {
 	struct tty_struct *tty = info->tty;
@@ -556,7 +540,7 @@
 
 	info->rx_cur = (QUICC_BD *)bdp;
 
-	queue_task(&tty->flip.tqueue, &tq_timer);
+	schedule_work(&tty->flip.work);
 }
 
 static _INLINE_ void receive_break(ser_info_t *info)
@@ -573,7 +557,7 @@
 	*(tty->flip.char_buf_ptr++) = 0;
 	tty->flip.count++;
 
-	queue_task(&tty->flip.tqueue, &tq_timer);
+	schedule_work(&tty->flip.work);
 }
 
 static _INLINE_ void transmit_chars(ser_info_t *info)
@@ -581,7 +565,7 @@
 
 	if ((info->flags & TX_WAKEUP) ||
 	    (info->tty->flags & (1 << TTY_DO_WRITE_WAKEUP))) {
-		rs_sched_event(info, RS_EVENT_WRITE_WAKEUP);
+		schedule_work(&info->tqueue);
 	}
 
 #ifdef SERIAL_DEBUG_INTR
@@ -717,19 +701,6 @@
  * -------------------------------------------------------------------
  */
 
-/*
- * This routine is used to handle the "bottom half" processing for the
- * serial driver, known also the "software interrupt" processing.
- * This processing is done at the kernel interrupt level, after the
- * rs_interrupt() has returned, BUT WITH INTERRUPTS TURNED ON.  This
- * is where time-consuming activities which can not be done in the
- * interrupt driver proper are done; the interrupt driver schedules
- * them using rs_sched_event(), and they get done here.
- */
-static void do_serial_bh(void)
-{
-	run_task_queue(&tq_serial);
-}
 
 static void do_softint(void *private_)
 {
@@ -749,8 +720,6 @@
 }
 
 
-
-
 /*
  * This routine is called from the scheduler tqueue when the interrupt
  * routine has signalled that a hangup has occurred.  The path of
@@ -772,11 +741,6 @@
 	tty_hangup(tty);
 }
 
-/*static void rs_360_timer(void)
-{
-	printk("rs_360_timer\n");
-}*/
-
 
 static int startup(ser_info_t *info)
 {
@@ -1841,7 +1805,7 @@
 	 */
 	char_time = 1;
 	if (timeout)
-		char_time = min(char_time, timeout);
+		char_time = min(char_time, (unsigned long)timeout);
 #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
 	printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
 	printk("jiff=%lu...", jiffies);
@@ -2078,7 +2042,7 @@
 	ser_info_t	*info;
 	int 		retval, line;
 
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = minor(tty->device) - tty->driver.minor_start;
 	if ((line < 0) || (line >= NR_PORTS))
 		return -ENODEV;
 	retval = get_async_struct(line, &info);
@@ -2612,8 +2576,6 @@
 	volatile	struct uart_pram	*sup;
 	/* volatile	immap_t		*immap; */
 	
-	init_bh(SERIAL_BH, do_serial_bh);
-
 	show_serial_version();
 
 	/* Initialize the tty_driver structure */
@@ -2763,17 +2725,14 @@
 		/* info = kmalloc(sizeof(ser_info_t), GFP_KERNEL); */
 		info = &quicc_ser_info[i];
 		if (info) {
-			/* __clear_user(info,sizeof(ser_info_t)); */
 			memset (info, 0, sizeof(ser_info_t));
-			init_waitqueue_head(&info->open_wait);
-			init_waitqueue_head(&info->close_wait);
 			info->magic = SERIAL_MAGIC;
-			info->flags = state->flags;
-			info->tqueue.routine = do_softint;
-			info->tqueue.data = info;
-			info->tqueue_hangup.routine = do_serial_hangup;
-			info->tqueue_hangup.data = info;
 			info->line = i;
+			info->flags = state->flags;
+			INIT_WORK(&info->tqueue, do_softint, info);
+			INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info);
+			init_waitqueue_head(&info->open_wait);
+			init_waitqueue_head(&info->close_wait);
 			info->state = state;
 			state->info = (struct async_struct *)info;
 
@@ -2818,15 +2777,6 @@
 				*(uint *)_periph_base = sipex_mode_bits;
 				/* printk ("sipex bits = 0x%08x\n", sipex_mode_bits); */
 #endif
-
-				scp = &pquicc->scc_regs[idx];
-				sup = &pquicc->pram[info->state->port].scc.pscc.u;
-				sup->rbase = dp_addr;
-			}
-			else {
-				sp = &cp->smc_regs[idx];
-				up = &pquicc->pram[info->state->port].scc.pothers.idma_smc.psmc.u;
-				up->rbase = dp_addr;
 			}
 
 			dp_addr = m360_cpm_dpalloc(sizeof(QUICC_BD) * TX_NUM_FIFO);
@@ -2856,6 +2806,9 @@
 			bdp->status = (BD_SC_WRAP | BD_SC_INTRPT);
 
 			if (info->state->smc_scc_num & NUM_IS_SCC) {
+				scp = &pquicc->scc_regs[idx];
+				sup = &pquicc->pram[info->state->port].scc.pscc.u;
+				sup->rbase = dp_addr;
 				sup->tbase = dp_addr;
 
 				/* Set up the uart parameters in the
@@ -2919,6 +2872,8 @@
 				/* Configure SMCs Tx/Rx instead of port B
 				 * parallel I/O.
 				 */
+				up = &pquicc->pram[info->state->port].scc.pothers.idma_smc.psmc.u;
+				up->rbase = dp_addr;
 
 				iobits = 0xc0 << (idx * 4);
 				cp->pip_pbpar |= iobits;
@@ -2964,6 +2919,7 @@
 				/* Set UART mode, 8 bit, no parity, one stop.
 				 * Enable receive and transmit.
 				 */
+				sp = &cp->smc_regs[idx];
 				sp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART;
 
 				/* Disable all interrupts and clear all pending
@@ -3008,8 +2964,7 @@
 int serial_console_setup( struct console *co, char *options)
 {
 	struct		serial_state	*ser;
-	uint       mem_addr, dp_addr, bidx, idx, iobits;
-	int i;
+	uint		mem_addr, dp_addr, bidx, idx, iobits;
 	ushort		chan;
 	QUICC_BD	*bdp;
 	volatile	QUICC			*cp;
@@ -3038,18 +2993,11 @@
 
 	idx = PORT_NUM(ser->smc_scc_num);
 	if (ser->smc_scc_num & NUM_IS_SCC) {
-		scp = &cp->scc_regs[idx];
-		/* sup = (scc_uart_t *)&cp->cp_dparam[ser->port]; */
-		sup = &pquicc->pram[ser->port].scc.pscc.u;
 
 		/* TODO: need to set up SCC pin assignment etc. here */
 		
 	}
 	else {
-		sp = &cp->smc_regs[idx];
-		/* up = (smc_uart_t *)&cp->cp_dparam[ser->port]; */
-		up = &pquicc->pram[ser->port].scc.pothers.idma_smc.psmc.u;
-
 		iobits = 0xc0 << (idx * 4);
 		cp->pip_pbpar |= iobits;
 		cp->pip_pbdir &= ~iobits;
@@ -3096,6 +3044,9 @@
 	/* Set up the uart parameters in the parameter ram.
 	 */
 	if (ser->smc_scc_num & NUM_IS_SCC) {
+		scp = &cp->scc_regs[idx];
+		/* sup = (scc_uart_t *)&cp->cp_dparam[ser->port]; */
+		sup = &pquicc->pram[ser->port].scc.pscc.u;
 
 		sup->rbase = dp_addr;
 		sup->tbase = dp_addr + sizeof(QUICC_BD);
@@ -3153,6 +3104,9 @@
 
 	}
 	else {
+		/* up = (smc_uart_t *)&cp->cp_dparam[ser->port]; */
+		up = &pquicc->pram[ser->port].scc.pothers.idma_smc.psmc.u;
+
 		up->rbase = dp_addr;	/* Base of receive buffer desc. */
 		up->tbase = dp_addr+sizeof(QUICC_BD);	/* Base of xmt buffer desc. */
 		up->rfcr = SMC_EB;
@@ -3167,12 +3121,12 @@
 		*/
 		chan = smc_chan_map[idx];
 		cp->cp_cr = mk_cr_cmd(chan, CPM_CR_INIT_TRX) | CPM_CR_FLG;
-		printk("");
 		while (cp->cp_cr & CPM_CR_FLG);
 
 		/* Set UART mode, 8 bit, no parity, one stop.
 		 * Enable receive and transmit.
 		 */
+		sp = &cp->smc_regs[idx];
 		sp->smc_smcmr = smcr_mk_clen(9) |  SMCMR_SM_UART;
 
 		/* And finally, enable Rx and Tx.
diff -urN linux-2.5.64-bk6/drivers/serial/Kconfig linux-2.5.64-bk7/drivers/serial/Kconfig
--- linux-2.5.64-bk6/drivers/serial/Kconfig	Tue Mar  4 19:29:37 2003
+++ linux-2.5.64-bk7/drivers/serial/Kconfig	Mon Mar 31 12:29:49 2003
@@ -412,9 +412,10 @@
 	help
 	  This driver supports the SCC serial ports of the Motorola 68360 CPU.
 
-config 68360_SERIAL
+config SERIAL_68360
 	bool
-	depends on SERIAL_68360_SMC || SERIAL_68630_SCC
+	depends on SERIAL_68360_SMC || SERIAL_68360_SCC
+	default y
 
 endmenu
 
diff -urN linux-2.5.64-bk6/drivers/usb/storage/sddr09.c linux-2.5.64-bk7/drivers/usb/storage/sddr09.c
--- linux-2.5.64-bk6/drivers/usb/storage/sddr09.c	Tue Mar  4 19:29:33 2003
+++ linux-2.5.64-bk7/drivers/usb/storage/sddr09.c	Mon Mar 31 12:29:49 2003
@@ -65,6 +65,7 @@
  * NAND Flash Manufacturer ID Codes
  */
 #define NAND_MFR_AMD		0x01
+#define NAND_MFR_NS		0x8f
 #define NAND_MFR_TOSHIBA	0x98
 #define NAND_MFR_SAMSUNG	0xec
 
@@ -72,6 +73,8 @@
 	switch(manuf_id) {
 	case NAND_MFR_AMD:
 		return "AMD";
+	case NAND_MFR_NS:
+		return "NS";
 	case NAND_MFR_TOSHIBA:
 		return "Toshiba";
 	case NAND_MFR_SAMSUNG:
@@ -84,10 +87,12 @@
 /*
  * It looks like it is unnecessary to attach manufacturer to the
  * remaining data: SSFDC prescribes manufacturer-independent id codes.
+ *
+ * 256 MB NAND flash has a 5-byte ID with 2nd byte 0xaa, 0xba, 0xca or 0xda.
  */
 
 static struct nand_flash_dev nand_flash_ids[] = {
-	/* NAND flash - these I verified */
+	/* NAND flash */
 	{ 0x6e, 20, 8, 4, 8, 2},	/* 1 MB */
 	{ 0xe8, 20, 8, 4, 8, 2},	/* 1 MB */
 	{ 0xec, 20, 8, 4, 8, 2},	/* 1 MB */
@@ -101,12 +106,13 @@
 	{ 0x75, 25, 9, 5, 10, 2},	/* 32 MB */
 	{ 0x76, 26, 9, 5, 10, 3},	/* 64 MB */
 	{ 0x79, 27, 9, 5, 10, 3},	/* 128 MB */
-	/* There do also exist 96 MB (from Datafab) and 256 MB cards */
 
-	/* MASK ROM - from unknown source */
+	/* MASK ROM */
 	{ 0x5d, 21, 9, 4, 8, 2},	/* 2 MB */
 	{ 0xd5, 22, 9, 4, 9, 2},	/* 4 MB */
 	{ 0xd6, 23, 9, 4, 10, 2},	/* 8 MB */
+	{ 0x57, 24, 9, 4, 11, 2},	/* 16 MB */
+	{ 0x58, 25, 9, 4, 12, 2},	/* 32 MB */
 	{ 0,}
 };
 
diff -urN linux-2.5.64-bk6/drivers/video/Makefile linux-2.5.64-bk7/drivers/video/Makefile
--- linux-2.5.64-bk6/drivers/video/Makefile	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/drivers/video/Makefile	Mon Mar 31 12:29:49 2003
@@ -19,6 +19,7 @@
 obj-$(CONFIG_FB_APOLLO)           += dnfb.o cfbfillrect.o cfbimgblt.o
 obj-$(CONFIG_FB_Q40)              += q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
 obj-$(CONFIG_FB_ATARI)            += atafb.o
+obj-$(CONFIG_FB_68328)            += 68328fb.o
 obj-$(CONFIG_FB_ATY128)           += aty128fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
 obj-$(CONFIG_FB_RADEON)		  += radeonfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
 obj-$(CONFIG_FB_NEOMAGIC)         += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
diff -urN linux-2.5.64-bk6/fs/compat.c linux-2.5.64-bk7/fs/compat.c
--- linux-2.5.64-bk6/fs/compat.c	Tue Mar  4 19:29:18 2003
+++ linux-2.5.64-bk7/fs/compat.c	Mon Mar 31 12:29:49 2003
@@ -75,36 +75,6 @@
 	return error;
 }
 
-int get_compat_flock(struct flock *kfl, struct compat_flock *ufl)
-{
-	int err;
-
-	if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)))
-		return -EFAULT;
-
-	err = __get_user(kfl->l_type, &ufl->l_type);
-	err |= __get_user(kfl->l_whence, &ufl->l_whence);
-	err |= __get_user(kfl->l_start, &ufl->l_start);
-	err |= __get_user(kfl->l_len, &ufl->l_len);
-	err |= __get_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
-int put_compat_flock(struct flock *kfl, struct compat_flock *ufl)
-{
-	int err;
-
-	if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)))
-		return -EFAULT;
-
-	err = __put_user(kfl->l_type, &ufl->l_type);
-	err |= __put_user(kfl->l_whence, &ufl->l_whence);
-	err |= __put_user(kfl->l_start, &ufl->l_start);
-	err |= __put_user(kfl->l_len, &ufl->l_len);
-	err |= __put_user(kfl->l_pid, &ufl->l_pid);
-	return err;
-}
-
 static int put_compat_statfs(struct compat_statfs *ubuf, struct statfs *kbuf)
 {
 	if (verify_area(VERIFY_WRITE, ubuf, sizeof(*ubuf)) ||
@@ -159,3 +129,120 @@
 out:
 	return error;
 }
+
+static int get_compat_flock(struct flock *kfl, struct compat_flock *ufl)
+{
+	if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)) ||
+	    __get_user(kfl->l_type, &ufl->l_type) ||
+	    __get_user(kfl->l_whence, &ufl->l_whence) ||
+	    __get_user(kfl->l_start, &ufl->l_start) ||
+	    __get_user(kfl->l_len, &ufl->l_len) ||
+	    __get_user(kfl->l_pid, &ufl->l_pid))
+		return -EFAULT;
+	return 0;
+}
+
+static int put_compat_flock(struct flock *kfl, struct compat_flock *ufl)
+{
+	if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)) ||
+	    __put_user(kfl->l_type, &ufl->l_type) ||
+	    __put_user(kfl->l_whence, &ufl->l_whence) ||
+	    __put_user(kfl->l_start, &ufl->l_start) ||
+	    __put_user(kfl->l_len, &ufl->l_len) ||
+	    __put_user(kfl->l_pid, &ufl->l_pid))
+		return -EFAULT;
+	return 0;
+}
+
+static int get_compat_flock64(struct flock *kfl, struct compat_flock64 *ufl)
+{
+	if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)) ||
+	    __get_user(kfl->l_type, &ufl->l_type) ||
+	    __get_user(kfl->l_whence, &ufl->l_whence) ||
+	    __get_user(kfl->l_start, &ufl->l_start) ||
+	    __get_user(kfl->l_len, &ufl->l_len) ||
+	    __get_user(kfl->l_pid, &ufl->l_pid))
+		return -EFAULT;
+	return 0;
+}
+
+static int put_compat_flock64(struct flock *kfl, struct compat_flock64 *ufl)
+{
+	if (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)) ||
+	    __put_user(kfl->l_type, &ufl->l_type) ||
+	    __put_user(kfl->l_whence, &ufl->l_whence) ||
+	    __put_user(kfl->l_start, &ufl->l_start) ||
+	    __put_user(kfl->l_len, &ufl->l_len) ||
+	    __put_user(kfl->l_pid, &ufl->l_pid))
+		return -EFAULT;
+	return 0;
+}
+
+extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);
+
+asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd,
+		unsigned long arg)
+{
+	mm_segment_t old_fs;
+	struct flock f;
+	long ret;
+
+	switch (cmd) {
+	case F_GETLK:
+	case F_SETLK:
+	case F_SETLKW:
+		ret = get_compat_flock(&f, (struct compat_flock *)arg);
+		if (ret != 0)
+			break;
+		old_fs = get_fs();
+		set_fs(KERNEL_DS);
+		ret = sys_fcntl(fd, cmd, (unsigned long)&f);
+		set_fs(old_fs);
+		if ((cmd == F_GETLK) && (ret == 0)) {
+			if ((f.l_start >= COMPAT_OFF_T_MAX) ||
+			    ((f.l_start + f.l_len) >= COMPAT_OFF_T_MAX))
+				ret = -EOVERFLOW;
+			if (ret == 0)
+				ret = put_compat_flock(&f,
+						(struct compat_flock *)arg);
+		}
+		break;
+
+	case F_GETLK64:
+	case F_SETLK64:
+	case F_SETLKW64:
+		ret = get_compat_flock64(&f, (struct compat_flock64 *)arg);
+		if (ret != 0)
+			break;
+		old_fs = get_fs();
+		set_fs(KERNEL_DS);
+		ret = sys_fcntl(fd, F_GETLK, (unsigned long)&f);
+		ret = sys_fcntl(fd, (cmd == F_GETLK64) ? F_GETLK :
+				((cmd == F_SETLK64) ? F_SETLK : F_SETLKW),
+				(unsigned long)&f);
+		set_fs(old_fs);
+		if ((cmd == F_GETLK64) && (ret == 0)) {
+			if ((f.l_start >= COMPAT_LOFF_T_MAX) ||
+			    ((f.l_start + f.l_len) >= COMPAT_LOFF_T_MAX))
+				ret = -EOVERFLOW;
+			if (ret == 0)
+				ret = put_compat_flock64(&f,
+						(struct compat_flock64 *)arg);
+		}
+		break;
+
+	default:
+		ret = sys_fcntl(fd, cmd, arg);
+		break;
+	}
+	return ret;
+}
+
+asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
+		unsigned long arg)
+{
+	if ((cmd == F_GETLK64) || (cmd == F_SETLK64) || (cmd == F_SETLKW64))
+		return -EINVAL;
+	return compat_sys_fcntl64(fd, cmd, arg);
+}
+
diff -urN linux-2.5.64-bk6/fs/devfs/base.c linux-2.5.64-bk7/fs/devfs/base.c
--- linux-2.5.64-bk6/fs/devfs/base.c	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/fs/devfs/base.c	Mon Mar 31 12:29:49 2003
@@ -762,12 +762,6 @@
     unsigned char no_more_additions:1;
 };
 
-struct file_type
-{
-    struct file_operations *ops;
-    unsigned long size;
-};
-
 struct bdev_type
 {
     struct block_device_operations *ops;
@@ -809,7 +803,6 @@
     union 
     {
 	struct directory_type dir;
-	struct file_type file;
 	struct bdev_type bdev;
 	struct cdev_type cdev;
 	struct symlink_type symlink;
@@ -1506,8 +1499,6 @@
 	de->u.cdev.autogen = devnum != 0;
 	de->u.bdev.ops = ops;
 	if (flags & DEVFS_FL_REMOVABLE) de->u.bdev.removable = TRUE;
-    } else if ( S_ISREG (mode) ) {
-	de->u.file.ops = ops;
     } else {
 	PRINTK ("(%s): illegal mode: %x\n", name, mode);
 	devfs_put (de);
@@ -1810,18 +1801,9 @@
 
 static struct file_operations *devfs_get_ops (devfs_handle_t de)
 {
-    struct module *owner;
-    struct file_operations *ops;
+    struct file_operations *ops = de->u.cdev.ops;
+    struct module *owner = ops->owner;
 
-    if (de == NULL) return NULL;
-    VERIFY_ENTRY (de);
-    if (S_ISCHR (de->mode))
-	ops = de->u.cdev.ops;
-    else
-	ops = de->u.file.ops;
-    if (!ops)
-	return NULL;
-    owner = ops->owner;
     read_lock (&de->parent->u.dir.lock);  /*  Prevent module from unloading  */
     if ( (de->next == de) || !try_module_get (owner) )
     {   /*  Entry is already unhooked or module is unloading  */
@@ -1833,28 +1815,6 @@
 }   /*  End Function devfs_get_ops  */
 
 /**
- *	devfs_set_file_size - Set the file size for a devfs regular file.
- *	@de: The handle to the device entry.
- *	@size: The new file size.
- *
- *	Returns 0 on success, else a negative error code.
- */
-
-int devfs_set_file_size (devfs_handle_t de, unsigned long size)
-{
-    if (de == NULL) return -EINVAL;
-    VERIFY_ENTRY (de);
-    if ( !S_ISREG (de->mode) ) return -EINVAL;
-    if (de->u.file.size == size) return 0;
-    de->u.file.size = size;
-    if (de->inode.dentry == NULL) return 0;
-    if (de->inode.dentry->d_inode == NULL) return 0;
-    de->inode.dentry->d_inode->i_size = size;
-    return 0;
-}   /*  End Function devfs_set_file_size  */
-
-
-/**
  *	devfs_setup - Process kernel boot options.
  *	@str: The boot options after the "devfs=".
  */
@@ -2164,11 +2124,8 @@
 	if (bd_acquire (inode) != 0)
 		PRINTK ("(%d): no block device from bdget()\n",(int)inode->i_ino);
     }
-    else if ( S_ISFIFO (de->mode) ) inode->i_fop = &def_fifo_fops;
-    else if ( S_ISREG (de->mode) )
-    {
-	inode->i_size = de->u.file.size;
-    }
+    else if ( S_ISFIFO (de->mode) )
+    	inode->i_fop = &def_fifo_fops;
     else if ( S_ISDIR (de->mode) )
     {
 	inode->i_op = &devfs_dir_iops;
@@ -2281,15 +2238,6 @@
 	}
 	else
 	    err = chrdev_open (inode, file);
-    } else if (S_ISREG(inode->i_mode)) {
-	ops = devfs_get_ops (de);  /*  Now have module refcount  */
-	file->f_op = ops;
-	if (file->f_op)
-	{
-	    lock_kernel ();
-	    err = file->f_op->open ? (*file->f_op->open) (inode, file) : 0;
-	    unlock_kernel ();
-	}
     }
     return err;
 }   /*  End Function devfs_open  */
diff -urN linux-2.5.64-bk6/fs/jfs/jfs_logmgr.c linux-2.5.64-bk7/fs/jfs/jfs_logmgr.c
--- linux-2.5.64-bk6/fs/jfs/jfs_logmgr.c	Tue Mar  4 19:29:19 2003
+++ linux-2.5.64-bk7/fs/jfs/jfs_logmgr.c	Mon Mar 31 12:29:49 2003
@@ -674,28 +674,29 @@
 	}
 	jfs_info("lmGroup Commit: tblk = 0x%p, gcrtc = %d", tblk, log->gcrtc);
 
-	if (tblk->xflag & COMMIT_LAZY) {
-		/*
-		 * Lazy transactions can leave now
-		 */
+	if (tblk->xflag & COMMIT_LAZY)
 		tblk->flag |= tblkGC_LAZY;
-		LOGGC_UNLOCK(log);
-		return 0;
-	}
-	/*
-	 * group commit pageout in progress
-	 */
-	if ((!(log->cflag & logGC_PAGEOUT)) && log->cqueue.head) {
+
+	if ((!(log->cflag & logGC_PAGEOUT)) && log->cqueue.head &&
+	    (!(tblk->xflag & COMMIT_LAZY) || test_bit(log_FLUSH, &log->flag))) {
 		/*
-		 * only transaction in the commit queue:
+		 * No pageout in progress
 		 *
-		 * start one-transaction group commit as
-		 * its group leader.
+		 * start group commit as its group leader.
 		 */
 		log->cflag |= logGC_PAGEOUT;
 
 		lmGCwrite(log, 0);
 	}
+
+	if (tblk->xflag & COMMIT_LAZY) {
+		/*
+		 * Lazy transactions can leave now
+		 */
+		LOGGC_UNLOCK(log);
+		return 0;
+	}
+
 	/* lmGCwrite gives up LOGGC_LOCK, check again */
 
 	if (tblk->flag & tblkGC_COMMITTED) {
@@ -894,11 +895,8 @@
 	 * the first transaction entering group commit
 	 * will elect herself as new group leader.
 	 */
-	else {
+	else
 		log->cflag &= ~logGC_PAGEOUT;
-		clear_bit(log_FLUSH, &log->flag);
-		WARN_ON(log->flush_tblk);
-	}
 
 	//LOGGC_UNLOCK(log);
 	spin_unlock_irqrestore(&log->gclock, flags);
diff -urN linux-2.5.64-bk6/fs/jfs/jfs_txnmgr.c linux-2.5.64-bk7/fs/jfs/jfs_txnmgr.c
--- linux-2.5.64-bk6/fs/jfs/jfs_txnmgr.c	Tue Mar  4 19:29:23 2003
+++ linux-2.5.64-bk7/fs/jfs/jfs_txnmgr.c	Mon Mar 31 12:29:49 2003
@@ -518,22 +518,24 @@
 	/*
 	 * mark the tblock not active
 	 */
-	--log->active;
+	if (--log->active == 0) {
+		clear_bit(log_FLUSH, &log->flag);
 
-	/*
-	 * synchronize with logsync barrier
-	 */
-	if (test_bit(log_SYNCBARRIER, &log->flag) && log->active == 0) {
-		/* forward log syncpt */
-		/* lmSync(log); */
+		/*
+		 * synchronize with logsync barrier
+		 */
+		if (test_bit(log_SYNCBARRIER, &log->flag)) {
+			/* forward log syncpt */
+			/* lmSync(log); */
 
-		jfs_info("     log barrier off: 0x%x", log->lsn);
+			jfs_info("log barrier off: 0x%x", log->lsn);
 
-		/* enable new transactions start */
-		clear_bit(log_SYNCBARRIER, &log->flag);
+			/* enable new transactions start */
+			clear_bit(log_SYNCBARRIER, &log->flag);
 
-		/* wakeup all waitors for logsync barrier */
-		TXN_WAKEUP(&log->syncwait);
+			/* wakeup all waitors for logsync barrier */
+			TXN_WAKEUP(&log->syncwait);
+		}
 	}
 
 	/*
diff -urN linux-2.5.64-bk6/fs/sysfs/dir.c linux-2.5.64-bk7/fs/sysfs/dir.c
--- linux-2.5.64-bk6/fs/sysfs/dir.c	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/fs/sysfs/dir.c	Mon Mar 31 12:29:49 2003
@@ -98,7 +98,6 @@
 			 * Unlink and unhash.
 			 */
 			spin_unlock(&dcache_lock);
-			d_delete(d);
 			simple_unlink(dentry->d_inode,d);
 			dput(d);
 			spin_lock(&dcache_lock);
@@ -108,16 +107,11 @@
 	}
 	spin_unlock(&dcache_lock);
 	up(&dentry->d_inode->i_sem);
-	d_invalidate(dentry);
-	simple_rmdir(parent->d_inode,dentry);
 	d_delete(dentry);
+	simple_rmdir(parent->d_inode,dentry);
 
 	pr_debug(" o %s removing done (%d)\n",dentry->d_name.name,
 		 atomic_read(&dentry->d_count));
-	/**
-	 * Drop reference from initial sysfs_get_dentry().
-	 */
-	dput(dentry);
 
 	/**
 	 * Drop reference from dget() on entrance.
diff -urN linux-2.5.64-bk6/fs/sysfs/inode.c linux-2.5.64-bk7/fs/sysfs/inode.c
--- linux-2.5.64-bk6/fs/sysfs/inode.c	Tue Mar  4 19:29:33 2003
+++ linux-2.5.64-bk7/fs/sysfs/inode.c	Mon Mar 31 12:29:49 2003
@@ -93,19 +93,14 @@
 		/* make sure dentry is really there */
 		if (victim->d_inode && 
 		    (victim->d_parent->d_inode == dir->d_inode)) {
-			simple_unlink(dir->d_inode,victim);
-			d_delete(victim);
-
 			pr_debug("sysfs: Removing %s (%d)\n", victim->d_name.name,
 				 atomic_read(&victim->d_count));
-			/*
-			 * Drop reference from initial sysfs_get_dentry().
-			 */
-			dput(victim);
+
+			simple_unlink(dir->d_inode,victim);
+
 		}
-		
-		/**
-		 * Drop the reference acquired from sysfs_get_dentry() above.
+		/*
+		 * Drop reference from sysfs_get_dentry() above.
 		 */
 		dput(victim);
 	}
diff -urN linux-2.5.64-bk6/include/asm-m68knommu/pci.h linux-2.5.64-bk7/include/asm-m68knommu/pci.h
--- linux-2.5.64-bk6/include/asm-m68knommu/pci.h	Tue Mar  4 19:29:34 2003
+++ linux-2.5.64-bk7/include/asm-m68knommu/pci.h	Mon Mar 31 12:29:49 2003
@@ -1 +1,33 @@
+#ifndef M68KNOMMU_PCI_H
+#define	M68KNOMMU_PCI_H
+
 #include <asm-m68k/pci.h>
+
+#ifdef CONFIG_COMEMPCI
+/*
+ *	These are pretty much arbitary with the CoMEM implementation.
+ *	We have the whole address space to ourselves.
+ */
+#define PCIBIOS_MIN_IO		0x100
+#define PCIBIOS_MIN_MEM		0x00010000
+
+/*
+ * Return whether the given PCI device DMA address mask can
+ * be supported properly.  For example, if your device can
+ * only drive the low 24-bits during PCI bus mastering, then
+ * you would pass 0x00ffffff as the mask to this function.
+ */
+static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
+{
+	return 1;
+}
+
+/*
+ * Not supporting more than 32-bit PCI bus addresses now, but
+ * must satisfy references to this function.  Change if needed.
+ */
+#define pci_dac_dma_supported(pci_dev, mask) (0)
+
+#endif /* CONFIG_COMEMPCI */
+
+#endif /* M68KNOMMU_PCI_H */
diff -urN linux-2.5.64-bk6/include/asm-parisc/compat.h linux-2.5.64-bk7/include/asm-parisc/compat.h
--- linux-2.5.64-bk6/include/asm-parisc/compat.h	Tue Mar  4 19:29:58 2003
+++ linux-2.5.64-bk7/include/asm-parisc/compat.h	Mon Mar 31 12:29:49 2003
@@ -72,6 +72,14 @@
 	compat_pid_t		l_pid;
 };
 
+struct compat_flock64 {
+	short			l_type;
+	short			l_whence;
+	compat_loff_t		l_start;
+	compat_loff_t		l_len;
+	compat_pid_t		l_pid;
+};
+
 struct compat_statfs {
 	s32		f_type;
 	s32		f_bsize;
@@ -92,4 +100,7 @@
 
 typedef u32		compat_sigset_word;
 
+#define COMPAT_OFF_T_MAX	0x7fffffff
+#define COMPAT_LOFF_T_MAX	0x7fffffffffffffffL
+
 #endif /* _ASM_PARISC_COMPAT_H */
diff -urN linux-2.5.64-bk6/include/asm-s390x/compat.h linux-2.5.64-bk7/include/asm-s390x/compat.h
--- linux-2.5.64-bk6/include/asm-s390x/compat.h	Tue Mar  4 19:29:18 2003
+++ linux-2.5.64-bk7/include/asm-s390x/compat.h	Mon Mar 31 12:29:49 2003
@@ -64,7 +64,18 @@
 	compat_off_t	l_start;
 	compat_off_t	l_len;
 	compat_pid_t	l_pid;
-	short		__unused;
+};
+
+#define F_GETLK64       12
+#define F_SETLK64       13
+#define F_SETLKW64      14    
+
+struct compat_flock64 {
+	short		l_type;
+	short		l_whence;
+	compat_loff_t	l_start;
+	compat_loff_t	l_len;
+	compat_pid_t	l_pid;
 };
 
 struct compat_statfs {
@@ -87,4 +98,7 @@
 
 typedef u32		compat_sigset_word;
 
+#define COMPAT_OFF_T_MAX	0x7fffffff
+#define COMPAT_LOFF_T_MAX	0x7fffffffffffffffL
+
 #endif /* _ASM_S390X_COMPAT_H */
diff -urN linux-2.5.64-bk6/include/asm-s390x/fcntl.h linux-2.5.64-bk7/include/asm-s390x/fcntl.h
--- linux-2.5.64-bk6/include/asm-s390x/fcntl.h	Tue Mar  4 19:29:34 2003
+++ linux-2.5.64-bk7/include/asm-s390x/fcntl.h	Mon Mar 31 12:29:49 2003
@@ -80,6 +80,4 @@
 
 #define F_LINUX_SPECIFIC_BASE  1024
 
-#define flock64   flock
-
 #endif
diff -urN linux-2.5.64-bk6/include/asm-sparc64/compat.h linux-2.5.64-bk7/include/asm-sparc64/compat.h
--- linux-2.5.64-bk6/include/asm-sparc64/compat.h	Tue Mar  4 19:29:24 2003
+++ linux-2.5.64-bk7/include/asm-sparc64/compat.h	Mon Mar 31 12:29:49 2003
@@ -64,6 +64,19 @@
 	short		__unused;
 };
 
+#define F_GETLK64	12
+#define F_SETLK64	13
+#define F_SETLKW64	14
+
+struct compat_flock64 {
+	short		l_type;
+	short		l_whence;
+	compat_loff_t	l_start;
+	compat_loff_t	l_len;
+	compat_pid_t	l_pid;
+	short		__unused;
+};
+
 struct compat_statfs {
 	int		f_type;
 	int		f_bsize;
@@ -84,4 +97,7 @@
 
 typedef u32		compat_sigset_word;
 
+#define COMPAT_OFF_T_MAX	0x7fffffff
+#define COMPAT_LOFF_T_MAX	0x7fffffffffffffffL
+
 #endif /* _ASM_SPARC64_COMPAT_H */
diff -urN linux-2.5.64-bk6/include/asm-sparc64/fcntl.h linux-2.5.64-bk7/include/asm-sparc64/fcntl.h
--- linux-2.5.64-bk6/include/asm-sparc64/fcntl.h	Tue Mar  4 19:29:52 2003
+++ linux-2.5.64-bk7/include/asm-sparc64/fcntl.h	Mon Mar 31 12:29:49 2003
@@ -36,12 +36,6 @@
 #define F_SETSIG	10	/*  for sockets. */
 #define F_GETSIG	11	/*  for sockets. */
 
-#ifdef __KERNEL__
-#define F_GETLK64	12
-#define F_SETLK64	13
-#define F_SETLKW64	14
-#endif
-
 /* for F_[GET|SET]FL */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */
 
@@ -78,9 +72,6 @@
 	short __unused;
 };
 
-#ifdef __KERNEL__
-#define flock64	flock
-#endif
-
 #define F_LINUX_SPECIFIC_BASE	1024
+
 #endif /* !(_SPARC64_FCNTL_H) */
diff -urN linux-2.5.64-bk6/include/asm-x86_64/compat.h linux-2.5.64-bk7/include/asm-x86_64/compat.h
--- linux-2.5.64-bk6/include/asm-x86_64/compat.h	Tue Mar  4 19:29:31 2003
+++ linux-2.5.64-bk7/include/asm-x86_64/compat.h	Mon Mar 31 12:29:49 2003
@@ -68,6 +68,22 @@
 	compat_pid_t	l_pid;
 };
 
+#define F_GETLK64	12	/*  using 'struct flock64' */
+#define F_SETLK64	13
+#define F_SETLKW64	14
+
+/*
+ * IA32 uses 4 byte alignment for 64 bit quantities,
+ * so we need to pack this structure.
+ */
+struct compat_flock64 {
+	short		l_type;
+	short		l_whence;
+	compat_loff_t	l_start;
+	compat_loff_t	l_len;
+	compat_pid_t	l_pid;
+} __attribute__((packed));
+
 struct compat_statfs {
 	int		f_type;
 	int		f_bsize;
@@ -88,4 +104,7 @@
 
 typedef u32               compat_sigset_word;
 
+#define COMPAT_OFF_T_MAX	0x7fffffff
+#define COMPAT_LOFF_T_MAX	0x7fffffffffffffff
+
 #endif /* _ASM_X86_64_COMPAT_H */
diff -urN linux-2.5.64-bk6/include/asm-x86_64/fcntl.h linux-2.5.64-bk7/include/asm-x86_64/fcntl.h
--- linux-2.5.64-bk6/include/asm-x86_64/fcntl.h	Tue Mar  4 19:29:02 2003
+++ linux-2.5.64-bk7/include/asm-x86_64/fcntl.h	Mon Mar 31 12:29:49 2003
@@ -72,8 +72,4 @@
 
 #define F_LINUX_SPECIFIC_BASE	1024
 
-#ifdef __KERNEL__
-#define flock64	flock
-#endif
-
 #endif /* !_X86_64_FCNTL_H */
diff -urN linux-2.5.64-bk6/include/asm-x86_64/ia32.h linux-2.5.64-bk7/include/asm-x86_64/ia32.h
--- linux-2.5.64-bk6/include/asm-x86_64/ia32.h	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/include/asm-x86_64/ia32.h	Mon Mar 31 12:29:49 2003
@@ -11,18 +11,6 @@
  * 32 bit structures for IA32 support.
  */
 
-struct ia32_flock64 {
-	short  l_type;
-	short  l_whence;
-	loff_t l_start;  /* unnatural alignment */
-	loff_t l_len;
-	pid_t  l_pid;
-} __attribute__((packed));
-
-#define F_GETLK64	12	/*  using 'struct flock64' */
-#define F_SETLK64	13
-#define F_SETLKW64	14
-
 #include <asm/sigcontext32.h>
 
 /* signal.h */
diff -urN linux-2.5.64-bk6/include/asm-x86_64/uaccess.h linux-2.5.64-bk7/include/asm-x86_64/uaccess.h
--- linux-2.5.64-bk6/include/asm-x86_64/uaccess.h	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/include/asm-x86_64/uaccess.h	Mon Mar 31 12:29:49 2003
@@ -48,7 +48,7 @@
 
 #define access_ok(type,addr,size) (__range_not_ok(addr,size) == 0)
 
-extern __force_inline int verify_area(int type, const void * addr, unsigned long size)
+extern inline int verify_area(int type, const void * addr, unsigned long size)
 {
 	return access_ok(type,addr,size) ? 0 : -EFAULT;
 }
@@ -238,7 +238,7 @@
 extern unsigned long copy_to_user(void *to, const void *from, unsigned len); 
 extern unsigned long copy_from_user(void *to, const void *from, unsigned len); 
 
-static __force_inline int __copy_from_user(void *dst, const void *src, unsigned size) 
+static inline int __copy_from_user(void *dst, const void *src, unsigned size) 
 { 
 	if (!__builtin_constant_p(size))
 		return copy_user_generic(dst,src,size);
@@ -267,7 +267,7 @@
 	}
 }	
 
-static __force_inline int __copy_to_user(void *dst, const void *src, unsigned size) 
+static inline int __copy_to_user(void *dst, const void *src, unsigned size) 
 { 
 	if (!__builtin_constant_p(size))
 		return copy_user_generic(dst,src,size);
diff -urN linux-2.5.64-bk6/include/linux/compat.h linux-2.5.64-bk7/include/linux/compat.h
--- linux-2.5.64-bk6/include/linux/compat.h	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/include/linux/compat.h	Mon Mar 31 12:29:49 2003
@@ -10,7 +10,6 @@
 
 #include <linux/stat.h>
 #include <linux/param.h>	/* for HZ */
-#include <linux/fcntl.h>	/* for struct flock */
 #include <asm/compat.h>
 
 #define compat_jiffies_to_clock_t(x)	\
@@ -40,8 +39,6 @@
 } compat_sigset_t;
 
 extern int cp_compat_stat(struct kstat *, struct compat_stat *);
-extern int get_compat_flock(struct flock *, struct compat_flock *);
-extern int put_compat_flock(struct flock *, struct compat_flock *);
 extern int get_compat_timespec(struct timespec *, struct compat_timespec *);
 extern int put_compat_timespec(struct timespec *, struct compat_timespec *);
 
diff -urN linux-2.5.64-bk6/include/linux/devfs_fs_kernel.h linux-2.5.64-bk7/include/linux/devfs_fs_kernel.h
--- linux-2.5.64-bk6/include/linux/devfs_fs_kernel.h	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/include/linux/devfs_fs_kernel.h	Mon Mar 31 12:29:49 2003
@@ -49,7 +49,6 @@
 extern devfs_handle_t devfs_mk_dir (devfs_handle_t dir, const char *name,
 				    void *info);
 extern int devfs_generate_path (devfs_handle_t de, char *path, int buflen);
-extern int devfs_set_file_size (devfs_handle_t de, unsigned long size);
 extern int devfs_register_tape (devfs_handle_t de);
 extern void devfs_unregister_tape(int num);
 extern int devfs_alloc_unique_number (struct unique_numspace *space);
@@ -104,10 +103,6 @@
 {
     return -ENOSYS;
 }
-static inline int devfs_set_file_size (devfs_handle_t de, unsigned long size)
-{
-    return -ENOSYS;
-}
 static inline int devfs_register_tape (devfs_handle_t de)
 {
     return -1;
diff -urN linux-2.5.64-bk6/include/linux/device.h linux-2.5.64-bk7/include/linux/device.h
--- linux-2.5.64-bk6/include/linux/device.h	Tue Mar  4 19:29:35 2003
+++ linux-2.5.64-bk7/include/linux/device.h	Mon Mar 31 12:29:49 2003
@@ -79,6 +79,8 @@
 extern int bus_register(struct bus_type * bus);
 extern void bus_unregister(struct bus_type * bus);
 
+extern int bus_rescan_devices(struct bus_type * bus);
+
 extern struct bus_type * get_bus(struct bus_type * bus);
 extern void put_bus(struct bus_type * bus);
 
diff -urN linux-2.5.64-bk6/include/linux/eisa.h linux-2.5.64-bk7/include/linux/eisa.h
--- linux-2.5.64-bk6/include/linux/eisa.h	Tue Mar  4 19:29:33 2003
+++ linux-2.5.64-bk7/include/linux/eisa.h	Mon Mar 31 12:29:49 2003
@@ -20,7 +20,8 @@
 
 /* The EISA signature, in ASCII form, null terminated */
 struct eisa_device_id {
-	char sig[EISA_SIG_LEN];
+	char          sig[EISA_SIG_LEN];
+	unsigned long driver_data;
 };
 
 /* There is not much we can say about an EISA device, apart from
diff -urN linux-2.5.64-bk6/include/linux/fs.h linux-2.5.64-bk7/include/linux/fs.h
--- linux-2.5.64-bk6/include/linux/fs.h	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/include/linux/fs.h	Mon Mar 31 12:29:49 2003
@@ -526,8 +526,10 @@
 extern int fcntl_getlk(struct file *, struct flock *);
 extern int fcntl_setlk(struct file *, unsigned int, struct flock *);
 
+#if BITS_PER_LONG == 32
 extern int fcntl_getlk64(struct file *, struct flock64 *);
 extern int fcntl_setlk64(struct file *, unsigned int, struct flock64 *);
+#endif
 
 /* fs/locks.c */
 extern void locks_init_lock(struct file_lock *);
diff -urN linux-2.5.64-bk6/include/linux/i2c-id.h linux-2.5.64-bk7/include/linux/i2c-id.h
--- linux-2.5.64-bk6/include/linux/i2c-id.h	Tue Mar  4 19:28:57 2003
+++ linux-2.5.64-bk7/include/linux/i2c-id.h	Mon Mar 31 12:29:49 2003
@@ -20,7 +20,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.		     */
 /* ------------------------------------------------------------------------- */
 
-/* $Id: i2c-id.h,v 1.63 2003/01/21 08:08:16 kmalkki Exp $ */
+/* $Id: i2c-id.h,v 1.68 2003/02/25 02:55:18 mds Exp $ */
 
 #ifndef LINUX_I2C_ID_H
 #define LINUX_I2C_ID_H
@@ -150,6 +150,7 @@
 #define I2C_DRIVERID_BMCSENSORS 1036
 #define I2C_DRIVERID_FS451 1037
 #define I2C_DRIVERID_W83627HF 1038
+#define I2C_DRIVERID_LM85 1039
 
 /*
  * ---- Adapter types ----------------------------------------------------
@@ -171,6 +172,7 @@
 #define I2C_ALGO_MPC824X 0x0a0000	/* Motorola 8240 / 8245         */
 #define I2C_ALGO_IPMI 	0x0b0000	/* IPMI dummy adapter */
 #define I2C_ALGO_IPMB 	0x0c0000	/* IPMB adapter */
+#define I2C_ALGO_MPC107 0x0d0000
 #define I2C_ALGO_EC     0x100000        /* ACPI embedded controller     */
 
 #define I2C_ALGO_MPC8XX 0x110000	/* MPC8xx PowerPC I2C algorithm */
@@ -209,6 +211,8 @@
 #define I2C_HW_B_IOC	0x11	/* IOC bit-wiggling			*/
 #define I2C_HW_B_TSUNA  0x12	/* DEC Tsunami chipset			*/
 #define I2C_HW_B_FRODO  0x13    /* 2d3D, Inc. SA-1110 Development Board */
+#define I2C_HW_B_OMAHA  0x14    /* Omaha I2C interface (ARM)		*/
+#define I2C_HW_B_GUIDE  0x15    /* Guide bit-basher			*/
 
 /* --- PCF 8584 based algorithms					*/
 #define I2C_HW_P_LP	0x00	/* Parallel port interface		*/
@@ -244,6 +248,7 @@
 #define I2C_HW_SMBUS_SIS645	0x09
 #define I2C_HW_SMBUS_AMD8111	0x0a
 #define I2C_HW_SMBUS_SCX200	0x0b
+#define I2C_HW_SMBUS_NFORCE2	0x0c
 
 /* --- ISA pseudo-adapter						*/
 #define I2C_HW_ISA 0x00
@@ -254,4 +259,7 @@
 /* --- IPMB adapter						*/
 #define I2C_HW_IPMB 0x00
 
+/* --- MCP107 adapter */
+#define I2C_HW_MPC107 0x00
+
 #endif /* LINUX_I2C_ID_H */
diff -urN linux-2.5.64-bk6/include/linux/i2c.h linux-2.5.64-bk7/include/linux/i2c.h
--- linux-2.5.64-bk6/include/linux/i2c.h	Tue Mar  4 19:29:01 2003
+++ linux-2.5.64-bk7/include/linux/i2c.h	Mon Mar 31 12:29:49 2003
@@ -220,11 +220,11 @@
 			/* and can be set via the i2c_ioctl call	*/
 
 			/* data fields that are valid for all devices	*/
-	struct semaphore lock;  
+	struct semaphore bus;
+	struct semaphore list;  
 	unsigned int flags;/* flags specifying div. data		*/
 
 	struct i2c_client *clients[I2C_CLIENT_MAX];
-	int client_count;
 
 	int timeout;
 	int retries;
diff -urN linux-2.5.64-bk6/include/linux/list.h linux-2.5.64-bk7/include/linux/list.h
--- linux-2.5.64-bk6/include/linux/list.h	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/include/linux/list.h	Mon Mar 31 12:29:49 2003
@@ -3,6 +3,7 @@
 
 #ifdef __KERNEL__
 
+#include <linux/stddef.h>
 #include <linux/prefetch.h>
 #include <linux/stddef.h>
 #include <asm/system.h>
diff -urN linux-2.5.64-bk6/include/linux/mm.h linux-2.5.64-bk7/include/linux/mm.h
--- linux-2.5.64-bk6/include/linux/mm.h	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/include/linux/mm.h	Mon Mar 31 12:29:49 2003
@@ -410,8 +410,6 @@
 void clear_page_tables(struct mmu_gather *tlb, unsigned long first, int nr);
 int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
 			struct vm_area_struct *vma);
-int remap_page_range(struct vm_area_struct *vma, unsigned long from,
-			unsigned long to, unsigned long size, pgprot_t prot);
 int zeromap_page_range(struct vm_area_struct *vma, unsigned long from,
 			unsigned long size, pgprot_t prot);
 
@@ -426,7 +424,6 @@
 extern int sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long nonblock);
 
 
-extern struct page * follow_page(struct mm_struct *mm, unsigned long address, int write);
 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
 		int len, int write, int force, struct page **pages, struct vm_area_struct **vmas);
 
@@ -539,10 +536,11 @@
 static inline int
 can_vma_merge(struct vm_area_struct *vma, unsigned long vm_flags)
 {
+#ifdef CONFIG_MMU
 	if (!vma->vm_file && vma->vm_flags == vm_flags)
 		return 1;
-	else
-		return 0;
+#endif
+	return 0;
 }
 
 /* filemap.c */
@@ -596,10 +594,31 @@
 
 extern struct vm_area_struct *find_extend_vma(struct mm_struct *mm, unsigned long addr);
 
-extern struct page * vmalloc_to_page(void *addr);
 extern unsigned long get_page_cache_size(void);
 extern unsigned int nr_used_zone_pages(void);
 
+#ifdef CONFIG_MMU
+extern struct page * vmalloc_to_page(void *addr);
+extern struct page * follow_page(struct mm_struct *mm, unsigned long address,
+		int write);
+extern int remap_page_range(struct vm_area_struct *vma, unsigned long from,
+		unsigned long to, unsigned long size, pgprot_t prot);
+#else
+static inline struct page * vmalloc_to_page(void *addr)
+{
+	return NULL;
+}
+static inline struct page * follow_page(struct mm_struct *mm,
+		unsigned long address, int write)
+{
+	return NULL;
+}
+static inline int remap_page_range(struct vm_area_struct *vma,
+		unsigned long from, unsigned long to,
+		unsigned long size, pgprot_t prot)
+{
+	return -EPERM;
+}
+#endif /* CONFIG_MMU */
 #endif /* __KERNEL__ */
-
-#endif
+#endif /* _LINUX_MM_H */
diff -urN linux-2.5.64-bk6/mm/slab.c linux-2.5.64-bk7/mm/slab.c
--- linux-2.5.64-bk6/mm/slab.c	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/mm/slab.c	Mon Mar 31 12:29:49 2003
@@ -2041,11 +2041,16 @@
 
 unsigned int kmem_cache_size(kmem_cache_t *cachep)
 {
+	unsigned int objlen = cachep->objsize;
+
 #if DEBUG
 	if (cachep->flags & SLAB_RED_ZONE)
-		return (cachep->objsize - 2*BYTES_PER_WORD);
+		objlen -= 2*BYTES_PER_WORD;
+	if (cachep->flags & SLAB_STORE_USER)
+		objlen -= BYTES_PER_WORD;
 #endif
-	return cachep->objsize;
+
+	return objlen;
 }
 
 kmem_cache_t * kmem_find_general_cachep (size_t size, int gfpflags)
diff -urN linux-2.5.64-bk6/net/ipv4/igmp.c linux-2.5.64-bk7/net/ipv4/igmp.c
--- linux-2.5.64-bk6/net/ipv4/igmp.c	Mon Mar 31 12:29:46 2003
+++ linux-2.5.64-bk7/net/ipv4/igmp.c	Mon Mar 31 12:29:49 2003
@@ -255,30 +255,22 @@
 {
 	struct ip_mc_list *im=(struct ip_mc_list *)data;
 	struct in_device *in_dev = im->interface;
-	int err;
 
 	spin_lock(&im->lock);
 	im->tm_running=0;
 
-	if (IGMP_V1_SEEN(in_dev))
-		err = igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
-	else
-		err = igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);
-
-	/* Failed. Retry later. */
-	if (err) {
-		if (!in_dev->dead)
-			igmp_start_timer(im, IGMP_Unsolicited_Report_Interval);
-		goto out;
-	}
-
 	if (im->unsolicit_count) {
 		im->unsolicit_count--;
 		igmp_start_timer(im, IGMP_Unsolicited_Report_Interval);
 	}
 	im->reporter = 1;
-out:
 	spin_unlock(&im->lock);
+
+	if (IGMP_V1_SEEN(in_dev))
+		igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_MEMBERSHIP_REPORT);
+	else
+		igmp_send_report(in_dev->dev, im->multiaddr, IGMP_HOST_NEW_MEMBERSHIP_REPORT);
+
 	ip_ma_put(im);
 }
 
diff -urN linux-2.5.64-bk6/net/ipv4/netfilter/arptable_filter.c linux-2.5.64-bk7/net/ipv4/netfilter/arptable_filter.c
--- linux-2.5.64-bk6/net/ipv4/netfilter/arptable_filter.c	Tue Mar  4 19:28:53 2003
+++ linux-2.5.64-bk7/net/ipv4/netfilter/arptable_filter.c	Mon Mar 31 12:29:49 2003
@@ -111,9 +111,14 @@
     }
 };
 
-static struct arpt_table packet_filter
-= { { NULL, NULL }, "filter", &initial_table.repl,
-    FILTER_VALID_HOOKS, RW_LOCK_UNLOCKED, NULL, THIS_MODULE };
+static struct arpt_table packet_filter = {
+	.name		= "filter",
+	.table		= &initial_table.repl,
+	.valid_hooks	= FILTER_VALID_HOOKS,
+	.lock		= RW_LOCK_UNLOCKED,
+	.private	= NULL,
+	.me		= THIS_MODULE,
+};
 
 /* The work comes in here from netfilter.c */
 static unsigned int arpt_hook(unsigned int hook,
@@ -125,9 +130,17 @@
 	return arpt_do_table(pskb, hook, in, out, &packet_filter, NULL);
 }
 
-static struct nf_hook_ops arpt_ops[]
-= { { { NULL, NULL }, arpt_hook, NF_ARP, NF_ARP_IN, 0 },
-    { { NULL, NULL }, arpt_hook, NF_ARP, NF_ARP_OUT, 0 }
+static struct nf_hook_ops arpt_ops[] = {
+	{
+		.hook		= arpt_hook,
+		.pf		= NF_ARP,
+		.hooknum	= NF_ARP_IN,
+	},
+	{
+		.hook		= arpt_hook,
+		.pf		= NF_ARP,
+		.hooknum	= NF_ARP_OUT,
+	}
 };
 
 static int __init init(void)
diff -urN linux-2.5.64-bk6/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.5.64-bk7/net/ipv4/netfilter/ip_conntrack_standalone.c
--- linux-2.5.64-bk6/net/ipv4/netfilter/ip_conntrack_standalone.c	Tue Mar  4 19:29:17 2003
+++ linux-2.5.64-bk7/net/ipv4/netfilter/ip_conntrack_standalone.c	Mon Mar 31 12:29:49 2003
@@ -226,17 +226,34 @@
 
 /* Connection tracking may drop packets, but never alters them, so
    make it the first hook. */
-static struct nf_hook_ops ip_conntrack_in_ops
-= { { NULL, NULL }, ip_conntrack_in, PF_INET, NF_IP_PRE_ROUTING,
-	NF_IP_PRI_CONNTRACK };
-static struct nf_hook_ops ip_conntrack_local_out_ops
-= { { NULL, NULL }, ip_conntrack_local, PF_INET, NF_IP_LOCAL_OUT,
-	NF_IP_PRI_CONNTRACK };
+static struct nf_hook_ops ip_conntrack_in_ops = {
+	.hook		= ip_conntrack_in,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_PRE_ROUTING,
+	.priority	= NF_IP_PRI_CONNTRACK,
+};
+
+static struct nf_hook_ops ip_conntrack_local_out_ops = {
+	.hook		= ip_conntrack_local,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_LOCAL_OUT,
+	.priority	= NF_IP_PRI_CONNTRACK,
+};
+
 /* Refragmenter; last chance. */
-static struct nf_hook_ops ip_conntrack_out_ops
-= { { NULL, NULL }, ip_refrag, PF_INET, NF_IP_POST_ROUTING, NF_IP_PRI_LAST };
-static struct nf_hook_ops ip_conntrack_local_in_ops
-= { { NULL, NULL }, ip_confirm, PF_INET, NF_IP_LOCAL_IN, NF_IP_PRI_LAST-1 };
+static struct nf_hook_ops ip_conntrack_out_ops = {
+	.hook		= ip_refrag,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_POST_ROUTING,
+	.priority	= NF_IP_PRI_LAST,
+};
+
+static struct nf_hook_ops ip_conntrack_local_in_ops = {
+	.hook		= ip_confirm,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_LOCAL_IN,
+	.priority	= NF_IP_PRI_LAST-1,
+};
 
 static int init_or_cleanup(int init)
 {
diff -urN linux-2.5.64-bk6/net/ipv4/netfilter/ip_fw_compat.c linux-2.5.64-bk7/net/ipv4/netfilter/ip_fw_compat.c
--- linux-2.5.64-bk6/net/ipv4/netfilter/ip_fw_compat.c	Tue Mar  4 19:29:16 2003
+++ linux-2.5.64-bk7/net/ipv4/netfilter/ip_fw_compat.c	Mon Mar 31 12:29:49 2003
@@ -216,21 +216,40 @@
 	return -ip_fw_ctl(optval, &tmp_fw, len);
 }
 
-static struct nf_hook_ops preroute_ops
-= { { NULL, NULL }, fw_in, PF_INET, NF_IP_PRE_ROUTING, NF_IP_PRI_FILTER };
-
-static struct nf_hook_ops postroute_ops
-= { { NULL, NULL }, fw_in, PF_INET, NF_IP_POST_ROUTING, NF_IP_PRI_FILTER };
-
-static struct nf_hook_ops forward_ops
-= { { NULL, NULL }, fw_in, PF_INET, NF_IP_FORWARD, NF_IP_PRI_FILTER };
-
-static struct nf_hook_ops local_in_ops
-= { { NULL, NULL }, fw_confirm, PF_INET, NF_IP_LOCAL_IN, NF_IP_PRI_LAST - 1 };
-
-static struct nf_sockopt_ops sock_ops
-= { { NULL, NULL }, PF_INET, 64, 64 + 1024 + 1, &sock_fn, 0, 0, NULL,
-    0, NULL };
+static struct nf_hook_ops preroute_ops = {
+	.hook		= fw_in,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_PRE_ROUTING,
+	.priority	= NF_IP_PRI_FILTER,
+};
+
+static struct nf_hook_ops postroute_ops = {
+	.hook		= fw_in,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_POST_ROUTING,
+	.priority	= NF_IP_PRI_FILTER,
+};
+
+static struct nf_hook_ops forward_ops = {
+	.hook		= fw_in,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_FORWARD,
+	.priority	= NF_IP_PRI_FILTER,
+};
+
+static struct nf_hook_ops local_in_ops = {
+	.hook		= fw_confirm,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_LOCAL_IN,
+	.priority	= NF_IP_PRI_LAST - 1,
+};
+
+static struct nf_sockopt_ops sock_ops = {
+	.pf		= PF_INET,
+	.set_optmin	= 64,
+	.set_optmax	= 64 + 1024 + 1,
+	.set		= &sock_fn,
+};
 
 extern int ipfw_init_or_cleanup(int init);
 
diff -urN linux-2.5.64-bk6/net/ipv4/netfilter/ip_nat_rule.c linux-2.5.64-bk7/net/ipv4/netfilter/ip_nat_rule.c
--- linux-2.5.64-bk6/net/ipv4/netfilter/ip_nat_rule.c	Tue Mar  4 19:29:17 2003
+++ linux-2.5.64-bk7/net/ipv4/netfilter/ip_nat_rule.c	Mon Mar 31 12:29:49 2003
@@ -101,9 +101,13 @@
     }
 };
 
-static struct ipt_table nat_table
-= { { NULL, NULL }, "nat", &nat_initial_table.repl,
-    NAT_VALID_HOOKS, RW_LOCK_UNLOCKED, NULL, THIS_MODULE };
+static struct ipt_table nat_table = {
+	.name		= "nat",
+	.table		= &nat_initial_table.repl,
+	.valid_hooks	= NAT_VALID_HOOKS,
+	.lock		= RW_LOCK_UNLOCKED,
+	.me		= THIS_MODULE,
+};
 
 /* Source NAT */
 static unsigned int ipt_snat_target(struct sk_buff **pskb,
@@ -270,10 +274,17 @@
 	return ret;
 }
 
-static struct ipt_target ipt_snat_reg
-= { { NULL, NULL }, "SNAT", ipt_snat_target, ipt_snat_checkentry, NULL };
-static struct ipt_target ipt_dnat_reg
-= { { NULL, NULL }, "DNAT", ipt_dnat_target, ipt_dnat_checkentry, NULL };
+static struct ipt_target ipt_snat_reg = {
+	.name		= "SNAT",
+	.target		= ipt_snat_target,
+	.checkentry	= ipt_snat_checkentry,
+};
+
+static struct ipt_target ipt_dnat_reg = {
+	.name		= "DNAT",
+	.target		= ipt_dnat_target,
+	.checkentry	= ipt_dnat_checkentry,
+};
 
 int __init ip_nat_rule_init(void)
 {
diff -urN linux-2.5.64-bk6/net/ipv4/netfilter/ip_nat_standalone.c linux-2.5.64-bk7/net/ipv4/netfilter/ip_nat_standalone.c
--- linux-2.5.64-bk6/net/ipv4/netfilter/ip_nat_standalone.c	Tue Mar  4 19:29:33 2003
+++ linux-2.5.64-bk7/net/ipv4/netfilter/ip_nat_standalone.c	Mon Mar 31 12:29:49 2003
@@ -225,18 +225,36 @@
 /* We must be after connection tracking and before packet filtering. */
 
 /* Before packet filtering, change destination */
-static struct nf_hook_ops ip_nat_in_ops
-= { { NULL, NULL }, ip_nat_fn, PF_INET, NF_IP_PRE_ROUTING, NF_IP_PRI_NAT_DST };
+static struct nf_hook_ops ip_nat_in_ops = {
+	.hook		= ip_nat_fn,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_PRE_ROUTING,
+	.priority	= NF_IP_PRI_NAT_DST,
+};
+
 /* After packet filtering, change source */
-static struct nf_hook_ops ip_nat_out_ops
-= { { NULL, NULL }, ip_nat_out, PF_INET, NF_IP_POST_ROUTING, NF_IP_PRI_NAT_SRC};
+static struct nf_hook_ops ip_nat_out_ops = {
+	.hook		= ip_nat_out,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_POST_ROUTING,
+	.priority	= NF_IP_PRI_NAT_SRC,
+};
+
 /* Before packet filtering, change destination */
-static struct nf_hook_ops ip_nat_local_out_ops
-= { { NULL, NULL }, ip_nat_local_fn, PF_INET, NF_IP_LOCAL_OUT, NF_IP_PRI_NAT_DST };
+static struct nf_hook_ops ip_nat_local_out_ops = {
+	.hook		= ip_nat_local_fn,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_LOCAL_OUT,
+	.priority	= NF_IP_PRI_NAT_DST,
+};
 
 #ifdef CONFIG_IP_NF_NAT_LOCAL
-static struct nf_hook_ops ip_nat_local_in_ops
-= { { NULL, NULL }, ip_nat_fn, PF_INET, NF_IP_LOCAL_IN, NF_IP_PRI_NAT_SRC };
+static struct nf_hook_ops ip_nat_local_in_ops = {
+	.hook		= ip_nat_fn,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_LOCAL_IN,
+	.priority	= NF_IP_PRI_NAT_SRC,
+};
 #endif
 
 /* Protocol registration. */
diff -urN linux-2.5.64-bk6/net/ipv4/netfilter/iptable_filter.c linux-2.5.64-bk7/net/ipv4/netfilter/iptable_filter.c
--- linux-2.5.64-bk6/net/ipv4/netfilter/iptable_filter.c	Tue Mar  4 19:29:16 2003
+++ linux-2.5.64-bk7/net/ipv4/netfilter/iptable_filter.c	Mon Mar 31 12:29:49 2003
@@ -81,9 +81,13 @@
     }
 };
 
-static struct ipt_table packet_filter
-= { { NULL, NULL }, "filter", &initial_table.repl,
-    FILTER_VALID_HOOKS, RW_LOCK_UNLOCKED, NULL, THIS_MODULE };
+static struct ipt_table packet_filter = {
+	.name		= "filter",
+	.table		= &initial_table.repl,
+	.valid_hooks	= FILTER_VALID_HOOKS,
+	.lock		= RW_LOCK_UNLOCKED,
+	.me		= THIS_MODULE
+};
 
 /* The work comes in here from netfilter.c. */
 static unsigned int
@@ -114,11 +118,25 @@
 	return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL);
 }
 
-static struct nf_hook_ops ipt_ops[]
-= { { { NULL, NULL }, ipt_hook, PF_INET, NF_IP_LOCAL_IN, NF_IP_PRI_FILTER },
-    { { NULL, NULL }, ipt_hook, PF_INET, NF_IP_FORWARD, NF_IP_PRI_FILTER },
-    { { NULL, NULL }, ipt_local_out_hook, PF_INET, NF_IP_LOCAL_OUT,
-		NF_IP_PRI_FILTER }
+static struct nf_hook_ops ipt_ops[] = {
+	{
+		.hook		= ipt_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_LOCAL_IN,
+		.priority	= NF_IP_PRI_FILTER,
+	},
+	{
+		.hook		= ipt_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_FORWARD,
+		.priority	= NF_IP_PRI_FILTER,
+	},
+	{
+		.hook		= ipt_local_out_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_LOCAL_OUT,
+		.priority	= NF_IP_PRI_FILTER,
+	},
 };
 
 /* Default to forward because I got too much mail already. */
diff -urN linux-2.5.64-bk6/net/ipv4/netfilter/iptable_mangle.c linux-2.5.64-bk7/net/ipv4/netfilter/iptable_mangle.c
--- linux-2.5.64-bk6/net/ipv4/netfilter/iptable_mangle.c	Tue Mar  4 19:29:34 2003
+++ linux-2.5.64-bk7/net/ipv4/netfilter/iptable_mangle.c	Mon Mar 31 12:29:49 2003
@@ -114,9 +114,13 @@
     }
 };
 
-static struct ipt_table packet_mangler
-= { { NULL, NULL }, "mangle", &initial_table.repl,
-    MANGLE_VALID_HOOKS, RW_LOCK_UNLOCKED, NULL, THIS_MODULE };
+static struct ipt_table packet_mangler = {
+	.name		= "mangle",
+	.table		= &initial_table.repl,
+	.valid_hooks	= MANGLE_VALID_HOOKS,
+	.lock		= RW_LOCK_UNLOCKED,
+	.me		= THIS_MODULE,
+};
 
 /* The work comes in here from netfilter.c. */
 static unsigned int
@@ -167,17 +171,37 @@
 	return ret;
 }
 
-static struct nf_hook_ops ipt_ops[]
-= { { { NULL, NULL }, ipt_route_hook, PF_INET, NF_IP_PRE_ROUTING, 
-	NF_IP_PRI_MANGLE },
-    { { NULL, NULL }, ipt_local_hook, PF_INET, NF_IP_LOCAL_IN,
-	NF_IP_PRI_MANGLE },
-    { { NULL, NULL }, ipt_route_hook, PF_INET, NF_IP_FORWARD,
-	NF_IP_PRI_MANGLE },
-    { { NULL, NULL }, ipt_local_hook, PF_INET, NF_IP_LOCAL_OUT,
-	NF_IP_PRI_MANGLE },
-    { { NULL, NULL }, ipt_route_hook, PF_INET, NF_IP_POST_ROUTING,
-	NF_IP_PRI_MANGLE }
+static struct nf_hook_ops ipt_ops[] = {
+	{
+		.hook		= ipt_route_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_PRE_ROUTING, 
+		.priority	= NF_IP_PRI_MANGLE,
+	},
+	{
+		.hook		= ipt_local_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_LOCAL_IN,
+		.priority	= NF_IP_PRI_MANGLE,
+	},
+	{
+		.hook		= ipt_route_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_FORWARD,
+		.priority	= NF_IP_PRI_MANGLE,
+	},
+	{
+		.hook		= ipt_local_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_LOCAL_OUT,
+		.priority	= NF_IP_PRI_MANGLE,
+	},
+	{
+		.hook		= ipt_route_hook,
+		.pf		= PF_INET,
+		.hooknum	= NF_IP_POST_ROUTING,
+		.priority	= NF_IP_PRI_MANGLE,
+	},
 };
 
 static int __init init(void)
