Changeset 50361f7


Ignore:
Timestamp:
Feb 25, 2007, 3:42:32 PM (17 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
de85b1a
Parents:
ac7afe9
Message:

Updates to Linux 2.6.20.1

Files:
1 added
2 deleted
4 edited
3 moved

Legend:

Unmodified
Added
Removed
  • BOOK/general.ent

    rac7afe9 r50361f7  
    33<!ENTITY month "02"> <!-- Use two digits -->
    44<!ENTITY month_name "February">
    5 <!ENTITY day "22"> <!-- Use two digits -->
     5<!ENTITY day "25"> <!-- Use two digits -->
    66<!ENTITY year "2007"> <!-- Use four digits -->
    77
  • BOOK/introduction/common/changelog.xml

    rac7afe9 r50361f7  
    3636    </listitem>
    3737-->
     38
     39    <listitem>
     40      <para>February 17, 2007</para>
     41      <itemizedlist>
     42        <listitem>
     43          <para>[jim] - Updated to Linux 2.6.20.1.</para>
     44        </listitem>
     45        <listitem>
     46          <para>[jim] - Updated to Linux Headers 2.6.20.1-02252007.</para>
     47        </listitem>
     48      </itemizedlist>
     49    </listitem>
    3850
    3951    <listitem>
  • BOOK/packages.ent

    rac7afe9 r50361f7  
    245245<!ENTITY linux-dl-version "2.6">
    246246
    247 <!ENTITY linux-version "2.6.20">
    248 <!ENTITY linux-size "42,527 KB">
     247<!ENTITY linux-version "2.6.20.1">
     248<!ENTITY linux-size "42,529 KB">
    249249<!ENTITY linux-url "&kernel;linux/kernel/v&linux-dl-version;/linux-&linux-version;.tar.bz2">
    250 <!ENTITY linux-md5 "34b0f354819217e6a345f48ebbd8f13e">
     250<!ENTITY linux-md5 "3288ad6c10ba89e85041a8416bd9644d">
    251251<!ENTITY linux-home "http://www.kernel.org">
    252252
    253 <!ENTITY linux-headers-version "&linux-version;-02042007">
    254 <!ENTITY linux-headers-size "1,620 KB">
     253<!ENTITY linux-headers-version "&linux-version;-02252007">
     254<!ENTITY linux-headers-size "1,626 KB">
    255255<!ENTITY linux-headers-url "&packages-root;linux-headers-&linux-headers-version;.tar.bz2">
    256 <!ENTITY linux-headers-md5 "76a2e844baea535f279d77f939d027e1">
     256<!ENTITY linux-headers-md5 "91871367451dfe36926f860887657db9">
    257257<!ENTITY linux-headers-home "http://headers.cross-lfs.org">
    258258
  • BOOK/patches.ent

    rac7afe9 r50361f7  
    6262
    6363<!ENTITY linux-tulip-patch "linux-&linux-version;-tulip-1.patch">
    64 <!ENTITY linux-tulip-patch-md5 "fd662a78667aafad3def5eff98287fbf">
     64<!ENTITY linux-tulip-patch-md5 "a5b2576d50c8b9b4121265deec5d6ef6">
    6565<!ENTITY linux-tulip-patch-size "8 KB">
    6666
     
    206206
    207207<!ENTITY linux-mips-patch "linux-&linux-version;-mips-1.patch">
    208 <!ENTITY linux-mips-patch-md5 "2f92e222ac17f371911f5ac0d2dde1b4">
    209 <!ENTITY linux-mips-patch-size "432 KB">
     208<!ENTITY linux-mips-patch-md5 "64aceede8c736e43e613b39a6a77f4e1">
     209<!ENTITY linux-mips-patch-size "484 KB">
    210210
    211211<!ENTITY linux-mips_fixes-patch "linux-&linux-version;-mips_fixes-1.patch">
    212 <!ENTITY linux-mips_fixes-patch-md5 "59098ea3fa261ca8839ef7634bc126c5">
    213 <!ENTITY linux-mips_fixes-patch-size "12 KB">
     212<!ENTITY linux-mips_fixes-patch-md5 "c70a04f9302ae3e893bbb964ff5edee8">
     213<!ENTITY linux-mips_fixes-patch-size "4 KB">
    214214
    215215<!-- Start of ppc/ppc64 patches -->
  • patches/linux-2.6.20.1-mips-1.patch

    rac7afe9 r50361f7  
    11Submitted By: Jim Gifford (patches at jg555 dot com)
    2 Date: 2007-02-04
    3 Initial Package Version: 2.6.20
     2Date: 2007-02-24
     3Initial Package Version: 2.6.20.1
    44Origin: Linux-MIPS
    55Upstream Status: http://www.linux-mips.org/pub/linux/mips/kernel/v2.6/
    66
    7 diff -Naur linux-2.6.20/arch/mips/Kconfig linux-mips-2.6.20/arch/mips/Kconfig
    8 --- linux-2.6.20/arch/mips/Kconfig      2007-02-04 10:44:54.000000000 -0800
    9 +++ linux-mips-2.6.20/arch/mips/Kconfig 2007-02-04 12:22:45.000000000 -0800
    10 @@ -1199,7 +1199,7 @@
     7diff -Naur linux-2.6.20.1.orig/arch/mips/Kconfig linux-2.6.20.1/arch/mips/Kconfig
     8--- linux-2.6.20.1.orig/arch/mips/Kconfig       2007-02-19 22:34:32.000000000 -0800
     9+++ linux-2.6.20.1/arch/mips/Kconfig    2007-02-20 16:47:41.000000000 -0800
     10@@ -140,6 +140,7 @@
     11        select SYS_SUPPORTS_32BIT_KERNEL
     12        select SYS_SUPPORTS_64BIT_KERNEL
     13        select SYS_SUPPORTS_BIG_ENDIAN
     14+       select SYS_SUPPORTS_KGDB
     15        help
     16          The eXcite is a smart camera platform manufactured by
     17          Basler Vision Technologies AG
     18@@ -206,6 +207,7 @@
     19        select SYS_SUPPORTS_32BIT_KERNEL
     20        select SYS_SUPPORTS_64BIT_KERNEL
     21        select SYS_SUPPORTS_BIG_ENDIAN
     22+       select SYS_SUPPORTS_KGDB
     23        help
     24          This is an evaluation board based on the Galileo GT-64120
     25          single-chip system controller that contains a MIPS R5000 compatible
     26@@ -370,6 +372,7 @@
     27        select SYS_SUPPORTS_32BIT_KERNEL
     28        select SYS_SUPPORTS_64BIT_KERNEL
     29        select SYS_SUPPORTS_BIG_ENDIAN
     30+       select SYS_SUPPORTS_KGDB
     31        help
     32          The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by
     33          Momentum Computer <http://www.momenco.com/>.
     34@@ -387,6 +390,7 @@
     35        select SYS_SUPPORTS_32BIT_KERNEL
     36        select SYS_SUPPORTS_64BIT_KERNEL
     37        select SYS_SUPPORTS_BIG_ENDIAN
     38+       select SYS_SUPPORTS_KGDB
     39        help
     40          The Ocelot is a MIPS-based Single Board Computer (SBC) made by
     41          Momentum Computer <http://www.momenco.com/>.
     42@@ -476,6 +480,7 @@
     43        select SYS_HAS_CPU_R5432
     44        select SYS_SUPPORTS_32BIT_KERNEL
     45        select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
     46+       select SYS_SUPPORTS_KGDB
     47        select SYS_SUPPORTS_LITTLE_ENDIAN
     48        help
     49          This enables support for the R5432-based NEC DDB Vrc-5477,
     50@@ -504,6 +509,7 @@
     51        select SYS_SUPPORTS_64BIT_KERNEL
     52        select SYS_SUPPORTS_BIG_ENDIAN
     53        select SYS_SUPPORTS_HIGHMEM
     54+       select SYS_SUPPORTS_KGDB
     55        select SYS_SUPPORTS_SMP
     56        help
     57          Yosemite is an evaluation board for the RM9000x2 processor
     58@@ -579,6 +585,7 @@
     59        select SYS_HAS_CPU_R10000
     60        select SYS_SUPPORTS_64BIT_KERNEL
     61        select SYS_SUPPORTS_BIG_ENDIAN
     62+       select SYS_SUPPORTS_KGDB
     63        select SYS_SUPPORTS_NUMA
     64        select SYS_SUPPORTS_SMP
     65        select GENERIC_HARDIRQS_NO__DO_IRQ
     66@@ -628,6 +635,7 @@
     67        select SYS_HAS_CPU_SB1
     68        select SYS_SUPPORTS_BIG_ENDIAN
     69        select SYS_SUPPORTS_HIGHMEM
     70+       select SYS_SUPPORTS_KGDB
     71        select SYS_SUPPORTS_LITTLE_ENDIAN
     72 
     73 config SIBYTE_SENTOSA
     74@@ -762,6 +770,7 @@
     75        select SYS_SUPPORTS_32BIT_KERNEL
     76        select SYS_SUPPORTS_64BIT_KERNEL
     77        select SYS_SUPPORTS_BIG_ENDIAN
     78+       select SYS_SUPPORTS_KGDB
     79        select TOSHIBA_BOARDS
     80        select GENERIC_HARDIRQS_NO__DO_IRQ
     81        help
     82@@ -782,6 +791,7 @@
     83        select SYS_SUPPORTS_32BIT_KERNEL
     84        select SYS_SUPPORTS_LITTLE_ENDIAN
     85        select SYS_SUPPORTS_BIG_ENDIAN
     86+       select SYS_SUPPORTS_KGDB
     87        select TOSHIBA_BOARDS
     88        select GENERIC_HARDIRQS_NO__DO_IRQ
     89        help
     90@@ -965,6 +975,7 @@
     91 
     92 config DDB5XXX_COMMON
     93        bool
     94+       select SYS_SUPPORTS_KGDB
     95 
     96 config MIPS_BOARDS_GEN
     97        bool
     98@@ -1012,6 +1023,7 @@
     99        bool
     100        select SYS_HAS_CPU_MIPS32_R1
     101        select SYS_SUPPORTS_32BIT_KERNEL
     102+       select SYS_SUPPORTS_KGDB
     103 
     104 config PNX8550
     105        bool
     106@@ -1024,6 +1036,7 @@
     107        select SYS_HAS_CPU_MIPS32_R1
     108        select SYS_SUPPORTS_32BIT_KERNEL
     109        select GENERIC_HARDIRQS_NO__DO_IRQ
     110+       select SYS_SUPPORTS_KGDB
     111 
     112 config SWAP_IO_SPACE
     113        bool
     114@@ -1199,7 +1212,7 @@
    11115        select CPU_SUPPORTS_32BIT_KERNEL
    12116        select CPU_SUPPORTS_64BIT_KERNEL
     
    17121          kernel built with this option will not run on any other type of
    18122          processor or vice versa.
    19 diff -Naur linux-2.6.20/arch/mips/Kconfig.debug linux-mips-2.6.20/arch/mips/Kconfig.debug
    20 --- linux-2.6.20/arch/mips/Kconfig.debug        2007-02-04 10:44:54.000000000 -0800
    21 +++ linux-mips-2.6.20/arch/mips/Kconfig.debug   2007-02-04 12:22:45.000000000 -0800
     123diff -Naur linux-2.6.20.1.orig/arch/mips/Kconfig.debug linux-2.6.20.1/arch/mips/Kconfig.debug
     124--- linux-2.6.20.1.orig/arch/mips/Kconfig.debug 2007-02-19 22:34:32.000000000 -0800
     125+++ linux-2.6.20.1/arch/mips/Kconfig.debug      2007-02-20 16:47:41.000000000 -0800
    22126@@ -22,10 +22,10 @@
    23127        string "Default kernel command string"
     
    35139 
    36140 config DEBUG_STACK_USAGE
    37 diff -Naur linux-2.6.20/arch/mips/au1000/common/pci.c linux-mips-2.6.20/arch/mips/au1000/common/pci.c
    38 --- linux-2.6.20/arch/mips/au1000/common/pci.c  2007-02-04 10:44:54.000000000 -0800
    39 +++ linux-mips-2.6.20/arch/mips/au1000/common/pci.c     2007-02-04 12:22:45.000000000 -0800
     141@@ -39,7 +39,7 @@
     142 
     143 config KGDB
     144        bool "Remote GDB kernel debugging"
     145-       depends on DEBUG_KERNEL
     146+       depends on DEBUG_KERNEL && SYS_SUPPORTS_KGDB
     147        select DEBUG_INFO
     148        help
     149          If you say Y here, it will be possible to remotely debug the MIPS
     150@@ -48,6 +48,9 @@
     151          better 32 MB RAM to avoid excessive linking time. This is only
     152          useful for kernel hackers. If unsure, say N.
     153 
     154+config SYS_SUPPORTS_KGDB
     155+       bool
     156+
     157 config GDB_CONSOLE
     158        bool "Console output to GDB"
     159        depends on KGDB
     160diff -Naur linux-2.6.20.1.orig/arch/mips/au1000/common/pci.c linux-2.6.20.1/arch/mips/au1000/common/pci.c
     161--- linux-2.6.20.1.orig/arch/mips/au1000/common/pci.c   2007-02-19 22:34:32.000000000 -0800
     162+++ linux-2.6.20.1/arch/mips/au1000/common/pci.c        2007-02-20 16:47:41.000000000 -0800
    40163@@ -76,13 +76,17 @@
    41164        }
     
    63186 #endif
    64187 
    65 diff -Naur linux-2.6.20/arch/mips/au1000/common/setup.c linux-mips-2.6.20/arch/mips/au1000/common/setup.c
    66 --- linux-2.6.20/arch/mips/au1000/common/setup.c        2007-02-04 10:44:54.000000000 -0800
    67 +++ linux-mips-2.6.20/arch/mips/au1000/common/setup.c   2007-02-04 12:22:45.000000000 -0800
     188diff -Naur linux-2.6.20.1.orig/arch/mips/au1000/common/setup.c linux-2.6.20.1/arch/mips/au1000/common/setup.c
     189--- linux-2.6.20.1.orig/arch/mips/au1000/common/setup.c 2007-02-19 22:34:32.000000000 -0800
     190+++ linux-2.6.20.1/arch/mips/au1000/common/setup.c      2007-02-20 16:47:41.000000000 -0800
    68191@@ -141,17 +141,20 @@
    69192 /* This routine should be valid for all Au1x based boards */
     
    95218 #endif
    96219 
    97 diff -Naur linux-2.6.20/arch/mips/au1000/pb1100/board_setup.c linux-mips-2.6.20/arch/mips/au1000/pb1100/board_setup.c
    98 --- linux-2.6.20/arch/mips/au1000/pb1100/board_setup.c  2007-02-04 10:44:54.000000000 -0800
    99 +++ linux-mips-2.6.20/arch/mips/au1000/pb1100/board_setup.c     2007-02-04 12:22:45.000000000 -0800
     220diff -Naur linux-2.6.20.1.orig/arch/mips/au1000/pb1100/board_setup.c linux-2.6.20.1/arch/mips/au1000/pb1100/board_setup.c
     221--- linux-2.6.20.1.orig/arch/mips/au1000/pb1100/board_setup.c   2007-02-19 22:34:32.000000000 -0800
     222+++ linux-2.6.20.1/arch/mips/au1000/pb1100/board_setup.c        2007-02-20 16:47:41.000000000 -0800
    100223@@ -47,8 +47,7 @@
    101224 
     
    213336        }
    214337 }
    215 diff -Naur linux-2.6.20/arch/mips/au1000/pb1200/irqmap.c linux-mips-2.6.20/arch/mips/au1000/pb1200/irqmap.c
    216 --- linux-2.6.20/arch/mips/au1000/pb1200/irqmap.c       2007-02-04 10:44:54.000000000 -0800
    217 +++ linux-mips-2.6.20/arch/mips/au1000/pb1200/irqmap.c  2007-02-04 12:22:45.000000000 -0800
     338diff -Naur linux-2.6.20.1.orig/arch/mips/au1000/pb1200/irqmap.c linux-2.6.20.1/arch/mips/au1000/pb1200/irqmap.c
     339--- linux-2.6.20.1.orig/arch/mips/au1000/pb1200/irqmap.c        2007-02-19 22:34:32.000000000 -0800
     340+++ linux-2.6.20.1/arch/mips/au1000/pb1200/irqmap.c     2007-02-20 16:47:41.000000000 -0800
    218341@@ -137,33 +137,20 @@
    219342        return;
     
    268391        }
    269392 
    270 diff -Naur linux-2.6.20/arch/mips/kernel/mips-mt.c linux-mips-2.6.20/arch/mips/kernel/mips-mt.c
    271 --- linux-2.6.20/arch/mips/kernel/mips-mt.c     2007-02-04 10:44:54.000000000 -0800
    272 +++ linux-mips-2.6.20/arch/mips/kernel/mips-mt.c        2007-02-04 12:22:45.000000000 -0800
    273 @@ -96,6 +96,10 @@
     393diff -Naur linux-2.6.20.1.orig/arch/mips/dec/int-handler.S linux-2.6.20.1/arch/mips/dec/int-handler.S
     394--- linux-2.6.20.1.orig/arch/mips/dec/int-handler.S     2007-02-19 22:34:32.000000000 -0800
     395+++ linux-2.6.20.1/arch/mips/dec/int-handler.S  2007-02-20 16:47:41.000000000 -0800
     396@@ -264,9 +264,6 @@
     397                 srlv   t3,t1,t2
     398 
     399 handle_it:
     400-               LONG_L  s0, TI_REGS($28)
     401-               LONG_S  sp, TI_REGS($28)
     402-               PTR_LA  ra, ret_from_irq
     403                j       dec_irq_dispatch
     404                 nop
     405 
     406@@ -277,7 +274,6 @@
     407 #endif
     408 
     409 spurious:
     410-               PTR_LA  ra, _ret_from_irq
     411                j       spurious_interrupt
     412                 nop
     413                END(plat_irq_dispatch)
     414diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/Makefile linux-2.6.20.1/arch/mips/kernel/Makefile
     415--- linux-2.6.20.1.orig/arch/mips/kernel/Makefile       2007-02-19 22:34:32.000000000 -0800
     416+++ linux-2.6.20.1/arch/mips/kernel/Makefile    2007-02-20 16:47:41.000000000 -0800
     417@@ -55,9 +55,9 @@
     418 obj-$(CONFIG_32BIT)            += scall32-o32.o
     419 obj-$(CONFIG_64BIT)            += scall64-64.o
     420 obj-$(CONFIG_BINFMT_IRIX)      += binfmt_irix.o
     421-obj-$(CONFIG_MIPS32_COMPAT)    += linux32.o signal32.o
     422+obj-$(CONFIG_MIPS32_COMPAT)    += linux32.o ptrace32.o signal32.o
     423 obj-$(CONFIG_MIPS32_N32)       += binfmt_elfn32.o scall64-n32.o signal_n32.o
     424-obj-$(CONFIG_MIPS32_O32)       += binfmt_elfo32.o scall64-o32.o ptrace32.o
     425+obj-$(CONFIG_MIPS32_O32)       += binfmt_elfo32.o scall64-o32.o
     426 
     427 obj-$(CONFIG_KGDB)             += gdb-low.o gdb-stub.o
     428 obj-$(CONFIG_PROC_FS)          += proc.o
     429diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/cpu-probe.c linux-2.6.20.1/arch/mips/kernel/cpu-probe.c
     430--- linux-2.6.20.1.orig/arch/mips/kernel/cpu-probe.c    2007-02-19 22:34:32.000000000 -0800
     431+++ linux-2.6.20.1/arch/mips/kernel/cpu-probe.c 2007-02-20 16:47:41.000000000 -0800
     432@@ -97,7 +97,7 @@
     433 
     434 static int __initdata nowait = 0;
     435 
     436-int __init wait_disable(char *s)
     437+static int __init wait_disable(char *s)
     438 {
     439        nowait = 1;
     440 
     441diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/linux32.c linux-2.6.20.1/arch/mips/kernel/linux32.c
     442--- linux-2.6.20.1.orig/arch/mips/kernel/linux32.c      2007-02-19 22:34:32.000000000 -0800
     443+++ linux-2.6.20.1/arch/mips/kernel/linux32.c   2007-02-20 16:47:41.000000000 -0800
     444@@ -39,6 +39,7 @@
     445 #include <net/sock.h>
     446 #include <net/scm.h>
     447 
     448+#include <asm/compat-signal.h>
     449 #include <asm/ipc.h>
     450 #include <asm/sim.h>
     451 #include <asm/uaccess.h>
     452@@ -780,3 +781,49 @@
     453        return do_fork(clone_flags, newsp, &regs, 0,
     454                       parent_tidptr, child_tidptr);
     455 }
     456+
     457+/*
     458+ * Implement the event wait interface for the eventpoll file. It is the kernel
     459+ * part of the user space epoll_pwait(2).
     460+ */
     461+asmlinkage long compat_sys_epoll_pwait(int epfd,
     462+       struct epoll_event __user *events, int maxevents, int timeout,
     463+       const compat_sigset_t __user *sigmask, size_t sigsetsize)
     464+{
     465+       int error;
     466+       sigset_t ksigmask, sigsaved;
     467+
     468+       /*
     469+        * If the caller wants a certain signal mask to be set during the wait,
     470+        * we apply it here.
     471+        */
     472+       if (sigmask) {
     473+               if (sigsetsize != sizeof(sigset_t))
     474+                       return -EINVAL;
     475+               if (!access_ok(VERIFY_READ, sigmask, sizeof(ksigmask)))
     476+                       return -EFAULT;
     477+               if (__copy_conv_sigset_from_user(&ksigmask, sigmask))
     478+                       return -EFAULT;
     479+               sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
     480+               sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
     481+       }
     482+
     483+       error = sys_epoll_wait(epfd, events, maxevents, timeout);
     484+
     485+       /*
     486+        * If we changed the signal mask, we need to restore the original one.
     487+        * In case we've got a signal while waiting, we do not restore the
     488+        * signal mask yet, and we allow do_signal() to deliver the signal on
     489+        * the way back to userspace, before the signal mask is restored.
     490+        */
     491+       if (sigmask) {
     492+               if (error == -EINTR) {
     493+                       memcpy(&current->saved_sigmask, &sigsaved,
     494+                               sizeof(sigsaved));
     495+                       set_thread_flag(TIF_RESTORE_SIGMASK);
     496+               } else
     497+                       sigprocmask(SIG_SETMASK, &sigsaved, NULL);
     498+       }
     499+
     500+       return error;
     501+}
     502diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/mips-mt.c linux-2.6.20.1/arch/mips/kernel/mips-mt.c
     503--- linux-2.6.20.1.orig/arch/mips/kernel/mips-mt.c      2007-02-19 22:34:32.000000000 -0800
     504+++ linux-2.6.20.1/arch/mips/kernel/mips-mt.c   2007-02-20 16:47:41.000000000 -0800
     505@@ -3,9 +3,11 @@
     506  * Copyright (C) 2005 Mips Technologies, Inc
     507  */
     508 
     509+#include <linux/device.h>
     510 #include <linux/kernel.h>
     511 #include <linux/sched.h>
     512 #include <linux/cpumask.h>
     513+#include <linux/module.h>
     514 #include <linux/interrupt.h>
     515 #include <linux/security.h>
     516 
     517@@ -96,6 +98,10 @@
    274518                goto out_unlock;
    275519        }
     
    282526        p->thread.user_cpus_allowed = new_mask;
    283527 
    284 @@ -141,8 +145,9 @@
     528@@ -141,8 +147,9 @@
    285529        p = find_process_by_pid(pid);
    286530        if (!p)
     
    294538        cpus_and(mask, p->thread.user_cpus_allowed, cpu_possible_map);
    295539 
    296 diff -Naur linux-2.6.20/arch/mips/kernel/ptrace.c linux-mips-2.6.20/arch/mips/kernel/ptrace.c
    297 --- linux-2.6.20/arch/mips/kernel/ptrace.c      2007-02-04 10:44:54.000000000 -0800
    298 +++ linux-mips-2.6.20/arch/mips/kernel/ptrace.c 2007-02-04 12:22:45.000000000 -0800
     540@@ -448,3 +455,20 @@
     541 #endif /* CONFIG_MIPS_MT_SMTC */
     542        /* FILL IN VSMP and AP/SP VERSIONS HERE */
     543 }
     544+
     545+struct class *mt_class;
     546+
     547+static int __init mt_init(void)
     548+{
     549+       struct class *mtc;
     550+
     551+       mtc = class_create(THIS_MODULE, "mt");
     552+       if (IS_ERR(mtc))
     553+               return PTR_ERR(mtc);
     554+
     555+       mt_class = mtc;
     556+
     557+       return 0;
     558+}
     559+
     560+subsys_initcall(mt_init);
     561diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/ptrace.c linux-2.6.20.1/arch/mips/kernel/ptrace.c
     562--- linux-2.6.20.1.orig/arch/mips/kernel/ptrace.c       2007-02-19 22:34:32.000000000 -0800
     563+++ linux-2.6.20.1/arch/mips/kernel/ptrace.c    2007-02-20 16:47:41.000000000 -0800
    299564@@ -20,12 +20,12 @@
    300565 #include <linux/mm.h>
     
    348613+                                   regs->regs[6], regs->regs[7]);
    349614 }
    350 diff -Naur linux-2.6.20/arch/mips/kernel/scall64-n32.S linux-mips-2.6.20/arch/mips/kernel/scall64-n32.S
    351 --- linux-2.6.20/arch/mips/kernel/scall64-n32.S 2007-02-04 10:44:54.000000000 -0800
    352 +++ linux-mips-2.6.20/arch/mips/kernel/scall64-n32.S    2007-02-04 12:22:45.000000000 -0800
     615diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/r4k_fpu.S linux-2.6.20.1/arch/mips/kernel/r4k_fpu.S
     616--- linux-2.6.20.1.orig/arch/mips/kernel/r4k_fpu.S      2007-02-19 22:34:32.000000000 -0800
     617+++ linux-2.6.20.1/arch/mips/kernel/r4k_fpu.S   2007-02-20 16:47:41.000000000 -0800
     618@@ -114,6 +114,14 @@
     619  */
     620 LEAF(_restore_fp_context)
     621        EX      lw t0, SC_FPC_CSR(a0)
     622+
     623+       /* Fail if the CSR has exceptions pending */
     624+       srl     t1, t0, 5
     625+       and     t1, t0
     626+       andi    t1, 0x1f << 7
     627+       bnez    t1, fault
     628+        nop
     629+
     630 #ifdef CONFIG_64BIT
     631        EX      ldc1 $f1, SC_FPREGS+8(a0)
     632        EX      ldc1 $f3, SC_FPREGS+24(a0)
     633@@ -157,6 +165,14 @@
     634 LEAF(_restore_fp_context32)
     635        /* Restore an o32 sigcontext.  */
     636        EX      lw t0, SC32_FPC_CSR(a0)
     637+
     638+       /* Fail if the CSR has exceptions pending */
     639+       srl     t1, t0, 5
     640+       and     t1, t0
     641+       andi    t1, 0x1f << 7
     642+       bnez    t1, fault
     643+        nop
     644+
     645        EX      ldc1 $f0, SC32_FPREGS+0(a0)
     646        EX      ldc1 $f2, SC32_FPREGS+16(a0)
     647        EX      ldc1 $f4, SC32_FPREGS+32(a0)
     648@@ -177,9 +193,10 @@
     649        jr      ra
     650         li     v0, 0                                   # success
     651        END(_restore_fp_context32)
     652-       .set    reorder
     653 #endif
     654 
     655+       .set    reorder
     656+
     657        .type   fault@function
     658        .ent    fault
     659 fault: li      v0, -EFAULT                             # failure
     660diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/rtlx.c linux-2.6.20.1/arch/mips/kernel/rtlx.c
     661--- linux-2.6.20.1.orig/arch/mips/kernel/rtlx.c 2007-02-19 22:34:32.000000000 -0800
     662+++ linux-2.6.20.1/arch/mips/kernel/rtlx.c      2007-02-20 16:47:41.000000000 -0800
     663@@ -17,6 +17,7 @@
     664  *
     665  */
     666 
     667+#include <linux/device.h>
     668 #include <linux/kernel.h>
     669 #include <linux/module.h>
     670 #include <linux/fs.h>
     671@@ -34,6 +35,7 @@
     672 #include <linux/sched.h>
     673 #include <linux/wait.h>
     674 #include <asm/mipsmtregs.h>
     675+#include <asm/mips_mt.h>
     676 #include <asm/cacheflush.h>
     677 #include <asm/atomic.h>
     678 #include <asm/cpu.h>
     679@@ -498,7 +500,8 @@
     680 
     681 static int rtlx_module_init(void)
     682 {
     683-       int i;
     684+       struct device *dev;
     685+       int i, err;
     686 
     687        major = register_chrdev(0, module_name, &rtlx_fops);
     688        if (major < 0) {
     689@@ -511,6 +514,13 @@
     690                init_waitqueue_head(&channel_wqs[i].rt_queue);
     691                init_waitqueue_head(&channel_wqs[i].lx_queue);
     692                channel_wqs[i].in_open = 0;
     693+
     694+               dev = device_create(mt_class, NULL, MKDEV(major, i),
     695+                                   "%s%d", module_name, i);
     696+               if (IS_ERR(dev)) {
     697+                       err = PTR_ERR(dev);
     698+                       goto out_chrdev;
     699+               }
     700        }
     701 
     702        /* set up notifiers */
     703@@ -525,10 +535,21 @@
     704        setup_irq(rtlx_irq_num, &rtlx_irq);
     705 
     706        return 0;
     707+
     708+out_chrdev:
     709+       for (i = 0; i < RTLX_CHANNELS; i++)
     710+               device_destroy(mt_class, MKDEV(major, i));
     711+
     712+       return err;
     713 }
     714 
     715 static void __exit rtlx_module_exit(void)
     716 {
     717+       int i;
     718+
     719+       for (i = 0; i < RTLX_CHANNELS; i++)
     720+               device_destroy(mt_class, MKDEV(major, i));
     721+
     722        unregister_chrdev(major, module_name);
     723 }
     724 
     725diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/scall64-n32.S linux-2.6.20.1/arch/mips/kernel/scall64-n32.S
     726--- linux-2.6.20.1.orig/arch/mips/kernel/scall64-n32.S  2007-02-19 22:34:32.000000000 -0800
     727+++ linux-2.6.20.1/arch/mips/kernel/scall64-n32.S       2007-02-20 16:47:41.000000000 -0800
    353728@@ -384,7 +384,7 @@
    354729        PTR     sys_readlinkat
     
    360735        PTR     sys_unshare
    361736        PTR     sys_splice
    362 diff -Naur linux-2.6.20/arch/mips/kernel/scall64-o32.S linux-mips-2.6.20/arch/mips/kernel/scall64-o32.S
    363 --- linux-2.6.20/arch/mips/kernel/scall64-o32.S 2007-02-04 10:44:54.000000000 -0800
    364 +++ linux-mips-2.6.20/arch/mips/kernel/scall64-o32.S    2007-02-04 12:22:45.000000000 -0800
     737@@ -396,4 +396,4 @@
     738        PTR     compat_sys_get_robust_list
     739        PTR     compat_sys_kexec_load
     740        PTR     sys_getcpu
     741-       PTR     sys_epoll_pwait
     742+       PTR     compat_sys_epoll_pwait
     743diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/scall64-o32.S linux-2.6.20.1/arch/mips/kernel/scall64-o32.S
     744--- linux-2.6.20.1.orig/arch/mips/kernel/scall64-o32.S  2007-02-19 22:34:32.000000000 -0800
     745+++ linux-2.6.20.1/arch/mips/kernel/scall64-o32.S       2007-02-24 14:25:52.000000000 -0800
    365746@@ -506,7 +506,7 @@
    366747        PTR     sys_readlinkat
     
    372753        PTR     sys_unshare
    373754        PTR     sys_splice
    374 diff -Naur linux-2.6.20/arch/mips/lib/Makefile linux-mips-2.6.20/arch/mips/lib/Makefile
    375 --- linux-2.6.20/arch/mips/lib/Makefile 2007-02-04 10:44:54.000000000 -0800
    376 +++ linux-mips-2.6.20/arch/mips/lib/Makefile    2007-02-04 12:22:45.000000000 -0800
    377 @@ -5,8 +5,6 @@
    378  lib-y  += csum_partial.o memcpy.o promlib.o \
     755@@ -518,5 +518,5 @@
     756        PTR     compat_sys_get_robust_list      /* 4310 */
     757        PTR     compat_sys_kexec_load
     758        PTR     sys_getcpu
     759-       PTR     sys_epoll_pwait
     760+       PTR     compat_sys_epoll_pwait
     761        .size   sys_call_table,.-sys_call_table
     762diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/setup.c linux-2.6.20.1/arch/mips/kernel/setup.c
     763--- linux-2.6.20.1.orig/arch/mips/kernel/setup.c        2007-02-19 22:34:32.000000000 -0800
     764+++ linux-2.6.20.1/arch/mips/kernel/setup.c     2007-02-20 16:47:41.000000000 -0800
     765@@ -521,7 +521,7 @@
     766 #endif
     767 }
     768 
     769-int __init fpu_disable(char *s)
     770+static int __init fpu_disable(char *s)
     771 {
     772        int i;
     773 
     774@@ -533,7 +533,7 @@
     775 
     776 __setup("nofpu", fpu_disable);
     777 
     778-int __init dsp_disable(char *s)
     779+static int __init dsp_disable(char *s)
     780 {
     781        cpu_data[0].ases &= ~MIPS_ASE_DSP;
     782 
     783diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/signal32.c linux-2.6.20.1/arch/mips/kernel/signal32.c
     784--- linux-2.6.20.1.orig/arch/mips/kernel/signal32.c     2007-02-19 22:34:32.000000000 -0800
     785+++ linux-2.6.20.1/arch/mips/kernel/signal32.c  2007-02-20 16:47:41.000000000 -0800
     786@@ -8,6 +8,7 @@
     787  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
     788  */
     789 #include <linux/cache.h>
     790+#include <linux/compat.h>
     791 #include <linux/sched.h>
     792 #include <linux/mm.h>
     793 #include <linux/smp.h>
     794@@ -24,6 +25,7 @@
     795 
     796 #include <asm/abi.h>
     797 #include <asm/asm.h>
     798+#include <asm/compat-signal.h>
     799 #include <linux/bitops.h>
     800 #include <asm/cacheflush.h>
     801 #include <asm/sim.h>
     802@@ -108,13 +110,6 @@
     803 
     804 /* 32-bit compatibility types */
     805 
     806-#define _NSIG_BPW32    32
     807-#define _NSIG_WORDS32  (_NSIG / _NSIG_BPW32)
     808-
     809-typedef struct {
     810-       unsigned int sig[_NSIG_WORDS32];
     811-} sigset_t32;
     812-
     813 typedef unsigned int __sighandler32_t;
     814 typedef void (*vfptr_t)(void);
     815 
     816@@ -136,7 +131,7 @@
     817        s32                 uc_link;
     818        stack32_t           uc_stack;
     819        struct sigcontext32 uc_mcontext;
     820-       sigset_t32          uc_sigmask;   /* mask last for extensibility */
     821+       compat_sigset_t     uc_sigmask;   /* mask last for extensibility */
     822 };
     823 
     824 extern void __put_sigset_unknown_nsig(void);
     825@@ -391,7 +386,7 @@
     826        u32 sf_code[2];                 /* signal trampoline */
     827 #endif
     828        struct sigcontext32 sf_sc;
     829-       sigset_t sf_mask;
     830+       compat_sigset_t sf_mask;
     831 #if ICACHE_REFILLS_WORKAROUND_WAR
     832        u32 sf_code[8] ____cacheline_aligned;   /* signal trampoline */
     833 #endif
     834@@ -473,7 +468,7 @@
     835        frame = (struct sigframe __user *) regs.regs[29];
     836        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
     837                goto badframe;
     838-       if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked)))
     839+       if (__copy_conv_sigset_from_user(&blocked, &frame->sf_mask))
     840                goto badframe;
     841 
     842        sigdelsetmask(&blocked, ~_BLOCKABLE);
     843@@ -512,7 +507,7 @@
     844        frame = (struct rt_sigframe32 __user *) regs.regs[29];
     845        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
     846                goto badframe;
     847-       if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
     848+       if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask))
     849                goto badframe;
     850 
     851        sigdelsetmask(&set, ~_BLOCKABLE);
     852@@ -658,7 +653,8 @@
     853        flush_cache_sigtramp((unsigned long) frame->sf_code);
     854 
     855        err |= setup_sigcontext32(regs, &frame->sf_sc);
     856-       err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set));
     857+       err |= __copy_conv_sigset_to_user(&frame->sf_mask, set);
     858+
     859        if (err)
     860                goto give_sigsegv;
     861 
     862@@ -728,7 +724,7 @@
     863        err |= __put_user(current->sas_ss_size,
     864                          &frame->rs_uc.uc_stack.ss_size);
     865        err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext);
     866-       err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
     867+       err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
     868 
     869        if (err)
     870                goto give_sigsegv;
     871diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/signal_n32.c linux-2.6.20.1/arch/mips/kernel/signal_n32.c
     872--- linux-2.6.20.1.orig/arch/mips/kernel/signal_n32.c   2007-02-19 22:34:32.000000000 -0800
     873+++ linux-2.6.20.1/arch/mips/kernel/signal_n32.c        2007-02-20 16:47:41.000000000 -0800
     874@@ -31,6 +31,7 @@
     875 
     876 #include <asm/asm.h>
     877 #include <asm/cacheflush.h>
     878+#include <asm/compat-signal.h>
     879 #include <asm/sim.h>
     880 #include <asm/uaccess.h>
     881 #include <asm/ucontext.h>
     882@@ -63,7 +64,7 @@
     883        s32                 uc_link;
     884        stack32_t           uc_stack;
     885        struct sigcontext   uc_mcontext;
     886-       sigset_t            uc_sigmask;   /* mask last for extensibility */
     887+       compat_sigset_t     uc_sigmask;   /* mask last for extensibility */
     888 };
     889 
     890 struct rt_sigframe_n32 {
     891@@ -126,7 +127,7 @@
     892        frame = (struct rt_sigframe_n32 __user *) regs.regs[29];
     893        if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
     894                goto badframe;
     895-       if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
     896+       if (__copy_conv_sigset_from_user(&set, &frame->rs_uc.uc_sigmask))
     897                goto badframe;
     898 
     899        sigdelsetmask(&set, ~_BLOCKABLE);
     900@@ -192,7 +193,7 @@
     901        err |= __put_user(current->sas_ss_size,
     902                          &frame->rs_uc.uc_stack.ss_size);
     903        err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
     904-       err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
     905+       err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set);
     906 
     907        if (err)
     908                goto give_sigsegv;
     909diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/smp.c linux-2.6.20.1/arch/mips/kernel/smp.c
     910--- linux-2.6.20.1.orig/arch/mips/kernel/smp.c  2007-02-19 22:34:32.000000000 -0800
     911+++ linux-2.6.20.1/arch/mips/kernel/smp.c       2007-02-20 16:47:41.000000000 -0800
     912@@ -51,31 +51,14 @@
     913 EXPORT_SYMBOL(phys_cpu_present_map);
     914 EXPORT_SYMBOL(cpu_online_map);
     915 
     916+/* This happens early in bootup, can't really do it better */
     917 static void smp_tune_scheduling (void)
     918 {
     919        struct cache_desc *cd = &current_cpu_data.scache;
     920-       unsigned long cachesize;       /* kB   */
     921-       unsigned long cpu_khz;
     922+       unsigned long cachesize = cd->linesz * cd->sets * cd->ways;
     923 
     924-       /*
     925-        * Crude estimate until we actually meassure ...
     926-        */
     927-       cpu_khz = loops_per_jiffy * 2 * HZ / 1000;
     928-
     929-       /*
     930-        * Rough estimation for SMP scheduling, this is the number of
     931-        * cycles it takes for a fully memory-limited process to flush
     932-        * the SMP-local cache.
     933-        *
     934-        * (For a P5 this pretty much means we will choose another idle
     935-        *  CPU almost always at wakeup time (this is due to the small
     936-        *  L1 cache), on PIIs it's around 50-100 usecs, depending on
     937-        *  the cache size)
     938-        */
     939-       if (!cpu_khz)
     940-               return;
     941-
     942-       cachesize = cd->linesz * cd->sets * cd->ways;
     943+       if (cachesize > max_cache_size)
     944+               max_cache_size = cachesize;
     945 }
     946 
     947 extern void __init calibrate_delay(void);
     948diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/traps.c linux-2.6.20.1/arch/mips/kernel/traps.c
     949--- linux-2.6.20.1.orig/arch/mips/kernel/traps.c        2007-02-19 22:34:32.000000000 -0800
     950+++ linux-2.6.20.1/arch/mips/kernel/traps.c     2007-02-20 16:47:41.000000000 -0800
     951@@ -708,6 +708,7 @@
     952                die_if_kernel("Break instruction in kernel code", regs);
     953                force_sig(SIGTRAP, current);
     954        }
     955+       return;
     956 
     957 out_sigsegv:
     958        force_sig(SIGSEGV, current);
     959@@ -751,6 +752,7 @@
     960                die_if_kernel("Trap instruction in kernel code", regs);
     961                force_sig(SIGTRAP, current);
     962        }
     963+       return;
     964 
     965 out_sigsegv:
     966        force_sig(SIGSEGV, current);
     967diff -Naur linux-2.6.20.1.orig/arch/mips/kernel/vpe.c linux-2.6.20.1/arch/mips/kernel/vpe.c
     968--- linux-2.6.20.1.orig/arch/mips/kernel/vpe.c  2007-02-19 22:34:32.000000000 -0800
     969+++ linux-2.6.20.1/arch/mips/kernel/vpe.c       2007-02-20 16:47:41.000000000 -0800
     970@@ -29,6 +29,7 @@
     971  */
     972 
     973 #include <linux/kernel.h>
     974+#include <linux/device.h>
     975 #include <linux/module.h>
     976 #include <linux/fs.h>
     977 #include <linux/init.h>
     978@@ -48,6 +49,7 @@
     979 #include <asm/cacheflush.h>
     980 #include <asm/atomic.h>
     981 #include <asm/cpu.h>
     982+#include <asm/mips_mt.h>
     983 #include <asm/processor.h>
     984 #include <asm/system.h>
     985 #include <asm/vpe.h>
     986@@ -64,6 +66,7 @@
     987 
     988 static char module_name[] = "vpe";
     989 static int major;
     990+static const int minor = 1;    /* fixed for now  */
     991 
     992 #ifdef CONFIG_MIPS_APSP_KSPD
     993  static struct kspd_notifications kspd_events;
     994@@ -1365,12 +1368,15 @@
     995 }
     996 #endif
     997 
     998+static struct device *vpe_dev;
     999+
     1000 static int __init vpe_module_init(void)
     1001 {
     1002        struct vpe *v = NULL;
     1003+       struct device *dev;
     1004        struct tc *t;
     1005        unsigned long val;
     1006-       int i;
     1007+       int i, err;
     1008 
     1009        if (!cpu_has_mipsmt) {
     1010                printk("VPE loader: not a MIPS MT capable processor\n");
     1011@@ -1383,6 +1389,14 @@
     1012                return major;
     1013        }
     1014 
     1015+       dev = device_create(mt_class, NULL, MKDEV(major, minor),
     1016+                           "tc%d", minor);
     1017+       if (IS_ERR(dev)) {
     1018+               err = PTR_ERR(dev);
     1019+               goto out_chrdev;
     1020+       }
     1021+       vpe_dev = dev;
     1022+
     1023        dmt();
     1024        dvpe();
     1025 
     1026@@ -1478,6 +1492,11 @@
     1027        kspd_events.kspd_sp_exit = kspd_sp_exit;
     1028 #endif
     1029        return 0;
     1030+
     1031+out_chrdev:
     1032+       unregister_chrdev(major, module_name);
     1033+
     1034+       return err;
     1035 }
     1036 
     1037 static void __exit vpe_module_exit(void)
     1038@@ -1490,6 +1509,7 @@
     1039                }
     1040        }
     1041 
     1042+       device_destroy(mt_class, MKDEV(major, minor));
     1043        unregister_chrdev(major, module_name);
     1044 }
     1045 
     1046diff -Naur linux-2.6.20.1.orig/arch/mips/lib/Makefile linux-2.6.20.1/arch/mips/lib/Makefile
     1047--- linux-2.6.20.1.orig/arch/mips/lib/Makefile  2007-02-19 22:34:32.000000000 -0800
     1048+++ linux-2.6.20.1/arch/mips/lib/Makefile       2007-02-20 16:47:41.000000000 -0800
     1049@@ -2,10 +2,11 @@
     1050 # Makefile for MIPS-specific library files..
     1051 #
     1052 
     1053-lib-y  += csum_partial.o memcpy.o promlib.o \
     1054+lib-y  += csum_partial.o memcpy.o memcpy-inatomic.o promlib.o \
    3791055           strlen_user.o strncpy_user.o strnlen_user.o uncached.o
    3801056 
    3811057-obj-y  += iomap.o
    382 -
     1058+obj-y                  += iomap.o
     1059+obj-$(CONFIG_PCI)      += iomap-pci.o
     1060 
    3831061 # libgcc-style stuff needed in the kernel
    3841062 lib-y += ashldi3.o ashrdi3.o lshrdi3.o
    385  
    386 diff -Naur linux-2.6.20/arch/mips/lib/iomap.c linux-mips-2.6.20/arch/mips/lib/iomap.c
    387 --- linux-2.6.20/arch/mips/lib/iomap.c  2007-02-04 10:44:54.000000000 -0800
    388 +++ linux-mips-2.6.20/arch/mips/lib/iomap.c     1969-12-31 16:00:00.000000000 -0800
    389 @@ -1,78 +0,0 @@
    390 -/*
     1063diff -Naur linux-2.6.20.1.orig/arch/mips/lib/iomap-pci.c linux-2.6.20.1/arch/mips/lib/iomap-pci.c
     1064--- linux-2.6.20.1.orig/arch/mips/lib/iomap-pci.c       1969-12-31 16:00:00.000000000 -0800
     1065+++ linux-2.6.20.1/arch/mips/lib/iomap-pci.c    2007-02-20 16:47:41.000000000 -0800
     1066@@ -0,0 +1,74 @@
     1067+/*
     1068+ * Implement the default iomap interfaces
     1069+ *
     1070+ * (C) Copyright 2004 Linus Torvalds
     1071+ * (C) Copyright 2006 Ralf Baechle <ralf@linux-mips.org>
     1072+ * (C) Copyright 2007 MIPS Technologies, Inc.
     1073+ *     written by Ralf Baechle <ralf@linux-mips.org>
     1074+ */
     1075+#include <linux/pci.h>
     1076+#include <linux/module.h>
     1077+#include <asm/io.h>
     1078+
     1079+static void __iomem *ioport_map_pci(struct pci_dev *dev,
     1080+                                     unsigned long port, unsigned int nr)
     1081+{
     1082+       struct pci_controller *ctrl = dev->bus->sysdata;
     1083+       unsigned long base = ctrl->io_map_base;
     1084+
     1085+       /* This will eventually become a BUG_ON but for now be gentle */
     1086+       if (unlikely(!ctrl->io_map_base)) {
     1087+               struct pci_bus *bus = dev->bus;
     1088+               char name[8];
     1089+
     1090+               while (bus->parent)
     1091+                       bus = bus->parent;
     1092+
     1093+               ctrl->io_map_base = base = mips_io_port_base;
     1094+
     1095+               sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number);
     1096+               printk(KERN_WARNING "io_map_base of root PCI bus %s unset.  "
     1097+                      "Trying to continue but you better\nfix this issue or "
     1098+                      "report it to linux-mips@linux-mips.org or your "
     1099+                      "vendor.\n", name);
     1100+#ifdef CONFIG_PCI_DOMAINS
     1101+               panic("To avoid data corruption io_map_base MUST be set with "
     1102+                     "multiple PCI domains.");
     1103+#endif
     1104+       }
     1105+
     1106+       return (void __iomem *) (ctrl->io_map_base + port);
     1107+}
     1108+
     1109+/*
     1110+ * Create a virtual mapping cookie for a PCI BAR (memory or IO)
     1111+ */
     1112+void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
     1113+{
     1114+       unsigned long start = pci_resource_start(dev, bar);
     1115+       unsigned long len = pci_resource_len(dev, bar);
     1116+       unsigned long flags = pci_resource_flags(dev, bar);
     1117+
     1118+       if (!len || !start)
     1119+               return NULL;
     1120+       if (maxlen && len > maxlen)
     1121+               len = maxlen;
     1122+       if (flags & IORESOURCE_IO)
     1123+               return ioport_map_pci(dev, start, len);
     1124+       if (flags & IORESOURCE_MEM) {
     1125+               if (flags & IORESOURCE_CACHEABLE)
     1126+                       return ioremap(start, len);
     1127+               return ioremap_nocache(start, len);
     1128+       }
     1129+       /* What? */
     1130+       return NULL;
     1131+}
     1132+
     1133+EXPORT_SYMBOL(pci_iomap);
     1134+
     1135+void pci_iounmap(struct pci_dev *dev, void __iomem * addr)
     1136+{
     1137+       iounmap(addr);
     1138+}
     1139+
     1140+EXPORT_SYMBOL(pci_iounmap);
     1141diff -Naur linux-2.6.20.1.orig/arch/mips/lib/iomap.c linux-2.6.20.1/arch/mips/lib/iomap.c
     1142--- linux-2.6.20.1.orig/arch/mips/lib/iomap.c   2007-02-19 22:34:32.000000000 -0800
     1143+++ linux-2.6.20.1/arch/mips/lib/iomap.c        2007-02-20 16:47:41.000000000 -0800
     1144@@ -1,78 +1,227 @@
     1145 /*
    3911146- *  iomap.c, Memory Mapped I/O routines for MIPS architecture.
    392 - *
     1147+ * Implement the default iomap interfaces
     1148  *
    3931149- *  This code is based on lib/iomap.c, by Linus Torvalds.
    3941150- *
     
    3991155- *  the Free Software Foundation; either version 2 of the License, or
    4001156- *  (at your option) any later version.
    401 - *
     1157+ * (C) Copyright 2004 Linus Torvalds
     1158+ * (C) Copyright 2006 Ralf Baechle <ralf@linux-mips.org>
     1159+ * (C) Copyright 2007 MIPS Technologies, Inc.
     1160+ *     written by Ralf Baechle <ralf@linux-mips.org>
     1161+ */
     1162+#include <linux/pci.h>
     1163+#include <linux/module.h>
     1164+#include <asm/io.h>
     1165+
     1166+/*
     1167+ * Read/write from/to an (offsettable) iomem cookie. It might be a PIO
     1168+ * access or a MMIO access, these functions don't care. The info is
     1169+ * encoded in the hardware mapping set up by the mapping functions
     1170+ * (or the cookie itself, depending on implementation and hw).
     1171  *
    4021172- *  This program is distributed in the hope that it will be useful,
    4031173- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    4041174- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4051175- *  GNU General Public License for more details.
    406 - *
     1176+ * The generic routines don't assume any hardware mappings, and just
     1177+ * encode the PIO/MMIO as part of the cookie. They coldly assume that
     1178+ * the MMIO IO mappings are not in the low address range.
     1179  *
    4071180- *  You should have received a copy of the GNU General Public License
    4081181- *  along with this program; if not, write to the Free Software
    4091182- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    410 - */
     1183+ * Architectures for which this is not true can't use this generic
     1184+ * implementation and should do their own copy.
     1185  */
    4111186-#include <linux/ioport.h>
    4121187-#include <linux/module.h>
    4131188-#include <linux/pci.h>
    414 -
     1189 
    4151190-#include <asm/io.h>
    416 -
     1191+#define PIO_MASK       0x0ffffUL
     1192 
    4171193-void __iomem *ioport_map(unsigned long port, unsigned int nr)
    418 -{
     1194+unsigned int ioread8(void __iomem *addr)
     1195 {
    4191196-       unsigned long end;
    420 -
     1197+       return readb(addr);
     1198+}
     1199 
    4211200-       end = port + nr - 1UL;
    4221201-       if (ioport_resource.start > port ||
    4231202-           ioport_resource.end < end || port > end)
    4241203-               return NULL;
    425 -
     1204+EXPORT_SYMBOL(ioread8);
     1205 
    4261206-       return (void __iomem *)(mips_io_port_base + port);
    427 -}
    428 -
     1207+unsigned int ioread16(void __iomem *addr)
     1208+{
     1209+       return readw(addr);
     1210 }
     1211 
    4291212-void ioport_unmap(void __iomem *addr)
    430 -{
    431 -}
     1213+EXPORT_SYMBOL(ioread16);
     1214+
     1215+unsigned int ioread16be(void __iomem *addr)
     1216 {
     1217+       return be16_to_cpu(__raw_readw(addr));
     1218 }
    4321219-EXPORT_SYMBOL(ioport_map);
    4331220-EXPORT_SYMBOL(ioport_unmap);
    434 -
     1221 
    4351222-void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
    436 -{
     1223+EXPORT_SYMBOL(ioread16be);
     1224+
     1225+unsigned int ioread32(void __iomem *addr)
     1226 {
    4371227-       unsigned long start, len, flags;
    438 -
     1228+       return readl(addr);
     1229+}
     1230 
    4391231-       if (dev == NULL)
    4401232-               return NULL;
    441 -
     1233+EXPORT_SYMBOL(ioread32);
     1234 
    4421235-       start = pci_resource_start(dev, bar);
    4431236-       len = pci_resource_len(dev, bar);
    4441237-       if (!start || !len)
    4451238-               return NULL;
    446 -
     1239+unsigned int ioread32be(void __iomem *addr)
     1240+{
     1241+       return be32_to_cpu(__raw_readl(addr));
     1242+}
     1243 
    4471244-       if (maxlen != 0 && len > maxlen)
    4481245-               len = maxlen;
    449 -
     1246+EXPORT_SYMBOL(ioread32be);
     1247+
     1248+void iowrite8(u8 val, void __iomem *addr)
     1249+{
     1250+       writeb(val, addr);
     1251+}
     1252 
    4501253-       flags = pci_resource_flags(dev, bar);
    4511254-       if (flags & IORESOURCE_IO)
     
    4551258-                       return ioremap_cachable(start, len);
    4561259-               return ioremap_nocache(start, len);
    457 -       }
    458 -
     1260+EXPORT_SYMBOL(iowrite8);
     1261+
     1262+void iowrite16(u16 val, void __iomem *addr)
     1263+{
     1264+       writew(val, addr);
     1265+}
     1266+
     1267+EXPORT_SYMBOL(iowrite16);
     1268+
     1269+void iowrite16be(u16 val, void __iomem *addr)
     1270+{
     1271+       __raw_writew(cpu_to_be16(val), addr);
     1272+}
     1273+
     1274+EXPORT_SYMBOL(iowrite16be);
     1275+
     1276+void iowrite32(u32 val, void __iomem *addr)
     1277+{
     1278+       writel(val, addr);
     1279+}
     1280+
     1281+EXPORT_SYMBOL(iowrite32);
     1282+
     1283+void iowrite32be(u32 val, void __iomem *addr)
     1284+{
     1285+       __raw_writel(cpu_to_be32(val), addr);
     1286+}
     1287+
     1288+EXPORT_SYMBOL(iowrite32be);
     1289+
     1290+/*
     1291+ * These are the "repeat MMIO read/write" functions.
     1292+ * Note the "__raw" accesses, since we don't want to
     1293+ * convert to CPU byte order. We write in "IO byte
     1294+ * order" (we also don't have IO barriers).
     1295+ */
     1296+static inline void mmio_insb(void __iomem *addr, u8 *dst, int count)
     1297+{
     1298+       while (--count >= 0) {
     1299+               u8 data = __raw_readb(addr);
     1300+               *dst = data;
     1301+               dst++;
     1302        }
     1303+}
     1304 
    4591305-       return NULL;
    460 -}
    461 -
     1306+static inline void mmio_insw(void __iomem *addr, u16 *dst, int count)
     1307+{
     1308+       while (--count >= 0) {
     1309+               u16 data = __raw_readw(addr);
     1310+               *dst = data;
     1311+               dst++;
     1312+       }
     1313 }
     1314 
    4621315-void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
    463 -{
     1316+static inline void mmio_insl(void __iomem *addr, u32 *dst, int count)
     1317 {
    4641318-       iounmap(addr);
    465 -}
     1319+       while (--count >= 0) {
     1320+               u32 data = __raw_readl(addr);
     1321+               *dst = data;
     1322+               dst++;
     1323+       }
     1324 }
    4661325-EXPORT_SYMBOL(pci_iomap);
    4671326-EXPORT_SYMBOL(pci_iounmap);
    468 diff -Naur linux-2.6.20/arch/mips/lib-32/dump_tlb.c linux-mips-2.6.20/arch/mips/lib-32/dump_tlb.c
    469 --- linux-2.6.20/arch/mips/lib-32/dump_tlb.c    2007-02-04 10:44:54.000000000 -0800
    470 +++ linux-mips-2.6.20/arch/mips/lib-32/dump_tlb.c       2007-02-04 12:22:45.000000000 -0800
     1327+
     1328+static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count)
     1329+{
     1330+       while (--count >= 0) {
     1331+               __raw_writeb(*src, addr);
     1332+               src++;
     1333+       }
     1334+}
     1335+
     1336+static inline void mmio_outsw(void __iomem *addr, const u16 *src, int count)
     1337+{
     1338+       while (--count >= 0) {
     1339+               __raw_writew(*src, addr);
     1340+               src++;
     1341+       }
     1342+}
     1343+
     1344+static inline void mmio_outsl(void __iomem *addr, const u32 *src, int count)
     1345+{
     1346+       while (--count >= 0) {
     1347+               __raw_writel(*src, addr);
     1348+               src++;
     1349+       }
     1350+}
     1351+
     1352+void ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
     1353+{
     1354+       mmio_insb(addr, dst, count);
     1355+}
     1356+
     1357+EXPORT_SYMBOL(ioread8_rep);
     1358+
     1359+void ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
     1360+{
     1361+       mmio_insw(addr, dst, count);
     1362+}
     1363+
     1364+EXPORT_SYMBOL(ioread16_rep);
     1365+
     1366+void ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
     1367+{
     1368+       mmio_insl(addr, dst, count);
     1369+}
     1370+
     1371+EXPORT_SYMBOL(ioread32_rep);
     1372+
     1373+void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count)
     1374+{
     1375+       mmio_outsb(addr, src, count);
     1376+}
     1377+
     1378+EXPORT_SYMBOL(iowrite8_rep);
     1379+
     1380+void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count)
     1381+{
     1382+       mmio_outsw(addr, src, count);
     1383+}
     1384+
     1385+EXPORT_SYMBOL(iowrite16_rep);
     1386+
     1387+void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count)
     1388+{
     1389+       mmio_outsl(addr, src, count);
     1390+}
     1391+
     1392+EXPORT_SYMBOL(iowrite32_rep);
     1393+
     1394+/*
     1395+ * Create a virtual mapping cookie for an IO port range
     1396+ *
     1397+ * This uses the same mapping are as the in/out family which has to be setup
     1398+ * by the platform initialization code.
     1399+ *
     1400+ * Just to make matters somewhat more interesting on MIPS systems with
     1401+ * multiple host bridge each will have it's own ioport address space.
     1402+ */
     1403+static void __iomem *ioport_map_legacy(unsigned long port, unsigned int nr)
     1404+{
     1405+       return (void __iomem *) (mips_io_port_base + port);
     1406+}
     1407+
     1408+void __iomem *ioport_map(unsigned long port, unsigned int nr)
     1409+{
     1410+       if (port > PIO_MASK)
     1411+               return NULL;
     1412+
     1413+       return ioport_map_legacy(port, nr);
     1414+}
     1415+
     1416+EXPORT_SYMBOL(ioport_map);
     1417+
     1418+void ioport_unmap(void __iomem *addr)
     1419+{
     1420+       /* Nothing to do */
     1421+}
     1422+
     1423+EXPORT_SYMBOL(ioport_unmap);
     1424diff -Naur linux-2.6.20.1.orig/arch/mips/lib/memcpy-inatomic.S linux-2.6.20.1/arch/mips/lib/memcpy-inatomic.S
     1425--- linux-2.6.20.1.orig/arch/mips/lib/memcpy-inatomic.S 1969-12-31 16:00:00.000000000 -0800
     1426+++ linux-2.6.20.1/arch/mips/lib/memcpy-inatomic.S      2007-02-20 16:47:41.000000000 -0800
     1427@@ -0,0 +1,436 @@
     1428+/*
     1429+ * This file is subject to the terms and conditions of the GNU General Public
     1430+ * License.  See the file "COPYING" in the main directory of this archive
     1431+ * for more details.
     1432+ *
     1433+ * Unified implementation of memcpy, memmove and the __copy_user backend.
     1434+ *
     1435+ * Copyright (C) 1998, 99, 2000, 01, 2002 Ralf Baechle (ralf@gnu.org)
     1436+ * Copyright (C) 1999, 2000, 01, 2002 Silicon Graphics, Inc.
     1437+ * Copyright (C) 2002 Broadcom, Inc.
     1438+ *   memcpy/copy_user author: Mark Vandevoorde
     1439+ *
     1440+ * Mnemonic names for arguments to memcpy/__copy_user
     1441+ */
     1442+
     1443+/*
     1444+ * Hack to resolve longstanding prefetch issue
     1445+ *
     1446+ * Prefetching may be fatal on some systems if we're prefetching beyond the
     1447+ * end of memory on some systems.  It's also a seriously bad idea on non
     1448+ * dma-coherent systems.
     1449+ */
     1450+#if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27)
     1451+#undef CONFIG_CPU_HAS_PREFETCH
     1452+#endif
     1453+#ifdef CONFIG_MIPS_MALTA
     1454+#undef CONFIG_CPU_HAS_PREFETCH
     1455+#endif
     1456+
     1457+#include <asm/asm.h>
     1458+#include <asm/asm-offsets.h>
     1459+#include <asm/regdef.h>
     1460+
     1461+#define dst a0
     1462+#define src a1
     1463+#define len a2
     1464+
     1465+/*
     1466+ * Spec
     1467+ *
     1468+ * memcpy copies len bytes from src to dst and sets v0 to dst.
     1469+ * It assumes that
     1470+ *   - src and dst don't overlap
     1471+ *   - src is readable
     1472+ *   - dst is writable
     1473+ * memcpy uses the standard calling convention
     1474+ *
     1475+ * __copy_user copies up to len bytes from src to dst and sets a2 (len) to
     1476+ * the number of uncopied bytes due to an exception caused by a read or write.
     1477+ * __copy_user assumes that src and dst don't overlap, and that the call is
     1478+ * implementing one of the following:
     1479+ *   copy_to_user
     1480+ *     - src is readable  (no exceptions when reading src)
     1481+ *   copy_from_user
     1482+ *     - dst is writable  (no exceptions when writing dst)
     1483+ * __copy_user uses a non-standard calling convention; see
     1484+ * include/asm-mips/uaccess.h
     1485+ *
     1486+ * When an exception happens on a load, the handler must
     1487+ # ensure that all of the destination buffer is overwritten to prevent
     1488+ * leaking information to user mode programs.
     1489+ */
     1490+
     1491+/*
     1492+ * Implementation
     1493+ */
     1494+
     1495+/*
     1496+ * The exception handler for loads requires that:
     1497+ *  1- AT contain the address of the byte just past the end of the source
     1498+ *     of the copy,
     1499+ *  2- src_entry <= src < AT, and
     1500+ *  3- (dst - src) == (dst_entry - src_entry),
     1501+ * The _entry suffix denotes values when __copy_user was called.
     1502+ *
     1503+ * (1) is set up up by uaccess.h and maintained by not writing AT in copy_user
     1504+ * (2) is met by incrementing src by the number of bytes copied
     1505+ * (3) is met by not doing loads between a pair of increments of dst and src
     1506+ *
     1507+ * The exception handlers for stores adjust len (if necessary) and return.
     1508+ * These handlers do not need to overwrite any data.
     1509+ *
     1510+ * For __rmemcpy and memmove an exception is always a kernel bug, therefore
     1511+ * they're not protected.
     1512+ */
     1513+
     1514+#define EXC(inst_reg,addr,handler)             \
     1515+9:     inst_reg, addr;                         \
     1516+       .section __ex_table,"a";                \
     1517+       PTR     9b, handler;                    \
     1518+       .previous
     1519+
     1520+/*
     1521+ * Only on the 64-bit kernel we can made use of 64-bit registers.
     1522+ */
     1523+#ifdef CONFIG_64BIT
     1524+#define USE_DOUBLE
     1525+#endif
     1526+
     1527+#ifdef USE_DOUBLE
     1528+
     1529+#define LOAD   ld
     1530+#define LOADL  ldl
     1531+#define LOADR  ldr
     1532+#define STOREL sdl
     1533+#define STORER sdr
     1534+#define STORE  sd
     1535+#define ADD    daddu
     1536+#define SUB    dsubu
     1537+#define SRL    dsrl
     1538+#define SRA    dsra
     1539+#define SLL    dsll
     1540+#define SLLV   dsllv
     1541+#define SRLV   dsrlv
     1542+#define NBYTES 8
     1543+#define LOG_NBYTES 3
     1544+
     1545+/*
     1546+ * As we are sharing code base with the mips32 tree (which use the o32 ABI
     1547+ * register definitions). We need to redefine the register definitions from
     1548+ * the n64 ABI register naming to the o32 ABI register naming.
     1549+ */
     1550+#undef t0
     1551+#undef t1
     1552+#undef t2
     1553+#undef t3
     1554+#define t0     $8
     1555+#define t1     $9
     1556+#define t2     $10
     1557+#define t3     $11
     1558+#define t4     $12
     1559+#define t5     $13
     1560+#define t6     $14
     1561+#define t7     $15
     1562+
     1563+#else
     1564+
     1565+#define LOAD   lw
     1566+#define LOADL  lwl
     1567+#define LOADR  lwr
     1568+#define STOREL swl
     1569+#define STORER swr
     1570+#define STORE  sw
     1571+#define ADD    addu
     1572+#define SUB    subu
     1573+#define SRL    srl
     1574+#define SLL    sll
     1575+#define SRA    sra
     1576+#define SLLV   sllv
     1577+#define SRLV   srlv
     1578+#define NBYTES 4
     1579+#define LOG_NBYTES 2
     1580+
     1581+#endif /* USE_DOUBLE */
     1582+
     1583+#ifdef CONFIG_CPU_LITTLE_ENDIAN
     1584+#define LDFIRST LOADR
     1585+#define LDREST  LOADL
     1586+#define STFIRST STORER
     1587+#define STREST  STOREL
     1588+#define SHIFT_DISCARD SLLV
     1589+#else
     1590+#define LDFIRST LOADL
     1591+#define LDREST  LOADR
     1592+#define STFIRST STOREL
     1593+#define STREST  STORER
     1594+#define SHIFT_DISCARD SRLV
     1595+#endif
     1596+
     1597+#define FIRST(unit) ((unit)*NBYTES)
     1598+#define REST(unit)  (FIRST(unit)+NBYTES-1)
     1599+#define UNIT(unit)  FIRST(unit)
     1600+
     1601+#define ADDRMASK (NBYTES-1)
     1602+
     1603+       .text
     1604+       .set    noreorder
     1605+       .set    noat
     1606+
     1607+/*
     1608+ * A combined memcpy/__copy_user
     1609+ * __copy_user sets len to 0 for success; else to an upper bound of
     1610+ * the number of uncopied bytes.
     1611+ * memcpy sets v0 to dst.
     1612+ */
     1613+       .align  5
     1614+LEAF(__copy_user_inatomic)
     1615+       /*
     1616+        * Note: dst & src may be unaligned, len may be 0
     1617+        * Temps
     1618+        */
     1619+#define rem t8
     1620+
     1621+       /*
     1622+        * The "issue break"s below are very approximate.
     1623+        * Issue delays for dcache fills will perturb the schedule, as will
     1624+        * load queue full replay traps, etc.
     1625+        *
     1626+        * If len < NBYTES use byte operations.
     1627+        */
     1628+       PREF(   0, 0(src) )
     1629+       PREF(   1, 0(dst) )
     1630+       sltu    t2, len, NBYTES
     1631+       and     t1, dst, ADDRMASK
     1632+       PREF(   0, 1*32(src) )
     1633+       PREF(   1, 1*32(dst) )
     1634+       bnez    t2, copy_bytes_checklen
     1635+        and    t0, src, ADDRMASK
     1636+       PREF(   0, 2*32(src) )
     1637+       PREF(   1, 2*32(dst) )
     1638+       bnez    t1, dst_unaligned
     1639+        nop
     1640+       bnez    t0, src_unaligned_dst_aligned
     1641+       /*
     1642+        * use delay slot for fall-through
     1643+        * src and dst are aligned; need to compute rem
     1644+        */
     1645+both_aligned:
     1646+        SRL    t0, len, LOG_NBYTES+3    # +3 for 8 units/iter
     1647+       beqz    t0, cleanup_both_aligned # len < 8*NBYTES
     1648+        and    rem, len, (8*NBYTES-1)   # rem = len % (8*NBYTES)
     1649+       PREF(   0, 3*32(src) )
     1650+       PREF(   1, 3*32(dst) )
     1651+       .align  4
     1652+1:
     1653+EXC(   LOAD    t0, UNIT(0)(src),       l_exc)
     1654+EXC(   LOAD    t1, UNIT(1)(src),       l_exc_copy)
     1655+EXC(   LOAD    t2, UNIT(2)(src),       l_exc_copy)
     1656+EXC(   LOAD    t3, UNIT(3)(src),       l_exc_copy)
     1657+       SUB     len, len, 8*NBYTES
     1658+EXC(   LOAD    t4, UNIT(4)(src),       l_exc_copy)
     1659+EXC(   LOAD    t7, UNIT(5)(src),       l_exc_copy)
     1660+       STORE   t0, UNIT(0)(dst)
     1661+       STORE   t1, UNIT(1)(dst)
     1662+EXC(   LOAD    t0, UNIT(6)(src),       l_exc_copy)
     1663+EXC(   LOAD    t1, UNIT(7)(src),       l_exc_copy)
     1664+       ADD     src, src, 8*NBYTES
     1665+       ADD     dst, dst, 8*NBYTES
     1666+       STORE   t2, UNIT(-6)(dst)
     1667+       STORE   t3, UNIT(-5)(dst)
     1668+       STORE   t4, UNIT(-4)(dst)
     1669+       STORE   t7, UNIT(-3)(dst)
     1670+       STORE   t0, UNIT(-2)(dst)
     1671+       STORE   t1, UNIT(-1)(dst)
     1672+       PREF(   0, 8*32(src) )
     1673+       PREF(   1, 8*32(dst) )
     1674+       bne     len, rem, 1b
     1675+        nop
     1676+
     1677+       /*
     1678+        * len == rem == the number of bytes left to copy < 8*NBYTES
     1679+        */
     1680+cleanup_both_aligned:
     1681+       beqz    len, done
     1682+        sltu   t0, len, 4*NBYTES
     1683+       bnez    t0, less_than_4units
     1684+        and    rem, len, (NBYTES-1)    # rem = len % NBYTES
     1685+       /*
     1686+        * len >= 4*NBYTES
     1687+        */
     1688+EXC(   LOAD    t0, UNIT(0)(src),       l_exc)
     1689+EXC(   LOAD    t1, UNIT(1)(src),       l_exc_copy)
     1690+EXC(   LOAD    t2, UNIT(2)(src),       l_exc_copy)
     1691+EXC(   LOAD    t3, UNIT(3)(src),       l_exc_copy)
     1692+       SUB     len, len, 4*NBYTES
     1693+       ADD     src, src, 4*NBYTES
     1694+       STORE   t0, UNIT(0)(dst)
     1695+       STORE   t1, UNIT(1)(dst)
     1696+       STORE   t2, UNIT(2)(dst)
     1697+       STORE   t3, UNIT(3)(dst)
     1698+       beqz    len, done
     1699+        ADD    dst, dst, 4*NBYTES
     1700+less_than_4units:
     1701+       /*
     1702+        * rem = len % NBYTES
     1703+        */
     1704+       beq     rem, len, copy_bytes
     1705+        nop
     1706+1:
     1707+EXC(   LOAD    t0, 0(src),             l_exc)
     1708+       ADD     src, src, NBYTES
     1709+       SUB     len, len, NBYTES
     1710+       STORE   t0, 0(dst)
     1711+       bne     rem, len, 1b
     1712+        ADD    dst, dst, NBYTES
     1713+
     1714+       /*
     1715+        * src and dst are aligned, need to copy rem bytes (rem < NBYTES)
     1716+        * A loop would do only a byte at a time with possible branch
     1717+        * mispredicts.  Can't do an explicit LOAD dst,mask,or,STORE
     1718+        * because can't assume read-access to dst.  Instead, use
     1719+        * STREST dst, which doesn't require read access to dst.
     1720+        *
     1721+        * This code should perform better than a simple loop on modern,
     1722+        * wide-issue mips processors because the code has fewer branches and
     1723+        * more instruction-level parallelism.
     1724+        */
     1725+#define bits t2
     1726+       beqz    len, done
     1727+        ADD    t1, dst, len    # t1 is just past last byte of dst
     1728+       li      bits, 8*NBYTES
     1729+       SLL     rem, len, 3     # rem = number of bits to keep
     1730+EXC(   LOAD    t0, 0(src),             l_exc)
     1731+       SUB     bits, bits, rem # bits = number of bits to discard
     1732+       SHIFT_DISCARD t0, t0, bits
     1733+       STREST  t0, -1(t1)
     1734+       jr      ra
     1735+        move   len, zero
     1736+dst_unaligned:
     1737+       /*
     1738+        * dst is unaligned
     1739+        * t0 = src & ADDRMASK
     1740+        * t1 = dst & ADDRMASK; T1 > 0
     1741+        * len >= NBYTES
     1742+        *
     1743+        * Copy enough bytes to align dst
     1744+        * Set match = (src and dst have same alignment)
     1745+        */
     1746+#define match rem
     1747+EXC(   LDFIRST t3, FIRST(0)(src),      l_exc)
     1748+       ADD     t2, zero, NBYTES
     1749+EXC(   LDREST  t3, REST(0)(src),       l_exc_copy)
     1750+       SUB     t2, t2, t1      # t2 = number of bytes copied
     1751+       xor     match, t0, t1
     1752+       STFIRST t3, FIRST(0)(dst)
     1753+       beq     len, t2, done
     1754+        SUB    len, len, t2
     1755+       ADD     dst, dst, t2
     1756+       beqz    match, both_aligned
     1757+        ADD    src, src, t2
     1758+
     1759+src_unaligned_dst_aligned:
     1760+       SRL     t0, len, LOG_NBYTES+2    # +2 for 4 units/iter
     1761+       PREF(   0, 3*32(src) )
     1762+       beqz    t0, cleanup_src_unaligned
     1763+        and    rem, len, (4*NBYTES-1)   # rem = len % 4*NBYTES
     1764+       PREF(   1, 3*32(dst) )
     1765+1:
     1766+/*
     1767+ * Avoid consecutive LD*'s to the same register since some mips
     1768+ * implementations can't issue them in the same cycle.
     1769+ * It's OK to load FIRST(N+1) before REST(N) because the two addresses
     1770+ * are to the same unit (unless src is aligned, but it's not).
     1771+ */
     1772+EXC(   LDFIRST t0, FIRST(0)(src),      l_exc)
     1773+EXC(   LDFIRST t1, FIRST(1)(src),      l_exc_copy)
     1774+       SUB     len, len, 4*NBYTES
     1775+EXC(   LDREST  t0, REST(0)(src),       l_exc_copy)
     1776+EXC(   LDREST  t1, REST(1)(src),       l_exc_copy)
     1777+EXC(   LDFIRST t2, FIRST(2)(src),      l_exc_copy)
     1778+EXC(   LDFIRST t3, FIRST(3)(src),      l_exc_copy)
     1779+EXC(   LDREST  t2, REST(2)(src),       l_exc_copy)
     1780+EXC(   LDREST  t3, REST(3)(src),       l_exc_copy)
     1781+       PREF(   0, 9*32(src) )          # 0 is PREF_LOAD  (not streamed)
     1782+       ADD     src, src, 4*NBYTES
     1783+#ifdef CONFIG_CPU_SB1
     1784+       nop                             # improves slotting
     1785+#endif
     1786+       STORE   t0, UNIT(0)(dst)
     1787+       STORE   t1, UNIT(1)(dst)
     1788+       STORE   t2, UNIT(2)(dst)
     1789+       STORE   t3, UNIT(3)(dst)
     1790+       PREF(   1, 9*32(dst) )          # 1 is PREF_STORE (not streamed)
     1791+       bne     len, rem, 1b
     1792+        ADD    dst, dst, 4*NBYTES
     1793+
     1794+cleanup_src_unaligned:
     1795+       beqz    len, done
     1796+        and    rem, len, NBYTES-1  # rem = len % NBYTES
     1797+       beq     rem, len, copy_bytes
     1798+        nop
     1799+1:
     1800+EXC(   LDFIRST t0, FIRST(0)(src),      l_exc)
     1801+EXC(   LDREST  t0, REST(0)(src),       l_exc_copy)
     1802+       ADD     src, src, NBYTES
     1803+       SUB     len, len, NBYTES
     1804+       STORE   t0, 0(dst)
     1805+       bne     len, rem, 1b
     1806+        ADD    dst, dst, NBYTES
     1807+
     1808+copy_bytes_checklen:
     1809+       beqz    len, done
     1810+        nop
     1811+copy_bytes:
     1812+       /* 0 < len < NBYTES  */
     1813+#define COPY_BYTE(N)                   \
     1814+EXC(   lb      t0, N(src), l_exc);     \
     1815+       SUB     len, len, 1;            \
     1816+       beqz    len, done;              \
     1817+        sb     t0, N(dst)
     1818+
     1819+       COPY_BYTE(0)
     1820+       COPY_BYTE(1)
     1821+#ifdef USE_DOUBLE
     1822+       COPY_BYTE(2)
     1823+       COPY_BYTE(3)
     1824+       COPY_BYTE(4)
     1825+       COPY_BYTE(5)
     1826+#endif
     1827+EXC(   lb      t0, NBYTES-2(src), l_exc)
     1828+       SUB     len, len, 1
     1829+       jr      ra
     1830+        sb     t0, NBYTES-2(dst)
     1831+done:
     1832+       jr      ra
     1833+        nop
     1834+       END(__copy_user_inatomic)
     1835+
     1836+l_exc_copy:
     1837+       /*
     1838+        * Copy bytes from src until faulting load address (or until a
     1839+        * lb faults)
     1840+        *
     1841+        * When reached by a faulting LDFIRST/LDREST, THREAD_BUADDR($28)
     1842+        * may be more than a byte beyond the last address.
     1843+        * Hence, the lb below may get an exception.
     1844+        *
     1845+        * Assumes src < THREAD_BUADDR($28)
     1846+        */
     1847+       LOAD    t0, TI_TASK($28)
     1848+        nop
     1849+       LOAD    t0, THREAD_BUADDR(t0)
     1850+1:
     1851+EXC(   lb      t1, 0(src),     l_exc)
     1852+       ADD     src, src, 1
     1853+       sb      t1, 0(dst)      # can't fault -- we're copy_from_user
     1854+       bne     src, t0, 1b
     1855+        ADD    dst, dst, 1
     1856+l_exc:
     1857+       LOAD    t0, TI_TASK($28)
     1858+        nop
     1859+       LOAD    t0, THREAD_BUADDR(t0)   # t0 is just past last good address
     1860+        nop
     1861+       SUB     len, AT, t0             # len number of uncopied bytes
     1862+       jr      ra
     1863+        nop
     1864diff -Naur linux-2.6.20.1.orig/arch/mips/lib-32/dump_tlb.c linux-2.6.20.1/arch/mips/lib-32/dump_tlb.c
     1865--- linux-2.6.20.1.orig/arch/mips/lib-32/dump_tlb.c     2007-02-19 22:34:32.000000000 -0800
     1866+++ linux-2.6.20.1/arch/mips/lib-32/dump_tlb.c  2007-02-20 16:47:41.000000000 -0800
    4711867@@ -40,8 +40,6 @@
    4721868                return "256Mb";
     
    4781874 
    4791875 #define BARRIER()                                      \
    480 diff -Naur linux-2.6.20/arch/mips/lib-64/dump_tlb.c linux-mips-2.6.20/arch/mips/lib-64/dump_tlb.c
    481 --- linux-2.6.20/arch/mips/lib-64/dump_tlb.c    2007-02-04 10:44:54.000000000 -0800
    482 +++ linux-mips-2.6.20/arch/mips/lib-64/dump_tlb.c       2007-02-04 12:22:45.000000000 -0800
     1876diff -Naur linux-2.6.20.1.orig/arch/mips/lib-64/dump_tlb.c linux-2.6.20.1/arch/mips/lib-64/dump_tlb.c
     1877--- linux-2.6.20.1.orig/arch/mips/lib-64/dump_tlb.c     2007-02-19 22:34:32.000000000 -0800
     1878+++ linux-2.6.20.1/arch/mips/lib-64/dump_tlb.c  2007-02-20 16:47:41.000000000 -0800
    4831879@@ -31,8 +31,6 @@
    4841880        case PM_256M:   return "256Mb";
     
    4901886 
    4911887 #define BARRIER()                                      \
    492 diff -Naur linux-2.6.20/arch/mips/momentum/jaguar_atx/Makefile linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/Makefile
    493 --- linux-2.6.20/arch/mips/momentum/jaguar_atx/Makefile 2007-02-04 10:44:54.000000000 -0800
    494 +++ linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/Makefile    2007-02-04 12:22:45.000000000 -0800
     1888diff -Naur linux-2.6.20.1.orig/arch/mips/mm/c-sb1.c linux-2.6.20.1/arch/mips/mm/c-sb1.c
     1889--- linux-2.6.20.1.orig/arch/mips/mm/c-sb1.c    2007-02-19 22:34:32.000000000 -0800
     1890+++ linux-2.6.20.1/arch/mips/mm/c-sb1.c 2007-02-20 16:47:41.000000000 -0800
     1891@@ -259,6 +259,12 @@
     1892                on_each_cpu(sb1_flush_cache_data_page_ipi, (void *) addr, 1, 1);
     1893 }
     1894 #else
     1895+
     1896+static void local_sb1_flush_cache_data_page(unsigned long addr)
     1897+{
     1898+       __sb1_writeback_inv_dcache_range(addr, addr + PAGE_SIZE);
     1899+}
     1900+
     1901 void sb1_flush_cache_data_page(unsigned long)
     1902        __attribute__((alias("local_sb1_flush_cache_data_page")));
     1903 #endif
     1904diff -Naur linux-2.6.20.1.orig/arch/mips/mm/init.c linux-2.6.20.1/arch/mips/mm/init.c
     1905--- linux-2.6.20.1.orig/arch/mips/mm/init.c     2007-02-19 22:34:32.000000000 -0800
     1906+++ linux-2.6.20.1/arch/mips/mm/init.c  2007-02-20 16:47:41.000000000 -0800
     1907@@ -61,8 +61,6 @@
     1908 
     1909 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
     1910 
     1911-unsigned long highstart_pfn, highend_pfn;
     1912-
     1913 /*
     1914  * We have up to 8 empty zeroed pages so we can map one of the right colour
     1915  * when needed.  This is necessary only on R4000 / R4400 SC and MC versions
     1916@@ -261,6 +259,8 @@
     1917 
     1918 
     1919 #ifdef CONFIG_HIGHMEM
     1920+unsigned long highstart_pfn, highend_pfn;
     1921+
     1922 pte_t *kmap_pte;
     1923 pgprot_t kmap_prot;
     1924 
     1925diff -Naur linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/Makefile linux-2.6.20.1/arch/mips/momentum/jaguar_atx/Makefile
     1926--- linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/Makefile  2007-02-19 22:34:32.000000000 -0800
     1927+++ linux-2.6.20.1/arch/mips/momentum/jaguar_atx/Makefile       2007-02-20 16:47:41.000000000 -0800
    4951928@@ -6,7 +6,7 @@
    4961929 # unless it's something special (ie not a .c file).
     
    5021935 obj-$(CONFIG_SERIAL_8250_CONSOLE) += ja-console.o
    5031936 obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o
    504 diff -Naur linux-2.6.20/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h
    505 --- linux-2.6.20/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h        2007-02-04 10:44:54.000000000 -0800
    506 +++ linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h   2007-02-04 12:22:45.000000000 -0800
     1937diff -Naur linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h linux-2.6.20.1/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h
     1938--- linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h 2007-02-19 22:34:32.000000000 -0800
     1939+++ linux-2.6.20.1/arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h      2007-02-20 16:47:41.000000000 -0800
    5071940@@ -46,7 +46,9 @@
    5081941 
     
    5171950 
    5181951 #endif
    519 diff -Naur linux-2.6.20/arch/mips/momentum/jaguar_atx/platform.c linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/platform.c
    520 --- linux-2.6.20/arch/mips/momentum/jaguar_atx/platform.c       1969-12-31 16:00:00.000000000 -0800
    521 +++ linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/platform.c  2007-02-04 12:22:45.000000000 -0800
     1952diff -Naur linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/platform.c linux-2.6.20.1/arch/mips/momentum/jaguar_atx/platform.c
     1953--- linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/platform.c        1969-12-31 16:00:00.000000000 -0800
     1954+++ linux-2.6.20.1/arch/mips/momentum/jaguar_atx/platform.c     2007-02-20 16:47:41.000000000 -0800
    5221955@@ -0,0 +1,235 @@
    5231956+#include <linux/delay.h>
     
    6522085+static struct platform_device eth2_device = {
    6532086+       .name           = MV643XX_ETH_NAME,
    654 +       .id             = 1,
     2087+       .id             = 2,
    6552088+       .num_resources  = ARRAY_SIZE(mv64x60_eth2_resources),
    6562089+       .resource       = mv64x60_eth2_resources,
     
    7562189+
    7572190+#endif /* defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE) */
    758 diff -Naur linux-2.6.20/arch/mips/momentum/jaguar_atx/prom.c linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/prom.c
    759 --- linux-2.6.20/arch/mips/momentum/jaguar_atx/prom.c   2007-02-04 10:44:54.000000000 -0800
    760 +++ linux-mips-2.6.20/arch/mips/momentum/jaguar_atx/prom.c      2007-02-04 12:22:45.000000000 -0800
     2191diff -Naur linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/prom.c linux-2.6.20.1/arch/mips/momentum/jaguar_atx/prom.c
     2192--- linux-2.6.20.1.orig/arch/mips/momentum/jaguar_atx/prom.c    2007-02-19 22:34:32.000000000 -0800
     2193+++ linux-2.6.20.1/arch/mips/momentum/jaguar_atx/prom.c 2007-02-20 16:47:41.000000000 -0800
    7612194@@ -39,56 +39,6 @@
    7622195        return "Momentum Jaguar-ATX";
     
    8282261 
    8292262 unsigned long __init prom_free_prom_memory(void)
    830 diff -Naur linux-2.6.20/arch/mips/oprofile/Kconfig linux-mips-2.6.20/arch/mips/oprofile/Kconfig
    831 --- linux-2.6.20/arch/mips/oprofile/Kconfig     2007-02-04 10:44:54.000000000 -0800
    832 +++ linux-mips-2.6.20/arch/mips/oprofile/Kconfig        2007-02-04 12:22:45.000000000 -0800
     2263diff -Naur linux-2.6.20.1.orig/arch/mips/momentum/ocelot_3/platform.c linux-2.6.20.1/arch/mips/momentum/ocelot_3/platform.c
     2264--- linux-2.6.20.1.orig/arch/mips/momentum/ocelot_3/platform.c  2007-02-19 22:34:32.000000000 -0800
     2265+++ linux-2.6.20.1/arch/mips/momentum/ocelot_3/platform.c       2007-02-20 16:47:41.000000000 -0800
     2266@@ -129,7 +129,7 @@
     2267 
     2268 static struct platform_device eth2_device = {
     2269        .name           = MV643XX_ETH_NAME,
     2270-       .id             = 1,
     2271+       .id             = 2,
     2272        .num_resources  = ARRAY_SIZE(mv64x60_eth2_resources),
     2273        .resource       = mv64x60_eth2_resources,
     2274        .dev = {
     2275diff -Naur linux-2.6.20.1.orig/arch/mips/oprofile/Kconfig linux-2.6.20.1/arch/mips/oprofile/Kconfig
     2276--- linux-2.6.20.1.orig/arch/mips/oprofile/Kconfig      2007-02-19 22:34:32.000000000 -0800
     2277+++ linux-2.6.20.1/arch/mips/oprofile/Kconfig   2007-02-20 16:47:41.000000000 -0800
    8332278@@ -11,7 +11,7 @@
    8342279 
     
    8362281        tristate "OProfile system profiling (EXPERIMENTAL)"
    8372282-       depends on PROFILING && EXPERIMENTAL
    838 +       depends on PROFILING && !!MIPS_MT_SMTC && EXPERIMENTAL
     2283+       depends on PROFILING && !MIPS_MT_SMTC && EXPERIMENTAL
    8392284        help
    8402285          OProfile is a profiling system capable of profiling the
    8412286          whole system, include the kernel, kernel modules, libraries,
    842 diff -Naur linux-2.6.20/arch/mips/pci/fixup-tb0219.c linux-mips-2.6.20/arch/mips/pci/fixup-tb0219.c
    843 --- linux-2.6.20/arch/mips/pci/fixup-tb0219.c   2007-02-04 10:44:54.000000000 -0800
    844 +++ linux-mips-2.6.20/arch/mips/pci/fixup-tb0219.c      2007-02-04 12:22:45.000000000 -0800
     2287diff -Naur linux-2.6.20.1.orig/arch/mips/pci/fixup-tb0219.c linux-2.6.20.1/arch/mips/pci/fixup-tb0219.c
     2288--- linux-2.6.20.1.orig/arch/mips/pci/fixup-tb0219.c    2007-02-19 22:34:32.000000000 -0800
     2289+++ linux-2.6.20.1/arch/mips/pci/fixup-tb0219.c 2007-02-20 16:47:41.000000000 -0800
    8452290@@ -2,7 +2,7 @@
    8462291  *  fixup-tb0219.c, The TANBAC TB0219 specific PCI fixups.
     
    8522297  *  This program is free software; you can redistribute it and/or modify
    8532298  *  it under the terms of the GNU General Public License as published by
    854 diff -Naur linux-2.6.20/arch/mips/pci/pci.c linux-mips-2.6.20/arch/mips/pci/pci.c
    855 --- linux-2.6.20/arch/mips/pci/pci.c    2007-02-04 10:44:54.000000000 -0800
    856 +++ linux-mips-2.6.20/arch/mips/pci/pci.c       2007-02-04 12:22:45.000000000 -0800
    857 @@ -103,10 +103,15 @@
     2299diff -Naur linux-2.6.20.1.orig/arch/mips/pci/pci.c linux-2.6.20.1/arch/mips/pci/pci.c
     2300--- linux-2.6.20.1.orig/arch/mips/pci/pci.c     2007-02-19 22:34:32.000000000 -0800
     2301+++ linux-2.6.20.1/arch/mips/pci/pci.c  2007-02-20 16:47:41.000000000 -0800
     2302@@ -79,6 +79,14 @@
     2303 {
     2304        *hose_tail = hose;
     2305        hose_tail = &hose->next;
     2306+
     2307+       /*
     2308+        * Do not panic here but later - this might hapen before console init.
     2309+        */
     2310+       if (!hose->io_map_base) {
     2311+               printk(KERN_WARNING
     2312+                      "registering PCI controller with io_map_base unset\n");
     2313+       }
     2314 }
     2315 
     2316 /* Most MIPS systems have straight-forward swizzling needs.  */
     2317@@ -103,10 +111,15 @@
    8582318        return PCI_SLOT(dev->devfn);
    8592319 }
     
    8712331        int need_domain_info = 0;
    8722332 
    873 @@ -150,6 +155,13 @@
     2333@@ -150,6 +163,13 @@
    8742334                pci_assign_unassigned_resources();
    8752335        pci_fixup_irqs(common_swizzle, pcibios_map_irq);
     
    8852345 }
    8862346 
    887 diff -Naur linux-2.6.20/arch/mips/pmc-sierra/yosemite/setup.c linux-mips-2.6.20/arch/mips/pmc-sierra/yosemite/setup.c
    888 --- linux-2.6.20/arch/mips/pmc-sierra/yosemite/setup.c  2007-02-04 10:44:54.000000000 -0800
    889 +++ linux-mips-2.6.20/arch/mips/pmc-sierra/yosemite/setup.c     2007-02-04 12:22:45.000000000 -0800
     2347diff -Naur linux-2.6.20.1.orig/arch/mips/pmc-sierra/yosemite/dbg_io.c linux-2.6.20.1/arch/mips/pmc-sierra/yosemite/dbg_io.c
     2348--- linux-2.6.20.1.orig/arch/mips/pmc-sierra/yosemite/dbg_io.c  2007-02-19 22:34:32.000000000 -0800
     2349+++ linux-2.6.20.1/arch/mips/pmc-sierra/yosemite/dbg_io.c       2007-02-20 16:47:41.000000000 -0800
     2350@@ -93,7 +93,7 @@
     2351  * Functions to READ and WRITE to serial port 1
     2352  */
     2353 #define        SERIAL_READ_1(ofs)              (*((volatile unsigned char*)    \
     2354-                                       (TITAN_SERIAL_BASE_1 + ofs)
     2355+                                       (TITAN_SERIAL_BASE_1 + ofs)))
     2356 
     2357 #define        SERIAL_WRITE_1(ofs, val)        ((*((volatile unsigned char*)   \
     2358                                        (TITAN_SERIAL_BASE_1 + ofs))) = val)
     2359diff -Naur linux-2.6.20.1.orig/arch/mips/pmc-sierra/yosemite/setup.c linux-2.6.20.1/arch/mips/pmc-sierra/yosemite/setup.c
     2360--- linux-2.6.20.1.orig/arch/mips/pmc-sierra/yosemite/setup.c   2007-02-19 22:34:32.000000000 -0800
     2361+++ linux-2.6.20.1/arch/mips/pmc-sierra/yosemite/setup.c        2007-02-20 16:47:41.000000000 -0800
    8902362@@ -171,6 +171,7 @@
    8912363 
     
    9042376 
    9052377 static void __init py_rtc_setup(void)
    906 diff -Naur linux-2.6.20/arch/mips/qemu/Makefile linux-mips-2.6.20/arch/mips/qemu/Makefile
    907 --- linux-2.6.20/arch/mips/qemu/Makefile        2007-02-04 10:44:54.000000000 -0800
    908 +++ linux-mips-2.6.20/arch/mips/qemu/Makefile   2007-02-04 12:22:45.000000000 -0800
     2378diff -Naur linux-2.6.20.1.orig/arch/mips/qemu/Makefile linux-2.6.20.1/arch/mips/qemu/Makefile
     2379--- linux-2.6.20.1.orig/arch/mips/qemu/Makefile 2007-02-19 22:34:32.000000000 -0800
     2380+++ linux-2.6.20.1/arch/mips/qemu/Makefile      2007-02-20 16:47:41.000000000 -0800
    9092381@@ -4,4 +4,5 @@
    9102382 
     
    9132385+obj-$(CONFIG_VT) += q-vga.o
    9142386 obj-$(CONFIG_SMP) += q-smp.o
    915 diff -Naur linux-2.6.20/arch/mips/qemu/q-setup.c linux-mips-2.6.20/arch/mips/qemu/q-setup.c
    916 --- linux-2.6.20/arch/mips/qemu/q-setup.c       2007-02-04 10:44:54.000000000 -0800
    917 +++ linux-mips-2.6.20/arch/mips/qemu/q-setup.c  2007-02-04 12:22:45.000000000 -0800
     2387diff -Naur linux-2.6.20.1.orig/arch/mips/qemu/q-setup.c linux-2.6.20.1/arch/mips/qemu/q-setup.c
     2388--- linux-2.6.20.1.orig/arch/mips/qemu/q-setup.c        2007-02-19 22:34:32.000000000 -0800
     2389+++ linux-2.6.20.1/arch/mips/qemu/q-setup.c     2007-02-20 16:47:41.000000000 -0800
    9182390@@ -2,6 +2,7 @@
    9192391 #include <asm/io.h>
     
    9342406        qemu_reboot_setup();
    9352407 }
    936 diff -Naur linux-2.6.20/arch/mips/qemu/q-vga.c linux-mips-2.6.20/arch/mips/qemu/q-vga.c
    937 --- linux-2.6.20/arch/mips/qemu/q-vga.c 1969-12-31 16:00:00.000000000 -0800
    938 +++ linux-mips-2.6.20/arch/mips/qemu/q-vga.c    2007-02-04 12:22:45.000000000 -0800
     2408diff -Naur linux-2.6.20.1.orig/arch/mips/qemu/q-vga.c linux-2.6.20.1/arch/mips/qemu/q-vga.c
     2409--- linux-2.6.20.1.orig/arch/mips/qemu/q-vga.c  1969-12-31 16:00:00.000000000 -0800
     2410+++ linux-2.6.20.1/arch/mips/qemu/q-vga.c       2007-02-20 16:47:41.000000000 -0800
    9392411@@ -0,0 +1,189 @@
    9402412+/*
     
    11272599+#endif
    11282600+}
    1129 diff -Naur linux-2.6.20/drivers/char/Kconfig linux-mips-2.6.20/drivers/char/Kconfig
    1130 --- linux-2.6.20/drivers/char/Kconfig   2007-02-04 10:44:54.000000000 -0800
    1131 +++ linux-mips-2.6.20/drivers/char/Kconfig      2007-02-04 12:22:45.000000000 -0800
     2601diff -Naur linux-2.6.20.1.orig/arch/mips/sgi-ip27/ip27-timer.c linux-2.6.20.1/arch/mips/sgi-ip27/ip27-timer.c
     2602--- linux-2.6.20.1.orig/arch/mips/sgi-ip27/ip27-timer.c 2007-02-19 22:34:32.000000000 -0800
     2603+++ linux-2.6.20.1/arch/mips/sgi-ip27/ip27-timer.c      2007-02-20 16:47:41.000000000 -0800
     2604@@ -190,7 +190,7 @@
     2605 };
     2606 
     2607 static struct irqaction rt_irqaction = {
     2608-       .handler        = ip27_rt_timer_interrupt,
     2609+       .handler        = (irq_handler_t) ip27_rt_timer_interrupt,
     2610        .flags          = IRQF_DISABLED,
     2611        .mask           = CPU_MASK_NONE,
     2612        .name           = "timer"
     2613diff -Naur linux-2.6.20.1.orig/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c linux-2.6.20.1/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
     2614--- linux-2.6.20.1.orig/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c      2007-02-19 22:34:32.000000000 -0800
     2615+++ linux-2.6.20.1/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c   2007-02-20 16:47:41.000000000 -0800
     2616@@ -137,6 +137,8 @@
     2617 extern void gt64120_time_init(void);
     2618 extern void toshiba_rbtx4927_irq_setup(void);
     2619 
     2620+char *prom_getcmdline(void);
     2621+
     2622 #ifdef CONFIG_PCI
     2623 #define CONFIG_TX4927BUG_WORKAROUND
     2624 #undef TX4927_SUPPORT_COMMAND_IO
     2625diff -Naur linux-2.6.20.1.orig/drivers/char/Kconfig linux-2.6.20.1/drivers/char/Kconfig
     2626--- linux-2.6.20.1.orig/drivers/char/Kconfig    2007-02-19 22:34:32.000000000 -0800
     2627+++ linux-2.6.20.1/drivers/char/Kconfig 2007-02-20 16:47:41.000000000 -0800
    11322628@@ -372,19 +372,56 @@
    11332629          To compile this driver as a module, choose M here: the
     
    11992695 config A2232
    12002696        tristate "Commodore A2232 serial support (EXPERIMENTAL)"
    1201 diff -Naur linux-2.6.20/drivers/char/Makefile linux-mips-2.6.20/drivers/char/Makefile
    1202 --- linux-2.6.20/drivers/char/Makefile  2007-02-04 10:44:54.000000000 -0800
    1203 +++ linux-mips-2.6.20/drivers/char/Makefile     2007-02-04 12:22:45.000000000 -0800
     2697diff -Naur linux-2.6.20.1.orig/drivers/char/Makefile linux-2.6.20.1/drivers/char/Makefile
     2698--- linux-2.6.20.1.orig/drivers/char/Makefile   2007-02-19 22:34:32.000000000 -0800
     2699+++ linux-2.6.20.1/drivers/char/Makefile        2007-02-20 16:47:41.000000000 -0800
    12042700@@ -32,6 +32,7 @@
    12052701 obj-$(CONFIG_ATARI_DSP56K)     += dsp56k.o
     
    12262722 obj-$(CONFIG_NWBUTTON)         += nwbutton.o
    12272723 obj-$(CONFIG_NWFLASH)          += nwflash.o
    1228 diff -Naur linux-2.6.20/drivers/char/au1000_gpio.c linux-mips-2.6.20/drivers/char/au1000_gpio.c
    1229 --- linux-2.6.20/drivers/char/au1000_gpio.c     1969-12-31 16:00:00.000000000 -0800
    1230 +++ linux-mips-2.6.20/drivers/char/au1000_gpio.c        2007-02-04 12:22:45.000000000 -0800
     2724diff -Naur linux-2.6.20.1.orig/drivers/char/au1000_gpio.c linux-2.6.20.1/drivers/char/au1000_gpio.c
     2725--- linux-2.6.20.1.orig/drivers/char/au1000_gpio.c      1969-12-31 16:00:00.000000000 -0800
     2726+++ linux-2.6.20.1/drivers/char/au1000_gpio.c   2007-02-20 16:47:41.000000000 -0800
    12312727@@ -0,0 +1,262 @@
    12322728+/*
     
    14922988+module_init(au1000gpio_init);
    14932989+module_exit(au1000gpio_exit);
    1494 diff -Naur linux-2.6.20/drivers/char/au1000_ts.c linux-mips-2.6.20/drivers/char/au1000_ts.c
    1495 --- linux-2.6.20/drivers/char/au1000_ts.c       1969-12-31 16:00:00.000000000 -0800
    1496 +++ linux-mips-2.6.20/drivers/char/au1000_ts.c  2007-02-04 12:22:45.000000000 -0800
     2990diff -Naur linux-2.6.20.1.orig/drivers/char/au1000_ts.c linux-2.6.20.1/drivers/char/au1000_ts.c
     2991--- linux-2.6.20.1.orig/drivers/char/au1000_ts.c        1969-12-31 16:00:00.000000000 -0800
     2992+++ linux-2.6.20.1/drivers/char/au1000_ts.c     2007-02-20 16:47:41.000000000 -0800
    14972993@@ -0,0 +1,677 @@
    14982994+/*
     
    21733669+module_init(au1000ts_init_module);
    21743670+module_exit(au1000ts_cleanup_module);
    2175 diff -Naur linux-2.6.20/drivers/char/sb1250_duart.c linux-mips-2.6.20/drivers/char/sb1250_duart.c
    2176 --- linux-2.6.20/drivers/char/sb1250_duart.c    1969-12-31 16:00:00.000000000 -0800
    2177 +++ linux-mips-2.6.20/drivers/char/sb1250_duart.c       2007-02-04 12:22:45.000000000 -0800
     3671diff -Naur linux-2.6.20.1.orig/drivers/char/sb1250_duart.c linux-2.6.20.1/drivers/char/sb1250_duart.c
     3672--- linux-2.6.20.1.orig/drivers/char/sb1250_duart.c     1969-12-31 16:00:00.000000000 -0800
     3673+++ linux-2.6.20.1/drivers/char/sb1250_duart.c  2007-02-20 16:47:41.000000000 -0800
    21783674@@ -0,0 +1,909 @@
    21793675+/*
     
    30864582+
    30874583+#endif /* CONFIG_SIBYTE_SB1250_DUART_CONSOLE */
    3088 diff -Naur linux-2.6.20/drivers/ide/mips/Makefile linux-mips-2.6.20/drivers/ide/mips/Makefile
    3089 --- linux-2.6.20/drivers/ide/mips/Makefile      2007-02-04 10:44:54.000000000 -0800
    3090 +++ linux-mips-2.6.20/drivers/ide/mips/Makefile 2007-02-04 12:22:45.000000000 -0800
     4584diff -Naur linux-2.6.20.1.orig/drivers/ide/mips/Makefile linux-2.6.20.1/drivers/ide/mips/Makefile
     4585--- linux-2.6.20.1.orig/drivers/ide/mips/Makefile       2007-02-19 22:34:32.000000000 -0800
     4586+++ linux-2.6.20.1/drivers/ide/mips/Makefile    2007-02-20 16:47:41.000000000 -0800
    30914587@@ -1,4 +1,4 @@
    30924588 obj-$(CONFIG_BLK_DEV_IDE_SWARM)                += swarm.o
     
    30954591-EXTRA_CFLAGS    := -Idrivers/ide
    30964592+CFLAGS_au1xxx-ide.o := -Idrivers/ide
    3097 diff -Naur linux-2.6.20/drivers/mtd/devices/docprobe.c linux-mips-2.6.20/drivers/mtd/devices/docprobe.c
    3098 --- linux-2.6.20/drivers/mtd/devices/docprobe.c 2007-02-04 10:44:54.000000000 -0800
    3099 +++ linux-mips-2.6.20/drivers/mtd/devices/docprobe.c    2007-02-04 12:22:45.000000000 -0800
     4593diff -Naur linux-2.6.20.1.orig/drivers/mtd/devices/docprobe.c linux-2.6.20.1/drivers/mtd/devices/docprobe.c
     4594--- linux-2.6.20.1.orig/drivers/mtd/devices/docprobe.c  2007-02-19 22:34:32.000000000 -0800
     4595+++ linux-2.6.20.1/drivers/mtd/devices/docprobe.c       2007-02-20 16:47:41.000000000 -0800
    31004596@@ -83,10 +83,10 @@
    31014597        0xe4000000,
     
    31124608 #endif
    31134609        0xffffffff };
    3114 diff -Naur linux-2.6.20/drivers/mtd/maps/lasat.c linux-mips-2.6.20/drivers/mtd/maps/lasat.c
    3115 --- linux-2.6.20/drivers/mtd/maps/lasat.c       2007-02-04 10:44:54.000000000 -0800
    3116 +++ linux-mips-2.6.20/drivers/mtd/maps/lasat.c  2007-02-04 12:22:45.000000000 -0800
     4610diff -Naur linux-2.6.20.1.orig/drivers/mtd/maps/lasat.c linux-2.6.20.1/drivers/mtd/maps/lasat.c
     4611--- linux-2.6.20.1.orig/drivers/mtd/maps/lasat.c        2007-02-19 22:34:32.000000000 -0800
     4612+++ linux-2.6.20.1/drivers/mtd/maps/lasat.c     2007-02-20 16:47:41.000000000 -0800
    31174613@@ -7,7 +7,7 @@
    31184614  * modify it under the terms of the GNU General Public License version
     
    31334629        lasat_map.size = lasat_board_info.li_flash_size;
    31344630 
    3135 diff -Naur linux-2.6.20/drivers/net/Kconfig linux-mips-2.6.20/drivers/net/Kconfig
    3136 --- linux-2.6.20/drivers/net/Kconfig    2007-02-04 10:44:54.000000000 -0800
    3137 +++ linux-mips-2.6.20/drivers/net/Kconfig       2007-02-04 12:22:45.000000000 -0800
     4631diff -Naur linux-2.6.20.1.orig/drivers/net/Kconfig linux-2.6.20.1/drivers/net/Kconfig
     4632--- linux-2.6.20.1.orig/drivers/net/Kconfig     2007-02-19 22:34:32.000000000 -0800
     4633+++ linux-2.6.20.1/drivers/net/Kconfig  2007-02-20 16:47:41.000000000 -0800
    31384634@@ -452,6 +452,14 @@
    31394635          This is the driver for the onboard card of MIPS Magnum 4000,
     
    31624658        bool "SGI IOC3 Ethernet"
    31634659        depends on NET_ETHERNET && PCI && SGI_IP27
    3164 @@ -475,25 +479,13 @@
     4660@@ -475,29 +479,9 @@
    31654661          the Ethernet-HOWTO, available from
    31664662          <http://www.tldp.org/docs.html#howto>.
     
    31804676-       depends on SGI_IOC3_ETH && INET
    31814677-       default y
    3182 +config MIPS_SIM_NET
    3183 +       tristate "MIPS simulator Network device (EXPERIMENTAL)"
    3184 +       depends on NETDEVICES && MIPS_SIM && EXPERIMENTAL
    3185         help
     4678-       help
    31864679-         The SGI IOC3 network adapter supports TCP and UDP checksums in
    31874680-         hardware to offload processing of these checksums from the CPU.  At
    31884681-         the moment only acceleration of IPv4 is supported.  This option
    31894682-         enables offloading for checksums on transmit.  If unsure, say Y.
    3190 +         The MIPSNET device is a simple Ethernet network device which is
    3191 +         emulated by the MIPS Simulator.
    3192 +         If you are not using a MIPSsim or are unsure, say N.
    3193  
     4683-
    31944684 config MIPS_SIM_NET
    31954685        tristate "MIPS simulator Network device (EXPERIMENTAL)"
    3196 @@ -2076,6 +2068,10 @@
     4686-       depends on MIPS_SIM && EXPERIMENTAL
     4687+       depends on NET_ETHERNET && MIPS_SIM && EXPERIMENTAL
     4688        help
     4689          The MIPSNET device is a simple Ethernet network device which is
     4690          emulated by the MIPS Simulator.
     4691@@ -2076,6 +2060,10 @@
    31974692 
    31984693          If in doubt, say N.
     
    32054700        bool "VLAN support"
    32064701        depends on R8169 && VLAN_8021Q
    3207 @@ -2315,8 +2311,8 @@
     4702@@ -2315,8 +2303,8 @@
    32084703        select MII
    32094704        help
     
    32164711 config MV643XX_ETH_0
    32174712        bool "MV-643XX Port 0"
    3218 @@ -2339,6 +2335,20 @@
     4713@@ -2339,6 +2327,20 @@
    32194714          This enables support for Port 2 of the Marvell MV643XX Gigabit
    32204715          Ethernet.
     
    32374732        tristate "QLogic QLA3XXX Network Driver Support"
    32384733        depends on PCI
    3239 diff -Naur linux-2.6.20/drivers/net/Makefile linux-mips-2.6.20/drivers/net/Makefile
    3240 --- linux-2.6.20/drivers/net/Makefile   2007-02-04 10:44:54.000000000 -0800
    3241 +++ linux-mips-2.6.20/drivers/net/Makefile      2007-02-04 12:22:45.000000000 -0800
     4734diff -Naur linux-2.6.20.1.orig/drivers/net/Makefile linux-2.6.20.1/drivers/net/Makefile
     4735--- linux-2.6.20.1.orig/drivers/net/Makefile    2007-02-19 22:34:32.000000000 -0800
     4736+++ linux-2.6.20.1/drivers/net/Makefile 2007-02-20 16:47:41.000000000 -0800
    32424737@@ -112,6 +112,10 @@
    32434738 obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o
     
    32514746 obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
    32524747 obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
    3253 diff -Naur linux-2.6.20/drivers/net/big_sur_ge.c linux-mips-2.6.20/drivers/net/big_sur_ge.c
    3254 --- linux-2.6.20/drivers/net/big_sur_ge.c       1969-12-31 16:00:00.000000000 -0800
    3255 +++ linux-mips-2.6.20/drivers/net/big_sur_ge.c  2007-02-04 12:22:45.000000000 -0800
     4748diff -Naur linux-2.6.20.1.orig/drivers/net/big_sur_ge.c linux-2.6.20.1/drivers/net/big_sur_ge.c
     4749--- linux-2.6.20.1.orig/drivers/net/big_sur_ge.c        1969-12-31 16:00:00.000000000 -0800
     4750+++ linux-2.6.20.1/drivers/net/big_sur_ge.c     2007-02-20 16:47:41.000000000 -0800
    32564751@@ -0,0 +1,2004 @@
    32574752+/*
     
    52596754+MODULE_DESCRIPTION("PMC-Sierra Big Sur Ethernet MAC Driver");
    52606755+MODULE_LICENSE("GPL");
    5261 diff -Naur linux-2.6.20/drivers/net/big_sur_ge.h linux-mips-2.6.20/drivers/net/big_sur_ge.h
    5262 --- linux-2.6.20/drivers/net/big_sur_ge.h       1969-12-31 16:00:00.000000000 -0800
    5263 +++ linux-mips-2.6.20/drivers/net/big_sur_ge.h  2007-02-04 12:22:45.000000000 -0800
     6756diff -Naur linux-2.6.20.1.orig/drivers/net/big_sur_ge.h linux-2.6.20.1/drivers/net/big_sur_ge.h
     6757--- linux-2.6.20.1.orig/drivers/net/big_sur_ge.h        1969-12-31 16:00:00.000000000 -0800
     6758+++ linux-2.6.20.1/drivers/net/big_sur_ge.h     2007-02-20 16:47:41.000000000 -0800
    52646759@@ -0,0 +1,713 @@
    52656760+/*
     
    59767471+
    59777472+#endif
    5978 diff -Naur linux-2.6.20/drivers/net/gt64240eth.c linux-mips-2.6.20/drivers/net/gt64240eth.c
    5979 --- linux-2.6.20/drivers/net/gt64240eth.c       1969-12-31 16:00:00.000000000 -0800
    5980 +++ linux-mips-2.6.20/drivers/net/gt64240eth.c  2007-02-04 12:22:45.000000000 -0800
     7473diff -Naur linux-2.6.20.1.orig/drivers/net/gt64240eth.c linux-2.6.20.1/drivers/net/gt64240eth.c
     7474--- linux-2.6.20.1.orig/drivers/net/gt64240eth.c        1969-12-31 16:00:00.000000000 -0800
     7475+++ linux-2.6.20.1/drivers/net/gt64240eth.c     2007-02-20 16:47:41.000000000 -0800
    59817476@@ -0,0 +1,1671 @@
    59827477+/*
     
    76519146+       return &gp->stats;
    76529147+}
    7653 diff -Naur linux-2.6.20/drivers/net/gt64240eth.h linux-mips-2.6.20/drivers/net/gt64240eth.h
    7654 --- linux-2.6.20/drivers/net/gt64240eth.h       1969-12-31 16:00:00.000000000 -0800
    7655 +++ linux-mips-2.6.20/drivers/net/gt64240eth.h  2007-02-04 12:22:45.000000000 -0800
     9148diff -Naur linux-2.6.20.1.orig/drivers/net/gt64240eth.h linux-2.6.20.1/drivers/net/gt64240eth.h
     9149--- linux-2.6.20.1.orig/drivers/net/gt64240eth.h        1969-12-31 16:00:00.000000000 -0800
     9150+++ linux-2.6.20.1/drivers/net/gt64240eth.h     2007-02-20 16:47:41.000000000 -0800
    76569151@@ -0,0 +1,403 @@
    76579152+/*
     
    80589553+
    80599554+#endif /* _GT64240ETH_H */
    8060 diff -Naur linux-2.6.20/drivers/net/ioc3-eth.c linux-mips-2.6.20/drivers/net/ioc3-eth.c
    8061 --- linux-2.6.20/drivers/net/ioc3-eth.c 2007-02-04 10:44:54.000000000 -0800
    8062 +++ linux-mips-2.6.20/drivers/net/ioc3-eth.c    2007-02-04 12:22:45.000000000 -0800
     9555diff -Naur linux-2.6.20.1.orig/drivers/net/ioc3-eth.c linux-2.6.20.1/drivers/net/ioc3-eth.c
     9556--- linux-2.6.20.1.orig/drivers/net/ioc3-eth.c  2007-02-19 22:34:32.000000000 -0800
     9557+++ linux-2.6.20.1/drivers/net/ioc3-eth.c       2007-02-20 16:47:41.000000000 -0800
    80639558@@ -5,7 +5,7 @@
    80649559  *
     
    81879682 
    81889683 static int ioc3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
    8189 diff -Naur linux-2.6.20/drivers/net/titan_ge.c linux-mips-2.6.20/drivers/net/titan_ge.c
    8190 --- linux-2.6.20/drivers/net/titan_ge.c 1969-12-31 16:00:00.000000000 -0800
    8191 +++ linux-mips-2.6.20/drivers/net/titan_ge.c    2007-02-04 12:22:45.000000000 -0800
     9684diff -Naur linux-2.6.20.1.orig/drivers/net/titan_ge.c linux-2.6.20.1/drivers/net/titan_ge.c
     9685--- linux-2.6.20.1.orig/drivers/net/titan_ge.c  1969-12-31 16:00:00.000000000 -0800
     9686+++ linux-2.6.20.1/drivers/net/titan_ge.c       2007-02-20 16:47:41.000000000 -0800
    81929687@@ -0,0 +1,2069 @@
    81939688+/*
     
    1026011755+module_init(titan_ge_init_module);
    1026111756+module_exit(titan_ge_cleanup_module);
    10262 diff -Naur linux-2.6.20/drivers/net/titan_ge.h linux-mips-2.6.20/drivers/net/titan_ge.h
    10263 --- linux-2.6.20/drivers/net/titan_ge.h 1969-12-31 16:00:00.000000000 -0800
    10264 +++ linux-mips-2.6.20/drivers/net/titan_ge.h    2007-02-04 12:22:45.000000000 -0800
     11757diff -Naur linux-2.6.20.1.orig/drivers/net/titan_ge.h linux-2.6.20.1/drivers/net/titan_ge.h
     11758--- linux-2.6.20.1.orig/drivers/net/titan_ge.h  1969-12-31 16:00:00.000000000 -0800
     11759+++ linux-2.6.20.1/drivers/net/titan_ge.h       2007-02-20 16:47:41.000000000 -0800
    1026511760@@ -0,0 +1,415 @@
    1026611761+#ifndef _TITAN_GE_H_
     
    1067912174+#endif                                 /* _TITAN_GE_H_ */
    1068012175+
    10681 diff -Naur linux-2.6.20/drivers/net/titan_mdio.c linux-mips-2.6.20/drivers/net/titan_mdio.c
    10682 --- linux-2.6.20/drivers/net/titan_mdio.c       1969-12-31 16:00:00.000000000 -0800
    10683 +++ linux-mips-2.6.20/drivers/net/titan_mdio.c  2007-02-04 12:22:45.000000000 -0800
     12176diff -Naur linux-2.6.20.1.orig/drivers/net/titan_mdio.c linux-2.6.20.1/drivers/net/titan_mdio.c
     12177--- linux-2.6.20.1.orig/drivers/net/titan_mdio.c        1969-12-31 16:00:00.000000000 -0800
     12178+++ linux-2.6.20.1/drivers/net/titan_mdio.c     2007-02-20 16:47:41.000000000 -0800
    1068412179@@ -0,0 +1,217 @@
    1068512180+/*
     
    1090012395+}
    1090112396+
    10902 diff -Naur linux-2.6.20/drivers/net/titan_mdio.h linux-mips-2.6.20/drivers/net/titan_mdio.h
    10903 --- linux-2.6.20/drivers/net/titan_mdio.h       1969-12-31 16:00:00.000000000 -0800
    10904 +++ linux-mips-2.6.20/drivers/net/titan_mdio.h  2007-02-04 12:22:45.000000000 -0800
     12397diff -Naur linux-2.6.20.1.orig/drivers/net/titan_mdio.h linux-2.6.20.1/drivers/net/titan_mdio.h
     12398--- linux-2.6.20.1.orig/drivers/net/titan_mdio.h        1969-12-31 16:00:00.000000000 -0800
     12399+++ linux-2.6.20.1/drivers/net/titan_mdio.h     2007-02-20 16:47:41.000000000 -0800
    1090512400@@ -0,0 +1,56 @@
    1090612401+/*
     
    1096012455+
    1096112456+#endif /* _TITAN_MDIO_H */
    10962 diff -Naur linux-2.6.20/drivers/scsi/NCR53C9x.h linux-mips-2.6.20/drivers/scsi/NCR53C9x.h
    10963 --- linux-2.6.20/drivers/scsi/NCR53C9x.h        2007-02-04 10:44:54.000000000 -0800
    10964 +++ linux-mips-2.6.20/drivers/scsi/NCR53C9x.h   2007-02-04 12:22:45.000000000 -0800
     12457diff -Naur linux-2.6.20.1.orig/drivers/scsi/NCR53C9x.h linux-2.6.20.1/drivers/scsi/NCR53C9x.h
     12458--- linux-2.6.20.1.orig/drivers/scsi/NCR53C9x.h 2007-02-19 22:34:32.000000000 -0800
     12459+++ linux-2.6.20.1/drivers/scsi/NCR53C9x.h      2007-02-20 16:47:41.000000000 -0800
    1096512460@@ -144,12 +144,7 @@
    1096612461 
     
    1097712472 
    1097812473 struct ESP_regs {
    10979 diff -Naur linux-2.6.20/drivers/scsi/dec_esp.c linux-mips-2.6.20/drivers/scsi/dec_esp.c
    10980 --- linux-2.6.20/drivers/scsi/dec_esp.c 2007-02-04 10:44:54.000000000 -0800
    10981 +++ linux-mips-2.6.20/drivers/scsi/dec_esp.c    2007-02-04 12:22:45.000000000 -0800
     12474diff -Naur linux-2.6.20.1.orig/drivers/scsi/dec_esp.c linux-2.6.20.1/drivers/scsi/dec_esp.c
     12475--- linux-2.6.20.1.orig/drivers/scsi/dec_esp.c  2007-02-19 22:34:32.000000000 -0800
     12476+++ linux-2.6.20.1/drivers/scsi/dec_esp.c       2007-02-20 16:47:41.000000000 -0800
    1098212477@@ -55,7 +55,7 @@
    1098312478 
     
    1099812493                        esp->dregs = 0;
    1099912494                        esp->eregs = (void *)CKSEG1ADDR(mem_start +
    11000 diff -Naur linux-2.6.20/drivers/scsi/sgiwd93.c linux-mips-2.6.20/drivers/scsi/sgiwd93.c
    11001 --- linux-2.6.20/drivers/scsi/sgiwd93.c 2007-02-04 10:44:54.000000000 -0800
    11002 +++ linux-mips-2.6.20/drivers/scsi/sgiwd93.c    2007-02-04 12:22:45.000000000 -0800
     12495diff -Naur linux-2.6.20.1.orig/drivers/scsi/sgiwd93.c linux-2.6.20.1/drivers/scsi/sgiwd93.c
     12496--- linux-2.6.20.1.orig/drivers/scsi/sgiwd93.c  2007-02-19 22:34:32.000000000 -0800
     12497+++ linux-2.6.20.1/drivers/scsi/sgiwd93.c       2007-02-20 16:47:41.000000000 -0800
    1100312498@@ -14,6 +14,7 @@
    1100412499 #include <linux/interrupt.h>
     
    1101712512 static inline void init_hpc_chain(struct hpc_data *hd)
    1101812513 {
    11019 diff -Naur linux-2.6.20/drivers/serial/Kconfig linux-mips-2.6.20/drivers/serial/Kconfig
    11020 --- linux-2.6.20/drivers/serial/Kconfig 2007-02-04 10:44:54.000000000 -0800
    11021 +++ linux-mips-2.6.20/drivers/serial/Kconfig    2007-02-04 12:22:45.000000000 -0800
     12514diff -Naur linux-2.6.20.1.orig/drivers/serial/Kconfig linux-2.6.20.1/drivers/serial/Kconfig
     12515--- linux-2.6.20.1.orig/drivers/serial/Kconfig  2007-02-19 22:34:32.000000000 -0800
     12516+++ linux-2.6.20.1/drivers/serial/Kconfig       2007-02-20 16:47:41.000000000 -0800
    1102212517@@ -686,6 +686,25 @@
    1102312518        depends on SERIAL_SH_SCI=y
     
    1104612541        tristate
    1104712542 
    11048 diff -Naur linux-2.6.20/drivers/serial/Makefile linux-mips-2.6.20/drivers/serial/Makefile
    11049 --- linux-2.6.20/drivers/serial/Makefile        2007-02-04 10:44:54.000000000 -0800
    11050 +++ linux-mips-2.6.20/drivers/serial/Makefile   2007-02-04 12:22:45.000000000 -0800
     12543diff -Naur linux-2.6.20.1.orig/drivers/serial/Makefile linux-2.6.20.1/drivers/serial/Makefile
     12544--- linux-2.6.20.1.orig/drivers/serial/Makefile 2007-02-19 22:34:32.000000000 -0800
     12545+++ linux-2.6.20.1/drivers/serial/Makefile      2007-02-20 16:47:41.000000000 -0800
    1105112546@@ -40,6 +40,7 @@
    1105212547 obj-$(CONFIG_V850E_UART) += v850e_uart.o
     
    1105712552 obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o
    1105812553 obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o
    11059 diff -Naur linux-2.6.20/drivers/serial/ip22zilog.c linux-mips-2.6.20/drivers/serial/ip22zilog.c
    11060 --- linux-2.6.20/drivers/serial/ip22zilog.c     2007-02-04 10:44:54.000000000 -0800
    11061 +++ linux-mips-2.6.20/drivers/serial/ip22zilog.c        2007-02-04 12:22:45.000000000 -0800
     12554diff -Naur linux-2.6.20.1.orig/drivers/serial/ip22zilog.c linux-2.6.20.1/drivers/serial/ip22zilog.c
     12555--- linux-2.6.20.1.orig/drivers/serial/ip22zilog.c      2007-02-19 22:34:32.000000000 -0800
     12556+++ linux-2.6.20.1/drivers/serial/ip22zilog.c   2007-02-20 16:47:41.000000000 -0800
    1106212557@@ -863,6 +863,7 @@
    1106312558        up->cflag = termios->c_cflag;
     
    1107712572 
    1107812573 static int __init ip22zilog_console_setup(struct console *con, char *options)
    11079 diff -Naur linux-2.6.20/drivers/serial/ip3106_uart.c linux-mips-2.6.20/drivers/serial/ip3106_uart.c
    11080 --- linux-2.6.20/drivers/serial/ip3106_uart.c   1969-12-31 16:00:00.000000000 -0800
    11081 +++ linux-mips-2.6.20/drivers/serial/ip3106_uart.c      2007-02-04 12:22:45.000000000 -0800
     12574diff -Naur linux-2.6.20.1.orig/drivers/serial/ip3106_uart.c linux-2.6.20.1/drivers/serial/ip3106_uart.c
     12575--- linux-2.6.20.1.orig/drivers/serial/ip3106_uart.c    1969-12-31 16:00:00.000000000 -0800
     12576+++ linux-2.6.20.1/drivers/serial/ip3106_uart.c 2007-02-20 16:47:41.000000000 -0800
    1108212577@@ -0,0 +1,909 @@
    1108312578+/*
     
    1199013485+MODULE_LICENSE("GPL");
    1199113486+MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_IP3106_MAJOR);
    11992 diff -Naur linux-2.6.20/drivers/video/Kconfig linux-mips-2.6.20/drivers/video/Kconfig
    11993 --- linux-2.6.20/drivers/video/Kconfig  2007-02-04 10:44:54.000000000 -0800
    11994 +++ linux-mips-2.6.20/drivers/video/Kconfig     2007-02-04 12:22:45.000000000 -0800
     13487diff -Naur linux-2.6.20.1.orig/drivers/video/Kconfig linux-2.6.20.1/drivers/video/Kconfig
     13488--- linux-2.6.20.1.orig/drivers/video/Kconfig   2007-02-19 22:34:32.000000000 -0800
     13489+++ linux-2.6.20.1/drivers/video/Kconfig        2007-02-20 16:47:41.000000000 -0800
    1199513490@@ -1281,6 +1281,17 @@
    1199613491          Please read the <file:Documentation/fb/README-sstfb.txt> for supported
     
    1204913544 config FB_MAXINE
    1205013545        bool "Maxine (Personal DECstation) onboard framebuffer support"
    12051 diff -Naur linux-2.6.20/drivers/video/Makefile linux-mips-2.6.20/drivers/video/Makefile
    12052 --- linux-2.6.20/drivers/video/Makefile 2007-02-04 10:44:54.000000000 -0800
    12053 +++ linux-mips-2.6.20/drivers/video/Makefile    2007-02-04 12:22:45.000000000 -0800
     13546diff -Naur linux-2.6.20.1.orig/drivers/video/Makefile linux-2.6.20.1/drivers/video/Makefile
     13547--- linux-2.6.20.1.orig/drivers/video/Makefile  2007-02-19 22:34:32.000000000 -0800
     13548+++ linux-2.6.20.1/drivers/video/Makefile       2007-02-20 16:47:41.000000000 -0800
    1205413549@@ -96,6 +96,7 @@
    1205513550 obj-$(CONFIG_FB_TX3912)                  += tx3912fb.o
     
    1206013555 obj-$(CONFIG_FB_PNX4008_DUM)     += pnx4008/
    1206113556 obj-$(CONFIG_FB_PNX4008_DUM_RGB)  += pnx4008/
    12062 diff -Naur linux-2.6.20/drivers/video/au1100fb.c linux-mips-2.6.20/drivers/video/au1100fb.c
    12063 --- linux-2.6.20/drivers/video/au1100fb.c       2007-02-04 10:44:54.000000000 -0800
    12064 +++ linux-mips-2.6.20/drivers/video/au1100fb.c  2007-02-04 12:22:45.000000000 -0800
     13557diff -Naur linux-2.6.20.1.orig/drivers/video/au1100fb.c linux-2.6.20.1/drivers/video/au1100fb.c
     13558--- linux-2.6.20.1.orig/drivers/video/au1100fb.c        2007-02-19 22:34:32.000000000 -0800
     13559+++ linux-2.6.20.1/drivers/video/au1100fb.c     2007-02-20 16:47:41.000000000 -0800
    1206513560@@ -41,6 +41,7 @@
    1206613561  *  with this program; if not, write  to the Free Software Foundation, Inc.,
     
    1207113566 #include <linux/kernel.h>
    1207213567 #include <linux/errno.h>
    12073 diff -Naur linux-2.6.20/drivers/video/smivgxfb.c linux-mips-2.6.20/drivers/video/smivgxfb.c
    12074 --- linux-2.6.20/drivers/video/smivgxfb.c       1969-12-31 16:00:00.000000000 -0800
    12075 +++ linux-mips-2.6.20/drivers/video/smivgxfb.c  2007-02-04 12:22:45.000000000 -0800
     13568diff -Naur linux-2.6.20.1.orig/drivers/video/smivgxfb.c linux-2.6.20.1/drivers/video/smivgxfb.c
     13569--- linux-2.6.20.1.orig/drivers/video/smivgxfb.c        1969-12-31 16:00:00.000000000 -0800
     13570+++ linux-2.6.20.1/drivers/video/smivgxfb.c     2007-02-20 16:47:41.000000000 -0800
    1207613571@@ -0,0 +1,387 @@
    1207713572+/***************************************************************************
     
    1246213957+MODULE_DESCRIPTION("Framebuffer driver for SMI Voyager");
    1246313958+MODULE_LICENSE("GPL");
    12464 diff -Naur linux-2.6.20/include/asm-mips/io.h linux-mips-2.6.20/include/asm-mips/io.h
    12465 --- linux-2.6.20/include/asm-mips/io.h  2007-02-04 10:44:54.000000000 -0800
    12466 +++ linux-mips-2.6.20/include/asm-mips/io.h     2007-02-04 12:22:45.000000000 -0800
    12467 @@ -518,34 +518,6 @@
     13959diff -Naur linux-2.6.20.1.orig/include/asm-mips/compat-signal.h linux-2.6.20.1/include/asm-mips/compat-signal.h
     13960--- linux-2.6.20.1.orig/include/asm-mips/compat-signal.h        1969-12-31 16:00:00.000000000 -0800
     13961+++ linux-2.6.20.1/include/asm-mips/compat-signal.h     2007-02-20 16:47:41.000000000 -0800
     13962@@ -0,0 +1,54 @@
     13963+#ifndef __ASM_COMPAT_SIGNAL_H
     13964+#define __ASM_COMPAT_SIGNAL_H
     13965+
     13966+#include <linux/bug.h>
     13967+#include <linux/compat.h>
     13968+#include <linux/compiler.h>
     13969+
     13970+#include <asm/uaccess.h>
     13971+
     13972+static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d,
     13973+       const sigset_t *s)
     13974+{
     13975+       int err;
     13976+
     13977+       BUG_ON(sizeof(*d) != sizeof(*s));
     13978+       BUG_ON(_NSIG_WORDS != 2);
     13979+
     13980+       err  = __put_user(s->sig[0],       &d->sig[0]);
     13981+       err |= __put_user(s->sig[0] >> 32, &d->sig[1]);
     13982+       err |= __put_user(s->sig[1],       &d->sig[2]);
     13983+       err |= __put_user(s->sig[1] >> 32, &d->sig[3]);
     13984+
     13985+       return err;
     13986+}
     13987+
     13988+static inline int __copy_conv_sigset_from_user(sigset_t *d,
     13989+       const compat_sigset_t __user *s)
     13990+{
     13991+       int err;
     13992+       union sigset_u {
     13993+               sigset_t        s;
     13994+               compat_sigset_t c;
     13995+       } *u = (union sigset_u *) d;
     13996+
     13997+       BUG_ON(sizeof(*d) != sizeof(*s));
     13998+       BUG_ON(_NSIG_WORDS != 2);
     13999+
     14000+#ifdef CONFIG_CPU_BIG_ENDIAN
     14001+       err  = __get_user(u->c.sig[1], &s->sig[0]);
     14002+       err |= __get_user(u->c.sig[0], &s->sig[1]);
     14003+       err |= __get_user(u->c.sig[3], &s->sig[2]);
     14004+       err |= __get_user(u->c.sig[2], &s->sig[3]);
     14005+#endif
     14006+#ifdef CONFIG_CPU_LITTLE_ENDIAN
     14007+       err  = __get_user(u->c.sig[0], &s->sig[0]);
     14008+       err |= __get_user(u->c.sig[1], &s->sig[1]);
     14009+       err |= __get_user(u->c.sig[2], &s->sig[2]);
     14010+       err |= __get_user(u->c.sig[3], &s->sig[3]);
     14011+#endif
     14012+
     14013+       return err;
     14014+}
     14015+
     14016+#endif /* __ASM_COMPAT_SIGNAL_H */
     14017diff -Naur linux-2.6.20.1.orig/include/asm-mips/dma-mapping.h linux-2.6.20.1/include/asm-mips/dma-mapping.h
     14018--- linux-2.6.20.1.orig/include/asm-mips/dma-mapping.h  2007-02-19 22:34:32.000000000 -0800
     14019+++ linux-2.6.20.1/include/asm-mips/dma-mapping.h       2007-02-20 16:47:41.000000000 -0800
     14020@@ -68,6 +68,7 @@
     14021 extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
     14022               enum dma_data_direction direction);
     14023 
     14024+#if 0
     14025 #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
     14026 
     14027 extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
     14028@@ -75,5 +76,6 @@
     14029 extern void dma_release_declared_memory(struct device *dev);
     14030 extern void * dma_mark_declared_memory_occupied(struct device *dev,
     14031        dma_addr_t device_addr, size_t size);
     14032+#endif
     14033 
     14034 #endif /* _ASM_DMA_MAPPING_H */
     14035diff -Naur linux-2.6.20.1.orig/include/asm-mips/io.h linux-2.6.20.1/include/asm-mips/io.h
     14036--- linux-2.6.20.1.orig/include/asm-mips/io.h   2007-02-19 22:34:32.000000000 -0800
     14037+++ linux-2.6.20.1/include/asm-mips/io.h        2007-02-20 16:47:41.000000000 -0800
     14038@@ -20,6 +20,7 @@
     14039 #include <asm/byteorder.h>
     14040 #include <asm/cpu.h>
     14041 #include <asm/cpu-features.h>
     14042+#include <asm-generic/iomap.h>
     14043 #include <asm/page.h>
     14044 #include <asm/pgtable-bits.h>
     14045 #include <asm/processor.h>
     14046@@ -518,34 +519,6 @@
    1246814047 }
    1246914048 
     
    1250014079  * to explicitly ioremap() it. The fact that the ISA IO space is mapped
    1250114080  * to PAGE_OFFSET is pure coincidence - it does not mean ISA values
    12502 diff -Naur linux-2.6.20/include/asm-mips/mach-au1x00/au1000.h linux-mips-2.6.20/include/asm-mips/mach-au1x00/au1000.h
    12503 --- linux-2.6.20/include/asm-mips/mach-au1x00/au1000.h  2007-02-04 10:44:54.000000000 -0800
    12504 +++ linux-mips-2.6.20/include/asm-mips/mach-au1x00/au1000.h     2007-02-04 12:22:45.000000000 -0800
     14081diff -Naur linux-2.6.20.1.orig/include/asm-mips/mach-au1x00/au1000.h linux-2.6.20.1/include/asm-mips/mach-au1x00/au1000.h
     14082--- linux-2.6.20.1.orig/include/asm-mips/mach-au1x00/au1000.h   2007-02-19 22:34:32.000000000 -0800
     14083+++ linux-2.6.20.1/include/asm-mips/mach-au1x00/au1000.h        2007-02-20 16:47:41.000000000 -0800
    1250514084@@ -39,6 +39,7 @@
    1250614085 #ifndef _LANGUAGE_ASSEMBLY
     
    1251114090 
    1251214091 /* cpu pipeline flush */
    12513 diff -Naur linux-2.6.20/include/asm-mips/mach-au1x00/au1xxx_ide.h linux-mips-2.6.20/include/asm-mips/mach-au1x00/au1xxx_ide.h
    12514 --- linux-2.6.20/include/asm-mips/mach-au1x00/au1xxx_ide.h      2007-02-04 10:44:54.000000000 -0800
    12515 +++ linux-mips-2.6.20/include/asm-mips/mach-au1x00/au1xxx_ide.h 2007-02-04 12:22:45.000000000 -0800
     14092diff -Naur linux-2.6.20.1.orig/include/asm-mips/mach-au1x00/au1xxx_ide.h linux-2.6.20.1/include/asm-mips/mach-au1x00/au1xxx_ide.h
     14093--- linux-2.6.20.1.orig/include/asm-mips/mach-au1x00/au1xxx_ide.h       2007-02-19 22:34:32.000000000 -0800
     14094+++ linux-2.6.20.1/include/asm-mips/mach-au1x00/au1xxx_ide.h    2007-02-20 16:47:41.000000000 -0800
    1251614095@@ -83,6 +83,7 @@
    1251714096 } _auide_hwif;
     
    1252214101 static const struct drive_list_entry dma_white_list [] = {
    1252314102 /*
    12524 diff -Naur linux-2.6.20/include/asm-mips/mach-generic/ide.h linux-mips-2.6.20/include/asm-mips/mach-generic/ide.h
    12525 --- linux-2.6.20/include/asm-mips/mach-generic/ide.h    2007-02-04 10:44:54.000000000 -0800
    12526 +++ linux-mips-2.6.20/include/asm-mips/mach-generic/ide.h       2007-02-04 12:22:45.000000000 -0800
     14103diff -Naur linux-2.6.20.1.orig/include/asm-mips/mach-generic/ide.h linux-2.6.20.1/include/asm-mips/mach-generic/ide.h
     14104--- linux-2.6.20.1.orig/include/asm-mips/mach-generic/ide.h     2007-02-19 22:34:32.000000000 -0800
     14105+++ linux-2.6.20.1/include/asm-mips/mach-generic/ide.h  2007-02-20 16:47:41.000000000 -0800
    1252714106@@ -29,17 +29,12 @@
    1252814107 
     
    1254614125        return 1;
    1254714126 #else
    12548 diff -Naur linux-2.6.20/include/linux/pci_ids.h linux-mips-2.6.20/include/linux/pci_ids.h
    12549 --- linux-2.6.20/include/linux/pci_ids.h        2007-02-04 10:44:54.000000000 -0800
    12550 +++ linux-mips-2.6.20/include/linux/pci_ids.h   2007-02-04 12:22:45.000000000 -0800
     14127diff -Naur linux-2.6.20.1.orig/include/asm-mips/mips_mt.h linux-2.6.20.1/include/asm-mips/mips_mt.h
     14128--- linux-2.6.20.1.orig/include/asm-mips/mips_mt.h      2007-02-19 22:34:32.000000000 -0800
     14129+++ linux-2.6.20.1/include/asm-mips/mips_mt.h   2007-02-20 16:47:41.000000000 -0800
     14130@@ -12,4 +12,7 @@
     14131 extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value);
     14132 extern void mips_mt_set_cpuoptions(void);
     14133 
     14134+struct class;
     14135+extern struct class *mt_class;
     14136+
     14137 #endif /* __ASM_MIPS_MT_H */
     14138diff -Naur linux-2.6.20.1.orig/include/asm-mips/pci.h linux-2.6.20.1/include/asm-mips/pci.h
     14139--- linux-2.6.20.1.orig/include/asm-mips/pci.h  2007-02-19 22:34:32.000000000 -0800
     14140+++ linux-2.6.20.1/include/asm-mips/pci.h       2007-02-20 16:47:41.000000000 -0800
     14141@@ -32,6 +32,7 @@
     14142        unsigned long mem_offset;
     14143        struct resource *io_resource;
     14144        unsigned long io_offset;
     14145+       unsigned long io_map_base;
     14146 
     14147        unsigned int index;
     14148        /* For compatibility with current (as of July 2003) pciutils
     14149diff -Naur linux-2.6.20.1.orig/include/asm-mips/sigcontext.h linux-2.6.20.1/include/asm-mips/sigcontext.h
     14150--- linux-2.6.20.1.orig/include/asm-mips/sigcontext.h   2007-02-19 22:34:32.000000000 -0800
     14151+++ linux-2.6.20.1/include/asm-mips/sigcontext.h        2007-02-20 16:47:41.000000000 -0800
     14152@@ -42,6 +42,7 @@
     14153 
     14154 #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
     14155 
     14156+#include <linux/posix_types.h>
     14157 /*
     14158  * Keep this struct definition in sync with the sigcontext fragment
     14159  * in arch/mips/tools/offset.c
     14160@@ -53,27 +54,25 @@
     14161  * entries, add sc_dsp and sc_reserved for padding.  No prisoners.
     14162  */
     14163 struct sigcontext {
     14164-       unsigned long   sc_regs[32];
     14165-       unsigned long   sc_fpregs[32];
     14166-       unsigned long   sc_mdhi;
     14167-       unsigned long   sc_hi1;
     14168-       unsigned long   sc_hi2;
     14169-       unsigned long   sc_hi3;
     14170-       unsigned long   sc_mdlo;
     14171-       unsigned long   sc_lo1;
     14172-       unsigned long   sc_lo2;
     14173-       unsigned long   sc_lo3;
     14174-       unsigned long   sc_pc;
     14175-       unsigned int    sc_fpc_csr;
     14176-       unsigned int    sc_used_math;
     14177-       unsigned int    sc_dsp;
     14178-       unsigned int    sc_reserved;
     14179+       __u64   sc_regs[32];
     14180+       __u64   sc_fpregs[32];
     14181+       __u64   sc_mdhi;
     14182+       __u64   sc_hi1;
     14183+       __u64   sc_hi2;
     14184+       __u64   sc_hi3;
     14185+       __u64   sc_mdlo;
     14186+       __u64   sc_lo1;
     14187+       __u64   sc_lo2;
     14188+       __u64   sc_lo3;
     14189+       __u64   sc_pc;
     14190+       __u32   sc_fpc_csr;
     14191+       __u32   sc_used_math;
     14192+       __u32   sc_dsp;
     14193+       __u32   sc_reserved;
     14194 };
     14195 
     14196 #ifdef __KERNEL__
     14197 
     14198-#include <linux/posix_types.h>
     14199-
     14200 struct sigcontext32 {
     14201        __u32           sc_regmask;     /* Unused */
     14202        __u32           sc_status;
     14203diff -Naur linux-2.6.20.1.orig/include/asm-mips/uaccess.h linux-2.6.20.1/include/asm-mips/uaccess.h
     14204--- linux-2.6.20.1.orig/include/asm-mips/uaccess.h      2007-02-19 22:34:32.000000000 -0800
     14205+++ linux-2.6.20.1/include/asm-mips/uaccess.h   2007-02-20 16:47:41.000000000 -0800
     14206@@ -265,12 +265,14 @@
     14207  */
     14208 #define __get_user_asm_ll32(val, addr)                                 \
     14209 {                                                                      \
     14210-        unsigned long long __gu_tmp;                                   \
     14211+       union {                                                         \
     14212+               unsigned long long      l;                              \
     14213+               __typeof__(*(addr))     t;                              \
     14214+       } __gu_tmp;                                                     \
     14215                                                                        \
     14216        __asm__ __volatile__(                                           \
     14217        "1:     lw      %1, (%3)                                \n"     \
     14218        "2:     lw      %D1, 4(%3)                              \n"     \
     14219-       "       move    %0, $0                                  \n"     \
     14220        "3:     .section        .fixup,\"ax\"                   \n"     \
     14221        "4:     li      %0, %4                                  \n"     \
     14222        "       move    %1, $0                                  \n"     \
     14223@@ -281,9 +283,10 @@
     14224        "       " __UA_ADDR "   1b, 4b                          \n"     \
     14225        "       " __UA_ADDR "   2b, 4b                          \n"     \
     14226        "       .previous                                       \n"     \
     14227-       : "=r" (__gu_err), "=&r" (__gu_tmp)                             \
     14228+       : "=r" (__gu_err), "=&r" (__gu_tmp.l)                           \
     14229        : "0" (0), "r" (addr), "i" (-EFAULT));                          \
     14230-       (val) = (__typeof__(*(addr))) __gu_tmp;                         \
     14231+                                                                       \
     14232+       (val) = __gu_tmp.t;                                             \
     14233 }
     14234 
     14235 /*
     14236@@ -432,8 +435,32 @@
     14237        __cu_len;                                                       \
     14238 })
     14239 
     14240-#define __copy_to_user_inatomic __copy_to_user
     14241-#define __copy_from_user_inatomic __copy_from_user
     14242+#define __copy_to_user_inatomic(to,from,n)                             \
     14243+({                                                                     \
     14244+       void __user *__cu_to;                                           \
     14245+       const void *__cu_from;                                          \
     14246+       long __cu_len;                                                  \
     14247+                                                                       \
     14248+       __cu_to = (to);                                                 \
     14249+       __cu_from = (from);                                             \
     14250+       __cu_len = (n);                                                 \
     14251+       __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \
     14252+       __cu_len;                                                       \
     14253+})
     14254+
     14255+#define __copy_from_user_inatomic(to,from,n)                           \
     14256+({                                                                     \
     14257+       void *__cu_to;                                                  \
     14258+       const void __user *__cu_from;                                   \
     14259+       long __cu_len;                                                  \
     14260+                                                                       \
     14261+       __cu_to = (to);                                                 \
     14262+       __cu_from = (from);                                             \
     14263+       __cu_len = (n);                                                 \
     14264+       __cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \
     14265+                                                   __cu_len);          \
     14266+       __cu_len;                                                       \
     14267+})
     14268 
     14269 /*
     14270  * copy_to_user: - Copy a block of data into user space.
     14271@@ -487,8 +514,32 @@
     14272        __cu_len_r;                                                     \
     14273 })
     14274 
     14275+#define __invoke_copy_from_user_inatomic(to,from,n)                    \
     14276+({                                                                     \
     14277+       register void *__cu_to_r __asm__ ("$4");                        \
     14278+       register const void __user *__cu_from_r __asm__ ("$5");         \
     14279+       register long __cu_len_r __asm__ ("$6");                        \
     14280+                                                                       \
     14281+       __cu_to_r = (to);                                               \
     14282+       __cu_from_r = (from);                                           \
     14283+       __cu_len_r = (n);                                               \
     14284+       __asm__ __volatile__(                                           \
     14285+       ".set\tnoreorder\n\t"                                           \
     14286+       __MODULE_JAL(__copy_user_inatomic)                              \
     14287+       ".set\tnoat\n\t"                                                \
     14288+       __UA_ADDU "\t$1, %1, %2\n\t"                                    \
     14289+       ".set\tat\n\t"                                                  \
     14290+       ".set\treorder"                                                 \
     14291+       : "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r)       \
     14292+       :                                                               \
     14293+       : "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31",         \
     14294+         "memory");                                                    \
     14295+       __cu_len_r;                                                     \
     14296+})
     14297+
     14298 /*
     14299- * __copy_from_user: - Copy a block of data from user space, with less checking. * @to:   Destination address, in kernel space.
     14300+ * __copy_from_user: - Copy a block of data from user space, with less checking.
     14301+ * @to:   Destination address, in kernel space.
     14302  * @from: Source address, in user space.
     14303  * @n:    Number of bytes to copy.
     14304  *
     14305diff -Naur linux-2.6.20.1.orig/include/linux/pci_ids.h linux-2.6.20.1/include/linux/pci_ids.h
     14306--- linux-2.6.20.1.orig/include/linux/pci_ids.h 2007-02-19 22:34:32.000000000 -0800
     14307+++ linux-2.6.20.1/include/linux/pci_ids.h      2007-02-20 16:47:41.000000000 -0800
    1255114308@@ -1614,6 +1614,9 @@
    1255214309 #define PCI_VENDOR_ID_SATSAGEM         0x1267
     
    1255914316 #define PCI_VENDOR_ID_ENSONIQ          0x1274
    1256014317 #define PCI_DEVICE_ID_ENSONIQ_CT5880   0x5880
    12561 diff -Naur linux-2.6.20/include/linux/serial.h linux-mips-2.6.20/include/linux/serial.h
    12562 --- linux-2.6.20/include/linux/serial.h 2007-02-04 10:44:54.000000000 -0800
    12563 +++ linux-mips-2.6.20/include/linux/serial.h    2007-02-04 12:22:45.000000000 -0800
     14318diff -Naur linux-2.6.20.1.orig/include/linux/serial.h linux-2.6.20.1/include/linux/serial.h
     14319--- linux-2.6.20.1.orig/include/linux/serial.h  2007-02-19 22:34:32.000000000 -0800
     14320+++ linux-2.6.20.1/include/linux/serial.h       2007-02-20 16:47:41.000000000 -0800
    1256414321@@ -76,7 +76,8 @@
    1256514322 #define PORT_16654     11
     
    1257214329 #define SERIAL_IO_PORT 0
    1257314330 #define SERIAL_IO_HUB6 1
    12574 diff -Naur linux-2.6.20/include/linux/serial_ip3106.h linux-mips-2.6.20/include/linux/serial_ip3106.h
    12575 --- linux-2.6.20/include/linux/serial_ip3106.h  2007-02-04 10:44:54.000000000 -0800
    12576 +++ linux-mips-2.6.20/include/linux/serial_ip3106.h     2007-02-04 12:22:45.000000000 -0800
     14331diff -Naur linux-2.6.20.1.orig/include/linux/serial_ip3106.h linux-2.6.20.1/include/linux/serial_ip3106.h
     14332--- linux-2.6.20.1.orig/include/linux/serial_ip3106.h   2007-02-19 22:34:32.000000000 -0800
     14333+++ linux-2.6.20.1/include/linux/serial_ip3106.h        2007-02-20 16:47:41.000000000 -0800
    1257714334@@ -78,4 +78,16 @@
    1257814335 #define IP3106_UART_FIFO_RXFIFO                0x00001F00
     
    1259214349+
    1259314350 #endif
    12594 diff -Naur linux-2.6.20/sound/oss/Kconfig linux-mips-2.6.20/sound/oss/Kconfig
    12595 --- linux-2.6.20/sound/oss/Kconfig      2007-02-04 10:44:54.000000000 -0800
    12596 +++ linux-mips-2.6.20/sound/oss/Kconfig 2007-02-04 12:22:45.000000000 -0800
     14351diff -Naur linux-2.6.20.1.orig/sound/oss/Kconfig linux-2.6.20.1/sound/oss/Kconfig
     14352--- linux-2.6.20.1.orig/sound/oss/Kconfig       2007-02-19 22:34:32.000000000 -0800
     14353+++ linux-2.6.20.1/sound/oss/Kconfig    2007-02-20 16:47:41.000000000 -0800
    1259714354@@ -80,6 +80,13 @@
    1259814355        select SND_AC97_CODEC
     
    1260914366        tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core"
    1261014367        depends on SOUND_PRIME && PCI
    12611 diff -Naur linux-2.6.20/sound/oss/Makefile linux-mips-2.6.20/sound/oss/Makefile
    12612 --- linux-2.6.20/sound/oss/Makefile     2007-02-04 10:44:54.000000000 -0800
    12613 +++ linux-mips-2.6.20/sound/oss/Makefile        2007-02-04 12:22:45.000000000 -0800
     14368diff -Naur linux-2.6.20.1.orig/sound/oss/Makefile linux-2.6.20.1/sound/oss/Makefile
     14369--- linux-2.6.20.1.orig/sound/oss/Makefile      2007-02-19 22:34:32.000000000 -0800
     14370+++ linux-2.6.20.1/sound/oss/Makefile   2007-02-20 16:47:41.000000000 -0800
    1261414371@@ -45,6 +45,7 @@
    1261514372 obj-$(CONFIG_SOUND_ES1371)     += es1371.o ac97_codec.o
     
    1262014377 obj-$(CONFIG_SOUND_TRIDENT)    += trident.o ac97_codec.o
    1262114378 obj-$(CONFIG_SOUND_EMU10K1)    += ac97_codec.o
    12622 diff -Naur linux-2.6.20/sound/oss/au1550_i2s.c linux-mips-2.6.20/sound/oss/au1550_i2s.c
    12623 --- linux-2.6.20/sound/oss/au1550_i2s.c 1969-12-31 16:00:00.000000000 -0800
    12624 +++ linux-mips-2.6.20/sound/oss/au1550_i2s.c    2007-02-04 12:22:45.000000000 -0800
     14379diff -Naur linux-2.6.20.1.orig/sound/oss/au1550_i2s.c linux-2.6.20.1/sound/oss/au1550_i2s.c
     14380--- linux-2.6.20.1.orig/sound/oss/au1550_i2s.c  1969-12-31 16:00:00.000000000 -0800
     14381+++ linux-2.6.20.1/sound/oss/au1550_i2s.c       2007-02-20 16:47:41.000000000 -0800
    1262514382@@ -0,0 +1,2029 @@
    1262614383+/*
     
    1465316410+MODULE_AUTHOR("Advanced Micro Devices (AMD), dan@embeddededge.com");
    1465416411+MODULE_DESCRIPTION("Au1550 I2S Audio Driver");
     16412
Note: See TracChangeset for help on using the changeset viewer.