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

diff -urN linux-2.5.74-bk5/MAINTAINERS linux-2.5.74-bk6/MAINTAINERS
--- linux-2.5.74-bk5/MAINTAINERS	2003-07-08 04:53:25.000000000 -0700
+++ linux-2.5.74-bk6/MAINTAINERS	2003-07-08 04:53:34.000000000 -0700
@@ -245,6 +245,21 @@
 L:	linux-atalk@lists.netspace.org
 S:	Maintained
 
+ARM26 ARCHITECTURE
+P:	Ian Molton
+M:	spyro@f2s.com
+S:	Maintained
+
+ARM26/ARCHIMEDES
+P:	Ian Molton
+M:	spyro@f2s.com
+S:	Maintained
+
+ARM26/A5000
+P:	John Appleby
+M:	john@dnsworld.co.uk
+S:	Maintained
+
 ARM MFM AND FLOPPY DRIVERS
 P:	Dave Gilbert
 M:	linux@treblig.org
diff -urN linux-2.5.74-bk5/Makefile linux-2.5.74-bk6/Makefile
--- linux-2.5.74-bk5/Makefile	2003-07-08 04:53:25.000000000 -0700
+++ linux-2.5.74-bk6/Makefile	2003-07-08 04:53:34.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 74
-EXTRAVERSION = -bk5
+EXTRAVERSION = -bk6
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
diff -urN linux-2.5.74-bk5/arch/arm26/Config.help linux-2.5.74-bk6/arch/arm26/Config.help
--- linux-2.5.74-bk5/arch/arm26/Config.help	2003-07-02 13:55:56.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/Config.help	1969-12-31 16:00:00.000000000 -0800
@@ -1,387 +0,0 @@
-CONFIG_ARM
-  The ARM series is a line of low-power-consumption RISC chip designs
-  licensed by ARM ltd and targeted at embedded applications.
-
-CONFIG_IDE
-  If you say Y here, your kernel will be able to manage low cost mass
-  storage units such as ATA/(E)IDE and ATAPI units. The most common
-  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-  If your system is pure SCSI and doesn't use these interfaces, you
-  can say N here.
-
-  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-  for mass storage units such as hard disks. It was designed by
-  Western Digital and Compaq Computer in 1984. It was then named
-  ST506. Quite a number of disks use the IDE interface.
-
-  AT Attachment (ATA) is the superset of the IDE specifications.
-  ST506 was also called ATA-1.
-
-  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-  the LBA standard), more disks (4 instead of 2) and for other mass
-  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-  ATA-4 and provides faster (and more CPU friendly) transfer modes
-  than previous PIO (Programmed processor Input/Output) from previous
-  ATA/IDE standards by means of fast DMA controllers.
-
-  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-  designed in order to prevent data corruption and disk crash by
-  detecting pre hardware failure conditions (heat, access time, and
-  the like...). Disks built since June 1995 may follow this standard.
-  The kernel itself don't manage this; however there are quite a
-  number of user programs such as smart that can query the status of
-  SMART parameters disk.
-
-  If you want to compile this driver as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>. The module
-  will be called ide.o.
-
-  For further information, please read <file:Documentation/ide.txt>.
-
-  If unsure, say Y.
-
-CONFIG_ISA
-  Find out whether you have ISA slots on your motherboard.  ISA is the
-  name of a bus system, i.e. the way the CPU talks to the other stuff
-  inside your box.  Other bus systems are PCI, EISA, MicroChannel
-  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
-  newer boards don't support it.  If you have ISA, say Y, otherwise N.
-
-CONFIG_PREEMPT
-  This option reduces the latency of the kernel when reacting to
-  real-time or interactive events by allowing a low priority process to
-  be preempted even if it is in kernel mode executing a system call.
-  This allows applications to run more reliably even when the system is
-  under load.
-
-  Say Y here if you are building a kernel for a desktop, embedded
-  or real-time system.  Say N if you are unsure.
-
-CONFIG_MCA
-  MicroChannel Architecture is found in some IBM PS/2 machines and
-  laptops.  It is a bus system similar to PCI or ISA. See
-  <file:Documentation/mca.txt> (and especially the web page given
-  there) before attempting to build an MCA bus kernel.
-
-CONFIG_EISA
-  The Extended Industry Standard Architecture (EISA) bus was
-  developed as an open alternative to the IBM MicroChannel bus.
-
-  The EISA bus provided some of the features of the IBM MicroChannel
-  bus while maintaining backward compatibility with cards made for
-  the older ISA bus.  The EISA bus saw limited use between 1988 and
-  1995 when it was made obsolete by the PCI bus.
-
-  Say Y here if you are building a kernel for an EISA-based machine.
-
-  Otherwise, say N.
-
-CONFIG_HOTPLUG
-  Say Y here if you want to plug devices into your computer while
-  the system is running, and be able to use them quickly.  In many
-  cases, the devices can likewise be unplugged at any time too.
-
-  One well known example of this is PCMCIA- or PC-cards, credit-card
-  size devices such as network cards, modems or hard drives which are
-  plugged into slots found on all modern laptop computers.  Another
-  example, used on modern desktops as well as laptops, is USB.
-
-  Enable HOTPLUG and KMOD, and build a modular kernel.  Get agent
-  software (at <http://linux-hotplug.sourceforge.net/>) and install it.
-  Then your kernel will automatically call out to a user mode "policy
-  agent" (/sbin/hotplug) to load modules and set up software needed
-  to use devices as you hotplug them.
-
-CONFIG_KCORE_ELF
-  If you enabled support for /proc file system then the file
-  /proc/kcore will contain the kernel core image. This can be used
-  in gdb:
-
-  $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
-
-  You have two choices here: ELF and A.OUT. Selecting ELF will make
-  /proc/kcore appear in ELF core format as defined by the Executable
-  and Linking Format specification. Selecting A.OUT will choose the
-  old "a.out" format which may be necessary for some old versions
-  of binutils or on some architectures.
-
-  This is especially useful if you have compiled the kernel with the
-  "-g" option to preserve debugging information. It is mainly used
-  for examining kernel data structures on the live kernel so if you
-  don't understand what this means or are not a kernel hacker, just
-  leave it at its default value ELF.
-
-CONFIG_KCORE_AOUT
-  Not necessary unless you're using a very out-of-date binutils
-  version.  You probably want KCORE_ELF.
-
-CONFIG_BINFMT_ELF
-  ELF (Executable and Linkable Format) is a format for libraries and
-  executables used across different architectures and operating
-  systems. Saying Y here will enable your kernel to run ELF binaries
-  and enlarge it by about 13 KB. ELF support under Linux has now all
-  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-  because it is portable (this does *not* mean that you will be able
-  to run executables from different architectures or operating systems
-  however) and makes building run-time libraries very easy. Many new
-  executables are distributed solely in ELF format. You definitely
-  want to say Y here.
-
-  Information about ELF is contained in the ELF HOWTO available from
-  <http://www.linuxdoc.org/docs.html#howto>.
-
-  If you find that after upgrading from Linux kernel 1.2 and saying Y
-  here, you still can't run any ELF binaries (they just crash), then
-  you'll have to install the newest ELF runtime libraries, including
-  ld.so (check the file <file:Documentation/Changes> for location and
-  latest version).
-
-  If you want to compile this as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want),
-  say M here and read <file:Documentation/modules.txt>.  The module
-  will be called binfmt_elf.o. Saying M or N here is dangerous because
-  some crucial programs on your system might be in ELF format.
-
-CONFIG_BINFMT_AOUT
-  A.out (Assembler.OUTput) is a set of formats for libraries and
-  executables used in the earliest versions of UNIX. Linux used the
-  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-  ELF format.
-
-  As more and more programs are converted to ELF, the use for a.out
-  will gradually diminish. If you disable this option it will reduce
-  your kernel by one page. This is not much and by itself does not
-  warrant removing support. However its removal is a good idea if you
-  wish to ensure that absolutely none of your programs will use this
-  older executable format. If you don't know what to answer at this
-  point then answer Y. If someone told you "You need a kernel with
-  QMAGIC support" then you'll have to say Y here. You may answer M to
-  compile a.out support as a module and later load the module when you
-  want to use a program or library in a.out format. The module will be
-  called binfmt_aout.o. Saying M or N here is dangerous though,
-  because some crucial programs on your system might still be in A.OUT
-  format.
-
-CONFIG_BINFMT_MISC
-  If you say Y here, it will be possible to plug wrapper-driven binary
-  formats into the kernel. You will like this especially when you use
-  programs that need an interpreter to run like Java, Python or
-  Emacs-Lisp. It's also useful if you often run DOS executables under
-  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-  registered such a binary class with the kernel, you can start one of
-  those programs simply by typing in its name at a shell prompt; Linux
-  will automatically feed it to the correct interpreter.
-
-  You can do other nice things, too. Read the file
-  <file:Documentation/binfmt_misc.txt> to learn how to use this
-  feature, and <file:Documentation/java.txt> for information about how
-  to include Java support.
-
-  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-  use this part of the kernel.
-
-  You may say M here for module support and later load the module when
-  you have use for it; the module is called binfmt_misc.o. If you
-  don't know what to answer at this point, say Y.
-
-CONFIG_SCSI
-  If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
-  any other SCSI device under Linux, say Y and make sure that you know
-  the name of your SCSI host adapter (the card inside your computer
-  that "speaks" the SCSI protocol, also called SCSI controller),
-  because you will be asked for it.
-
-  You also need to say Y here if you want support for the parallel
-  port version of the 100 MB IOMEGA ZIP drive.
-
-  This driver is also available as a module ( = code which can be
-  inserted in and removed from the running kernel whenever you want).
-  The module will be called scsi_mod.o.  If you want to compile it as
-  a module, say M here and read <file:Documentation/modules.txt> and
-  <file:Documentation/scsi.txt>.  However, do not compile this as a
-  module if your root file system (the one containing the directory /)
-  is located on a SCSI device.
-
-CONFIG_NETDEVICES
-  You can say N here if you don't intend to connect your Linux box to
-  any other computer at all or if all your connections will be over a
-  telephone line with a modem either via UUCP (UUCP is a protocol to
-  forward mail and news between unix hosts over telephone lines; read
-  the UUCP-HOWTO, available from
-  <http://www.linuxdoc.org/docs.html#howto>) or dialing up a shell
-  account or a BBS, even using term (term is a program which gives you
-  almost full Internet connectivity if you have a regular dial up
-  shell account on some Internet connected Unix computer. Read
-  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-  You'll have to say Y if your computer contains a network card that
-  you want to use under Linux (make sure you know its name because you
-  will be asked for it and read the Ethernet-HOWTO (especially if you
-  plan to use more than one network card under Linux)) or if you want
-  to use SLIP (Serial Line Internet Protocol is the protocol used to
-  send Internet traffic over telephone lines or null modem cables) or
-  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-  Protocol is mainly used to create a mini network by connecting the
-  parallel ports of two local machines) or AX.25/KISS (protocol for
-  sending Internet traffic over amateur radio links).
-
-  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-  Olaf Kirch's excellent and free book "Network Administrator's
-  Guide", to be found in <http://www.linuxdoc.org/docs.html#guide>. If
-  unsure, say Y.
-
-CONFIG_MAGIC_SYSRQ
-  If you say Y here, you will have some control over the system even
-  if the system crashes for example during kernel debugging (e.g., you
-  will be able to flush the buffer cache to disk, reboot the system
-  immediately or dump some status information). This is accomplished
-  by pressing various keys while holding SysRq (Alt+PrintScreen). It
-  also works on a serial console (on PC hardware at least), if you
-  send a BREAK and then within 5 seconds a command keypress. The
-  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
-  unless you really know what this hack does.
-
-CONFIG_ARCH_ARCA5K
-  This selects support for 'ARM26' CPUs (ARM 2 and 3)
-
-CONFIG_ARCH_A5K
-  Say Y here to to support the Acorn A5000.  Linux can support the
-  internal IDE disk and CD-ROM interface, serial and parallel port,
-  and the floppy drive.  Note that on some A5000s the floppy is
-  plugged into the wrong socket on the motherboard.
-
-CONFIG_ARCH_ARC
-  The Acorn Archimedes was an personal computer based on an 8MHz ARM2
-  processor, released in 1987.  It supported 512K of RAM and 2 800K
-  floppy disks.  Picture and more detailed specifications at
-  <http://www.computingmuseum.com/museum/archi.htm>.
-
-CONFIG_PAGESIZE_16
-  Say Y here if your Archimedes or A5000 system has only 2MB of
-  memory, otherwise say N.  The resulting kernel will not run on a
-  machine with 4MB of memory.
-
-CONFIG_FPE_NWFPE
-  Say Y to include the NWFPE floating point emulator in the kernel.
-  This is necessary to run most binaries. Linux does not currently
-  support floating point hardware so you need to say Y here even if
-  your machine has an FPA or floating point co-processor podule.
-
-  It is also possible to say M to build the emulator as a module
-  (nwfpe.o) or indeed to leave it out altogether. However, unless you
-  know what you are doing this can easily render your machine
-  unbootable. Saying Y is the safe option.
-
-  You may say N here if you are going to load the Acorn FPEmulator
-  early in the bootup.
-
-CONFIG_FPE_FASTFPE
-  Say Y here to include the FAST floating point emulator in the kernel.
-  This is an experimental much faster emulator which now also has full
-  precision for the mantissa.  It does not support any exceptions.
-  It is very simple, and approximately 3-6 times faster than NWFPE.
-
-  It should be sufficient for most programs.  It may be not suitable
-  for scientific calculations, but you have to check this for yourself.
-  If you do not feel you need a faster FP emulation you should better
-  choose NWFPE.
-
-  It is also possible to say M to build the emulator as a module
-  (fastfpe.o).  But keep in mind that you should only load the FP
-  emulator early in the bootup.  You should never change from NWFPE to
-  FASTFPE or vice versa in an active system!
-
-CONFIG_DEBUG_ERRORS
-  This option controls verbose debugging information which can be
-  printed when the kernel detects an internal error. This debugging
-  information is useful to kernel hackers when tracking down problems,
-  but mostly meaningless to other people. It's safe to say Y unless
-  you are concerned with the code size or don't want to see these
-  messages.
-
-CONFIG_NO_FRAME_POINTER
-  If you say Y here, the resulting kernel will be slightly smaller and
-  faster. However, when a problem occurs with the kernel, the
-  information that is reported is severely limited. Most people
-  should say N here.
-
-CONFIG_DEBUG_USER
-  When a user program crashes due to an exception, the kernel can
-  print a brief message explaining what the problem was. This is
-  sometimes helpful for debugging but serves no purpose on a
-  production system. Most people should say N here.
-
-CONFIG_DEBUG_INFO
-  Say Y here to include source-level debugging information in the
-  `vmlinux' binary image. This is handy if you want to use gdb or
-  addr2line to debug the kernel. It has no impact on the in-memory
-  footprint of the running kernel but it can increase the amount of
-  time and disk space needed for compilation of the kernel. If in
-  doubt say N.
-
-CONFIG_DEBUG_LL
-  Say Y here to include definitions of printascii, printchar, printhex
-  in the kernel.  This is helpful if you are debugging code that
-  executes before the console is initialized.
-
-CONFIG_NO_PGT_CACHE
-  Normally the kernel maintains a `quicklist' of preallocated
-  pagetable structures in order to increase performance. On machines
-  with very few pages this may however be a loss. Say Y here to
-  disable the pgtable cache.
-
-CONFIG_ARTHUR
-  Say Y here to include the kernel code necessary if you want to run
-  Acorn RISC OS/Arthur binaries under Linux. This code is still very
-  experimental; if this sounds frightening, say N and sleep in peace.
-  You can also say M here to compile this support as a module (which
-  will be called arthur.o).
-
-CONFIG_CMDLINE
-  On some architectures (EBSA110 and CATS), there is currently no way
-  for the boot loader to pass arguments to the kernel. For these
-  architectures, you should supply some command-line options at build
-  time by entering them here. As a minimum, you should specify the
-  memory size and the root device (e.g., mem=64M root=/dev/nfs).
-
-CONFIG_DEBUG_KERNEL
-  Say Y here if you are developing drivers or trying to debug and
-  identify kernel problems.
-
-CONFIG_DEBUG_SLAB
-  Say Y here to have the kernel do limited verification on memory
-  allocation as well as poisoning memory on free to catch use of freed
-  memory.
-
-CONFIG_DEBUG_SPINLOCK
-  Say Y here and build SMP to catch missing spinlock initialization
-  and certain other kinds of spinlock errors commonly made.  This is
-  best used in conjunction with the NMI watchdog so that spinlock
-  deadlocks are also debuggable.
-
-CONFIG_DEBUG_BUGVERBOSE
-  Say Y here to make BUG() panics output the file name and line number
-  of the BUG call as well as the EIP and oops trace.  This aids
-  debugging but costs about 70-100K of memory.
-
-CONFIG_ZBOOT_ROM
-  Say Y here if you intend to execute your compressed kernel image (zImage)
-  directly from ROM or flash.  If unsure, say N.
-
-CONFIG_ZBOOT_ROM_TEXT
-  The base address for zImage.  Unless you have special requirements, you
-  should not change this value.
-
-CONFIG_ZBOOT_ROM_BSS
-  The base address of 64KiB of read/write memory, which must be available
-  while the decompressor is running.  Unless you have special requirements,
-  you should not change this value.
-
diff -urN linux-2.5.74-bk5/arch/arm26/Kconfig linux-2.5.74-bk6/arch/arm26/Kconfig
--- linux-2.5.74-bk5/arch/arm26/Kconfig	2003-07-02 13:49:20.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/Kconfig	2003-07-08 04:53:34.000000000 -0700
@@ -8,15 +8,8 @@
 config ARM
 	bool
 	default y
-	help
-	  The ARM series is a line of low-power-consumption RISC chip designs
-	  licensed by ARM ltd and targeted at embedded applications and
-	  handhelds such as the Compaq IPAQ.  ARM-based PCs are no longer
-	  manufactured, but  legacy ARM-based PC hardware remains popular in
-	  Europe.  There is an ARM Linux project with a web page at
-	  <http://www.arm.linux.org.uk/>.
 
-config ARCH_ARCA5K
+config ARM26
 	bool
 	default y
 
@@ -67,25 +60,25 @@
 
 config ARCH_ARC
         bool "Archimedes"
-        depends on ARCH_ARCA5K
         help
-          The Acorn Archimedes was an personal computer based on an 8K ARM2
-          processor, released in 1987.  It supported 512K of RAM and 2 800K
-          floppy disks.  Picture and more detailed specifications at
-          <http://www.computingmuseum.com/museum/archi.htm>.
+          Say Y to support the Acorn Archimedes.
+	  
+	  The Acorn Archimedes was an personal computer based on an 8MHz ARM2
+          processor, released in 1987.  It supported up to 16MB of RAM in
+	  later models and floppy, harddisc, ethernet etc.
 
 config ARCH_A5K
         bool "A5000"
-        depends on ARCH_ARCA5K
         help
-          Say Y here to to support the Acorn A5000.  Linux can support the
+          Say Y here to to support the Acorn A5000.
+	  
+	  Linux can support the
           internal IDE disk and CD-ROM interface, serial and parallel port,
           and the floppy drive.  Note that on some A5000s the floppy is
           plugged into the wrong socket on the motherboard.
 
 config PAGESIZE_16
-        bool "2MB physical memory"
-        depends on ARCH_ARCA5K
+        bool "2MB physical memory (broken)"
         help
           Say Y here if your Archimedes or A5000 system has only 2MB of
           memory, otherwise say N.  The resulting kernel will not run on a
@@ -186,81 +179,7 @@
 
 endchoice
 
-config BINFMT_AOUT
-	tristate "Kernel support for a.out binaries"
-	---help---
-	  A.out (Assembler.OUTput) is a set of formats for libraries and
-	  executables used in the earliest versions of UNIX. Linux used the
-	  a.out formats QMAGIC and ZMAGIC until they were replaced with the
-	  ELF format.
-
-	  As more and more programs are converted to ELF, the use for a.out
-	  will gradually diminish. If you disable this option it will reduce
-	  your kernel by one page. This is not much and by itself does not
-	  warrant removing support. However its removal is a good idea if you
-	  wish to ensure that absolutely none of your programs will use this
-	  older executable format. If you don't know what to answer at this
-	  point then answer Y. If someone told you "You need a kernel with
-	  QMAGIC support" then you'll have to say Y here. You may answer M to
-	  compile a.out support as a module and later load the module when you
-	  want to use a program or library in a.out format. The module will be
-	  called binfmt_aout. Saying M or N here is dangerous though,
-	  because some crucial programs on your system might still be in A.OUT
-	  format.
-
-config BINFMT_ELF
-	tristate "Kernel support for ELF binaries"
-	---help---
-	  ELF (Executable and Linkable Format) is a format for libraries and
-	  executables used across different architectures and operating
-	  systems. Saying Y here will enable your kernel to run ELF binaries
-	  and enlarge it by about 13 KB. ELF support under Linux has now all
-	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
-	  because it is portable (this does *not* mean that you will be able
-	  to run executables from different architectures or operating systems
-	  however) and makes building run-time libraries very easy. Many new
-	  executables are distributed solely in ELF format. You definitely
-	  want to say Y here.
-
-	  Information about ELF is contained in the ELF HOWTO available from
-	  <http://www.linuxdoc.org/docs.html#howto>.
-
-	  If you find that after upgrading from Linux kernel 1.2 and saying Y
-	  here, you still can't run any ELF binaries (they just crash), then
-	  you'll have to install the newest ELF runtime libraries, including
-	  ld.so (check the file <file:Documentation/Changes> for location and
-	  latest version).
-
-	  If you want to compile this as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt>.  The module
-	  will be called binfmt_elf. Saying M or N here is dangerous because
-	  some crucial programs on your system might be in ELF format.
-
-config BINFMT_MISC
-	tristate "Kernel support for MISC binaries"
-	---help---
-	  If you say Y here, it will be possible to plug wrapper-driven binary
-	  formats into the kernel. You will like this especially when you use
-	  programs that need an interpreter to run like Java, Python or
-	  Emacs-Lisp. It's also useful if you often run DOS executables under
-	  the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
-	  <http://www.linuxdoc.org/docs.html#howto>). Once you have
-	  registered such a binary class with the kernel, you can start one of
-	  those programs simply by typing in its name at a shell prompt; Linux
-	  will automatically feed it to the correct interpreter.
-
-	  You can do other nice things, too. Read the file
-	  <file:Documentation/binfmt_misc.txt> to learn how to use this
-	  feature, and <file:Documentation/java.txt> for information about how
-	  to include Java support.
-
-	  You must say Y to "/proc file system support" (CONFIG_PROC_FS) to
-	  use this part of the kernel.
-
-	  You may say M here for module support and later load the module when
-	  you have use for it; the module is called binfmt_misc. If you
-	  don't know what to answer at this point, say Y.
+source "fs/Kconfig.binfmt"
 
 config PREEMPT
 	bool "Preemptible Kernel (EXPERIMENTAL)"
@@ -311,59 +230,8 @@
 
 source "net/irda/Kconfig"
 
-menu "ATA/ATAPI/MFM/RLL support"
-
-config IDE
-	tristate "ATA/ATAPI/MFM/RLL support"
-	---help---
-	  If you say Y here, your kernel will be able to manage low cost mass
-	  storage units such as ATA/(E)IDE and ATAPI units. The most common
-	  cases are IDE hard drives and ATAPI CD-ROM drives.
-
-	  If your system is pure SCSI and doesn't use these interfaces, you
-	  can say N here.
-
-	  Integrated Disk Electronics (IDE aka ATA-1) is a connecting standard
-	  for mass storage units such as hard disks. It was designed by
-	  Western Digital and Compaq Computer in 1984. It was then named
-	  ST506. Quite a number of disks use the IDE interface.
-
-	  AT Attachment (ATA) is the superset of the IDE specifications.
-	  ST506 was also called ATA-1.
-
-	  Fast-IDE is ATA-2 (also named Fast ATA), Enhanced IDE (EIDE) is
-	  ATA-3. It provides support for larger disks (up to 8.4GB by means of
-	  the LBA standard), more disks (4 instead of 2) and for other mass
-	  storage units such as tapes and cdrom. UDMA/33 (aka UltraDMA/33) is
-	  ATA-4 and provides faster (and more CPU friendly) transfer modes
-	  than previous PIO (Programmed processor Input/Output) from previous
-	  ATA/IDE standards by means of fast DMA controllers.
-
-	  ATA Packet Interface (ATAPI) is a protocol used by EIDE tape and
-	  CD-ROM drives, similar in many respects to the SCSI protocol.
-
-	  SMART IDE (Self Monitoring, Analysis and Reporting Technology) was
-	  designed in order to prevent data corruption and disk crash by
-	  detecting pre hardware failure conditions (heat, access time, and
-	  the like...). Disks built since June 1995 may follow this standard.
-	  The kernel itself don't manage this; however there are quite a
-	  number of user programs such as smart that can query the status of
-	  SMART parameters disk.
-
-	  If you want to compile this driver as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read <file:Documentation/modules.txt>. The module
-	  will be called ide.
-
-	  For further information, please read <file:Documentation/ide.txt>.
-
-	  If unsure, say Y.
-
 source "drivers/ide/Kconfig"
 
-endmenu
-
-
 source "drivers/scsi/Kconfig"
 
 source "drivers/isdn/Kconfig"
diff -urN linux-2.5.74-bk5/arch/arm26/config.in linux-2.5.74-bk6/arch/arm26/config.in
--- linux-2.5.74-bk5/arch/arm26/config.in	2003-07-02 13:51:04.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/config.in	1969-12-31 16:00:00.000000000 -0800
@@ -1,151 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
-#
-mainmenu_name "Linux Kernel Configuration"
-
-define_bool CONFIG_ARM y
-define_bool CONFIG_EISA n
-define_bool CONFIG_SBUS n
-define_bool CONFIG_MCA n
-define_bool CONFIG_UID16 y
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
-define_bool CONFIG_GENERIC_BUST_SPINLOCK n
-define_bool CONFIG_GENERIC_ISA_DMA n
-
-source init/Config.in
-
-mainmenu_option next_comment
-comment 'System Type'
-
-define_bool CONFIG_ARCH_ARCA5K
-bool '  Archimedes' CONFIG_ARCH_ARC
-bool '  A5000' CONFIG_ARCH_A5K
-
-# Definitions to make life easier
-define_bool CONFIG_ARCH_ACORN y
-define_bool CONFIG_CPU_32 n
-define_bool CONFIG_CPU_26 y
-bool '2MB physical memory' CONFIG_PAGESIZE_16
-
-endmenu
-
-mainmenu_option next_comment
-comment 'General setup'
-
-define_bool CONFIG_FIQ y
-
-# Compressed boot loader in ROM.  Yes, we really want to ask about
-# TEXT and BSS so we preserve their values in the config files.
-bool 'Compressed boot loader in ROM/flash' CONFIG_ZBOOT_ROM
-hex 'Compressed ROM boot loader base address' CONFIG_ZBOOT_ROM_TEXT 0
-hex 'Compressed ROM boot loader BSS address' CONFIG_ZBOOT_ROM_BSS 0
-
-comment 'At least one math emulation must be selected'
-define_bool CONFIG_FPE_NWFPE y
-choice 'Kernel core (/proc/kcore) format' \
-	"ELF		CONFIG_KCORE_ELF	\
-	 A.OUT		CONFIG_KCORE_AOUT" ELF
-tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
-tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
-tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
-string 'Default kernel command string' CONFIG_CMDLINE ""
-
-define_bool CONFIG_ALIGNMENT_TRAP n
-endmenu
-
-source drivers/parport/Config.in
-source drivers/pnp/Config.in
-source drivers/block/Config.in
-source drivers/md/Config.in
-source drivers/acorn/block/Config.in
-
-if [ "$CONFIG_NET" = "y" ]; then
-   source net/Config.in
-
-   mainmenu_option next_comment
-   comment 'Network device support'
-
-   bool 'Network device support' CONFIG_NETDEVICES
-   if [ "$CONFIG_NETDEVICES" = "y" ]; then
-      source drivers/net/Config.in
-   fi
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'ATA/ATAPI/MFM/RLL support'
-
-tristate 'ATA/ATAPI/MFM/RLL support' CONFIG_IDE
-
-if [ "$CONFIG_IDE" != "n" ]; then
-  source drivers/ide/Config.in
-else
-  define_bool CONFIG_BLK_DEV_HD n
-fi
-endmenu
-
-mainmenu_option next_comment
-comment 'SCSI support'
-
-tristate 'SCSI support' CONFIG_SCSI
-endmenu
-
-source drivers/isdn/Config.in
-
-#
-# input before char - char/joystick depends on it. As does USB.
-#
-source drivers/input/Config.in
-
-source drivers/char/Config.in
-if [ "$CONFIG_BUSMOUSE" = "y" ]; then
-   define_bool CONFIG_KBDMOUSE y
-fi
-
-source drivers/media/Config.in
-
-source fs/Config.in
-
-if [ "$CONFIG_VT" = "y" ]; then
-   mainmenu_option next_comment
-   comment 'Console drivers'
-   source drivers/video/Config.in
-   endmenu
-fi
-
-mainmenu_option next_comment
-comment 'Sound'
-
-tristate 'Sound card support' CONFIG_SOUND
-if [ "$CONFIG_SOUND" != "n" ]; then
-   source sound/Config.in
-fi
-endmenu
-
-source drivers/misc/Config.in
-source drivers/usb/Config.in
-
-mainmenu_option next_comment
-comment 'Kernel hacking'
-
-# Always compile kernel with framepointer (until 2.4 real comes out)
-# Bug reports aren't much use without this.
-bool 'Compile kernel without frame pointer' CONFIG_NO_FRAME_POINTER
-bool 'Verbose user fault messages' CONFIG_DEBUG_USER
-bool 'Include debugging information in kernel binary' CONFIG_DEBUG_INFO
-
-bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
-dep_bool '  Debug memory allocations' CONFIG_DEBUG_SLAB $CONFIG_DEBUG_KERNEL
-dep_bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ $CONFIG_DEBUG_KERNEL
-dep_bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK $CONFIG_DEBUG_KERNEL
-dep_bool '  Wait queue debugging' CONFIG_DEBUG_WAITQ $CONFIG_DEBUG_KERNEL
-dep_bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE $CONFIG_DEBUG_KERNEL
-dep_bool '  Verbose kernel error messages' CONFIG_DEBUG_ERRORS $CONFIG_DEBUG_KERNEL
-# These options are only for real kernel hackers who want to get their hands dirty. 
-dep_bool '  Kernel low-level debugging functions' CONFIG_DEBUG_LL $CONFIG_DEBUG_KERNEL
-endmenu
-
-source security/Config.in
-source lib/Config.in
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/Makefile linux-2.5.74-bk6/arch/arm26/kernel/Makefile
--- linux-2.5.74-bk5/arch/arm26/kernel/Makefile	2003-07-02 13:46:58.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/Makefile	2003-07-08 04:53:34.000000000 -0700
@@ -6,7 +6,7 @@
 
 # Object file lists.
 
-obj-y		:= arch.o compat.o dma.o entry.o irq.o   \
+obj-y		:= compat.o dma.o entry.o irq.o   \
 		   process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
 		   time.o traps.o ecard.o time-acorn.o dma.o \
 		   ecard.o fiq.o time.o
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/arch.c linux-2.5.74-bk6/arch/arm26/kernel/arch.c
--- linux-2.5.74-bk5/arch/arm26/kernel/arch.c	2003-07-02 13:49:16.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/arch.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,30 +0,0 @@
-/* 
- *  linux/arch/arm/kernel/arch.c
- *
- *  Architecture specific fixups.
- */
-#include <linux/config.h>
-#include <linux/init.h>
-#include <linux/types.h>
-
-#include <asm/elf.h>
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-#include <asm/arch.h>
-#include <asm/page.h>
-
-unsigned int vram_size;
-
-
-unsigned int memc_ctrl_reg;
-unsigned int number_mfm_drives;
-
-static int __init parse_tag_acorn(const struct tag *tag)
-{
-	memc_ctrl_reg = tag->u.acorn.memc_control_reg;
-	number_mfm_drives = tag->u.acorn.adfsdrives;
-	return 0;
-}
-
-__tagtable(ATAG_ACORN, parse_tag_acorn);
-
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/asm-offsets.c linux-2.5.74-bk6/arch/arm26/kernel/asm-offsets.c
--- linux-2.5.74-bk5/arch/arm26/kernel/asm-offsets.c	2003-07-02 13:42:52.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/asm-offsets.c	2003-07-08 04:53:34.000000000 -0700
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 1995-2001 Russell King
  *               2001-2002 Keith Owens
- *               2003-?    Ian Molton
+ *               2003      Ian Molton
  *     
  * Generate definitions needed by assembly language modules.
  * This code generates raw asm output which is post-processed to extract
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/compat.c linux-2.5.74-bk6/arch/arm26/kernel/compat.c
--- linux-2.5.74-bk5/arch/arm26/kernel/compat.c	2003-07-02 13:53:02.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/compat.c	2003-07-08 04:53:34.000000000 -0700
@@ -26,7 +26,7 @@
 #include <asm/mach-types.h>
 #include <asm/page.h>
 
-#include <asm/arch.h>
+//#include <asm/arch.h>
 //#include <asm/mach/irq.h>
 
 /*
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/dma.c linux-2.5.74-bk6/arch/arm26/kernel/dma.c
--- linux-2.5.74-bk5/arch/arm26/kernel/dma.c	2003-07-02 13:52:59.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/dma.c	2003-07-08 04:53:34.000000000 -0700
@@ -2,7 +2,7 @@
  *  linux/arch/arm/kernel/dma.c
  *
  *  Copyright (C) 1995-2000 Russell King
- *                2003-?    Ian Molton
+ *                2003      Ian Molton
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/ecard.c linux-2.5.74-bk6/arch/arm26/kernel/ecard.c
--- linux-2.5.74-bk5/arch/arm26/kernel/ecard.c	2003-07-02 13:58:20.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/ecard.c	2003-07-08 04:53:34.000000000 -0700
@@ -11,9 +11,8 @@
  *  Find all installed expansion cards, and handle interrupts from them.
  *
  *  Created from information from Acorns RiscOS3 PRMs
- *
- *  08-Dec-1996	RMK	Added code for the 9'th expansion card - the ether
- *			podule slot.
+ *  15-Jun-2003 IM      Modified from ARM32 (RiscPC capable) version
+ *  10-Jan-1999	RMK	Run loaders in a simulated RISC OS environment.
  *  06-May-1997	RMK	Added blacklist for cards whose loader doesn't work.
  *  12-Sep-1997	RMK	Created new handling of interrupt enables/disables
  *			- cards can now register their own routine to control
@@ -21,10 +20,7 @@
  *  29-Sep-1997	RMK	Expansion card interrupt hardware not being re-enabled
  *			on reset from Linux. (Caused cards not to respond
  *			under RiscOS without hard reset).
- *  15-Feb-1998	RMK	Added DMA support
- *  12-Sep-1998	RMK	Added EASI support
- *  10-Jan-1999	RMK	Run loaders in a simulated RISC OS environment.
- *  17-Apr-1999	RMK	Support for EASI Type C cycles.
+ *
  */
 #define ECARD_C
 
@@ -527,8 +523,7 @@
 {
 	char *start = buffer;
 
-	buffer += sprintf(buffer, "  %d: %s ", ec->slot_no,
-			  ec->type == ECARD_EASI ? "EASI" : "    ");
+	buffer += sprintf(buffer, "  %d: ", ec->slot_no);
 
 	if (ec->cid.id == 0) {
 		struct in_chunk_dir incd;
@@ -674,7 +669,7 @@
 	memset(ec, 0, sizeof(ecard_t));
 
 	ec->slot_no	= slot;
-	ec->type	= type;
+	ec->type        = type;
 	ec->irq		= NO_IRQ;
 	ec->fiq		= NO_IRQ;
 	ec->dma		= NO_DMA;
@@ -770,9 +765,8 @@
 
 	printk("Probing expansion cards\n");
 
-	for (slot = 0; slot < 8; slot ++) {
-		if (ecard_probe(slot, ECARD_EASI) == -ENODEV)
-			ecard_probe(slot, ECARD_IOC);
+	for (slot = 0; slot < 4; slot ++) {
+		ecard_probe(slot, ECARD_IOC);
 	}
 
 	irqhw = ecard_probeirqhw();
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/irq.c linux-2.5.74-bk6/arch/arm26/kernel/irq.c
--- linux-2.5.74-bk5/arch/arm26/kernel/irq.c	2003-07-02 13:55:48.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/irq.c	2003-07-08 04:53:34.000000000 -0700
@@ -41,7 +41,7 @@
  * not be set too low to prevent false triggering.  Conversely, if it
  * is set too high, then you could miss a stuck IRQ.
  *
- * Maybe we ought to set a timer and re-enable the IRQ at a later time?
+ * FIXME Maybe we ought to set a timer and re-enable the IRQ at a later time?
  */
 #define MAX_IRQ_CNT	100000
 
@@ -49,7 +49,6 @@
 static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED;
 
 struct irqdesc irq_desc[NR_IRQS];
-void (*init_arch_irq)(void) __initdata = NULL;
 
 /*
  * Dummy mask/unmask handler
@@ -88,7 +87,6 @@
 {
 	struct irqdesc *desc = irq_desc + irq;
 	unsigned long flags;
-
 	spin_lock_irqsave(&irq_controller_lock, flags);
 	if (!desc->depth++)
 		desc->enabled = 0;
@@ -114,7 +112,7 @@
 	spin_lock_irqsave(&irq_controller_lock, flags);
 	if (unlikely(!desc->depth)) {
 		printk("enable_irq(%u) unbalanced from %p\n", irq,
-			__builtin_return_address(0));
+			__builtin_return_address(0)); //FIXME bum addresses reported - why?
 	} else if (!--desc->depth) {
 		desc->probing = 0;
 		desc->enabled = 1;
@@ -187,7 +185,6 @@
 	unsigned int status;
 
 	spin_unlock(&irq_controller_lock);
-
 	if (!(action->flags & SA_INTERRUPT))
 		local_irq_enable();
 
@@ -700,6 +697,6 @@
 	for (irq = 0, desc = irq_desc; irq < NR_IRQS; irq++, desc++)
 		*desc = bad_irq_desc;
 
-	init_arch_irq();
+	arc_init_irq();
 	init_dma();
 }
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/process.c linux-2.5.74-bk6/arch/arm26/kernel/process.c
--- linux-2.5.74-bk5/arch/arm26/kernel/process.c	2003-07-02 13:55:17.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/process.c	2003-07-08 04:53:34.000000000 -0700
@@ -227,7 +227,9 @@
 #define ll_alloc_task_struct()	((struct thread_info *)get_page_8k(GFP_KERNEL))
 #define ll_free_task_struct(p)  free_page_8k((unsigned long)(p))
 
-struct thread_info *alloc_thread_info(void)
+//FIXME - do we use *task param below looks like we dont, which is ok?
+//FIXME - if EXTRA_TASK_STRUCT is zero we can optimise the below away permanently. *IF* its supposed to be zero.
+struct thread_info *alloc_thread_info(struct task_struct *task)
 {
 	struct thread_info *thread = NULL;
 
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/setup.c linux-2.5.74-bk6/arch/arm26/kernel/setup.c
--- linux-2.5.74-bk5/arch/arm26/kernel/setup.c	2003-07-02 13:42:14.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/setup.c	2003-07-08 04:53:34.000000000 -0700
@@ -30,7 +30,6 @@
 #include <asm/mach-types.h>
 #include <asm/tlbflush.h>
 
-#include <asm/arch.h>
 #include <asm/irqchip.h>
 
 #ifndef MEM_SIZE
@@ -66,6 +65,8 @@
 unsigned int system_serial_low;
 unsigned int system_serial_high;
 unsigned int elf_hwcap;
+unsigned int memc_ctrl_reg;
+unsigned int number_mfm_drives;
 
 struct processor processor;
 
@@ -147,33 +148,6 @@
 	cpu_proc_init();
 }
 
-static struct machine_desc * __init setup_machine(unsigned int nr)
-{
-	extern struct machine_desc __arch_info_begin, __arch_info_end;
-	struct machine_desc *list;
-
-	/*
-	 * locate architecture in the list of supported architectures.
-	 */
-	for (list = &__arch_info_begin; list < &__arch_info_end; list++)
-		if (list->nr == nr)
-			break;
-
-	/*
-	 * If the architecture type is not recognised, then we
-	 * can co nothing...
-	 */
-	if (list >= &__arch_info_end) {
-		printk("Architecture configuration botched (nr %d), unable "
-		       "to continue.\n", nr);
-		while (1);
-	}
-
-	printk("Machine: %s\n", list->name);
-
-	return list;
-}
-
 /*
  * Initial parsing of the command line.  We need to pick out the
  * memory size.  We look for mem=size@start, where start and size
@@ -239,7 +213,7 @@
 }
 
 static void __init
-request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
+request_standard_resources(struct meminfo *mi)
 {
 	struct resource *res;
 	int i;
@@ -274,22 +248,18 @@
 			request_resource(res, &kernel_data);
 	}
 
-	if (mdesc->video_start) {
+/*	FIXME - needed? if (mdesc->video_start) {
 		video_ram.start = mdesc->video_start;
 		video_ram.end   = mdesc->video_end;
 		request_resource(&iomem_resource, &video_ram);
-	}
+	}*/
 
 	/*
 	 * Some machines don't have the possibility of ever
-	 * possessing lp0, lp1 or lp2
+	 * possessing lp1 or lp2
 	 */
-	if (mdesc->reserve_lp0)
+	if (0)  /* FIXME - need to do this for A5k at least */
 		request_resource(&ioport_resource, &lp0);
-	if (mdesc->reserve_lp1)
-		request_resource(&ioport_resource, &lp1);
-	if (mdesc->reserve_lp2)
-		request_resource(&ioport_resource, &lp2);
 }
 
 /*
@@ -359,6 +329,15 @@
 __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
 #endif
 
+static int __init parse_tag_acorn(const struct tag *tag)
+{
+        memc_ctrl_reg = tag->u.acorn.memc_control_reg;
+        number_mfm_drives = tag->u.acorn.adfsdrives;
+        return 0;
+}
+
+__tagtable(ATAG_ACORN, parse_tag_acorn);
+
 static int __init parse_tag_ramdisk(const struct tag *tag)
 {
 	setup_ramdisk((tag->u.ramdisk.flags & 1) == 0,
@@ -467,15 +446,18 @@
 void __init setup_arch(char **cmdline_p)
 {
 	struct tag *tags = (struct tag *)&init_tags;
-	struct machine_desc *mdesc;
 	char *from = default_command_line;
 
 	setup_processor();
-	mdesc = setup_machine(machine_arch_type);
-	machine_name = mdesc->name;
+	if(machine_arch_type == MACH_TYPE_A5K)
+		machine_name = "A5000";
+	else if(machine_arch_type == MACH_TYPE_ARCHIMEDES)
+		machine_name = "Archimedes";
+	else
+		machine_name = "UNKNOWN";
 
-	if (mdesc->param_offset)
-		tags = (struct tag *)mdesc->param_offset; //FIXME - ugly?
+	//FIXME - this may need altering when we get ROM images working
+	tags = (struct tag *)0x0207c000;
 
 	/*
 	 * If we have the old style parameters, convert them to
@@ -501,12 +483,7 @@
 	parse_cmdline(&meminfo, cmdline_p, from);
 	bootmem_init(&meminfo);
 	paging_init(&meminfo);
-	request_standard_resources(&meminfo, mdesc);
-
-	/*
-	 * Set up various architecture-specific pointers
-	 */
-	init_arch_irq = mdesc->init_irq;
+	request_standard_resources(&meminfo);
 
 #ifdef CONFIG_VT
 #if defined(CONFIG_DUMMY_CONSOLE)
diff -urN linux-2.5.74-bk5/arch/arm26/kernel/traps.c linux-2.5.74-bk6/arch/arm26/kernel/traps.c
--- linux-2.5.74-bk5/arch/arm26/kernel/traps.c	2003-07-02 13:50:02.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/kernel/traps.c	2003-07-08 04:53:34.000000000 -0700
@@ -175,6 +175,11 @@
 	}
 }
 
+/* FIXME - this is probably wrong.. */
+void show_stack(struct task_struct *task, unsigned long *sp) {
+	dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task->thread_info);
+}
+
 spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
 
 /*
@@ -497,7 +502,7 @@
 	die_if_kernel("unknown data abort code", regs, instr);
 }
 
-void __bug(const char *file, int line, void *data)
+volatile void __bug(const char *file, int line, void *data)
 {
 	printk(KERN_CRIT"kernel BUG at %s:%d!", file, line);
 	if (data)
diff -urN linux-2.5.74-bk5/arch/arm26/lib/Makefile linux-2.5.74-bk6/arch/arm26/lib/Makefile
--- linux-2.5.74-bk5/arch/arm26/lib/Makefile	2003-07-02 13:50:56.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/lib/Makefile	2003-07-08 04:53:34.000000000 -0700
@@ -4,9 +4,7 @@
 # Copyright (C) 1995-2000 Russell King
 #
 
-L_TARGET	:= lib.a
-
-obj-y		:= backtrace.o changebit.o csumipv6.o csumpartial.o   \
+lib-y		:= backtrace.o changebit.o csumipv6.o csumpartial.o   \
 		   csumpartialcopy.o csumpartialcopyuser.o clearbit.o \
 		   copy_page.o delay.o findbit.o memchr.o memcpy.o    \
 		   memset.o memzero.o setbit.o    \
@@ -16,15 +14,12 @@
 		   ucmpdi2.o udivdi3.o lib1funcs.o ecard.o io-acorn.o \
 		   floppydma.o io-readsb.o io-writesb.o io-writesl.o  \
 		   uaccess-kernel.o uaccess-user.o io-readsw-armv3.o  \
-		   io-writesw-armv3.o io-readsl-armv3.o
-
-obj-m		:=
-obj-n		:=
-
-obj-$(CONFIG_VT)+= kbd.o
+		   io-writesw-armv3.o io-readsl-armv3.o ecard.o       \
+		   io-acorn.o floppydma.o
 
-obj-y		+= ecard.o io-acorn.o floppydma.o
+lib-n		:=
 
+lib-$(CONFIG_VT)+= kbd.o
 
 csumpartialcopy.o: csumpartialcopygeneric.S
 csumpartialcopyuser.o: csumpartialcopygeneric.S
diff -urN linux-2.5.74-bk5/arch/arm26/machine/Makefile linux-2.5.74-bk6/arch/arm26/machine/Makefile
--- linux-2.5.74-bk5/arch/arm26/machine/Makefile	2003-07-02 13:46:47.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/machine/Makefile	2003-07-08 04:53:34.000000000 -0700
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y			:= arch.o dma.o irq.o oldlatches.o \
+obj-y			:= dma.o irq.o oldlatches.o \
 			   small_page.o
 
 extra-y 		:= head.o
diff -urN linux-2.5.74-bk5/arch/arm26/machine/arch.c linux-2.5.74-bk6/arch/arm26/machine/arch.c
--- linux-2.5.74-bk5/arch/arm26/machine/arch.c	2003-07-02 13:43:36.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/machine/arch.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,36 +0,0 @@
-/*
- *  linux/arch/arm26/mach-arc/arch.c
- *
- *  Copyright (C) 1998-2001 Russell King
- *  Copyright (C) 2003 Ian Molton
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Architecture specific fixups.
- */
-#include <linux/config.h>
-#include <linux/tty.h>
-#include <linux/init.h>
-
-#include <asm/mach-types.h>
-#include <asm/hardware.h>
-#include <asm/page.h>
-#include <asm/setup.h>
-
-#include <asm/map.h>
-#include <asm/arch.h>
-
-extern void arc_init_irq(void);
-
-#ifdef CONFIG_ARCH_ARC
-MACHINE_START(ARCHIMEDES, "Acorn-Archimedes")
-#elif defined(CONFIG_ARCH_A5K)
-MACHINE_START(A5K, "Acorn-A5000")
-#endif
-	MAINTAINER("Ian Molton")
-	BOOT_PARAMS(0x0207c000)
-	INITIRQ(arc_init_irq)
-MACHINE_END
-
diff -urN linux-2.5.74-bk5/arch/arm26/machine/irq.c linux-2.5.74-bk6/arch/arm26/machine/irq.c
--- linux-2.5.74-bk5/arch/arm26/machine/irq.c	2003-07-02 13:42:46.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/machine/irq.c	2003-07-08 04:53:34.000000000 -0700
@@ -73,7 +73,6 @@
 static void arc_mask_irq_b(unsigned int irq)
 {
 	unsigned int val, mask;
-
 	mask = 1 << (irq & 7);
 	val = ioc_readb(IOC_IRQMASKB);
 	ioc_writeb(val & ~mask, IOC_IRQMASKB);
@@ -94,7 +93,7 @@
         .unmask = arc_unmask_irq_b,
 };
 
-/* FIXME - JMA none of these functions are used in arm26
+/* FIXME - JMA none of these functions are used in arm26 currently
 static void arc_mask_irq_fiq(unsigned int irq)
 {
 	unsigned int val, mask;
@@ -124,6 +123,7 @@
 {
 	unsigned int irq, flags;
 
+	/* Disable all IOC interrupt sources */
 	ioc_writeb(0, IOC_IRQMASKA);
 	ioc_writeb(0, IOC_IRQMASKB);
 	ioc_writeb(0, IOC_FIQMASK);
diff -urN linux-2.5.74-bk5/arch/arm26/mm/init.c linux-2.5.74-bk6/arch/arm26/mm/init.c
--- linux-2.5.74-bk5/arch/arm26/mm/init.c	2003-07-08 04:53:25.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/mm/init.c	2003-07-08 04:53:34.000000000 -0700
@@ -32,7 +32,7 @@
 #include <asm/setup.h>
 #include <asm/tlb.h>
 
-#include <asm/arch.h>
+//#include <asm/arch.h>
 #include <asm/map.h>
 
 #define TABLE_SIZE	PTRS_PER_PTE * sizeof(pte_t))
diff -urN linux-2.5.74-bk5/arch/arm26/mm/mm-memc.c linux-2.5.74-bk6/arch/arm26/mm/mm-memc.c
--- linux-2.5.74-bk5/arch/arm26/mm/mm-memc.c	2003-07-02 13:57:16.000000000 -0700
+++ linux-2.5.74-bk6/arch/arm26/mm/mm-memc.c	2003-07-08 04:53:34.000000000 -0700
@@ -70,11 +70,9 @@
 
 pgd_t *get_pgd_slow(struct mm_struct *mm)
 {
-	void *pg2k;
 	pgd_t *new_pgd, *init_pgd;
 	pmd_t *new_pmd, *init_pmd;
 	pte_t *new_pte, *init_pte;
-	struct mm_struct bob;
 
 	new_pgd = alloc_pgd_table();
 	if (!new_pgd)
diff -urN linux-2.5.74-bk5/arch/cris/mm/tlb.c linux-2.5.74-bk6/arch/cris/mm/tlb.c
--- linux-2.5.74-bk5/arch/cris/mm/tlb.c	2003-07-02 13:41:45.000000000 -0700
+++ linux-2.5.74-bk6/arch/cris/mm/tlb.c	2003-07-08 04:53:34.000000000 -0700
@@ -283,7 +283,7 @@
 
 void 
 switch_mm(struct mm_struct *prev, struct mm_struct *next,
-	  struct task_struct *tsk, int cpu)
+	  struct task_struct *tsk)
 {
 	/* make sure we have a context */
 
diff -urN linux-2.5.74-bk5/arch/i386/kernel/cpu/common.c linux-2.5.74-bk6/arch/i386/kernel/cpu/common.c
--- linux-2.5.74-bk5/arch/i386/kernel/cpu/common.c	2003-07-08 04:53:25.000000000 -0700
+++ linux-2.5.74-bk6/arch/i386/kernel/cpu/common.c	2003-07-08 04:53:34.000000000 -0700
@@ -495,7 +495,7 @@
 	current->active_mm = &init_mm;
 	if (current->mm)
 		BUG();
-	enter_lazy_tlb(&init_mm, current, cpu);
+	enter_lazy_tlb(&init_mm, current);
 
 	load_esp0(t, thread->esp0);
 	set_tss_desc(cpu,t);
diff -urN linux-2.5.74-bk5/arch/i386/kernel/cpu/cpufreq/powernow-k7.c linux-2.5.74-bk6/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
--- linux-2.5.74-bk5/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	2003-07-02 13:40:12.000000000 -0700
+++ linux-2.5.74-bk6/arch/i386/kernel/cpu/cpufreq/powernow-k7.c	2003-07-08 04:53:34.000000000 -0700
@@ -268,8 +268,8 @@
 		change_VID(vid);
 	} else {
 		/* Going up, so change VID first */
-		change_VID(fid);
-		change_FID(vid);
+		change_VID(vid);
+		change_FID(fid);
 	}
 	
 
diff -urN linux-2.5.74-bk5/arch/i386/kernel/entry.S linux-2.5.74-bk6/arch/i386/kernel/entry.S
--- linux-2.5.74-bk5/arch/i386/kernel/entry.S	2003-07-02 13:43:50.000000000 -0700
+++ linux-2.5.74-bk6/arch/i386/kernel/entry.S	2003-07-08 04:53:34.000000000 -0700
@@ -876,5 +876,6 @@
  	.long sys_clock_nanosleep
 	.long sys_statfs64
 	.long sys_fstatfs64	
+	.long sys_tgkill
  
 nr_syscalls=(.-sys_call_table)/4
diff -urN linux-2.5.74-bk5/arch/i386/kernel/irq.c linux-2.5.74-bk6/arch/i386/kernel/irq.c
--- linux-2.5.74-bk5/arch/i386/kernel/irq.c	2003-07-02 13:40:56.000000000 -0700
+++ linux-2.5.74-bk6/arch/i386/kernel/irq.c	2003-07-08 04:53:34.000000000 -0700
@@ -416,7 +416,6 @@
 	 * handled by some other CPU. (or is disabled)
 	 */
 	int irq = regs.orig_eax & 0xff; /* high bits used in ret_from_ code  */
-	int cpu = smp_processor_id();
 	irq_desc_t *desc = irq_desc + irq;
 	struct irqaction * action;
 	unsigned int status;
@@ -437,7 +436,7 @@
 		}
 	}
 #endif
-	kstat_cpu(cpu).irqs[irq]++;
+	kstat_this_cpu.irqs[irq]++;
 	spin_lock(&desc->lock);
 	desc->handler->ack(irq);
 	/*
diff -urN linux-2.5.74-bk5/arch/m68knommu/Kconfig linux-2.5.74-bk6/arch/m68knommu/Kconfig
--- linux-2.5.74-bk5/arch/m68knommu/Kconfig	2003-07-02 13:51:06.000000000 -0700
+++ linux-2.5.74-bk6/arch/m68knommu/Kconfig	2003-07-08 04:53:34.000000000 -0700
@@ -222,21 +222,17 @@
 	  Support for the Arcturus Networks uDsimm module.
 
 config DRAGEN2
-	bool "Dragen Engine II board support"
+	bool "DragenEngine II board support"
 	depends on M68VZ328
 	help
-	  Support for the Dragen Engine II board.
+	  Support for the DragenEngine II board.
 
-config HWADDR_FROMEEPROM
-	bool "  Read ETH address from EEPROM"
-	depends on DRAGEN2
-	help
-	  Use MAC address from EEPROM.
-
-config HWADDR_OFFSET
-	int "  Offset from start of EEPROM"
-	default "2"
-	depends on HWADDR_FROMEEPROM
+config DIRECT_IO_ACCESS
+	bool "  Allow user to access IO directly"
+	depends on (UCSIMM || UCDIMM || DRAGEN2)
+	help
+	  Disable the CPU internal registers protection in user mode,
+          to allow a user application to read/write them.
 
 config INIT_LCD
 	bool "  Initialize LCD"
@@ -246,7 +242,7 @@
 
 config MEMORY_RESERVE
 	int "  Memory reservation (MiB)"
-	depends on (UCSIMM || UCDIMM || DRAGEN2)
+	depends on (UCSIMM || UCDIMM)
 	help
 	  Reserve certain memory regions on 68x328 based boards.
 
diff -urN linux-2.5.74-bk5/arch/m68knommu/platform/5307/MP3/crt0_ram.S linux-2.5.74-bk6/arch/m68knommu/platform/5307/MP3/crt0_ram.S
--- linux-2.5.74-bk5/arch/m68knommu/platform/5307/MP3/crt0_ram.S	2003-07-02 13:45:17.000000000 -0700
+++ linux-2.5.74-bk6/arch/m68knommu/platform/5307/MP3/crt0_ram.S	2003-07-08 04:53:34.000000000 -0700
@@ -124,6 +124,8 @@
 	movec	%d0,%CACR
 	nop
 
+
+#ifdef CONFIG_ROMFS_FS
 	/*
 	 *	Move ROM filesystem above bss :-)
 	 */
@@ -145,6 +147,12 @@
 	cmp.l	%a0, %a2			/* Check if at end */
 	bne	_copy_romfs
 
+#else /* CONFIG_ROMFS_FS */
+	lea.l	_ebss, %a1
+	move.l	%a1, _ramstart
+#endif /* CONFIG_ROMFS_FS */
+
+
 	/*
 	 *	Zero out the bss region.
 	 */
diff -urN linux-2.5.74-bk5/arch/m68knommu/platform/5307/NETtel/crt0_ram.S linux-2.5.74-bk6/arch/m68knommu/platform/5307/NETtel/crt0_ram.S
--- linux-2.5.74-bk5/arch/m68knommu/platform/5307/NETtel/crt0_ram.S	2003-07-02 13:50:53.000000000 -0700
+++ linux-2.5.74-bk6/arch/m68knommu/platform/5307/NETtel/crt0_ram.S	2003-07-08 04:53:34.000000000 -0700
@@ -147,6 +147,8 @@
 	movec	%d0,%CACR
 	nop
 
+
+#ifdef CONFIG_ROMFS_FS
 	/*
 	 *	Move ROM filesystem above bss :-)
 	 */
@@ -168,6 +170,12 @@
 	cmp.l	%a0, %a2			/* Check if at end */
 	bne	_copy_romfs
 
+#else /* CONFIG_ROMFS_FS */
+	lea.l	_ebss, %a1
+	move.l	%a1, _ramstart
+#endif /* CONFIG_ROMFS_FS */
+
+
 	/*
 	 *	Zero out the bss region.
 	 */
diff -urN linux-2.5.74-bk5/arch/m68knommu/platform/68328/ints.c linux-2.5.74-bk6/arch/m68knommu/platform/68328/ints.c
--- linux-2.5.74-bk5/arch/m68knommu/platform/68328/ints.c	2003-07-02 13:44:33.000000000 -0700
+++ linux-2.5.74-bk6/arch/m68knommu/platform/68328/ints.c	2003-07-08 04:53:34.000000000 -0700
@@ -81,6 +81,7 @@
 /* irq node variables for the 32 (potential) on chip sources */
 static irq_node_t int_irq_list[NR_IRQS];
 
+#if !defined(CONFIG_DRAGEN2)
 asm ("
 	.global _start, __ramend
 	.section .romvec
@@ -102,6 +103,7 @@
 ignore: rte
 
 ");
+#endif
 
 /*
  * This function should be called during kernel startup to initialize
@@ -204,7 +206,7 @@
 			seq_printf(p, "  ");
 		seq_printf(p, "%s\n", int_irq_list[i].devname);
 	}
-	seq_printf(p, "   : %10u   spurious", num_spurious);
+	seq_printf(p, "   : %10u   spurious\n", num_spurious);
 
 	return 0;
 }
diff -urN linux-2.5.74-bk5/arch/m68knommu/platform/68360/config.c linux-2.5.74-bk6/arch/m68knommu/platform/68360/config.c
--- linux-2.5.74-bk5/arch/m68knommu/platform/68360/config.c	2003-07-02 13:54:45.000000000 -0700
+++ linux-2.5.74-bk6/arch/m68knommu/platform/68360/config.c	2003-07-08 04:53:34.000000000 -0700
@@ -205,9 +205,4 @@
   mach_hwclk           = NULL;
   mach_set_clock_mmss  = NULL;
   mach_reset           = BSP_reset;
-
-  //Kendrick's Change
-  mach_trap_init        = M68360_init_IRQ;
-
-  config_M68360_irq();
 }
diff -urN linux-2.5.74-bk5/arch/m68knommu/platform/68VZ328/de2/config.c linux-2.5.74-bk6/arch/m68knommu/platform/68VZ328/de2/config.c
--- linux-2.5.74-bk5/arch/m68knommu/platform/68VZ328/de2/config.c	2003-07-02 13:43:36.000000000 -0700
+++ linux-2.5.74-bk6/arch/m68knommu/platform/68VZ328/de2/config.c	2003-07-08 04:53:34.000000000 -0700
@@ -36,7 +36,7 @@
 #define TICKS_PER_JIFFY 41450
 
 static void
-dragen2_sched_init(void (*timer_routine) (int, void *, struct pt_regs *))
+dragen2_sched_init(irqreturn_t (*timer_routine) (int, void *, struct pt_regs *))
 {
 	/* disable timer 1 */
 	TCTL = 0;
@@ -183,14 +183,20 @@
 #endif
 }
 
-void config_BSP(char *command, int len)
+void config_BSP(char *command, int size)
 {
 	printk("68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
-	command[0] = '\0';			/* no specific boot option */
+
+#if defined(CONFIG_BOOTPARAM)
+	strncpy(command, CONFIG_BOOTPARAM_STRING, size);
+	command[size-1] = 0;
+#else
+	memset(command, 0, size);
+#endif
 
 	init_hardware();
 
-	mach_sched_init = dragen2_sched_init;
+	mach_sched_init = (void *)dragen2_sched_init;
 	mach_tick = dragen2_tick;
 	mach_gettimeoffset = dragen2_gettimeoffset;
 	mach_reset = dragen2_reset;
diff -urN linux-2.5.74-bk5/arch/m68knommu/vmlinux.lds.S linux-2.5.74-bk6/arch/m68knommu/vmlinux.lds.S
--- linux-2.5.74-bk5/arch/m68knommu/vmlinux.lds.S	2003-07-02 13:46:20.000000000 -0700
+++ linux-2.5.74-bk6/arch/m68knommu/vmlinux.lds.S	2003-07-08 04:53:34.000000000 -0700
@@ -277,7 +277,9 @@
 		__con_initcall_start = .;
 		*(.con_initcall.init)
 		__con_initcall_end = .;
-		SECURITY_INIT
+		__security_initcall_start = .;
+		*(.security_initcall.init)
+		__security_initcall_end = .;
 		. = ALIGN(4);
 		__initramfs_start = .;
 		*(.init.ramfs)
diff -urN linux-2.5.74-bk5/arch/parisc/kernel/smp.c linux-2.5.74-bk6/arch/parisc/kernel/smp.c
--- linux-2.5.74-bk5/arch/parisc/kernel/smp.c	2003-07-02 13:57:32.000000000 -0700
+++ linux-2.5.74-bk6/arch/parisc/kernel/smp.c	2003-07-08 04:53:34.000000000 -0700
@@ -456,7 +456,7 @@
 	current->active_mm = &init_mm;
 	if(current->mm)
 		BUG();
-	enter_lazy_tlb(&init_mm, current, cpunum);
+	enter_lazy_tlb(&init_mm, current);
 
 	init_IRQ();   /* make sure no IRQ's are enabled or pending */
 }
diff -urN linux-2.5.74-bk5/arch/s390/kernel/setup.c linux-2.5.74-bk6/arch/s390/kernel/setup.c
--- linux-2.5.74-bk5/arch/s390/kernel/setup.c	2003-07-02 13:41:06.000000000 -0700
+++ linux-2.5.74-bk6/arch/s390/kernel/setup.c	2003-07-08 04:53:35.000000000 -0700
@@ -107,7 +107,7 @@
         current->active_mm = &init_mm;
         if (current->mm)
                 BUG();
-        enter_lazy_tlb(&init_mm, current, nr);
+        enter_lazy_tlb(&init_mm, current);
 }
 
 /*
diff -urN linux-2.5.74-bk5/arch/um/kernel/process_kern.c linux-2.5.74-bk6/arch/um/kernel/process_kern.c
--- linux-2.5.74-bk5/arch/um/kernel/process_kern.c	2003-07-02 13:48:26.000000000 -0700
+++ linux-2.5.74-bk6/arch/um/kernel/process_kern.c	2003-07-08 04:53:35.000000000 -0700
@@ -113,8 +113,9 @@
 }
 
 void switch_mm(struct mm_struct *prev, struct mm_struct *next, 
-	       struct task_struct *tsk, unsigned cpu)
+	       struct task_struct *tsk)
 {
+	unsigned cpu = smp_processor_id();
 	if (prev != next) 
 		clear_bit(cpu, &prev->cpu_vm_mask);
 	set_bit(cpu, &next->cpu_vm_mask);
diff -urN linux-2.5.74-bk5/arch/x86_64/kernel/setup64.c linux-2.5.74-bk6/arch/x86_64/kernel/setup64.c
--- linux-2.5.74-bk5/arch/x86_64/kernel/setup64.c	2003-07-02 13:43:58.000000000 -0700
+++ linux-2.5.74-bk6/arch/x86_64/kernel/setup64.c	2003-07-08 04:53:35.000000000 -0700
@@ -288,7 +288,7 @@
 	me->active_mm = &init_mm;
 	if (me->mm)
 		BUG();
-	enter_lazy_tlb(&init_mm, me, cpu);
+	enter_lazy_tlb(&init_mm, me);
 
 	set_tss_desc(cpu, t);
 	load_TR_desc();
diff -urN linux-2.5.74-bk5/drivers/macintosh/macserial.c linux-2.5.74-bk6/drivers/macintosh/macserial.c
--- linux-2.5.74-bk5/drivers/macintosh/macserial.c	2003-07-02 13:57:12.000000000 -0700
+++ linux-2.5.74-bk6/drivers/macintosh/macserial.c	2003-07-08 04:53:35.000000000 -0700
@@ -76,6 +76,8 @@
    in the order we want. */
 #define RECOVERY_DELAY	eieio()
 
+static struct tty_driver *serial_driver;
+
 struct mac_zschannel zs_channels[NUM_CHANNELS];
 
 struct mac_serial zs_soft[NUM_CHANNELS];
@@ -2093,12 +2095,7 @@
 	 */
 	if (info->flags & ZILOG_CLOSING) {
 		interruptible_sleep_on(&info->close_wait);
-#ifdef SERIAL_DO_RESTART
-		return ((info->flags & ZILOG_HUP_NOTIFY) ?
-			-EAGAIN : -ERESTARTSYS);
-#else
 		return -EAGAIN;
-#endif
 	}
 
 	/*
@@ -2139,14 +2136,7 @@
 		set_current_state(TASK_INTERRUPTIBLE);
 		if (tty_hung_up_p(filp) ||
 		    !(info->flags & ZILOG_INITIALIZED)) {
-#ifdef SERIAL_DO_RESTART
-			if (info->flags & ZILOG_HUP_NOTIFY)
-				retval = -EAGAIN;
-			else
-				retval = -ERESTARTSYS;
-#else
 			retval = -EAGAIN;
-#endif
 			break;
 		}
 		if (!(info->flags & ZILOG_CLOSING) &&
@@ -2222,12 +2212,7 @@
 	    (info->flags & ZILOG_CLOSING)) {
 		if (info->flags & ZILOG_CLOSING)
 			interruptible_sleep_on(&info->close_wait);
-#ifdef SERIAL_DO_RESTART
-		return ((info->flags & ZILOG_HUP_NOTIFY) ?
-			-EAGAIN : -ERESTARTSYS);
-#else
 		return -EAGAIN;
-#endif
 	}
 
 	/*
diff -urN linux-2.5.74-bk5/drivers/serial/68328serial.c linux-2.5.74-bk6/drivers/serial/68328serial.c
--- linux-2.5.74-bk5/drivers/serial/68328serial.c	2003-07-02 13:57:13.000000000 -0700
+++ linux-2.5.74-bk6/drivers/serial/68328serial.c	2003-07-08 04:53:38.000000000 -0700
@@ -1533,7 +1533,6 @@
 }
 	
 module_init(rs68328_init);
-/* DAVIDM module_exit(rs68328_fini); */
 
 
 
diff -urN linux-2.5.74-bk5/drivers/serial/mcfserial.c linux-2.5.74-bk6/drivers/serial/mcfserial.c
--- linux-2.5.74-bk5/drivers/serial/mcfserial.c	2003-07-02 13:46:45.000000000 -0700
+++ linux-2.5.74-bk6/drivers/serial/mcfserial.c	2003-07-08 04:53:38.000000000 -0700
@@ -1643,7 +1643,6 @@
 }
 
 module_init(mcfrs_init);
-/* DAVIDM module_exit(mcfrs_fini); */
 
 /****************************************************************************/
 /*                          Serial Console                                  */
diff -urN linux-2.5.74-bk5/fs/aio.c linux-2.5.74-bk6/fs/aio.c
--- linux-2.5.74-bk5/fs/aio.c	2003-07-02 13:46:55.000000000 -0700
+++ linux-2.5.74-bk6/fs/aio.c	2003-07-08 04:53:38.000000000 -0700
@@ -552,7 +552,7 @@
 {
 	current->mm = NULL;
 	/* active_mm is still 'mm' */
-	enter_lazy_tlb(mm, current, smp_processor_id());
+	enter_lazy_tlb(mm, current);
 }
 
 /* Run on kevent's context.  FIXME: needs to be per-cpu and warn if an
diff -urN linux-2.5.74-bk5/fs/namei.c linux-2.5.74-bk6/fs/namei.c
--- linux-2.5.74-bk5/fs/namei.c	2003-07-08 04:53:27.000000000 -0700
+++ linux-2.5.74-bk6/fs/namei.c	2003-07-08 04:53:39.000000000 -0700
@@ -1344,6 +1344,7 @@
 	 * stored in nd->last.name and we will have to putname() it when we
 	 * are done. Procfs-like symlinks just set LAST_BIND.
 	 */
+	nd->flags |= LOOKUP_PARENT;
 	error = security_inode_follow_link(dentry, nd);
 	if (error)
 		goto exit_dput;
@@ -1352,6 +1353,7 @@
 	dput(dentry);
 	if (error)
 		return error;
+	nd->flags &= ~LOOKUP_PARENT;
 	if (nd->last_type == LAST_BIND) {
 		dentry = nd->dentry;
 		goto ok;
diff -urN linux-2.5.74-bk5/include/asm-alpha/machvec.h linux-2.5.74-bk6/include/asm-alpha/machvec.h
--- linux-2.5.74-bk5/include/asm-alpha/machvec.h	2003-07-02 13:41:43.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-alpha/machvec.h	2003-07-08 04:53:40.000000000 -0700
@@ -68,7 +68,7 @@
 	int (*mv_is_ioaddr)(unsigned long);
 
 	void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
-			     struct task_struct *, long);
+			     struct task_struct *);
 	void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
 
 	void (*mv_flush_tlb_current)(struct mm_struct *);
diff -urN linux-2.5.74-bk5/include/asm-alpha/mmu_context.h linux-2.5.74-bk6/include/asm-alpha/mmu_context.h
--- linux-2.5.74-bk5/include/asm-alpha/mmu_context.h	2003-07-02 13:48:10.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-alpha/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -130,11 +130,12 @@
 
 __EXTERN_INLINE void
 ev5_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
-	      struct task_struct *next, long cpu)
+	      struct task_struct *next)
 {
 	/* Check if our ASN is of an older version, and thus invalid. */
 	unsigned long asn;
 	unsigned long mmc;
+	long cpu = smp_processor_id();
 
 #ifdef CONFIG_SMP
 	cpu_data[cpu].asn_lock = 1;
@@ -159,7 +160,7 @@
 
 __EXTERN_INLINE void
 ev4_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
-	      struct task_struct *next, long cpu)
+	      struct task_struct *next)
 {
 	/* As described, ASN's are broken for TLB usage.  But we can
 	   optimize for switching between threads -- if the mm is
@@ -174,7 +175,7 @@
 
 	/* Do continue to allocate ASNs, because we can still use them
 	   to avoid flushing the icache.  */
-	ev5_switch_mm(prev_mm, next_mm, next, cpu);
+	ev5_switch_mm(prev_mm, next_mm, next);
 }
 
 extern void __load_new_mm_context(struct mm_struct *);
@@ -212,14 +213,14 @@
 #define deactivate_mm(tsk,mm)	do { } while (0)
 
 #ifdef CONFIG_ALPHA_GENERIC
-# define switch_mm(a,b,c,d)	alpha_mv.mv_switch_mm((a),(b),(c),(d))
+# define switch_mm(a,b,c)	alpha_mv.mv_switch_mm((a),(b),(c))
 # define activate_mm(x,y)	alpha_mv.mv_activate_mm((x),(y))
 #else
 # ifdef CONFIG_ALPHA_EV4
-#  define switch_mm(a,b,c,d)	ev4_switch_mm((a),(b),(c),(d))
+#  define switch_mm(a,b,c)	ev4_switch_mm((a),(b),(c))
 #  define activate_mm(x,y)	ev4_activate_mm((x),(y))
 # else
-#  define switch_mm(a,b,c,d)	ev5_switch_mm((a),(b),(c),(d))
+#  define switch_mm(a,b,c)	ev5_switch_mm((a),(b),(c))
 #  define activate_mm(x,y)	ev5_activate_mm((x),(y))
 # endif
 #endif
@@ -245,7 +246,7 @@
 }
 
 static inline void
-enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 	tsk->thread_info->pcb.ptbr
 	  = ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
diff -urN linux-2.5.74-bk5/include/asm-arm/mmu_context.h linux-2.5.74-bk6/include/asm-arm/mmu_context.h
--- linux-2.5.74-bk5/include/asm-arm/mmu_context.h	2003-07-02 13:46:48.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -28,7 +28,7 @@
  * tsk->mm will be NULL
  */
 static inline void
-enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -40,7 +40,7 @@
  */
 static inline void
 switch_mm(struct mm_struct *prev, struct mm_struct *next,
-	  struct task_struct *tsk, unsigned int cpu)
+	  struct task_struct *tsk)
 {
 	if (prev != next) {
 		cpu_switch_mm(next->pgd, next);
diff -urN linux-2.5.74-bk5/include/asm-arm26/arch.h linux-2.5.74-bk6/include/asm-arm26/arch.h
--- linux-2.5.74-bk5/include/asm-arm26/arch.h	2003-07-02 13:56:37.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/arch.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,62 +0,0 @@
-/*
- *  linux/include/asm-arm/mach/arch.h
- *
- *  Copyright (C) 2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-/*
- * The size of struct machine_desc
- *   (for assembler code)
- * FIXME - I count 45... or is this padding?
- */
-#define SIZEOF_MACHINE_DESC	48
-
-#ifndef __ASSEMBLY__
-
-struct tag;
-
-struct machine_desc {
-	int			nr; /* arch no FIXME - get rid */
-	const char		*name;		/* architecture name	*/
-	unsigned int		param_offset;	/* parameter page	*/
-
-	unsigned int		video_start;	/* start of video RAM	*/
-	unsigned int		video_end;	/* end of video RAM	*/
-
-	unsigned int		reserve_lp0 :1;	/* never has lp0	*/
-	unsigned int		reserve_lp1 :1;	/* never has lp1	*/
-	unsigned int		reserve_lp2 :1;	/* never has lp2	*/
-	unsigned int		soft_reboot :1;	/* soft reboot		*/
-	void			(*fixup)(struct machine_desc *,
-					 struct tag *, char **,
-					 struct meminfo *);
-	void			(*map_io)(void);/* IO mapping function	*/
-	void			(*init_irq)(void);
-};
-
-/*
- * Set of macros to define architecture features.  This is built into
- * a table by the linker.
- */
-#define MACHINE_START(_type,_name)		\
-const struct machine_desc __mach_desc_##_type	\
- __attribute__((__section__(".arch.info"))) = {	\
-	nr:		MACH_TYPE_##_type,	\
-	name:		_name,
-
-#define MAINTAINER(n)
-
-#define BOOT_PARAMS(_params)			\
-	param_offset:	_params,
-
-#define INITIRQ(_func)				\
-	init_irq:	_func,
-
-#define MACHINE_END				\
-};
-
-#endif
diff -urN linux-2.5.74-bk5/include/asm-arm26/bug.h linux-2.5.74-bk6/include/asm-arm26/bug.h
--- linux-2.5.74-bk5/include/asm-arm26/bug.h	2003-07-02 13:57:16.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/bug.h	2003-07-08 04:53:40.000000000 -0700
@@ -4,7 +4,7 @@
 #include <linux/config.h>
 
 #ifdef CONFIG_DEBUG_BUGVERBOSE
-extern void __bug(const char *file, int line, void *data);
+extern volatile void __bug(const char *file, int line, void *data);
 
 /* give file/line information */
 #define BUG()		__bug(__FILE__, __LINE__, NULL)
@@ -18,4 +18,13 @@
 
 #endif
 
+#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
+
+#define WARN_ON(condition) do { \
+	if (unlikely((condition)!=0)) { \
+		printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
+		dump_stack(); \
+	} \
+} while (0)
+
 #endif
diff -urN linux-2.5.74-bk5/include/asm-arm26/bugs.h linux-2.5.74-bk6/include/asm-arm26/bugs.h
--- linux-2.5.74-bk5/include/asm-arm26/bugs.h	2003-07-02 13:43:27.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/bugs.h	2003-07-08 04:53:40.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- *  linux/include/asm-arm/bugs.h
+ *  linux/include/asm-arm26/bugs.h
  *
  *  Copyright (C) 1995  Russell King
  *
diff -urN linux-2.5.74-bk5/include/asm-arm26/ecard.h linux-2.5.74-bk6/include/asm-arm26/ecard.h
--- linux-2.5.74-bk5/include/asm-arm26/ecard.h	2003-07-02 13:46:47.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/ecard.h	2003-07-08 04:53:40.000000000 -0700
@@ -26,6 +26,9 @@
 #define PROD_ACORN_ETHER1		0x0003
 #define PROD_ACORN_MFM			0x000b
 
+#define MANU_CCONCEPTS		0x0009
+#define PROD_CCONCEPTS_COLOURCARD	0x0050
+
 #define MANU_ANT2		0x0011
 #define PROD_ANT_ETHER3			0x00a4
 
diff -urN linux-2.5.74-bk5/include/asm-arm26/mach-types.h linux-2.5.74-bk6/include/asm-arm26/mach-types.h
--- linux-2.5.74-bk5/include/asm-arm26/mach-types.h	2003-07-02 13:40:16.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/mach-types.h	2003-07-08 04:53:40.000000000 -0700
@@ -1,5 +1,6 @@
 /*
  * Unlike ARM32 this is NOT automatically generated. DONT delete it
+ * Instead, consider FIXME-ing it so its auto-detected.
  */
 
 #ifndef __ASM_ARM_MACH_TYPE_H
diff -urN linux-2.5.74-bk5/include/asm-arm26/mmu_context.h linux-2.5.74-bk6/include/asm-arm26/mmu_context.h
--- linux-2.5.74-bk5/include/asm-arm26/mmu_context.h	2003-07-02 13:39:22.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -26,7 +26,7 @@
  * tsk->mm will be NULL
  */
 static inline void
-enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -36,7 +36,7 @@
  */
 static inline void
 switch_mm(struct mm_struct *prev, struct mm_struct *next,
-	  struct task_struct *tsk, unsigned int cpu)
+	  struct task_struct *tsk)
 {
 	cpu_switch_mm(next->pgd, next);
 }
diff -urN linux-2.5.74-bk5/include/asm-arm26/pgalloc.h linux-2.5.74-bk6/include/asm-arm26/pgalloc.h
--- linux-2.5.74-bk5/include/asm-arm26/pgalloc.h	2003-07-02 13:58:15.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/pgalloc.h	2003-07-08 04:53:40.000000000 -0700
@@ -55,9 +55,9 @@
  * is thrown away. It just cant be zero. -IM
  */
 
-#define pmd_alloc_one(mm,addr)		((pmd_t *)2); BUG()
+#define pmd_alloc_one(mm,addr)		({ BUG(); ((pmd_t *)2); })
 #define pmd_free(pmd)			do { } while (0)
-#define pgd_populate(mm,pmd,pte)	(0)
+#define pgd_populate(mm,pmd,pte)	BUG()
 
 extern pgd_t *get_pgd_slow(struct mm_struct *mm);
 extern void free_pgd_slow(pgd_t *pgd);
diff -urN linux-2.5.74-bk5/include/asm-arm26/pgtable.h linux-2.5.74-bk6/include/asm-arm26/pgtable.h
--- linux-2.5.74-bk5/include/asm-arm26/pgtable.h	2003-07-02 13:41:12.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/pgtable.h	2003-07-08 04:53:40.000000000 -0700
@@ -179,7 +179,7 @@
 /* Is pmd_page supposed to return a pointer to a page in some arches? ours seems to
  * return a pointer to memory (no special alignment)
  */
-#define pmd_page(pmd)  ((unsigned long)(pmd_val((pmd)) & ~_PMD_PRESENT))
+#define pmd_page(pmd)  ((struct page *)(pmd_val((pmd)) & ~_PMD_PRESENT))
 #define pmd_page_kernel(pmd) ((pte_t *)(pmd_val((pmd)) & ~_PMD_PRESENT))
 
 #define pte_offset_kernel(dir,addr)     (pmd_page_kernel(*(dir)) + __pte_index(addr))
diff -urN linux-2.5.74-bk5/include/asm-arm26/statfs.h linux-2.5.74-bk6/include/asm-arm26/statfs.h
--- linux-2.5.74-bk5/include/asm-arm26/statfs.h	2003-07-02 13:40:55.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/statfs.h	2003-07-08 04:53:40.000000000 -0700
@@ -1,25 +1,8 @@
 #ifndef _ASMARM_STATFS_H
 #define _ASMARM_STATFS_H
 
-#ifndef __KERNEL_STRICT_NAMES
+//FIXME - this may not be appropriate for arm26. check it out.
 
-#include <linux/types.h>
-
-typedef __kernel_fsid_t	fsid_t;
-
-#endif
-
-struct statfs {
-	long f_type;
-	long f_bsize;
-	long f_blocks;
-	long f_bfree;
-	long f_bavail;
-	long f_files;
-	long f_ffree;
-	__kernel_fsid_t f_fsid;
-	long f_namelen;
-	long f_spare[6];
-};
+#include <asm-generic/statfs.h>
 
 #endif
diff -urN linux-2.5.74-bk5/include/asm-arm26/thread_info.h linux-2.5.74-bk6/include/asm-arm26/thread_info.h
--- linux-2.5.74-bk5/include/asm-arm26/thread_info.h	2003-07-02 13:43:44.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-arm26/thread_info.h	2003-07-08 04:53:40.000000000 -0700
@@ -85,7 +85,7 @@
 //#define INIT_THREAD_SIZE        (65536)
 #define __get_user_regs(x) (((struct pt_regs *)((unsigned long)(x) + THREAD_SIZE - 8)) - 1)
 
-extern struct thread_info *alloc_thread_info(void);
+extern struct thread_info *alloc_thread_info(struct task_struct *task);
 extern void free_thread_info(struct thread_info *);
 
 #define get_thread_info(ti)	get_task_struct((ti)->task)
diff -urN linux-2.5.74-bk5/include/asm-cris/mmu_context.h linux-2.5.74-bk6/include/asm-cris/mmu_context.h
--- linux-2.5.74-bk5/include/asm-cris/mmu_context.h	2003-07-02 13:44:27.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-cris/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -5,11 +5,11 @@
 extern void get_mmu_context(struct mm_struct *mm);
 extern void destroy_context(struct mm_struct *mm);
 extern void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-		      struct task_struct *tsk, int cpu);
+		      struct task_struct *tsk);
 
 #define deactivate_mm(tsk,mm)	do { } while (0)
 
-#define activate_mm(prev,next) switch_mm((prev),(next),NULL,smp_processor_id())
+#define activate_mm(prev,next) switch_mm((prev),(next),NULL)
 
 /* current active pgd - this is similar to other processors pgd 
  * registers like cr3 on the i386
@@ -17,7 +17,7 @@
 
 extern volatile pgd_t *current_pgd;   /* defined in arch/cris/mm/fault.c */
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
diff -urN linux-2.5.74-bk5/include/asm-h8300/mmu_context.h linux-2.5.74-bk6/include/asm-h8300/mmu_context.h
--- linux-2.5.74-bk5/include/asm-h8300/mmu_context.h	2003-07-02 13:39:23.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-h8300/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -6,7 +6,7 @@
 #include <asm/page.h>
 #include <asm/pgalloc.h>
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -20,7 +20,7 @@
 #define destroy_context(mm)		do { } while(0)
 #define deactivate_mm(tsk,mm)           do { } while(0)
 
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
 {
 }
 
diff -urN linux-2.5.74-bk5/include/asm-i386/mmu_context.h linux-2.5.74-bk6/include/asm-i386/mmu_context.h
--- linux-2.5.74-bk5/include/asm-i386/mmu_context.h	2003-07-02 13:39:20.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-i386/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -14,16 +14,21 @@
 void destroy_context(struct mm_struct *mm);
 
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 #ifdef CONFIG_SMP
+	unsigned cpu = smp_processor_id();
 	if (cpu_tlbstate[cpu].state == TLBSTATE_OK)
 		cpu_tlbstate[cpu].state = TLBSTATE_LAZY;	
 #endif
 }
 
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
+static inline void switch_mm(struct mm_struct *prev,
+			     struct mm_struct *next,
+			     struct task_struct *tsk)
 {
+	int cpu = smp_processor_id();
+
 	if (likely(prev != next)) {
 		/* stop flush ipis for the previous mm */
 		clear_bit(cpu, &prev->cpu_vm_mask);
@@ -62,6 +67,6 @@
 	asm("movl %0,%%fs ; movl %0,%%gs": :"r" (0))
 
 #define activate_mm(prev, next) \
-	switch_mm((prev),(next),NULL,smp_processor_id())
+	switch_mm((prev),(next),NULL)
 
 #endif
diff -urN linux-2.5.74-bk5/include/asm-i386/unistd.h linux-2.5.74-bk6/include/asm-i386/unistd.h
--- linux-2.5.74-bk5/include/asm-i386/unistd.h	2003-07-02 13:50:16.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-i386/unistd.h	2003-07-08 04:53:40.000000000 -0700
@@ -275,8 +275,9 @@
 #define __NR_clock_nanosleep	(__NR_timer_create+8)
 #define __NR_statfs64		268
 #define __NR_fstatfs64		269
+#define __NR_tgkill		270
 
-#define NR_syscalls 270
+#define NR_syscalls 271
 
 /* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
 
diff -urN linux-2.5.74-bk5/include/asm-ia64/mmu_context.h linux-2.5.74-bk6/include/asm-ia64/mmu_context.h
--- linux-2.5.74-bk5/include/asm-ia64/mmu_context.h	2003-07-02 13:41:41.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-ia64/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -71,7 +71,7 @@
 extern void wrap_mmu_context (struct mm_struct *mm);
 
 static inline void
-enter_lazy_tlb (struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+enter_lazy_tlb (struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -198,7 +198,7 @@
 	activate_context(next);
 }
 
-#define switch_mm(prev_mm,next_mm,next_task,cpu)	activate_mm(prev_mm, next_mm)
+#define switch_mm(prev_mm,next_mm,next_task)	activate_mm(prev_mm, next_mm)
 
 # endif /* ! __ASSEMBLY__ */
 #endif /* _ASM_IA64_MMU_CONTEXT_H */
diff -urN linux-2.5.74-bk5/include/asm-m68k/mmu_context.h linux-2.5.74-bk6/include/asm-m68k/mmu_context.h
--- linux-2.5.74-bk5/include/asm-m68k/mmu_context.h	2003-07-02 13:51:07.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-m68k/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -3,7 +3,7 @@
 
 #include <linux/config.h>
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -79,7 +79,7 @@
 	asm volatile (".chip 68k");
 }
 
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
 {
 	if (prev != next) {
 		if (CPU_IS_020_OR_030)
@@ -137,7 +137,7 @@
 	sun3_put_context(mm->context);
 }
 
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
 {
 	activate_context(tsk->mm);
 }
diff -urN linux-2.5.74-bk5/include/asm-m68knommu/io.h linux-2.5.74-bk6/include/asm-m68knommu/io.h
--- linux-2.5.74-bk5/include/asm-m68knommu/io.h	2003-07-02 13:46:45.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-m68knommu/io.h	2003-07-08 04:53:40.000000000 -0700
@@ -43,6 +43,13 @@
 #define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
 #define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))
 
+#define __raw_readb readb
+#define __raw_readw readw
+#define __raw_readl readl
+#define __raw_writeb writeb
+#define __raw_writew writew
+#define __raw_writel writel
+
 static inline void io_outsb(unsigned int addr, void *buf, int len)
 {
 	volatile unsigned char *ap = (volatile unsigned char *) addr;
@@ -100,7 +107,7 @@
 #define memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))
 #define memcpy_toio(a,b,c)	memcpy((void *)(a),(b),(c))
 
-#define inb(addr)      readb(addr)
+#define inb(addr)    readb(addr)
 #define inw(addr)    readw(addr)
 #define inl(addr)    readl(addr)
 #define outb(x,addr) ((void) writeb(x,addr))
diff -urN linux-2.5.74-bk5/include/asm-m68knommu/mmu_context.h linux-2.5.74-bk6/include/asm-m68knommu/mmu_context.h
--- linux-2.5.74-bk5/include/asm-m68knommu/mmu_context.h	2003-07-02 13:41:11.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-m68knommu/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -6,7 +6,7 @@
 #include <asm/page.h>
 #include <asm/pgalloc.h>
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -19,7 +19,7 @@
 
 #define destroy_context(mm)		do { } while(0)
 
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
 {
 }
 
diff -urN linux-2.5.74-bk5/include/asm-mips/mmu_context.h linux-2.5.74-bk6/include/asm-mips/mmu_context.h
--- linux-2.5.74-bk5/include/asm-mips/mmu_context.h	2003-07-02 13:46:57.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-mips/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -49,7 +49,7 @@
 #define cpu_asid(cpu, mm)	(cpu_context((cpu), (mm)) & ASID_MASK)
 #define asid_cache(cpu)		(cpu_data[cpu].asid_cache)
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -92,9 +92,10 @@
 }
 
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-                             struct task_struct *tsk, unsigned cpu)
+                             struct task_struct *tsk)
 {
 	unsigned long flags;
+	unsigned cpu = smp_processor_id();
 
 	local_irq_save(flags);
 
diff -urN linux-2.5.74-bk5/include/asm-mips64/mmu_context.h linux-2.5.74-bk6/include/asm-mips64/mmu_context.h
--- linux-2.5.74-bk5/include/asm-mips64/mmu_context.h	2003-07-02 13:41:04.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-mips64/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -40,7 +40,7 @@
 #define cpu_asid(cpu, mm)	(cpu_context((cpu), (mm)) & ASID_MASK)
 #define asid_cache(cpu)		(cpu_data[cpu].asid_cache)
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
diff -urN linux-2.5.74-bk5/include/asm-parisc/mmu_context.h linux-2.5.74-bk6/include/asm-parisc/mmu_context.h
--- linux-2.5.74-bk5/include/asm-parisc/mmu_context.h	2003-07-02 13:42:06.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-parisc/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -6,7 +6,7 @@
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -43,7 +43,7 @@
 #endif
 }
 
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
 {
 
 	if (prev != next) {
@@ -69,6 +69,6 @@
 	if (next->context == 0)
 	    next->context = alloc_sid();
 
-	switch_mm(prev,next,current,0);
+	switch_mm(prev,next,current);
 }
 #endif
diff -urN linux-2.5.74-bk5/include/asm-ppc/mmu_context.h linux-2.5.74-bk6/include/asm-ppc/mmu_context.h
--- linux-2.5.74-bk5/include/asm-ppc/mmu_context.h	2003-07-02 13:49:05.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-ppc/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -48,7 +48,7 @@
    	-- Dan
  */
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -153,7 +153,7 @@
 }
 
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-			     struct task_struct *tsk, int cpu)
+			     struct task_struct *tsk)
 {
 	tsk->thread.pgdir = next->pgd;
 	get_mmu_context(next);
diff -urN linux-2.5.74-bk5/include/asm-ppc64/mmu_context.h linux-2.5.74-bk6/include/asm-ppc64/mmu_context.h
--- linux-2.5.74-bk5/include/asm-ppc64/mmu_context.h	2003-07-02 13:45:51.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-ppc64/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -56,7 +56,7 @@
 extern struct mmu_context_queue_t mmu_context_queue;
 
 static inline void
-enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -140,10 +140,10 @@
  */
 static inline void
 switch_mm(struct mm_struct *prev, struct mm_struct *next,
-	  struct task_struct *tsk, int cpu)
+	  struct task_struct *tsk)
 {
 	flush_stab(tsk, next);
-	set_bit(cpu, &next->cpu_vm_mask);
+	set_bit(smp_processor_id(), &next->cpu_vm_mask);
 }
 
 #define deactivate_mm(tsk,mm)	do { } while (0)
@@ -153,7 +153,7 @@
  * the context for the new mm so we see the new mappings.
  */
 #define activate_mm(active_mm, mm) \
-	switch_mm(active_mm, mm, current, smp_processor_id());
+	switch_mm(active_mm, mm, current);
 
 #define VSID_RANDOMIZER 42470972311
 #define VSID_MASK	0xfffffffff
diff -urN linux-2.5.74-bk5/include/asm-s390/mmu_context.h linux-2.5.74-bk6/include/asm-s390/mmu_context.h
--- linux-2.5.74-bk5/include/asm-s390/mmu_context.h	2003-07-02 13:46:54.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-s390/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -17,12 +17,12 @@
 #define destroy_context(mm)             flush_tlb_mm(mm)
 
 static inline void enter_lazy_tlb(struct mm_struct *mm,
-                                  struct task_struct *tsk, unsigned cpu)
+                                  struct task_struct *tsk)
 {
 }
 
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-                             struct task_struct *tsk, unsigned cpu)
+                             struct task_struct *tsk)
 {
         unsigned long pgd;
 
@@ -42,7 +42,7 @@
                              : : "m" (pgd) );
 #endif /* __s390x__ */
         }
-	set_bit(cpu, &next->cpu_vm_mask);
+	set_bit(smp_processor_id(), &next->cpu_vm_mask);
 }
 
 #define deactivate_mm(tsk,mm)	do { } while (0)
@@ -50,7 +50,7 @@
 extern inline void activate_mm(struct mm_struct *prev,
                                struct mm_struct *next)
 {
-        switch_mm(prev, next, current, smp_processor_id());
+        switch_mm(prev, next, current);
 }
 
 #endif
diff -urN linux-2.5.74-bk5/include/asm-sh/mmu_context.h linux-2.5.74-bk6/include/asm-sh/mmu_context.h
--- linux-2.5.74-bk5/include/asm-sh/mmu_context.h	2003-07-02 13:52:46.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-sh/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -129,7 +129,7 @@
    (Currently not used) */
 static __inline__ void switch_mm(struct mm_struct *prev,
 				 struct mm_struct *next,
-				 struct task_struct *tsk, unsigned int cpu)
+				 struct task_struct *tsk)
 {
 	if (likely(prev != next)) {
 		unsigned long __pgdir = (unsigned long)next->pgd;
@@ -144,10 +144,10 @@
 #define deactivate_mm(tsk,mm)	do { } while (0)
 
 #define activate_mm(prev, next) \
-	switch_mm((prev),(next),NULL,smp_processor_id())
+	switch_mm((prev),(next),NULL)
 
 static __inline__ void
-enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 #else /* !CONFIG_MMU */
@@ -157,10 +157,10 @@
 #define set_asid(asid)			do { } while (0)
 #define get_asid()			(0)
 #define activate_context(mm)		do { } while (0)
-#define switch_mm(prev,next,tsk,cpu)	do { } while (0)
+#define switch_mm(prev,next,tsk)	do { } while (0)
 #define deactivate_mm(tsk,mm)		do { } while (0)
 #define activate_mm(prev,next)		do { } while (0)
-#define enter_lazy_tlb(mm,tsk,cpu)	do { } while (0)
+#define enter_lazy_tlb(mm,tsk)		do { } while (0)
 #endif /* CONFIG_MMU */
 
 #if defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4)
diff -urN linux-2.5.74-bk5/include/asm-sparc/mmu_context.h linux-2.5.74-bk6/include/asm-sparc/mmu_context.h
--- linux-2.5.74-bk5/include/asm-sparc/mmu_context.h	2003-07-02 13:40:30.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-sparc/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -5,7 +5,7 @@
 
 #ifndef __ASSEMBLY__
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -26,14 +26,14 @@
 #define destroy_context(mm) BTFIXUP_CALL(destroy_context)(mm)
 
 /* Switch the current MM context. */
-BTFIXUPDEF_CALL(void, switch_mm, struct mm_struct *, struct mm_struct *, struct task_struct *, int)
+BTFIXUPDEF_CALL(void, switch_mm, struct mm_struct *, struct mm_struct *, struct task_struct *)
 
-#define switch_mm(old_mm, mm, tsk, cpu) BTFIXUP_CALL(switch_mm)(old_mm, mm, tsk, cpu)
+#define switch_mm(old_mm, mm, tsk) BTFIXUP_CALL(switch_mm)(old_mm, mm, tsk)
 
 #define deactivate_mm(tsk,mm)	do { } while (0)
 
 /* Activate a new MM instance for the current task. */
-#define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL, smp_processor_id())
+#define activate_mm(active_mm, mm) switch_mm((active_mm), (mm), NULL)
 
 #endif /* !(__ASSEMBLY__) */
 
diff -urN linux-2.5.74-bk5/include/asm-sparc64/mmu_context.h linux-2.5.74-bk6/include/asm-sparc64/mmu_context.h
--- linux-2.5.74-bk5/include/asm-sparc64/mmu_context.h	2003-07-02 13:57:20.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-sparc64/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -27,7 +27,7 @@
 #include <asm/system.h>
 #include <asm/spitfire.h>
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 
@@ -106,7 +106,7 @@
 extern void __flush_tlb_mm(unsigned long, unsigned long);
 
 /* Switch the current MM context. */
-static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk, int cpu)
+static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk)
 {
 	unsigned long ctx_valid;
 
@@ -125,7 +125,7 @@
 	}
 
 	{
-		unsigned long vm_mask = (1UL << cpu);
+		unsigned long vm_mask = (1UL << smp_processor_id());
 
 		/* Even if (mm == old_mm) we _must_ check
 		 * the cpu_vm_mask.  If we do not we could
diff -urN linux-2.5.74-bk5/include/asm-um/mmu_context.h linux-2.5.74-bk6/include/asm-um/mmu_context.h
--- linux-2.5.74-bk5/include/asm-um/mmu_context.h	2003-07-02 13:48:21.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-um/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -21,8 +21,10 @@
 extern void switch_mm_skas(int mm_fd);
 
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 
-			     struct task_struct *tsk, unsigned cpu)
+			     struct task_struct *tsk)
 {
+	unsigned cpu = smp_processor_id();
+
 	if(prev != next){
 		clear_bit(cpu, &prev->cpu_vm_mask);
 		set_bit(cpu, &next->cpu_vm_mask);
@@ -33,7 +35,7 @@
 }
 
 static inline void enter_lazy_tlb(struct mm_struct *mm, 
-				  struct task_struct *tsk, unsigned cpu)
+				  struct task_struct *tsk)
 {
 }
 
diff -urN linux-2.5.74-bk5/include/asm-v850/mmu_context.h linux-2.5.74-bk6/include/asm-v850/mmu_context.h
--- linux-2.5.74-bk5/include/asm-v850/mmu_context.h	2003-07-02 13:46:54.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-v850/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -3,9 +3,9 @@
 
 #define destroy_context(mm)		((void)0)
 #define init_new_context(tsk,mm)	0
-#define switch_mm(prev,next,tsk,cpu)	((void)0)
+#define switch_mm(prev,next,tsk)	((void)0)
 #define deactivate_mm(tsk,mm)		do { } while (0)
 #define activate_mm(prev,next)		((void)0)
-#define enter_lazy_tlb(mm,tsk,cpu)	((void)0)
+#define enter_lazy_tlb(mm,tsk)		((void)0)
 
 #endif /* __V850_MMU_CONTEXT_H__ */
diff -urN linux-2.5.74-bk5/include/asm-x86_64/mmu_context.h linux-2.5.74-bk6/include/asm-x86_64/mmu_context.h
--- linux-2.5.74-bk5/include/asm-x86_64/mmu_context.h	2003-07-02 13:43:57.000000000 -0700
+++ linux-2.5.74-bk6/include/asm-x86_64/mmu_context.h	2003-07-08 04:53:40.000000000 -0700
@@ -17,20 +17,21 @@
 
 #ifdef CONFIG_SMP
 
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 	if (read_pda(mmu_state) == TLBSTATE_OK) 
 		write_pda(mmu_state, TLBSTATE_LAZY);
 }
 #else
-static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
+static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
 {
 }
 #endif
 
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 
-			     struct task_struct *tsk, unsigned cpu)
+			     struct task_struct *tsk)
 {
+	unsigned cpu = smp_processor_id();
 	if (likely(prev != next)) {
 		/* stop flush ipis for the previous mm */
 		clear_bit(cpu, &prev->cpu_vm_mask);
@@ -68,7 +69,7 @@
 } while(0)
 
 #define activate_mm(prev, next) \
-	switch_mm((prev),(next),NULL,smp_processor_id())
+	switch_mm((prev),(next),NULL)
 
 
 #endif
diff -urN linux-2.5.74-bk5/include/linux/flat.h linux-2.5.74-bk6/include/linux/flat.h
--- linux-2.5.74-bk5/include/linux/flat.h	2003-07-02 13:41:56.000000000 -0700
+++ linux-2.5.74-bk6/include/linux/flat.h	2003-07-08 04:53:40.000000000 -0700
@@ -1,7 +1,7 @@
-
-/* Copyright (C) 1998  Kenneth Albanowski <kjahds@kjahds.com>
- *                     The Silver Hammer Group, Ltd.
- * Copyright (C) 2002  David McCullough <davidm@snapgear.com>
+/*
+ * Copyright (C) 2002-2003  David McCullough <davidm@snapgear.com>
+ * Copyright (C) 1998       Kenneth Albanowski <kjahds@kjahds.com>
+ *                          The Silver Hammer Group, Ltd.
  *
  * This file provides the definitions and structures needed to
  * support uClinux flat-format executables.
@@ -10,10 +10,18 @@
 #ifndef _LINUX_FLAT_H
 #define _LINUX_FLAT_H
 
+#ifdef __KERNEL__
 #include <asm/flat.h>
+#endif
 
 #define	FLAT_VERSION			0x00000004L
 
+#ifdef CONFIG_BINFMT_SHARED_FLAT
+#define	MAX_SHARED_LIBS			(4)
+#else
+#define	MAX_SHARED_LIBS			(1)
+#endif
+
 /*
  * To make everything easier to port and manage cross platform
  * development,  all fields are in network byte order.
@@ -46,8 +54,10 @@
 #define FLAT_FLAG_GOTPIC 0x0002 /* program is PIC with GOT */
 #define FLAT_FLAG_GZIP   0x0004 /* all but the header is compressed */
 #define FLAT_FLAG_GZDATA 0x0008 /* only data/relocs are compressed (for XIP) */
+#define FLAT_FLAG_KTRACE 0x0010 /* output useful kernel trace for debugging */
 
 
+#ifdef __KERNEL__ /* so systems without linux headers can compile the apps */
 /*
  * While it would be nice to keep this header clean,  users of older
  * tools still need this support in the kernel.  So this section is
@@ -85,4 +95,6 @@
 	} reloc;
 } flat_v2_reloc_t;
 
+#endif /* __KERNEL__ */
+
 #endif /* _LINUX_FLAT_H */
diff -urN linux-2.5.74-bk5/include/linux/kernel_stat.h linux-2.5.74-bk6/include/linux/kernel_stat.h
--- linux-2.5.74-bk5/include/linux/kernel_stat.h	2003-07-02 13:56:41.000000000 -0700
+++ linux-2.5.74-bk6/include/linux/kernel_stat.h	2003-07-08 04:53:40.000000000 -0700
@@ -31,7 +31,8 @@
 DECLARE_PER_CPU(struct kernel_stat, kstat);
 
 #define kstat_cpu(cpu)	per_cpu(kstat, cpu)
-#define kstat_this_cpu	kstat_cpu(smp_processor_id())
+/* Must have preemption disabled for this to be meaningful. */
+#define kstat_this_cpu	__get_cpu_var(kstat)
 
 extern unsigned long nr_context_switches(void);
 
diff -urN linux-2.5.74-bk5/kernel/acct.c linux-2.5.74-bk6/kernel/acct.c
--- linux-2.5.74-bk5/kernel/acct.c	2003-07-08 04:53:28.000000000 -0700
+++ linux-2.5.74-bk6/kernel/acct.c	2003-07-08 04:53:40.000000000 -0700
@@ -406,14 +406,13 @@
 
 	spin_lock(&acct_globals.lock);
 	file = acct_globals.file;
-	if (!file)
-		goto out_unlock;
-
+	if (unlikely(!file)) {
+		spin_unlock(&acct_globals.lock);
+		return;
+	}
 	get_file(file);
 	spin_unlock(&acct_globals.lock);
+
 	do_acct_process(exitcode, file);
 	fput(file);
-
-out_unlock:
-	spin_unlock(&acct_globals.lock);
 }
diff -urN linux-2.5.74-bk5/kernel/exit.c linux-2.5.74-bk6/kernel/exit.c
--- linux-2.5.74-bk5/kernel/exit.c	2003-07-08 04:53:28.000000000 -0700
+++ linux-2.5.74-bk6/kernel/exit.c	2003-07-08 04:53:40.000000000 -0700
@@ -443,7 +443,7 @@
 	/* more a memory barrier than a real lock */
 	task_lock(tsk);
 	tsk->mm = NULL;
-	enter_lazy_tlb(mm, current, smp_processor_id());
+	enter_lazy_tlb(mm, current);
 	task_unlock(tsk);
 	mmput(mm);
 }
diff -urN linux-2.5.74-bk5/kernel/sched.c linux-2.5.74-bk6/kernel/sched.c
--- linux-2.5.74-bk5/kernel/sched.c	2003-07-08 04:53:28.000000000 -0700
+++ linux-2.5.74-bk6/kernel/sched.c	2003-07-08 04:53:40.000000000 -0700
@@ -646,9 +646,9 @@
 	if (unlikely(!mm)) {
 		next->active_mm = oldmm;
 		atomic_inc(&oldmm->mm_count);
-		enter_lazy_tlb(oldmm, next, smp_processor_id());
+		enter_lazy_tlb(oldmm, next);
 	} else
-		switch_mm(oldmm, mm, next, smp_processor_id());
+		switch_mm(oldmm, mm, next);
 
 	if (unlikely(!prev->mm)) {
 		prev->active_mm = NULL;
@@ -1175,6 +1175,7 @@
 void scheduler_tick(int user_ticks, int sys_ticks)
 {
 	int cpu = smp_processor_id();
+	struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat;
 	runqueue_t *rq = this_rq();
 	task_t *p = current;
 
@@ -1184,19 +1185,19 @@
 	if (p == rq->idle) {
 		/* note: this timer irq context must be accounted for as well */
 		if (irq_count() - HARDIRQ_OFFSET >= SOFTIRQ_OFFSET)
-			kstat_cpu(cpu).cpustat.system += sys_ticks;
+			cpustat->system += sys_ticks;
 		else if (atomic_read(&rq->nr_iowait) > 0)
-			kstat_cpu(cpu).cpustat.iowait += sys_ticks;
+			cpustat->iowait += sys_ticks;
 		else
-			kstat_cpu(cpu).cpustat.idle += sys_ticks;
+			cpustat->idle += sys_ticks;
 		rebalance_tick(rq, 1);
 		return;
 	}
 	if (TASK_NICE(p) > 0)
-		kstat_cpu(cpu).cpustat.nice += user_ticks;
+		cpustat->nice += user_ticks;
 	else
-		kstat_cpu(cpu).cpustat.user += user_ticks;
-	kstat_cpu(cpu).cpustat.system += sys_ticks;
+		cpustat->user += user_ticks;
+	cpustat->system += sys_ticks;
 
 	/* Task might have expired already, but not scheduled off yet */
 	if (p->array != rq->active) {
@@ -2527,7 +2528,7 @@
 	 * The boot idle thread does lazy MMU switching as well:
 	 */
 	atomic_inc(&init_mm.mm_count);
-	enter_lazy_tlb(&init_mm, current, smp_processor_id());
+	enter_lazy_tlb(&init_mm, current);
 }
 
 #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
diff -urN linux-2.5.74-bk5/kernel/signal.c linux-2.5.74-bk6/kernel/signal.c
--- linux-2.5.74-bk5/kernel/signal.c	2003-07-08 04:53:28.000000000 -0700
+++ linux-2.5.74-bk6/kernel/signal.c	2003-07-08 04:53:40.000000000 -0700
@@ -579,8 +579,8 @@
 /*
  * Bad permissions for sending the signal
  */
-static inline int check_kill_permission(int sig, struct siginfo *info,
-					struct task_struct *t)
+static int check_kill_permission(int sig, struct siginfo *info,
+				 struct task_struct *t)
 {
 	int error = -EINVAL;
 	if (sig < 0 || sig > _NSIG)
@@ -2088,6 +2088,52 @@
 	return kill_something_info(sig, &info, pid);
 }
 
+/**
+ *  sys_tkill - send signal to one specific thread
+ *  @tgid: the thread group ID of the thread
+ *  @pid: the PID of the thread
+ *  @sig: signal to be sent
+ *
+ *  This syscall also checks the tgid and returns -ESRCH even if the PID
+ *  exists but it's not belonging to the target process anymore. This
+ *  method solves the problem of threads exiting and PIDs getting reused.
+ */
+asmlinkage long sys_tgkill(int tgid, int pid, int sig)
+{
+	struct siginfo info;
+	int error;
+	struct task_struct *p;
+
+	/* This is only valid for single tasks */
+	if (pid <= 0 || tgid <= 0)
+		return -EINVAL;
+
+	info.si_signo = sig;
+	info.si_errno = 0;
+	info.si_code = SI_TKILL;
+	info.si_pid = current->tgid;
+	info.si_uid = current->uid;
+
+	read_lock(&tasklist_lock);
+	p = find_task_by_pid(pid);
+	error = -ESRCH;
+	if (p && (p->tgid == tgid)) {
+		error = check_kill_permission(sig, &info, p);
+		/*
+		 * The null signal is a permissions and process existence
+		 * probe.  No signal is actually delivered.
+		 */
+		if (!error && sig && p->sighand) {
+			spin_lock_irq(&p->sighand->siglock);
+			handle_stop_signal(sig, p);
+			error = specific_send_sig_info(sig, &info, p);
+			spin_unlock_irq(&p->sighand->siglock);
+		}
+	}
+	read_unlock(&tasklist_lock);
+	return error;
+}
+
 /*
  *  Send a signal to only one task, even if it's a CLONE_THREAD task.
  */
diff -urN linux-2.5.74-bk5/kernel/suspend.c linux-2.5.74-bk6/kernel/suspend.c
--- linux-2.5.74-bk5/kernel/suspend.c	2003-07-02 13:43:45.000000000 -0700
+++ linux-2.5.74-bk6/kernel/suspend.c	2003-07-08 04:53:40.000000000 -0700
@@ -1203,12 +1203,12 @@
 
 void software_resume(void)
 {
-#ifdef CONFIG_SMP
-	printk(KERN_WARNING "Software Suspend has a malfunctioning SMP support. Disabled :(\n");
-#else
+	if (num_online_cpus() > 1) {
+		printk(KERN_WARNING "Software Suspend has malfunctioning SMP support. Disabled :(\n");	
+		return;
+	}
 	/* We enable the possibility of machine suspend */
 	software_suspend_enabled = 1;
-#endif
 	if (!resume_status)
 		return;
 
diff -urN linux-2.5.74-bk5/mm/nommu.c linux-2.5.74-bk6/mm/nommu.c
--- linux-2.5.74-bk5/mm/nommu.c	2003-07-08 04:53:28.000000000 -0700
+++ linux-2.5.74-bk6/mm/nommu.c	2003-07-08 04:53:40.000000000 -0700
@@ -250,23 +250,16 @@
 #ifdef DEBUG
 static void show_process_blocks(void)
 {
-	struct mm_tblock_struct * tblock, *tmp;
-	
+	struct mm_tblock_struct *tblock;
+
 	printk("Process blocks %d:", current->pid);
-	
-	tmp = current->mm->context.tblock;
-	while (tmp) {
-		printk(" %p: %p", tmp, tmp->rblock);
-		if (tmp->rblock)
-			printk(" (%d @%p #%d)", kobjsize(tmp->rblock->kblock),
-				tmp->rblock->kblock, tmp->rblock->refcount);
-		if (tmp->next)
-			printk(" ->");
-		else
-			printk(".");
-		tmp = tmp->next;
+
+	for (tblock = &current->mm->context.tblock; tblock; tblock = tblock->next) {
+		printk(" %p: %p", tblock, tblock->rblock);
+		if (tblock->rblock)
+			printk(" (%d @%p #%d)", kobjsize(tblock->rblock->kblock), tblock->rblock->kblock, tblock->rblock->refcount);
+		printk(tblock->next ? " ->" : ".\n");
 	}
-	printk("\n");
 }
 #endif /* DEBUG */
 
@@ -355,7 +348,7 @@
 			error = file->f_op->mmap(file, &vma);
 				   
 #ifdef DEBUG
-			printk("mmap mmap returned %d /%x\n", error, vma.vm_start);
+			printk("f_op->mmap() returned %d/%lx\n", error, vma.vm_start);
 #endif
 			if (!error)
 				return vma.vm_start;
