]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- kernel24 removed from HEAD
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 1 Apr 2007 20:10:58 +0000 (20:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    01-reiserfs-xattrs-2.4.23+datalogging+quota-03 -> 1.2
    02-reiserfs-acl-2.4.23+datalogging+quota-03 -> 1.4
    bootsplash-3.0.7-2.4.25.patch -> 1.3
    dc395-tab.patch -> 1.3
    jam-04-clone-detached.patch -> 1.4
    jam-06-force-inline.patch -> 1.4
    jam-07-scsi-error-tmout.patch -> 1.4
    jam-10-highpage-init.patch -> 1.4
    jam-11-self_exec_id.patch -> 1.4
    jam-21-mem-barriers.patch -> 1.4
    jam-30-smptimers-A0.patch -> 1.9
    kernel-2.4.18-SPARC64-PLD.patch -> 1.2
    kernel-Makefile-include-fix.patch -> 1.3
    kernel-cd-mrw-2.patch -> 1.2
    kernel-cdrw-packet.patch -> 1.4
    kernel-pldfblogo.patch -> 1.10
    kernel-pswscancode.patch -> 1.2
    linux-2.4-sysctl-empty.patch -> 1.2
    linux-2.4.0-nonintconfig.patch -> 1.2
    linux-2.4.0-raid5xor.patch -> 1.2
    linux-2.4.1-compilefailure.patch -> 1.39
    linux-2.4.1-netdebug.patch -> 1.2
    linux-2.4.18-hpfs.patch -> 1.2
    linux-2.4.18-input-35215.patch -> 1.2
    linux-2.4.18-kiobuf.patch -> 1.2
    linux-2.4.18-mppe.patch -> 1.2
    linux-2.4.18-nfs-default-size.patch -> 1.2
    linux-2.4.2-blkioctl-sector.patch -> 1.4
    linux-2.4.2-raw-ip.patch -> 1.2
    linux-2.4.20-AXP-avma1_cs.patch -> 1.2
    linux-2.4.20-EXPORT_SYMBOL.patch -> 1.26
    linux-2.4.20-Nokia5510.patch -> 1.4
    linux-2.4.20-agp_uninorth.patch -> 1.3
    linux-2.4.20-amd-golem.patch -> 1.3
    linux-2.4.20-davfs-_FUNCTION_.patch -> 1.2
    linux-2.4.20-e820.patch -> 1.2
    linux-2.4.20-ecc.patch -> 1.2
    linux-2.4.20-irixnfs.patch -> 1.3
    linux-2.4.20-lvm-updates.patch -> 1.5
    linux-2.4.20-missing-license-tags.patch -> 1.10
    linux-2.4.20-pre1-nr_frags.patch -> 1.2
    linux-2.4.20-serverworks.patch -> 1.2
    linux-2.4.21-agp-num_of_masks.patch -> 1.2
    linux-2.4.21-cpqfc.patch -> 1.2
    linux-2.4.21-hpt372-chicken-egg-hack.patch -> 1.2
    linux-2.4.21-i2c-headers.patch -> 1.3
    linux-2.4.21-i2c-sparc64.patch -> 1.2
    linux-2.4.21-irda-ibm.patch -> 1.4
    linux-2.4.21-nfs-silly-rename.patch -> 1.3
    linux-2.4.21-no-FPU.patch -> 1.2
    linux-2.4.21-nousb.patch -> 1.5
    linux-2.4.21-tru64nfs.patch -> 1.2
    linux-2.4.22-andrea-9980_fix-pausing-6.patch -> 1.2
    linux-2.4.22-gcc33-inline.patch -> 1.2
    linux-2.4.22-ppc-amd8111e.patch -> 1.2
    linux-2.4.22-tun-new-style.patch -> 1.2
    linux-2.4.23-ppc-symbols.patch -> 1.2
    linux-2.4.25-change-imq_with_nat.patch -> 1.2
    linux-2.4.25-intermezzo-acl.patch -> 1.2
    linux-2.4.25-sched-O1.patch -> 1.9
    linux-2.4.3-pcipenalty.patch -> 1.2
    linux-2.4.7-suspend.patch -> 1.2
    linux-53c7,8xx-build.fix -> 1.3
    linux-PPC-SMP.patch -> 1.2
    linux-mtd-missing-include-fix-2.4.7-pre6.patch -> 1.2
    linux-proc_net_dev-counter-fix.patch -> 1.3
    linux-raid5-spare-counting.patch -> 1.2
    linux-scsi-debug-bug.patch -> 1.4
    linux-sound_core.patch -> 1.4
    nwd-2.4.21.patch -> 1.2
    patch-cryptoloop-jari-2.4.22-rc2.0 -> 1.8
    vbr-kernel-diffs -> 1.2
    wrr-linux-2.4.9.patch -> 1.4

73 files changed:
01-reiserfs-xattrs-2.4.23+datalogging+quota-03 [deleted file]
02-reiserfs-acl-2.4.23+datalogging+quota-03 [deleted file]
bootsplash-3.0.7-2.4.25.patch [deleted file]
dc395-tab.patch [deleted file]
jam-04-clone-detached.patch [deleted file]
jam-06-force-inline.patch [deleted file]
jam-07-scsi-error-tmout.patch [deleted file]
jam-10-highpage-init.patch [deleted file]
jam-11-self_exec_id.patch [deleted file]
jam-21-mem-barriers.patch [deleted file]
jam-30-smptimers-A0.patch [deleted file]
kernel-2.4.18-SPARC64-PLD.patch [deleted file]
kernel-Makefile-include-fix.patch [deleted file]
kernel-cd-mrw-2.patch [deleted file]
kernel-cdrw-packet.patch [deleted file]
kernel-pldfblogo.patch [deleted file]
kernel-pswscancode.patch [deleted file]
linux-2.4-sysctl-empty.patch [deleted file]
linux-2.4.0-nonintconfig.patch [deleted file]
linux-2.4.0-raid5xor.patch [deleted file]
linux-2.4.1-compilefailure.patch [deleted file]
linux-2.4.1-netdebug.patch [deleted file]
linux-2.4.18-hpfs.patch [deleted file]
linux-2.4.18-input-35215.patch [deleted file]
linux-2.4.18-kiobuf.patch [deleted file]
linux-2.4.18-mppe.patch [deleted file]
linux-2.4.18-nfs-default-size.patch [deleted file]
linux-2.4.2-blkioctl-sector.patch [deleted file]
linux-2.4.2-raw-ip.patch [deleted file]
linux-2.4.20-AXP-avma1_cs.patch [deleted file]
linux-2.4.20-EXPORT_SYMBOL.patch [deleted file]
linux-2.4.20-Nokia5510.patch [deleted file]
linux-2.4.20-agp_uninorth.patch [deleted file]
linux-2.4.20-amd-golem.patch [deleted file]
linux-2.4.20-davfs-_FUNCTION_.patch [deleted file]
linux-2.4.20-e820.patch [deleted file]
linux-2.4.20-ecc.patch [deleted file]
linux-2.4.20-irixnfs.patch [deleted file]
linux-2.4.20-lvm-updates.patch [deleted file]
linux-2.4.20-missing-license-tags.patch [deleted file]
linux-2.4.20-pre1-nr_frags.patch [deleted file]
linux-2.4.20-serverworks.patch [deleted file]
linux-2.4.21-agp-num_of_masks.patch [deleted file]
linux-2.4.21-cpqfc.patch [deleted file]
linux-2.4.21-hpt372-chicken-egg-hack.patch [deleted file]
linux-2.4.21-i2c-headers.patch [deleted file]
linux-2.4.21-i2c-sparc64.patch [deleted file]
linux-2.4.21-irda-ibm.patch [deleted file]
linux-2.4.21-nfs-silly-rename.patch [deleted file]
linux-2.4.21-no-FPU.patch [deleted file]
linux-2.4.21-nousb.patch [deleted file]
linux-2.4.21-tru64nfs.patch [deleted file]
linux-2.4.22-andrea-9980_fix-pausing-6.patch [deleted file]
linux-2.4.22-gcc33-inline.patch [deleted file]
linux-2.4.22-ppc-amd8111e.patch [deleted file]
linux-2.4.22-tun-new-style.patch [deleted file]
linux-2.4.23-ppc-symbols.patch [deleted file]
linux-2.4.25-change-imq_with_nat.patch [deleted file]
linux-2.4.25-intermezzo-acl.patch [deleted file]
linux-2.4.25-sched-O1.patch [deleted file]
linux-2.4.3-pcipenalty.patch [deleted file]
linux-2.4.7-suspend.patch [deleted file]
linux-53c7,8xx-build.fix [deleted file]
linux-PPC-SMP.patch [deleted file]
linux-mtd-missing-include-fix-2.4.7-pre6.patch [deleted file]
linux-proc_net_dev-counter-fix.patch [deleted file]
linux-raid5-spare-counting.patch [deleted file]
linux-scsi-debug-bug.patch [deleted file]
linux-sound_core.patch [deleted file]
nwd-2.4.21.patch [deleted file]
patch-cryptoloop-jari-2.4.22-rc2.0 [deleted file]
vbr-kernel-diffs [deleted file]
wrr-linux-2.4.9.patch [deleted file]

diff --git a/01-reiserfs-xattrs-2.4.23+datalogging+quota-03 b/01-reiserfs-xattrs-2.4.23+datalogging+quota-03
deleted file mode 100644 (file)
index 0323e0f..0000000
+++ /dev/null
@@ -1,1932 +0,0 @@
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/Config.in linux-2.4.23.xattr/fs/Config.in
---- linux-2.4.23.datalogging+quota/fs/Config.in        2003-12-11 12:53:34.170047728 -0500
-+++ linux-2.4.23.xattr/fs/Config.in    2003-12-11 12:55:03.321494648 -0500
-@@ -13,6 +13,8 @@ tristate 'Kernel automounter version 4 s
- tristate 'Reiserfs support' CONFIG_REISERFS_FS
- dep_mbool '  Enable reiserfs debug mode' CONFIG_REISERFS_CHECK $CONFIG_REISERFS_FS
- dep_mbool '  Stats in /proc/fs/reiserfs' CONFIG_REISERFS_PROC_INFO $CONFIG_REISERFS_FS
-+dep_mbool '  ReiserFS extended attributes' CONFIG_REISERFS_FS_XATTR $CONFIG_REISERFS_FS
-+dep_mbool '  ReiserFS extended user attributes' CONFIG_REISERFS_FS_XATTR_USER $CONFIG_REISERFS_FS_XATTR
- dep_tristate 'ADFS file system support (EXPERIMENTAL)' CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
- dep_mbool '  ADFS write support (DANGEROUS)' CONFIG_ADFS_FS_RW $CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/Makefile linux-2.4.23.xattr/fs/reiserfs/Makefile
---- linux-2.4.23.datalogging+quota/fs/reiserfs/Makefile        2003-12-11 12:54:15.917701120 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/Makefile    2003-12-11 12:55:03.322494496 -0500
-@@ -12,6 +12,9 @@ O_TARGET := reiserfs.o
- obj-y   := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o super.o prints.o objectid.o \
- lbalance.o ibalance.o stree.o hashes.o buffer2.o tail_conversion.o journal.o resize.o item_ops.o ioctl.o procfs.o
-+obj-$(CONFIG_REISERFS_FS_XATTR) += xattr.o
-+obj-$(CONFIG_REISERFS_FS_XATTR_USER) += xattr_user.o
-+
- obj-m   := $(O_TARGET)
- # gcc -O2 (the kernel default)  is overaggressive on ppc32 when many inline
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/dir.c linux-2.4.23.xattr/fs/reiserfs/dir.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/dir.c   2003-12-11 12:53:11.351516672 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/dir.c       2003-12-11 12:55:03.322494496 -0500
-@@ -110,6 +110,15 @@ static int reiserfs_readdir (struct file
-                   /* too big to send back to VFS */
-                   continue ;
-               }
-+
-+                /* Ignore the .reiserfs_priv entry */
-+              if (reiserfs_xattrs (inode->i_sb) && 
-+                    !old_format_only(inode->i_sb) &&
-+                    inode->i_sb->u.reiserfs_sb.priv_root &&
-+                    inode->i_sb->u.reiserfs_sb.priv_root->d_inode &&
-+                    deh_objectid (deh) == le32_to_cpu (INODE_PKEY(inode->i_sb->u.reiserfs_sb.priv_root->d_inode)->k_objectid))
-+                  continue;
-+
-               d_off = deh_offset (deh);
-               filp->f_pos = d_off ;
-               d_ino = deh_objectid (deh);
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/file.c linux-2.4.23.xattr/fs/reiserfs/file.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/file.c  2003-12-11 12:54:29.707604736 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/file.c      2003-12-11 12:55:03.323494344 -0500
-@@ -5,6 +5,7 @@
- #include <linux/sched.h>
- #include <linux/reiserfs_fs.h>
-+#include <linux/reiserfs_xattr.h>
- #include <linux/smp_lock.h>
- #include <linux/quotaops.h>
-@@ -173,6 +174,10 @@ struct file_operations reiserfs_file_ope
- struct  inode_operations reiserfs_file_inode_operations = {
-     truncate: reiserfs_vfs_truncate_file,
-     setattr:    reiserfs_setattr,
-+    setxattr:   reiserfs_setxattr, 
-+    getxattr:   reiserfs_getxattr, 
-+    listxattr:   reiserfs_listxattr, 
-+    removexattr:   reiserfs_removexattr, 
- };
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/inode.c linux-2.4.23.xattr/fs/reiserfs/inode.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/inode.c 2003-12-11 12:54:29.711604128 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/inode.c     2003-12-11 12:58:42.434184456 -0500
-@@ -6,6 +6,8 @@
- #include <linux/sched.h>
- #include <linux/fs.h>
- #include <linux/reiserfs_fs.h>
-+#include <linux/reiserfs_xattr.h>
-+#include <linux/quotaops.h>
- #include <linux/locks.h>
- #include <linux/smp_lock.h>
- #include <linux/quotaops.h>
-@@ -42,6 +44,8 @@ void reiserfs_delete_inode (struct inode
-     if (INODE_PKEY(inode)->k_objectid != 0) { /* also handles bad_inode case */
-       down (&inode->i_sem); 
-+      reiserfs_delete_xattrs (inode);
-+
-       journal_begin(&th, inode->i_sb, jbegin_count) ;
-       reiserfs_update_inode_transaction(inode) ;
-       windex = push_journal_writer("delete_inode") ;
-@@ -1169,7 +1173,7 @@ static void init_inode (struct inode * i
-       inode->i_op = &reiserfs_dir_inode_operations;
-       inode->i_fop = &reiserfs_dir_operations;
-     } else if (S_ISLNK (inode->i_mode)) {
--      inode->i_op = &page_symlink_inode_operations;
-+      inode->i_op = &reiserfs_symlink_inode_operations;
-       inode->i_mapping->a_ops = &reiserfs_address_space_operations;
-     } else {
-       inode->i_blocks = 0;
-@@ -2689,6 +2693,70 @@ static int reiserfs_direct_io(int rw, st
-                              reiserfs_get_block_direct_io) ;
- }
-+int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
-+{
-+    struct inode *inode = dentry->d_inode ;
-+    int error ;
-+    unsigned int ia_valid = attr->ia_valid ;
-+
-+    if (ia_valid & ATTR_SIZE) {
-+      /* version 2 items will be caught by the s_maxbytes check
-+      ** done for us in vmtruncate
-+      */
-+      if (get_inode_item_key_version(inode) == KEY_FORMAT_3_5 &&
-+          attr->ia_size > MAX_NON_LFS)
-+            return -EFBIG ;
-+
-+        /* During a truncate, we have to make sure the new i_size is in
-+      ** the transaction before we start dropping updates to data logged
-+      ** or ordered write data pages.
-+      */
-+      if (attr->ia_size < inode->i_size && reiserfs_file_data_log(inode)) {
-+          struct reiserfs_transaction_handle th ;
-+          journal_begin(&th, inode->i_sb, 1) ;
-+          reiserfs_update_sd_size(&th, inode, attr->ia_size) ;
-+          journal_end(&th, inode->i_sb, 1) ;
-+      /* fill in hole pointers in the expanding truncate case. */
-+        } else if (attr->ia_size > inode->i_size) {
-+          error = generic_cont_expand(inode, attr->ia_size) ;
-+          if (inode->u.reiserfs_i.i_prealloc_count > 0) {
-+              struct reiserfs_transaction_handle th ;
-+              /* we're changing at most 2 bitmaps, inode + super */
-+              journal_begin(&th, inode->i_sb, 4) ;
-+              reiserfs_discard_prealloc (&th, inode);
-+              journal_end(&th, inode->i_sb, 4) ;
-+          }
-+          if (error)
-+              return error ;
-+      }
-+    }
-+
-+    if ((((attr->ia_valid & ATTR_UID) && (attr->ia_uid & ~0xffff)) ||
-+       ((attr->ia_valid & ATTR_GID) && (attr->ia_gid & ~0xffff))) &&
-+      (get_inode_sd_version (inode) == STAT_DATA_V1))
-+              /* stat data of format v3.5 has 16 bit uid and gid */
-+          return -EINVAL;
-+
-+    error = inode_change_ok(inode, attr) ;
-+    if (!error) {
-+      if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
-+          (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) {
-+                if (!(attr->ia_valid & ATTR_SIZE))
-+                    down (&inode->i_sem);
-+                error = reiserfs_chown_xattrs (inode, attr);
-+                if (!(attr->ia_valid & ATTR_SIZE))
-+                    up (&inode->i_sem);
-+
-+                if (!error)
-+                    error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
-+            }
-+
-+      if (!error)
-+          error = inode_setattr(inode, attr) ;
-+    }
-+    return error ;
-+}
-+
- struct address_space_operations reiserfs_address_space_operations = {
-     writepage: reiserfs_writepage,
-     readpage: reiserfs_readpage, 
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/namei.c linux-2.4.23.xattr/fs/reiserfs/namei.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/namei.c 2003-12-11 12:54:29.705605040 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/namei.c     2003-12-11 12:55:03.327493736 -0500
-@@ -6,6 +6,7 @@
- #include <linux/sched.h>
- #include <linux/bitops.h>
- #include <linux/reiserfs_fs.h>
-+#include <linux/reiserfs_xattr.h>
- #include <linux/smp_lock.h>
- #include <linux/quotaops.h>
-@@ -324,10 +325,21 @@ static struct dentry * reiserfs_lookup (
-     retval = reiserfs_find_entry (dir, dentry->d_name.name, dentry->d_name.len, &path_to_entry, &de);
-     pathrelse (&path_to_entry);
-     if (retval == NAME_FOUND) {
-+        /* Hide the .reiserfs_priv dir */
-+      if (reiserfs_xattrs (dir->i_sb) &&
-+            !old_format_only(dir->i_sb) &&
-+            dir->i_sb->u.reiserfs_sb.priv_root &&
-+            dir->i_sb->u.reiserfs_sb.priv_root->d_inode &&
-+            de.de_objectid == le32_to_cpu (INODE_PKEY(dir->i_sb->u.reiserfs_sb.priv_root->d_inode)->k_objectid)) {
-+            return ERR_PTR (-EACCES);
-+      }
-       inode = reiserfs_iget (dir->i_sb, (struct cpu_key *)&(de.de_dir_id));
-       if (!inode || IS_ERR(inode)) {
-           return ERR_PTR(-EACCES);
-         }
-+        /* Propogate the priv_object flag so we know we're in the priv tree */
-+        if (is_reiserfs_priv_object (dir))
-+            inode->u.reiserfs_i.i_flags |= i_priv_object;
-     }
-     if ( retval == IO_ERROR ) {
-       return ERR_PTR(-EIO);
-@@ -908,7 +920,7 @@ static int reiserfs_symlink (struct inod
-     reiserfs_update_inode_transaction(inode) ;
-     reiserfs_update_inode_transaction(parent_dir) ;
--    inode->i_op = &page_symlink_inode_operations;
-+    inode->i_op = &reiserfs_symlink_inode_operations;
-     inode->i_mapping->a_ops = &reiserfs_address_space_operations;
-     // must be sure this inode is written with this transaction
-@@ -1280,5 +1292,23 @@ struct inode_operations reiserfs_dir_ino
-     rmdir:    reiserfs_rmdir,
-     mknod:    reiserfs_mknod,
-     rename:   reiserfs_rename,
-+    setattr:   reiserfs_setattr, 
-+    setxattr:   reiserfs_setxattr, 
-+    getxattr:   reiserfs_getxattr, 
-+    listxattr:   reiserfs_listxattr, 
-+    removexattr:   reiserfs_removexattr, 
- };
-+/*
-+ * symlink operations.. same as page_symlink_inode_operations, with xattr
-+ * stuff added
-+ */
-+struct inode_operations reiserfs_symlink_inode_operations = {
-+    readlink:       page_readlink,
-+    follow_link:    page_follow_link,
-+    setattr:        reiserfs_setattr,
-+    setxattr:       reiserfs_setxattr,
-+    getxattr:       reiserfs_getxattr,
-+    listxattr:      reiserfs_listxattr,
-+    removexattr:    reiserfs_removexattr,
-+};
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/super.c linux-2.4.23.xattr/fs/reiserfs/super.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/super.c 2003-12-11 12:54:29.706604888 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/super.c     2003-12-11 12:59:19.183597696 -0500
-@@ -9,6 +9,7 @@
- #include <linux/vmalloc.h>
- #include <asm/uaccess.h>
- #include <linux/reiserfs_fs.h>
-+#include <linux/reiserfs_xattr.h>
- #include <linux/smp_lock.h>
- #include <linux/locks.h>
- #include <linux/init.h>
-@@ -354,7 +355,17 @@ static void reiserfs_put_super (struct s
- {
-   int i;
-   struct reiserfs_transaction_handle th ;
-+
-+  if (s->u.reiserfs_sb.xattr_root) {
-+    d_invalidate (s->u.reiserfs_sb.xattr_root);
-+    dput (s->u.reiserfs_sb.xattr_root);
-+  }
-   
-+  if (s->u.reiserfs_sb.priv_root) {
-+    d_invalidate (s->u.reiserfs_sb.priv_root);
-+    dput (s->u.reiserfs_sb.priv_root);
-+  }
-+
-   /* change file system state to current state if it was mounted with read-write permissions */
-   if (!(s->s_flags & MS_RDONLY)) {
-     journal_begin(&th, s, 10) ;
-@@ -639,7 +650,12 @@ static int reiserfs_parse_options (struc
-               {"noattrs", 0, 0, 0, 1<<REISERFS_ATTRS},
-               {"usrquota", 0, 0, 0, 0},
-               {"grpquota", 0, 0, 0, 0},
--
-+#ifdef CONFIG_REISERFS_FS_XATTR
-+# ifdef CONFIG_REISERFS_FS_XATTR_USER
-+              {"user_xattr", 0, 0, 1<<REISERFS_XATTRS_USER, 0},
-+              {"nouser_xattr", 0, 0, 0, 1<<REISERFS_XATTRS_USER},
-+# endif
-+#endif
-               {NULL, 0, 0, 0, 0}
-     };
-       
-@@ -757,6 +773,7 @@ static int reiserfs_remount (struct supe
-   safe_mask |= 1 << REISERFS_HASHED_RELOCATION;
-   safe_mask |= 1 << REISERFS_TEST4;
-   safe_mask |= 1 << REISERFS_ATTRS;
-+  safe_mask |= 1 << REISERFS_XATTRS_USER;
-   /* Update the bitmask, taking care to keep
-    * the bits we're not allowed to change here */
-@@ -771,6 +788,7 @@ static int reiserfs_remount (struct supe
-   }
-   if (*mount_flags & MS_RDONLY) {
-+    reiserfs_xattr_init (s, *mount_flags);
-     /* remount read-only */
-     if (s->s_flags & MS_RDONLY)
-       /* it is read-only already */
-@@ -789,6 +807,7 @@ static int reiserfs_remount (struct supe
-   } else {
-     /* remount read-write */
-     if (!(s->s_flags & MS_RDONLY)) {
-+      reiserfs_xattr_init (s, *mount_flags);
-       handle_data_mode(s, mount_options);
-       return 0; /* We are read-write already */
-     }
-@@ -811,6 +830,7 @@ static int reiserfs_remount (struct supe
-   if (!( *mount_flags & MS_RDONLY ) ) {
-     finish_unfinished( s );
-+    reiserfs_xattr_init (s, *mount_flags);
-     handle_data_mode(s, mount_options);
-   }
-   return 0;
-@@ -1236,6 +1256,8 @@ static struct super_block * reiserfs_rea
-     s->u.reiserfs_sb.s_alloc_options.preallocmin = 4;
-     /* Preallocate by 8 blocks (9-1) at once */
-     s->u.reiserfs_sb.s_alloc_options.preallocsize = 9;
-+    /* Initialize the rwsem for xattr dir */
-+    init_rwsem(&s->u.reiserfs_sb.xattr_dir_sem);
-     if (reiserfs_parse_options (s, (char *) data, &(s->u.reiserfs_sb.s_mount_opt), &blocks) == 0) {
-       return NULL;
-@@ -1378,11 +1400,23 @@ static struct super_block * reiserfs_rea
-               
-       journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
-       journal_end(&th, s, 1) ;
--      
-+
-+      if (reiserfs_xattr_init (s, s->s_flags)) {
-+          dput (s->s_root);
-+          s->s_root = NULL;
-+          goto error;
-+      }
-+
-       /* look for files which were to be removed in previous session */
-       finish_unfinished (s);
-       s->s_dirt = 0;
-+    } else {
-+      if (reiserfs_xattr_init (s, s->s_flags)) {
-+          dput (s->s_root);
-+          s->s_root = NULL;
-+          goto error;
-+      }
-     }
-     // mark hash in super block: it could be unset. overwrite should be ok
-@@ -1447,8 +1481,20 @@ static int __init init_reiserfs_fs (void
-                                      reiserfs_global_version_in_proc );
-       ret = reiserfs_journal_cache_init();
-       if (ret)
--          return ret;
-+          goto failed_journal_cache_init;
-+
-+        ret = reiserfs_xattr_user_init ();
-+        if (ret)
-+            goto failed_xattr_user_init;
-+
-         return register_filesystem(&reiserfs_fs_type);
-+
-+failed_xattr_user_init:
-+failed_journal_cache_init:
-+      reiserfs_proc_unregister_global( "version" );
-+      reiserfs_proc_info_global_done();
-+      return ret;
-+
- }
- MODULE_DESCRIPTION("ReiserFS journaled filesystem");
-@@ -1457,6 +1503,7 @@ MODULE_LICENSE("GPL");
- static void __exit exit_reiserfs_fs(void)
- {
-+      reiserfs_xattr_user_exit ();
-       reiserfs_proc_unregister_global( "version" );
-       reiserfs_proc_info_global_done();
-         unregister_filesystem(&reiserfs_fs_type);
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/xattr.c linux-2.4.23.xattr/fs/reiserfs/xattr.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/xattr.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/xattr.c     2003-12-11 12:55:03.332492976 -0500
-@@ -0,0 +1,1246 @@
-+/*
-+ * linux/fs/reiserfs/xattr.c
-+ *
-+ * Copyright (c) 2002 by Jeff Mahoney, <jeffm@suse.com>
-+ *
-+ */
-+
-+/*
-+ * In order to implement EAs in a clean, backwards compatible manner,
-+ * they are implemented as files in a "private" directory.
-+ * Each EA is in it's own file, with the directory layout like so (/ is assumed
-+ * to be relative to fs root). Inside the /.reiserfs_priv/xattrs directory,
-+ * directories named using the capital-hex form of the objectid and
-+ * generation number are used. Inside each directory are individual files
-+ * named with the name of the extended attribute.
-+ *
-+ * So, for objectid 12648430, we could have:
-+ * /.reiserfs_priv/xattrs/C0FFEE.0/user.Content-Type
-+ * .. or similar.
-+ *
-+ * The file contents are the text of the EA. The size is known based on the
-+ * stat data describing the file.
-+ *
-+ */
-+
-+#include <linux/reiserfs_fs.h>
-+#include <linux/dcache.h>
-+#include <linux/errno.h>
-+#include <linux/fs.h>
-+#include <linux/file.h>
-+#include <linux/pagemap.h>
-+#include <linux/xattr.h>
-+#include <linux/reiserfs_xattr.h>
-+#include <linux/mbcache.h>
-+#include <asm/uaccess.h>
-+#include <asm/checksum.h>
-+#include <linux/smp_lock.h>
-+#include <linux/stat.h>
-+#include <asm/semaphore.h>
-+
-+#define FL_READONLY 128
-+#define FL_DIR_SEM_HELD 256
-+#define PRIVROOT_NAME ".reiserfs_priv"
-+#define XAROOT_NAME   "xattrs"
-+
-+static struct reiserfs_xattr_handler *find_xattr_handler_prefix (const char *prefix);
-+
-+static struct dentry *
-+create_xa_root (struct super_block *sb)
-+{
-+    struct dentry *privroot = dget (sb->u.reiserfs_sb.priv_root);
-+    struct dentry *xaroot;
-+
-+    /* This needs to be created at mount-time */
-+    if (!privroot)
-+        return ERR_PTR(-EOPNOTSUPP);
-+
-+    xaroot = lookup_one_len (XAROOT_NAME, privroot, strlen (XAROOT_NAME));
-+    if (IS_ERR (xaroot)) {
-+        goto out;
-+    } else if (!xaroot->d_inode) {
-+        int err;
-+        down (&privroot->d_inode->i_sem);
-+        err = privroot->d_inode->i_op->mkdir (privroot->d_inode, xaroot, 0700);
-+        up (&privroot->d_inode->i_sem);
-+
-+        if (err) {
-+            dput (xaroot);
-+            dput (privroot);
-+            return ERR_PTR (err);
-+        }
-+        sb->u.reiserfs_sb.xattr_root = dget (xaroot);
-+    }
-+
-+out:
-+    dput (privroot);
-+    return xaroot;
-+}
-+
-+/* This will return a dentry, or error, refering to the xa root directory.
-+ * If the xa root doesn't exist yet, the dentry will be returned without
-+ * an associated inode. This dentry can be used with ->mkdir to create
-+ * the xa directory. */
-+static struct dentry *
-+__get_xa_root (struct super_block *s)
-+{
-+    struct dentry *privroot = dget (s->u.reiserfs_sb.priv_root);
-+    struct dentry *xaroot = NULL;
-+
-+    if (IS_ERR (privroot) || !privroot)
-+        return privroot;
-+
-+    xaroot = lookup_one_len (XAROOT_NAME, privroot, strlen (XAROOT_NAME));
-+    if (IS_ERR (xaroot)) {
-+        goto out;
-+    } else if (!xaroot->d_inode) {
-+        dput (xaroot);
-+        xaroot = NULL;
-+        goto out;
-+    }
-+
-+    s->u.reiserfs_sb.xattr_root = dget (xaroot);
-+
-+out:
-+    dput (privroot);
-+    return xaroot;
-+}
-+
-+/* Returns the dentry (or NULL) referring to the root of the extended
-+ * attribute directory tree. If it has already been retreived, it is used.
-+ * Otherwise, we attempt to retreive it from disk. It may also return
-+ * a pointer-encoded error.
-+ */
-+static inline struct dentry *
-+get_xa_root (struct super_block *s)
-+{
-+    struct dentry *dentry = s->u.reiserfs_sb.xattr_root;
-+
-+    if (!dentry)
-+        dentry = __get_xa_root (s);
-+    else
-+        dget (dentry);
-+    return dentry;
-+}
-+
-+/* Same as above, but only returns a valid dentry or NULL */
-+struct dentry *
-+reiserfs_get_xa_root (struct super_block *sb)
-+{
-+    struct dentry *dentry;
-+
-+    dentry = get_xa_root (sb);
-+    if (IS_ERR (dentry)) {
-+        dentry = NULL;
-+    } else if (dentry && !dentry->d_inode) {
-+        dput (dentry);
-+        dentry = NULL;
-+    }
-+
-+    return dentry;
-+}
-+
-+/* Opens the directory corresponding to the inode's extended attribute store.
-+ * If flags allow, the tree to the directory may be created. If creation is
-+ * prohibited, -ENODATA is returned. */
-+static struct dentry *
-+open_xa_dir (const struct inode *inode, int flags)
-+{
-+    struct dentry *xaroot, *xadir;
-+    char namebuf[17];
-+
-+    xaroot = get_xa_root (inode->i_sb);
-+    if (IS_ERR (xaroot)) {
-+        return xaroot;
-+    } else if (!xaroot) {
-+        if (flags == 0 || flags & XATTR_CREATE) {
-+            xaroot = create_xa_root (inode->i_sb);
-+            if (IS_ERR (xaroot))
-+                return xaroot;
-+        }
-+        if (!xaroot)
-+            return ERR_PTR (-ENODATA);
-+    }
-+
-+    /* ok, we have xaroot open */
-+
-+    snprintf (namebuf, sizeof (namebuf), "%X.%X",
-+              le32_to_cpu (INODE_PKEY (inode)->k_objectid),
-+              inode->i_generation);
-+    xadir = lookup_one_len (namebuf, xaroot, strlen (namebuf));
-+    if (IS_ERR (xadir)) {
-+        dput (xaroot);
-+        return xadir;
-+    }
-+    
-+    if (!xadir->d_inode) {
-+        int err;
-+        if (flags == 0 || flags & XATTR_CREATE) {
-+            /* Although there is nothing else trying to create this directory,
-+             * another directory with the same hash may be created, so we need
-+             * to protect against that */
-+            err = xaroot->d_inode->i_op->mkdir (xaroot->d_inode, xadir, 0700);
-+            if (err) {
-+                dput (xaroot);
-+                dput (xadir);
-+                return ERR_PTR (err);
-+            }
-+        }
-+        if (!xadir->d_inode) {
-+            dput (xaroot);
-+            dput (xadir);
-+            return ERR_PTR (-ENODATA);
-+        }
-+    }
-+
-+    dput (xaroot);
-+    return xadir;
-+}
-+
-+/* Returns a dentry corresponding to a specific extended attribute file
-+ * for the inode. If flags allow, the file is created. Otherwise, a
-+ * valid or negative dentry, or an error is returned. */
-+static struct dentry *
-+get_xa_file_dentry (const struct inode *inode, const char *name, int flags)
-+{
-+    struct dentry *xadir, *xafile;
-+    int err = 0;
-+
-+    xadir = open_xa_dir (inode, flags);
-+    if (IS_ERR (xadir)) {
-+        return ERR_PTR (PTR_ERR (xadir));
-+    } else if (xadir && !xadir->d_inode) {
-+        dput (xadir);
-+        return ERR_PTR (-ENODATA);
-+    }
-+
-+    xafile = lookup_one_len (name, xadir, strlen (name));
-+    if (IS_ERR (xafile)) {
-+        dput (xadir);
-+        return ERR_PTR (PTR_ERR (xafile));
-+    }
-+
-+    if (xafile->d_inode) { /* file exists */
-+        if (flags & XATTR_CREATE) {
-+            err = -EEXIST;
-+            dput (xafile);
-+            goto out;
-+        }
-+    } else if (flags & XATTR_REPLACE || flags & FL_READONLY) {
-+        goto out;
-+    } else {
-+        /* inode->i_sem is down, so nothing else can try to create
-+         * the same xattr */
-+        err = xadir->d_inode->i_op->create (xadir->d_inode, xafile,
-+                                            0700|S_IFREG);
-+
-+        if (err) {
-+            dput (xafile);
-+            goto out;
-+        }
-+    }
-+
-+out:
-+    dput (xadir);
-+    if (err)
-+        xafile = ERR_PTR (err);
-+    return xafile;
-+}
-+
-+
-+/* Opens a file pointer to the attribute associated with inode */
-+static struct file *
-+open_xa_file (const struct inode *inode, const char *name, int flags)
-+{
-+    struct dentry *xafile;
-+    struct file *fp;
-+
-+    xafile = get_xa_file_dentry (inode, name, flags);
-+    if (IS_ERR (xafile))
-+        return ERR_PTR (PTR_ERR (xafile));
-+    else if (!xafile->d_inode) {
-+        dput (xafile);
-+        return ERR_PTR (-ENODATA);
-+    }
-+
-+    fp = dentry_open (xafile, NULL, O_RDWR);
-+    /* dentry_open dputs the dentry if it fails */
-+
-+    return fp;
-+}
-+
-+
-+/*
-+ * this is very similar to fs/reiserfs/dir.c:reiserfs_readdir, but
-+ * we need to drop the path before calling the filldir struct.  That
-+ * would be a big performance hit to the non-xattr case, so I've copied
-+ * the whole thing for now. --clm
-+ *
-+ * the big difference is that I go backwards through the directory, 
-+ * and don't mess with f->f_pos, but the idea is the same.  Do some
-+ * action on each and every entry in the directory.
-+ *
-+ * we're called with i_sem held, so there are no worries about the directory
-+ * changing underneath us.
-+ */
-+static int __xattr_readdir(struct file * filp, void * dirent, filldir_t filldir)
-+{
-+    struct inode *inode = filp->f_dentry->d_inode;
-+    struct cpu_key pos_key;   /* key of current position in the directory (key of directory entry) */
-+    INITIALIZE_PATH (path_to_entry);
-+    struct buffer_head * bh;
-+    int entry_num;
-+    struct item_head * ih, tmp_ih;
-+    int search_res;
-+    char * local_buf;
-+    loff_t next_pos;
-+    char small_buf[32] ; /* avoid kmalloc if we can */
-+    struct reiserfs_de_head *deh;
-+    int d_reclen;
-+    char * d_name;
-+    off_t d_off;
-+    ino_t d_ino;
-+    struct reiserfs_dir_entry de;
-+
-+
-+    /* form key for search the next directory entry using f_pos field of
-+       file structure */
-+    next_pos = max_reiserfs_offset(inode);
-+
-+    while (1) {
-+research:
-+      if (next_pos <= DOT_DOT_OFFSET)
-+          break;
-+      make_cpu_key (&pos_key, inode, next_pos, TYPE_DIRENTRY, 3);
-+
-+      search_res = search_by_entry_key(inode->i_sb, &pos_key, &path_to_entry, &de);
-+      if (search_res == IO_ERROR) {
-+          // FIXME: we could just skip part of directory which could
-+          // not be read
-+          pathrelse(&path_to_entry);
-+          return -EIO;
-+      }
-+
-+      if (search_res == NAME_NOT_FOUND)
-+          de.de_entry_num--;
-+
-+      set_de_name_and_namelen(&de);
-+      entry_num = de.de_entry_num;
-+      deh = &(de.de_deh[entry_num]);
-+
-+      bh = de.de_bh;
-+      ih = de.de_ih;
-+
-+      if (!is_direntry_le_ih(ih)) {
-+           reiserfs_warning(inode->i_sb, "not direntry %h\n", ih);
-+          break;
-+        }
-+      copy_item_head(&tmp_ih, ih);
-+              
-+      /* we must have found item, that is item of this directory, */
-+      RFALSE( COMP_SHORT_KEYS (&(ih->ih_key), &pos_key),
-+              "vs-9000: found item %h does not match to dir we readdir %K",
-+              ih, &pos_key);
-+
-+      if (deh_offset(deh) <= DOT_DOT_OFFSET) {
-+          break;
-+      }
-+
-+      /* look for the previous entry in the directory */
-+      next_pos = deh_offset (deh) - 1;
-+
-+      if (!de_visible (deh))
-+          /* it is hidden entry */
-+          continue;
-+
-+      d_reclen = entry_length(bh, ih, entry_num);
-+      d_name = B_I_DEH_ENTRY_FILE_NAME (bh, ih, deh);
-+      d_off = deh_offset (deh);
-+      d_ino = deh_objectid (deh);
-+
-+      if (!d_name[d_reclen - 1])
-+          d_reclen = strlen (d_name);
-+
-+      if (d_reclen > REISERFS_MAX_NAME(inode->i_sb->s_blocksize)){
-+          /* too big to send back to VFS */
-+          continue ;
-+      }
-+
-+        /* Ignore the .reiserfs_priv entry */
-+        if (reiserfs_xattrs (inode->i_sb) && 
-+            !old_format_only(inode->i_sb) &&
-+            deh_objectid (deh) == le32_to_cpu (INODE_PKEY(inode->i_sb->u.reiserfs_sb.priv_root->d_inode)->k_objectid))
-+          continue;
-+
-+      if (d_reclen <= 32) {
-+        local_buf = small_buf ;
-+      } else {
-+          local_buf = reiserfs_kmalloc(d_reclen, GFP_NOFS, inode->i_sb) ;
-+          if (!local_buf) {
-+              pathrelse (&path_to_entry);
-+              return -ENOMEM ;
-+          }
-+          if (item_moved (&tmp_ih, &path_to_entry)) {
-+              reiserfs_kfree(local_buf, d_reclen, inode->i_sb) ;
-+
-+              /* sigh, must retry.  Do this same offset again */
-+              next_pos = d_off;
-+              goto research;
-+          }
-+      }
-+
-+      // Note, that we copy name to user space via temporary
-+      // buffer (local_buf) because filldir will block if
-+      // user space buffer is swapped out. At that time
-+      // entry can move to somewhere else
-+      memcpy (local_buf, d_name, d_reclen);
-+
-+      /* the filldir function might need to start transactions,
-+       * or do who knows what.  Release the path now that we've
-+       * copied all the important stuff out of the deh
-+       */
-+      pathrelse (&path_to_entry);
-+
-+      if (filldir (dirent, local_buf, d_reclen, d_off, d_ino, 
-+                   DT_UNKNOWN) < 0) {
-+          if (local_buf != small_buf) {
-+              reiserfs_kfree(local_buf, d_reclen, inode->i_sb) ;
-+          }
-+          goto end;
-+      }
-+      if (local_buf != small_buf) {
-+          reiserfs_kfree(local_buf, d_reclen, inode->i_sb) ;
-+      }
-+    } /* while */
-+
-+end:
-+    pathrelse (&path_to_entry);
-+    return 0;
-+}
-+
-+/* 
-+ * this could be done with dedicated readdir ops for the xattr files,
-+ * but I want to get something working asap
-+ * this is stolen from vfs_readdir
-+ *
-+ */
-+static
-+int xattr_readdir(struct file *file, filldir_t filler, void *buf)
-+{
-+        struct inode *inode = file->f_dentry->d_inode;
-+        int res = -ENOTDIR;
-+        if (!file->f_op || !file->f_op->readdir)
-+                goto out;
-+        down(&inode->i_sem);
-+        down(&inode->i_zombie);
-+        res = -ENOENT;
-+        if (!IS_DEADDIR(inode)) {
-+                lock_kernel();
-+                res = __xattr_readdir(file, buf, filler);
-+                unlock_kernel();
-+        }
-+        up(&inode->i_zombie);
-+        up(&inode->i_sem);
-+out:
-+        return res;
-+}
-+
-+
-+/* Internal operations on file data */
-+static inline void
-+reiserfs_put_page(struct page *page)
-+{
-+        kunmap(page);
-+        page_cache_release(page);
-+}
-+
-+static struct page *
-+reiserfs_get_page(struct inode *dir, unsigned long n)
-+{
-+        struct address_space *mapping = dir->i_mapping; 
-+        struct page *page;
-+        /* We can deadlock if we try to free dentries,
-+           and an unlink/rmdir has just occured - GFP_NOFS avoids this */
-+        mapping->gfp_mask = GFP_NOFS;
-+        page = read_cache_page (mapping, n,
-+                                (filler_t*)mapping->a_ops->readpage, NULL);
-+        if (!IS_ERR(page)) {
-+                wait_on_page(page);
-+                kmap(page);
-+                if (!Page_Uptodate(page))
-+                        goto fail;
-+
-+                if (PageError(page))
-+                        goto fail;
-+        }
-+        return page;
-+
-+fail:
-+        reiserfs_put_page(page);
-+        return ERR_PTR(-EIO);
-+}
-+
-+static inline __u32
-+xattr_hash (const char *msg, int len)
-+{
-+    return csum_partial (msg, len, 0);
-+}
-+
-+/* Generic extended attribute operations that can be used by xa plugins */
-+
-+/*
-+ * inode->i_sem: down
-+ */
-+int
-+reiserfs_xattr_set (struct inode *inode, const char *name, const void *buffer,
-+                    size_t buffer_size, int flags)
-+{
-+    int err = 0;
-+    struct file *fp;
-+    struct page *page;
-+    char *data;
-+    struct address_space *mapping;
-+    size_t file_pos = 0;
-+    size_t buffer_pos = 0;
-+    struct inode *xinode;
-+    struct iattr newattrs;
-+    __u32 xahash = 0;
-+
-+    if (get_inode_sd_version (inode) == STAT_DATA_V1)
-+        return -EOPNOTSUPP;
-+
-+    /* Empty xattrs are ok, they're just empty files, no hash */
-+    if (buffer && buffer_size)
-+        xahash = xattr_hash (buffer, buffer_size);
-+
-+open_file:
-+    fp = open_xa_file (inode, name, flags);
-+    if (IS_ERR (fp)) {
-+        err = PTR_ERR (fp);
-+        goto out;
-+    }
-+
-+    xinode = fp->f_dentry->d_inode;
-+
-+    /* we need to copy it off.. */
-+    if (xinode->i_nlink > 1) {
-+      fput(fp);
-+        err = reiserfs_xattr_del (inode, name);
-+        if (err < 0)
-+            goto out;
-+        /* We just killed the old one, we're not replacing anymore */
-+        if (flags & XATTR_REPLACE)
-+            flags &= ~XATTR_REPLACE;
-+        goto open_file;
-+    }
-+
-+    /* Resize it so we're ok to write there */
-+    newattrs.ia_size = buffer_size;
-+    newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
-+    down (&xinode->i_sem);
-+    err = notify_change(fp->f_dentry, &newattrs);
-+    if (err)
-+        goto out_filp;
-+
-+    mapping = xinode->i_mapping;
-+    while (buffer_pos < buffer_size || buffer_pos == 0) {
-+        size_t chunk;
-+        size_t skip = 0;
-+        size_t page_offset = (file_pos & (PAGE_CACHE_SIZE - 1));
-+        if (buffer_size - buffer_pos > PAGE_CACHE_SIZE)
-+            chunk = PAGE_CACHE_SIZE;
-+        else
-+            chunk = buffer_size - buffer_pos;
-+
-+        page = reiserfs_get_page (xinode, file_pos >> PAGE_CACHE_SHIFT);
-+        if (IS_ERR (page)) {
-+            err = PTR_ERR (page);
-+            goto out_filp;
-+        }
-+
-+        lock_page (page);
-+        data = page_address (page);
-+
-+        if (file_pos == 0) {
-+            struct reiserfs_xattr_header *rxh;
-+            skip = file_pos = sizeof (struct reiserfs_xattr_header);
-+            if (chunk + skip > PAGE_CACHE_SIZE)
-+                chunk = PAGE_CACHE_SIZE - skip;
-+            rxh = (struct reiserfs_xattr_header *)data;
-+            rxh->h_magic = cpu_to_le32 (REISERFS_XATTR_MAGIC);
-+            rxh->h_hash = cpu_to_le32 (xahash);
-+        }
-+
-+        err = mapping->a_ops->prepare_write (fp, page, page_offset,
-+                                             page_offset + chunk + skip);
-+        if (!err) {
-+          if (buffer)
-+              memcpy (data + skip, buffer + buffer_pos, chunk);
-+            err = mapping->a_ops->commit_write (fp, page, page_offset,
-+                                                page_offset + chunk + skip);
-+      }
-+        UnlockPage (page);
-+        reiserfs_put_page (page);
-+        buffer_pos += chunk;
-+        file_pos += chunk;
-+        skip = 0;
-+        if (err || buffer_size == 0 || !buffer)
-+            break;
-+    }
-+
-+out_filp:
-+    up (&xinode->i_sem);
-+    fput(fp);
-+
-+out:
-+    return err;
-+}
-+
-+/*
-+ * inode->i_sem: down
-+ */
-+int
-+reiserfs_xattr_get (const struct inode *inode, const char *name, void *buffer,
-+                    size_t buffer_size)
-+{
-+    ssize_t err = 0;
-+    struct file *fp;
-+    size_t isize;
-+    size_t file_pos = 0;
-+    size_t buffer_pos = 0;
-+    struct page *page;
-+    struct inode *xinode;
-+    __u32 hash = 0;
-+
-+    /* We can't have xattrs attached to v1 items since they don't have
-+     * generation numbers */
-+    if (get_inode_sd_version (inode) == STAT_DATA_V1)
-+        return -EOPNOTSUPP;
-+
-+    fp = open_xa_file (inode, name, FL_READONLY);
-+    if (IS_ERR (fp)) {
-+        err = PTR_ERR (fp);
-+        goto out;
-+    }
-+
-+    xinode = fp->f_dentry->d_inode;
-+    isize = xinode->i_size;
-+
-+    /* Just return the size needed */
-+    if (buffer == NULL) {
-+        err = isize - sizeof (struct reiserfs_xattr_header);
-+        goto out_dput;
-+    }
-+
-+    if (buffer_size < isize - sizeof (struct reiserfs_xattr_header)) {
-+        err = -ERANGE;
-+        goto out_dput;
-+    }
-+    
-+    while (file_pos < isize) {
-+        size_t chunk;
-+        char *data;
-+        size_t skip = 0;
-+        if (isize - file_pos > PAGE_CACHE_SIZE)
-+            chunk = PAGE_CACHE_SIZE;
-+        else
-+            chunk = isize - file_pos;
-+
-+        page = reiserfs_get_page (xinode, file_pos >> PAGE_CACHE_SHIFT);
-+        if (IS_ERR (page)) {
-+            err = PTR_ERR (page);
-+            goto out_dput;
-+        }
-+
-+        lock_page (page);
-+        data = page_address (page);
-+        if (file_pos == 0) {
-+            struct reiserfs_xattr_header *rxh =
-+                                        (struct reiserfs_xattr_header *)data;
-+            skip = file_pos = sizeof (struct reiserfs_xattr_header);
-+            chunk -= skip;
-+            /* Magic doesn't match up.. */
-+            if (rxh->h_magic != cpu_to_le32 (REISERFS_XATTR_MAGIC)) {
-+                UnlockPage (page);
-+                reiserfs_put_page (page);
-+                err = -EIO;
-+                goto out_dput;
-+            }
-+            hash = le32_to_cpu (rxh->h_hash);
-+        }
-+        memcpy (buffer + buffer_pos, data + skip, chunk);
-+        UnlockPage (page);
-+        reiserfs_put_page (page);
-+        file_pos += chunk;
-+        buffer_pos += chunk;
-+        skip = 0;
-+    }
-+    err = isize - sizeof (struct reiserfs_xattr_header);
-+
-+    if (xattr_hash (buffer, isize - sizeof (struct reiserfs_xattr_header)) != hash)
-+        err = -EIO;
-+
-+out_dput:
-+    fput(fp);
-+
-+out:
-+    return err;
-+}
-+
-+static int
-+__reiserfs_xattr_del (struct dentry *xadir, const char *name, int namelen)
-+{
-+    struct dentry *file;
-+    struct inode *dir = xadir->d_inode;
-+    int err = 0;
-+
-+    file = lookup_one_len (name, xadir, namelen);
-+    if (IS_ERR (file)) {
-+        err = PTR_ERR (file);
-+        goto out;
-+    } else if (!file->d_inode) {
-+        err = -ENODATA;
-+        goto out_file;
-+    }
-+
-+    /* Skip directories.. */
-+    if (S_ISDIR (file->d_inode->i_mode))
-+        goto out_file;
-+
-+    if (!is_reiserfs_priv_object (file->d_inode)) {
-+        reiserfs_warning (dir->i_sb, "trying to delete objectid %08x, which isn't an xattr!\n", le32_to_cpu (INODE_PKEY (file->d_inode)->k_objectid));
-+        dput (file);
-+        return -EIO;
-+    }
-+
-+    err = dir->i_op->unlink (dir, file);
-+    if (!err)
-+        d_delete (file);
-+
-+out_file:
-+    dput (file);
-+
-+out:
-+    return err;
-+}
-+
-+
-+int
-+reiserfs_xattr_del (struct inode *inode, const char *name)
-+{
-+    struct dentry *dir;
-+    int err;
-+
-+    dir = open_xa_dir (inode, FL_READONLY);
-+    if (IS_ERR (dir)) {
-+        err = PTR_ERR (dir);
-+        goto out;
-+    }
-+
-+    err = __reiserfs_xattr_del (dir, name, strlen (name));
-+    dput (dir);
-+
-+out:
-+    return err;
-+}
-+
-+/* The following are side effects of other operations that aren't explicitly
-+ * modifying extended attributes. This includes operations such as permissions
-+ * or ownership changes, object deletions, etc. */
-+ 
-+static int
-+reiserfs_delete_xattrs_filler (void *buf, const char *name, int namelen,
-+                               loff_t offset, ino_t ino, unsigned int d_type)
-+{
-+    struct dentry *xadir = (struct dentry *)buf;
-+
-+    return __reiserfs_xattr_del (xadir, name, namelen);
-+
-+}
-+
-+int
-+reiserfs_delete_xattrs (struct inode *inode)
-+{
-+    struct file *fp;
-+    struct dentry *dir, *root;
-+    int err = 0;
-+
-+    /* Skip out, an xattr has no xattrs associated with it */
-+    if (is_reiserfs_priv_object (inode) ||
-+        get_inode_sd_version (inode) == STAT_DATA_V1 || 
-+        !reiserfs_xattrs(inode->i_sb))
-+    {
-+        return 0;
-+    }
-+    reiserfs_read_lock_xattrs (inode->i_sb);
-+    dir = open_xa_dir (inode, FL_READONLY);
-+    reiserfs_read_unlock_xattrs (inode->i_sb);
-+    if (IS_ERR (dir)) {
-+        err = PTR_ERR (dir);
-+        goto out;
-+    } else if (!dir->d_inode) {
-+        dput (dir);
-+        return 0;
-+    }
-+
-+    fp = dentry_open (dir, NULL, O_RDWR);
-+    if (IS_ERR (fp)) {
-+        err = PTR_ERR (fp);
-+        /* dentry_open dputs the dentry if it fails */
-+        goto out;
-+    }
-+
-+    lock_kernel ();
-+    err = xattr_readdir (fp, reiserfs_delete_xattrs_filler, dir);
-+    if (err) {
-+        unlock_kernel ();
-+        goto out_dir;
-+    }
-+
-+    /* Leftovers besides . and .. -- that's not good. */
-+    if (dir->d_inode->i_nlink <= 2) {
-+        root = get_xa_root (inode->i_sb);
-+        reiserfs_write_lock_xattrs (inode->i_sb);
-+        err = vfs_rmdir (root->d_inode, dir);
-+        reiserfs_write_unlock_xattrs (inode->i_sb);
-+        dput (root);
-+    } else {
-+        reiserfs_warning (inode->i_sb, "Couldn't remove all entries in directory\n");
-+    }
-+    unlock_kernel ();
-+
-+out_dir:
-+    fput(fp);
-+
-+out:
-+    return err;
-+}
-+
-+struct reiserfs_chown_buf {
-+    struct inode *inode;
-+    struct dentry *xadir;
-+    struct iattr *attrs;
-+};
-+
-+/* XXX: If there is a better way to do this, I'd love to hear about it */
-+static int
-+reiserfs_chown_xattrs_filler (void *buf, const char *name, int namelen,
-+                               loff_t offset, ino_t ino, unsigned int d_type)
-+{
-+    struct reiserfs_chown_buf *chown_buf = (struct reiserfs_chown_buf *)buf;
-+    struct dentry *xafile, *xadir = chown_buf->xadir;
-+    struct iattr *attrs = chown_buf->attrs;
-+    int err = 0;
-+
-+    xafile = lookup_one_len (name, xadir, namelen);
-+    if (IS_ERR (xafile))
-+        return PTR_ERR (xafile);
-+    else if (!xafile->d_inode) {
-+        dput (xafile);
-+        return -ENODATA;
-+    }
-+
-+    if (!S_ISDIR (xafile->d_inode->i_mode))
-+        err = notify_change (xafile, attrs);
-+    dput (xafile);
-+
-+    return err;
-+}
-+
-+int
-+reiserfs_chown_xattrs (struct inode *inode, struct iattr *attrs)
-+{
-+    struct file *fp;
-+    struct dentry *dir;
-+    int err = 0;
-+    struct reiserfs_chown_buf buf;
-+    unsigned int ia_valid = attrs->ia_valid;
-+
-+    /* Skip out, an xattr has no xattrs associated with it */
-+    if (is_reiserfs_priv_object (inode) ||
-+        get_inode_sd_version (inode) == STAT_DATA_V1 || 
-+        !reiserfs_xattrs(inode->i_sb))
-+    {
-+        return 0;
-+    }
-+    reiserfs_read_lock_xattrs (inode->i_sb);
-+    dir = open_xa_dir (inode, FL_READONLY);
-+    reiserfs_read_unlock_xattrs (inode->i_sb);
-+    if (IS_ERR (dir)) {
-+        if (PTR_ERR (dir) != -ENODATA)
-+            err = PTR_ERR (dir);
-+        goto out;
-+    } else if (!dir->d_inode) {
-+        dput (dir);
-+        goto out;
-+    }
-+
-+    fp = dentry_open (dir, NULL, O_RDWR);
-+    if (IS_ERR (fp)) {
-+        err = PTR_ERR (fp);
-+        /* dentry_open dputs the dentry if it fails */
-+        goto out;
-+    }
-+
-+    lock_kernel ();
-+
-+    attrs->ia_valid &= (ATTR_UID | ATTR_GID | ATTR_CTIME);
-+    buf.xadir = dir;
-+    buf.attrs = attrs;
-+    buf.inode = inode;
-+
-+    err = xattr_readdir (fp, reiserfs_chown_xattrs_filler, &buf);
-+    if (err) {
-+        unlock_kernel ();
-+        goto out_dir;
-+    }
-+
-+    err = notify_change (dir, attrs);
-+    unlock_kernel ();
-+
-+out_dir:
-+    fput(fp);
-+
-+out:
-+    attrs->ia_valid = ia_valid;
-+    return err;
-+}
-+
-+
-+/* Actual operations that are exported to VFS-land */
-+
-+/*
-+ * Inode operation getxattr()
-+ * dentry->d_inode->i_sem down
-+ * BKL held [before 2.5.x]
-+ */
-+ssize_t
-+reiserfs_getxattr (struct dentry *dentry, const char *name, void *buffer,
-+                   size_t size)
-+{
-+    struct reiserfs_xattr_handler *xah = find_xattr_handler_prefix (name);
-+    int err;
-+
-+    if (!xah || !reiserfs_xattrs(dentry->d_sb) ||
-+        get_inode_sd_version (dentry->d_inode) == STAT_DATA_V1)
-+        return -EOPNOTSUPP;
-+    
-+    reiserfs_read_lock_xattrs (dentry->d_sb);
-+    err = xah->get (dentry->d_inode, name, buffer, size);
-+    reiserfs_read_unlock_xattrs (dentry->d_sb);
-+    return err;
-+}
-+
-+
-+/*
-+ * Inode operation setxattr()
-+ *
-+ * dentry->d_inode->i_sem down
-+ * BKL held [before 2.5.x]
-+ */
-+int
-+reiserfs_setxattr (struct dentry *dentry, const char *name, const void *value,
-+                   size_t size, int flags)
-+{
-+    struct reiserfs_xattr_handler *xah = find_xattr_handler_prefix (name);
-+    int err;
-+
-+    if (!xah || !reiserfs_xattrs(dentry->d_sb) ||
-+        get_inode_sd_version (dentry->d_inode) == STAT_DATA_V1)
-+        return -EOPNOTSUPP;
-+    
-+    
-+    reiserfs_write_lock_xattrs (dentry->d_sb);
-+    err = xah->set (dentry->d_inode, name, value, size, flags);
-+    reiserfs_write_unlock_xattrs (dentry->d_sb);
-+    return err;
-+}
-+
-+/*
-+ * Inode operation removexattr()
-+ *
-+ * dentry->d_inode->i_sem down
-+ * BKL held [before 2.5.x]
-+ */
-+int
-+reiserfs_removexattr (struct dentry *dentry, const char *name)
-+{
-+    int err;
-+    struct reiserfs_xattr_handler *xah = find_xattr_handler_prefix (name);
-+
-+    if (!xah || !reiserfs_xattrs(dentry->d_sb) ||
-+        get_inode_sd_version (dentry->d_inode) == STAT_DATA_V1)
-+        return -EOPNOTSUPP;
-+
-+    down (&dentry->d_inode->i_zombie);
-+    reiserfs_read_lock_xattrs (dentry->d_sb);
-+
-+    /* Deletion pre-operation */
-+    if (xah->del) {
-+        err = xah->del (dentry->d_inode, name);
-+        if (err) {
-+            reiserfs_read_unlock_xattrs (dentry->d_sb);
-+            up (&dentry->d_inode->i_zombie);
-+            return err;
-+        }
-+    }
-+
-+    err = reiserfs_xattr_del (dentry->d_inode, name);
-+    reiserfs_read_unlock_xattrs (dentry->d_sb);
-+    up (&dentry->d_inode->i_zombie);
-+    return err;
-+}
-+
-+
-+/* This is what filldir will use:
-+ * r_pos will always contain the amount of space required for the entire
-+ * list. If r_pos becomes larger than r_size, we need more space and we
-+ * return an error indicating this. If r_pos is less than r_size, then we've
-+ * filled the buffer successfully and we return success */
-+struct reiserfs_listxattr_buf {
-+    int r_pos;
-+    int r_size;
-+    char *r_buf;
-+    struct inode *r_inode;
-+};
-+
-+static int
-+reiserfs_listxattr_filler (void *buf, const char *name, int namelen,
-+                           loff_t offset, ino_t ino, unsigned int d_type)
-+{
-+    struct reiserfs_listxattr_buf *b = (struct reiserfs_listxattr_buf *)buf;
-+    int len = 0;
-+    if (name[0] != '.' || (namelen != 1 && (name[1] != '.' || namelen != 2))) {
-+        struct reiserfs_xattr_handler *xah = find_xattr_handler_prefix (name);
-+        if (!xah) return 0; /* Unsupported xattr name, skip it */
-+
-+        /* We call ->list() twice because the operation isn't required to just
-+         * return the name back - we want to make sure we have enough space */
-+        len += xah->list (b->r_inode, name, namelen, NULL);
-+
-+        if (len) {
-+            if (b->r_pos + len + 1 <= b->r_size) {
-+                char *p = b->r_buf + b->r_pos;
-+                p += xah->list (b->r_inode, name, namelen, p);
-+                *p++ = '\0';
-+            }
-+            b->r_pos += len + 1;
-+        }
-+    }
-+
-+    return 0;
-+}
-+/*
-+ * Inode operation listxattr()
-+ *
-+ * dentry->d_inode->i_sem down
-+ * BKL held [before 2.5.x]
-+ */
-+ssize_t
-+reiserfs_listxattr (struct dentry *dentry, char *buffer, size_t size)
-+{
-+    struct file *fp;
-+    struct dentry *dir;
-+    int err = 0;
-+    struct reiserfs_listxattr_buf buf;
-+
-+    if (!dentry->d_inode)
-+        return -EINVAL;
-+
-+    if (!reiserfs_xattrs(dentry->d_sb) ||
-+        get_inode_sd_version (dentry->d_inode) == STAT_DATA_V1)
-+        return -EOPNOTSUPP;
-+
-+    reiserfs_read_lock_xattrs (dentry->d_sb);
-+    dir = open_xa_dir (dentry->d_inode, FL_READONLY);
-+    reiserfs_read_unlock_xattrs (dentry->d_sb);
-+    if (IS_ERR (dir)) {
-+        err = PTR_ERR (dir);
-+        if (err == -ENODATA)
-+            err = 0; /* Not an error if there aren't any xattrs */
-+        goto out;
-+    }
-+
-+    fp = dentry_open (dir, NULL, O_RDWR);
-+    if (IS_ERR (fp)) {
-+        err = PTR_ERR (fp);
-+        /* dentry_open dputs the dentry if it fails */
-+        goto out;
-+    }
-+
-+    buf.r_buf = buffer;
-+    buf.r_size = buffer ? size : 0;
-+    buf.r_pos = 0;
-+    buf.r_inode = dentry->d_inode;
-+
-+    err = xattr_readdir (fp, reiserfs_listxattr_filler, &buf);
-+    if (err)
-+        goto out_dir;
-+
-+    if (buf.r_pos > buf.r_size && buffer != NULL)
-+        err = -ERANGE;
-+    else
-+        err = buf.r_pos;
-+
-+out_dir:
-+    fput(fp);
-+
-+out:
-+    return err;
-+}
-+
-+/* This is the implementation for the xattr plugin infrastructure */
-+static struct reiserfs_xattr_handler *xattr_handlers;
-+static rwlock_t handler_lock = RW_LOCK_UNLOCKED;
-+
-+static struct reiserfs_xattr_handler *
-+find_xattr_handler_prefix (const char *prefix)
-+{
-+    struct reiserfs_xattr_handler **xah;
-+    read_lock (&handler_lock);
-+    for (xah = &xattr_handlers; *xah; xah=&(*xah)->next)
-+        if (strncmp ((*xah)->prefix, prefix, strlen ((*xah)->prefix)) == 0)
-+            break;
-+    read_unlock (&handler_lock);
-+    return *xah;
-+}
-+
-+int
-+reiserfs_xattr_register_handler (struct reiserfs_xattr_handler *handler)
-+{
-+    int res = 0;
-+    struct reiserfs_xattr_handler **xah;
-+
-+    if (!handler)
-+        return -EINVAL;
-+
-+    if (handler->next)
-+        return -EBUSY;
-+
-+    write_lock (&handler_lock);
-+
-+    for (xah = &xattr_handlers; *xah; xah=&(*xah)->next) {
-+        if (strcmp ((*xah)->prefix, handler->prefix) == 0)
-+            break;
-+    }
-+    if (*xah)
-+        res = -EBUSY;
-+    else
-+        *xah = handler;
-+
-+    /*
-+    if (!res)
-+        printk ("ReiserFS: Registered xattr handler for %s\n", handler->prefix);
-+    */
-+
-+    write_unlock (&handler_lock);
-+    return res;
-+}
-+
-+int
-+reiserfs_xattr_unregister_handler (struct reiserfs_xattr_handler *handler)
-+{
-+    struct reiserfs_xattr_handler **xah;
-+    write_lock (&handler_lock);
-+
-+    xah = &xattr_handlers;
-+    while (*xah) {
-+        if (handler == *xah) {
-+            *xah = handler->next;
-+            handler->next = NULL;
-+            write_unlock (&handler_lock);
-+            /*
-+            printk ("ReiserFS: Unregistered xattr handler for %s\n",
-+                    handler->prefix);
-+            */
-+            return 0;
-+        }
-+        xah = &(*xah)->next;
-+    }
-+    write_unlock (&handler_lock);
-+    return -EINVAL;
-+}
-+
-+/* We need to take a copy of the mount flags since things like
-+ * MS_RDONLY don't get set until *after* we're called.
-+ * mount_flags != mount_options */
-+
-+int
-+reiserfs_xattr_init (struct super_block *s, int mount_flags)
-+{
-+  int err = 0;
-+
-+  /* If the user has requested an optional xattrs type (e.g. user/acl), then
-+   * enable xattrs. If we're a v3.5 filesystem, this will get caught and
-+   * error out. If no optional xattrs are enabled, disable xattrs */
-+  if (reiserfs_xattrs_optional (s))
-+    set_bit (REISERFS_XATTRS, &(s->u.reiserfs_sb.s_mount_opt));
-+  else
-+    clear_bit (REISERFS_XATTRS, &(s->u.reiserfs_sb.s_mount_opt));
-+
-+  if (reiserfs_xattrs (s)) {
-+    /* We need generation numbers to ensure that the oid mapping is correct
-+     * v3.5 filesystems don't have them. */
-+    if (old_format_only (s)) {
-+      reiserfs_warning (s, "reiserfs: xattrs not supported on pre v3.6 "
-+                        "format filesystem. Failing mount.\n");
-+      err = -EOPNOTSUPP;
-+      goto error;
-+    } else if (!s->u.reiserfs_sb.priv_root) {
-+      struct dentry *dentry;
-+      dentry = lookup_one_len (PRIVROOT_NAME, s->s_root,
-+                               strlen (PRIVROOT_NAME));
-+      if (!IS_ERR (dentry)) {
-+        if (!(mount_flags & MS_RDONLY) && !dentry->d_inode) {
-+            struct inode *inode = dentry->d_parent->d_inode;
-+            down (&inode->i_sem);
-+            err = inode->i_op->mkdir (inode, dentry, 0700);
-+            up (&inode->i_sem);
-+            if (err) {
-+                dput (dentry);
-+                dentry = NULL;
-+            }
-+
-+            if (dentry && dentry->d_inode)
-+                reiserfs_warning (inode->i_sb, "reiserfs: Created %s on %s - reserved for "
-+                                  "xattr storage.\n", PRIVROOT_NAME, 
-+                                  bdevname (inode->i_sb->s_dev));
-+        } else if (!dentry->d_inode) {
-+            dput (dentry);
-+            dentry = NULL;
-+        }
-+      } else
-+        err = PTR_ERR (dentry);
-+
-+      if (!err && dentry) {
-+          d_drop (dentry);
-+          dentry->d_inode->u.reiserfs_i.i_flags |= i_priv_object;
-+          s->u.reiserfs_sb.priv_root = dentry;
-+      } else { /* xattrs are unavailable */
-+          /* If we're read-only it just means that the dir hasn't been
-+           * created. Not an error -- just no xattrs on the fs. We'll
-+           * check again if we go read-write */
-+          if (!(mount_flags & MS_RDONLY)) {
-+              reiserfs_warning (s, "reiserfs: xattrs enabled and couldn't "
-+                             "find/create .reiserfs_priv. Failing mount.\n");
-+            err = -EOPNOTSUPP;
-+            goto error;
-+          }
-+          /* Just to speed things up a bit since it won't find anything and
-+           * we're read-only */
-+          clear_bit (REISERFS_XATTRS, &(s->u.reiserfs_sb.s_mount_opt));
-+          clear_bit (REISERFS_XATTRS_USER, &(s->u.reiserfs_sb.s_mount_opt));
-+      }
-+    }
-+  }
-+
-+error:
-+   /* This is only nonzero if there was an error initializing the xattr
-+    * directory or if there is a condition where we don't support them. */
-+
-+    if (err) {
-+          clear_bit (REISERFS_XATTRS, &(s->u.reiserfs_sb.s_mount_opt));
-+          clear_bit (REISERFS_XATTRS_USER, &(s->u.reiserfs_sb.s_mount_opt));
-+    }
-+    return err;
-+}
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/xattr_user.c linux-2.4.23.xattr/fs/reiserfs/xattr_user.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/xattr_user.c    1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/xattr_user.c        2003-12-11 12:55:03.333492824 -0500
-@@ -0,0 +1,108 @@
-+#include <linux/reiserfs_fs.h>
-+#include <linux/errno.h>
-+#include <linux/fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/xattr.h>
-+#include <linux/reiserfs_xattr.h>
-+#include <asm/uaccess.h>
-+
-+#define XATTR_USER_PREFIX "user."
-+
-+static int
-+user_get (struct inode *inode, const char *name, void *buffer, size_t size)
-+{
-+
-+    int error;
-+
-+    if (strlen(name) < sizeof(XATTR_USER_PREFIX))
-+        return -EINVAL;
-+
-+    if (!reiserfs_xattrs_user (inode->i_sb))
-+        return -EOPNOTSUPP;
-+
-+    error = permission (inode, MAY_READ);
-+    if (error)
-+        return error;
-+
-+    return reiserfs_xattr_get (inode, name, buffer, size);
-+}
-+
-+static int
-+user_set (struct inode *inode, const char *name, const void *buffer,
-+          size_t size, int flags)
-+{
-+
-+    int error;
-+
-+    if (strlen(name) < sizeof(XATTR_USER_PREFIX))
-+        return -EINVAL;
-+
-+    if (!reiserfs_xattrs_user (inode->i_sb))
-+        return -EOPNOTSUPP;
-+
-+    if (!S_ISREG (inode->i_mode) &&
-+        (!S_ISDIR (inode->i_mode) || inode->i_mode & S_ISVTX))
-+        return -EPERM;
-+
-+    error = permission (inode, MAY_WRITE);
-+    if (error)
-+        return error;
-+
-+    return reiserfs_xattr_set (inode, name, buffer, size, flags);
-+}
-+
-+static int
-+user_del (struct inode *inode, const char *name)
-+{
-+    int error;
-+
-+    if (strlen(name) < sizeof(XATTR_USER_PREFIX))
-+        return -EINVAL;
-+
-+    if (!reiserfs_xattrs_user (inode->i_sb))
-+        return -EOPNOTSUPP;
-+
-+    if (!S_ISREG (inode->i_mode) &&
-+        (!S_ISDIR (inode->i_mode) || inode->i_mode & S_ISVTX))
-+        return -EPERM;
-+
-+    error = permission (inode, MAY_WRITE);
-+    if (error)
-+        return error;
-+
-+    return 0;
-+}
-+
-+static int
-+user_list (struct inode *inode, const char *name, int namelen, char *out)
-+{
-+    int len = namelen;
-+    if (!reiserfs_xattrs_user (inode->i_sb))
-+        return 0;
-+
-+    if (out)
-+        memcpy (out, name, len);
-+
-+    return len;
-+}
-+
-+
-+struct reiserfs_xattr_handler user_handler = {
-+    prefix: XATTR_USER_PREFIX,
-+    get: user_get,
-+    set: user_set,
-+    del: user_del,
-+    list: user_list,
-+};
-+
-+int __init
-+reiserfs_xattr_user_init (void)
-+{
-+    return reiserfs_xattr_register_handler (&user_handler);
-+}
-+
-+int
-+reiserfs_xattr_user_exit (void)
-+{
-+    return reiserfs_xattr_unregister_handler (&user_handler);
-+}
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs.h linux-2.4.23.xattr/include/linux/reiserfs_fs.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs.h 2003-12-11 12:54:29.715603520 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_fs.h     2003-12-11 12:55:03.335492520 -0500
-@@ -2012,6 +2012,7 @@ static inline void reiserfs_update_sd(st
- void sd_attrs_to_i_attrs( __u16 sd_attrs, struct inode *inode );
- void i_attrs_to_sd_attrs( struct inode *inode, __u16 *sd_attrs );
-+int reiserfs_setattr(struct dentry *dentry, struct iattr *attr);
- /* namei.c */
- inline void set_de_name_and_namelen (struct reiserfs_dir_entry * de);
-@@ -2081,6 +2082,7 @@ int reiserfs_journal_in_proc( char *buff
- /* dir.c */
- extern struct inode_operations reiserfs_dir_inode_operations;
-+extern struct inode_operations reiserfs_symlink_inode_operations;
- extern struct file_operations reiserfs_dir_operations;
- /* tail_conversion.c */
-@@ -2301,6 +2303,9 @@ int reiserfs_unpack (struct inode * inod
- #define REISERFS_IOC_GETVERSION       EXT2_IOC_GETVERSION
- #define REISERFS_IOC_SETVERSION         EXT2_IOC_SETVERSION
-                                
-+/* xattr stuff */
-+#define REISERFS_XATTR_DIR_SEM(s) ((s)->u.reiserfs_sb.xattr_dir_sem)
-+
- #endif /* _LINUX_REISER_FS_H */
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_i.h linux-2.4.23.xattr/include/linux/reiserfs_fs_i.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_i.h       2003-12-11 12:54:15.944697016 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_fs_i.h   2003-12-11 12:55:03.335492520 -0500
-@@ -28,6 +28,7 @@ typedef enum {
-     i_link_saved_truncate_mask =  0x0020,
-     /** are we logging data blocks for this file? */
-     i_data_log                 =  0x0040,
-+    i_priv_object              =  0x0080,
- } reiserfs_inode_flags;
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_sb.h linux-2.4.23.xattr/include/linux/reiserfs_fs_sb.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_sb.h      2003-12-11 12:54:15.945696864 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_fs_sb.h  2003-12-11 12:55:03.336492368 -0500
-@@ -6,6 +6,7 @@
- #ifdef __KERNEL__
- #include <linux/tqueue.h>
-+#include <linux/rwsem.h>
- #endif
- //
-@@ -442,6 +443,9 @@ struct reiserfs_sb_info
-     struct proc_dir_entry *procdir;
-     int reserved_blocks; /* amount of blocks reserved for further allocations */
-     struct list_head s_reiserfs_supers;
-+    struct dentry *priv_root; /* root of /.reiserfs_priv */
-+    struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */
-+    struct rw_semaphore xattr_dir_sem;
- };
- /* Definitions of reiserfs on-disk properties: */
-@@ -486,6 +490,8 @@ enum {
-     REISERFS_DATA_WRITEBACK,
-     REISERFS_ATTRS,
-     REISERFS_TEST4,
-+    REISERFS_XATTRS,
-+    REISERFS_XATTRS_USER,
- };
- #define reiserfs_r5_hash(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << FORCE_R5_HASH))
-@@ -507,6 +513,9 @@ enum {
- #define reiserfs_attrs(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_ATTRS))
- #define old_format_only(s) ((s)->u.reiserfs_sb.s_properties & (1 << REISERFS_3_5))
- #define convert_reiserfs(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_CONVERT))
-+#define reiserfs_xattrs(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_XATTRS))
-+#define reiserfs_xattrs_user(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_XATTRS_USER))
-+#define reiserfs_xattrs_optional(s) reiserfs_xattrs_user(s)
- void reiserfs_file_buffer (struct buffer_head * bh, int list);
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_xattr.h linux-2.4.23.xattr/include/linux/reiserfs_xattr.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_xattr.h      1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_xattr.h  2003-12-11 12:55:03.337492216 -0500
-@@ -0,0 +1,114 @@
-+/*
-+  File: linux/reiserfs_xattr.h
-+*/
-+
-+#include <linux/config.h>
-+#include <linux/init.h>
-+#include <linux/xattr.h>
-+
-+/* Magic value in header */
-+#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */
-+
-+struct reiserfs_xattr_header {
-+    __u32 h_magic;              /* magic number for identification */
-+    __u32 h_hash;               /* hash of the value */
-+};
-+
-+#ifdef __KERNEL__
-+
-+struct reiserfs_xattr_handler {
-+      char *prefix;
-+      int (*get)(struct inode *inode, const char *name, void *buffer,
-+                 size_t size);
-+      int (*set)(struct inode *inode, const char *name, const void *buffer,
-+                 size_t size, int flags);
-+      int (*del)(struct inode *inode, const char *name);
-+        int (*list)(struct inode *inode, const char *name, int namelen, char *out);
-+        struct reiserfs_xattr_handler *next;
-+};
-+
-+
-+#ifdef CONFIG_REISERFS_FS_XATTR
-+#define is_reiserfs_priv_object(inode) (((inode)->u.reiserfs_i.i_flags & i_priv_object) == i_priv_object)
-+ssize_t reiserfs_getxattr (struct dentry *dentry, const char *name,
-+                         void *buffer, size_t size);
-+int reiserfs_setxattr (struct dentry *dentry, const char *name,
-+                       const void *value, size_t size, int flags);
-+ssize_t reiserfs_listxattr (struct dentry *dentry, char *buffer, size_t size);
-+int reiserfs_removexattr (struct dentry *dentry, const char *name);
-+int reiserfs_delete_xattrs (struct inode *inode);
-+int reiserfs_chown_xattrs (struct inode *inode, struct iattr *attrs);
-+int reiserfs_xattr_init (struct super_block *sb, int mount_flags);
-+
-+static inline void
-+reiserfs_write_lock_xattrs(struct super_block *sb)
-+{
-+    down_write (&REISERFS_XATTR_DIR_SEM(sb));
-+}
-+static inline void
-+reiserfs_write_unlock_xattrs(struct super_block *sb)
-+{
-+    up_write (&REISERFS_XATTR_DIR_SEM(sb));
-+}
-+static inline void
-+reiserfs_read_lock_xattrs(struct super_block *sb)
-+{
-+    down_read (&REISERFS_XATTR_DIR_SEM(sb));
-+}
-+static inline void
-+reiserfs_read_unlock_xattrs(struct super_block *sb)
-+{
-+    up_read (&REISERFS_XATTR_DIR_SEM(sb));
-+}
-+#else
-+#define is_reiserfs_priv_object(inode) 0
-+#define reiserfs_getxattr NULL
-+#define reiserfs_setxattr NULL
-+#define reiserfs_listxattr NULL
-+#define reiserfs_removexattr NULL
-+#define reiserfs_write_lock_xattrs(sb)
-+#define reiserfs_write_unlock_xattrs(sb)
-+#define reiserfs_read_lock_xattrs(sb)
-+#define reiserfs_read_unlock_xattrs(sb)
-+static inline int
-+reiserfs_xattr_init (struct super_block *s, int mount_flags)
-+{
-+    return 0;
-+}
-+
-+static inline int
-+reiserfs_delete_xattrs (struct inode *inode)
-+{
-+    return 0;
-+}
-+
-+static inline int
-+reiserfs_chown_xattrs (struct inode *inode, struct iattr *attrs)
-+{
-+    return 0;
-+}
-+#endif
-+
-+extern int reiserfs_xattr_register_handler(struct reiserfs_xattr_handler *);
-+extern int reiserfs_xattr_unregister_handler(struct reiserfs_xattr_handler *);
-+extern int reiserfs_xattr_del (struct inode *, const char *);
-+extern int reiserfs_xattr_get (const struct inode *, const char *, void *, size_t);
-+extern int reiserfs_xattr_set (struct inode *, const char *, const void *,
-+                               size_t, int);
-+#ifdef CONFIG_REISERFS_FS_XATTR_USER
-+extern int reiserfs_xattr_user_init (void) __init;
-+extern int reiserfs_xattr_user_exit (void);
-+#else
-+static inline int
-+reiserfs_xattr_user_init (void)
-+{
-+    return 0;
-+}
-+
-+static inline int
-+reiserfs_xattr_user_exit (void)
-+{
-+    return 0;
-+}
-+#endif
-+#endif  /* __KERNEL__ */
diff --git a/02-reiserfs-acl-2.4.23+datalogging+quota-03 b/02-reiserfs-acl-2.4.23+datalogging+quota-03
deleted file mode 100644 (file)
index bcd8e39..0000000
+++ /dev/null
@@ -1,1208 +0,0 @@
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/Makefile linux-2.4.23.xattr/Makefile
---- linux-2.4.23.datalogging+quota/Makefile    2003-12-11 12:53:17.834531104 -0500
-+++ linux-2.4.23.xattr/Makefile        2003-12-11 13:03:06.815992312 -0500
-@@ -100,7 +100,7 @@
- CPPFLAGS := -D__KERNEL__ -I$(HPATH)
-
- CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
--        -fno-strict-aliasing -fno-common
-+        -fno-strict-aliasing -fno-common -Wno-sign-compare
- CFLAGS += -fno-builtin-sprintf
- ifndef CONFIG_FRAME_POINTER
- CFLAGS += -fomit-frame-pointer
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/Config.in linux-2.4.23.xattr/fs/Config.in
---- linux-2.4.23.datalogging+quota/fs/Config.in        2003-12-11 13:00:09.957878832 -0500
-+++ linux-2.4.23.xattr/fs/Config.in    2003-12-11 13:00:17.428743088 -0500
-@@ -15,6 +15,7 @@ dep_mbool '  Enable reiserfs debug mode'
- dep_mbool '  Stats in /proc/fs/reiserfs' CONFIG_REISERFS_PROC_INFO $CONFIG_REISERFS_FS
- dep_mbool '  ReiserFS extended attributes' CONFIG_REISERFS_FS_XATTR $CONFIG_REISERFS_FS
- dep_mbool '  ReiserFS extended user attributes' CONFIG_REISERFS_FS_XATTR_USER $CONFIG_REISERFS_FS_XATTR
-+dep_mbool '  ReiserFS POSIX Access Control Lists' CONFIG_REISERFS_FS_POSIX_ACL $CONFIG_REISERFS_FS_XATTR $CONFIG_FS_POSIX_ACL
- dep_tristate 'ADFS file system support (EXPERIMENTAL)' CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
- dep_mbool '  ADFS write support (DANGEROUS)' CONFIG_ADFS_FS_RW $CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/Makefile linux-2.4.23.xattr/fs/reiserfs/Makefile
---- linux-2.4.23.datalogging+quota/fs/reiserfs/Makefile        2003-12-11 13:00:09.958878680 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/Makefile    2003-12-11 13:00:17.429742936 -0500
-@@ -14,6 +14,7 @@ lbalance.o ibalance.o stree.o hashes.o b
- obj-$(CONFIG_REISERFS_FS_XATTR) += xattr.o
- obj-$(CONFIG_REISERFS_FS_XATTR_USER) += xattr_user.o
-+obj-$(CONFIG_REISERFS_FS_POSIX_ACL) += xattr_acl.o
- obj-m   := $(O_TARGET)
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/file.c linux-2.4.23.xattr/fs/reiserfs/file.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/file.c  2003-12-11 13:00:09.958878680 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/file.c      2003-12-11 13:00:17.429742936 -0500
-@@ -5,6 +5,7 @@
- #include <linux/sched.h>
- #include <linux/reiserfs_fs.h>
-+#include <linux/reiserfs_acl.h>
- #include <linux/reiserfs_xattr.h>
- #include <linux/smp_lock.h>
- #include <linux/quotaops.h>
-@@ -178,6 +179,7 @@ struct  inode_operations reiserfs_file_i
-     getxattr:   reiserfs_getxattr, 
-     listxattr:   reiserfs_listxattr, 
-     removexattr:   reiserfs_removexattr, 
-+    permission: reiserfs_permission,
- };
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/inode.c linux-2.4.23.xattr/fs/reiserfs/inode.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/inode.c 2003-12-11 13:00:09.961878224 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/inode.c     2003-12-11 13:04:08.957545360 -0500
-@@ -7,6 +7,7 @@
- #include <linux/fs.h>
- #include <linux/reiserfs_fs.h>
- #include <linux/reiserfs_xattr.h>
-+#include <linux/reiserfs_acl.h>
- #include <linux/quotaops.h>
- #include <linux/locks.h>
- #include <linux/smp_lock.h>
-@@ -1851,6 +1852,18 @@ int reiserfs_new_inode (struct reiserfs_
-       goto out_inserted_sd;
-     }
-+    if (reiserfs_posixacl (inode->i_sb)) {
-+        retval = reiserfs_inherit_default_acl (dir, dentry, inode);
-+        if (retval) {
-+            iput (inode);
-+            err = retval;
-+            reiserfs_check_path(&path_to_key) ;
-+            goto out_inserted_sd;
-+        }
-+    } else if (inode->i_sb->s_flags & MS_POSIXACL) {
-+        reiserfs_warning (inode->i_sb, "ACLs aren't enabled in the fs, but vfs thinks they are!\n");
-+    }
-+
-     insert_inode_hash (inode);
-     reiserfs_update_sd(th, inode) ;
-     reiserfs_check_path(&path_to_key) ;
-@@ -2753,6 +2766,15 @@ int reiserfs_setattr(struct dentry *dent
-       if (!error)
-           error = inode_setattr(inode, attr) ;
-+        if (!error && reiserfs_posixacl (inode->i_sb)) {
-+            if (attr->ia_valid & ATTR_MODE) {
-+                if (!(attr->ia_valid & ATTR_SIZE))
-+                    down (&inode->i_sem);
-+                error = reiserfs_acl_chmod (inode);
-+                if (!(attr->ia_valid & ATTR_SIZE))
-+                    up (&inode->i_sem);
-+            }
-+        }
-     }
-     return error ;
- }
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/namei.c linux-2.4.23.xattr/fs/reiserfs/namei.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/namei.c 2003-12-11 13:00:09.962878072 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/namei.c     2003-12-11 13:00:17.434742176 -0500
-@@ -6,6 +6,7 @@
- #include <linux/sched.h>
- #include <linux/bitops.h>
- #include <linux/reiserfs_fs.h>
-+#include <linux/reiserfs_acl.h>
- #include <linux/reiserfs_xattr.h>
- #include <linux/smp_lock.h>
- #include <linux/quotaops.h>
-@@ -546,6 +547,7 @@ static int reiserfs_create (struct inode
-     struct inode * inode;
-     int jbegin_count = JOURNAL_PER_BALANCE_CNT * 2 ;
-     struct reiserfs_transaction_handle th ;
-+    int locked;
-     if (!(inode = new_inode(dir->i_sb))) {
-       return -ENOMEM ;
-@@ -554,6 +556,10 @@ static int reiserfs_create (struct inode
-     if (retval)
-       return retval ;
-+    locked = reiserfs_cache_default_acl (dir);
-+    if (locked)
-+      reiserfs_write_lock_xattrs (dir->i_sb);
-+
-     journal_begin(&th, dir->i_sb, jbegin_count) ;
-     retval = reiserfs_new_inode (&th, dir, mode, 0, 0/*i_size*/, dentry, inode);
-     if (retval) {
-@@ -566,6 +572,9 @@ static int reiserfs_create (struct inode
-     retval = reiserfs_add_entry (&th, dir, dentry->d_name.name, dentry->d_name.len, 
-                               inode, 1/*visible*/);
-+    if (locked)
-+      reiserfs_write_unlock_xattrs (dir->i_sb);
-+
-     if (retval) {
-       inode->i_nlink--;
-       reiserfs_update_sd (&th, inode);
-@@ -591,6 +600,7 @@ static int reiserfs_mknod (struct inode 
-     struct inode * inode;
-     struct reiserfs_transaction_handle th ;
-     int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
-+    int locked;
-     if (!(inode = new_inode(dir->i_sb))) {
-       return -ENOMEM ;
-@@ -599,9 +609,17 @@ static int reiserfs_mknod (struct inode 
-     if (retval)
-         return retval ;
-+    locked = reiserfs_cache_default_acl (dir);
-+    if (locked)
-+        reiserfs_write_lock_xattrs (inode->i_sb);
-+
-     journal_begin(&th, dir->i_sb, jbegin_count) ;
-     retval = reiserfs_new_inode(&th, dir, mode, 0, 0/*i_size*/, dentry, inode);
-+
-+    if (locked)
-+      reiserfs_write_unlock_xattrs (inode->i_sb);
-+
-     if (retval) {
-       goto out_failed; 
-     }
-@@ -639,6 +657,7 @@ static int reiserfs_mkdir (struct inode 
-     struct inode * inode;
-     struct reiserfs_transaction_handle th ;
-     int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
-+    int locked;
-     mode = S_IFDIR | mode;
-     if (!(inode = new_inode(dir->i_sb))) {
-@@ -648,6 +667,10 @@ static int reiserfs_mkdir (struct inode 
-     if (retval)
-       return retval ;
-+    locked = reiserfs_cache_default_acl (dir);
-+    if (locked)
-+        reiserfs_write_lock_xattrs (inode->i_sb);
-+
-     journal_begin(&th, dir->i_sb, jbegin_count) ;
-     /* inc the link count now, so another writer doesn't overflow it while
-@@ -663,6 +686,9 @@ static int reiserfs_mkdir (struct inode 
-                               old_format_only (dir->i_sb) ?
-                               EMPTY_DIR_SIZE_V1 : EMPTY_DIR_SIZE,
-                               dentry, inode) ;
-+    if (locked)
-+        reiserfs_write_unlock_xattrs (inode->i_sb);
-+
-     if (retval) {
-       dir->i_nlink-- ;
-       goto out_failed ;
-@@ -908,6 +934,8 @@ static int reiserfs_symlink (struct inod
-     memcpy (name, symname, strlen (symname));
-     padd_item (name, item_len, strlen (symname));
-+    /* We would inherit the default ACL here, but symlinks don't get ACLs */
-+
-     journal_begin(&th, parent_dir->i_sb, jbegin_count) ;
-     retval = reiserfs_new_inode(&th, parent_dir, mode, name,
-@@ -1297,6 +1325,7 @@ struct inode_operations reiserfs_dir_ino
-     getxattr:   reiserfs_getxattr, 
-     listxattr:   reiserfs_listxattr, 
-     removexattr:   reiserfs_removexattr, 
-+    permission: reiserfs_permission,
- };
- /*
-@@ -1311,4 +1340,5 @@ struct inode_operations reiserfs_symlink
-     getxattr:       reiserfs_getxattr,
-     listxattr:      reiserfs_listxattr,
-     removexattr:    reiserfs_removexattr,
-+    permission: reiserfs_permission,
- };
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/super.c linux-2.4.23.xattr/fs/reiserfs/super.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/super.c 2003-12-11 13:00:09.963877920 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/super.c     2003-12-11 13:00:17.435742024 -0500
-@@ -9,6 +9,7 @@
- #include <linux/vmalloc.h>
- #include <asm/uaccess.h>
- #include <linux/reiserfs_fs.h>
-+#include <linux/reiserfs_acl.h>
- #include <linux/reiserfs_xattr.h>
- #include <linux/smp_lock.h>
- #include <linux/locks.h>
-@@ -430,6 +431,22 @@ static void reiserfs_dirty_inode (struct
-     unlock_kernel() ;
- }
-+static void reiserfs_clear_inode (struct inode *inode)
-+{
-+    struct posix_acl *acl;
-+
-+    acl = inode->u.reiserfs_i.i_acl_access;
-+    if (acl && !IS_ERR (acl))
-+        posix_acl_release (acl);
-+    inode->u.reiserfs_i.i_acl_access = NULL;
-+
-+    acl = inode->u.reiserfs_i.i_acl_default;
-+    if (acl && !IS_ERR (acl))
-+        posix_acl_release (acl);
-+    inode->u.reiserfs_i.i_acl_default = NULL;
-+}
-+
-+
- struct super_operations reiserfs_sops = 
- {
-   read_inode: reiserfs_read_inode,
-@@ -437,6 +454,7 @@ struct super_operations reiserfs_sops = 
-   write_inode: reiserfs_write_inode,
-   dirty_inode: reiserfs_dirty_inode,
-   delete_inode: reiserfs_delete_inode,
-+  clear_inode: reiserfs_clear_inode,
-   put_super: reiserfs_put_super,
-   write_super: reiserfs_write_super,
-   write_super_lockfs: reiserfs_write_super_lockfs,
-@@ -655,6 +673,10 @@ static int reiserfs_parse_options (struc
-               {"user_xattr", 0, 0, 1<<REISERFS_XATTRS_USER, 0},
-               {"nouser_xattr", 0, 0, 0, 1<<REISERFS_XATTRS_USER},
- # endif
-+# ifdef CONFIG_REISERFS_FS_POSIX_ACL
-+              {"acl", 0, 0, 1<<REISERFS_POSIXACL, 0},
-+              {"noacl", 0, 0, 0, 1<<REISERFS_POSIXACL},
-+# endif
- #endif
-               {NULL, 0, 0, 0, 0}
-     };
-@@ -774,6 +796,7 @@ static int reiserfs_remount (struct supe
-   safe_mask |= 1 << REISERFS_TEST4;
-   safe_mask |= 1 << REISERFS_ATTRS;
-   safe_mask |= 1 << REISERFS_XATTRS_USER;
-+  safe_mask |= 1 << REISERFS_POSIXACL;
-   /* Update the bitmask, taking care to keep
-    * the bits we're not allowed to change here */
-@@ -1487,8 +1510,14 @@ static int __init init_reiserfs_fs (void
-         if (ret)
-             goto failed_xattr_user_init;
-+        ret = reiserfs_xattr_posix_acl_init ();
-+        if (ret)
-+            goto failed_xattr_posix_acl_init;
-+
-         return register_filesystem(&reiserfs_fs_type);
-+failed_xattr_posix_acl_init:
-+      reiserfs_xattr_user_exit();
- failed_xattr_user_init:
- failed_journal_cache_init:
-       reiserfs_proc_unregister_global( "version" );
-@@ -1503,6 +1532,7 @@ MODULE_LICENSE("GPL");
- static void __exit exit_reiserfs_fs(void)
- {
-+      reiserfs_xattr_posix_acl_exit ();
-       reiserfs_xattr_user_exit ();
-       reiserfs_proc_unregister_global( "version" );
-       reiserfs_proc_info_global_done();
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/xattr.c linux-2.4.23.xattr/fs/reiserfs/xattr.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/xattr.c 2003-12-11 13:00:09.966877464 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/xattr.c     2003-12-11 13:00:17.437741720 -0500
-@@ -6,7 +6,7 @@
-  */
- /*
-- * In order to implement EAs in a clean, backwards compatible manner,
-+ * In order to implement EA/ACLs in a clean, backwards compatible manner,
-  * they are implemented as files in a "private" directory.
-  * Each EA is in it's own file, with the directory layout like so (/ is assumed
-  * to be relative to fs root). Inside the /.reiserfs_priv/xattrs directory,
-@@ -15,12 +15,18 @@
-  * named with the name of the extended attribute.
-  *
-  * So, for objectid 12648430, we could have:
-+ * /.reiserfs_priv/xattrs/C0FFEE.0/system.posix_acl_access
-+ * /.reiserfs_priv/xattrs/C0FFEE.0/system.posix_acl_default
-  * /.reiserfs_priv/xattrs/C0FFEE.0/user.Content-Type
-  * .. or similar.
-  *
-  * The file contents are the text of the EA. The size is known based on the
-  * stat data describing the file.
-  *
-+ * In the case of system.posix_acl_access and system.posix_acl_default, since
-+ * these are special cases for filesystem ACLs, they are interpreted by the
-+ * kernel, in addition, they are negatively and positively cached and attached
-+ * to the inode so that unnecessary lookups are avoided.
-  */
- #include <linux/reiserfs_fs.h>
-@@ -1182,7 +1188,7 @@ reiserfs_xattr_init (struct super_block 
-     /* We need generation numbers to ensure that the oid mapping is correct
-      * v3.5 filesystems don't have them. */
-     if (old_format_only (s)) {
--      reiserfs_warning (s, "reiserfs: xattrs not supported on pre v3.6 "
-+      reiserfs_warning (s, "reiserfs: xattrs/ACLs not supported on pre v3.6 "
-                         "format filesystem. Failing mount.\n");
-       err = -EOPNOTSUPP;
-       goto error;
-@@ -1221,7 +1227,7 @@ reiserfs_xattr_init (struct super_block 
-            * created. Not an error -- just no xattrs on the fs. We'll
-            * check again if we go read-write */
-           if (!(mount_flags & MS_RDONLY)) {
--              reiserfs_warning (s, "reiserfs: xattrs enabled and couldn't "
-+              reiserfs_warning (s, "reiserfs: xattrs/ACLs enabled and couldn't "
-                              "find/create .reiserfs_priv. Failing mount.\n");
-             err = -EOPNOTSUPP;
-             goto error;
-@@ -1230,6 +1236,7 @@ reiserfs_xattr_init (struct super_block 
-            * we're read-only */
-           clear_bit (REISERFS_XATTRS, &(s->u.reiserfs_sb.s_mount_opt));
-           clear_bit (REISERFS_XATTRS_USER, &(s->u.reiserfs_sb.s_mount_opt));
-+          clear_bit (REISERFS_POSIXACL, &(s->u.reiserfs_sb.s_mount_opt));
-       }
-     }
-   }
-@@ -1241,6 +1248,10 @@ error:
-     if (err) {
-           clear_bit (REISERFS_XATTRS, &(s->u.reiserfs_sb.s_mount_opt));
-           clear_bit (REISERFS_XATTRS_USER, &(s->u.reiserfs_sb.s_mount_opt));
-+          clear_bit (REISERFS_POSIXACL, &(s->u.reiserfs_sb.s_mount_opt));
-     }
-+
-+    s->s_flags = (s->s_flags & ~MS_POSIXACL) |
-+                 (reiserfs_posixacl (s) ? MS_POSIXACL : 0);
-     return err;
- }
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/xattr_acl.c linux-2.4.23.xattr/fs/reiserfs/xattr_acl.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/xattr_acl.c     1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/xattr_acl.c 2003-12-11 13:00:17.438741568 -0500
-@@ -0,0 +1,653 @@
-+#include <linux/posix_acl.h>
-+#include <linux/reiserfs_fs.h>
-+#include <linux/errno.h>
-+#include <linux/fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/xattr.h>
-+#include <linux/xattr_acl.h>
-+#include <linux/reiserfs_xattr.h>
-+#include <linux/reiserfs_acl.h>
-+#include <asm/uaccess.h>
-+
-+static int
-+xattr_set_acl(struct inode *inode, int type, const void *value, size_t size)
-+{
-+      struct posix_acl *acl;
-+      int error;
-+
-+      if (!reiserfs_posixacl(inode->i_sb))
-+              return -EOPNOTSUPP;
-+      if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))
-+              return -EPERM;
-+
-+      if (value) {
-+              acl = posix_acl_from_xattr(value, size);
-+              if (IS_ERR(acl)) {
-+                      return PTR_ERR(acl);
-+              } else if (acl) {
-+                      error = posix_acl_valid(acl);
-+                      if (error)
-+                              goto release_and_out;
-+              }
-+      } else
-+              acl = NULL;
-+
-+      error = reiserfs_set_acl (inode, type, acl);
-+
-+release_and_out:
-+      posix_acl_release(acl);
-+      return error;
-+}
-+
-+
-+static int
-+xattr_get_acl(struct inode *inode, int type, void *buffer, size_t size)
-+{
-+      struct posix_acl *acl;
-+      int error;
-+
-+      if (!reiserfs_posixacl(inode->i_sb))
-+              return -EOPNOTSUPP;
-+
-+      acl = reiserfs_get_acl (inode, type);
-+      if (IS_ERR(acl))
-+              return PTR_ERR(acl);
-+      if (acl == NULL)
-+              return -ENODATA;
-+      error = posix_acl_to_xattr(acl, buffer, size);
-+      posix_acl_release(acl);
-+
-+      return error;
-+}
-+
-+
-+/*
-+ * Convert from filesystem to in-memory representation.
-+ */
-+static struct posix_acl *
-+posix_acl_from_disk(const void *value, size_t size)
-+{
-+      const char *end = (char *)value + size;
-+      int n, count;
-+      struct posix_acl *acl;
-+
-+      if (!value)
-+              return NULL;
-+      if (size < sizeof(reiserfs_acl_header))
-+               return ERR_PTR(-EINVAL);
-+      if (((reiserfs_acl_header *)value)->a_version !=
-+          cpu_to_le32(REISERFS_ACL_VERSION))
-+              return ERR_PTR(-EINVAL);
-+      value = (char *)value + sizeof(reiserfs_acl_header);
-+      count = reiserfs_acl_count(size);
-+      if (count < 0)
-+              return ERR_PTR(-EINVAL);
-+      if (count == 0)
-+              return NULL;
-+      acl = posix_acl_alloc(count, GFP_NOFS);
-+      if (!acl)
-+              return ERR_PTR(-ENOMEM);
-+      for (n=0; n < count; n++) {
-+              reiserfs_acl_entry *entry =
-+                      (reiserfs_acl_entry *)value;
-+              if ((char *)value + sizeof(reiserfs_acl_entry_short) > end)
-+                      goto fail;
-+              acl->a_entries[n].e_tag  = le16_to_cpu(entry->e_tag);
-+              acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm);
-+              switch(acl->a_entries[n].e_tag) {
-+                      case ACL_USER_OBJ:
-+                      case ACL_GROUP_OBJ:
-+                      case ACL_MASK:
-+                      case ACL_OTHER:
-+                              value = (char *)value +
-+                                      sizeof(reiserfs_acl_entry_short);
-+                              acl->a_entries[n].e_id = ACL_UNDEFINED_ID;
-+                              break;
-+
-+                      case ACL_USER:
-+                      case ACL_GROUP:
-+                              value = (char *)value + sizeof(reiserfs_acl_entry);
-+                              if ((char *)value > end)
-+                                      goto fail;
-+                              acl->a_entries[n].e_id =
-+                                      le32_to_cpu(entry->e_id);
-+                              break;
-+
-+                      default:
-+                              goto fail;
-+              }
-+      }
-+      if (value != end)
-+              goto fail;
-+      return acl;
-+
-+fail:
-+      posix_acl_release(acl);
-+      return ERR_PTR(-EINVAL);
-+}
-+
-+/*
-+ * Convert from in-memory to filesystem representation.
-+ */
-+static void *
-+posix_acl_to_disk(const struct posix_acl *acl, size_t *size)
-+{
-+      reiserfs_acl_header *ext_acl;
-+      char *e;
-+      int n;
-+
-+      *size = reiserfs_acl_size(acl->a_count);
-+      ext_acl = (reiserfs_acl_header *)kmalloc(sizeof(reiserfs_acl_header) +
-+              acl->a_count * sizeof(reiserfs_acl_entry), GFP_NOFS);
-+      if (!ext_acl)
-+              return ERR_PTR(-ENOMEM);
-+      ext_acl->a_version = cpu_to_le32(REISERFS_ACL_VERSION);
-+      e = (char *)ext_acl + sizeof(reiserfs_acl_header);
-+      for (n=0; n < acl->a_count; n++) {
-+              reiserfs_acl_entry *entry = (reiserfs_acl_entry *)e;
-+              entry->e_tag  = cpu_to_le16(acl->a_entries[n].e_tag);
-+              entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm);
-+              switch(acl->a_entries[n].e_tag) {
-+                      case ACL_USER:
-+                      case ACL_GROUP:
-+                              entry->e_id =
-+                                      cpu_to_le32(acl->a_entries[n].e_id);
-+                              e += sizeof(reiserfs_acl_entry);
-+                              break;
-+
-+                      case ACL_USER_OBJ:
-+                      case ACL_GROUP_OBJ:
-+                      case ACL_MASK:
-+                      case ACL_OTHER:
-+                              e += sizeof(reiserfs_acl_entry_short);
-+                              break;
-+
-+                      default:
-+                              goto fail;
-+              }
-+      }
-+      return (char *)ext_acl;
-+
-+fail:
-+      kfree(ext_acl);
-+      return ERR_PTR(-EINVAL);
-+}
-+
-+/*
-+ * Inode operation get_posix_acl().
-+ *
-+ * inode->i_sem: down
-+ * BKL held [before 2.5.x]
-+ */
-+struct posix_acl *
-+reiserfs_get_acl(struct inode *inode, int type)
-+{
-+      char *name, *value;
-+      struct posix_acl *acl, **p_acl;
-+      size_t size;
-+      int retval;
-+
-+        switch (type) {
-+            case ACL_TYPE_ACCESS:
-+                name = XATTR_NAME_ACL_ACCESS;
-+                p_acl = &inode->u.reiserfs_i.i_acl_access;
-+                break;
-+            case ACL_TYPE_DEFAULT:
-+                name = XATTR_NAME_ACL_DEFAULT;
-+                p_acl = &inode->u.reiserfs_i.i_acl_default;
-+                break;
-+            default:
-+                return ERR_PTR (-EINVAL);
-+        }
-+
-+        if (IS_ERR (*p_acl)) {
-+            if (PTR_ERR (*p_acl) == -ENODATA)
-+                return NULL;
-+        } else if (*p_acl != NULL)
-+            return posix_acl_dup (*p_acl);
-+
-+        size = reiserfs_xattr_get (inode, name, NULL, 0);
-+        if ((int)size < 0) {
-+            if (size == -ENODATA || size == -ENOSYS) {
-+              *p_acl = ERR_PTR (-ENODATA);
-+              return NULL;
-+            }
-+            return ERR_PTR (size);
-+        }
-+
-+        value = kmalloc (size, GFP_NOFS);
-+        if (!value)
-+            return ERR_PTR (-ENOMEM);
-+
-+      retval = reiserfs_xattr_get(inode, name, value, size);
-+      if (retval == -ENODATA || retval == -ENOSYS) {
-+              /* This shouldn't actually happen as it should have
-+                 been caught above.. but just in case */
-+              acl = NULL;
-+              *p_acl = ERR_PTR (-ENODATA);
-+        } else if (retval < 0) {
-+              acl = ERR_PTR(retval);
-+      } else {
-+              acl = posix_acl_from_disk(value, retval);
-+              *p_acl = posix_acl_dup (acl);
-+        }
-+
-+      kfree(value);
-+      return acl;
-+}
-+
-+/*
-+ * Inode operation set_posix_acl().
-+ *
-+ * inode->i_sem: down
-+ * BKL held [before 2.5.x]
-+ */
-+int
-+reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
-+{
-+        char *name;
-+      void *value = NULL;
-+      struct posix_acl **p_acl;
-+      size_t size;
-+      int error;
-+
-+      if (S_ISLNK(inode->i_mode))
-+              return -EOPNOTSUPP;
-+
-+
-+        switch (type) {
-+            case ACL_TYPE_ACCESS:
-+                name = XATTR_NAME_ACL_ACCESS;
-+                p_acl = &inode->u.reiserfs_i.i_acl_access;
-+                if (acl) {
-+                    mode_t mode = inode->i_mode;
-+                    error = posix_acl_equiv_mode (acl, &mode);
-+                    if (error < 0)
-+                        return error;
-+                    else {
-+                        inode->i_mode = mode;
-+                        if (error == 0)
-+                            acl = NULL;
-+                    }
-+                }
-+                break;
-+            case ACL_TYPE_DEFAULT:
-+                name = XATTR_NAME_ACL_DEFAULT;
-+                p_acl = &inode->u.reiserfs_i.i_acl_default;
-+                if (!S_ISDIR (inode->i_mode))
-+                    return acl ? -EACCES : 0;
-+                break;
-+            default:
-+                return -EINVAL;
-+        }
-+
-+      if (acl) {
-+            value = posix_acl_to_disk(acl, &size);
-+            if (IS_ERR(value))
-+                return (int)PTR_ERR(value);
-+            error = reiserfs_xattr_set(inode, name, value, size, 0);
-+      } else {
-+            error = reiserfs_xattr_del (inode, name);
-+            if (error == -ENODATA)
-+                error = 0;
-+        }
-+
-+      if (value)
-+              kfree(value);
-+
-+        if (!error) {
-+            /* Release the old one */
-+            if (!IS_ERR (*p_acl) && *p_acl)
-+                posix_acl_release (*p_acl);
-+
-+            if (acl == NULL)
-+                *p_acl = ERR_PTR (-ENODATA);
-+            else 
-+                *p_acl = posix_acl_dup (acl);
-+        }
-+
-+      return error;
-+}
-+
-+/* dir->i_sem: down,
-+ * inode is new and not released into the wild yet */
-+int
-+reiserfs_inherit_default_acl (struct inode *dir, struct dentry *dentry, struct inode *inode)
-+{
-+    struct posix_acl *acl;
-+    int err = 0;
-+
-+    /* ACLs only get applied to files and directories */
-+    if (S_ISLNK (inode->i_mode))
-+        return 0;
-+
-+    /* ACLs can only be used on "new" objects, so if it's an old object
-+     * there is nothing to inherit from */
-+    if (get_inode_sd_version (dir) == STAT_DATA_V1)
-+        goto apply_umask;
-+
-+    /* Don't apply ACLs to objects in the .reiserfs_priv tree.. This
-+     * would be useless since permissions are ignored, and a pain because
-+     * it introduces locking cycles */
-+    if (is_reiserfs_priv_object (dir)) {
-+        inode->u.reiserfs_i.i_flags |= i_priv_object;
-+        goto apply_umask;
-+    }
-+
-+    acl = reiserfs_get_acl (dir, ACL_TYPE_DEFAULT);
-+    if (IS_ERR (acl)) {
-+        if (PTR_ERR (acl) == -ENODATA)
-+            goto apply_umask;
-+        return PTR_ERR (acl);
-+    }
-+
-+    if (acl) {
-+        struct posix_acl *acl_copy;
-+        mode_t mode = inode->i_mode;
-+        int need_acl;
-+
-+        /* Copy the default ACL to the default ACL of a new directory */
-+        if (S_ISDIR (inode->i_mode)) {
-+            err = reiserfs_set_acl (inode, ACL_TYPE_DEFAULT, acl);
-+            if (err)
-+                goto cleanup;
-+        }
-+
-+        /* Now we reconcile the new ACL and the mode,
-+           potentially modifying both */
-+        acl_copy = posix_acl_clone (acl, GFP_NOFS);
-+        if (!acl_copy) {
-+            err = -ENOMEM;
-+            goto cleanup;
-+        }
-+
-+
-+        need_acl = posix_acl_create_masq (acl_copy, &mode);
-+        if (need_acl >= 0) {
-+            if (mode != inode->i_mode) {
-+                inode->i_mode = mode;
-+            }
-+
-+            /* If we need an ACL.. */
-+            if (need_acl > 0) {
-+                err = reiserfs_set_acl (inode, ACL_TYPE_ACCESS, acl_copy);
-+                if (err) 
-+                    goto cleanup_copy;
-+            }
-+        }
-+cleanup_copy:
-+        posix_acl_release (acl_copy);
-+cleanup:
-+        posix_acl_release (acl);
-+    } else {
-+apply_umask:
-+        /* no ACL, apply umask */
-+        inode->i_mode &= ~current->fs->umask;
-+    }
-+
-+    return err;
-+}
-+
-+/* Looks up and caches the result of the default ACL.
-+ * We do this so that we don't need to carry the xattr_sem into
-+ * reiserfs_new_inode if we don't need to */
-+int
-+reiserfs_cache_default_acl (struct inode *inode)
-+{
-+    int ret = 0;
-+    if (reiserfs_posixacl (inode->i_sb) &&
-+        !is_reiserfs_priv_object (inode)) {
-+        struct posix_acl *acl;
-+        reiserfs_read_lock_xattrs (inode->i_sb);
-+        acl = reiserfs_get_acl (inode, ACL_TYPE_DEFAULT);
-+        reiserfs_read_unlock_xattrs (inode->i_sb);
-+        ret = acl ? 1 : 0;
-+        posix_acl_release (acl);
-+    }
-+
-+    return ret;
-+}
-+
-+static int
-+__reiserfs_permission (struct inode *inode, int mask, int need_lock)
-+{
-+      int mode = inode->i_mode;
-+
-+      /* Nobody gets write access to a read-only fs */
-+      if ((mask & MAY_WRITE) && IS_RDONLY(inode) &&
-+          (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)))
-+              return -EROFS;
-+
-+      /* Nobody gets write access to an immutable file */
-+      if ((mask & MAY_WRITE) && IS_IMMUTABLE(inode))
-+          return -EACCES;
-+
-+        /* We don't do permission checks on the internal objects.
-+         * Permissions are determined by the "owning" object. */
-+        if (is_reiserfs_priv_object (inode))
-+            return 0;
-+
-+      if (current->fsuid == inode->i_uid) {
-+              mode >>= 6;
-+      } else if (reiserfs_posixacl(inode->i_sb) &&
-+                   get_inode_sd_version (inode) != STAT_DATA_V1) {
-+                struct posix_acl *acl;
-+
-+              /* ACL can't contain additional permissions if
-+                 the ACL_MASK entry is 0 */
-+              if (!(mode & S_IRWXG))
-+                      goto check_groups;
-+
-+                if (need_lock)
-+                    reiserfs_read_lock_xattrs (inode->i_sb);
-+                acl = reiserfs_get_acl (inode, ACL_TYPE_ACCESS);
-+                if (need_lock)
-+                    reiserfs_read_unlock_xattrs (inode->i_sb);
-+                if (IS_ERR (acl)) {
-+                    if (PTR_ERR (acl) == -ENODATA)
-+                        goto check_groups;
-+                    return PTR_ERR (acl);
-+                }
-+
-+                if (acl) {
-+                    int err = posix_acl_permission (inode, acl, mask);
-+                    posix_acl_release (acl);
-+                    if (err == -EACCES) {
-+                        goto check_capabilities;
-+                    }
-+                    return err;
-+              } else {
-+                      goto check_groups;
-+                }
-+
-+      } else {
-+check_groups:
-+              if (in_group_p(inode->i_gid))
-+                      mode >>= 3;
-+      }
-+      if ((mode & mask & S_IRWXO) == mask)
-+              return 0;
-+
-+check_capabilities:
-+       /* Allowed to override Discretionary Access Control? */
-+        if ((mask & (MAY_READ|MAY_WRITE)) || (inode->i_mode & S_IXUGO))
-+                if (capable(CAP_DAC_OVERRIDE))
-+                        return 0;
-+        /* Read and search granted if capable(CAP_DAC_READ_SEARCH) */
-+        if (capable(CAP_DAC_READ_SEARCH) && ((mask == MAY_READ) ||
-+            (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))))
-+                return 0;
-+      return -EACCES;
-+}
-+
-+int
-+reiserfs_permission (struct inode *inode, int mask)
-+{
-+    return __reiserfs_permission (inode, mask, 1);
-+}
-+
-+int
-+reiserfs_permission_locked (struct inode *inode, int mask)
-+{
-+    return __reiserfs_permission (inode, mask, 0);
-+}
-+
-+int
-+reiserfs_acl_chmod (struct inode *inode)
-+{
-+        struct posix_acl *acl, *clone;
-+        int error;
-+
-+        if (S_ISLNK(inode->i_mode))
-+                return -EOPNOTSUPP;
-+
-+      if (get_inode_sd_version (inode) == STAT_DATA_V1 ||
-+          !reiserfs_posixacl(inode->i_sb))
-+        {
-+          return 0;
-+      }
-+
-+        reiserfs_read_lock_xattrs (inode->i_sb);
-+        acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
-+        reiserfs_read_unlock_xattrs (inode->i_sb);
-+        if (!acl)
-+                return 0;
-+        if (IS_ERR(acl))
-+                return PTR_ERR(acl);
-+        clone = posix_acl_clone(acl, GFP_NOFS);
-+        posix_acl_release(acl);
-+        if (!clone)
-+                return -ENOMEM;
-+        error = posix_acl_chmod_masq(clone, inode->i_mode);
-+        if (!error) {
-+                reiserfs_write_lock_xattrs (inode->i_sb);
-+                error = reiserfs_set_acl(inode, ACL_TYPE_ACCESS, clone);
-+                reiserfs_write_unlock_xattrs (inode->i_sb);
-+        }
-+        posix_acl_release(clone);
-+        return error;
-+}
-+
-+static int
-+posix_acl_access_get(struct inode *inode, const char *name,
-+                        void *buffer, size_t size)
-+{
-+      if (strlen(name) != sizeof(XATTR_NAME_ACL_ACCESS)-1)
-+              return -EINVAL;
-+      return xattr_get_acl(inode, ACL_TYPE_ACCESS, buffer, size);
-+}
-+
-+static int
-+posix_acl_access_set(struct inode *inode, const char *name,
-+                        const void *value, size_t size, int flags)
-+{
-+      if (strlen(name) != sizeof(XATTR_NAME_ACL_ACCESS)-1)
-+              return -EINVAL;
-+      return xattr_set_acl(inode, ACL_TYPE_ACCESS, value, size);
-+}
-+
-+static int
-+posix_acl_access_del (struct inode *inode, const char *name)
-+{
-+    struct posix_acl **acl = &inode->u.reiserfs_i.i_acl_access;
-+    if (strlen(name) != sizeof(XATTR_NAME_ACL_ACCESS)-1)
-+      return -EINVAL;
-+    if (!IS_ERR (*acl) && *acl) {
-+        posix_acl_release (*acl);
-+        *acl = ERR_PTR (-ENODATA);
-+    }
-+
-+    return 0;
-+}
-+
-+static int
-+posix_acl_access_list (struct inode *inode, const char *name, int namelen, char *out)
-+{
-+    int len = namelen;
-+    if (!reiserfs_posixacl (inode->i_sb))
-+        return 0;
-+    if (out)
-+        memcpy (out, name, len);
-+
-+    return len;
-+}
-+
-+struct reiserfs_xattr_handler posix_acl_access_handler = {
-+    prefix: XATTR_NAME_ACL_ACCESS,
-+    get: posix_acl_access_get,
-+    set: posix_acl_access_set,
-+    del: posix_acl_access_del,
-+    list: posix_acl_access_list,
-+};
-+
-+static int
-+posix_acl_default_get (struct inode *inode, const char *name,
-+                         void *buffer, size_t size)
-+{
-+      if (strlen(name) != sizeof(XATTR_NAME_ACL_DEFAULT)-1)
-+              return -EINVAL;
-+      return xattr_get_acl(inode, ACL_TYPE_DEFAULT, buffer, size);
-+}
-+
-+static int
-+posix_acl_default_set(struct inode *inode, const char *name,
-+                         const void *value, size_t size, int flags)
-+{
-+      if (strlen(name) != sizeof(XATTR_NAME_ACL_DEFAULT)-1)
-+              return -EINVAL;
-+      return xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size);
-+}
-+
-+static int
-+posix_acl_default_del (struct inode *inode, const char *name)
-+{
-+    struct posix_acl **acl = &inode->u.reiserfs_i.i_acl_default;
-+    if (strlen(name) != sizeof(XATTR_NAME_ACL_DEFAULT)-1)
-+      return -EINVAL;
-+    if (!IS_ERR (*acl) && *acl) {
-+        posix_acl_release (*acl);
-+        *acl = ERR_PTR (-ENODATA);
-+    }
-+
-+    return 0;
-+}
-+
-+static int
-+posix_acl_default_list (struct inode *inode, const char *name, int namelen, char *out)
-+{
-+    int len = namelen;
-+    if (!reiserfs_posixacl (inode->i_sb))
-+        return 0;
-+    if (out)
-+        memcpy (out, name, len);
-+
-+    return len;
-+}
-+
-+struct reiserfs_xattr_handler posix_acl_default_handler = {
-+    prefix: XATTR_NAME_ACL_DEFAULT,
-+    get: posix_acl_default_get,
-+    set: posix_acl_default_set,
-+    del: posix_acl_default_del,
-+    list: posix_acl_default_list,
-+};
-+
-+int __init
-+reiserfs_xattr_posix_acl_init (void)
-+{
-+    int err;
-+    err = reiserfs_xattr_register_handler (&posix_acl_access_handler);
-+    if (!err)
-+        err = reiserfs_xattr_register_handler (&posix_acl_default_handler);
-+    return err;
-+}
-+
-+int
-+reiserfs_xattr_posix_acl_exit (void)
-+{
-+    int err;
-+    err = reiserfs_xattr_unregister_handler (&posix_acl_access_handler);
-+    if (!err)
-+        err = reiserfs_xattr_unregister_handler (&posix_acl_default_handler);
-+    return err;
-+}
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/fs/reiserfs/xattr_user.c linux-2.4.23.xattr/fs/reiserfs/xattr_user.c
---- linux-2.4.23.datalogging+quota/fs/reiserfs/xattr_user.c    2003-12-11 13:00:09.967877312 -0500
-+++ linux-2.4.23.xattr/fs/reiserfs/xattr_user.c        2003-12-11 13:00:17.439741416 -0500
-@@ -6,6 +6,10 @@
- #include <linux/reiserfs_xattr.h>
- #include <asm/uaccess.h>
-+#ifdef CONFIG_REISERFS_FS_POSIX_ACL
-+# include <linux/reiserfs_acl.h>
-+#endif
-+
- #define XATTR_USER_PREFIX "user."
- static int
-@@ -20,7 +24,7 @@ user_get (struct inode *inode, const cha
-     if (!reiserfs_xattrs_user (inode->i_sb))
-         return -EOPNOTSUPP;
--    error = permission (inode, MAY_READ);
-+    error = reiserfs_permission_locked (inode, MAY_READ);
-     if (error)
-         return error;
-@@ -44,7 +48,7 @@ user_set (struct inode *inode, const cha
-         (!S_ISDIR (inode->i_mode) || inode->i_mode & S_ISVTX))
-         return -EPERM;
--    error = permission (inode, MAY_WRITE);
-+    error = reiserfs_permission_locked (inode, MAY_WRITE);
-     if (error)
-         return error;
-@@ -66,7 +70,7 @@ user_del (struct inode *inode, const cha
-         (!S_ISDIR (inode->i_mode) || inode->i_mode & S_ISVTX))
-         return -EPERM;
--    error = permission (inode, MAY_WRITE);
-+    error = reiserfs_permission_locked (inode, MAY_WRITE);
-     if (error)
-         return error;
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_acl.h linux-2.4.23.xattr/include/linux/reiserfs_acl.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_acl.h        1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_acl.h    2003-12-11 13:02:54.070929856 -0500
-@@ -0,0 +1,92 @@
-+#include <linux/init.h>
-+#include <linux/posix_acl.h>
-+#include <linux/xattr_acl.h>
-+
-+#define REISERFS_ACL_VERSION  0x0001
-+
-+typedef struct {
-+      __u16           e_tag;
-+      __u16           e_perm;
-+      __u32           e_id;
-+} reiserfs_acl_entry;
-+
-+typedef struct {
-+      __u16           e_tag;
-+      __u16           e_perm;
-+} reiserfs_acl_entry_short;
-+
-+typedef struct {
-+      __u32           a_version;
-+} reiserfs_acl_header;
-+
-+static inline size_t reiserfs_acl_size(int count)
-+{
-+      if (count <= 4) {
-+              return sizeof(reiserfs_acl_header) +
-+                     count * sizeof(reiserfs_acl_entry_short);
-+      } else {
-+              return sizeof(reiserfs_acl_header) +
-+                     4 * sizeof(reiserfs_acl_entry_short) +
-+                     (count - 4) * sizeof(reiserfs_acl_entry);
-+      }
-+}
-+
-+static inline int reiserfs_acl_count(size_t size)
-+{
-+      ssize_t s;
-+      size -= sizeof(reiserfs_acl_header);
-+      s = size - 4 * sizeof(reiserfs_acl_entry_short);
-+      if (s < 0) {
-+              if (size % sizeof(reiserfs_acl_entry_short))
-+                      return -1;
-+              return size / sizeof(reiserfs_acl_entry_short);
-+      } else {
-+              if (s % sizeof(reiserfs_acl_entry))
-+                      return -1;
-+              return s / sizeof(reiserfs_acl_entry) + 4;
-+      }
-+}
-+
-+
-+#ifdef CONFIG_REISERFS_FS_POSIX_ACL
-+struct posix_acl * reiserfs_get_acl(struct inode *inode, int type);
-+int reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl);
-+int reiserfs_permission (struct inode *inode, int mask);
-+int reiserfs_permission_locked (struct inode *inode, int mask);
-+int reiserfs_acl_chmod (struct inode *inode);
-+int reiserfs_inherit_default_acl (struct inode *dir, struct dentry *dentry, struct inode *inode);
-+int reiserfs_cache_default_acl (struct inode *dir);
-+extern int reiserfs_xattr_posix_acl_init (void) __init;
-+extern int reiserfs_xattr_posix_acl_exit (void);
-+#else
-+
-+#define reiserfs_permission NULL
-+#define reiserfs_set_acl NULL
-+#define reiserfs_get_acl NULL
-+#define reiserfs_cache_default_acl(inode) 0
-+
-+static inline int
-+reiserfs_xattr_posix_acl_init (void)
-+{
-+    return 0;
-+}
-+
-+static inline int
-+reiserfs_xattr_posix_acl_exit (void)
-+{
-+    return 0;
-+}
-+
-+static inline int
-+reiserfs_acl_chmod (struct inode *inode)
-+{
-+    return 0;
-+}
-+
-+static inline int
-+reiserfs_inherit_default_acl (const struct inode *dir, struct dentry *dentry, struct inode *inode)
-+{
-+    return 0;
-+}
-+
-+#endif
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_i.h linux-2.4.23.xattr/include/linux/reiserfs_fs_i.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_i.h       2003-12-11 13:00:09.969877008 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_fs_i.h   2003-12-11 13:02:51.667295264 -0500
-@@ -65,6 +65,9 @@ struct reiserfs_inode_info {
-      */
-     unsigned long i_tail_trans_id;
-     struct reiserfs_journal_list *i_tail_jl;
-+
-+    struct posix_acl *i_acl_access;
-+    struct posix_acl *i_acl_default;
- };
- #endif
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_sb.h linux-2.4.23.xattr/include/linux/reiserfs_fs_sb.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_fs_sb.h      2003-12-11 13:00:09.970876856 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_fs_sb.h  2003-12-11 13:02:51.689291920 -0500
-@@ -492,6 +492,7 @@ enum {
-     REISERFS_TEST4,
-     REISERFS_XATTRS,
-     REISERFS_XATTRS_USER,
-+    REISERFS_POSIXACL,
- };
- #define reiserfs_r5_hash(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << FORCE_R5_HASH))
-@@ -515,7 +516,8 @@ enum {
- #define convert_reiserfs(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_CONVERT))
- #define reiserfs_xattrs(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_XATTRS))
- #define reiserfs_xattrs_user(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_XATTRS_USER))
--#define reiserfs_xattrs_optional(s) reiserfs_xattrs_user(s)
-+#define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s))
-+#define reiserfs_posixacl(s) ((s)->u.reiserfs_sb.s_mount_opt & (1 << REISERFS_POSIXACL))
- void reiserfs_file_buffer (struct buffer_head * bh, int list);
-diff -ruNp -X ../dontdiff linux-2.4.23.datalogging+quota/include/linux/reiserfs_xattr.h linux-2.4.23.xattr/include/linux/reiserfs_xattr.h
---- linux-2.4.23.datalogging+quota/include/linux/reiserfs_xattr.h      2003-12-11 13:00:09.970876856 -0500
-+++ linux-2.4.23.xattr/include/linux/reiserfs_xattr.h  2003-12-11 13:02:54.072929552 -0500
-@@ -73,6 +73,7 @@ reiserfs_read_unlock_xattrs(struct super
- static inline int
- reiserfs_xattr_init (struct super_block *s, int mount_flags)
- {
-+    s->s_flags = (s->s_flags & ~MS_POSIXACL); /* to be sure */
-     return 0;
- }
diff --git a/bootsplash-3.0.7-2.4.25.patch b/bootsplash-3.0.7-2.4.25.patch
deleted file mode 100644 (file)
index 5d6fc63..0000000
+++ /dev/null
@@ -1,2884 +0,0 @@
-diff -urN linux-2.4.24.org/drivers/char/console.c linux-2.4.24/drivers/char/console.c
---- linux-2.4.24.org/drivers/char/console.c    2004-01-19 21:00:14.495123806 +0100
-+++ linux-2.4.24/drivers/char/console.c        2004-01-19 21:03:48.017721428 +0100
-@@ -3025,6 +3025,31 @@
-       return 0;
- }
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+void con_remap_def_color(int currcons, int new_color)
-+{
-+      unsigned short *sbuf = screenbuf;
-+      unsigned c, len = screenbuf_size >> 1;
-+      int old_color;
-+
-+      if (sbuf) {
-+              old_color = def_color << 8;
-+              new_color <<= 8;
-+              while(len--) {
-+                      c = *sbuf;
-+                      if (((c ^ old_color) & 0xf000) == 0)
-+                              *sbuf ^= (old_color ^ new_color) & 0xf000;
-+                      if (((c ^ old_color) & 0x0f00) == 0)
-+                              *sbuf ^= (old_color ^ new_color) & 0x0f00;
-+                      sbuf++;
-+              }
-+              new_color >>= 8;
-+      }
-+      def_color = color = new_color;
-+      update_attr(currcons);
-+}
-+#endif
-+
- /*
-  *    Visible symbols for modules
-  */
-diff -urN linux-2.4.24.org/drivers/char/keyboard.c linux-2.4.24/drivers/char/keyboard.c
---- linux-2.4.24.org/drivers/char/keyboard.c   2004-01-19 21:00:14.168191795 +0100
-+++ linux-2.4.24/drivers/char/keyboard.c       2004-01-19 21:03:48.066711241 +0100
-@@ -263,6 +263,15 @@
-       } else
-               rep = test_and_set_bit(keycode, key_down);
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+      /* This code has to be redone for some non-x86 platforms */
-+      if (keycode == 0x3c || keycode == 0x01) {       /* F2 and ESC on a PC keyboard */
-+              extern int splash_verbose(void);
-+              if (splash_verbose())
-+                  goto out;
-+      }
-+#endif
-+
- #ifdef CONFIG_MAGIC_SYSRQ             /* Handle the SysRq Hack */
-       if (keycode == SYSRQ_KEY) {
-               sysrq_pressed = !up_flag;
---- linux-2.4.29/drivers/char/n_tty.c.orig     2005-01-20 16:15:28.000000000 +0100
-+++ linux-2.4.29/drivers/char/n_tty.c  2005-01-20 16:18:59.000000000 +0100
-@@ -47,6 +47,7 @@
- #include <linux/string.h>
- #include <linux/slab.h>
- #include <linux/poll.h>
-+#include <linux/config.h>
- #include <asm/uaccess.h>
- #include <asm/system.h>
-@@ -1186,6 +1187,16 @@
-               return -EIO;
-       }
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+      if (file->f_dentry->d_inode->i_rdev == CONSOLE_DEV ||
-+          file->f_dentry->d_inode->i_rdev == SYSCONS_DEV ||
-+          file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) ||
-+          file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1)) {
-+              extern int splash_verbose(void);
-+              (void)splash_verbose();
-+      }
-+#endif
-+
-       c = job_control(tty, file);
-       if(c < 0)
-               return c;
-diff -urN linux-2.4.24.org/drivers/video/Config.in linux-2.4.24/drivers/video/Config.in
---- linux-2.4.24.org/drivers/video/Config.in   2004-01-19 21:01:12.428076192 +0100
-+++ linux-2.4.24/drivers/video/Config.in       2004-01-19 21:05:33.568745824 +0100
-@@ -243,13 +243,20 @@
-       tristate '  Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)' CONFIG_FB_VIRTUAL
-    fi
-+   dep_bool '  Use splash screen instead of boot logo' CONFIG_FBCON_SPLASHSCREEN $CONFIG_BLK_DEV_INITRD
-+   if [ "$CONFIG_FBCON_SPLASHSCREEN" = "y" ]; then
-+      define_bool CONFIG_FBCON_CFB16 y
-+   fi
-+
-    bool '  Advanced low level driver options' CONFIG_FBCON_ADVANCED
-    if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then
-       tristate '    Monochrome support' CONFIG_FBCON_MFB
-       tristate '    2 bpp packed pixels support' CONFIG_FBCON_CFB2
-       tristate '    4 bpp packed pixels support' CONFIG_FBCON_CFB4
-       tristate '    8 bpp packed pixels support' CONFIG_FBCON_CFB8
--      tristate '    16 bpp packed pixels support' CONFIG_FBCON_CFB16
-+      if [ "$CONFIG_FBCON_SPLASHSCREEN" != "y" ]; then
-+         tristate '    16 bpp packed pixels support' CONFIG_FBCON_CFB16
-+      fi
-       tristate '    24 bpp packed pixels support' CONFIG_FBCON_CFB24
-       tristate '    32 bpp packed pixels support' CONFIG_FBCON_CFB32
-       tristate '    Amiga bitplanes support' CONFIG_FBCON_AFB
-@@ -361,7 +368,9 @@
-          "$CONFIG_FB_PVR2" = "y" -o "$CONFIG_FB_VOODOO1" = "y" -o \
-          "$CONFIG_FB_NEOMAGIC" = "y" -o "$CONFIG_FB_INTEL" = "y" -o \
-          "$CONFIG_FB_I810" = "y" ]; then
--       define_tristate CONFIG_FBCON_CFB16 y
-+       if [ "$CONFIG_FBCON_CFB16" != "m" ]; then
-+               define_tristate CONFIG_FBCON_CFB16 y
-+       fi
-       else
-        if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
-             "$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_VESA" = "m" -o \
-@@ -380,7 +389,9 @@
-             "$CONFIG_FB_PVR2" = "m" -o "$CONFIG_FB_VOODOO1" = "m" -o \
-             "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_INTEL" = "m" -o \
-             "$CONFIG_FB_I810" = "m" ]; then
--          define_tristate CONFIG_FBCON_CFB16 m
-+          if [ "$CONFIG_FBCON_CFB16" != "y" ]; then
-+                  define_tristate CONFIG_FBCON_CFB16 m
-+          fi
-        fi
-       fi
-       if [ "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \
-diff -urN linux-2.4.24.org/drivers/video/fbcon.c linux-2.4.24/drivers/video/fbcon.c
---- linux-2.4.24.org/drivers/video/fbcon.c     2004-01-19 21:01:12.383085548 +0100
-+++ linux-2.4.24/drivers/video/fbcon.c 2004-01-19 21:03:48.196684214 +0100
-@@ -76,6 +76,7 @@
- #include <linux/smp.h>
- #include <linux/init.h>
- #include <linux/pm.h>
-+#include <linux/vmalloc.h>
- #include <asm/irq.h>
- #include <asm/system.h>
-@@ -104,6 +105,23 @@
- #include <video/fbcon-mac.h>  /* for 6x11 font on mac */
- #include <video/font.h>
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+#include <video/fbcon-cfb16.h>        /* for fbcon_cfb16 */
-+#include "fbcon-splash.h"
-+
-+extern void con_remap_def_color(int currcons, int new_color);
-+
-+extern int splash_default;
-+extern int splash_shown;
-+
-+extern struct display_switch fbcon_splash16;
-+
-+#ifdef CONFIG_PROC_FS
-+int splash_proc_register(void);
-+int splash_proc_unregister(void);
-+#endif
-+#endif
-+
- #ifdef FBCONDEBUG
- #  define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
- #else
-@@ -477,7 +495,9 @@
-     return display_desc;
- }
--
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+static int splash_registered=0;
-+#endif
- static void fbcon_init(struct vc_data *conp, int init)
- {
-     int unit = conp->vc_num;
-@@ -501,6 +521,26 @@
-     fb_display[unit].cmap.green = 0;
-     fb_display[unit].cmap.blue = 0;
-     fb_display[unit].cmap.transp = 0;
-+
-+#ifdef CONFIG_FBCON_SPLASHSCREEN 
-+    if (!splash_registered && fb_display[unit].var.bits_per_pixel == 16 ) {
-+      if (unit == 0 && !fb_display[unit].splash_data) {
-+          extern unsigned long initrd_start, initrd_end;
-+
-+          if (initrd_start && !splash_getraw((unsigned char *)initrd_start, (unsigned char *)initrd_end) && fb_display[unit].splash_data)
-+              fb_display[unit].splash_data->splash_state = splash_default & 1;
-+      }
-+      splash_registered = 1;
-+#ifdef CONFIG_PROC_FS
-+      splash_proc_register();
-+#endif
-+    }
-+    if (fb_display[unit].splash_data && fb_display[unit].var.bits_per_pixel != 16 ) {
-+      vfree(fb_display[unit].splash_data);
-+      fb_display[unit].splash_data = 0;
-+    }
-+#endif
-+
-     fbcon_setup(unit, init, !init);
-     /* Must be done after fbcon_setup to prevent excess updates */
-     conp->vc_display_fg = &info->display_fg;
-@@ -517,6 +557,15 @@
-     fbcon_free_font(p);
-     p->dispsw = &fbcon_dummy;
-     p->conp = 0;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    if (splash_registered) {
-+#ifdef CONFIG_PROC_FS
-+        splash_proc_unregister();
-+#endif
-+      splash_registered = 0;
-+    }
-+#endif
-+
- }
-@@ -657,7 +706,14 @@
-     
-     nr_cols = p->var.xres/fontwidth(p);
-     nr_rows = p->var.yres/fontheight(p);
--    
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    if (p->splash_data && p->splash_data->splash_state) {
-+      nr_cols = p->splash_data->splash_text_wi / fontwidth(p);
-+      nr_rows = p->splash_data->splash_text_he / fontheight(p);
-+      logo = 0;
-+    }
-+#endif
-+ 
-     if (logo) {
-       /* Need to make room for the logo */
-       int cnt;
-@@ -734,6 +790,11 @@
-     p->fgcol = p->var.bits_per_pixel > 2 ? 7 : (1<<p->var.bits_per_pixel)-1;
-     p->bgcol = 0;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    if(p->splash_data && p->splash_data->splash_state)
-+      con_remap_def_color(con, p->splash_data->splash_color << 4 | p->splash_data->splash_fg_color);
-+#endif        
-+
-     if (!init) {
-       if (conp->vc_cols != nr_cols || conp->vc_rows != nr_rows)
-           vc_resize_con(nr_rows, nr_cols, con);
-@@ -1323,6 +1384,9 @@
-           if (softback_top)
-               fbcon_softback_note(conp, t, count);
-           if (logo_shown >= 0) goto redraw_up;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+          if (splash_shown) goto redraw_up;
-+#endif
-           switch (p->scrollmode & __SCROLL_YMASK) {
-           case __SCROLL_YMOVE:
-               p->dispsw->bmove(p, t+count, 0, t, 0, b-t-count,
-@@ -1383,6 +1447,9 @@
-       case SM_DOWN:
-           if (count > conp->vc_rows)  /* Maximum realistic size */
-               count = conp->vc_rows;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+          if (splash_shown) goto redraw_down;
-+#endif
-           switch (p->scrollmode & __SCROLL_YMASK) {
-           case __SCROLL_YMOVE:
-               p->dispsw->bmove(p, t, 0, t+count, 0, b-t-count,
-@@ -1499,6 +1566,13 @@
-       }
-       return;
-     }
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    if (splash_shown && sy == dy) {
-+      /* must use slower redraw bmove to keep background pic intact */
-+      fbcon_redraw_bmove(p, real_y(p, sy), sx, real_y(p, dy), dx, height, width);
-+      return;
-+    }
-+#endif
-     p->dispsw->bmove(p, real_y(p, sy), sx, real_y(p, dy), dx, height, width);
- }
-@@ -1509,6 +1583,10 @@
-     struct display *p = &fb_display[unit];
-     struct fb_info *info = p->fb_info;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    splash_prepare(p);
-+#endif
-+
-     if (softback_top) {
-       int l = fbcon_softback_size / conp->vc_size_row;
-       if (softback_lines)
-@@ -1568,14 +1646,41 @@
- {
-     struct display *p = &fb_display[conp->vc_num];
-     struct fb_info *info = p->fb_info;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    struct display_switch *olddispsw=NULL;
-+    char    *oldscreen_base=NULL;
-+#endif
-+   
-     if (blank < 0)    /* Entering graphics mode */
-       return 0;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+
-+    if (p->splash_data && p->splash_data->oldscreen_base) {
-+      oldscreen_base = p->screen_base;
-+        p->screen_base = p->splash_data->oldscreen_base;
-+    }
-+    if (p->splash_data && p->splash_data->olddispsw) {
-+        olddispsw = p->dispsw;
-+        p->dispsw = p->splash_data->olddispsw;
-+    }
-+#endif
-+
-     fbcon_cursor(p->conp, blank ? CM_ERASE : CM_DRAW);
-     if (!p->can_soft_blank) {
-       if (blank) {
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+          if (p->splash_data && p->splash_data->oldscreen_base) {
-+              oldscreen_base = p->screen_base;
-+              p->screen_base = p->splash_data->oldscreen_base;
-+          }
-+          if (p->splash_data && p->splash_data->olddispsw) {
-+              olddispsw = p->dispsw;
-+              p->dispsw = p->splash_data->olddispsw;
-+          }
-+#endif
-           if (p->visual == FB_VISUAL_MONO01) {
-               if (p->screen_base)
-                   fb_memset255(p->screen_base,
-@@ -1583,25 +1688,39 @@
-                                p->var.bits_per_pixel>>3);
-           } else {
-               unsigned short oldc;
--              u_int height;
-+              u_int height, width;
-               u_int y_break;
-               oldc = conp->vc_video_erase_char;
-               conp->vc_video_erase_char &= p->charmask;
-               height = conp->vc_rows;
-+              width  = conp->vc_cols;
-               y_break = p->vrows-p->yscroll;
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+              if (splash_shown) {
-+                      width=p->var.xres/fontwidth(p);
-+                      height=p->var.yres/fontheight(p);
-+              }
-+#endif
-               if (height > y_break) {
--                      p->dispsw->clear(conp, p, real_y(p, 0), 0, y_break, conp->vc_cols);
--                      p->dispsw->clear(conp, p, real_y(p, y_break), 0, height-y_break, conp->vc_cols);
-+                      p->dispsw->clear(conp, p, real_y(p, 0), 0, y_break, width);
-+                      p->dispsw->clear(conp, p, real_y(p, y_break), 0, height-y_break, width);
-               } else
--                      p->dispsw->clear(conp, p, real_y(p, 0), 0, height, conp->vc_cols);
-+                      p->dispsw->clear(conp, p, real_y(p, 0), 0, height, width);
-               conp->vc_video_erase_char = oldc;
-           }
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+          if(oldscreen_base)
-+              p->screen_base=oldscreen_base;
-+          if(olddispsw)
-+              p->dispsw=olddispsw;
-+#endif
-           return 0;
-       } else {
-           /* Tell console.c that it has to restore the screen itself */
-           return 1;
-       }
-+
-     }
-     (*info->blank)(blank, info);
-     return 0;
-@@ -1762,13 +1881,21 @@
-     if (resize) {
-       struct vc_data *conp = p->conp;
-+      __u32 xres = p->var.xres, yres = p->var.yres;
-+
-       /* reset wrap/pan */
-       p->var.xoffset = p->var.yoffset = p->yscroll = 0;
-       p->vrows = p->var.yres_virtual/h;
--      if ((p->var.yres % h) && (p->var.yres_virtual % h < p->var.yres % h))
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+      if (p->splash_data && p->splash_data->splash_state) {
-+          xres = p->splash_data->splash_text_wi;
-+          yres = p->splash_data->splash_text_he;
-+        }
-+#endif
-+      if ((yres % h) && (p->var.yres_virtual % h < p->var.yres % h))
-           p->vrows--;
-       updatescrollmode(p);
--      vc_resize_con( p->var.yres/h, p->var.xres/w, unit );
-+      vc_resize_con( yres/h, xres/w, unit );
-         if (CON_IS_VISIBLE(conp) && softback_buf) {
-           int l = fbcon_softback_size / conp->vc_size_row;
-           if (l > 5)
-@@ -2189,6 +2316,9 @@
-     if (p->fb_info->fbops->fb_rasterimg)
-       p->fb_info->fbops->fb_rasterimg(p->fb_info, 1);
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    if (!splash_shown) {
-+#endif
-     for (x = 0; x < smp_num_cpus * (LOGO_W + 8) &&
-        x < p->var.xres - (LOGO_W + 8); x += (LOGO_W + 8)) {
-        
-@@ -2450,7 +2580,10 @@
-       }
- #endif                        
-     }
--    
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    }
-+#endif    
-+
-     if (p->fb_info->fbops->fb_rasterimg)
-       p->fb_info->fbops->fb_rasterimg(p->fb_info, 0);
-diff -urN linux-2.4.24.org/drivers/video/fbcon-jpegdec.c linux-2.4.24/drivers/video/fbcon-jpegdec.c
---- linux-2.4.24.org/drivers/video/fbcon-jpegdec.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/drivers/video/fbcon-jpegdec.c 2004-01-19 21:03:48.203682758 +0100
-@@ -0,0 +1,960 @@
-+/* 
-+ *    linux/drivers/video/fbcon-jpegdec.c - a tiny jpeg decoder.
-+ *      
-+ *      (w) August 2001 by Michael Schroeder, <mls@suse.de>
-+ *                  
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/string.h>
-+#include <asm/byteorder.h>
-+
-+struct display;
-+#include "fbcon-splash.h"
-+#include "fbcon-jpegdec.h"
-+
-+#define ISHIFT 11
-+
-+#define IFIX(a) ((int)((a) * (1 << ISHIFT) + .5))
-+#define IMULT(a, b) (((a) * (b)) >> ISHIFT)
-+#define ITOINT(a) ((a) >> ISHIFT)
-+
-+#ifndef __P
-+# define __P(x) x
-+#endif
-+
-+/* special markers */
-+#define M_BADHUFF     -1
-+#define M_EOF         0x80
-+
-+struct in {
-+      unsigned char *p;
-+      unsigned int bits;
-+      int left;
-+      int marker;
-+
-+      int (*func) __P((void *));
-+      void *data;
-+};
-+
-+/*********************************/
-+struct dec_hufftbl;
-+struct enc_hufftbl;
-+
-+union hufftblp {
-+      struct dec_hufftbl *dhuff;
-+      struct enc_hufftbl *ehuff;
-+};
-+
-+struct scan {
-+      int dc;                 /* old dc value */
-+
-+      union hufftblp hudc;
-+      union hufftblp huac;
-+      int next;               /* when to switch to next scan */
-+
-+      int cid;                /* component id */
-+      int hv;                 /* horiz/vert, copied from comp */
-+      int tq;                 /* quant tbl, copied from comp */
-+};
-+
-+/*********************************/
-+
-+#define DECBITS 10            /* seems to be the optimum */
-+
-+struct dec_hufftbl {
-+      int maxcode[17];
-+      int valptr[16];
-+      unsigned char vals[256];
-+      unsigned int llvals[1 << DECBITS];
-+};
-+
-+static void decode_mcus __P((struct in *, int *, int, struct scan *, int *));
-+static int dec_readmarker __P((struct in *));
-+static void dec_makehuff __P((struct dec_hufftbl *, int *, unsigned char *));
-+
-+static void setinput __P((struct in *, unsigned char *));
-+/*********************************/
-+
-+#undef PREC
-+#define PREC int
-+
-+static void idctqtab __P((unsigned char *, PREC *));
-+static void idct __P((int *, int *, PREC *, PREC, int));
-+static void scaleidctqtab __P((PREC *, PREC));
-+
-+/*********************************/
-+
-+static void initcol __P((PREC[][64]));
-+
-+static void col221111 __P((int *, unsigned char *, int));
-+static void col221111_16 __P((int *, unsigned char *, int));
-+
-+/*********************************/
-+
-+#define M_SOI 0xd8
-+#define M_APP0        0xe0
-+#define M_DQT 0xdb
-+#define M_SOF0        0xc0
-+#define M_DHT   0xc4
-+#define M_DRI 0xdd
-+#define M_SOS 0xda
-+#define M_RST0        0xd0
-+#define M_EOI 0xd9
-+#define M_COM 0xfe
-+
-+static unsigned char *datap;
-+
-+static int getbyte(void)
-+{
-+      return *datap++;
-+}
-+
-+static int getword(void)
-+{
-+      int c1, c2;
-+      c1 = *datap++;
-+      c2 = *datap++;
-+      return c1 << 8 | c2;
-+}
-+
-+struct comp {
-+      int cid;
-+      int hv;
-+      int tq;
-+};
-+
-+#define MAXCOMP 4
-+struct jpginfo {
-+      int nc;                 /* number of components */
-+      int ns;                 /* number of scans */
-+      int dri;                /* restart interval */
-+      int nm;                 /* mcus til next marker */
-+      int rm;                 /* next restart marker */
-+};
-+
-+static struct jpginfo info;
-+static struct comp comps[MAXCOMP];
-+
-+static struct scan dscans[MAXCOMP];
-+
-+static unsigned char quant[4][64];
-+
-+static struct dec_hufftbl dhuff[4];
-+
-+#define dec_huffdc (dhuff + 0)
-+#define dec_huffac (dhuff + 2)
-+
-+static struct in in;
-+
-+static int readtables(int till)
-+{
-+      int m, l, i, j, lq, pq, tq;
-+      int tc, th, tt;
-+
-+      for (;;) {
-+              if (getbyte() != 0xff)
-+                      return -1;
-+              if ((m = getbyte()) == till)
-+                      break;
-+
-+              switch (m) {
-+              case 0xc2:
-+                      return 0;
-+
-+              case M_DQT:
-+                      lq = getword();
-+                      while (lq > 2) {
-+                              pq = getbyte();
-+                              tq = pq & 15;
-+                              if (tq > 3)
-+                                      return -1;
-+                              pq >>= 4;
-+                              if (pq != 0)
-+                                      return -1;
-+                              for (i = 0; i < 64; i++)
-+                                      quant[tq][i] = getbyte();
-+                              lq -= 64 + 1;
-+                      }
-+                      break;
-+
-+              case M_DHT:
-+                      l = getword();
-+                      while (l > 2) {
-+                              int hufflen[16], k;
-+                              unsigned char huffvals[256];
-+
-+                              tc = getbyte();
-+                              th = tc & 15;
-+                              tc >>= 4;
-+                              tt = tc * 2 + th;
-+                              if (tc > 1 || th > 1)
-+                                      return -1;
-+                              for (i = 0; i < 16; i++)
-+                                      hufflen[i] = getbyte();
-+                              l -= 1 + 16;
-+                              k = 0;
-+                              for (i = 0; i < 16; i++) {
-+                                      for (j = 0; j < hufflen[i]; j++)
-+                                              huffvals[k++] = getbyte();
-+                                      l -= hufflen[i];
-+                              }
-+                              dec_makehuff(dhuff + tt, hufflen,
-+                                           huffvals);
-+                      }
-+                      break;
-+
-+              case M_DRI:
-+                      l = getword();
-+                      info.dri = getword();
-+                      break;
-+
-+              default:
-+                      l = getword();
-+                      while (l-- > 2)
-+                              getbyte();
-+                      break;
-+              }
-+      }
-+      return 0;
-+}
-+
-+static void dec_initscans(void)
-+{
-+      int i;
-+
-+      info.nm = info.dri + 1;
-+      info.rm = M_RST0;
-+      for (i = 0; i < info.ns; i++)
-+              dscans[i].dc = 0;
-+}
-+
-+static int dec_checkmarker(void)
-+{
-+      int i;
-+
-+      if (dec_readmarker(&in) != info.rm)
-+              return -1;
-+      info.nm = info.dri;
-+      info.rm = (info.rm + 1) & ~0x08;
-+      for (i = 0; i < info.ns; i++)
-+              dscans[i].dc = 0;
-+      return 0;
-+}
-+
-+int jpeg_check_size(unsigned char *buf, int width, int height)
-+{
-+      datap = buf;
-+      getbyte(); 
-+      getbyte(); 
-+      readtables(M_SOF0);
-+      getword();
-+      getbyte();
-+        if (height != getword() || width != getword())
-+              return 0;
-+        return 1;
-+}
-+
-+int jpeg_decode(buf, pic, width, height, depth, decdata)
-+unsigned char *buf, *pic;
-+int width, height, depth;
-+struct jpeg_decdata *decdata;
-+{
-+      int i, j, m, tac, tdc;
-+      int mcusx, mcusy, mx, my;
-+      int max[6];
-+
-+      if (!decdata)
-+              return -1;
-+      datap = buf;
-+      if (getbyte() != 0xff)
-+              return ERR_NO_SOI;
-+      if (getbyte() != M_SOI)
-+              return ERR_NO_SOI;
-+      if (readtables(M_SOF0))
-+              return ERR_BAD_TABLES;
-+      getword();
-+      i = getbyte();
-+      if (i != 8)
-+              return ERR_NOT_8BIT;
-+      if (((getword() + 15) & ~15) != height)
-+              return ERR_HEIGHT_MISMATCH;
-+      if (((getword() + 15) & ~15) != width)
-+              return ERR_WIDTH_MISMATCH;
-+      if ((height & 15) || (width & 15))
-+              return ERR_BAD_WIDTH_OR_HEIGHT;
-+      info.nc = getbyte();
-+      if (info.nc > MAXCOMP)
-+              return ERR_TOO_MANY_COMPPS;
-+      for (i = 0; i < info.nc; i++) {
-+              int h, v;
-+              comps[i].cid = getbyte();
-+              comps[i].hv = getbyte();
-+              v = comps[i].hv & 15;
-+              h = comps[i].hv >> 4;
-+              comps[i].tq = getbyte();
-+              if (h > 3 || v > 3)
-+                      return ERR_ILLEGAL_HV;
-+              if (comps[i].tq > 3)
-+                      return ERR_QUANT_TABLE_SELECTOR;
-+      }
-+      if (readtables(M_SOS))
-+              return ERR_BAD_TABLES;
-+      getword();
-+      info.ns = getbyte();
-+      if (info.ns != 3)
-+              return ERR_NOT_YCBCR_221111;
-+      for (i = 0; i < 3; i++) {
-+              dscans[i].cid = getbyte();
-+              tdc = getbyte();
-+              tac = tdc & 15;
-+              tdc >>= 4;
-+              if (tdc > 1 || tac > 1)
-+                      return ERR_QUANT_TABLE_SELECTOR;
-+              for (j = 0; j < info.nc; j++)
-+                      if (comps[j].cid == dscans[i].cid)
-+                              break;
-+              if (j == info.nc)
-+                      return ERR_UNKNOWN_CID_IN_SCAN;
-+              dscans[i].hv = comps[j].hv;
-+              dscans[i].tq = comps[j].tq;
-+              dscans[i].hudc.dhuff = dec_huffdc + tdc;
-+              dscans[i].huac.dhuff = dec_huffac + tac;
-+      }
-+      
-+      i = getbyte();
-+      j = getbyte();
-+      m = getbyte();
-+      
-+      if (i != 0 || j != 63 || m != 0)
-+              return ERR_NOT_SEQUENTIAL_DCT;
-+      
-+      if (dscans[0].cid != 1 || dscans[1].cid != 2 || dscans[2].cid != 3)
-+              return ERR_NOT_YCBCR_221111;
-+
-+      if (dscans[0].hv != 0x22 || dscans[1].hv != 0x11 || dscans[2].hv != 0x11)
-+              return ERR_NOT_YCBCR_221111;
-+
-+      mcusx = width >> 4;
-+      mcusy = height >> 4;
-+
-+
-+      idctqtab(quant[dscans[0].tq], decdata->dquant[0]);
-+      idctqtab(quant[dscans[1].tq], decdata->dquant[1]);
-+      idctqtab(quant[dscans[2].tq], decdata->dquant[2]);
-+      initcol(decdata->dquant);
-+      setinput(&in, datap);
-+
-+#if 0
-+      /* landing zone */
-+      img[len] = 0;
-+      img[len + 1] = 0xff;
-+      img[len + 2] = M_EOF;
-+#endif
-+
-+      dec_initscans();
-+
-+      dscans[0].next = 6 - 4;
-+      dscans[1].next = 6 - 4 - 1;
-+      dscans[2].next = 6 - 4 - 1 - 1; /* 411 encoding */
-+      for (my = 0; my < mcusy; my++) {
-+              for (mx = 0; mx < mcusx; mx++) {
-+                      if (info.dri && !--info.nm)
-+                              if (dec_checkmarker())
-+                                      return ERR_WRONG_MARKER;
-+                      
-+                      decode_mcus(&in, decdata->dcts, 6, dscans, max);
-+                      idct(decdata->dcts, decdata->out, decdata->dquant[0], IFIX(128.5), max[0]);
-+                      idct(decdata->dcts + 64, decdata->out + 64, decdata->dquant[0], IFIX(128.5), max[1]);
-+                      idct(decdata->dcts + 128, decdata->out + 128, decdata->dquant[0], IFIX(128.5), max[2]);
-+                      idct(decdata->dcts + 192, decdata->out + 192, decdata->dquant[0], IFIX(128.5), max[3]);
-+                      idct(decdata->dcts + 256, decdata->out + 256, decdata->dquant[1], IFIX(0.5), max[4]);
-+                      idct(decdata->dcts + 320, decdata->out + 320, decdata->dquant[2], IFIX(0.5), max[5]);
-+
-+                      switch (depth) {
-+                      case 24:
-+                              col221111(decdata->out, pic + (my * 16 * mcusx + mx) * 16 * 3, mcusx * 16 * 3);
-+                              break;
-+                      case 16:
-+                              col221111_16(decdata->out, pic + (my * 16 * mcusx + mx) * (16 * 2), mcusx * (16 * 2));
-+                              break;
-+                      default:
-+                              return ERR_DEPTH_MISMATCH;
-+                              break;
-+                      }
-+              }
-+      }
-+      
-+      m = dec_readmarker(&in);
-+      if (m != M_EOI)
-+              return ERR_NO_EOI;
-+
-+      return 0;
-+}
-+
-+/****************************************************************/
-+/**************       huffman decoder             ***************/
-+/****************************************************************/
-+
-+static int fillbits __P((struct in *, int, unsigned int));
-+static int dec_rec2
-+__P((struct in *, struct dec_hufftbl *, int *, int, int));
-+
-+static void setinput(in, p)
-+struct in *in;
-+unsigned char *p;
-+{
-+      in->p = p;
-+      in->left = 0;
-+      in->bits = 0;
-+      in->marker = 0;
-+}
-+
-+static int fillbits(in, le, bi)
-+struct in *in;
-+int le;
-+unsigned int bi;
-+{
-+      int b, m;
-+
-+      if (in->marker) {
-+              if (le <= 16)
-+                      in->bits = bi << 16, le += 16;
-+              return le;
-+      }
-+      while (le <= 24) {
-+              b = *in->p++;
-+              if (b == 0xff && (m = *in->p++) != 0) {
-+                      if (m == M_EOF) {
-+                              if (in->func && (m = in->func(in->data)) == 0)
-+                                      continue;
-+                      }
-+                      in->marker = m;
-+                      if (le <= 16)
-+                              bi = bi << 16, le += 16;
-+                      break;
-+              }
-+              bi = bi << 8 | b;
-+              le += 8;
-+      }
-+      in->bits = bi;          /* tmp... 2 return values needed */
-+      return le;
-+}
-+
-+static int dec_readmarker(in)
-+struct in *in;
-+{
-+      int m;
-+
-+      in->left = fillbits(in, in->left, in->bits);
-+      if ((m = in->marker) == 0)
-+              return 0;
-+      in->left = 0;
-+      in->marker = 0;
-+      return m;
-+}
-+
-+#define LEBI_DCL      int le, bi
-+#define LEBI_GET(in)  (le = in->left, bi = in->bits)
-+#define LEBI_PUT(in)  (in->left = le, in->bits = bi)
-+
-+#define GETBITS(in, n) (                                      \
-+  (le < (n) ? le = fillbits(in, le, bi), bi = in->bits : 0),  \
-+  (le -= (n)),                                                        \
-+  bi >> le & ((1 << (n)) - 1)                                 \
-+)
-+
-+#define UNGETBITS(in, n) (    \
-+  le += (n)                   \
-+)
-+
-+
-+static int dec_rec2(in, hu, runp, c, i)
-+struct in *in;
-+struct dec_hufftbl *hu;
-+int *runp;
-+int c, i;
-+{
-+      LEBI_DCL;
-+
-+      LEBI_GET(in);
-+      if (i) {
-+              UNGETBITS(in, i & 127);
-+              *runp = i >> 8 & 15;
-+              i >>= 16;
-+      } else {
-+              for (i = DECBITS; (c = ((c << 1) | GETBITS(in, 1))) >= (hu->maxcode[i]); i++);
-+              if (i >= 16) {
-+                      in->marker = M_BADHUFF;
-+                      return 0;
-+              }
-+              i = hu->vals[hu->valptr[i] + c - hu->maxcode[i - 1] * 2];
-+              *runp = i >> 4;
-+              i &= 15;
-+      }
-+      if (i == 0) {           /* sigh, 0xf0 is 11 bit */
-+              LEBI_PUT(in);
-+              return 0;
-+      }
-+      /* receive part */
-+      c = GETBITS(in, i);
-+      if (c < (1 << (i - 1)))
-+              c += (-1 << i) + 1;
-+      LEBI_PUT(in);
-+      return c;
-+}
-+
-+#define DEC_REC(in, hu, r, i)  (      \
-+  r = GETBITS(in, DECBITS),           \
-+  i = hu->llvals[r],                  \
-+  i & 128 ?                           \
-+    (                                 \
-+      UNGETBITS(in, i & 127),         \
-+      r = i >> 8 & 15,                        \
-+      i >> 16                         \
-+    )                                 \
-+  :                                   \
-+    (                                 \
-+      LEBI_PUT(in),                   \
-+      i = dec_rec2(in, hu, &r, r, i), \
-+      LEBI_GET(in),                   \
-+      i                                       \
-+    )                                 \
-+)
-+
-+static void decode_mcus(in, dct, n, sc, maxp)
-+struct in *in;
-+int *dct;
-+int n;
-+struct scan *sc;
-+int *maxp;
-+{
-+      struct dec_hufftbl *hu;
-+      int i, r, t;
-+      LEBI_DCL;
-+
-+      memset(dct, 0, n * 64 * sizeof(*dct));
-+      LEBI_GET(in);
-+      while (n-- > 0) {
-+              hu = sc->hudc.dhuff;
-+              *dct++ = (sc->dc += DEC_REC(in, hu, r, t));
-+
-+              hu = sc->huac.dhuff;
-+              i = 63;
-+              while (i > 0) {
-+                      t = DEC_REC(in, hu, r, t);
-+                      if (t == 0 && r == 0) {
-+                              dct += i;
-+                              break;
-+                      }
-+                      dct += r;
-+                      *dct++ = t;
-+                      i -= r + 1;
-+              }
-+              *maxp++ = 64 - i;
-+              if (n == sc->next)
-+                      sc++;
-+      }
-+      LEBI_PUT(in);
-+}
-+
-+static void dec_makehuff(hu, hufflen, huffvals)
-+struct dec_hufftbl *hu;
-+int *hufflen;
-+unsigned char *huffvals;
-+{
-+      int code, k, i, j, d, x, c, v;
-+      for (i = 0; i < (1 << DECBITS); i++)
-+              hu->llvals[i] = 0;
-+
-+/*
-+ * llvals layout:
-+ *
-+ * value v already known, run r, backup u bits:
-+ *  vvvvvvvvvvvvvvvv 0000 rrrr 1 uuuuuuu
-+ * value unknown, size b bits, run r, backup u bits:
-+ *  000000000000bbbb 0000 rrrr 0 uuuuuuu
-+ * value and size unknown:
-+ *  0000000000000000 0000 0000 0 0000000
-+ */
-+      code = 0;
-+      k = 0;
-+      for (i = 0; i < 16; i++, code <<= 1) {  /* sizes */
-+              hu->valptr[i] = k;
-+              for (j = 0; j < hufflen[i]; j++) {
-+                      hu->vals[k] = *huffvals++;
-+                      if (i < DECBITS) {
-+                              c = code << (DECBITS - 1 - i);
-+                              v = hu->vals[k] & 0x0f; /* size */
-+                              for (d = 1 << (DECBITS - 1 - i); --d >= 0;) {
-+                                      if (v + i < DECBITS) {  /* both fit in table */
-+                                              x = d >> (DECBITS - 1 - v -
-+                                                        i);
-+                                              if (v && x < (1 << (v - 1)))
-+                                                      x += (-1 << v) + 1;
-+                                              x = x << 16 | (hu-> vals[k] & 0xf0) << 4 |
-+                                                      (DECBITS - (i + 1 + v)) | 128;
-+                                      } else
-+                                              x = v << 16 | (hu-> vals[k] & 0xf0) << 4 |
-+                                                      (DECBITS - (i + 1));
-+                                      hu->llvals[c | d] = x;
-+                              }
-+                      }
-+                      code++;
-+                      k++;
-+              }
-+              hu->maxcode[i] = code;
-+      }
-+      hu->maxcode[16] = 0x20000;      /* always terminate decode */
-+}
-+
-+/****************************************************************/
-+/**************             idct                  ***************/
-+/****************************************************************/
-+
-+#define ONE ((PREC)IFIX(1.))
-+#define S2  ((PREC)IFIX(0.382683432))
-+#define C2  ((PREC)IFIX(0.923879532))
-+#define C4  ((PREC)IFIX(0.707106781))
-+
-+#define S22 ((PREC)IFIX(2 * 0.382683432))
-+#define C22 ((PREC)IFIX(2 * 0.923879532))
-+#define IC4 ((PREC)IFIX(1 / 0.707106781))
-+
-+#define C3IC1 ((PREC)IFIX(0.847759065))       /* c3/c1 */
-+#define C5IC1 ((PREC)IFIX(0.566454497))       /* c5/c1 */
-+#define C7IC1 ((PREC)IFIX(0.198912367))       /* c7/c1 */
-+
-+#define XPP(a,b) (t = a + b, b = a - b, a = t)
-+#define XMP(a,b) (t = a - b, b = a + b, a = t)
-+#define XPM(a,b) (t = a + b, b = b - a, a = t)
-+
-+#define ROT(a,b,s,c) (        t = IMULT(a + b, s),    \
-+                      a = IMULT(a, c - s) + t,        \
-+                      b = IMULT(b, c + s) - t)
-+
-+#define IDCT          \
-+(                     \
-+  XPP(t0, t1),                \
-+  XMP(t2, t3),                \
-+  t2 = IMULT(t2, IC4) - t3,   \
-+  XPP(t0, t3),                \
-+  XPP(t1, t2),                \
-+  XMP(t4, t7),                \
-+  XPP(t5, t6),                \
-+  XMP(t5, t7),                \
-+  t5 = IMULT(t5, IC4),        \
-+  ROT(t4, t6, S22, C22),\
-+  t6 -= t7,           \
-+  t5 -= t6,           \
-+  t4 -= t5,           \
-+  XPP(t0, t7),                \
-+  XPP(t1, t6),                \
-+  XPP(t2, t5),                \
-+  XPP(t3, t4)         \
-+)
-+
-+static unsigned char zig2[64] = {
-+      0, 2, 3, 9, 10, 20, 21, 35,
-+      14, 16, 25, 31, 39, 46, 50, 57,
-+      5, 7, 12, 18, 23, 33, 37, 48,
-+      27, 29, 41, 44, 52, 55, 59, 62,
-+      15, 26, 30, 40, 45, 51, 56, 58,
-+      1, 4, 8, 11, 19, 22, 34, 36,
-+      28, 42, 43, 53, 54, 60, 61, 63,
-+      6, 13, 17, 24, 32, 38, 47, 49
-+};
-+
-+void idct(in, out, quant, off, max)
-+int *in;
-+int *out;
-+PREC *quant;
-+PREC off;
-+int max;
-+{
-+      PREC t0, t1, t2, t3, t4, t5, t6, t7, t;
-+      PREC tmp[64], *tmpp;
-+      int i, j;
-+      unsigned char *zig2p;
-+
-+      t0 = off;
-+      if (max == 1) {
-+              t0 += in[0] * quant[0];
-+              for (i = 0; i < 64; i++)
-+                      out[i] = ITOINT(t0);
-+              return;
-+      }
-+      zig2p = zig2;
-+      tmpp = tmp;
-+      for (i = 0; i < 8; i++) {
-+              j = *zig2p++;
-+              t0 += in[j] * quant[j];
-+              j = *zig2p++;
-+              t5 = in[j] * quant[j];
-+              j = *zig2p++;
-+              t2 = in[j] * quant[j];
-+              j = *zig2p++;
-+              t7 = in[j] * quant[j];
-+              j = *zig2p++;
-+              t1 = in[j] * quant[j];
-+              j = *zig2p++;
-+              t4 = in[j] * quant[j];
-+              j = *zig2p++;
-+              t3 = in[j] * quant[j];
-+              j = *zig2p++;
-+              t6 = in[j] * quant[j];
-+              IDCT;
-+              tmpp[0 * 8] = t0;
-+              tmpp[1 * 8] = t1;
-+              tmpp[2 * 8] = t2;
-+              tmpp[3 * 8] = t3;
-+              tmpp[4 * 8] = t4;
-+              tmpp[5 * 8] = t5;
-+              tmpp[6 * 8] = t6;
-+              tmpp[7 * 8] = t7;
-+              tmpp++;
-+              t0 = 0;
-+      }
-+      for (i = 0; i < 8; i++) {
-+              t0 = tmp[8 * i + 0];
-+              t1 = tmp[8 * i + 1];
-+              t2 = tmp[8 * i + 2];
-+              t3 = tmp[8 * i + 3];
-+              t4 = tmp[8 * i + 4];
-+              t5 = tmp[8 * i + 5];
-+              t6 = tmp[8 * i + 6];
-+              t7 = tmp[8 * i + 7];
-+              IDCT;
-+              out[8 * i + 0] = ITOINT(t0);
-+              out[8 * i + 1] = ITOINT(t1);
-+              out[8 * i + 2] = ITOINT(t2);
-+              out[8 * i + 3] = ITOINT(t3);
-+              out[8 * i + 4] = ITOINT(t4);
-+              out[8 * i + 5] = ITOINT(t5);
-+              out[8 * i + 6] = ITOINT(t6);
-+              out[8 * i + 7] = ITOINT(t7);
-+      }
-+}
-+
-+static unsigned char zig[64] = {
-+      0, 1, 5, 6, 14, 15, 27, 28,
-+      2, 4, 7, 13, 16, 26, 29, 42,
-+      3, 8, 12, 17, 25, 30, 41, 43,
-+      9, 11, 18, 24, 31, 40, 44, 53,
-+      10, 19, 23, 32, 39, 45, 52, 54,
-+      20, 22, 33, 38, 46, 51, 55, 60,
-+      21, 34, 37, 47, 50, 56, 59, 61,
-+      35, 36, 48, 49, 57, 58, 62, 63
-+};
-+
-+static PREC aaidct[8] = {
-+      IFIX(0.3535533906), IFIX(0.4903926402),
-+      IFIX(0.4619397663), IFIX(0.4157348062),
-+      IFIX(0.3535533906), IFIX(0.2777851165),
-+      IFIX(0.1913417162), IFIX(0.0975451610)
-+};
-+
-+
-+static void idctqtab(qin, qout)
-+unsigned char *qin;
-+PREC *qout;
-+{
-+      int i, j;
-+
-+      for (i = 0; i < 8; i++)
-+              for (j = 0; j < 8; j++)
-+                      qout[zig[i * 8 + j]] = qin[zig[i * 8 + j]] * 
-+                                              IMULT(aaidct[i], aaidct[j]);
-+}
-+
-+static void scaleidctqtab(q, sc)
-+PREC *q;
-+PREC sc;
-+{
-+      int i;
-+
-+      for (i = 0; i < 64; i++)
-+              q[i] = IMULT(q[i], sc);
-+}
-+
-+/****************************************************************/
-+/**************          color decoder            ***************/
-+/****************************************************************/
-+
-+#define ROUND
-+
-+/*
-+ * YCbCr Color transformation:
-+ *
-+ * y:0..255   Cb:-128..127   Cr:-128..127
-+ *
-+ *      R = Y                + 1.40200 * Cr
-+ *      G = Y - 0.34414 * Cb - 0.71414 * Cr
-+ *      B = Y + 1.77200 * Cb
-+ *
-+ * =>
-+ *      Cr *= 1.40200;
-+ *      Cb *= 1.77200;
-+ *      Cg = 0.19421 * Cb + .50937 * Cr;
-+ *      R = Y + Cr;
-+ *      G = Y - Cg;
-+ *      B = Y + Cb;
-+ *
-+ * =>
-+ *      Cg = (50 * Cb + 130 * Cr + 128) >> 8;
-+ */
-+
-+static void initcol(q)
-+PREC q[][64];
-+{
-+      scaleidctqtab(q[1], IFIX(1.77200));
-+      scaleidctqtab(q[2], IFIX(1.40200));
-+}
-+
-+/* This is optimized for the stupid sun SUNWspro compiler. */
-+#define STORECLAMP(a,x)                               \
-+(                                             \
-+  (a) = (x),                                  \
-+  (unsigned int)(x) >= 256 ?                  \
-+    ((a) = (x) < 0 ? 0 : 255)                 \
-+  :                                           \
-+    0                                         \
-+)
-+
-+#define CLAMP(x) ((unsigned int)(x) >= 256 ? ((x) < 0 ? 0 : 255) : (x))
-+
-+#ifdef ROUND
-+
-+#define CBCRCG(yin, xin)                      \
-+(                                             \
-+  cb = outc[0 +yin*8+xin],                    \
-+  cr = outc[64+yin*8+xin],                    \
-+  cg = (50 * cb + 130 * cr + 128) >> 8                \
-+)
-+
-+#else
-+
-+#define CBCRCG(yin, xin)                      \
-+(                                             \
-+  cb = outc[0 +yin*8+xin],                    \
-+  cr = outc[64+yin*8+xin],                    \
-+  cg = (3 * cb + 8 * cr) >> 4                 \
-+)
-+
-+#endif
-+
-+#define PIC(yin, xin, p, xout)                        \
-+(                                             \
-+  y = outy[(yin) * 8 + xin],                  \
-+  STORECLAMP(p[(xout) * 3 + 0], y + cr),      \
-+  STORECLAMP(p[(xout) * 3 + 1], y - cg),      \
-+  STORECLAMP(p[(xout) * 3 + 2], y + cb)               \
-+)
-+
-+#ifdef __LITTLE_ENDIAN
-+#define PIC_16(yin, xin, p, xout, add)                 \
-+(                                                \
-+  y = outy[(yin) * 8 + xin],                     \
-+  y = ((CLAMP(y + cr + add*2+1) & 0xf8) <<  8) | \
-+      ((CLAMP(y - cg + add    ) & 0xfc) <<  3) | \
-+      ((CLAMP(y + cb + add*2+1)       ) >>  3),  \
-+  p[(xout) * 2 + 0] = y & 0xff,                  \
-+  p[(xout) * 2 + 1] = y >> 8                     \
-+)
-+#else
-+#ifdef CONFIG_PPC
-+#define PIC_16(yin, xin, p, xout, add)                 \
-+(                                                \
-+  y = outy[(yin) * 8 + xin],                     \
-+  y = ((CLAMP(y + cr + add*2+1) & 0xf8) <<  7) | \
-+      ((CLAMP(y - cg + add*2+1) & 0xf8) <<  2) | \
-+      ((CLAMP(y + cb + add*2+1)       ) >>  3),  \
-+  p[(xout) * 2 + 0] = y >> 8,                    \
-+  p[(xout) * 2 + 1] = y & 0xff                   \
-+)
-+#else
-+#define PIC_16(yin, xin, p, xout, add)                 \
-+(                                                \
-+  y = outy[(yin) * 8 + xin],                     \
-+  y = ((CLAMP(y + cr + add*2+1) & 0xf8) <<  8) | \
-+      ((CLAMP(y - cg + add    ) & 0xfc) <<  3) | \
-+      ((CLAMP(y + cb + add*2+1)       ) >>  3),  \
-+  p[(xout) * 2 + 0] = y >> 8,                    \
-+  p[(xout) * 2 + 1] = y & 0xff                   \
-+)
-+#endif
-+#endif
-+
-+#define PIC221111(xin)                                                \
-+(                                                             \
-+  CBCRCG(0, xin),                                             \
-+  PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0), \
-+  PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1), \
-+  PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0), \
-+  PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1)  \
-+)
-+
-+#define PIC221111_16(xin)                                               \
-+(                                                                     \
-+  CBCRCG(0, xin),                                                     \
-+  PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0, 3),     \
-+  PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1, 0),     \
-+  PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0, 1),     \
-+  PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1, 2)      \
-+)
-+
-+static void col221111(out, pic, width)
-+int *out;
-+unsigned char *pic;
-+int width;
-+{
-+      int i, j, k;
-+      unsigned char *pic0, *pic1;
-+      int *outy, *outc;
-+      int cr, cg, cb, y;
-+
-+      pic0 = pic;
-+      pic1 = pic + width;
-+      outy = out;
-+      outc = out + 64 * 4;
-+      for (i = 2; i > 0; i--) {
-+              for (j = 4; j > 0; j--) {
-+                      for (k = 0; k < 8; k++) {
-+                              PIC221111(k);
-+                      }
-+                      outc += 8;
-+                      outy += 16;
-+                      pic0 += 2 * width;
-+                      pic1 += 2 * width;
-+              }
-+              outy += 64 * 2 - 16 * 4;
-+      }
-+}
-+
-+static void col221111_16(out, pic, width)
-+int *out;
-+unsigned char *pic;
-+int width;
-+{
-+      int i, j, k;
-+      unsigned char *pic0, *pic1;
-+      int *outy, *outc;
-+      int cr, cg, cb, y;
-+
-+      pic0 = pic;
-+      pic1 = pic + width;
-+      outy = out;
-+      outc = out + 64 * 4;
-+      for (i = 2; i > 0; i--) {
-+              for (j = 4; j > 0; j--) {
-+                      for (k = 0; k < 8; k++) {
-+                          PIC221111_16(k);
-+                      }
-+                      outc += 8;
-+                      outy += 16;
-+                      pic0 += 2 * width;
-+                      pic1 += 2 * width;
-+              }
-+              outy += 64 * 2 - 16 * 4;
-+      }
-+}
-diff -urN linux-2.4.24.org/drivers/video/fbcon-jpegdec.h linux-2.4.24/drivers/video/fbcon-jpegdec.h
---- linux-2.4.24.org/drivers/video/fbcon-jpegdec.h     1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/drivers/video/fbcon-jpegdec.h 2004-01-19 21:03:48.205682343 +0100
-@@ -0,0 +1,24 @@
-+#define ERR_NO_SOI 1
-+#define ERR_NOT_8BIT 2
-+#define ERR_HEIGHT_MISMATCH 3
-+#define ERR_WIDTH_MISMATCH 4
-+#define ERR_BAD_WIDTH_OR_HEIGHT 5
-+#define ERR_TOO_MANY_COMPPS 6
-+#define ERR_ILLEGAL_HV 7
-+#define ERR_QUANT_TABLE_SELECTOR 8
-+#define ERR_NOT_YCBCR_221111 9
-+#define ERR_UNKNOWN_CID_IN_SCAN 10
-+#define ERR_NOT_SEQUENTIAL_DCT 11
-+#define ERR_WRONG_MARKER 12
-+#define ERR_NO_EOI 13
-+#define ERR_BAD_TABLES 14
-+#define ERR_DEPTH_MISMATCH 15
-+
-+struct jpeg_decdata {
-+      int dcts[6 * 64 + 16];
-+      int out[64 * 6];
-+      int dquant[3][64];
-+};
-+
-+extern int jpeg_decode(unsigned char *, unsigned char *, int, int, int, struct jpeg_decdata *);
-+extern int jpeg_check_size(unsigned char *, int, int);
-diff -urN linux-2.4.24.org/drivers/video/fbcon-splash16.c linux-2.4.24/drivers/video/fbcon-splash16.c
---- linux-2.4.24.org/drivers/video/fbcon-splash16.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/drivers/video/fbcon-splash16.c        2004-01-19 21:03:48.209681511 +0100
-@@ -0,0 +1,488 @@
-+/*
-+ *  linux/drivers/video/fbcon-splash16.c -- Low level frame buffer operations for 16 bpp
-+ *                                          framebuffer operation. Modified to present
-+ *                                        boot splash screen. 2002/11/7 stepan@suse.de
-+ * 
-+ * Based on linux/drivers/video/fbcon-cfb16.c, which is
-+ *
-+ *    Created 5 Apr 1997 by Geert Uytterhoeven
-+ *
-+ *  This file is subject to the terms and conditions of the GNU General Public
-+ *  License.  See the file COPYING in the main directory of this archive for
-+ *  more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/config.h>
-+#include <linux/tty.h>
-+#include <linux/console.h>
-+#include <linux/string.h>
-+#include <linux/fb.h>
-+#include <asm/io.h>
-+
-+#include <video/fbcon.h>
-+#include <video/fbcon-cfb16.h>
-+
-+#include "fbcon-splash.h"
-+
-+    /*
-+     *  16 bpp packed pixels
-+     */
-+
-+static u32 tab_cfb16[] = {
-+#if defined(__BIG_ENDIAN)
-+    0x00000000, 0x0000ffff, 0xffff0000, 0xffffffff
-+#elif defined(__LITTLE_ENDIAN)
-+    0x00000000, 0xffff0000, 0x0000ffff, 0xffffffff
-+#else
-+#error FIXME: No endianness??
-+#endif
-+};
-+
-+void fbcon_splash16_bmove(struct display *p, int sy, int sx, int dy, int dx,
-+                     int height, int width)
-+{
-+    int bytes = p->next_line, linesize = bytes * fontheight(p), rows;
-+    u8 *src, *dst;
-+
-+    if (sx == 0 && dx == 0 && width * fontwidth(p) * 2 == bytes) {
-+      fb_memmove(p->screen_base + dy * linesize,
-+                p->screen_base + sy * linesize,
-+                height * linesize);
-+      return;
-+    }
-+    if (fontwidthlog(p)) {
-+      sx <<= fontwidthlog(p)+1;
-+      dx <<= fontwidthlog(p)+1;
-+      width <<= fontwidthlog(p)+1;
-+    } else {
-+      sx *= fontwidth(p)*2;
-+      dx *= fontwidth(p)*2;
-+      width *= fontwidth(p)*2;
-+    }
-+    sx += splash_data.splash_text_xo*2 + splash_data.splash_text_yo * bytes;
-+    dx += splash_data.splash_text_xo*2 + splash_data.splash_text_yo * bytes;
-+    if (dy < sy || (dy == sy && dx < sx)) {
-+      src = p->screen_base + sy * linesize + sx;
-+      dst = p->screen_base + dy * linesize + dx;
-+      for (rows = height * fontheight(p); rows--;) {
-+          fb_memmove(dst, src, width);
-+          src += bytes;
-+          dst += bytes;
-+      }
-+    } else {
-+      src = p->screen_base + (sy+height) * linesize + sx - bytes;
-+      dst = p->screen_base + (dy+height) * linesize + dx - bytes;
-+      for (rows = height * fontheight(p); rows--;) {
-+          fb_memmove(dst, src, width);
-+          src -= bytes;
-+          dst -= bytes;
-+      }
-+    }
-+}
-+
-+static inline void rectfill(u8 *dest, int width, int height, u32 data,
-+                          int linesize)
-+{
-+    int i;
-+
-+    data |= data<<16;
-+
-+    while (height-- > 0) {
-+      u32 *p = (u32 *)dest;
-+      for (i = 0; i < width/4; i++) {
-+          fb_writel(data, p++);
-+          fb_writel(data, p++);
-+      }
-+      if (width & 2)
-+          fb_writel(data, p++);
-+      if (width & 1)
-+          fb_writew(data, (u16*)p);
-+      dest += linesize;
-+    }
-+}
-+
-+void splashfill(u8 *dest, u8 *src, int width, int height,
-+                       int dest_linesize, int src_linesize)
-+{
-+
-+    int i;
-+
-+    while (height-- > 0) {
-+      u32 *p = (u32 *)dest;
-+      u32 *q = (u32 *)src;
-+
-+      for (i=0; i < width/4; i++) {
-+          fb_writel(*q++,p++);
-+          fb_writel(*q++,p++);
-+      }
-+      if (width & 2)
-+          fb_writel(*q++,p++);
-+      if (width & 1)
-+          fb_writew(*(u16*)q,(u16*)p);
-+      dest += dest_linesize;
-+      src  += src_linesize;
-+    }
-+}
-+
-+void fbcon_splash16_clear(struct vc_data *conp, struct display *p, int sy, int sx,
-+                     int height, int width)
-+{
-+    u8 *dest;
-+    int bytes = p->next_line, lines = height * fontheight(p);
-+    u32 bgx;
-+    int offset, transparent=0;
-+
-+    dest = p->screen_base + sy * fontheight(p) * bytes + sx * fontwidth(p) * 2;
-+
-+    bgx = ((u16 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
-+
-+    width *= fontwidth(p)/4;
-+
-+    dest   += splash_data.splash_text_yo * bytes  +
-+                splash_data.splash_text_xo * 2;
-+
-+    transparent = (splash_data.splash_color == attr_bgcol_ec(p, conp));
-+    
-+    if (transparent) {
-+      offset = (sy * fontheight(p) + splash_data.splash_text_yo) * splash_bytes +
-+               (sx * fontwidth(p) + splash_data.splash_text_xo) *  2;
-+      
-+      if ((width * 8 == bytes && splash_bytes == bytes))
-+          splashfill(dest,linux_splash + offset, lines * width * 4, 
-+                          1, bytes, splash_bytes);
-+      else
-+          splashfill(dest,linux_splash + offset, width*4, lines,
-+                          bytes, splash_bytes);
-+    } else {
-+       if (width * 8 == bytes)
-+          rectfill(dest, lines * width * 4, 1, bgx, bytes);
-+       else
-+          rectfill(dest, width * 4, lines, bgx, bytes);
-+    }
-+}
-+
-+
-+/*
-+ *  Helper function to read the background from the splashscreen
-+ */
-+# define SPLASH_BGX(off)                      \
-+      if (transparent) {                      \
-+          bgx = *(u32*)(splashbgx + (off));   \
-+          eorx = fgx ^ bgx;                   \
-+      }
-+
-+
-+void fbcon_splash16_putc(struct vc_data *conp, struct display *p, int c, int yy,
-+                    int xx)
-+{
-+    u8 *dest, *cdat, bits;
-+    int bytes = p->next_line, rows;
-+    u32 eorx, fgx, bgx;
-+    int transparent = 0;
-+    u8 *splashbgx = 0;
-+ 
-+    dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 2;
-+
-+    fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)];
-+    bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p, c)];
-+
-+    transparent = (splash_data.splash_color == attr_bgcol(p, c));
-+    
-+    dest += splash_data.splash_text_xo * 2 + splash_data.splash_text_yo * bytes;
-+    splashbgx = linux_splash +
-+          (yy * fontheight(p) + splash_data.splash_text_yo) * splash_bytes + 
-+          (xx * fontwidth(p) + splash_data.splash_text_xo) * 2;
-+
-+    if (transparent && splash_data.splash_color == 0xf) {
-+      if (fgx == 0xffea)
-+          fgx = 0xfe4a;
-+      else if (fgx == 0x57ea)
-+          fgx = 0x0540;
-+      else if (fgx == 0xffff)
-+          fgx = 0x52aa;
-+    }
-+
-+    fgx |= (fgx << 16);
-+    bgx |= (bgx << 16);
-+    eorx = fgx ^ bgx;
-+
-+    switch (fontwidth(p)) {
-+    case 4:
-+    case 8:
-+      cdat = p->fontdata + (c & p->charmask) * fontheight(p);
-+      for (rows = fontheight(p); rows--; dest += bytes) {
-+          bits = *cdat++;
-+          SPLASH_BGX(0);
-+          fb_writel((tab_cfb16[bits >> 6] & eorx) ^ bgx, dest);
-+          SPLASH_BGX(4);
-+          fb_writel((tab_cfb16[bits >> 4 & 3] & eorx) ^ bgx, dest+4);
-+          if (fontwidth(p) == 8) {
-+              SPLASH_BGX(8);
-+              fb_writel((tab_cfb16[bits >> 2 & 3] & eorx) ^ bgx, dest+8);
-+              SPLASH_BGX(12);
-+              fb_writel((tab_cfb16[bits & 3] & eorx) ^ bgx, dest+12);
-+          }
-+
-+          splashbgx += splash_bytes;
-+
-+      }
-+      break;
-+    case 12:
-+    case 16:
-+      cdat = p->fontdata + ((c & p->charmask) * fontheight(p) << 1);
-+      for (rows = fontheight(p); rows--; dest += bytes) {
-+          bits = *cdat++;
-+          SPLASH_BGX(0);
-+          fb_writel((tab_cfb16[bits >> 6] & eorx) ^ bgx, dest);
-+          SPLASH_BGX(4);
-+          fb_writel((tab_cfb16[bits >> 4 & 3] & eorx) ^ bgx, dest+4);
-+          SPLASH_BGX(8);
-+          fb_writel((tab_cfb16[bits >> 2 & 3] & eorx) ^ bgx, dest+8);
-+          SPLASH_BGX(12);
-+          fb_writel((tab_cfb16[bits & 3] & eorx) ^ bgx, dest+12);
-+          bits = *cdat++;
-+          SPLASH_BGX(16);
-+          fb_writel((tab_cfb16[bits >> 6] & eorx) ^ bgx, dest+16);
-+          SPLASH_BGX(20);
-+          fb_writel((tab_cfb16[bits >> 4 & 3] & eorx) ^ bgx, dest+20);
-+          if (fontwidth(p) == 16) {
-+              SPLASH_BGX(24);
-+              fb_writel((tab_cfb16[bits >> 2 & 3] & eorx) ^ bgx, dest+24);
-+              SPLASH_BGX(28);
-+              fb_writel((tab_cfb16[bits & 3] & eorx) ^ bgx, dest+28);
-+          }
-+      }
-+      break;
-+    }
-+}
-+
-+void fbcon_splash16_putcs(struct vc_data *conp, struct display *p,
-+                     const unsigned short *s, int count, int yy, int xx)
-+{
-+    u8 *cdat, *dest, *dest0;
-+    u16 c;
-+    int rows, bytes = p->next_line;
-+    u32 eorx, fgx, bgx;
-+    int transparent = 0;
-+    u8 *splashbgx0 = 0, *splashbgx;
-+
-+    dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 2;
-+    c = scr_readw(s);
-+    fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)];
-+    bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p, c)];
-+
-+    transparent = (splash_data.splash_color == attr_bgcol(p, c));
-+    
-+    dest0 += splash_data.splash_text_xo * 2 + splash_data.splash_text_yo * bytes;
-+    splashbgx0 = linux_splash +
-+            (yy * fontheight(p) + splash_data.splash_text_yo) * splash_bytes +
-+            (xx * fontwidth(p) + splash_data.splash_text_xo) * 2;
-+
-+    if (transparent && splash_data.splash_color == 0xf) {
-+      if (fgx == 0xffea)
-+          fgx = 0xfe4a;
-+      else if (fgx == 0x57ea)
-+          fgx = 0x0540;
-+      else if (fgx == 0xffff)
-+          fgx = 0x52aa;
-+    }
-+
-+    fgx |= (fgx << 16);
-+    bgx |= (bgx << 16);
-+    eorx = fgx ^ bgx;
-+
-+    switch (fontwidth(p)) {
-+    case 4:
-+    case 8:
-+      while (count--) {
-+          c = scr_readw(s++) & p->charmask;
-+          cdat = p->fontdata + c * fontheight(p);
-+
-+          splashbgx = splashbgx0;
-+
-+          for (rows = fontheight(p), dest = dest0; rows--; dest += bytes) {
-+              u8 bits = *cdat++;
-+              SPLASH_BGX(0);
-+              fb_writel((tab_cfb16[bits >> 6] & eorx) ^ bgx, dest);
-+              SPLASH_BGX(4);
-+              fb_writel((tab_cfb16[bits >> 4 & 3] & eorx) ^ bgx, dest+4);
-+              if (fontwidth(p) == 8) {
-+                  SPLASH_BGX(8);
-+                  fb_writel((tab_cfb16[bits >> 2 & 3] & eorx) ^ bgx, dest+8);
-+                  SPLASH_BGX(12);
-+                  fb_writel((tab_cfb16[bits & 3] & eorx) ^ bgx, dest+12);
-+              }
-+              splashbgx += splash_bytes;
-+          }
-+
-+          dest0 += fontwidth(p)*2;
-+          splashbgx0 += fontwidth(p) * 2;
-+      }
-+
-+      break;
-+    case 12:
-+    case 16:
-+      while (count--) {
-+          c = scr_readw(s++) & p->charmask;
-+          cdat = p->fontdata + (c * fontheight(p) << 1);
-+
-+          splashbgx = splashbgx0;
-+
-+          for (rows = fontheight(p), dest = dest0; rows--; dest += bytes) {
-+              u8 bits = *cdat++;
-+              SPLASH_BGX(0);
-+              fb_writel((tab_cfb16[bits >> 6] & eorx) ^ bgx, dest);
-+              SPLASH_BGX(4);
-+              fb_writel((tab_cfb16[bits >> 4 & 3] & eorx) ^ bgx, dest+4);
-+              SPLASH_BGX(8);
-+              fb_writel((tab_cfb16[bits >> 2 & 3] & eorx) ^ bgx, dest+8);
-+              SPLASH_BGX(12);
-+              fb_writel((tab_cfb16[bits & 3] & eorx) ^ bgx, dest+12);
-+              bits = *cdat++;
-+              SPLASH_BGX(16);
-+              fb_writel((tab_cfb16[bits >> 6] & eorx) ^ bgx, dest+16);
-+              SPLASH_BGX(20);
-+              fb_writel((tab_cfb16[bits >> 4 & 3] & eorx) ^ bgx, dest+20);
-+              if (fontwidth(p) == 16) {
-+                  SPLASH_BGX(24);
-+                  fb_writel((tab_cfb16[bits >> 2 & 3] & eorx) ^ bgx, dest+24);
-+                  SPLASH_BGX(28);
-+                  fb_writel((tab_cfb16[bits & 3] & eorx) ^ bgx, dest+28);
-+              }
-+              splashbgx += splash_bytes;
-+          }
-+
-+          dest0 += fontwidth(p)*2;
-+          splashbgx0 += fontwidth(p) * 2;
-+      }
-+
-+      break;
-+    }
-+}
-+
-+void fbcon_splash16_revc(struct display *p, int xx, int yy)
-+{
-+    u8 *dest;
-+    int bytes = p->next_line, rows;
-+
-+    dest = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p)*2;
-+    dest += splash_data.splash_text_yo * bytes + splash_data.splash_text_xo * 2;
-+
-+    for (rows = fontheight(p); rows--; dest += bytes) {
-+      switch (fontwidth(p)) {
-+      case 16:
-+          fb_writel(fb_readl(dest+24) ^ 0xffffffff, dest+24);
-+          fb_writel(fb_readl(dest+28) ^ 0xffffffff, dest+28);
-+          /* FALL THROUGH */
-+      case 12:
-+          fb_writel(fb_readl(dest+16) ^ 0xffffffff, dest+16);
-+          fb_writel(fb_readl(dest+20) ^ 0xffffffff, dest+20);
-+          /* FALL THROUGH */
-+      case 8:
-+          fb_writel(fb_readl(dest+8) ^ 0xffffffff, dest+8);
-+          fb_writel(fb_readl(dest+12) ^ 0xffffffff, dest+12);
-+          /* FALL THROUGH */
-+      case 4:
-+          fb_writel(fb_readl(dest+0) ^ 0xffffffff, dest+0);
-+          fb_writel(fb_readl(dest+4) ^ 0xffffffff, dest+4);
-+      }
-+    }
-+}
-+
-+void fbcon_splash16_clear_margins(struct vc_data *conp, struct display *p,
-+                             int bottom_only)
-+{
-+    int bytes = p->next_line;
-+    u32 bgx;
-+
-+    unsigned int right_start = conp->vc_cols*fontwidth(p);
-+    unsigned int bottom_start = conp->vc_rows*fontheight(p);
-+    unsigned int right_width, bottom_width;
-+
-+    int left_margin_width = splash_data.splash_text_xo;
-+    int text_width = conp->vc_cols * fontwidth(p);
-+    int right_margin_width = p->var.xres - text_width - left_margin_width;
-+    int top_margin_height = splash_data.splash_text_yo;
-+    int text_height = conp->vc_rows * fontheight(p);
-+    int bottom_margin_height = p->var.yres - text_height - top_margin_height;
-+ 
-+    bgx = ((u16 *)p->dispsw_data)[attr_bgcol_ec(p, conp)];
-+
-+    if (bottom_only == -1) {
-+      printk(KERN_DEBUG "Called with bottom-only\n");
-+      splashfill(p->screen_base, linux_splash, p->var.xres, p->var.yres, bytes, splash_bytes); 
-+      return;
-+    }
-+
-+    if (!bottom_only && (right_width = p->var.xres-right_start)) {
-+      /* left margin */
-+      splashfill(p->screen_base + top_margin_height * bytes,
-+                 linux_splash + top_margin_height * 
-+                 splash_bytes, left_margin_width,
-+                 text_height, bytes, splash_bytes);
-+
-+      /* right margin */
-+      splashfill(p->screen_base + left_margin_width*2 + text_width*2 +
-+                  top_margin_height * bytes, linux_splash +
-+                  left_margin_width*2 + text_width*2 + top_margin_height *
-+                  splash_bytes, right_margin_width, text_height,
-+                  bytes, splash_bytes);
-+    }
-+
-+    if ((bottom_width = p->var.yres-bottom_start))
-+      /* bottom margin */
-+      splashfill(p->screen_base + (top_margin_height + text_height) *
-+                  bytes, linux_splash + (top_margin_height +
-+                  text_height) * splash_bytes, p->var.xres, 
-+                  bottom_margin_height, bytes, splash_bytes);
-+
-+    /* top margin */
-+    splashfill(p->screen_base, linux_splash,
-+          p->var.xres, top_margin_height,
-+          bytes, splash_bytes);
-+
-+    /* leave function if work is done */
-+    return;
-+}
-+
-+
-+    /*
-+     *  `switch' for the low level operations
-+     */
-+
-+struct display_switch fbcon_splash16 = {
-+    bmove:            fbcon_splash16_bmove,
-+    clear:            fbcon_splash16_clear,
-+    putc:             fbcon_splash16_putc,
-+    putcs:            fbcon_splash16_putcs,
-+    revc:             fbcon_splash16_revc,
-+    clear_margins:    fbcon_splash16_clear_margins,
-+    fontwidthmask:    FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
-+};
-+
-+
-+#ifdef MODULE
-+MODULE_LICENSE("GPL");
-+
-+int init_module(void)
-+{
-+    return 0;
-+}
-+
-+void cleanup_module(void)
-+{}
-+#endif /* MODULE */
-+
-+
-+    /*
-+     *  Visible symbols for modules
-+     */
-+
-+EXPORT_SYMBOL(fbcon_splash16);
-+EXPORT_SYMBOL(fbcon_splash16_bmove);
-+EXPORT_SYMBOL(fbcon_splash16_clear);
-+EXPORT_SYMBOL(fbcon_splash16_putc);
-+EXPORT_SYMBOL(fbcon_splash16_putcs);
-+EXPORT_SYMBOL(fbcon_splash16_revc);
-+EXPORT_SYMBOL(fbcon_splash16_clear_margins);
-diff -urN linux-2.4.24.org/drivers/video/fbcon-splash.c linux-2.4.24/drivers/video/fbcon-splash.c
---- linux-2.4.24.org/drivers/video/fbcon-splash.c      1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/drivers/video/fbcon-splash.c  2004-01-19 21:03:48.216680056 +0100
-@@ -0,0 +1,848 @@
-+/* 
-+ *    linux/drivers/video/fbcon-splash.c - splash screen handling functions.
-+ *    
-+ *    (w) 2001-2003 by Volker Poplawski, <volker@suse.de>
-+ *                Stefan Reinauer, <stepan@suse.de>
-+ *                Steffen Winterfeldt, <snwint@suse.de>
-+ *                
-+ *           Ideas & SuSE screen work by Ken Wimer, <wimer@suse.de>
-+ */
-+
-+#include <linux/version.h>
-+#include <linux/config.h>
-+#include <linux/module.h>
-+#include <linux/fb.h>
-+#include <linux/vt_kern.h>
-+#include <linux/vmalloc.h>
-+
-+#include <asm/irq.h>
-+#include <asm/system.h>
-+
-+#include <video/fbcon.h>
-+#include <video/font.h>
-+#include <video/fbcon-cfb16.h>  /* for fbcon_cfb16 */
-+
-+#include "fbcon-splash.h"
-+#include "fbcon-jpegdec.h"
-+
-+#define SPLASH_VERSION "3.0.7-2003/03/10"
-+
-+#ifdef CONFIG_BLK_DEV_INITRD
-+unsigned char signature[] = "BOOTSPL1SPL2SPL3";
-+#endif
-+
-+/* from drivers/char/console.c */
-+extern void con_remap_def_color(int currcons, int new_color);
-+
-+/* from drivers/video/fbcon-splash16.c */
-+extern void splashfill(u8 *dest, u8 *src, int width, int height, 
-+                      int dest_linesize, int src_linesize);
-+
-+/* internal control states and data pointers */
-+struct splash_data splash_data;
-+
-+unsigned char *linux_splash;  /* decoded picture */
-+int linux_splash_size = 0;
-+
-+static struct jpeg_decdata *decdata = 0; /* private decoder data */
-+
-+int splash_bytes;             /* bytes per line in linux_splash */
-+int splash_shown = 0;         /* is the splash onscreen? */
-+int splash_usesilent = 0;     /* shall we display the silentjpeg */
-+int splash_default = 0xf01;
-+
-+static int splash_status(struct display *p);
-+static int splash_recolor(struct display *p);
-+static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int depth);
-+
-+extern struct display_switch fbcon_splash16;
-+
-+int __init splash_init(char *options)
-+{
-+      if(!strncmp("silent",options,6)) {
-+              printk(KERN_INFO "bootsplash: silent mode.\n");
-+              splash_usesilent = 1;
-+              /* skip "silent," */
-+              if (strlen(options)==6)
-+                      return 0;
-+              options+=7;
-+      }
-+      if(!strncmp("verbose",options,7)) {
-+              printk(KERN_INFO "bootsplash: verbose mode.\n");
-+              splash_usesilent = 0;
-+              return 0;
-+      }
-+              
-+      splash_default = simple_strtoul(options, NULL, 0);
-+
-+      return 0;
-+}
-+
-+__setup("splash=", splash_init);
-+
-+
-+static int splash_hasinter(unsigned char *buf, int num)
-+{
-+    unsigned char *bufend = buf + num * 12;
-+    while(buf < bufend) {
-+      if (buf[1] > 127)               /* inter? */
-+          return 1;
-+      buf += buf[3] > 127 ? 24 : 12;  /* blend? */
-+    }
-+    return 0;
-+}
-+
-+static int boxextract(unsigned char *buf, unsigned short *dp, unsigned char *cols, int *blendp)
-+{
-+    dp[0] = buf[0] | buf[1] << 8;
-+    dp[1] = buf[2] | buf[3] << 8;
-+    dp[2] = buf[4] | buf[5] << 8;
-+    dp[3] = buf[6] | buf[7] << 8;
-+    *(unsigned int *)(cols + 0) =
-+      *(unsigned int *)(cols + 4) =
-+      *(unsigned int *)(cols + 8) =
-+      *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 8);
-+    if (dp[1] > 32767) {
-+      dp[1] = ~dp[1];
-+      *(unsigned int *)(cols + 4) = *(unsigned int *)(buf + 12);
-+      *(unsigned int *)(cols + 8) = *(unsigned int *)(buf + 16);
-+      *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 20);
-+      *blendp = 1;
-+      return 24;
-+    }
-+    return 12;
-+}
-+
-+static void boxit(unsigned char *pic, int bytes, unsigned char *buf, int num, int percent, int overpaint)
-+{
-+    int x, y, i, p, doblend, r, g, b, a, add;
-+    unsigned short data1[4];
-+    unsigned char cols1[16];
-+    unsigned short data2[4];
-+    unsigned char cols2[16];
-+    unsigned char *bufend;
-+    unsigned short *picp;
-+
-+    if (num == 0)
-+      return;
-+    bufend = buf + num * 12;
-+    while(buf < bufend) {
-+      doblend = 0;
-+      buf += boxextract(buf, data1, cols1, &doblend);
-+      if (data1[0] > 32767)
-+          buf += boxextract(buf, data2, cols2, &doblend);
-+      if (data1[2] > 32767) {
-+          if (overpaint)
-+              continue;
-+          data1[2] = ~data1[2];
-+      }
-+      if (data1[3] > 32767) {
-+          if (percent == 65536)
-+              continue;
-+          data1[3] = ~data1[3];
-+      }
-+      if (data1[0] > 32767) {
-+          data1[0] = ~data1[0];
-+          for (i = 0; i < 4; i++)
-+              data1[i] = (data1[i] * (65536 - percent) + data2[i] * percent) >> 16;
-+          for (i = 0; i < 16; i++)
-+              cols1[i] = (cols1[i] * (65536 - percent) + cols2[i] * percent) >> 16;
-+      }
-+      *(unsigned int *)cols2 = *(unsigned int *)cols1;
-+      a = cols2[3];
-+      if (a == 0 && !doblend)
-+          continue;
-+      for (y = data1[1]; y <= data1[3]; y++) {
-+          if (doblend) {
-+              if ((p = data1[3] - data1[1]) != 0)
-+                  p = ((y - data1[1]) << 16) / p;
-+              for (i = 0; i < 8; i++)
-+                  cols2[i + 8] = (cols1[i] * (65536 - p) + cols1[i + 8] * p) >> 16;
-+          }
-+          add = (data1[0] & 1);
-+          add ^= (add ^ y) & 1 ? 1 : 3;               /* 2x2 ordered dithering */
-+          picp = (unsigned short *)(pic + data1[0] * 2 + y * bytes);
-+          for (x = data1[0]; x <= data1[2]; x++) {
-+              if (doblend) {
-+                  if ((p = data1[2] - data1[0]) != 0)
-+                      p = ((x - data1[0]) << 16) / p;
-+                  for (i = 0; i < 4; i++)
-+                      cols2[i] = (cols2[i + 8] * (65536 - p) + cols2[i + 12] * p) >> 16;
-+                  a = cols2[3];
-+              }
-+              r = cols2[0];
-+              g = cols2[1];
-+              b = cols2[2];
-+              if (a != 255) {
-+                  i = *picp;
-+                  r = ((i >> 8 & 0xf8) * (255 - a) + r * a) / 255;
-+                  g = ((i >> 3 & 0xfc) * (255 - a) + g * a) / 255;
-+                  b = ((i << 3 & 0xf8) * (255 - a) + b * a) / 255;
-+              }
-+  #define CLAMP(x) ((x) >= 256 ? 255 : (x))
-+              i = ((CLAMP(r + add*2+1) & 0xf8) <<  8) |
-+                  ((CLAMP(g + add    ) & 0xfc) <<  3) |
-+                  ((CLAMP(b + add*2+1)       ) >>  3);
-+              *picp++ = i;
-+              add ^= 3;
-+          }
-+      }
-+    }
-+}
-+
-+static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int depth)
-+{
-+    int size, err;
-+    unsigned char *mem;
-+
-+    size = ((width + 15) & ~15) * ((height + 15) & ~15) * (depth >> 3);
-+    mem = vmalloc(size);
-+    if (!mem) {
-+      printk(KERN_INFO "No memory for decoded picture!\n");
-+      return -1;
-+    }
-+    if (!decdata)
-+      decdata = vmalloc(sizeof(*decdata));
-+    if ((err = jpeg_decode(jpeg, mem, ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata)))
-+        printk(KERN_INFO "error %d while decompressing picture.\n",err);
-+    vfree(mem);
-+    return err ? -1 : 0;
-+}
-+
-+static void splash_free(struct display * p)
-+{
-+    if (!p->splash_data)
-+      return;
-+    if (p->splash_data->oldscreen_base)
-+          p->screen_base = p->splash_data->oldscreen_base;
-+    if (p->splash_data->olddispsw)
-+          p->dispsw = p->splash_data->olddispsw;
-+    if (p->splash_data->splash_silentjpeg)
-+          vfree(p->splash_data->splash_sboxes);
-+    vfree(p->splash_data);
-+    p->splash_data = 0;
-+}
-+
-+static int splash_mkpenguin(struct splash_data *data, int pxo, int pyo, int pwi, int phe, int pr, int pg, int pb)
-+{
-+    unsigned char *buf;
-+    int i;
-+
-+    if (pwi ==0 || phe == 0)
-+      return 0;
-+    buf = (unsigned char *)data + sizeof(*data);
-+    pwi += pxo - 1;
-+    phe += pyo - 1;
-+    *buf++ = pxo;
-+    *buf++ = pxo >> 8;
-+    *buf++ = pyo;
-+    *buf++ = pyo >> 8;
-+    *buf++ = pwi;
-+    *buf++ = pwi >> 8;
-+    *buf++ = phe;
-+    *buf++ = phe >> 8;
-+    *buf++ = pr;
-+    *buf++ = pg;
-+    *buf++ = pb;
-+    *buf++ = 0;
-+    for (i = 0; i < 12; i++, buf++)
-+      *buf = buf[-12];
-+    buf[-24] ^= 0xff;
-+    buf[-23] ^= 0xff;
-+    buf[-1] = 0xff;
-+    return 2;
-+}
-+
-+int splash_getraw(unsigned char *start, unsigned char *end)
-+{
-+      unsigned char *ndata;
-+      int found = 0;
-+      int splash_size = 0;
-+      void *splash_start = 0;
-+        int unit = 0;
-+        int width = 0, height = 0;
-+      int silentsize;
-+      int boxcount = 0;
-+      int sboxcount = 0;
-+      int palcnt = 0;
-+      struct display *p;
-+
-+      printk(KERN_INFO "Looking for splash picture...");
-+
-+      p = &fb_display[0];
-+        silentsize = 0;
-+
-+      for (ndata = start; ndata < end; ndata++) {
-+              if (*((unsigned int *)ndata) != *((unsigned int *)signature))
-+                      continue;
-+              if (*((unsigned int *)(ndata+4))==*((unsigned int *)(signature+4))) {
-+                      printk(".");
-+                      unit = 0;
-+                      p = &fb_display[0];
-+                      width = p->var.xres;
-+                      height = p->var.yres;
-+
-+                      splash_size = ndata[16] + (ndata[17] << 8) + (ndata[18] << 16) + (ndata[19] << 24);
-+                      if (ndata + 20 + splash_size > end) {
-+                              printk(" found, but truncated!\n");
-+                              return -1;
-+                      }
-+                      if (!jpeg_check_size(ndata + 20, width, height)) { 
-+                              ndata += 20 - 1 + splash_size;
-+                              continue;
-+                      }
-+                      if (splash_check_jpeg(ndata + 20, width, height, p->var.bits_per_pixel))
-+                              return -1;
-+                      if (p->splash_data)
-+                              splash_free(p);
-+                      p->splash_data = vmalloc(sizeof(*p->splash_data) + splash_size + 24);
-+                      if (!p->splash_data)
-+                              break;
-+
-+                      p->splash_data->oldscreen_base = 0;
-+                      p->splash_data->olddispsw = 0;
-+                      p->splash_data->splash_silentjpeg = 0;
-+
-+                      p->splash_data->splash_text_xo = ndata[ 8] + (ndata[ 9] << 8);
-+                      p->splash_data->splash_text_yo = ndata[10] + (ndata[11] << 8);
-+                      p->splash_data->splash_text_wi = ndata[12] + (ndata[13] << 8);
-+                      p->splash_data->splash_text_he = ndata[14] + (ndata[15] << 8);
-+                      /* use 8x16 font... */
-+                      p->splash_data->splash_text_xo *= 8;
-+                      p->splash_data->splash_text_wi *= 8;
-+                      p->splash_data->splash_text_yo *= 16;
-+                      p->splash_data->splash_text_he *= 16;
-+                      p->splash_data->splash_color = (splash_default >> 8) & 0x0f;
-+                      p->splash_data->splash_fg_color = (splash_default >> 4) & 0x0f;
-+                      p->splash_data->splash_state = splash_default & 1;
-+                      p->splash_data->splash_percent = 0;
-+                      p->splash_data->splash_overpaintok = 0;
-+                      boxcount = splash_mkpenguin(p->splash_data, p->splash_data->splash_text_xo + 10, p->splash_data->splash_text_yo + 10, p->splash_data->splash_text_wi - 20, p->splash_data->splash_text_he - 20, 0xf0, 0xf0, 0xf0);
-+                      splash_start = ndata + 20;
-+                      found = 1;
-+                      break;
-+              }
-+              if (*((unsigned int *)(ndata + 4)) == *((unsigned int *)(signature+8))) {
-+                      printk(".");
-+                      unit = ndata[8];
-+                      if (unit >= MAX_NR_CONSOLES)
-+                          continue;
-+                      if (unit)
-+                          vc_allocate(unit);
-+                      p = &fb_display[unit];
-+                      width = fb_display[unit].var.xres;
-+                      height = fb_display[unit].var.yres;
-+                      splash_size = ndata[12] + (ndata[13] << 8) + (ndata[14] << 16) + (ndata[15] << 24);
-+                      if (splash_size == -1) {
-+                          printk(" found, updating values.\n");
-+                          if (p->splash_data) {
-+                              if (ndata[9] != 255)
-+                                  p->splash_data->splash_state = ndata[9];
-+                              if (ndata[10] != 255)
-+                                  p->splash_data->splash_fg_color = ndata[10];
-+                              if (ndata[11] != 255)
-+                                  p->splash_data->splash_color = ndata[11];
-+                          }
-+                          return unit;
-+                      }
-+                      if (splash_size == 0) {
-+                              printk(" found, freeing memory.\n");
-+                              if (p->splash_data)
-+                                      splash_free(p);
-+                              return unit;
-+                      }
-+                      if (ndata + 35 + splash_size > end) {
-+                              printk(" found, but truncated!\n");
-+                              return -1;
-+                      }
-+                      if (!jpeg_check_size(ndata + 35, width, height)) {
-+                              ndata += 35 - 1 + splash_size;
-+                              continue;
-+                      }
-+                      if (splash_check_jpeg(ndata + 35, width, height, p->var.bits_per_pixel))
-+                              return -1;
-+                      if (p->splash_data)
-+                              splash_free(p);
-+                      p->splash_data = vmalloc(sizeof(*p->splash_data) + splash_size + 24);
-+                      if (!p->splash_data)
-+                              break;
-+
-+                      p->splash_data->oldscreen_base = 0;
-+                      p->splash_data->olddispsw = 0;
-+                      p->splash_data->splash_silentjpeg = 0;
-+
-+                      p->splash_data->splash_state = ndata[9];
-+                      p->splash_data->splash_fg_color = ndata[10];
-+                      p->splash_data->splash_color = ndata[11];
-+                      p->splash_data->splash_text_xo = ndata[16] + (ndata[17] << 8);
-+                      p->splash_data->splash_text_yo = ndata[18] + (ndata[19] << 8);
-+                      p->splash_data->splash_text_wi = ndata[20] + (ndata[21] << 8);
-+                      p->splash_data->splash_text_he = ndata[22] + (ndata[23] << 8);
-+                      p->splash_data->splash_percent = 0;
-+                      p->splash_data->splash_overpaintok = 0;
-+                      boxcount = splash_mkpenguin(p->splash_data, ndata[24] + (ndata[25] << 8), ndata[26] + (ndata[27] << 8), ndata[28] + (ndata[29] << 8), ndata[30] + (ndata[31] << 8), ndata[32], ndata[33], ndata[34]);
-+                      splash_start = ndata + 35;
-+                      found = 2;
-+                      break;
-+              }
-+              if (*((unsigned int *)(ndata + 4)) == *((unsigned int *)(signature+12))) {
-+                      printk(".");
-+                      unit = ndata[8];
-+                      if (unit >= MAX_NR_CONSOLES)
-+                          continue;
-+                      if (unit)
-+                          vc_allocate(unit);
-+                      p = &fb_display[unit];
-+                      width = p->var.xres;
-+                      height = p->var.yres;
-+                      splash_size = ndata[12] + (ndata[13] << 8) + (ndata[14] << 16) + (ndata[15] << 24);
-+                      if (splash_size == -1) {
-+                          printk(" found, updating values.\n");
-+                          if (p->splash_data) {
-+                              if (ndata[9] != 255)
-+                                  p->splash_data->splash_state = ndata[9];
-+                              if (ndata[10] != 255)
-+                                  p->splash_data->splash_fg_color = ndata[10];
-+                              if (ndata[11] != 255)
-+                                  p->splash_data->splash_color = ndata[11];
-+                          }
-+                          return unit;
-+                      }
-+                      if (splash_size == 0) {
-+                              printk(" found, freeing memory.\n");
-+                              if (p->splash_data)
-+                                      splash_free(p);
-+                              return unit;
-+                      }
-+                      boxcount = ndata[24] + (ndata[25] << 8);
-+                      palcnt = ndata[37] * 3;
-+                      if (ndata + 38 + splash_size > end) {
-+                              printk(" found, but truncated!\n");
-+                              return -1;
-+                      }
-+                      if (!jpeg_check_size(ndata + 38 + boxcount * 12 + palcnt, width, height)) {
-+                              ndata += 38 - 1 + splash_size;
-+                              continue;
-+                      }
-+                      if (splash_check_jpeg(ndata + 38 + boxcount * 12 + palcnt, width, height, p->var.bits_per_pixel))
-+                              return -1;
-+                      silentsize = ndata[28] + (ndata[29] << 8) + (ndata[30] << 16) + (ndata[31] << 24);
-+                      if (silentsize)
-+                          printk(" silenjpeg size %d bytes,", silentsize);
-+                      if (silentsize >= splash_size) {
-+                              printk(" bigger than splashsize!\n");
-+                              return -1;
-+                      }
-+                      splash_size -= silentsize;
-+                      if (!splash_usesilent || !p->fb_info->fbops->fb_get_fix ) {
-+                              silentsize = 0;
-+                      } else {
-+                              struct fb_fix_screeninfo fix;
-+                              p->fb_info->fbops->fb_get_fix(&fix, unit, 0);
-+                              if (height * 2 * p->next_line > fix.smem_len) {
-+                                      printk(" does not fit into framebuffer.\n");
-+                                      silentsize = 0;
-+                              }
-+                      }
-+
-+                      sboxcount = ndata[32] + (ndata[33] << 8);
-+                      if (silentsize) {
-+                              char *simage=ndata + 38 + splash_size + 12 * sboxcount;
-+                              if (!jpeg_check_size(simage, width, height) ||
-+                                  splash_check_jpeg(simage, width, height, p->var.bits_per_pixel)) {
-+                                      printk(" error in silent jpeg.\n");
-+                                      silentsize = 0;
-+                              }
-+                      }
-+                      if (p->splash_data)
-+                              splash_free(p);
-+                      p->splash_data = vmalloc(sizeof(*p->splash_data) + splash_size);
-+                      if (!p->splash_data)
-+                              break;
-+                      p->splash_data->oldscreen_base = 0;
-+                      p->splash_data->olddispsw = 0;
-+                      p->splash_data->splash_silentjpeg = 0;
-+                      if (silentsize) {
-+                              p->splash_data->splash_silentjpeg = vmalloc(silentsize);
-+                              if (p->splash_data->splash_silentjpeg) {
-+                                      memcpy(p->splash_data->splash_silentjpeg, ndata + 38 + splash_size, silentsize);
-+                                      p->splash_data->splash_sboxes = p->splash_data->splash_silentjpeg;
-+                                      p->splash_data->splash_silentjpeg += 12 * sboxcount;
-+                                      p->splash_data->splash_sboxcount = sboxcount;
-+                              }
-+                      }
-+                      p->splash_data->splash_state = ndata[9];
-+                      p->splash_data->splash_fg_color = ndata[10];
-+                      p->splash_data->splash_color = ndata[11];
-+                      p->splash_data->splash_overpaintok = ndata[36];
-+                      p->splash_data->splash_text_xo = ndata[16] + (ndata[17] << 8);
-+                      p->splash_data->splash_text_yo = ndata[18] + (ndata[19] << 8);
-+                      p->splash_data->splash_text_wi = ndata[20] + (ndata[21] << 8);
-+                      p->splash_data->splash_text_he = ndata[22] + (ndata[23] << 8);
-+                      p->splash_data->splash_percent = ndata[34] + (ndata[35] << 8);
-+                      p->splash_data->splash_percent += p->splash_data->splash_percent > 32767;
-+                      splash_start = ndata + 38;
-+                      found = 3;
-+                      break;
-+              }
-+      }
-+      
-+      if (!found) {
-+              printk(" no good signature found.\n");
-+              return -1;
-+      }
-+      if (p->splash_data->splash_text_xo + p->splash_data->splash_text_wi > width || p->splash_data->splash_text_yo + p->splash_data->splash_text_he > height) {
-+              splash_free(p);
-+              p->splash_data = 0;
-+              printk(" found, but has oversized text area!\n");
-+              return -1;
-+      }
-+      if (p->dispsw->setup != fbcon_cfb16.setup) {
-+              splash_free(p);
-+              p->splash_data = 0;
-+              printk(" found, but framebuffer can't handle it!\n");
-+              return -1;
-+      }
-+      printk(" found (%dx%d, %d bytes, v%d).\n", width, height, splash_size, found);
-+
-+      if (found==1) {
-+              printk(KERN_WARNING "bootsplash: Using deprecated v1 header. Updating your splash utility recommended.\n");
-+              printk(KERN_INFO    "bootsplash: Find the latest version at ftp.suse.com/pub/people/stepan/bootsplash/\n");
-+      }
-+
-+      /* copy data so that initrd memory can be freed. */
-+      memcpy((char *)p->splash_data + sizeof(*p->splash_data) + (found < 3 ? boxcount * 12 : 0), splash_start, splash_size);
-+      p->splash_data->splash_boxcount = boxcount;
-+      p->splash_data->splash_boxes = (unsigned char *)p->splash_data + sizeof(*p->splash_data);
-+      p->splash_data->splash_jpeg = (unsigned char *)p->splash_data + sizeof(*p->splash_data) + boxcount * 12 + palcnt;
-+      p->splash_data->splash_palette = (unsigned char *)p->splash_data + sizeof(*p->splash_data) + boxcount * 12;
-+      p->splash_data->splash_palcnt = palcnt / 3;
-+      p->splash_data->splash_dosilent = p->splash_data->splash_silentjpeg != 0;
-+      return unit;
-+}
-+
-+int splash_verbose(void) 
-+{
-+    struct display *p;
-+
-+    p = &fb_display[0];
-+    if (!p || !p->splash_data || !p->splash_data->splash_state || !p->conp)
-+      return 0;
-+    if (fg_console != p->conp->vc_num)
-+      return 0;
-+    if (!p->splash_data->splash_silentjpeg || !p->splash_data->splash_dosilent)
-+      return 0;
-+    if (!p->splash_data->oldscreen_base)
-+      return 0;
-+
-+    p->splash_data->splash_dosilent = 0;
-+
-+    splashfill(p->splash_data->oldscreen_base, p->screen_base, p->var.xres, p->var.yres, p->next_line, p->next_line);
-+    p->screen_base = p->splash_data->oldscreen_base;
-+
-+    return 1;
-+}
-+
-+static void splash_off(struct display *p)
-+{
-+    if (p->splash_data && p->splash_data->oldscreen_base)
-+      p->screen_base = p->splash_data->oldscreen_base;
-+    if (p->splash_data && p->splash_data->olddispsw)
-+      p->dispsw = p->splash_data->olddispsw;
-+    splash_shown = 0;
-+}
-+
-+int splash_prepare(struct display *p)
-+{
-+      int err;
-+        int width, height, depth, size, sbytes;
-+
-+      if (!p->splash_data || !p->splash_data->splash_state) {
-+              if (linux_splash)
-+                      vfree(linux_splash);
-+              if (decdata)
-+                      vfree(decdata);
-+              linux_splash = 0;
-+              decdata = 0;
-+              linux_splash_size = 0;
-+              splash_off(p);
-+              return -1;
-+      }
-+
-+        width = p->var.xres;
-+        height = p->var.yres;
-+        depth = p->var.bits_per_pixel;
-+      if (depth != 16) {      /* Other targets might need fixing */
-+              splash_off(p);
-+              return -2;
-+      }
-+
-+      sbytes = ((width + 15) & ~15) * (depth >> 3);
-+      size = sbytes * ((height + 15) & ~15);
-+      if (size != linux_splash_size) {
-+              if (linux_splash)
-+                      vfree(linux_splash);
-+              linux_splash_size = 0;
-+              linux_splash = 0;
-+              splash_off(p);
-+      }
-+      if (!linux_splash)
-+              linux_splash = vmalloc(size);
-+
-+      if (!linux_splash) {
-+              linux_splash_size = 0;
-+              printk(KERN_INFO "Not enough memory for splash screen.\n");
-+              splash_off(p);
-+              return -3;
-+      }
-+
-+      if (!decdata)
-+          decdata = vmalloc(sizeof(*decdata));
-+
-+      if (!p->splash_data->oldscreen_base)
-+              p->splash_data->oldscreen_base = p->screen_base;
-+
-+      if (p->splash_data->splash_silentjpeg && p->splash_data->splash_dosilent) {
-+              printk(KERN_INFO "Got silent jpeg.\n");
-+              /* fill area after framebuffer with other jpeg */
-+              if ((err = jpeg_decode(p->splash_data->splash_silentjpeg, linux_splash, 
-+                       ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata))) {
-+                      printk(KERN_INFO "Error %d while decompressing silent jpeg.\n", err);
-+                      p->screen_base = p->splash_data->oldscreen_base;
-+                      p->splash_data->splash_dosilent = 0;
-+              } else {
-+                      if (p->splash_data->splash_sboxcount)
-+                              boxit(linux_splash, sbytes, p->splash_data->splash_sboxes, 
-+                                      p->splash_data->splash_sboxcount, p->splash_data->splash_percent, 0);
-+
-+                      splashfill(p->screen_base, linux_splash, p->var.xres, p->var.yres, p->next_line, sbytes);
-+                      p->screen_base = p->splash_data->oldscreen_base + p->next_line * p->var.yres;
-+              }
-+      } else
-+              p->screen_base = p->splash_data->oldscreen_base;
-+
-+      if ((err = jpeg_decode(p->splash_data->splash_jpeg, linux_splash, 
-+               ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata))) {
-+              printk(KERN_INFO "Error %d while decompressing splash screen.\n", err);
-+              vfree(linux_splash);
-+              linux_splash = 0;
-+              linux_splash_size = 0;
-+              splash_off(p);
-+              return -4;
-+      }
-+      linux_splash_size = size;
-+      splash_bytes = sbytes;
-+      if (p->splash_data->splash_boxcount)
-+              boxit(linux_splash, sbytes, p->splash_data->splash_boxes, p->splash_data->splash_boxcount, p->splash_data->splash_percent, 0);
-+      splash_data = *p->splash_data;
-+      splash_shown = p->splash_data->splash_state;
-+      if (splash_shown) {
-+          if (p->dispsw != &fbcon_splash16)
-+              p->splash_data->olddispsw = p->dispsw;
-+          p->dispsw = &fbcon_splash16;
-+      } else
-+              splash_off(p);
-+      return 0;
-+}
-+
-+
-+#ifdef CONFIG_PROC_FS
-+#include <linux/proc_fs.h>
-+
-+struct proc_dir_entry *proc_splash;
-+int splash_read_proc(char *buffer, char **start, off_t offset, int size,
-+                      int *eof, void *data);
-+int splash_write_proc(struct file *file, const char *buffer,
-+                      unsigned long count, void *data);
-+
-+int splash_read_proc(char *buffer, char **start, off_t offset, int size,
-+                      int *eof, void *data)
-+{
-+      int len = 0;
-+      
-+      off_t begin = 0;
-+      struct display *p = &fb_display[0];
-+
-+      int color = p->splash_data ? p->splash_data->splash_color << 4 |
-+                      p->splash_data->splash_fg_color : splash_default >> 4;
-+      int status = p->splash_data ? p->splash_data->splash_state & 1 : 0;
-+      len += sprintf(buffer + len, "Splash screen v%s (0x%02x, %dx%d%s): %s\n",
-+                      SPLASH_VERSION, color, p->var.xres, p->var.yres,
-+                      (p->splash_data ?  p->splash_data->splash_dosilent : 0)? ", silent" : "",
-+                                      status ? "on" : "off");
-+      if (offset >= begin + len)
-+              return 0;
-+
-+      *start = buffer + (begin - offset);
-+
-+      return (size < begin + len - offset ? size : begin + len - offset);
-+}
-+
-+static int splash_recolor(struct display *p)
-+{
-+      if (!p->splash_data)
-+          return -1;
-+      if (!p->splash_data->splash_state)
-+          return 0;
-+      con_remap_def_color(p->conp->vc_num, p->splash_data->splash_color << 4 | p->splash_data->splash_fg_color);
-+      if (fg_console == p->conp->vc_num) {
-+              splash_data = *p->splash_data;
-+              update_region(fg_console,
-+                            p->conp->vc_origin +
-+                            p->conp->vc_size_row *
-+                            p->conp->vc_top,
-+                            p->conp->vc_size_row *
-+                            (p->conp->vc_bottom -
-+                             p->conp->vc_top) / 2);
-+      }
-+      return 0;
-+}
-+
-+static int splash_status(struct display *p)
-+{
-+      printk(KERN_INFO "Splash status on console %d changed to %s\n", p->conp->vc_num, p->splash_data && p->splash_data->splash_state ? "on" : "off");
-+
-+      if (fg_console == p->conp->vc_num)
-+              splash_prepare(p);
-+      if (p->splash_data && p->splash_data->splash_state) {
-+              con_remap_def_color(p->conp->vc_num, p->splash_data->splash_color << 4 | p->splash_data->splash_fg_color);
-+              /* resize_con also calls con_switch which resets yscroll */
-+              vc_resize_con(p->splash_data->splash_text_he / fontheight(p),
-+                              p->splash_data->splash_text_wi / fontwidth(p),
-+                              p->conp->vc_num);
-+              if (fg_console == p->conp->vc_num) {
-+                      update_region(fg_console,
-+                                    p->conp->vc_origin +
-+                                    p->conp->vc_size_row *
-+                                    p->conp->vc_top,
-+                                    p->conp->vc_size_row *
-+                                    (p->conp->vc_bottom -
-+                                     p->conp->vc_top) / 2);
-+                          fbcon_splash16.clear_margins(p->conp, p, 0);
-+              }
-+      } else {
-+              /* Switch bootsplash off */
-+              con_remap_def_color(p->conp->vc_num, 0x07);
-+              vc_resize_con(p->var.yres / fontheight(p),
-+                            p->var.xres / fontwidth(p),
-+                            p->conp->vc_num);
-+      }
-+      return 0;
-+}
-+
-+int splash_write_proc(struct file *file, const char *buffer,
-+                    unsigned long count, void *data)
-+{
-+        int new, unit;
-+      struct display *p;
-+      
-+      if (!buffer || !splash_default)
-+              return count;
-+
-+      if (!strncmp(buffer, "show", 4) || !strncmp(buffer, "hide", 4)) {
-+              int pe;
-+
-+              p = &fb_display[0];
-+              if (buffer[4] == ' ' && buffer[5] == 'p')
-+                      pe = 0;
-+              else if (buffer[4] == '\n')
-+                      pe = 65535;
-+              else
-+                      pe = simple_strtoul(buffer + 5, NULL, 0);
-+              if (pe < 0)
-+                      pe = 0;
-+              if (pe > 65535)
-+                      pe = 65535;
-+              if (*buffer == 'h')
-+                      pe = 65535 - pe;
-+              pe += pe > 32767;
-+              if (p->splash_data && p->splash_data->splash_percent != pe) {
-+                      p->splash_data->splash_percent = pe;
-+                      if (fg_console != p->conp->vc_num || !p->splash_data->splash_state)
-+                          return count;
-+                      if (!p->splash_data->splash_overpaintok || p->splash_data->splash_percent == 65536) {
-+                              if (splash_hasinter(p->splash_data->splash_boxes, p->splash_data->splash_boxcount))
-+                                      splash_status(p);
-+                              else
-+                                      splash_prepare(p);
-+                      } else {
-+                              if (p->splash_data->splash_silentjpeg && p->splash_data->splash_dosilent && p->splash_data->oldscreen_base)
-+                                      boxit(p->splash_data->oldscreen_base, p->next_line, p->splash_data->splash_sboxes, p->splash_data->splash_sboxcount, p->splash_data->splash_percent, 1);
-+                              boxit(p->screen_base, p->next_line, p->splash_data->splash_boxes, p->splash_data->splash_boxcount, p->splash_data->splash_percent, 1);
-+                      }
-+              }
-+              return count;
-+      }
-+      if (!strncmp(buffer,"silent\n",7) || !strncmp(buffer,"verbose\n",8)) {
-+              p = &fb_display[0];
-+              if (p->splash_data && p->splash_data->splash_silentjpeg) {
-+                  if (p->splash_data->splash_dosilent != (buffer[0] == 's')) {
-+                      p->splash_data->splash_dosilent = buffer[0] == 's';
-+                      splash_status(p);
-+                  }
-+              }
-+              return count;
-+      }
-+      if (!strncmp(buffer,"freesilent\n",11)) {
-+              p = &fb_display[0];
-+              if (p->splash_data && p->splash_data->splash_silentjpeg) {
-+                  printk(KERN_INFO "bootsplash: freeing silent jpeg\n");
-+                  p->splash_data->splash_silentjpeg = 0;
-+                  vfree(p->splash_data->splash_sboxes);
-+                  p->splash_data->splash_sboxes = 0;
-+                  p->splash_data->splash_sboxcount = 0;
-+                  if (p->splash_data->splash_dosilent)
-+                      splash_status(p);
-+                  p->splash_data->splash_dosilent = 0;
-+              }
-+              return count;
-+      }
-+
-+      if (!strncmp(buffer, signature, 7)) {
-+          unit = splash_getraw((unsigned char *)buffer, (unsigned char *)buffer + count);
-+          if (unit >= 0) {
-+              p = &fb_display[unit];
-+              splash_status(p);
-+          }
-+          return count;
-+      }
-+      p = &fb_display[0];
-+      if (!p->splash_data)
-+              return count;
-+      if (buffer[0] == 't') {
-+              p->splash_data->splash_state ^= 1;
-+              splash_status(p);
-+              return count;
-+      }
-+      new = simple_strtoul(buffer, NULL, 0);
-+      if (new > 1) {
-+              /* expert user */
-+              p->splash_data->splash_color    = new >> 8 & 0xff;
-+              p->splash_data->splash_fg_color = new >> 4 & 0x0f;
-+      }
-+      if ((new & 1) == p->splash_data->splash_state)
-+              splash_recolor(p);
-+      else {
-+              p->splash_data->splash_state = new & 1;
-+              splash_status(p);
-+      }
-+      return count;
-+}
-+
-+int splash_proc_register(void)
-+{
-+      if ((proc_splash = create_proc_entry("splash", 0, 0))) {
-+              proc_splash->read_proc = splash_read_proc;
-+              proc_splash->write_proc = splash_write_proc;
-+              return 0;
-+      }
-+      return 1;
-+}
-+
-+int splash_proc_unregister(void)
-+{
-+      if (proc_splash)
-+              remove_proc_entry("splash", 0);
-+      return 0;
-+}
-+#endif
-diff -urN linux-2.4.24.org/drivers/video/fbcon-splash.h linux-2.4.24/drivers/video/fbcon-splash.h
---- linux-2.4.24.org/drivers/video/fbcon-splash.h      1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/drivers/video/fbcon-splash.h  2004-01-19 21:03:48.218679640 +0100
-@@ -0,0 +1,18 @@
-+/* 
-+ *    linux/drivers/video/splash.h - splash screen definition.
-+ *    
-+ *    (w) 2001-2003 by Volker Poplawski, <volker@suse.de>
-+ *                Stefan Reinauer, <stepan@suse.de>
-+ *                
-+ *                
-+ *    idea and SuSE screen work by Ken Wimer, <wimer@suse.de>
-+ */
-+
-+extern int splash_getraw(unsigned char *, unsigned char *);
-+extern int splash_prepare(struct display *);
-+
-+extern int splash_shown;              /* is splash shown? */
-+extern struct splash_data splash_data;        /* image data, copied over
-+                                         from display */
-+extern unsigned char *linux_splash;   /* decoded pic data */
-+extern int splash_bytes;              /* bytes per line */
-diff -urN linux-2.4.24.org/drivers/video/Makefile linux-2.4.24/drivers/video/Makefile
---- linux-2.4.24.org/drivers/video/Makefile    2004-01-19 21:01:12.732012987 +0100
-+++ linux-2.4.24/drivers/video/Makefile        2004-01-19 21:05:58.628528100 +0100
-@@ -14,7 +14,7 @@
-                 fbcon-vga.o fbcon-iplan2p2.o fbcon-iplan2p4.o \
-                 fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o \
-                 fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o \
--                fbcon-cfb8.o fbcon-mac.o fbcon-mfb.o \
-+                fbcon-cfb8.o fbcon-splash16.o fbcon-mac.o fbcon-mfb.o \
-                 cyber2000fb.o sa1100fb.o fbcon-hga.o fbgen.o macmodes.o
- # Each configuration option enables a list of files.
-@@ -159,6 +159,10 @@
- obj-$(CONFIG_FBCON_HGA)           += fbcon-hga.o
- obj-$(CONFIG_FBCON_STI)           += fbcon-sti.o
-+obj-$(CONFIG_FBCON_SPLASHSCREEN)  += fbcon-splash.o
-+obj-$(CONFIG_FBCON_SPLASHSCREEN)  += fbcon-splash16.o
-+obj-$(CONFIG_FBCON_SPLASHSCREEN)  += fbcon-jpegdec.o
-+
- include $(TOPDIR)/Rules.make
- clean:
-diff -urN linux-2.4.24.org/include/video/fbcon.h linux-2.4.24/include/video/fbcon.h
---- linux-2.4.24.org/include/video/fbcon.h     2004-01-19 20:59:23.213788389 +0100
-+++ linux-2.4.24/include/video/fbcon.h 2004-01-19 21:03:48.295663632 +0100
-@@ -42,6 +42,35 @@
-     unsigned int fontwidthmask;      /* 1 at (1 << (width - 1)) if width is supported */
- }; 
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+struct splash_data {
-+      int     splash_state;                   /* show splash? */
-+      int     splash_color;                   /* transparent color */
-+      int     splash_fg_color;                /* foreground color */
-+      int     splash_width;                   /* width of image */
-+      int     splash_height;                  /* height of image */
-+      int     splash_text_xo;                 /* text area origin */
-+      int     splash_text_yo;
-+      int     splash_text_wi;                 /* text area size */ 
-+      int     splash_text_he;
-+      int     splash_showtext;                /* silent/verbose mode */
-+      int     splash_boxcount;
-+      int     splash_percent;
-+      int     splash_overpaintok;             /* is it ok to overpaint boxes */
-+      int     splash_palcnt;
-+      struct display_switch *olddispsw;       /* old dispsw, normally &fbcon_cfb16*/
-+      char    *oldscreen_base;                /* pointer to top of virtual screen */    
-+      unsigned char *splash_boxes;
-+      unsigned char *splash_jpeg;             /* jpeg */
-+      unsigned char *splash_palette;          /* palette for 8-bit */
-+
-+      int     splash_dosilent;                /* show silent jpeg */
-+      unsigned char *splash_silentjpeg;
-+      unsigned char *splash_sboxes;
-+      int     splash_sboxcount;
-+};
-+#endif
-+
- extern struct display_switch fbcon_dummy;
-    /*
-@@ -95,6 +124,10 @@
-     short yscroll;                  /* Hardware scrolling */
-     unsigned char fgshift, bgshift;
-     unsigned short charmask;        /* 0xff or 0x1ff */
-+
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+    struct splash_data *splash_data;
-+#endif
- };
- /* drivers/video/fbcon.c */
-diff -urN linux-2.4.24.org/kernel/panic.c linux-2.4.24/kernel/panic.c
---- linux-2.4.24.org/kernel/panic.c    2004-01-19 20:58:34.218977671 +0100
-+++ linux-2.4.24/kernel/panic.c        2004-01-19 21:03:48.336655108 +0100
-@@ -83,6 +83,13 @@
-                * We can't use the "normal" timers since we just panicked..
-                */
-               printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
-+
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+              {
-+                      extern int splash_verbose(void);
-+                      (void)splash_verbose();
-+              }
-+#endif
-               mdelay(panic_timeout*1000);
-               /*
-                *      Should we run the reboot notifier. For the moment Im
-@@ -103,6 +110,12 @@
-         disabled_wait(caller);
- #endif
-       sti();
-+#ifdef CONFIG_FBCON_SPLASHSCREEN
-+      {
-+              extern int splash_verbose(void);
-+              (void)splash_verbose();
-+      }
-+#endif
-       for(;;) {
- #if defined(CONFIG_X86) && defined(CONFIG_VT) 
-               extern void panic_blink(void);
-
diff --git a/dc395-tab.patch b/dc395-tab.patch
deleted file mode 100644 (file)
index c5ecbb2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- linux/drivers/scsi/dc395x_trm.h.org        Sun Jul 14 22:02:40 2002
-+++ linux/drivers/scsi/dc395x_trm.h    Sun Jul 14 22:08:20 2002
-@@ -64,7 +64,7 @@
- #endif
- #if (LINUX_VERSION_CODE < KERNEL_VERSION (2,1,70)) || defined(OLD_EH)
--# define EH_FUNC      abort:          DC395x_abort,           \       
-+# define EH_FUNC      abort:          DC395x_abort,           \
-                       reset:          DC395x_reset,
- # define NORM_REC_LVL 1
- #else
diff --git a/jam-04-clone-detached.patch b/jam-04-clone-detached.patch
deleted file mode 100644 (file)
index 3b95e0d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-       Fix a crash that can be caused by a CLONE_DETACHED thread.
-       Author: Ingo Molnar <mingo@elte.hu>
-
---- linux/kernel/exit.c.orig   Mon Sep  9 14:06:05 2002
-+++ linux/kernel/exit.c        Mon Sep  9 14:06:25 2002
-@@ -416,7 +416,7 @@
-        *      
-        */
-       
--      if(current->exit_signal != SIGCHLD &&
-+      if(current->exit_signal != SIGCHLD && current->exit_signal != -1 &&
-           ( current->parent_exec_id != t->self_exec_id  ||
-             current->self_exec_id != current->parent_exec_id) 
-           && !capable(CAP_KILL))
diff --git a/jam-06-force-inline.patch b/jam-06-force-inline.patch
deleted file mode 100644 (file)
index d940d4b..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-       Force inlining of some functions not inlined by gcc3 due to size.
-       Author: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
-
-diff -urN linux-2.5.45.orig/include/linux/compiler.h linux-2.5.45fix/include/linux/compiler.h
---- linux-2.5.45.orig/include/linux/compiler.h Wed Oct 30 22:43:05 2002
-+++ linux-2.5.45fix/include/linux/compiler.h   Sun Nov  3 15:19:20 2002
-@@ -13,4 +13,12 @@
- #define likely(x)     __builtin_expect((x),1)
- #define unlikely(x)   __builtin_expect((x),0)
-+/* GCC 3 (and probably earlier, I'm not sure) can be told to always inline
-+   a function. */
-+#if __GNUC__ < 3
-+#define force_inline inline
-+#else
-+#define force_inline inline __attribute__ ((always_inline))
-+#endif
-+
- #endif /* __LINUX_COMPILER_H */
-diff -urN linux-2.5.45.orig/include/asm-i386/string.h linux-2.5.45fix/include/asm-i386/string.h
---- linux-2.5.45.orig/include/asm-i386/string.h        Wed Oct 30 22:43:46 2002
-+++ linux-2.5.45fix/include/asm-i386/string.h  Sun Nov  3 15:58:08 2002
-@@ -3,6 +3,7 @@
-
- #ifdef __KERNEL__
- #include <linux/config.h>
-+#include <linux/compiler.h>
- /*
-  * On a 486 or Pentium, we are better off not using the
-  * byte string operations. But on a 386 or a PPro the
-@@ -218,7 +219,7 @@
-  * This looks horribly ugly, but the compiler can optimize it totally,
-  * as the count is constant.
-  */
--static inline void * __constant_memcpy(void * to, const void * from, size_t n)
-+static force_inline void * __constant_memcpy(void * to, const void * from, size_t n)
- {
-       switch (n) {
-               case 0:
-@@ -453,7 +454,7 @@
-  * This looks horribly ugly, but the compiler can optimize it totally,
-  * as we by now know that both pattern and count is constant..
-  */
--static inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
-+static force_inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
- {
-       switch (count) {
-               case 0:
---- linux/include/asm-i386/uaccess.h.orig      2002-11-13 01:27:42.000000000 +0100
-+++ linux/include/asm-i386/uaccess.h   2002-11-13 01:30:04.000000000 +0100
-@@ -543,7 +543,7 @@
- unsigned long __generic_copy_to_user(void *, const void *, unsigned long);
- unsigned long __generic_copy_from_user(void *, const void *, unsigned long);
--static inline unsigned long
-+static force_inline unsigned long
- __constant_copy_to_user(void *to, const void *from, unsigned long n)
- {
-       prefetch(from);
-@@ -552,7 +552,7 @@
-       return n;
- }
--static inline unsigned long
-+static force_inline unsigned long
- __constant_copy_from_user(void *to, const void *from, unsigned long n)
- {
-       if (access_ok(VERIFY_READ, from, n))
-@@ -562,14 +562,14 @@
-       return n;
- }
--static inline unsigned long
-+static force_inline unsigned long
- __constant_copy_to_user_nocheck(void *to, const void *from, unsigned long n)
- {
-       __constant_copy_user(to,from,n);
-       return n;
- }
--static inline unsigned long
-+static force_inline unsigned long
- __constant_copy_from_user_nocheck(void *to, const void *from, unsigned long n)
- {
-       __constant_copy_user_zeroing(to,from,n);
diff --git a/jam-07-scsi-error-tmout.patch b/jam-07-scsi-error-tmout.patch
deleted file mode 100644 (file)
index 771dd28..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-       Prevent endless loop in SCSI error handling.
-       Author: Borzenkov Andrey <Andrej.Borsenkow@mow.siemens.ru>
-
---- linux-2.4.18-18mdk/drivers/scsi/scsi_error.c.scsi-eh-timeout       Thu May 30 16:22:37 2002
-+++ linux-2.4.18-18mdk/drivers/scsi/scsi_error.c       Sun Jun  9 19:18:11 2002
-@@ -1103,6 +1103,8 @@
-  */
- STATIC int scsi_eh_completed_normally(Scsi_Cmnd * SCpnt)
- {
-+      int rtn;
-+
-       /*
-        * First check the host byte, to see if there is anything in there
-        * that would indicate what we need to do.
-@@ -1116,14 +1118,18 @@
-                        * otherwise we just flag it as success.
-                        */
-                       SCpnt->flags &= ~IS_RESETTING;
--                      return NEEDS_RETRY;
-+                      goto maybe_retry;
-               }
-               /*
-                * Rats.  We are already in the error handler, so we now get to try
-                * and figure out what to do next.  If the sense is valid, we have
-                * a pretty good idea of what to do.  If not, we mark it as failed.
-                */
--              return scsi_check_sense(SCpnt);
-+              rtn = scsi_check_sense(SCpnt);
-+              if (rtn == NEEDS_RETRY) {
-+                      goto maybe_retry;
-+              }
-+              return rtn;
-       }
-       if (host_byte(SCpnt->result) != DID_OK) {
-               return FAILED;
-@@ -1142,7 +1148,11 @@
-       case COMMAND_TERMINATED:
-               return SUCCESS;
-       case CHECK_CONDITION:
--              return scsi_check_sense(SCpnt);
-+              rtn = scsi_check_sense(SCpnt);
-+              if (rtn == NEEDS_RETRY) {
-+                      goto maybe_retry;
-+              }
-+              return rtn;
-       case CONDITION_GOOD:
-       case INTERMEDIATE_GOOD:
-       case INTERMEDIATE_C_GOOD:
-@@ -1157,6 +1167,17 @@
-               return FAILED;
-       }
-       return FAILED;
-+
-+      maybe_retry:
-+
-+      if ((++SCpnt->retries) < SCpnt->allowed) {
-+              return NEEDS_RETRY;
-+      } else {
-+                /*
-+                 * No more retries - report this one back to upper level.
-+                 */
-+              return SUCCESS;
-+      }
- }
- /*
diff --git a/jam-10-highpage-init.patch b/jam-10-highpage-init.patch
deleted file mode 100644 (file)
index 413e056..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-       Cleanup one_highpage_init() as in 2.5.
-       Author: Christoph Hellwig <hch@sgi.com>
-
---- linux-2.4.20-pre5/arch/i386/mm/init.c      Tue Aug 20 11:36:59 2002
-+++ linux/arch/i386/mm/init.c  Fri Sep  6 13:14:37 2002
-@@ -442,21 +442,14 @@ static inline int page_kills_ppro(unsign
- #ifdef CONFIG_HIGHMEM
- void __init one_highpage_init(struct page *page, int pfn, int bad_ppro)
- {
--      if (!page_is_ram(pfn)) {
-+      if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) {
-+              ClearPageReserved(page);
-+              set_bit(PG_highmem, &page->flags);
-+              set_page_count(page, 1);
-+              __free_page(page);
-+              totalhigh_pages++;
-+      } else
-               SetPageReserved(page);
--              return;
--      }
--      
--      if (bad_ppro && page_kills_ppro(pfn)) {
--              SetPageReserved(page);
--              return;
--      }
--      
--      ClearPageReserved(page);
--      set_bit(PG_highmem, &page->flags);
--      atomic_set(&page->count, 1);
--      __free_page(page);
--      totalhigh_pages++;
- }
- #endif /* CONFIG_HIGHMEM */
diff --git a/jam-11-self_exec_id.patch b/jam-11-self_exec_id.patch
deleted file mode 100644 (file)
index 7d14e8f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-       Fix bad signaling between threads when ancestor dies.
-       Author: Zeuner, Axel <Axel.Zeuner@partner.commerzbank.com>
-
---- linux/kernel/exit.c.original       Mon Aug  5 09:09:31 2002
-+++ linux/kernel/exit.c        Mon Aug  5 12:26:38 2002
-@@ -212,7 +212,6 @@
-               if (p->p_opptr == father) {
-                       /* We dont want people slaying init */
-                       p->exit_signal = SIGCHLD;
--                      p->self_exec_id++;
-                       /* Make sure we're not reparenting to ourselves */
-                       p->p_opptr = child_reaper;
---- linux/kernel/signal.c.original     Mon Aug  5 12:26:49 2002
-+++ linux/kernel/signal.c      Mon Aug  5 12:34:44 2002
-@@ -16,6 +16,8 @@
- #include <asm/uaccess.h>
-+extern struct task_struct* child_reaper;
-+
- /*
-  * SLAB caches for signal bits.
-  */
-@@ -744,6 +746,9 @@
-       struct siginfo info;
-       int why, status;
-+      if (tsk->p_pptr==child_reaper) {
-+              sig=SIGCHLD;
-+      }
-       info.si_signo = sig;
-       info.si_errno = 0;
-       info.si_pid = tsk->pid;
diff --git a/jam-21-mem-barriers.patch b/jam-21-mem-barriers.patch
deleted file mode 100644 (file)
index a80fbc3..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-       Use specific machine level instructions for mb() for new
-       processors (P3,P4,Athlon).
-       Author: Zwane Mwaikambo <zwane@linux.realnet.co.sz>
-
---- linux-2.5.19/arch/i386/config.in.orig      Mon Jun  3 10:33:18 2002
-+++ linux-2.5.19/arch/i386/config.in   Mon Jun 10 08:12:02 2002
-@@ -111,6 +111,7 @@
-    define_bool CONFIG_X86_PGE y
-    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-    define_bool CONFIG_X86_F00F_WORKS_OK y
-+   define_bool CONFIG_X86_SFENCE y
- fi
- if [ "$CONFIG_MPENTIUM4" = "y" ]; then
-    define_int  CONFIG_X86_L1_CACHE_SHIFT 7
-@@ -119,6 +120,9 @@
-    define_bool CONFIG_X86_PGE y
-    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-    define_bool CONFIG_X86_F00F_WORKS_OK y
-+   define_bool CONFIG_X86_SFENCE y
-+   define_bool CONFIG_X86_LFENCE y
-+   define_bool CONFIG_X86_MFENCE y
- fi
- if [ "$CONFIG_MK6" = "y" ]; then
-    define_int  CONFIG_X86_L1_CACHE_SHIFT 5
-@@ -134,6 +138,7 @@
-    define_bool CONFIG_X86_PGE y
-    define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
-    define_bool CONFIG_X86_F00F_WORKS_OK y
-+   define_bool CONFIG_X86_SFENCE y
- fi
- if [ "$CONFIG_MELAN" = "y" ]; then
-    define_int  CONFIG_X86_L1_CACHE_SHIFT 4
---- linux-2.5.19/include/asm-i386/system.h.orig        Mon Jun 10 08:10:55 2002
-+++ linux-2.5.19/include/asm-i386/system.h     Mon Jun 10 08:11:04 2002
-@@ -290,16 +290,33 @@
-  *
-  * Some non intel clones support out of order store. wmb() ceases to be a
-  * nop for these.
-+ *
-+ * Pentium III introduced the SFENCE instruction for serialising all store
-+ * operations, Pentium IV further introduced LFENCE and MFENCE for load and
-+ * memory barriers respecively.
-  */
-- 
-+
-+#ifdef CONFIG_X86_MFENCE
-+#define mb()  __asm__ __volatile__ ("mfence": : :"memory")
-+#else
- #define mb()  __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
-+#endif
-+
-+#ifdef CONFIG_X86_LFENCE
-+#define rmb() __asm__ __volatile__ ("lfence": : :"memory")
-+#else
- #define rmb() mb()
-+#endif
-+#ifdef CONFIG_X86_SFENCE
-+#define wmb() __asm__ __volatile__ ("sfence": : :"memory")
-+#else
- #ifdef CONFIG_X86_OOSTORE
- #define wmb()         __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
- #else
- #define wmb() __asm__ __volatile__ ("": : :"memory")
- #endif
-+#endif /* CONFIG_X86_SFENCE */
- #ifdef CONFIG_SMP
- #define smp_mb()      mb()
diff --git a/jam-30-smptimers-A0.patch b/jam-30-smptimers-A0.patch
deleted file mode 100644 (file)
index 45a686d..0000000
+++ /dev/null
@@ -1,794 +0,0 @@
-       Scalable timer implementation. Lock per-CPU instead of global.
-       Author: Ingo Molnar <mingo@elte.hu>
-       URL: http://redhat.com/~mingo/scalable-timers-patches/
-
---- linux/kernel/timer.c.orig  Tue Nov 27 13:29:34 2001
-+++ linux/kernel/timer.c       Tue Nov 27 13:30:37 2001
-@@ -13,10 +13,15 @@
-  *              serialize accesses to xtime/lost_ticks).
-  *                              Copyright (C) 1998  Andrea Arcangeli
-  *  1999-03-10  Improved NTP compatibility by Ulrich Windl
-+ *  2000-10-05  Implemented scalable SMP per-CPU timer handling.
-+ *                              Copyright (C) 2000  Ingo Molnar
-+ *              Designed by David S. Miller, Alexey Kuznetsov and Ingo Molnar
-  */
- #include <linux/config.h>
-+
- #include <linux/mm.h>
-+#include <linux/init.h>
- #include <linux/timex.h>
- #include <linux/delay.h>
- #include <linux/smp_lock.h>
-@@ -73,87 +78,49 @@
- unsigned long prof_len;
- unsigned long prof_shift;
--/*
-- * Event timer code
-- */
--#define TVN_BITS 6
--#define TVR_BITS 8
--#define TVN_SIZE (1 << TVN_BITS)
--#define TVR_SIZE (1 << TVR_BITS)
--#define TVN_MASK (TVN_SIZE - 1)
--#define TVR_MASK (TVR_SIZE - 1)
--
--struct timer_vec {
--      int index;
--      struct list_head vec[TVN_SIZE];
--};
--
--struct timer_vec_root {
--      int index;
--      struct list_head vec[TVR_SIZE];
--};
--
--static struct timer_vec tv5;
--static struct timer_vec tv4;
--static struct timer_vec tv3;
--static struct timer_vec tv2;
--static struct timer_vec_root tv1;
--
--static struct timer_vec * const tvecs[] = {
--      (struct timer_vec *)&tv1, &tv2, &tv3, &tv4, &tv5
--};
--
--static struct list_head * run_timer_list_running;
--
--#define NOOF_TVECS (sizeof(tvecs) / sizeof(tvecs[0]))
--
--void init_timervecs (void)
--{
--      int i;
-+tvec_base_t tvec_bases[NR_CPUS];
--      for (i = 0; i < TVN_SIZE; i++) {
--              INIT_LIST_HEAD(tv5.vec + i);
--              INIT_LIST_HEAD(tv4.vec + i);
--              INIT_LIST_HEAD(tv3.vec + i);
--              INIT_LIST_HEAD(tv2.vec + i);
--      }
--      for (i = 0; i < TVR_SIZE; i++)
--              INIT_LIST_HEAD(tv1.vec + i);
--}
-+/* jiffies at the most recent update of wall time */
-+unsigned long wall_jiffies;
--static unsigned long timer_jiffies;
-+/*
-+ * This spinlock protect us from races in SMP while playing with xtime. -arca
-+ */
-+rwlock_t xtime_lock = RW_LOCK_UNLOCKED;
--static inline void internal_add_timer(struct timer_list *timer)
-+/*
-+ * This is the 'global' timer BH. This gets called only if one of
-+ * the local timer interrupts couldnt run timers.
-+ */
-+static inline void internal_add_timer(tvec_base_t *base, timer_t *timer)
- {
-       /*
-        * must be cli-ed when calling this
-        */
-       unsigned long expires = timer->expires;
--      unsigned long idx = expires - timer_jiffies;
-+      unsigned long idx = expires - base->timer_jiffies;
-       struct list_head * vec;
--      if (run_timer_list_running)
--              vec = run_timer_list_running;
--      else if (idx < TVR_SIZE) {
-+      if (idx < TVR_SIZE) {
-               int i = expires & TVR_MASK;
--              vec = tv1.vec + i;
-+              vec = base->tv1.vec + i;
-       } else if (idx < 1 << (TVR_BITS + TVN_BITS)) {
-               int i = (expires >> TVR_BITS) & TVN_MASK;
--              vec = tv2.vec + i;
-+              vec = base->tv2.vec + i;
-       } else if (idx < 1 << (TVR_BITS + 2 * TVN_BITS)) {
-               int i = (expires >> (TVR_BITS + TVN_BITS)) & TVN_MASK;
--              vec =  tv3.vec + i;
-+              vec = base->tv3.vec + i;
-       } else if (idx < 1 << (TVR_BITS + 3 * TVN_BITS)) {
-               int i = (expires >> (TVR_BITS + 2 * TVN_BITS)) & TVN_MASK;
--              vec = tv4.vec + i;
-+              vec = base->tv4.vec + i;
-       } else if ((signed long) idx < 0) {
-               /* can happen if you add a timer with expires == jiffies,
-                * or you set a timer to go off in the past
-                */
--              vec = tv1.vec + tv1.index;
-+              vec = base->tv1.vec + base->tv1.index;
-       } else if (idx <= 0xffffffffUL) {
-               int i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK;
--              vec = tv5.vec + i;
-+              vec = base->tv5.vec + i;
-       } else {
-               /* Can only get here on architectures with 64-bit jiffies */
-               INIT_LIST_HEAD(&timer->list);
-@@ -165,37 +136,27 @@
-       list_add(&timer->list, vec->prev);
- }
--/* Initialize both explicitly - let's try to have them in the same cache line */
--spinlock_t timerlist_lock = SPIN_LOCK_UNLOCKED;
--
--#ifdef CONFIG_SMP
--volatile struct timer_list * volatile running_timer;
--#define timer_enter(t) do { running_timer = t; mb(); } while (0)
--#define timer_exit() do { running_timer = NULL; } while (0)
--#define timer_is_running(t) (running_timer == t)
--#define timer_synchronize(t) while (timer_is_running(t)) barrier()
--#else
--#define timer_enter(t)                do { } while (0)
--#define timer_exit()          do { } while (0)
--#endif
--
--void add_timer(struct timer_list *timer)
-+void add_timer(timer_t *timer)
- {
-+      tvec_base_t * base = tvec_bases + smp_processor_id();
-       unsigned long flags;
--      spin_lock_irqsave(&timerlist_lock, flags);
-+      CHECK_BASE(base);
-+      CHECK_BASE(timer->base);
-+      spin_lock_irqsave(&base->lock, flags);
-       if (timer_pending(timer))
-               goto bug;
--      internal_add_timer(timer);
--      spin_unlock_irqrestore(&timerlist_lock, flags);
-+      internal_add_timer(base, timer);
-+      timer->base = base;
-+      spin_unlock_irqrestore(&base->lock, flags);
-       return;
- bug:
--      spin_unlock_irqrestore(&timerlist_lock, flags);
-+      spin_unlock_irqrestore(&base->lock, flags);
-       printk("bug: kernel timer added twice at %p.\n",
-                       __builtin_return_address(0));
- }
--static inline int detach_timer (struct timer_list *timer)
-+static inline int detach_timer(timer_t *timer)
- {
-       if (!timer_pending(timer))
-               return 0;
-@@ -203,28 +164,81 @@
-       return 1;
- }
--int mod_timer(struct timer_list *timer, unsigned long expires)
-+/*
-+ * mod_timer() has subtle locking semantics because parallel
-+ * calls to it must happen serialized.
-+ */
-+int mod_timer(timer_t *timer, unsigned long expires)
- {
--      int ret;
-+      tvec_base_t *old_base, *new_base;
-       unsigned long flags;
-+      int ret;
-+
-+      new_base = tvec_bases + smp_processor_id();
-+      CHECK_BASE(new_base);
-+
-+      __save_flags(flags);
-+      __cli();
-+repeat:
-+      old_base = timer->base;
-+      CHECK_BASE(old_base);
-+
-+      /*
-+       * Prevent deadlocks via ordering by old_base < new_base.
-+       */
-+      if (old_base && (new_base != old_base)) {
-+              if (old_base < new_base) {
-+                      spin_lock(&new_base->lock);
-+                      spin_lock(&old_base->lock);
-+              } else {
-+                      spin_lock(&old_base->lock);
-+                      spin_lock(&new_base->lock);
-+              }
-+              /*
-+               * Subtle, we rely on timer->base being always
-+               * valid and being updated atomically.
-+               */
-+              if (timer->base != old_base) {
-+                      spin_unlock(&new_base->lock);
-+                      spin_unlock(&old_base->lock);
-+                      goto repeat;
-+              }
-+      } else
-+              spin_lock(&new_base->lock);
--      spin_lock_irqsave(&timerlist_lock, flags);
-       timer->expires = expires;
-       ret = detach_timer(timer);
--      internal_add_timer(timer);
--      spin_unlock_irqrestore(&timerlist_lock, flags);
-+      internal_add_timer(new_base, timer);
-+      timer->base = new_base;
-+
-+
-+      if (old_base && (new_base != old_base))
-+              spin_unlock(&old_base->lock);
-+      spin_unlock_irqrestore(&new_base->lock, flags);
-+
-       return ret;
- }
--int del_timer(struct timer_list * timer)
-+int del_timer(timer_t * timer)
- {
--      int ret;
-       unsigned long flags;
-+      tvec_base_t * base;
-+      int ret;
--      spin_lock_irqsave(&timerlist_lock, flags);
-+      CHECK_BASE(timer->base);
-+      if (!timer->base)
-+              return 0;
-+repeat:
-+      base = timer->base;
-+      spin_lock_irqsave(&base->lock, flags);
-+      if (base != timer->base) {
-+              spin_unlock_irqrestore(&base->lock, flags);
-+              goto repeat;
-+      }
-       ret = detach_timer(timer);
-       timer->list.next = timer->list.prev = NULL;
--      spin_unlock_irqrestore(&timerlist_lock, flags);
-+      spin_unlock_irqrestore(&base->lock, flags);
-+
-       return ret;
- }
-@@ -242,24 +256,34 @@
-  * (for reference counting).
-  */
--int del_timer_sync(struct timer_list * timer)
-+int del_timer_sync(timer_t * timer)
- {
-+      tvec_base_t * base;
-       int ret = 0;
-+      CHECK_BASE(timer->base);
-+      if (!timer->base)
-+              return 0;
-       for (;;) {
-               unsigned long flags;
-               int running;
--              spin_lock_irqsave(&timerlist_lock, flags);
-+repeat:
-+              base = timer->base;
-+              spin_lock_irqsave(&base->lock, flags);
-+              if (base != timer->base) {
-+                      spin_unlock_irqrestore(&base->lock, flags);
-+                      goto repeat;
-+              }
-               ret += detach_timer(timer);
-               timer->list.next = timer->list.prev = 0;
--              running = timer_is_running(timer);
--              spin_unlock_irqrestore(&timerlist_lock, flags);
-+              running = timer_is_running(base, timer);
-+              spin_unlock_irqrestore(&base->lock, flags);
-               if (!running)
-                       break;
--              timer_synchronize(timer);
-+              timer_synchronize(base, timer);
-       }
-       return ret;
-@@ -267,7 +291,7 @@
- #endif
--static inline void cascade_timers(struct timer_vec *tv)
-+static void cascade(tvec_base_t *base, tvec_t *tv)
- {
-       /* cascade all the timers from tv up one level */
-       struct list_head *head, *curr, *next;
-@@ -279,66 +303,68 @@
-        * detach them individually, just clear the list afterwards.
-        */
-       while (curr != head) {
--              struct timer_list *tmp;
-+              timer_t *tmp;
--              tmp = list_entry(curr, struct timer_list, list);
-+              tmp = list_entry(curr, timer_t, list);
-+              CHECK_BASE(tmp->base);
-+              if (tmp->base != base)
-+                      BUG();
-               next = curr->next;
-               list_del(curr); // not needed
--              internal_add_timer(tmp);
-+              internal_add_timer(base, tmp);
-               curr = next;
-       }
-       INIT_LIST_HEAD(head);
-       tv->index = (tv->index + 1) & TVN_MASK;
- }
--static inline void run_timer_list(void)
-+static void __run_timers(tvec_base_t *base)
- {
--      spin_lock_irq(&timerlist_lock);
--      while ((long)(jiffies - timer_jiffies) >= 0) {
--              LIST_HEAD(queued);
-+      unsigned long flags;
-+
-+      spin_lock_irqsave(&base->lock, flags);
-+      while ((long)(jiffies - base->timer_jiffies) >= 0) {
-               struct list_head *head, *curr;
--              if (!tv1.index) {
--                      int n = 1;
--                      do {
--                              cascade_timers(tvecs[n]);
--                      } while (tvecs[n]->index == 1 && ++n < NOOF_TVECS);
-+
-+              /*
-+               * Cascade timers:
-+               */
-+              if (!base->tv1.index) {
-+                      cascade(base, &base->tv2);
-+                      if (base->tv2.index == 1) {
-+                              cascade(base, &base->tv3);
-+                              if (base->tv3.index == 1) {
-+                                      cascade(base, &base->tv4);
-+                                      if (base->tv4.index == 1)
-+                                              cascade(base, &base->tv5);
-+                              }
-+                      }
-               }
--              run_timer_list_running = &queued;
- repeat:
--              head = tv1.vec + tv1.index;
-+              head = base->tv1.vec + base->tv1.index;
-               curr = head->next;
-               if (curr != head) {
--                      struct timer_list *timer;
-                       void (*fn)(unsigned long);
-                       unsigned long data;
-+                      timer_t *timer;
--                      timer = list_entry(curr, struct timer_list, list);
-+                      timer = list_entry(curr, timer_t, list);
-                       fn = timer->function;
--                      data= timer->data;
-+                      data = timer->data;
-                       detach_timer(timer);
-                       timer->list.next = timer->list.prev = NULL;
--                      timer_enter(timer);
--                      spin_unlock_irq(&timerlist_lock);
-+                      timer_enter(base, timer);
-+                      spin_unlock_irq(&base->lock);
-                       fn(data);
--                      spin_lock_irq(&timerlist_lock);
--                      timer_exit();
-+                      spin_lock_irq(&base->lock);
-+                      timer_exit(base);
-                       goto repeat;
-               }
--              run_timer_list_running = NULL;
--              ++timer_jiffies; 
--              tv1.index = (tv1.index + 1) & TVR_MASK;
--
--              curr = queued.next;
--              while (curr != &queued) {
--                      struct timer_list *timer;
--
--                      timer = list_entry(curr, struct timer_list, list);
--                      curr = curr->next;
--                      internal_add_timer(timer);
--              }                       
-+              ++base->timer_jiffies;
-+              base->tv1.index = (base->tv1.index + 1) & TVR_MASK;
-       }
--      spin_unlock_irq(&timerlist_lock);
-+      spin_unlock_irqrestore(&base->lock, flags);
- }
- spinlock_t tqueue_lock = SPIN_LOCK_UNLOCKED;
-@@ -632,42 +671,76 @@
-       }
- }
--/* jiffies at the most recent update of wall time */
--unsigned long wall_jiffies;
-+static void run_all_timers(void)
-+{
-+      int i;
-+
-+      for (i = 0; i < smp_num_cpus; i++) {
-+              tvec_base_t *base = tvec_bases + i;
-+              if ((long)(jiffies - base->timer_jiffies) >= 0)
-+                      __run_timers(base);
-+      }
-+}
- /*
-- * This spinlock protect us from races in SMP while playing with xtime. -arca
-+ * Called by the local, per-CPU timer interrupt on SMP.
-+ *
-+ * This function has to do all sorts of locking to make legacy
-+ * cli()-users and BH-disablers work. If locking doesnt succeed
-+ * now then we fall back to TIMER_BH.
-  */
--rwlock_t xtime_lock = RW_LOCK_UNLOCKED;
-+void run_local_timers(void)
-+{
-+      int cpu = smp_processor_id();
-+      tvec_base_t *base = tvec_bases + cpu;
-+
-+      if (in_interrupt())
-+              goto out_mark;
-+
-+      local_bh_disable();
-+      local_irq_disable();
-+      if (!spin_trylock(&global_bh_lock))
-+              goto out_enable_mark;
-+
-+      if (!hardirq_trylock(cpu))
-+              goto out_unlock_enable_mark;
--static inline void update_times(void)
-+      if ((long)(jiffies - base->timer_jiffies) >= 0)
-+              __run_timers(base);
-+
-+      hardirq_endlock(cpu);
-+      spin_unlock(&global_bh_lock);
-+      local_irq_enable();
-+      local_bh_enable();
-+      return;
-+
-+out_unlock_enable_mark:
-+      spin_unlock(&global_bh_lock);
-+
-+out_enable_mark:
-+      local_irq_enable();
-+      local_bh_enable();
-+
-+out_mark:
-+      mark_bh(TIMER_BH);
-+}
-+
-+/*
-+ * Called by the timer interrupt. xtime_lock must already be taken
-+ * by the timer IRQ!
-+ */
-+static void update_times(void)
- {
-       unsigned long ticks;
--      /*
--       * update_times() is run from the raw timer_bh handler so we
--       * just know that the irqs are locally enabled and so we don't
--       * need to save/restore the flags of the local CPU here. -arca
--       */
--      write_lock_irq(&xtime_lock);
--      vxtime_lock();
--
-       ticks = jiffies - wall_jiffies;
-       if (ticks) {
-               wall_jiffies += ticks;
-               update_wall_time(ticks);
-       }
--      vxtime_unlock();
--      write_unlock_irq(&xtime_lock);
-       calc_load(ticks);
- }
--void timer_bh(void)
--{
--      update_times();
--      run_timer_list();
--}
--
- void do_timer(struct pt_regs *regs)
- {
-       (*(unsigned long *)&jiffies)++;
-@@ -675,8 +750,18 @@
-       /* SMP process accounting uses the local APIC timer */
-       update_process_times(user_mode(regs));
-+#ifdef CONFIG_X86
-+      mark_bh(TIMER_BH);
- #endif
-+#endif
-+      /*
-+       * Right now only x86-SMP calls run_local_timers() from a
-+       * per-CPU interrupt.
-+       */
-+#ifndef CONFIG_X86
-       mark_bh(TIMER_BH);
-+#endif
-+      update_times();
-       if (TQ_ACTIVE(tq_timer))
-               mark_bh(TQUEUE_BH);
- }
-@@ -938,3 +1022,23 @@
-       }
-       return 0;
- }
-+
-+void __init init_timers(void)
-+{
-+      int i, j;
-+
-+      for (i = 0; i < NR_CPUS; i++) {
-+              tvec_base_t *base = tvec_bases + i;
-+
-+              spin_lock_init(&base->lock);
-+              for (j = 0; j < TVN_SIZE; j++) {
-+                      INIT_LIST_HEAD(base->tv5.vec + j);
-+                      INIT_LIST_HEAD(base->tv4.vec + j);
-+                      INIT_LIST_HEAD(base->tv3.vec + j);
-+                      INIT_LIST_HEAD(base->tv2.vec + j);
-+              }
-+              for (j = 0; j < TVR_SIZE; j++)
-+                      INIT_LIST_HEAD(base->tv1.vec + j);
-+      }
-+      init_bh(TIMER_BH, run_all_timers);
-+}
---- linux/kernel/sched.c.orig  Tue Nov 27 13:29:39 2001
-+++ linux/kernel/sched.c       Tue Nov 27 13:30:37 2001
-@@ -1749,7 +1749,6 @@
-       idle->preempt_count = (idle->lock_depth >= 0);
- }
--extern void init_timervecs(void);
- extern void timer_bh(void);
- extern void tqueue_bh(void);
- extern void immediate_bh(void);
-@@ -1790,8 +1789,7 @@
-       current->cpu = smp_processor_id();
-       wake_up_process(current);
--      init_timervecs();
--      init_bh(TIMER_BH, timer_bh);
-+      init_timers();
-       init_bh(TQUEUE_BH, tqueue_bh);
-       init_bh(IMMEDIATE_BH, immediate_bh);
---- linux/kernel/ksyms.c.orig  Tue Nov 27 13:29:39 2001
-+++ linux/kernel/ksyms.c       Tue Nov 27 13:30:37 2001
-@@ -419,6 +419,7 @@
- EXPORT_SYMBOL(del_timer_sync);
- #endif
- EXPORT_SYMBOL(mod_timer);
-+EXPORT_SYMBOL(tvec_bases);
- EXPORT_SYMBOL(tq_timer);
- EXPORT_SYMBOL(tq_immediate);
---- linux/include/linux/timer.h.orig   Tue Nov 27 13:29:37 2001
-+++ linux/include/linux/timer.h        Tue Nov 27 13:30:37 2001
-@@ -1,9 +1,6 @@
- #ifndef _LINUX_TIMER_H
- #define _LINUX_TIMER_H
--#include <linux/config.h>
--#include <linux/list.h>
--
- /*
-  * In Linux 2.4, static timers have been removed from the kernel.
-  * Timers may be dynamically created and destroyed, and should be initialized
-@@ -13,22 +10,78 @@
-  * timeouts. You can use this field to distinguish between the different
-  * invocations.
-  */
-+
-+#include <linux/config.h>
-+#include <linux/smp.h>
-+#include <linux/list.h>
-+#include <linux/spinlock.h>
-+#include <linux/threads.h>
-+
-+/*
-+ * Event timer code
-+ */
-+#define TVN_BITS 6
-+#define TVR_BITS 8
-+#define TVN_SIZE (1 << TVN_BITS)
-+#define TVR_SIZE (1 << TVR_BITS)
-+#define TVN_MASK (TVN_SIZE - 1)
-+#define TVR_MASK (TVR_SIZE - 1)
-+
-+typedef struct tvec_s {
-+      int index;
-+      struct list_head vec[TVN_SIZE];
-+} tvec_t;
-+
-+typedef struct tvec_root_s {
-+      int index;
-+      struct list_head vec[TVR_SIZE];
-+} tvec_root_t;
-+
-+#define NOOF_TVECS 5
-+
-+typedef struct timer_list timer_t;
-+
-+typedef struct tvec_t_base_s {
-+      spinlock_t lock;
-+      unsigned long timer_jiffies;
-+      volatile timer_t * volatile running_timer;
-+      tvec_root_t tv1;
-+      tvec_t tv2;
-+      tvec_t tv3;
-+      tvec_t tv4;
-+      tvec_t tv5;
-+} tvec_base_t;
-+
-+/*
-+ * This is the new and improved way of handling timers.
-+ *
-+ * The "data" field is in case you want to use the same
-+ * timeout function for several timeouts. You can use this
-+ * to distinguish between the different invocations.
-+ */
- struct timer_list {
-       struct list_head list;
-       unsigned long expires;
-       unsigned long data;
-       void (*function)(unsigned long);
-+      tvec_base_t *base;
- };
--extern void add_timer(struct timer_list * timer);
--extern int del_timer(struct timer_list * timer);
-+extern void add_timer(timer_t * timer);
-+extern int del_timer(timer_t * timer);
- #ifdef CONFIG_SMP
--extern int del_timer_sync(struct timer_list * timer);
-+extern int del_timer_sync(timer_t * timer);
- extern void sync_timers(void);
-+#define timer_enter(base, t) do { base->running_timer = t; mb(); } while (0)
-+#define timer_exit(base) do { base->running_timer = NULL; } while (0)
-+#define timer_is_running(base,t) (base->running_timer == t)
-+#define timer_synchronize(base,t) while (timer_is_running(base,t)) barrier()
- #else
- #define del_timer_sync(t)     del_timer(t)
- #define sync_timers()         do { } while (0)
-+#define timer_enter(base,t)          do { } while (0)
-+#define timer_exit(base)            do { } while (0)
- #endif
- /*
-@@ -40,17 +92,33 @@
-  * If the timer is known to be not pending (ie, in the handler), mod_timer
-  * is less efficient than a->expires = b; add_timer(a).
-  */
--int mod_timer(struct timer_list *timer, unsigned long expires);
-+int mod_timer(timer_t *timer, unsigned long expires);
- extern void it_real_fn(unsigned long);
--static inline void init_timer(struct timer_list * timer)
-+extern void init_timers(void);
-+extern void run_local_timers(void);
-+
-+extern tvec_base_t tvec_bases[NR_CPUS];
-+
-+static inline void init_timer(timer_t * timer)
- {
-       timer->list.next = timer->list.prev = NULL;
-+      timer->base = tvec_bases + 0;
- }
--static inline int timer_pending (const struct timer_list * timer)
-+#define TIMER_DEBUG 0
-+#if TIMER_DEBUG
-+# define CHECK_BASE(base) \
-+      if (base && ((base < tvec_bases) || (base >= tvec_bases + NR_CPUS))) \
-+              BUG()
-+#else
-+# define CHECK_BASE(base)
-+#endif
-+
-+static inline int timer_pending(const timer_t * timer)
- {
-+      CHECK_BASE(timer->base);
-       return timer->list.next != NULL;
- }
---- linux/include/linux/smp.h.orig     Sun Dec 31 20:10:17 2000
-+++ linux/include/linux/smp.h  Tue Nov 27 13:30:37 2001
-@@ -76,7 +76,8 @@
- /*
-  *    These macros fold the SMP functionality into a single CPU system
-  */
-- 
-+
-+#define NR_CPUS                                       1 
- #define smp_num_cpus                          1
- #define smp_processor_id()                    0
- #define hard_smp_processor_id()                       0
---- linux/drivers/net/eepro100.c.orig  Tue Nov 27 13:29:38 2001
-+++ linux/drivers/net/eepro100.c       Tue Nov 27 13:30:37 2001
-@@ -1219,9 +1219,6 @@
-       /* We must continue to monitor the media. */
-       sp->timer.expires = RUN_AT(2*HZ);                       /* 2.0 sec. */
-       add_timer(&sp->timer);
--#if defined(timer_exit)
--      timer_exit(&sp->timer);
--#endif
- }
- static void speedo_show_state(struct net_device *dev)
---- linux/arch/i386/mm/fault.c.orig    Tue Nov 27 13:29:31 2001
-+++ linux/arch/i386/mm/fault.c Tue Nov 27 13:30:37 2001
-@@ -104,16 +104,12 @@
-       goto bad_area;
- }
--extern spinlock_t timerlist_lock;
--
- /*
-  * Unlock any spinlocks which will prevent us from getting the
-- * message out (timerlist_lock is acquired through the
-- * console unblank code)
-+ * message out
-  */
- void bust_spinlocks(int yes)
- {
--      spin_lock_init(&timerlist_lock);
-       if (yes) {
-               oops_in_progress = 1;
- #ifdef CONFIG_SMP
---- linux/arch/i386/kernel/apic.c.orig Tue Nov 27 13:29:38 2001
-+++ linux/arch/i386/kernel/apic.c      Tue Nov 27 13:30:37 2001
-@@ -1078,7 +1078,9 @@
-       irq_enter(cpu, 0);
-       smp_local_timer_interrupt(regs);
-       irq_exit(cpu, 0);
--
-+#if CONFIG_SMP
-+      run_local_timers();
-+#endif
-       if (softirq_pending(cpu))
-               do_softirq();
- }
---- linux-2.4.20/lib/bust_spinlocks.c.orig     Mon Sep 17 06:22:40 2001
-+++ linux-2.4.20/lib/bust_spinlocks.c  Sun Mar  9 13:26:33 2003
-@@ -14,11 +14,8 @@
- #include <linux/wait.h>
- #include <linux/vt_kern.h>
--extern spinlock_t timerlist_lock;
--
- void bust_spinlocks(int yes)
- {
--      spin_lock_init(&timerlist_lock);
-       if (yes) {
-               oops_in_progress = 1;
-       } else {
diff --git a/kernel-2.4.18-SPARC64-PLD.patch b/kernel-2.4.18-SPARC64-PLD.patch
deleted file mode 100644 (file)
index edf1b41..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -Nur linux.org/arch/sparc64/kernel/sys_sparc32.c linux/arch/sparc64/kernel/sys_sparc32.c
---- linux.org/arch/sparc64/kernel/sys_sparc32.c        Wed Apr 10 13:55:06 2002
-+++ linux/arch/sparc64/kernel/sys_sparc32.c    Tue Apr  9 13:32:18 2002
-@@ -58,6 +58,8 @@
- #include <net/scm.h>
-+#include <linux/quotacompat.h>
-+
- /* Use this to get at 32-bit user passed pointers. */
- /* Things to consider: the low-level assembly stub does
-    srl x, 0, x for first four arguments, so if you have
-diff -Nur linux.org/include/asm-sparc64/dma.h linux/include/asm-sparc64/dma.h
---- linux.org/include/asm-sparc64/dma.h        Tue Feb  1 08:37:19 2000
-+++ linux/include/asm-sparc64/dma.h    Wed Apr 10 13:19:47 2002
-@@ -225,3 +225,4 @@
- #define DMA_CHUNK_SIZE 8192
- #endif /* !(_ASM_SPARC64_DMA_H) */
-+#define DMA_AUTOINIT    0x10
-diff -Nur linux.org/include/asm-sparc64/termbits.h linux/include/asm-sparc64/termbits.h
---- linux.org/include/asm-sparc64/termbits.h   Tue Feb 22 01:32:27 2000
-+++ linux/include/asm-sparc64/termbits.h       Wed Apr 10 13:34:07 2002
-@@ -171,8 +171,8 @@
-    adjust CBAUD constant and drivers accordingly.
- #define B2500000  0x00001010
- #define B3000000  0x00001011
--#define B3500000  0x00001012
--#define B4000000  0x00001013  */
-+#define B3500000  0x00001012  */
-+#define B4000000  0x00001013
- #define CIBAUD          0x100f0000  /* input baud rate (not used) */
- #define CMSPAR    0x40000000  /* mark or space (stick) parity */
- #define CRTSCTS         0x80000000  /* flow control */
-diff -Nur linux.org/include/asm-sparc64/vfc_ioctls.h linux/include/asm-sparc64/vfc_ioctls.h
---- linux.org/include/asm-sparc64/vfc_ioctls.h Thu Jan  1 01:00:00 1970
-+++ linux/include/asm-sparc64/vfc_ioctls.h     Tue Apr 15 01:28:21 1997
-@@ -0,0 +1,58 @@
-+/* Copyright (c) 1996 by Manish Vachharajani */
-+
-+#ifndef _LINUX_VFC_IOCTLS_H_
-+#define       _LINUX_VFC_IOCTLS_H_
-+
-+      /* IOCTLs */
-+#define VFC_IOCTL(a)          (('j' << 8) | a)
-+#define VFCGCTRL      (VFC_IOCTL (0))         /* get vfc attributes */
-+#define VFCSCTRL      (VFC_IOCTL (1))         /* set vfc attributes */
-+#define VFCGVID               (VFC_IOCTL (2))         /* get video decoder attributes */
-+#define VFCSVID               (VFC_IOCTL (3))         /* set video decoder attributes */
-+#define VFCHUE                (VFC_IOCTL (4))         /* set hue */
-+#define VFCPORTCHG    (VFC_IOCTL (5))         /* change port */
-+#define VFCRDINFO     (VFC_IOCTL (6))         /* read info */
-+
-+      /* Options for setting the vfc attributes and status */
-+#define MEMPRST               0x1     /* reset FIFO ptr. */
-+#define CAPTRCMD      0x2     /* start capture and wait */
-+#define DIAGMODE      0x3     /* diag mode */
-+#define NORMMODE      0x4     /* normal mode */
-+#define CAPTRSTR      0x5     /* start capture */
-+#define CAPTRWAIT     0x6     /* wait for capture to finish */
-+
-+
-+      /* Options for the decoder */
-+#define STD_NTSC      0x1     /* NTSC mode */
-+#define STD_PAL               0x2     /* PAL mode */
-+#define COLOR_ON      0x3     /* force color ON */
-+#define MONO          0x4     /* force color OFF */
-+
-+      /* Values returned by ioctl 2 */
-+
-+#define NO_LOCK               1
-+#define NTSC_COLOR    2
-+#define NTSC_NOCOLOR    3
-+#define PAL_COLOR     4
-+#define PAL_NOCOLOR   5
-+
-+/* Not too sure what this does yet */
-+      /* Options for setting Field number */
-+#define ODD_FIELD     0x1
-+#define EVEN_FIELD    0x0
-+#define ACTIVE_ONLY     0x2
-+#define NON_ACTIVE    0x0
-+
-+/* Debug options */
-+#define VFC_I2C_SEND 0
-+#define VFC_I2C_RECV 1
-+
-+struct vfc_debug_inout
-+{
-+      unsigned long addr;
-+      unsigned long ret;
-+      unsigned long len;
-+      unsigned char *buffer;
-+};
-+
-+#endif /* _LINUX_VFC_IOCTLS_H_ */
diff --git a/kernel-Makefile-include-fix.patch b/kernel-Makefile-include-fix.patch
deleted file mode 100644 (file)
index fcdd5a9..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- linux/Makefile.org Tue Feb  5 11:12:19 2002
-+++ linux/Makefile     Wed Feb  6 10:40:35 2002
-@@ -562,10 +562,10 @@
- #
- scripts/mkdep: scripts/mkdep.c
--      $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
-+      $(HOSTCC) $(HOSTCFLAGS) -I$(HPATH) -o scripts/mkdep scripts/mkdep.c
- scripts/split-include: scripts/split-include.c
--      $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
-+      $(HOSTCC) $(HOSTCFLAGS) -I$(HPATH) -o scripts/split-include scripts/split-include.c
- #
- # RPM target
diff --git a/kernel-cd-mrw-2.patch b/kernel-cd-mrw-2.patch
deleted file mode 100644 (file)
index 41f18c4..0000000
+++ /dev/null
@@ -1,1325 +0,0 @@
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
---- /opt/kernel/linux-2.4.19-pre4/drivers/cdrom/cdrom.c        Fri Nov 16 19:14:08 2001
-+++ linux/drivers/cdrom/cdrom.c        Tue Mar 26 09:49:44 2002
-@@ -228,10 +228,16 @@
-    3.12 Oct 18, 2000 - Jens Axboe <axboe@suse.de>
-   -- Use quiet bit on packet commands not known to work
-+   3.20 Sep 24, 2001 - Jens Axboe <axboe@suse.de>
-+  -- Various fixes and lots of cleanups not listed :-)
-+  -- Locking fixes
-+  -- Mt Rainier support
-+  -- DVD-RAM write open fixes
-+
- -------------------------------------------------------------------------*/
--#define REVISION "Revision: 3.12"
--#define VERSION "Id: cdrom.c 3.12 2000/10/18"
-+#define REVISION "Revision: 3.20"
-+#define VERSION "Id: cdrom.c 3.20 2001/09/24"
- /* I use an error-log mask to give fine grain control over the type of
-    messages dumped to the system logs.  The available masks include: */
-@@ -266,7 +272,6 @@
- #include <linux/init.h>
- #include <asm/fcntl.h>
--#include <asm/segment.h>
- #include <asm/uaccess.h>
- /* used to tell the module to turn on full debugging messages */
-@@ -279,11 +284,25 @@
- static int lockdoor = 1;
- /* will we ever get to use this... sigh. */
- static int check_media_type;
-+/* automatically restart mrw format */
-+static int mrw_format_restart = 1;
- MODULE_PARM(debug, "i");
- MODULE_PARM(autoclose, "i");
- MODULE_PARM(autoeject, "i");
- MODULE_PARM(lockdoor, "i");
- MODULE_PARM(check_media_type, "i");
-+MODULE_PARM(mrw_format_restart, "i");
-+
-+static spinlock_t cdrom_lock = SPIN_LOCK_UNLOCKED;
-+
-+static const char *mrw_format_status[] = {
-+      "not mrw",
-+      "bgformat inactive",
-+      "bgformat active",
-+      "mrw complete",
-+};
-+
-+static const char *mrw_address_space[] = { "DMA", "GAA" };
- #if (ERRLOGMASK!=CD_NOTHING)
- #define cdinfo(type, fmt, args...) \
-@@ -321,6 +340,10 @@
- int cdrom_get_last_written(kdev_t dev, long *last_written);
- int cdrom_get_next_writable(kdev_t dev, long *next_writable);
-+static int __cdrom_get_di(struct cdrom_device_info *cdi, disc_information *di);
-+
-+static int cdrom_mrw_exit(struct cdrom_device_info *cdi);
-+
- #ifdef CONFIG_SYSCTL
- static void cdrom_sysctl_register(void);
- #endif /* CONFIG_SYSCTL */ 
-@@ -348,13 +371,14 @@
-               return -1;
-       if (cdo->open == NULL || cdo->release == NULL)
-               return -2;
--      if ( !banner_printed ) {
-+      if (!banner_printed) {
-               printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
-               banner_printed = 1;
- #ifdef CONFIG_SYSCTL
-               cdrom_sysctl_register();
- #endif /* CONFIG_SYSCTL */ 
-       }
-+
-       ENSURE(drive_status, CDC_DRIVE_STATUS );
-       ENSURE(media_changed, CDC_MEDIA_CHANGED);
-       ENSURE(tray_move, CDC_CLOSE_TRAY | CDC_OPEN_TRAY);
-@@ -379,6 +403,9 @@
-       if (check_media_type==1)
-               cdi->options |= (int) CDO_CHECK_TYPE;
-+      if (CDROM_CAN(CDC_MRW_W))
-+              cdi->exit = cdrom_mrw_exit;
-+
-       if (!devfs_handle)
-               devfs_handle = devfs_mk_dir (NULL, "cdroms", NULL);
-       cdi->number = devfs_alloc_unique_number (&cdrom_numspace);
-@@ -399,9 +426,12 @@
-                       devfs_auto_unregister (cdi->de, slave);
-               }
-       }
-+
-       cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name);
-+      spin_lock(&cdrom_lock);
-       cdi->next = topCdromPtr;        
-       topCdromPtr = cdi;
-+      spin_unlock(&cdrom_lock);
-       return 0;
- }
- #undef ENSURE
-@@ -417,18 +447,26 @@
-               return -1;
-       prev = NULL;
-+      spin_lock(&cdrom_lock);
-       cdi = topCdromPtr;
-       while (cdi != NULL && cdi->dev != unreg->dev) {
-               prev = cdi;
-               cdi = cdi->next;
-       }
--      if (cdi == NULL)
-+      if (cdi == NULL) {
-+              spin_unlock(&cdrom_lock);
-               return -2;
-+      }
-       if (prev)
-               prev->next = cdi->next;
-       else
-               topCdromPtr = cdi->next;
-+      spin_unlock(&cdrom_lock);
-+
-+      if (cdi->exit)
-+              cdi->exit(cdi);
-+
-       cdi->ops->n_minors--;
-       devfs_unregister (cdi->de);
-       devfs_dealloc_unique_number (&cdrom_numspace, cdi->number);
-@@ -440,13 +478,292 @@
- {
-       struct cdrom_device_info *cdi;
-+      spin_lock(&cdrom_lock);
-       cdi = topCdromPtr;
-       while (cdi != NULL && cdi->dev != dev)
-               cdi = cdi->next;
-+      spin_unlock(&cdrom_lock);
-       return cdi;
- }
-+int cdrom_get_media_event(struct cdrom_device_info *cdi,
-+                        struct media_event_desc *med)
-+{
-+      struct cdrom_generic_command cgc;
-+      unsigned char buffer[8];
-+      struct event_header *eh = (struct event_header *) buffer;
-+
-+      init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);
-+      cgc.cmd[0] = GPCMD_GET_EVENT_STATUS_NOTIFICATION;
-+      cgc.cmd[1] = 1;         /* IMMED */
-+      cgc.cmd[4] = 1 << 4;    /* media event */
-+      cgc.cmd[8] = sizeof(buffer);
-+      cgc.quiet = 1;
-+
-+      if (cdi->ops->generic_packet(cdi, &cgc))
-+              return 1;
-+
-+      if (be16_to_cpu(eh->data_len) < sizeof(*med))
-+              return 1;
-+
-+      memcpy(med, &buffer[sizeof(*eh)], sizeof(*med));
-+      return 0;
-+}
-+
-+/*
-+ * the first prototypes used 0x2c as the page code for the mrw mode page,
-+ * subsequently this was changed to 0x03. probe the one used by this drive
-+ */
-+int cdrom_mrw_probe_pc(struct cdrom_device_info *cdi)
-+{
-+      struct cdrom_generic_command cgc;
-+      char buffer[16];
-+
-+      init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);
-+
-+      cgc.buffer = buffer;
-+      cgc.buflen = sizeof(buffer);
-+      cgc.timeout = HZ;
-+      cgc.quiet = 1;
-+
-+      if (!cdrom_mode_sense(cdi, &cgc, MRW_MODE_PC, 0)) {
-+              cdi->mrw_mode_page = MRW_MODE_PC;
-+              return 0;
-+      } else if (!cdrom_mode_sense(cdi, &cgc, MRW_MODE_PC_PRE1, 0)) {
-+              cdi->mrw_mode_page = MRW_MODE_PC_PRE1;
-+              return 0;
-+      } else {
-+              printk("cdrom: %s: unknown mrw mode page\n", cdi->name);
-+              return 1;
-+      }
-+
-+      printk("cdrom: %s: mrw mode page %x\n", cdi->name, cdi->mrw_mode_page);
-+}
-+      
-+int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write)
-+{
-+      struct cdrom_generic_command cgc;
-+      struct mrw_feature_desc *mfd;
-+      unsigned char buffer[16];
-+      int ret;
-+
-+      init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);
-+
-+      cgc.cmd[0] = GPCMD_GET_CONFIGURATION;
-+      cgc.cmd[3] = CDF_MRW;
-+      cgc.cmd[8] = sizeof(buffer);
-+      cgc.quiet = 1;
-+
-+      if ((ret = cdi->ops->generic_packet(cdi, &cgc)))
-+              return ret;
-+
-+      mfd = (struct mrw_feature_desc *)&buffer[sizeof(struct feature_header)];
-+      *write = mfd->write;
-+
-+      if ((ret = cdrom_mrw_probe_pc(cdi)))
-+              return ret;
-+
-+      return 0;
-+}
-+
-+static int cdrom_mrw_bgformat(struct cdrom_device_info *cdi, int cont)
-+{
-+      struct cdrom_generic_command cgc;
-+      unsigned char buffer[12];
-+      int ret;
-+
-+      printk("cdrom: %sstarting format\n", cont ? "Re" : "");
-+
-+      /*
-+       * FmtData bit set (bit 4), format type is 1
-+       */
-+      init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_WRITE);
-+      cgc.cmd[0] = GPCMD_FORMAT_UNIT;
-+      cgc.cmd[1] = (1 << 4) | 1;
-+
-+      cgc.timeout = 5 * 60 * HZ;
-+
-+      /*
-+       * 4 byte format list header, 8 byte format list descriptor
-+       */
-+      buffer[1] = 1 << 1;
-+      buffer[3] = 8;
-+
-+      /*
-+       * nr_blocks field
-+       */
-+      buffer[4] = 0xff;
-+      buffer[5] = 0xff;
-+      buffer[6] = 0xff;
-+      buffer[7] = 0xff;
-+
-+      buffer[8] = 0x24 << 2;
-+      buffer[11] = cont;
-+
-+      ret = cdi->ops->generic_packet(cdi, &cgc);
-+      if (ret)
-+              printk("cdrom: bgformat failed\n");
-+
-+      return ret;
-+}
-+
-+static int cdrom_mrw_bgformat_susp(struct cdrom_device_info *cdi, int immed)
-+{
-+      struct cdrom_generic_command cgc;
-+
-+      init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE);
-+      cgc.cmd[0] = GPCMD_CLOSE_TRACK;
-+
-+      /*
-+       * Session = 1, Track = 0
-+       */
-+      cgc.cmd[1] = !!immed;
-+      cgc.cmd[2] = 1 << 1;
-+
-+      cgc.timeout = 300 * HZ;
-+
-+      return cdi->ops->generic_packet(cdi, &cgc);
-+}
-+
-+static int cdrom_flush_cache(struct cdrom_device_info *cdi)
-+{
-+      struct cdrom_generic_command cgc;
-+
-+      init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE);
-+      cgc.cmd[0] = GPCMD_FLUSH_CACHE;
-+
-+      cgc.timeout = 5 * 60 * HZ;
-+
-+      return cdi->ops->generic_packet(cdi, &cgc);
-+}
-+
-+static int cdrom_mrw_exit(struct cdrom_device_info *cdi)
-+{
-+      disc_information di;
-+      int ret = 0;
-+
-+      if (__cdrom_get_di(cdi, &di))
-+              return 1;
-+
-+      if (di.mrw_status == CDM_MRW_BGFORMAT_ACTIVE) {
-+              printk("cdrom: issuing MRW back ground format suspend\n");
-+              ret = cdrom_mrw_bgformat_susp(cdi, 0);
-+      }
-+
-+      if (!ret)
-+              ret = cdrom_flush_cache(cdi);
-+
-+      return ret;
-+}
-+
-+static int cdrom_mrw_set_lba_space(struct cdrom_device_info *cdi, int space)
-+{
-+      struct cdrom_generic_command cgc;
-+      struct mode_page_header *mph;
-+      char buffer[16];
-+      int ret, offset, size;
-+
-+      init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);
-+
-+      cgc.buffer = buffer;
-+      cgc.buflen = sizeof(buffer);
-+
-+      if ((ret = cdrom_mode_sense(cdi, &cgc, cdi->mrw_mode_page, 0)))
-+              return ret;
-+
-+      mph = (struct mode_page_header *) buffer;
-+      offset = be16_to_cpu(mph->desc_length);
-+      size = be16_to_cpu(mph->mode_data_length) + 2;
-+
-+      buffer[offset + 3] = space;
-+      cgc.buflen = size;
-+
-+      if ((ret = cdrom_mode_select(cdi, &cgc)))
-+              return ret;
-+
-+      printk("cdrom: %s: mrw address space %s selected\n", cdi->name, mrw_address_space[space]);
-+      return 0;
-+}
-+
-+static int cdrom_media_erasable(struct cdrom_device_info *cdi)
-+{
-+      disc_information di;
-+
-+      if (__cdrom_get_di(cdi, &di))
-+              return 0;
-+
-+      return di.erasable;
-+}
-+
-+/*
-+ * FIXME: check RO bit
-+ */
-+static int cdrom_dvdram_open_write(struct cdrom_device_info *cdi)
-+{
-+      return !cdrom_media_erasable(cdi);
-+}
-+
-+static int cdrom_mrw_open_write(struct cdrom_device_info *cdi)
-+{
-+      disc_information di;
-+      int ret;
-+
-+      /*
-+       * always reset to GAA lba space on open
-+       */
-+      if (cdrom_mrw_set_lba_space(cdi, MRW_LBA_GAA))
-+              return 1;
-+
-+      if (__cdrom_get_di(cdi, &di))
-+              return 1;
-+
-+      if (!di.erasable)
-+              return 1;
-+
-+      /*
-+       * mrw_status
-+       * 0    -       not MRW formatted
-+       * 1    -       MRW bgformat started, but not running or complete
-+       * 2    -       MRW bgformat in progress
-+       * 3    -       MRW formatting complete
-+       */
-+      ret = 0;
-+      printk("cdrom open: mrw_status '%s'\n", mrw_format_status[di.mrw_status]);
-+      if (!di.mrw_status)
-+              ret = 1;
-+      else if (di.mrw_status == CDM_MRW_BGFORMAT_INACTIVE && mrw_format_restart)
-+              ret = cdrom_mrw_bgformat(cdi, 1);
-+
-+      return ret;
-+}
-+
-+/*
-+ * returns 0 for ok to open write, non-0 to disallow
-+ */
-+static int cdrom_open_write(struct cdrom_device_info *cdi)
-+{
-+      int ret;
-+
-+      if (CDROM_CAN(CDC_MRW_W))
-+              ret = cdrom_mrw_open_write(cdi);
-+      else if (CDROM_CAN(CDC_DVD_RAM))
-+              ret = cdrom_dvdram_open_write(cdi);
-+      else
-+              ret = 1;
-+
-+      return ret;
-+}
-+
-+static int cdrom_close_write(struct cdrom_device_info *cdi)
-+{
-+#if 0
-+      return cdrom_flush_cache(cdi);
-+#else
-+      return 0;
-+#endif
-+}
-+
- /* We use the open-option O_NONBLOCK to indicate that the
-  * purpose of opening is only for subsequent ioctl() calls; no device
-  * integrity checks are performed.
-@@ -465,8 +782,15 @@
-       if ((cdi = cdrom_find_device(dev)) == NULL)
-               return -ENODEV;
--      if ((fp->f_mode & FMODE_WRITE) && !CDROM_CAN(CDC_DVD_RAM))
--              return -EROFS;
-+      cdi->use_count++;
-+      ret = -EROFS;
-+      if (fp->f_mode & FMODE_WRITE) {
-+              printk("cdrom: %s opening for WRITE\n", current->comm);
-+              if (!CDROM_CAN(CDC_RAM))
-+                      goto out;
-+              if (cdrom_open_write(cdi))
-+                      goto out;
-+      }
-       /* if this was a O_NONBLOCK open and we should honor the flags,
-        * do a quick open without drive/disc integrity checks. */
-@@ -475,12 +799,13 @@
-       else
-               ret = open_for_data(cdi);
--      if (!ret) cdi->use_count++;
--
-       cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n", cdi->name, cdi->use_count);
-       /* Do this on open.  Don't wait for mount, because they might
-           not be mounting, but opening with O_NONBLOCK */
-       check_disk_change(dev);
-+out:
-+      if (ret)
-+              cdi->use_count--;
-       return ret;
- }
-@@ -491,6 +816,7 @@
-       struct cdrom_device_ops *cdo = cdi->ops;
-       tracktype tracks;
-       cdinfo(CD_OPEN, "entering open_for_data\n");
-+
-       /* Check if the driver can report drive status.  If it can, we
-          can do clever things.  If it can't, well, we at least tried! */
-       if (cdo->drive_status != NULL) {
-@@ -568,7 +894,7 @@
-               cdinfo(CD_OPEN, "open device failed.\n"); 
-               goto clean_up_and_return;
-       }
--      if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
-+      if (CDROM_CAN(CDC_LOCK) && (cdi->options & CDO_LOCK)) {
-                       cdo->lock_door(cdi, 1);
-                       cdinfo(CD_OPEN, "door locked.\n");
-       }
-@@ -646,7 +972,6 @@
-       return 0;
- }
--
- /* Admittedly, the logic below could be performed in a nicer way. */
- int cdrom_release(struct inode *ip, struct file *fp)
- {
-@@ -657,17 +982,23 @@
-       cdinfo(CD_CLOSE, "entering cdrom_release\n"); 
--      if (cdi->use_count > 0)
--              cdi->use_count--;
--      if (cdi->use_count == 0)
-+      if (!--cdi->use_count) {
-               cdinfo(CD_CLOSE, "Use count for \"/dev/%s\" now zero\n", cdi->name);
--      if (cdi->use_count == 0 &&
--          cdo->capability & CDC_LOCK && !keeplocked) {
--              cdinfo(CD_CLOSE, "Unlocking door!\n");
--              cdo->lock_door(cdi, 0);
-+              if ((cdo->capability & CDC_LOCK) && !keeplocked) {
-+                      cdinfo(CD_CLOSE, "Unlocking door!\n");
-+                      cdo->lock_door(cdi, 0);
-+              }
-       }
-+
-       opened_for_data = !(cdi->options & CDO_USE_FFLAGS) ||
-               !(fp && fp->f_flags & O_NONBLOCK);
-+
-+      /*
-+       * flush cache on last write release
-+       */
-+      if (CDROM_CAN(CDC_RAM) && !cdi->use_count && opened_for_data)
-+              cdrom_close_write(cdi);
-+
-       cdo->release(cdi);
-       if (cdi->use_count == 0) {      /* last process that closes dev*/
-               if (opened_for_data &&
-@@ -1902,10 +2233,24 @@
-               }
-       }
-+      /*
-+       * queue command and wait for it to complete
-+       */
-       ret = cdi->ops->generic_packet(cdi, cgc);
--      __copy_to_user(usense, cgc->sense, sizeof(*usense));
-+
-+      /*
-+       * always copy back sense, command need not have failed for it to
-+       * contain useful info
-+       */
-+      if (usense)
-+              __copy_to_user(usense, cgc->sense, sizeof(*usense));
-+
-+      /*
-+       * this really needs to be modified to copy back good bytes
-+       */
-       if (!ret && cgc->data_direction == CGC_DATA_READ)
-               __copy_to_user(ubuf, cgc->buffer, cgc->buflen);
-+
-       kfree(cgc->buffer);
-       return ret;
- }
-@@ -2234,10 +2579,8 @@
-       return cdo->generic_packet(cdi, &cgc);
- }
--/* requires CD R/RW */
--int cdrom_get_disc_info(kdev_t dev, disc_information *di)
-+static int __cdrom_get_di(struct cdrom_device_info *cdi, disc_information *di)
- {
--      struct cdrom_device_info *cdi = cdrom_find_device(dev);
-       struct cdrom_device_ops *cdo = cdi->ops;
-       struct cdrom_generic_command cgc;
-       int ret;
-@@ -2264,6 +2607,14 @@
-       return cdo->generic_packet(cdi, &cgc);
- }
-+/* requires CD R/RW */
-+int cdrom_get_disc_info(kdev_t dev, disc_information *di)
-+{
-+      struct cdrom_device_info *cdi = cdrom_find_device(dev);
-+
-+      return __cdrom_get_di(cdi, di);
-+}
-+
- /* return the last written block on the CD-R media. this is for the udf
-    file system. */
-@@ -2379,6 +2730,8 @@
- EXPORT_SYMBOL(cdrom_mode_sense);
- EXPORT_SYMBOL(init_cdrom_command);
- EXPORT_SYMBOL(cdrom_find_device);
-+EXPORT_SYMBOL(cdrom_get_media_event);
-+EXPORT_SYMBOL(cdrom_is_mrw);
- #ifdef CONFIG_SYSCTL
-@@ -2475,6 +2828,14 @@
-       for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
-           pos += sprintf(info+pos, "\t%d", CDROM_CAN(CDC_DVD_RAM) != 0);
-+      pos += sprintf(info+pos, "\nCan read MRW:");
-+      for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
-+          pos += sprintf(info+pos, "\t\t%d", CDROM_CAN(CDC_MRW) != 0);
-+
-+      pos += sprintf(info+pos, "\nCan write MRW:");
-+      for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
-+          pos += sprintf(info+pos, "\t\t%d", CDROM_CAN(CDC_MRW_W) != 0);
-+
-       strcpy(info+pos,"\n\n");
-               
-         return proc_dostring(ctl, write, filp, buffer, lenp);
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
---- /opt/kernel/linux-2.4.19-pre4/drivers/ide/ide-cd.c Tue Mar 26 09:52:55 2002
-+++ linux/drivers/ide/ide-cd.c Mon Mar 25 17:40:39 2002
-@@ -694,12 +698,17 @@
-               case GPCMD_BLANK:
-               case GPCMD_FORMAT_UNIT:
-               case GPCMD_RESERVE_RZONE_TRACK:
--                      wait = WAIT_CMD;
-+              case GPCMD_CLOSE_TRACK:
-+              case GPCMD_FLUSH_CACHE:
-+                      wait = ATAPI_WAIT_PC;
-                       break;
-               default:
-+                      if (!pc->quiet)
-+                              printk("ide-cd: cmd 0x%x timed out\n",pc->c[0]);
-                       wait = 0;
-                       break;
-       }
-+
-       return wait;
- }
-@@ -745,7 +754,7 @@
-               (void) (HWIF(drive)->dmaproc(ide_dma_begin, drive));
-       if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) {
--              ide_set_handler (drive, handler, WAIT_CMD, cdrom_timer_expiry);
-+              ide_set_handler (drive, handler, ATAPI_WAIT_PC, cdrom_timer_expiry);
-               OUT_BYTE (WIN_PACKETCMD, IDE_COMMAND_REG); /* packet command */
-               return ide_started;
-       } else {
-@@ -1009,7 +1018,7 @@
-       /* Done moving data!
-          Wait for another interrupt. */
--      ide_set_handler(drive, &cdrom_read_intr, WAIT_CMD, NULL);
-+      ide_set_handler(drive, &cdrom_read_intr, ATAPI_WAIT_PC, NULL);
-       return ide_started;
- }
-@@ -1125,16 +1134,15 @@
-       pc.c[7] = (nframes >> 8);
-       pc.c[8] = (nframes & 0xff);
-       put_unaligned(cpu_to_be32(frame), (unsigned int *) &pc.c[2]);
--      pc.timeout = WAIT_CMD;
-+      pc.timeout = ATAPI_WAIT_PC;
-       /* Send the command to the drive and return. */
-       return cdrom_transfer_packet_command(drive, &pc, &cdrom_read_intr);
- }
--
- #define IDECD_SEEK_THRESHOLD  (1000)                  /* 1000 blocks */
- #define IDECD_SEEK_TIMER      (5 * WAIT_MIN_SLEEP)    /* 100 ms */
--#define IDECD_SEEK_TIMEOUT     WAIT_CMD                       /* 10 sec */
-+#define IDECD_SEEK_TIMEOUT    (2 * WAIT_CMD)          /* 20 sec */
- static ide_startstop_t cdrom_seek_intr (ide_drive_t *drive)
- {
-@@ -1178,7 +1186,7 @@
-       pc.c[0] = GPCMD_SEEK;
-       put_unaligned(cpu_to_be32(frame), (unsigned int *) &pc.c[2]);
--      pc.timeout = WAIT_CMD;
-+      pc.timeout = ATAPI_WAIT_PC;
-       return cdrom_transfer_packet_command(drive, &pc, &cdrom_seek_intr);
- }
-@@ -1198,28 +1198,6 @@
-       return cdrom_start_packet_command (drive, 0, cdrom_start_seek_continuation);
- }
--static inline int cdrom_merge_requests(struct request *rq, struct request *nxt)
--{
--      int ret = 1;
--
--      /*
--       * partitions not really working, but better check anyway...
--       */
--      if (rq->cmd == nxt->cmd && rq->rq_dev == nxt->rq_dev) {
--              if (rq->cmd == WRITE)
--                      printk("merged write\n");
--              rq->nr_sectors += nxt->nr_sectors;
--              rq->hard_nr_sectors += nxt->nr_sectors;
--              rq->bhtail->b_reqnext = nxt->bh;
--              rq->bhtail = nxt->bhtail;
--              list_del(&nxt->queue);
--              blkdev_release_request(nxt);
--              ret = 0;
--      }
--
--      return ret;
--}
--
- /*
-  * the current request will always be the first one on the list
-  */
-@@ -1229,13 +1217,31 @@
-                       break;
-               nxt = blkdev_entry_to_request(entry);
-+
-+              if (rq->cmd != nxt->cmd)
-+                      break;
-+              if (rq->rq_dev != nxt->rq_dev)
-+                      break;
-               if (rq->sector + rq->nr_sectors != nxt->sector)
-                       break;
--              else if (rq->nr_sectors + nxt->nr_sectors > SECTORS_MAX)
-+              if (rq->nr_sectors + nxt->nr_sectors >= SECTORS_MAX)
-                       break;
--
--              if (cdrom_merge_requests(rq, nxt))
-+              if (rq->nr_segments + nxt->nr_segments > PRD_ENTRIES)
-                       break;
-+
-+              /*
-+               * ok to merge them
-+               */
-+              rq->nr_sectors += nxt->nr_sectors;
-+              rq->hard_nr_sectors += nxt->nr_sectors;
-+              rq->bhtail->b_reqnext = nxt->bh;
-+              rq->bhtail = nxt->bhtail;
-+
-+              /*
-+               * release nxt
-+               */
-+              blkdev_dequeue_request(nxt);
-+              blkdev_release_request(nxt);
-       }
-       spin_unlock_irqrestore(&io_request_lock, flags);
-@@ -1399,7 +1405,7 @@
-       }
-       /* Now we wait for another interrupt. */
--      ide_set_handler (drive, &cdrom_pc_intr, WAIT_CMD, cdrom_timer_expiry);
-+      ide_set_handler (drive, &cdrom_pc_intr, ATAPI_WAIT_PC, cdrom_timer_expiry);
-       return ide_started;
- }
-@@ -1410,7 +1416,7 @@
-       struct packet_command *pc = (struct packet_command *)rq->buffer;
-       if (!pc->timeout)
--              pc->timeout = WAIT_CMD;
-+              pc->timeout = ATAPI_WAIT_PC;
-       /* Send the command to the drive and return. */
-       return cdrom_transfer_packet_command(drive, pc, &cdrom_pc_intr);
-@@ -1624,7 +1630,7 @@
-       }
-       /* re-arm handler */
--      ide_set_handler(drive, &cdrom_write_intr, 5 * WAIT_CMD, NULL);
-+      ide_set_handler(drive, &cdrom_write_intr, ATAPI_WAIT_PC, NULL);
-       return ide_started;
- }
-@@ -1649,7 +1655,7 @@
-       pc.c[7] = (nframes >> 8) & 0xff;
-       pc.c[8] = nframes & 0xff;
-       put_unaligned(cpu_to_be32(frame), (unsigned int *)&pc.c[2]);
--      pc.timeout = 2 * WAIT_CMD;
-+      pc.timeout = ATAPI_WAIT_PC;
-       return cdrom_transfer_packet_command(drive, &pc, cdrom_write_intr);
- }
-@@ -2188,7 +2194,7 @@
-       ide_drive_t *drive = (ide_drive_t*) cdi->handle;
-       if (cgc->timeout <= 0)
--              cgc->timeout = WAIT_CMD;
-+              cgc->timeout = ATAPI_WAIT_PC;
-       /* here we queue the commands from the uniform CD-ROM
-          layer. the packet must be complete, as we do not
-@@ -2200,6 +2206,7 @@
-       pc.quiet = cgc->quiet;
-       pc.timeout = cgc->timeout;
-       pc.sense = cgc->sense;
-+
-       return cgc->stat = cdrom_queue_packet_command(drive, &pc);
- }
-@@ -2385,37 +2392,49 @@
-         return 0;
- }
-+/*
-+ * add logic to try GET_EVENT command first to check for media and tray
-+ * status. this should be supported by newer cd-r/w and all DVD etc
-+ * drives
-+ */
- static
- int ide_cdrom_drive_status (struct cdrom_device_info *cdi, int slot_nr)
- {
-       ide_drive_t *drive = (ide_drive_t*) cdi->handle;
-+      struct media_event_desc med;
-+      struct request_sense sense;
-+      int stat;
--      if (slot_nr == CDSL_CURRENT) {
--              struct request_sense sense;
--              int stat = cdrom_check_status(drive, &sense);
--              if (stat == 0 || sense.sense_key == UNIT_ATTENTION)
--                      return CDS_DISC_OK;
-+      if (slot_nr != CDSL_CURRENT)
-+              return -EINVAL;
--              if (sense.sense_key == NOT_READY && sense.asc == 0x04 &&
--                  sense.ascq == 0x04)
--                      return CDS_DISC_OK;
-+      stat = cdrom_check_status(drive, &sense);
-+      if (!stat || sense.sense_key == UNIT_ATTENTION)
-+              return CDS_DISC_OK;
-+      if (!cdrom_get_media_event(cdi, &med)) {
-+              if (med.media_present)
-+                      return CDS_DISC_OK;
-+              if (med.door_open)
-+                      return CDS_TRAY_OPEN;
-+      }
--              /*
--               * If not using Mt Fuji extended media tray reports,
--               * just return TRAY_OPEN since ATAPI doesn't provide
--               * any other way to detect this...
--               */
--              if (sense.sense_key == NOT_READY) {
--                      if (sense.asc == 0x3a && sense.ascq == 1)
--                              return CDS_NO_DISC;
--                      else
--                              return CDS_TRAY_OPEN;
--              }
-+      if (sense.sense_key == NOT_READY && sense.asc == 0x04 && sense.ascq == 0x04)
-+              return CDS_DISC_OK;
--              return CDS_DRIVE_NOT_READY;
-+      /*
-+       * If not using Mt Fuji extended media tray reports,
-+       * just return TRAY_OPEN since ATAPI doesn't provide
-+       * any other way to detect this...
-+       */
-+      if (sense.sense_key == NOT_READY) {
-+              if (sense.asc == 0x3a && sense.ascq == 1)
-+                      return CDS_NO_DISC;
-+              else
-+                      return CDS_TRAY_OPEN;
-       }
--      return -EINVAL;
-+
-+      return CDS_DRIVE_NOT_READY;
- }
- static
-@@ -2523,7 +2542,8 @@
-                               CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET |
-                               CDC_IOCTLS | CDC_DRIVE_STATUS | CDC_CD_R |
-                               CDC_CD_RW | CDC_DVD | CDC_DVD_R| CDC_DVD_RAM |
--                              CDC_GENERIC_PACKET,
-+                              CDC_GENERIC_PACKET | CDC_MRW | CDC_MRW_W |
-+                              CDC_RAM,
-       generic_packet:         ide_cdrom_packet,
- };
-@@ -2558,6 +2578,10 @@
-               devinfo->mask |= CDC_PLAY_AUDIO;
-       if (!CDROM_CONFIG_FLAGS (drive)->close_tray)
-               devinfo->mask |= CDC_CLOSE_TRAY;
-+      if (!CDROM_CONFIG_FLAGS(drive)->mrw)
-+              devinfo->mask |= CDC_MRW;
-+      if (!CDROM_CONFIG_FLAGS(drive)->mrw_w)
-+              devinfo->mask |= CDC_MRW_W;
-       devinfo->de = devfs_register(drive->de, "cd", DEVFS_FL_DEFAULT,
-                                    HWIF(drive)->major, minor,
-@@ -2585,14 +2609,6 @@
-                       size -= sizeof(cap->pad);
-       }
--      /* we have to cheat a little here. the packet will eventually
--       * be queued with ide_cdrom_packet(), which extracts the
--       * drive from cdi->handle. Since this device hasn't been
--       * registered with the Uniform layer yet, it can't do this.
--       * Same goes for cdi->ops.
--       */
--      cdi->handle = (ide_drive_t *) drive;
--      cdi->ops = &ide_cdrom_dops;
-       init_cdrom_command(&cgc, cap, size, CGC_DATA_UNKNOWN);
-       do { /* we seem to get stat=0x01,err=0x00 the first time (??) */
-               stat = cdrom_mode_sense(cdi, &cgc, GPMODE_CAPABILITIES_PAGE, 0);
-@@ -2608,17 +2624,36 @@
-       struct cdrom_info *info = drive->driver_data;
-       struct cdrom_device_info *cdi = &info->devinfo;
-       struct atapi_capabilities_page cap;
--      int nslots = 1;
-+      int nslots = 1, mrw_write = 0;
--      if (CDROM_CONFIG_FLAGS (drive)->nec260) {
-+      if (CDROM_CONFIG_FLAGS (drive)->nec260 || 
-+          !strcmp(drive->id->model,"STINGRAY 8422 IDE 8X CD-ROM 7-27-95")) {
-               CDROM_CONFIG_FLAGS (drive)->no_eject = 0;                       
-               CDROM_CONFIG_FLAGS (drive)->audio_play = 1;       
-               return nslots;
-       }
-+      /*
-+       * we have to cheat a little here. the packet will eventually
-+       * be queued with ide_cdrom_packet(), which extracts the
-+       * drive from cdi->handle. Since this device hasn't been
-+       * registered with the Uniform layer yet, it can't do this.
-+       * Same goes for cdi->ops.
-+       */
-+      cdi->handle = (ide_drive_t *) drive;
-+      cdi->ops = &ide_cdrom_dops;
-+
-       if (ide_cdrom_get_capabilities(drive, &cap))
-               return 0;
-+      if (!cdrom_is_mrw(cdi, &mrw_write)) {
-+              CDROM_CONFIG_FLAGS(drive)->mrw = 1;
-+              if (mrw_write) {
-+                      CDROM_CONFIG_FLAGS(drive)->mrw_w = 1;
-+                      CDROM_CONFIG_FLAGS(drive)->ram = 1;
-+              }
-+      }
-+
-       if (cap.lock == 0)
-               CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
-       if (cap.eject)
-@@ -2631,8 +2666,10 @@
-               CDROM_CONFIG_FLAGS (drive)->test_write = 1;
-       if (cap.dvd_ram_read || cap.dvd_r_read || cap.dvd_rom)
-               CDROM_CONFIG_FLAGS (drive)->dvd = 1;
--      if (cap.dvd_ram_write)
-+      if (cap.dvd_ram_write) {
-               CDROM_CONFIG_FLAGS (drive)->dvd_ram = 1;
-+              CDROM_CONFIG_FLAGS(drive)->ram = 1;
-+      }
-       if (cap.dvd_r_write)
-               CDROM_CONFIG_FLAGS (drive)->dvd_r = 1;
-       if (cap.audio_play)
-@@ -2693,6 +2730,10 @@
-               (CDROM_CONFIG_FLAGS (drive)->cd_r)? "-R" : "", 
-               (CDROM_CONFIG_FLAGS (drive)->cd_rw)? "/RW" : "");
-+      if (CDROM_CONFIG_FLAGS(drive)->mrw || CDROM_CONFIG_FLAGS(drive)->mrw_w)
-+              printk(" CD-MR%s",
-+              CDROM_CONFIG_FLAGS(drive)->mrw_w ? "W" : "");
-+
-         if (CDROM_CONFIG_FLAGS (drive)->is_changer) 
-               printk (" changer w/%d slots", nslots);
-         else  
-@@ -2726,14 +2767,9 @@
-       struct cdrom_info *info = drive->driver_data;
-       struct cdrom_device_info *cdi = &info->devinfo;
-       int minor = drive->select.b.unit << PARTN_BITS;
-+      kdev_t cd_dev = MKDEV(HWIF(drive)->major, minor);
-       int nslots;
--      /*
--       * default to read-only always and fix latter at the bottom
--       */
--      set_device_ro(MKDEV(HWIF(drive)->major, minor), 0);
--      set_blocksize(MKDEV(HWIF(drive)->major, minor), CD_FRAMESIZE);
--
-       drive->special.all      = 0;
-       drive->ready_stat       = 0;
-@@ -2850,8 +2886,11 @@
-       nslots = ide_cdrom_probe_capabilities (drive);
--      if (CDROM_CONFIG_FLAGS(drive)->dvd_ram)
--              set_device_ro(MKDEV(HWIF(drive)->major, minor), 0);
-+      /*
-+       * set correct block size and read-only for non-ram media
-+       */
-+      set_blocksize(cd_dev, CD_FRAMESIZE);
-+      set_device_ro(cd_dev, !CDROM_CONFIG_FLAGS(drive)->ram);
-       if (ide_cdrom_register (drive, nslots)) {
-               printk ("%s: ide_cdrom_setup failed to register device with the cdrom driver.\n", drive->name);
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/drivers/ide/ide-cd.h linux/drivers/ide/ide-cd.h
---- /opt/kernel/linux-2.4.19-pre4/drivers/ide/ide-cd.h Tue Mar 26 09:52:55 2002
-+++ linux/drivers/ide/ide-cd.h Tue Mar 26 09:55:15 2002
-@@ -35,6 +35,11 @@
- #define NO_DOOR_LOCKING 0
- #endif
-+/*
-+ * typical timeout for packet command
-+ */
-+#define ATAPI_WAIT_PC (60 * HZ)
-+
- /************************************************************************/
- #define SECTOR_BITS           9
-@@ -75,6 +80,9 @@
-       __u8 dvd                : 1; /* Drive is a DVD-ROM */
-       __u8 dvd_r              : 1; /* Drive can write DVD-R */
-       __u8 dvd_ram            : 1; /* Drive can write DVD-RAM */
-+      __u8 mrw                : 1; /* drive can read mrw */
-+      __u8 mrw_w              : 1; /* drive can write mrw */
-+      __u8 ram                : 1; /* generic WRITE (dvd-ram/mrw) */
-       __u8 test_write         : 1; /* Drive can fake writes */
-       __u8 supp_disc_present  : 1; /* Changer can report exact contents
-                                       of slots. */
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/drivers/ide/ide-dma.c linux/drivers/ide/ide-dma.c
---- /opt/kernel/linux-2.4.19-pre4/drivers/ide/ide-dma.c        Tue Mar 26 09:52:55 2002
-+++ linux/drivers/ide/ide-dma.c        Mon Mar 25 08:42:18 2002
-@@ -204,25 +204,6 @@
- #endif /* CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */
- /*
-- * Our Physical Region Descriptor (PRD) table should be large enough
-- * to handle the biggest I/O request we are likely to see.  Since requests
-- * can have no more than 256 sectors, and since the typical blocksize is
-- * two or more sectors, we could get by with a limit of 128 entries here for
-- * the usual worst case.  Most requests seem to include some contiguous blocks,
-- * further reducing the number of table entries required.
-- *
-- * The driver reverts to PIO mode for individual requests that exceed
-- * this limit (possible with 512 byte blocksizes, eg. MSDOS f/s), so handling
-- * 100% of all crazy scenarios here is not necessary.
-- *
-- * As it turns out though, we must allocate a full 4KB page for this,
-- * so the two PRD tables (ide0 & ide1) will each get half of that,
-- * allowing each to have about 256 entries (8 bytes each) from this.
-- */
--#define PRD_BYTES     8
--#define PRD_ENTRIES   (PAGE_SIZE / (2 * PRD_BYTES))
--
--/*
-  * dma_intr() is the handler for disk read/write DMA interrupts
-  */
- ide_startstop_t ide_dma_intr (ide_drive_t *drive)
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/drivers/scsi/sr.c linux/drivers/scsi/sr.c
---- /opt/kernel/linux-2.4.19-pre4/drivers/scsi/sr.c    Tue Mar 26 09:52:56 2002
-+++ linux/drivers/scsi/sr.c    Tue Mar 26 08:00:47 2002
-@@ -128,7 +128,8 @@
-                               CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO |
-                               CDC_RESET | CDC_IOCTLS | CDC_DRIVE_STATUS |
-                               CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R |
--                              CDC_DVD_RAM | CDC_GENERIC_PACKET,
-+                              CDC_DVD_RAM | CDC_GENERIC_PACKET | CDC_MRW |
-+                              CDC_MRW_W | CDC_RAM,
-       generic_packet:         sr_packet,
- };
-@@ -690,7 +691,7 @@
- {
-       unsigned char cmd[6];
-       unsigned char *buffer;
--      int rc, n;
-+      int rc, n, mrw_write = 0, mrw = 1;
-       static char *loadmech[] =
-       {
-@@ -716,7 +717,7 @@
-       cmd[2] = 0x2a;
-       cmd[4] = 128;
-       cmd[3] = cmd[5] = 0;
--      rc = sr_do_ioctl(i, cmd, buffer, 128, 1, SCSI_DATA_READ, NULL, SR_TIMEOUT);
-+      rc = sr_do_ioctl(i, cmd, buffer, 128, 1, SCSI_DATA_READ, NULL, 0);
-       if (rc) {
-               /* failed, drive doesn't have capabilities mode page */
-@@ -728,6 +729,15 @@
-               printk("sr%i: scsi-1 drive\n", i);
-               return;
-       }
-+
-+      if (cdrom_is_mrw(&scsi_CDs[i].cdi, &mrw_write)) {
-+              mrw = 0;
-+              scsi_CDs[i].cdi.mask |= CDC_MRW;
-+              scsi_CDs[i].cdi.mask |= CDC_MRW_W;
-+      }
-+      if (!mrw_write)
-+              scsi_CDs[i].cdi.mask |= CDC_MRW_W;
-+
-       n = buffer[3] + 4;
-       scsi_CDs[i].cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;
-       scsi_CDs[i].readcd_known = 1;
-@@ -777,7 +785,14 @@
-       /*else    I don't think it can close its tray
-          scsi_CDs[i].cdi.mask |= CDC_CLOSE_TRAY; */
-+      /*
-+       * if DVD-RAM of MRW-W, we are randomly writeable
-+       */
-+      if ((scsi_CDs[i].cdi.mask & (CDC_DVD_RAM | CDC_MRW_W)) != (CDC_DVD_RAM | CDC_MRW_W))
-+              scsi_CDs[i].device->writeable = 1;
-+
-       scsi_free(buffer, 512);
-+      
- }
- /*
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/include/linux/cdrom.h linux/include/linux/cdrom.h
---- /opt/kernel/linux-2.4.19-pre4/include/linux/cdrom.h        Thu Nov 22 20:47:04 2001
-+++ linux/include/linux/cdrom.h        Tue Mar 26 09:55:09 2002
-@@ -5,7 +5,7 @@
-  *               1994, 1995   Eberhard Moenkeberg, emoenke@gwdg.de
-  *               1996         David van Leeuwen, david@tm.tno.nl
-  *               1997, 1998   Erik Andersen, andersee@debian.org
-- *               1998-2000    Jens Axboe, axboe@suse.de
-+ *               1998-2002    Jens Axboe, axboe@suse.de
-  */
-  
- #ifndef       _LINUX_CDROM_H
-@@ -387,6 +387,9 @@
- #define CDC_DVD                       0x8000  /* drive is a DVD */
- #define CDC_DVD_R             0x10000 /* drive can write DVD-R */
- #define CDC_DVD_RAM           0x20000 /* drive can write DVD-RAM */
-+#define CDC_MRW                       0x40000 /* drive can read MRW */
-+#define CDC_MRW_W             0x80000 /* drive can write MRW */
-+#define CDC_RAM                       0x100000 /* ok to open WRITE */
- /* drive status possibilities returned by CDROM_DRIVE_STATUS ioctl */
- #define CDS_NO_INFO           0       /* if not implemented */
-@@ -714,16 +717,61 @@
-       __u8 asb[46];
- };
--#ifdef __KERNEL__
--#include <linux/devfs_fs_kernel.h>
-+/*
-+ * feature profile
-+ */
-+#define CDF_MRW               0x28
-+
-+/*
-+ * media status bits
-+ */
-+#define CDM_MRW_NOTMRW                        0
-+#define CDM_MRW_BGFORMAT_INACTIVE     1
-+#define CDM_MRW_BGFORMAT_ACTIVE               2
-+#define CDM_MRW_BGFORMAT_COMPLETE     3
-+
-+/*
-+ * mrw address spaces
-+ */
-+#define MRW_LBA_DMA                   0
-+#define MRW_LBA_GAA                   1
-+
-+/*
-+ * mrw mode pages (first is deprecated) -- probed at init time and
-+ * cdi->mrw_mode_page is set
-+ */
-+#define MRW_MODE_PC_PRE1              0x2c
-+#define MRW_MODE_PC                   0x03
--struct cdrom_write_settings {
--      unsigned char fpacket;          /* fixed/variable packets */
--      unsigned long packet_size;      /* write out this number of packets */
--      unsigned long nwa;              /* next writeable address */
--      unsigned char writeable;        /* cdrom is writeable */
-+struct mrw_feature_desc {
-+      __u16 feature_code;
-+#if defined(__BIG_ENDIAN_BITFIELD)
-+      __u8 reserved1          : 2;
-+      __u8 feature_version    : 4;
-+      __u8 persistent         : 1;
-+      __u8 curr               : 1;
-+#elif defined(__LITTLE_ENDIAN_BITFIELD)
-+      __u8 curr               : 1;
-+      __u8 persistent         : 1;
-+      __u8 feature_version    : 4;
-+      __u8 reserved1          : 2;
-+#endif
-+      __u8 add_len;
-+#if defined(__BIG_ENDIAN_BITFIELD)
-+      __u8 reserved2          : 7;
-+      __u8 write              : 1;
-+#elif defined(__LITTLE_ENDIAN_BITFIELD)
-+      __u8 write              : 1;
-+      __u8 reserved2          : 7;
-+#endif
-+      __u8 reserved3;
-+      __u8 reserved4;
-+      __u8 reserved5;
- };
-+#ifdef __KERNEL__
-+#include <linux/devfs_fs_kernel.h>
-+
- /* Uniform cdrom data structures for cdrom.c */
- struct cdrom_device_info {
-       struct cdrom_device_ops  *ops;  /* link to device_ops */
-@@ -744,7 +792,9 @@
- /* per-device flags */
-         __u8 sanyo_slot               : 2;    /* Sanyo 3 CD changer support */
-         __u8 reserved         : 6;    /* not used yet */
--      struct cdrom_write_settings write;
-+
-+      int (*exit)(struct cdrom_device_info *);
-+      int mrw_mode_page;
- };
- struct cdrom_device_ops {
-@@ -819,6 +869,8 @@
-                              void *buffer, int len, int type);
- extern struct cdrom_device_info *cdrom_find_device(kdev_t dev);
-+#endif /* __KERNEL__ */
-+
- typedef struct {
-       __u16 disc_information_length;
- #if defined(__BIG_ENDIAN_BITFIELD)
-@@ -842,9 +894,13 @@
-       __u8 did_v                      : 1;
-         __u8 dbc_v                    : 1;
-         __u8 uru                      : 1;
--        __u8 reserved2                        : 5;
-+        __u8 reserved2                        : 2;
-+      __u8 dbit                       : 1;
-+      __u8 mrw_status                 : 2;
- #elif defined(__LITTLE_ENDIAN_BITFIELD)
--        __u8 reserved2                        : 5;
-+      __u8 mrw_status                 : 2;
-+      __u8 dbit                       : 1;
-+        __u8 reserved2                        : 2;
-         __u8 uru                      : 1;
-         __u8 dbc_v                    : 1;
-       __u8 did_v                      : 1;
-@@ -901,10 +957,6 @@
-       __u32 last_rec_address;
- } track_information;
--extern int cdrom_get_disc_info(kdev_t dev, disc_information *di);
--extern int cdrom_get_track_info(kdev_t dev, __u16 track, __u8 type,
--                              track_information *ti);
--
- /* The SCSI spec says there could be 256 slots. */
- #define CDROM_MAX_SLOTS       256
-@@ -1053,6 +1105,51 @@
-       __u8 reserved3;
- } rpc_state_t;
--#endif  /* End of kernel only stuff */ 
-+struct feature_header {
-+      __u32 data_len;
-+      __u8 reserved1;
-+      __u8 reserved2;
-+      __u16 curr_profile;
-+};
-+
-+struct event_header {
-+      __u16 data_len;
-+#if defined(__BIG_ENDIAN_BITFIELD)
-+      __u8 nea                : 1;
-+      __u8 reserved1          : 4;
-+      __u8 notification_class : 3;
-+#elif defined(__LITTLE_ENDIAN_BITFIELD)
-+      __u8 notification_class : 3;
-+      __u8 reserved1          : 4;
-+      __u8 nea                : 1;
-+#endif
-+      __u8 supp_event_class;
-+};
-+
-+struct media_event_desc {
-+#if defined(__BIG_ENDIAN_BITFIELD)
-+      __u8 reserved1          : 4;
-+      __u8 media_event_code   : 4;
-+      __u8 reserved2          : 6;
-+      __u8 media_present      : 1;
-+      __u8 door_open          : 1;
-+#elif defined(__LITTLE_ENDIAN_BITFIELD)
-+      __u8 media_event_code   : 4;
-+      __u8 reserved1          : 4;
-+      __u8 door_open          : 1;
-+      __u8 media_present      : 1;
-+      __u8 reserved2          : 6;
-+#endif
-+      __u8 start_slot;
-+      __u8 end_slot;
-+};
-+
-+#ifdef __KERNEL__
-+extern int cdrom_get_disc_info(kdev_t dev, disc_information *di);
-+extern int cdrom_get_track_info(kdev_t dev, __u16 track, __u8 type,
-+                              track_information *ti);
-+extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med);
-+extern int cdrom_is_mrw(struct cdrom_device_info *cdi, int *write);
-+#endif /* __KERNEL__ */
- #endif  /* _LINUX_CDROM_H */
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/include/linux/ide.h linux/include/linux/ide.h
---- /opt/kernel/linux-2.4.19-pre4/include/linux/ide.h  Tue Mar 26 09:52:58 2002
-+++ linux/include/linux/ide.h  Mon Mar 25 11:55:23 2002
-@@ -259,6 +259,25 @@
- #endif
- /*
-+ * Our Physical Region Descriptor (PRD) table should be large enough
-+ * to handle the biggest I/O request we are likely to see.  Since requests
-+ * can have no more than 256 sectors, and since the typical blocksize is
-+ * two or more sectors, we could get by with a limit of 128 entries here for
-+ * the usual worst case.  Most requests seem to include some contiguous blocks,
-+ * further reducing the number of table entries required.
-+ *
-+ * The driver reverts to PIO mode for individual requests that exceed
-+ * this limit (possible with 512 byte blocksizes, eg. MSDOS f/s), so handling
-+ * 100% of all crazy scenarios here is not necessary.
-+ *
-+ * As it turns out though, we must allocate a full 4KB page for this,
-+ * so the two PRD tables (ide0 & ide1) will each get half of that,
-+ * allowing each to have about 256 entries (8 bytes each) from this.
-+ */
-+#define PRD_BYTES     8
-+#define PRD_ENTRIES   (PAGE_SIZE / (2 * PRD_BYTES))
-+
-+/*
-  * hwif_chipset_t is used to keep track of the specific hardware
-  * chipset used by each IDE interface, if known.
-  */
-diff -ur -X /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.19-pre4/include/linux/udf_fs.h linux/include/linux/udf_fs.h
---- /opt/kernel/linux-2.4.19-pre4/include/linux/udf_fs.h       Tue Mar 26 09:52:58 2002
-+++ linux/include/linux/udf_fs.h       Mon Mar 25 08:50:14 2002
-@@ -30,6 +30,7 @@
-  * HISTORY
-  *
-  */
-+#include <linux/config.h>
- #ifndef _UDF_FS_H
- #define _UDF_FS_H 1
diff --git a/kernel-cdrw-packet.patch b/kernel-cdrw-packet.patch
deleted file mode 100644 (file)
index e1b5114..0000000
+++ /dev/null
@@ -1,5334 +0,0 @@
-diff -u -r -N ../../linus/2.4/linux/Documentation/Configure.help linux/Documentation/Configure.help
---- ../../linus/2.4/linux/Documentation/Configure.help Tue Aug  6 21:13:55 2002
-+++ linux/Documentation/Configure.help Tue Aug  6 21:21:50 2002
-@@ -694,6 +694,27 @@
-   say M here and read <file:Documentation/modules.txt>.  The module
-   will be called ide-cd.o.
-+
-+Packet writing on CD/DVD media (EXPERIMENTAL)
-+CONFIG_CDROM_PKTCDVD
-+  If you have a CDROM drive that supports packet writing, say Y to
-+  include preliminary support. It should work with any MMC/Mt Fuji
-+  complain ATAPI or SCSI drive, which is just about any newer CD
-+  writer.
-+
-+  Currently only writing to CD-RW discs is possible.
-+
-+  If you want to compile the driver as a module ( = code which can be
-+  inserted in and removed from the running kernel whenever you want),
-+  say M here and read Documentation/modules.txt. The module will be
-+  called pktcdvd.o
-+
-+Write caching
-+CONFIG_CDROM_PKTCDVD_WCACHE
-+  If enabled, write caching will be set for the CD-R/W device. For now
-+  this option is dangerous unless the CD-RW media is known good, as we
-+  don't do deferred write error handling yet.
-+
- Include IDE/ATAPI TAPE support
- CONFIG_BLK_DEV_IDETAPE
-   If you have an IDE tape drive using the ATAPI protocol, say Y.
-diff -u -r -N ../../linus/2.4/linux/arch/sparc64/kernel/ioctl32.c linux/arch/sparc64/kernel/ioctl32.c
---- ../../linus/2.4/linux/arch/sparc64/kernel/ioctl32.c        Tue Aug  6 21:14:27 2002
-+++ linux/arch/sparc64/kernel/ioctl32.c        Tue Aug  6 21:22:04 2002
-@@ -90,6 +90,7 @@
- #include <linux/atm_tcp.h>
- #include <linux/sonet.h>
- #include <linux/atm_suni.h>
-+#include <linux/pktcdvd.h>
- #include <linux/mtd/mtd.h>
- #include <net/bluetooth/bluetooth.h>
-@@ -849,6 +850,41 @@
-       return ret;
- }
-+struct packet_stats32 {
-+      u32     bh_s;
-+      u32     bh_e;
-+      u32     bh_cache_hits;
-+      u32     page_cache_hits;
-+      u32     bh_w;
-+      u32     bh_r;
-+};
-+
-+static inline int pkt_getstats(unsigned int fd, unsigned int cmd, unsigned long arg)
-+{
-+      struct packet_stats p;
-+      struct packet_stats32 p32;
-+      mm_segment_t old_fs = get_fs();
-+      int ret;
-+
-+      ret = copy_from_user (&p32, (struct packet_stats32 *)arg, sizeof(struct packet_stats32));
-+      if (ret)
-+              return -EFAULT;
-+#define P(x) (p.x = (unsigned long)p32.x)
-+      P(bh_s);
-+      P(bh_e);
-+      P(bh_cache_hits);
-+      P(page_cache_hits);
-+      P(bh_w);
-+      P(bh_r);
-+#undef P
-+
-+      set_fs (KERNEL_DS);
-+      ret = sys_ioctl (fd, cmd, (long)&p);
-+      set_fs (old_fs);
-+
-+        return ret;
-+}
-+
- struct hd_geometry32 {
-       unsigned char heads;
-       unsigned char sectors;
-@@ -4553,6 +4589,12 @@
- COMPATIBLE_IOCTL(RNDADDENTROPY)
- COMPATIBLE_IOCTL(RNDZAPENTCNT)
- COMPATIBLE_IOCTL(RNDCLEARPOOL)
-+/* Big X, CDRW Packet Driver */
-+#if defined(CONFIG_CDROM_PKTCDVD)
-+COMPATIBLE_IOCTL(PACKET_SETUP_DEV)
-+COMPATIBLE_IOCTL(PACKET_TEARDOWN_DEV)
-+HANDLE_IOCTL(PACKET_GET_STATS, pkt_getstats)
-+#endif /* CONFIG_CDROM_PKTCDVD */
- /* Bluetooth ioctls */
- COMPATIBLE_IOCTL(HCIDEVUP)
- COMPATIBLE_IOCTL(HCIDEVDOWN)
-diff -u -r -N ../../linus/2.4/linux/drivers/block/Config.in linux/drivers/block/Config.in
---- ../../linus/2.4/linux/drivers/block/Config.in      Tue Aug  6 21:14:34 2002
-+++ linux/drivers/block/Config.in      Tue Aug  6 21:22:08 2002
-@@ -39,6 +39,11 @@
- dep_tristate 'Mylex DAC960/DAC1100 PCI RAID Controller support' CONFIG_BLK_DEV_DAC960 $CONFIG_PCI
- dep_tristate 'Micro Memory MM5415 Battery Backed RAM support' CONFIG_BLK_DEV_UMEM $CONFIG_PCI $CONFIG_EXPERIMENTAL
-+tristate 'Packet writing on CD/DVD media' CONFIG_CDROM_PKTCDVD
-+if [ "$CONFIG_CDROM_PKTCDVD" != "n" ]; then
-+    bool '   Enable write caching' CONFIG_CDROM_PKTCDVD_WCACHE n
-+fi
-+   
- tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
- dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-diff -u -r -N ../../linus/2.4/linux/drivers/block/Makefile linux/drivers/block/Makefile
---- ../../linus/2.4/linux/drivers/block/Makefile       Tue Aug  6 21:14:34 2002
-+++ linux/drivers/block/Makefile       Tue Aug  6 21:22:08 2002
-@@ -31,6 +31,7 @@
- obj-$(CONFIG_BLK_DEV_DAC960)  += DAC960.o
- obj-$(CONFIG_BLK_DEV_UMEM)    += umem.o
- obj-$(CONFIG_BLK_DEV_NBD)     += nbd.o
-+obj-$(CONFIG_CDROM_PKTCDVD)   += pktcdvd.o
- subdir-$(CONFIG_PARIDE) += paride
-diff -u -r -N ../../linus/2.4/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
---- ../../linus/2.4/linux/drivers/block/ll_rw_blk.c    Tue Aug  6 21:14:34 2002
-+++ linux/drivers/block/ll_rw_blk.c    Tue Aug  6 21:22:08 2002
-@@ -1046,6 +1046,7 @@
-       /* Test device size, when known. */
-       if (blk_size[major])
-               minorsize = blk_size[major][MINOR(bh->b_rdev)];
-+#if 0
-       if (minorsize) {
-               unsigned long maxsector = (minorsize << 1) + 1;
-               unsigned long sector = bh->b_rsector;
-@@ -1069,6 +1070,7 @@
-                       return;
-               }
-       }
-+#endif
-       /*
-        * Resolve the mapping until finished. (drivers are
-@@ -1270,8 +1272,8 @@
-       req->errors = 0;
-       if (!uptodate)
--              printk("end_request: I/O error, dev %s (%s), sector %lu\n",
--                      kdevname(req->rq_dev), name, req->sector);
-+              printk("end_request: I/O error, cmd %d dev %s (%s), sector %lu\n",
-+                      req->cmd, kdevname(req->rq_dev), name, req->sector);
-       if ((bh = req->bh) != NULL) {
-               nsect = bh->b_size >> 9;
-diff -u -r -N ../../linus/2.4/linux/drivers/block/pktcdvd.c linux/drivers/block/pktcdvd.c
---- ../../linus/2.4/linux/drivers/block/pktcdvd.c      Thu Jan  1 01:00:00 1970
-+++ linux/drivers/block/pktcdvd.c      Thu Aug  8 20:44:32 2002
-@@ -0,0 +1,2524 @@
-+/*
-+ * Copyright (C) 2000 Jens Axboe <axboe@suse.de>
-+ *
-+ * May be copied or modified under the terms of the GNU General Public
-+ * License.  See linux/COPYING for more information.
-+ *
-+ * Packet writing layer for ATAPI and SCSI CD-R, CD-RW, DVD-R, and
-+ * DVD-RW devices (aka an exercise in block layer masturbation)
-+ *
-+ *
-+ * TODO: (circa order of when I will fix it)
-+ * - Only able to write on CD-RW media right now.
-+ * - check host application code on media and set it in write page
-+ * - Generic interface for UDF to submit large packets for variable length
-+ *   packet writing
-+ * - interface for UDF <-> packet to negotiate a new location when a write
-+ *   fails.
-+ * - handle OPC, especially for -RW media
-+ *
-+ * ------------------------------------------------------------------------
-+ *
-+ * Newer changes -- see ChangeLog
-+ *
-+ * 0.0.2d (26/10/2000)
-+ * - (scsi) use implicit segment recounting for all hba's
-+ * - fix speed setting, was consistenly off on most drives
-+ * - only print capacity when opening for write
-+ * - fix off-by-two error in getting/setting write+read speed (affected
-+ *   reporting as well as actual speed used)
-+ * - possible to enable write caching on drive
-+ * - do ioctl marshalling on sparc64 from Ben Collins <bcollins@debian.org>
-+ * - avoid unaligned access on flags, should have been unsigned long of course
-+ * - fixed missed wakeup in kpacketd
-+ * - b_dev error (two places)
-+ * - fix buffer head b_count bugs
-+ * - fix hole merge bug, where tail could be added twice
-+ * - fsync and invalidate buffers on close
-+ * - check hash table for buffers first before using our own
-+ * - add read-ahead
-+ * - fixed several list races
-+ * - fix proc reporting for more than one device
-+ * - change to O_CREAT for creating devices
-+ * - added media_change hook
-+ * - added free buffers config option
-+ * - pkt_lock_tray fails on failed open (and oopses), remove it. unlock
-+ *   is done explicitly in pkt_remove dev anyway.
-+ * - added proper elevator insertion (should probably be part of elevator.c)
-+ * - moved kernel thread info to private device, spawn one for each writer
-+ * - added separate buffer list for dirty packet buffers
-+ * - fixed nasty data corruption bug
-+ * - remember to account request even when we don't gather data for it
-+ * - add ioctl to force wakeup of kernel thread (for debug)
-+ * - fixed packet size setting bug on zero detected
-+ * - changed a lot of the proc reporting to be more readable to "humans"
-+ * - set full speed for read-only opens
-+ *
-+ * 0.0.2c (08/09/2000)
-+ * - inc usage count of buffer heads
-+ * - add internal buffer pool to avoid deadlock on oom
-+ * - gather data for as many buffers as we have, before initiating write. this
-+ *   allows the laser to stay on longer, giving better performance.
-+ * - fix always busy when tray can't be locked
-+ * - remove request duplication nastiness, inject directly into the target
-+ * - adapted to devfs and elevator changes
-+ * - added proc interface
-+ *
-+ * 0.0.2b (21/06/2000)
-+ * - fix io_request_lock typos (missing '&')
-+ * - grab pkt_sem before invoking pkt_handle_queue
-+ * - SCSI uses queuedata too, mirror that in pd->queuedata (hack)
-+ * - remove SCSI sr debug messages
-+ * - really activate empty block querying (requires cvs UDF, CDRW branch)
-+ * - make sure sync_buffers doesn't consider us, or we can deadlock
-+ * - make sure people don't swap on us (for now ;)
-+ *
-+ * 0.0.2a (19/06/2000)
-+ * - add kpacketd kernel thread to handle actual data gathering
-+ * - pd->pkt_dev is now real device, not just minor
-+ * - add support for super_operations block_empty fn, to query fs for
-+ *   unused blocks that don't need reading
-+ * - "cache" blocks that are contained in the UDF file/dir packet
-+ * - rewrite pkt_gather_data to a one-step solution
-+ * - add private pktcdvd elevator
-+ * - shutdown write access to device upon write failure
-+ * - fix off-by-one bug in capacity
-+ * - setup sourceforge project (packet-cd.sourceforge.net)
-+ * - add more blk ioctls to pkt_ioctl
-+ * - set inactive request queue head
-+ * - change panic calls to BUG, better with kdb
-+ * - have pkt_gather_data check correct block size and kill rq if wrong
-+ * - rework locking
-+ * - introduce per-pd queues, simplifies pkt_request
-+ * - store pd in queuedata
-+ *
-+ *************************************************************************/
-+
-+#define VERSION_CODE  "v0.0.2p 03/03/2002 Jens Axboe (axboe@suse.de)"
-+
-+#include <linux/config.h>
-+#include <linux/module.h>
-+#include <linux/types.h>
-+#include <linux/kernel.h>
-+#include <linux/slab.h>
-+#include <linux/errno.h>
-+#include <linux/delay.h>
-+#include <linux/locks.h>
-+#include <linux/spinlock.h>
-+#include <linux/interrupt.h>
-+#include <linux/file.h>
-+#include <linux/blk.h>
-+#include <linux/blkpg.h>
-+#include <linux/cdrom.h>
-+#include <linux/ide.h>
-+#include <linux/smp_lock.h>
-+#include <linux/pktcdvd.h>
-+#include <linux/kernel_stat.h>
-+#include <linux/sysrq.h>
-+
-+#include <asm/unaligned.h>
-+#include <asm/uaccess.h>
-+
-+/*
-+ * remove for next version -- for now, disable the mention option in the
-+ * SCSI section
-+ */
-+#if defined(CONFIG_SCSI_DEBUG_QUEUES)
-+#error "Don't compile with 'Enable extra checks in new queueing code' enabled"
-+#endif
-+
-+#define SCSI_IOCTL_SEND_COMMAND       1
-+
-+/*
-+ * 32 buffers of 2048 bytes
-+ */
-+#define PACKET_MAX_SIZE               32
-+
-+#define NEXT_BH(bh, nbh)      \
-+       (((bh)->b_rsector + ((bh)->b_size >> 9)) == (nbh)->b_rsector)
-+
-+#define BH_IN_ORDER(b1, b2)   \
-+      ((b1)->b_rsector < (b2)->b_rsector)
-+
-+#define CONTIG_BH(b1, b2)     \
-+      ((b1)->b_data + (b1)->b_size == (b2)->b_data)
-+
-+#define ZONE(sector, pd)      \
-+      (((sector) + ((pd)->offset)) - (((sector) + ((pd)->offset)) & (((pd)->settings.size - 1))))
-+
-+static int *pkt_sizes;
-+static int *pkt_blksize;
-+static int *pkt_readahead;
-+static struct pktcdvd_device *pkt_devs;
-+static struct proc_dir_entry *pkt_proc;
-+static DECLARE_WAIT_QUEUE_HEAD(pd_bh_wait);
-+
-+/*
-+ * a bit of a kludge, but we want to be able to pass both real and packet
-+ * dev and get the right one.
-+ */
-+static inline struct pktcdvd_device *pkt_find_dev(kdev_t dev)
-+{
-+      int i;
-+
-+      for (i = 0; i < MAX_WRITERS; i++)
-+              if (pkt_devs[i].dev == dev || pkt_devs[i].pkt_dev == dev)
-+                      return &pkt_devs[i];
-+
-+      return NULL;
-+}
-+
-+/*
-+ * The following functions are the plugins to the ll_rw_blk
-+ * layer and decides whether a given request / buffer head can be
-+ * merged. We differ in a couple of ways from "normal" block
-+ * devices:
-+ *
-+ * - don't merge when the buffer / request crosses a packet block
-+ *   boundary
-+ * - merge buffer head even though it can't be added directly to the
-+ *   front or back of the list. this gives us better performance, since
-+ *   what would otherwise require multiple requests can now be handled
-+ *   in one (hole merging)
-+ * - at this point its just writes, reads have already been remapped
-+ *
-+ * The device original merge_ functions are stored in the packet device
-+ * queue (pd->q)
-+ *
-+ */
-+static inline int pkt_do_merge(request_queue_t *q, struct request *rq,
-+                             struct buffer_head *bh, int max_segs,
-+                             merge_request_fn *merge_fn,
-+                             struct pktcdvd_device *pd)
-+{
-+      void *ptr = q->queuedata;
-+      int ret;
-+
-+      if (rq->cmd != WRITE)
-+              BUG();
-+
-+      if (ZONE(rq->sector, pd) != ZONE(bh->b_rsector, pd))
-+              return ELEVATOR_NO_MERGE;
-+
-+      /*
-+       * NOTE: this is done under the io_request_lock/queue_lock, hence
-+       * it is safe
-+       */
-+      q->queuedata = pd->cdrw.queuedata;
-+      ret = merge_fn(q, rq, bh, max_segs);
-+      q->queuedata = ptr;
-+      return ret;
-+}
-+
-+static int pkt_front_merge_fn(request_queue_t *q, struct request *rq,
-+                            struct buffer_head *bh, int max_segs)
-+{
-+      struct pktcdvd_device *pd = &pkt_devs[MINOR(bh->b_rdev)];
-+
-+      return pkt_do_merge(q, rq, bh, max_segs, pd->cdrw.front_merge_fn, pd);
-+}
-+
-+static int pkt_back_merge_fn(request_queue_t *q, struct request *rq,
-+                           struct buffer_head *bh, int max_segs)
-+{
-+      struct pktcdvd_device *pd = &pkt_devs[MINOR(bh->b_rdev)];
-+
-+      return pkt_do_merge(q, rq, bh, max_segs, pd->cdrw.back_merge_fn, pd);
-+}
-+
-+/*
-+ * rules similar to above
-+ */
-+static int pkt_merge_requests_fn(request_queue_t *q, struct request *rq,
-+                               struct request *nxt, int max_segs)
-+{
-+      struct pktcdvd_device *pd = pkt_find_dev(rq->rq_dev);
-+      struct packet_cdrw *cdrw = &pd->cdrw;
-+      void *ptr = q->queuedata;
-+      int ret;
-+
-+      if (ZONE(rq->sector, pd) != ZONE(nxt->sector + nxt->nr_sectors - 1, pd))
-+              return 0;
-+
-+      q->queuedata = cdrw->queuedata;
-+      ret = cdrw->merge_requests_fn(q, rq, nxt, max_segs);
-+      q->queuedata = ptr;
-+      return ret;
-+}
-+
-+static int pkt_grow_bhlist(struct pktcdvd_device *pd, int count)
-+{
-+      struct packet_cdrw *cdrw = &pd->cdrw;
-+      struct buffer_head *bh;
-+      int i = 0;
-+
-+      VPRINTK("grow_bhlist: count=%d\n", count);
-+
-+      while (i < count) {
-+              bh = kmem_cache_alloc(bh_cachep, SLAB_KERNEL);
-+              if (!bh)
-+                      break;
-+
-+              bh->b_data = kmalloc(CD_FRAMESIZE, GFP_KERNEL);
-+              if (!bh->b_data) {
-+                      kmem_cache_free(bh_cachep, bh);
-+                      break;
-+              }
-+              bh->b_page = virt_to_page(bh->b_data);
-+
-+              spin_lock_irq(&pd->lock);
-+              bh->b_pprev = &cdrw->bhlist;
-+              bh->b_next = cdrw->bhlist;
-+              cdrw->bhlist = bh;
-+              spin_unlock_irq(&pd->lock);
-+
-+              bh->b_size = CD_FRAMESIZE;
-+              bh->b_list = PKT_BUF_LIST;
-+              atomic_inc(&cdrw->free_bh);
-+              i++;
-+      }
-+
-+      return i;
-+}
-+
-+static int pkt_shrink_bhlist(struct pktcdvd_device *pd, int count)
-+{
-+      struct packet_cdrw *cdrw = &pd->cdrw;
-+      struct buffer_head *bh;
-+      int i = 0;
-+
-+      VPRINTK("shrink_bhlist: count=%d\n", count);
-+
-+      while ((i < count) && cdrw->bhlist) {
-+              spin_lock_irq(&pd->lock);
-+              bh = cdrw->bhlist;
-+              cdrw->bhlist = bh->b_next;
-+              spin_unlock_irq(&pd->lock);
-+              if (bh->b_list != PKT_BUF_LIST)
-+                      BUG();
-+              kfree(bh->b_data);
-+              kmem_cache_free(bh_cachep, bh);
-+              atomic_dec(&cdrw->free_bh);
-+              i++;
-+      }
-+
-+      return i;
-+}
-+
-+/*
-+ * These functions manage a simple pool of buffer_heads.
-+ */
-+static struct buffer_head *pkt_get_stacked_bh(struct pktcdvd_device *pd)
-+{
-+      unsigned long flags;
-+      struct buffer_head *bh;
-+
-+      spin_lock_irqsave(&pd->lock, flags);
-+      bh = pd->stacked_bhlist;
-+      if (bh) {
-+              pd->stacked_bhlist = bh->b_next;
-+              bh->b_next = NULL;
-+              pd->stacked_bhcnt--;
-+              BUG_ON(pd->stacked_bhcnt < 0);
-+      }
-+      spin_unlock_irqrestore(&pd->lock, flags);
-+
-+      return bh;
-+}
-+
-+static void pkt_put_stacked_bh(struct pktcdvd_device *pd, struct buffer_head *bh)
-+{
-+      unsigned long flags;
-+
-+      spin_lock_irqsave(&pd->lock, flags);
-+      if (pd->stacked_bhcnt < STACKED_BH_POOL_SIZE) {
-+              bh->b_next = pd->stacked_bhlist;
-+              pd->stacked_bhlist = bh;
-+              pd->stacked_bhcnt++;
-+              bh = NULL;
-+      }
-+      spin_unlock_irqrestore(&pd->lock, flags);
-+      if (bh) {
-+              kmem_cache_free(bh_cachep, bh);
-+      }
-+}
-+
-+static void pkt_shrink_stacked_bhlist(struct pktcdvd_device *pd)
-+{
-+      struct buffer_head *bh;
-+
-+      while ((bh = pkt_get_stacked_bh(pd)) != NULL) {
-+              kmem_cache_free(bh_cachep, bh);
-+      }
-+}
-+
-+static int pkt_grow_stacked_bhlist(struct pktcdvd_device *pd)
-+{
-+      struct buffer_head *bh;
-+      int i;
-+
-+      for (i = 0; i < STACKED_BH_POOL_SIZE; i++) {
-+              bh = kmem_cache_alloc(bh_cachep, GFP_KERNEL);
-+              if (!bh) {
-+                      pkt_shrink_stacked_bhlist(pd);
-+                      return 0;
-+              }
-+              pkt_put_stacked_bh(pd, bh);
-+      }
-+      return 1;
-+}
-+
-+
-+static request_queue_t *pkt_get_queue(kdev_t dev)
-+{
-+      struct pktcdvd_device *pd = pkt_find_dev(dev);
-+      if (!pd)
-+              return NULL;
-+      return &pd->cdrw.r_queue;
-+}
-+
-+static void pkt_put_buffer(struct buffer_head *bh)
-+{
-+      struct pktcdvd_device *pd = &pkt_devs[MINOR(bh->b_dev)];
-+      unsigned long flags;
-+
-+      if (bh->b_list != PKT_BUF_LIST)
-+              return;
-+
-+      bh->b_state = 0;
-+      bh->b_reqnext = NULL;
-+      bh->b_end_io = NULL;
-+
-+      spin_lock_irqsave(&pd->lock, flags);
-+      bh->b_next = pd->cdrw.bhlist;
-+      pd->cdrw.bhlist = bh;
-+      spin_unlock_irqrestore(&pd->lock, flags);
-+      atomic_inc(&pd->cdrw.free_bh);
-+}
-+
-+static inline void __pkt_inject_request(request_queue_t *q, struct request *rq)
-+{
-+      struct list_head *head =  &q->queue_head;
-+
-+      VPRINTK("__pkt_inject_request: list_empty == %d, size=%d, cmd=%d\n",
-+              list_empty(&q->queue_head), rq->bh->b_size >> 9, rq->cmd);
-+
-+      if (list_empty(&q->queue_head))
-+              q->plug_device_fn(q, rq->rq_dev);
-+
-+      list_add_tail(&rq->queue, head);
-+}
-+
-+static void pkt_inject_request(request_queue_t *q, struct request *rq)
-+{
-+      spin_lock_irq(&io_request_lock);
-+      __pkt_inject_request(q, rq);
-+      spin_unlock_irq(&io_request_lock);
-+}
-+
-+static inline void __pkt_end_request(struct pktcdvd_device *pd)
-+{
-+      pd->rq = NULL;
-+      clear_bit(PACKET_RQ, &pd->flags);
-+      clear_bit(PACKET_BUSY, &pd->flags);
-+}
-+
-+/*
-+ * io_request_lock must be held and interrupts disabled
-+ */
-+static void pkt_end_request(struct pktcdvd_device *pd)
-+{
-+      unsigned long flags;
-+
-+      spin_lock_irqsave(&pd->lock, flags);
-+      __pkt_end_request(pd);
-+      spin_unlock_irqrestore(&pd->lock, flags);
-+}
-+
-+
-+static inline void __pkt_kill_request(struct request *rq, int uptodate, char *name)
-+{
-+      struct buffer_head *bh = rq->bh, *nbh;
-+
-+      while (bh) {
-+              nbh = bh->b_reqnext;
-+              bh->b_reqnext = NULL;
-+
-+              if (bh->b_end_io) {
-+                      bh->b_end_io(bh, uptodate);
-+              } else {
-+                      mark_buffer_clean(bh);
-+                      mark_buffer_uptodate(bh, uptodate);
-+                      unlock_buffer(bh);
-+              }
-+
-+              bh = nbh;
-+      }
-+
-+      end_that_request_last(rq);
-+}
-+
-+
-+void pkt_kill_request(struct pktcdvd_device *pd, struct request *rq, int ok)
-+{
-+      printk("pktcdvd: killing request\n");
-+      spin_lock_irq(&io_request_lock);
-+      __pkt_kill_request(rq, ok, pd->name);
-+      spin_unlock_irq(&io_request_lock);
-+      pkt_end_request(pd);
-+}
-+
-+static void pkt_end_io_read(struct buffer_head *bh, int uptodate)
-+{
-+      if (!uptodate) {
-+              /* Obviously not correct, but it avoids locking up the kernel */
-+              printk("Ignoring read error on sector:%ld\n", bh->b_rsector);
-+              uptodate = 1;
-+      }
-+
-+      mark_buffer_uptodate(bh, uptodate);
-+      unlock_buffer(bh);
-+}
-+
-+/*
-+ * if the buffer is already in the buffer cache, grab it if we can lock
-+ * it down
-+ */
-+static struct buffer_head *pkt_get_hash(kdev_t dev, unsigned long block, int size)
-+{
-+      struct buffer_head *bh = NULL;
-+
-+      bh = get_hash_table(dev, block, size);
-+      if (bh) {
-+              if (!test_and_set_bit(BH_Lock, &bh->b_state)) {
-+                      brelse(bh);
-+                      if (atomic_set_buffer_clean(bh))
-+                              refile_buffer(bh);
-+                      SetPageReferenced(bh->b_page);
-+              } else {
-+                      brelse(bh);
-+                      bh = NULL;
-+              }
-+      }
-+
-+      return bh;
-+}
-+
-+static inline struct buffer_head *__pkt_get_buffer(struct pktcdvd_device *pd,
-+                                                 unsigned long sector)
-+{
-+      struct buffer_head *bh;
-+
-+      if (!atomic_read(&pd->cdrw.free_bh))
-+              BUG();
-+
-+      atomic_dec(&pd->cdrw.free_bh);
-+
-+      spin_lock_irq(&pd->lock);
-+      bh = pd->cdrw.bhlist;
-+      pd->cdrw.bhlist = bh->b_next;
-+      bh->b_next = NULL;
-+      spin_unlock_irq(&pd->lock);
-+
-+      bh->b_next_free = NULL;
-+      bh->b_prev_free = NULL;
-+      bh->b_this_page = NULL;
-+      bh->b_pprev = NULL;
-+      bh->b_reqnext = NULL;
-+
-+      init_waitqueue_head(&bh->b_wait);
-+      atomic_set(&bh->b_count, 1);
-+      bh->b_list = PKT_BUF_LIST;
-+      bh->b_state = (1 << BH_Mapped) | (1 << BH_Lock) | (1 << BH_Req);
-+      bh->b_dev = pd->pkt_dev;
-+
-+      return bh;
-+}
-+
-+static void pkt_end_io_write(struct buffer_head *, int);
-+
-+static struct buffer_head *pkt_get_buffer(struct pktcdvd_device *pd,
-+                                        unsigned long sector, int size)
-+{
-+      unsigned long block = sector / (size >> 9);
-+      struct buffer_head *bh;
-+
-+      VPRINTK("get_buffer: sector=%ld, size=%d\n", sector, size);
-+
-+      bh = pkt_get_hash(pd->pkt_dev, block, size);
-+      if (bh)
-+              pd->stats.bh_cache_hits += (size >> 9);
-+      else
-+              bh = __pkt_get_buffer(pd, sector);
-+
-+      blk_started_io(bh->b_size >> 9);
-+      bh->b_blocknr = block;
-+      bh->b_end_io = pkt_end_io_write;
-+      bh->b_rsector = sector;
-+      bh->b_rdev = pd->dev;
-+      return bh;
-+}
-+
-+/*
-+ * this rq is done -- io_request_lock must be held and interrupts disabled
-+ */
-+static void pkt_rq_end_io(struct pktcdvd_device *pd)
-+{
-+      unsigned long flags;
-+
-+      VPRINTK("pkt_rq_end_io: rq=%p, cmd=%d, q=%p\n", pd->rq, pd->rq->cmd, pd->rq->q);
-+
-+      spin_lock_irqsave(&pd->lock, flags);
-+
-+      /*
-+       * debug checks
-+       */
-+      if (!test_bit(PACKET_RQ, &pd->flags))
-+              printk("pktcdvd: rq_end_io: RQ not set\n");
-+      if (!test_bit(PACKET_BUSY, &pd->flags))
-+              printk("pktcdvd: rq_end_io: BUSY not set\n");
-+
-+      __pkt_end_request(pd);
-+      wake_up(&pd->wqueue);
-+      spin_unlock_irqrestore(&pd->lock, flags);
-+}
-+
-+static inline void pkt_mark_readonly(struct pktcdvd_device *pd, int on)
-+{
-+      if (on)
-+              set_bit(PACKET_READONLY, &pd->flags);
-+      else
-+              clear_bit(PACKET_READONLY, &pd->flags);
-+}
-+
-+static inline void __pkt_end_io_write(struct pktcdvd_device *pd,
-+                                    struct buffer_head *bh, int uptodate)
-+{
-+      VPRINTK("end_io_write: bh=%ld, uptodate=%d\n", bh->b_blocknr, uptodate);
-+
-+      /*
-+       * general Linux bug, noone should clear the BH_Uptodate flag for
-+       * a failed write...
-+       */
-+      if (uptodate)
-+              mark_buffer_uptodate(bh, uptodate);
-+      else {
-+              printk("pktcdvd: %s: WRITE error sector %lu\n", pd->name, bh->b_rsector);
-+#if 0
-+              set_bit(PACKET_RECOVERY, &pd->flags);
-+              wake_up(&pd->wqueue);
-+#endif
-+      }
-+
-+      pd->stats.bh_e++;
-+
-+      atomic_dec(&pd->wrqcnt);
-+      if (atomic_read(&pd->wrqcnt) == 0) {
-+              pkt_rq_end_io(pd);
-+      }
-+
-+      unlock_buffer(bh);
-+}
-+
-+/*
-+ * we use this as our default b_end_io handler, since we need to take
-+ * the entire request off the list if just one of the clusters fail.
-+ * later on this should also talk to UDF about relocating blocks -- for
-+ * now we just drop the rq entirely. when doing the relocating we must also
-+ * lock the bh down to ensure that we can easily reconstruct the write should
-+ * it fail.
-+ */
-+static void pkt_end_io_write(struct buffer_head *bh, int uptodate)
-+{
-+      struct pktcdvd_device *pd = &pkt_devs[MINOR(bh->b_rdev)];
-+
-+      __pkt_end_io_write(pd, bh, uptodate);
-+      pkt_put_buffer(bh);
-+}
-+
-+static void pkt_end_io_write_stacked(struct buffer_head *bh, int uptodate)
-+{
-+      struct pktcdvd_device *pd = &pkt_devs[MINOR(bh->b_rdev)];
-+      struct buffer_head *rbh = bh->b_private;
-+
-+      __pkt_end_io_write(pd, bh, uptodate);
-+      rbh->b_end_io(rbh, uptodate);
-+      pkt_put_stacked_bh(pd, bh);
-+      wake_up(&pd_bh_wait);
-+}
-+
-+static int pkt_init_rq(struct pktcdvd_device *pd, struct request *rq)
-+{
-+      struct buffer_head *bh;
-+      unsigned int cnt, nr_segments;
-+
-+      cnt = 0;
-+      nr_segments = 1;
-+      bh = rq->bh;
-+      while (bh) {
-+              struct buffer_head *nbh = bh->b_reqnext;
-+
-+              bh->b_rdev = pd->pkt_dev;
-+
-+              /*
-+               * the buffer better be uptodate, mapped, and locked!
-+               */
-+              if (!buffer_uptodate(bh)) {
-+                      printk("%lu not uptodate\n", bh->b_rsector);
-+                      /*
-+                       * It is not really the pktcdvd drivers problem if
-+                       * someone wants to write stale data.
-+                       */
-+              }
-+
-+              if (!buffer_locked(bh) || !buffer_mapped(bh)) {
-+                      printk("%lu, state %lx\n", bh->b_rsector, bh->b_state);
-+                      BUG();
-+              }
-+
-+              if (nbh) {
-+                      if (!CONTIG_BH(bh, nbh))
-+                              nr_segments++;
-+
-+                      /*
-+                       * if this happens, do report
-+                       */
-+                      if ((bh->b_rsector + (bh->b_size >> 9))!=nbh->b_rsector) {
-+                              printk("%lu (%p)-> %lu (%p) (%lu in all)\n",
-+                              bh->b_rsector, bh, nbh->b_rsector, nbh,
-+                              rq->nr_sectors);
-+                              return 1;
-+                      }
-+              }
-+
-+              cnt += bh->b_size >> 9;
-+              bh = nbh;
-+      }
-+
-+      rq->nr_segments = rq->nr_hw_segments = nr_segments;
-+
-+      if (cnt != rq->nr_sectors) {
-+              printk("botched request %u (%lu)\n", cnt, rq->nr_sectors);
-+              return 1;
-+      }
-+
-+      return 0;
-+}
-+
-+/*
-+ * really crude stats for now...
-+ */
-+static void pkt_account_rq(struct pktcdvd_device *pd, int read, int written,
-+                         int bs)
-+{
-+      pd->stats.bh_s += (written / bs);
-+      pd->stats.secs_w += written;
-+      pd->stats.secs_r += read;
-+}
-+
-+/*
-+ * does request span two packets? 0 == yes, 1 == no
-+ */
-+static int pkt_one_zone(struct pktcdvd_device *pd, struct request *rq)
-+{
-+      if (!pd->settings.size)
-+              return 0;
-+
-+      if (!(rq->cmd & WRITE))
-+              return 1;
-+
-+      return ZONE(rq->sector, pd) == ZONE(rq->sector + rq->nr_sectors -1, pd);
-+}
-+
-+#if defined(CONFIG_CDROM_PKTCDVD_BEMPTY)
-+static void pkt_init_buffer(struct buffer_head *bh)
-+{
-+      set_bit(BH_Uptodate, &bh->b_state);
-+      set_bit(BH_Dirty, &bh->b_state);
-+      memset(bh->b_data, 0, bh->b_size);
-+}
-+
-+static int pkt_sb_empty(struct pktcdvd_device *pd, struct buffer_head *bh)
-+{
-+      struct super_block *sb;
-+      struct super_operations *sop;
-+      unsigned long packet;
-+      int ret;
-+
-+      ret = 0;
-+      if ((sb = get_super(pd->pkt_dev)) == NULL)
-+              goto out;
-+      if ((sop = sb->s_op) == NULL)
-+              goto out;
-+      if (sop->block_empty == NULL)
-+              goto out;
-+
-+      packet = 0;
-+      if (sop->block_empty(sb, bh->b_blocknr, &packet))  {
-+              pkt_init_buffer(pd, bh);
-+              ret = 1;
-+      }
-+
-+out:
-+      return ret;
-+}
-+
-+#else /* defined(CONFIG_CDROM_PKTCDVD_BEMPTY) */
-+
-+static int pkt_sb_empty(struct pktcdvd_device *pd, struct buffer_head *bh)
-+{
-+      return 0;
-+}
-+
-+#endif /* defined(CONFIG_CDROM_PKTCDVD_BEMPTY) */
-+
-+static int pkt_flush_cache(struct pktcdvd_device *pd);
-+
-+static void pkt_flush_writes(struct pktcdvd_device *pd)
-+{
-+      if (pd->unflushed_writes) {
-+              pd->unflushed_writes = 0;
-+              pkt_flush_cache(pd);
-+      }
-+}
-+
-+/*
-+ * basically just does a ll_rw_block for the bhs given to use, but we
-+ * don't return until we have them.
-+ */
-+static void pkt_read_bh(struct pktcdvd_device *pd, struct buffer_head *bh)
-+{
-+      /*
-+       * UDF says it's empty, woohoo
-+       */
-+      if (pkt_sb_empty(pd, bh))
-+              return;
-+
-+      down(&pd->cache_sync_mutex);
-+      pkt_flush_writes(pd);
-+      generic_make_request(READ, bh);
-+      up(&pd->cache_sync_mutex);
-+}
-+
-+static int pkt_index_bhs(struct buffer_head **bhs)
-+{
-+      struct buffer_head *bh;
-+      int index;
-+      int error = 0;
-+
-+      /*
-+       * now finish pending reads and connect the chain of buffers
-+       */
-+      index = 0;
-+      while (index < PACKET_MAX_SIZE) {
-+              bh = bhs[index];
-+
-+              /*
-+               * pin down private buffers (ie, force I/O to complete)
-+               */
-+              if (bh->b_end_io == pkt_end_io_read) {
-+                      lock_buffer(bh);
-+                      bh->b_end_io = pkt_end_io_write;
-+              }
-+
-+              if (!buffer_locked(bh))
-+                      BUG();
-+
-+              if (!buffer_uptodate(bh)) {
-+                      printk("pktcdvd: read failure (%s, sec %lu)\n",
-+                              kdevname(bh->b_rdev), bh->b_rsector);
-+                      error = 1;
-+              }
-+
-+              /*
-+               * attach previous
-+               */
-+              if (index) {
-+                      struct buffer_head *pbh = bhs[index - 1];
-+
-+                      if ((pbh->b_rsector + (pbh->b_size >> 9)) != bh->b_rsector) {
-+                              printk("%lu -> %lu\n", pbh->b_rsector, bh->b_rsector);
-+                              index = 0;
-+                              break;
-+                      }
-+                      pbh->b_reqnext = bh;
-+              }
-+              index++;
-+      }
-+
-+      if (error)
-+              return 0;
-+
-+      if (index) {
-+              index--;
-+              bhs[index]->b_reqnext = NULL;
-+      }
-+
-+      return index;
-+}
-+
-+/*
-+ * fill in the holes of a request
-+ *
-+ * Returns: 0, keep 'em coming -- 1, stop queueing
-+ */
-+static int pkt_gather_data(struct pktcdvd_device *pd, struct request *rq)
-+{
-+      unsigned long start_s, end_s, sector;
-+      struct buffer_head *bh;
-+      unsigned int sectors, index;
-+      struct buffer_head *bhs[PACKET_MAX_SIZE];
-+
-+      memset(bhs, 0, sizeof(bhs));
-+
-+      /*
-+       * all calculations are done with 512 byte sectors
-+       */
-+      sectors = pd->settings.size - rq->nr_sectors;
-+      start_s = rq->sector - (rq->sector & (pd->settings.size - 1));
-+      end_s = start_s + pd->settings.size;
-+
-+      VPRINTK("pkt_gather_data: cmd=%d\n", rq->cmd);
-+      VPRINTK("need %d sectors for %s\n", sectors, kdevname(pd->dev));
-+      VPRINTK("from %lu to %lu ", start_s, end_s);
-+      VPRINTK("(%lu - %lu)\n", rq->bh->b_rsector, rq->bhtail->b_rsector +
-+                               rq->current_nr_sectors);
-+
-+      /*
-+       * first fill-out map of the buffers we have
-+       */
-+      bh = rq->bh;
-+      while (bh) {
-+              index = (bh->b_rsector & (pd->settings.size - 1)) / (bh->b_size >> 9);
-+
-+              bhs[index] = bh;
-+              bh = bh->b_reqnext;
-+
-+              /*
-+               * make sure to detach from list!
-+               */
-+              bhs[index]->b_reqnext = NULL;
-+      }
-+
-+      /*
-+       * now get buffers for missing blocks, and schedule reads for them
-+       */
-+      for (index = 0, sector = start_s; sector < end_s; index++) {
-+              if (bhs[index]) {
-+                      bh = bhs[index];
-+                      goto next;
-+              }
-+
-+              bh = pkt_get_buffer(pd, sector, CD_FRAMESIZE);
-+
-+              bhs[index] = bh;
-+              rq->nr_sectors += bh->b_size >> 9;
-+              rq->nr_segments++;
-+
-+              if (!buffer_uptodate(bh)) {
-+                      bh->b_end_io = pkt_end_io_read;
-+                      pkt_read_bh(pd, bh);
-+              }
-+
-+      next:
-+              sector += bh->b_size >> 9;
-+      }
-+
-+      index = pkt_index_bhs(bhs);
-+#if 0
-+      if (!index)
-+              goto kill_it;
-+#endif
-+
-+      rq->bh = bhs[0];
-+      rq->bhtail = bhs[index];
-+      rq->buffer = rq->bh->b_data;
-+      rq->current_nr_sectors = rq->bh->b_size >> 9;
-+      rq->hard_nr_sectors = rq->nr_sectors;
-+      rq->sector = rq->hard_sector = start_s;
-+
-+      VPRINTK("unlocked last %lu\n", rq->bhtail->b_rsector);
-+      if (pkt_init_rq(pd, rq)) {
-+              for (index = 0; index < PACKET_MAX_SIZE; index++) {
-+                      bh = bhs[index];
-+                      printk("[%d] %lu %d (%p -> %p)\n", index, bh->b_rsector,
-+                                      bh->b_size, bh, bh->b_reqnext);
-+              }
-+              goto kill_it;
-+      }
-+
-+      pkt_account_rq(pd, sectors, rq->nr_sectors, rq->current_nr_sectors);
-+
-+      /*
-+       * sanity check
-+       */
-+      if (rq->nr_sectors != pd->settings.size) {
-+              printk("pktcdvd: request mismatch %lu (should be %u)\n",
-+                                      rq->nr_sectors, pd->settings.size);
-+              BUG();
-+      }
-+
-+      return 0;
-+
-+      /*
-+       * for now, just kill entire request and hope for the best...
-+       */
-+kill_it:
-+      for (index = 0; index < PACKET_MAX_SIZE; index++) {
-+              bh = bhs[index];
-+              buffer_IO_error(bh);
-+              if (bh->b_list == PKT_BUF_LIST)
-+                      pkt_put_buffer(bh);
-+      }
-+      end_that_request_last(pd->rq);
-+      return 1;
-+}
-+
-+/*
-+ * Returns: 1, keep 'em coming -- 0, wait for wakeup
-+ */
-+static int pkt_do_request(struct pktcdvd_device *pd, struct request *rq)
-+{
-+      VPRINTK("do_request: bh=%ld, nr_sectors=%ld, size=%d, cmd=%d\n", rq->bh->b_blocknr, rq->nr_sectors, pd->settings.size, rq->cmd);
-+
-+      /*
-+       * perfect match. the merge_* functions have already made sure that
-+       * a request doesn't cross a packet boundary, so if the sector
-+       * count matches it's good.
-+       */
-+      if (rq->nr_sectors == pd->settings.size) {
-+              if (pkt_init_rq(pd, rq)) {
-+                      pkt_kill_request(pd, rq, 0);
-+                      return 1;
-+              }
-+
-+              pkt_account_rq(pd, 0, rq->nr_sectors, rq->current_nr_sectors);
-+              return 0;
-+      }
-+
-+      /*
-+       * paranoia...
-+       */
-+      if (rq->nr_sectors > pd->settings.size) {
-+              printk("pktcdvd: request too big! BUG! %lu\n", rq->nr_sectors);
-+              BUG();
-+      }
-+
-+      return pkt_gather_data(pd, rq);
-+}
-+
-+/*
-+ * recover a failed write, query for relocation if possible
-+ */
-+static int pkt_start_recovery(struct pktcdvd_device *pd, struct request *rq)
-+{
-+      struct super_block *sb = get_super(pd->pkt_dev);
-+      struct buffer_head *bhs[PACKET_MAX_SIZE], *bh, *obh;
-+      unsigned long old_block, new_block, sector;
-+      int i, sectors;
-+
-+      if (!sb || !sb->s_op || !sb->s_op->relocate_blocks)
-+              goto fail;
-+
-+      old_block = (rq->sector & ~(pd->settings.size - 1)) / (rq->bh->b_size >> 9);
-+      if (sb->s_op->relocate_blocks(sb, old_block, &new_block))
-+              goto fail;
-+
-+      memset(bhs, 0, sizeof(bhs));
-+      bh = rq->bh;
-+      while (bh) {
-+              i = (bh->b_rsector & (pd->settings.size - 1)) / (bh->b_size >> 9);
-+
-+              bhs[i] = bh;
-+              bh = bh->b_reqnext;
-+              bhs[i]->b_reqnext = NULL;
-+      }
-+
-+      sectors = 0;
-+      sector = new_block * (rq->bh->b_size >> 9);
-+      for (i = 0; i < PACKET_MAX_SIZE; i++) {
-+              bh = bhs[i];
-+
-+              /*
-+               * three cases -->
-+               *      1) bh is not there at all
-+               *      2) bh is there and not ours, get a new one and
-+               *         invalidate this block for the future
-+               *      3) bh is there and ours, just change the sector
-+               */
-+              if (!bh) {
-+                      obh = pkt_get_hash(pd->pkt_dev, new_block,CD_FRAMESIZE);
-+                      bh = __pkt_get_buffer(pd, sector);
-+                      if (obh) {
-+                              if (buffer_uptodate(obh)) {
-+                                      memcpy(bh->b_data, obh->b_data, obh->b_size);
-+                                      set_bit(BH_Uptodate, &bh->b_state);
-+                              }
-+                              unlock_buffer(obh);
-+                              bforget(obh);
-+                      }
-+                      bhs[i] = bh;
-+              } else if (bh->b_list != PKT_BUF_LIST) {
-+                      bhs[i] = pkt_get_buffer(pd, sector, CD_FRAMESIZE);
-+                      memcpy(bhs[i]->b_data, bh->b_data, CD_FRAMESIZE);
-+                      unlock_buffer(bh);
-+                      bforget(bh);
-+                      bh = bhs[i];
-+                      set_bit(BH_Uptodate, &bh->b_state);
-+              } else {
-+                      bh->b_rsector = sector;
-+                      bh->b_blocknr = new_block;
-+              }
-+
-+              sector += (bh->b_size >> 9);
-+              new_block++;
-+              sectors +=  (bh->b_size >> 9);
-+      }
-+
-+      i = pkt_index_bhs(bhs);
-+      if (!i)
-+              goto fail;
-+
-+      rq->bh = bhs[0];
-+      rq->bhtail = bhs[i];
-+      rq->buffer = rq->bh->b_data;
-+      rq->current_nr_sectors = rq->bh->b_size >> 9;
-+      rq->hard_nr_sectors = rq->nr_sectors = sectors;
-+      rq->sector = rq->hard_sector = rq->bh->b_rsector;
-+      rq->errors = 0;
-+      clear_bit(PACKET_RECOVERY, &pd->flags);
-+      clear_bit(PACKET_BUSY, &pd->flags);
-+      return 0;
-+
-+fail:
-+      printk("pktcdvd: rq recovery not possible\n");
-+      pkt_kill_request(pd, rq, 0);
-+      clear_bit(PACKET_RECOVERY, &pd->flags);
-+      return 1;
-+}
-+
-+/*
-+ * handle the requests that got queued for this writer
-+ *
-+ * returns 0 for busy (already doing something), or 1 for queue new one
-+ *
-+ */
-+static int pkt_handle_queue(struct pktcdvd_device *pd, request_queue_t *q)
-+{
-+      struct request *rq;
-+      int ret;
-+
-+      VPRINTK("handle_queue\n");
-+
-+      /*
-+       * nothing for us to do
-+       */
-+      if (!test_bit(PACKET_RQ, &pd->flags))
-+              return 1;
-+
-+      spin_lock_irq(&pd->lock);
-+      rq = pd->rq;
-+      spin_unlock_irq(&pd->lock);
-+
-+      if (test_bit(PACKET_RECOVERY, &pd->flags))
-+              if (pkt_start_recovery(pd, rq))
-+                      return 1;
-+
-+      /*
-+       * already being processed
-+       */
-+      if (test_and_set_bit(PACKET_BUSY, &pd->flags))
-+              return 0;
-+
-+      /*
-+       * nothing to do
-+       */
-+      ret = 1;
-+      if (rq == NULL) {
-+              printk("handle_queue: pd BUSY+RQ, but no rq\n");
-+              clear_bit(PACKET_RQ, &pd->flags);
-+              goto out;
-+      }
-+
-+      /*
-+       * reads are shipped directly to cd-rom, so they should not
-+       * pop up here
-+       */
-+      if (rq->cmd == READ)
-+              BUG();
-+
-+      if ((rq->current_nr_sectors << 9) != CD_FRAMESIZE) {
-+              pkt_kill_request(pd, rq, 0);
-+              goto out;
-+      }
-+
-+      if (!pkt_do_request(pd, rq)) {
-+              atomic_add(PACKET_MAX_SIZE, &pd->wrqcnt);
-+              down(&pd->cache_sync_mutex);
-+              pkt_inject_request(q, rq);
-+              pd->unflushed_writes = 1;
-+              up(&pd->cache_sync_mutex);
-+              return 0;
-+      }
-+
-+out:
-+      clear_bit(PACKET_BUSY, &pd->flags);
-+      return ret;
-+}
-+
-+/*
-+ * kpacketd is woken up, when writes have been queued for one of our
-+ * registered devices
-+ */
-+static int kcdrwd(void *foobar)
-+{
-+      struct pktcdvd_device *pd = foobar;
-+      request_queue_t *q, *my_queue;
-+
-+      /*
-+       * exit_files, mm (move to lazy-tlb, so context switches are come
-+       * extremely cheap) etc
-+       */
-+      daemonize();
-+
-+      current->policy = SCHED_OTHER;
-+      current->static_prio = -20;
-+      sprintf(current->comm, pd->name);
-+
-+      spin_lock_irq(&current->sigmask_lock);
-+      siginitsetinv(&current->blocked, sigmask(SIGKILL));
-+      flush_signals(current);
-+      spin_unlock_irq(&current->sigmask_lock);
-+
-+      q = blk_get_queue(pd->dev);
-+      my_queue = blk_get_queue(pd->pkt_dev);
-+
-+      for (;;) {
-+              DECLARE_WAITQUEUE(wait, current);
-+
-+              add_wait_queue(&pd->wqueue, &wait);
-+
-+              /*
-+               * if PACKET_BUSY is cleared, we can queue
-+               * another request. otherwise we need to unplug the
-+               * cd-rom queue and wait for buffers to be flushed
-+               * (which will then wake us up again when done).
-+               */
-+              do {
-+                      pkt_handle_queue(pd, q);
-+
-+                      set_current_state(TASK_INTERRUPTIBLE);
-+
-+                      if (test_bit(PACKET_BUSY, &pd->flags))
-+                              break;
-+
-+                      spin_lock_irq(&io_request_lock);
-+                      if (list_empty(&my_queue->queue_head)) {
-+                              spin_unlock_irq(&io_request_lock);
-+                              break;
-+                      }
-+                      set_current_state(TASK_RUNNING);
-+
-+                      my_queue->request_fn(my_queue);
-+                      spin_unlock_irq(&io_request_lock);
-+              } while (1);
-+
-+              generic_unplug_device(q);
-+
-+              schedule();
-+              remove_wait_queue(&pd->wqueue, &wait);
-+
-+              /*
-+               * got SIGKILL
-+               */
-+              if (signal_pending(current))
-+                      break;
-+
-+      }
-+
-+      complete_and_exit(&pd->cdrw.thr_compl, 0);
-+      return 0;
-+}
-+
-+static void pkt_attempt_remerge(struct pktcdvd_device *pd, request_queue_t *q,
-+                              struct request *rq)
-+{
-+      struct request *nxt;
-+
-+      while (!list_empty(&q->queue_head)) {
-+              if (rq->nr_sectors == pd->settings.size)
-+                      break;
-+
-+              nxt = blkdev_entry_next_request(&q->queue_head);
-+
-+              if (ZONE(rq->sector, pd) != ZONE(nxt->sector, pd))
-+                      break;
-+              else if (rq->sector + rq->nr_sectors > nxt->sector)
-+                      break;
-+
-+              rq->nr_sectors = rq->hard_nr_sectors += nxt->nr_sectors;
-+              rq->bhtail->b_reqnext = nxt->bh;
-+              rq->bhtail = nxt->bhtail;
-+              list_del(&nxt->queue);
-+              blkdev_release_request(nxt);
-+      }
-+}
-+
-+/*
-+ * our request function.
-+ *
-+ * - reads are just tossed directly to the device, we don't care.
-+ * - writes, regardless of size, are added as the current pd rq and
-+ *   kcdrwd is woken up to handle it. kcdrwd will also make sure to
-+ *   reinvoke this request handler, once the given request has been
-+ *   processed.
-+ *
-+ * Locks: io_request_lock held
-+ *
-+ * Notes: all writers have their own queue, so all requests are for the
-+ *      the same device
-+ */
-+static void pkt_request(request_queue_t *q)
-+{
-+      struct pktcdvd_device *pd = (struct pktcdvd_device *) q->queuedata;
-+      unsigned long flags;
-+
-+      if (list_empty(&q->queue_head))
-+              return;
-+
-+      while (!list_empty(&q->queue_head)) {
-+              struct request *rq = blkdev_entry_next_request(&q->queue_head);
-+
-+              VPRINTK("pkt_request: cmd=%d, rq=%p, rq->sector=%ld, rq->nr_sectors=%ld\n", rq->cmd, rq, rq->sector, rq->nr_sectors);
-+
-+              blkdev_dequeue_request(rq);
-+
-+              rq->rq_dev = pd->dev;
-+
-+              if (rq->cmd == READ)
-+                      BUG();
-+
-+              if (test_bit(PACKET_RECOVERY, &pd->flags))
-+                      break;
-+
-+              /*
-+               * paranoia, shouldn't trigger...
-+               */
-+              if (!pkt_one_zone(pd, rq)) {
-+                      printk("rq->cmd=%d, rq->sector=%ld, rq->nr_sectors=%ld\n",
-+                              rq->cmd, rq->sector, rq->nr_sectors);
-+                      BUG();
-+              }
-+
-+              pkt_attempt_remerge(pd, q, rq);
-+
-+              spin_lock_irqsave(&pd->lock, flags);
-+
-+              /*
-+               * already gathering data for another read. the
-+               * rfn will be reinvoked once that is done
-+               */
-+              if (test_and_set_bit(PACKET_RQ, &pd->flags)) {
-+                      list_add(&rq->queue, &q->queue_head);
-+                      spin_unlock_irqrestore(&pd->lock, flags);
-+                      break;
-+              }
-+
-+              if (pd->rq)
-+                      BUG();
-+
-+              pd->rq = rq;
-+              spin_unlock_irqrestore(&pd->lock, flags);
-+              break;
-+      }
-+      VPRINTK("wake up wait queue\n");
-+      wake_up(&pd->wqueue);
-+}
-+
-+static void pkt_print_settings(struct pktcdvd_device *pd)
-+{
-+      printk("pktcdvd: %s packets, ", pd->settings.fp ? "Fixed" : "Variable");
-+      printk("%u blocks, ", pd->settings.size >> 2);
-+      printk("Mode-%c disc\n", pd->settings.block_mode == 8 ? '1' : '2');
-+}
-+
-+/*
-+ * A generic sense dump / resolve mechanism should be implemented across
-+ * all ATAPI + SCSI devices.
-+ */
-+static void pkt_dump_sense(struct request_sense *sense)
-+{
-+      char *info[9] = { "No sense", "Recovered error", "Not ready",
-+                        "Medium error", "Hardware error", "Illegal request",
-+                        "Unit attention", "Data protect", "Blank check" };
-+
-+      if (sense == NULL)
-+              return;
-+
-+      if (sense->sense_key > 8) {
-+              printk("pktcdvd: sense invalid\n");
-+              return;
-+      }
-+
-+      printk("pktcdvd: sense category %s ", info[sense->sense_key]);
-+      printk("asc(%02x), ascq(%02x)\n", sense->asc, sense->ascq);
-+}
-+
-+/*
-+ * write mode select package based on pd->settings
-+ */
-+static int pkt_set_write_settings(struct pktcdvd_device *pd)
-+{
-+      struct cdrom_device_info *cdi = pd->cdi;
-+      struct cdrom_generic_command cgc;
-+      write_param_page *wp;
-+      char buffer[128];
-+      int ret, size;
-+
-+      memset(buffer, 0, sizeof(buffer));
-+      init_cdrom_command(&cgc, buffer, sizeof(*wp), CGC_DATA_READ);
-+      if ((ret = cdrom_mode_sense(cdi, &cgc, GPMODE_WRITE_PARMS_PAGE, 0)))
-+              return ret;
-+
-+      size = 2 + ((buffer[0] << 8) | (buffer[1] & 0xff));
-+      pd->mode_offset = (buffer[6] << 8) | (buffer[7] & 0xff);
-+      if (size > sizeof(buffer))
-+              size = sizeof(buffer);
-+
-+      /*
-+       * now get it all
-+       */
-+      init_cdrom_command(&cgc, buffer, size, CGC_DATA_READ);
-+      if ((ret = cdrom_mode_sense(cdi, &cgc, GPMODE_WRITE_PARMS_PAGE, 0)))
-+              return ret;
-+
-+      /*
-+       * write page is offset header + block descriptor length
-+       */
-+      wp = (write_param_page *) &buffer[sizeof(struct mode_page_header) + pd->mode_offset];
-+
-+      wp->fp = pd->settings.fp;
-+      wp->track_mode = pd->settings.track_mode;
-+      wp->write_type = pd->settings.write_type;
-+      wp->data_block_type = pd->settings.block_mode;
-+
-+      wp->multi_session = 0;
-+
-+#ifdef PACKET_USE_LS
-+      wp->link_size = 7;
-+      wp->ls_v = 1;
-+#endif
-+
-+      if (wp->data_block_type == PACKET_BLOCK_MODE1) {
-+              wp->session_format = 0;
-+              wp->subhdr2 = 0x20;
-+      } else if (wp->data_block_type == PACKET_BLOCK_MODE2) {
-+              wp->session_format = 0x20;
-+              wp->subhdr2 = 8;
-+#if 0
-+              wp->mcn[0] = 0x80;
-+              memcpy(&wp->mcn[1], PACKET_MCN, sizeof(wp->mcn) - 1);
-+#endif
-+      } else {
-+              /*
-+               * paranoia
-+               */
-+              printk("pktcdvd: write mode wrong %d\n", wp->data_block_type);
-+              return 1;
-+      }
-+      wp->packet_size = cpu_to_be32(pd->settings.size >> 2);
-+
-+      cgc.buflen = cgc.cmd[8] = size;
-+      if ((ret = cdrom_mode_select(cdi, &cgc))) {
-+              pkt_dump_sense(cgc.sense);
-+              return ret;
-+      }
-+
-+      pkt_print_settings(pd);
-+      return 0;
-+}
-+
-+/*
-+ * 0 -- we can write to this track, 1 -- we can't
-+ */
-+static int pkt_good_track(track_information *ti)
-+{
-+      /*
-+       * only good for CD-RW at the moment, not DVD-RW
-+       */
-+
-+      /*
-+       * FIXME: only for FP
-+       */
-+      if (ti->fp == 0)
-+              return 0;
-+
-+      /*
-+       * "good" settings as per Mt Fuji.
-+       */
-+      if (ti->rt == 0 && ti->blank == 0 && ti->packet == 1)
-+              return 0;
-+
-+      if (ti->rt == 0 && ti->blank == 1 && ti->packet == 1)
-+              return 0;
-+
-+      if (ti->rt == 1 && ti->blank == 0 && ti->packet == 1)
-+              return 0;
-+
-+      printk("pktcdvd: bad state %d-%d-%d\n", ti->rt, ti->blank, ti->packet);
-+      return 1;
-+}
-+
-+/*
-+ * 0 -- we can write to this disc, 1 -- we can't
-+ */
-+static int pkt_good_disc(struct pktcdvd_device *pd, disc_information *di)
-+{
-+      /*
-+       * for disc type 0xff we should probably reserve a new track.
-+       * but i'm not sure, should we leave this to user apps? probably.
-+       */
-+      if (di->disc_type == 0xff) {
-+              printk("pktcdvd: Unknown disc. No track?\n");
-+              return 1;
-+      }
-+
-+      if (di->disc_type != 0x20 && di->disc_type != 0) {
-+              printk("pktcdvd: Wrong disc type (%x)\n", di->disc_type);
-+              return 1;
-+      }
-+
-+      if (di->erasable == 0) {
-+              printk("pktcdvd: Disc not erasable\n");
-+              return 1;
-+      }
-+
-+      if (pd->track_status == PACKET_SESSION_RESERVED) {
-+              printk("pktcdvd: Can't write to last track (reserved)\n");
-+              return 1;
-+      }
-+
-+      return 0;
-+}
-+
-+static int pkt_probe_settings(struct pktcdvd_device *pd)
-+{
-+      disc_information di;
-+      track_information ti;
-+      int ret, track;
-+
-+      memset(&di, 0, sizeof(disc_information));
-+      memset(&ti, 0, sizeof(track_information));
-+
-+      if ((ret = cdrom_get_disc_info(pd->dev, &di))) {
-+              printk("failed get_disc\n");
-+              return ret;
-+      }
-+
-+      pd->disc_status = di.disc_status;
-+      pd->track_status = di.border_status;
-+
-+      if (pkt_good_disc(pd, &di))
-+              return -ENXIO;
-+
-+      printk("pktcdvd: inserted media is CD-R%s\n", di.erasable ? "W" : "");
-+      pd->type = di.erasable ? PACKET_CDRW : PACKET_CDR;
-+
-+      track = 1; /* (di.last_track_msb << 8) | di.last_track_lsb; */
-+      if ((ret = cdrom_get_track_info(pd->dev, track, 1, &ti))) {
-+              printk("pktcdvd: failed get_track\n");
-+              return ret;
-+      }
-+
-+      if (pkt_good_track(&ti)) {
-+              printk("pktcdvd: can't write to this track\n");
-+              return -ENXIO;
-+      }
-+
-+      /*
-+       * we keep packet size in 512 byte units, makes it easier to
-+       * deal with request calculations.
-+       */
-+      pd->settings.size = be32_to_cpu(ti.fixed_packet_size) << 2;
-+      if (pd->settings.size == 0) {
-+              printk("pktcdvd: detected zero packet size!\n");
-+              pd->settings.size = 128;
-+      }
-+      pd->settings.fp = ti.fp;
-+      pd->offset = (be32_to_cpu(ti.track_start) << 2) & (pd->settings.size - 1);
-+
-+      if (ti.nwa_v) {
-+              pd->nwa = be32_to_cpu(ti.next_writable);
-+              set_bit(PACKET_NWA_VALID, &pd->flags);
-+      }
-+
-+      /*
-+       * in theory we could use lra on -RW media as well and just zero
-+       * blocks that haven't been written yet, but in practice that
-+       * is just a no-go. we'll use that for -R, naturally.
-+       */
-+      if (ti.lra_v) {
-+              pd->lra = be32_to_cpu(ti.last_rec_address);
-+              set_bit(PACKET_LRA_VALID, &pd->flags);
-+      } else {
-+              pd->lra = 0xffffffff;
-+              set_bit(PACKET_LRA_VALID, &pd->flags);
-+      }
-+
-+      /*
-+       * fine for now
-+       */
-+      pd->settings.link_loss = 7;
-+      pd->settings.write_type = 0;    /* packet */
-+      pd->settings.track_mode = ti.track_mode;
-+
-+      /*
-+       * mode1 or mode2 disc
-+       */
-+      switch (ti.data_mode) {
-+              case PACKET_MODE1:
-+                      pd->settings.block_mode = PACKET_BLOCK_MODE1;
-+                      break;
-+              case PACKET_MODE2:
-+                      pd->settings.block_mode = PACKET_BLOCK_MODE2;
-+                      break;
-+              default:
-+                      printk("pktcdvd: unknown data mode\n");
-+                      return 1;
-+      }
-+      return 0;
-+}
-+
-+/*
-+ * enable/disable write caching on drive
-+ */
-+static int pkt_write_caching(struct pktcdvd_device *pd, int set)
-+{
-+      struct cdrom_generic_command cgc;
-+      unsigned char buf[64];
-+      int ret;
-+
-+      memset(buf, 0, sizeof(buf));
-+      init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);
-+      cgc.buflen = pd->mode_offset + 12;
-+
-+      /*
-+       * caching mode page might not be there, so quiet this command
-+       */
-+      cgc.quiet = 1;
-+
-+      if ((ret = cdrom_mode_sense(pd->cdi, &cgc, GPMODE_WCACHING_PAGE, 0)))
-+              return ret;
-+
-+      buf[pd->mode_offset + 10] |= (!!set << 2);
-+
-+      cgc.buflen = cgc.cmd[8] = 2 + ((buf[0] << 8) | (buf[1] & 0xff));
-+      ret = cdrom_mode_select(pd->cdi, &cgc);
-+      if (ret)
-+              printk("pktcdvd: write caching control failed\n");
-+      else if (!ret && set)
-+              printk("pktcdvd: enabled write caching on %s\n", pd->name);
-+      return ret;
-+}
-+
-+/*
-+ * flush the drive cache to media
-+ */
-+static int pkt_flush_cache(struct pktcdvd_device *pd)
-+{
-+      struct cdrom_generic_command cgc;
-+
-+      init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE);
-+      cgc.cmd[0] = GPCMD_FLUSH_CACHE;
-+      cgc.quiet = 1;
-+      cgc.timeout = 60*HZ;
-+
-+      /*
-+       * the IMMED bit -- we default to not setting it, although that
-+       * would allow a much faster close, this is safer
-+       */
-+#if 0
-+      cgc.cmd[1] = 1 << 1;
-+#endif
-+      return pd->cdi->ops->generic_packet(pd->cdi, &cgc);
-+}
-+
-+/*
-+ * Returns drive current write speed
-+ */
-+static int pkt_get_speed(struct pktcdvd_device *pd)
-+{
-+      struct cdrom_generic_command cgc;
-+      unsigned char buf[64];
-+      int ret, offset;
-+
-+      memset(buf, 0, sizeof(buf));
-+      init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_UNKNOWN);
-+
-+      ret = cdrom_mode_sense(pd->cdi, &cgc, GPMODE_CAPABILITIES_PAGE, 0);
-+      if (ret) {
-+              cgc.buflen = pd->mode_offset + buf[pd->mode_offset + 9] + 2 +
-+                           sizeof(struct mode_page_header);
-+              ret = cdrom_mode_sense(pd->cdi, &cgc, GPMODE_CAPABILITIES_PAGE, 0);
-+              if (ret)
-+                      return ret;
-+      }
-+
-+      offset = pd->mode_offset + 26;
-+      pd->speed = ((buf[offset] << 8) | buf[offset + 1]) / 0xb0;
-+      return 0;
-+}
-+
-+/*
-+ * speed is given as the normal factor, e.g. 4 for 4x
-+ */
-+static int pkt_set_speed(struct pktcdvd_device *pd, unsigned speed)
-+{
-+      struct cdrom_generic_command cgc;
-+      unsigned read_speed;
-+
-+      /*
-+       * we set read and write time so that read spindle speed is one and
-+       * a half as fast as write. although a drive can typically read much
-+       * faster than write, this minimizes the spin up/down when we write
-+       * and gather data. maybe 1/1 factor is faster, needs a bit of testing.
-+       */
-+      speed = speed * 0xb0;
-+      read_speed = (speed * 3) >> 1;
-+      read_speed = min_t(unsigned, read_speed, 0xffff);
-+
-+      init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE);
-+      cgc.cmd[0] = 0xbb;
-+      cgc.cmd[2] = (read_speed >> 8) & 0xff;
-+      cgc.cmd[3] = read_speed & 0xff;
-+      cgc.cmd[4] = (speed >> 8) & 0xff;
-+      cgc.cmd[5] = speed & 0xff;
-+
-+      return pd->cdi->ops->generic_packet(pd->cdi, &cgc);
-+}
-+
-+/*
-+ * Give me full power, Captain
-+ */
-+static int pkt_adjust_speed(struct pktcdvd_device *pd, int speed)
-+{
-+      disc_information dummy;
-+      int ret;
-+
-+      /*
-+       * FIXME: do proper unified cap page, also, this isn't proper
-+       * Mt Fuji, but I think we can safely assume all drives support
-+       * it. A hell of a lot more than support the GET_PERFORMANCE
-+       * command (besides, we also use the old set speed command,
-+       * not the streaming feature).
-+       */
-+      if ((ret = pkt_set_speed(pd, speed)))
-+              return ret;
-+
-+      /*
-+       * just do something with the disc -- next read will contain the
-+       * maximum speed with this media
-+       */
-+      if ((ret = cdrom_get_disc_info(pd->dev, &dummy)))
-+              return ret;
-+
-+      if ((ret = pkt_get_speed(pd))) {
-+              printk("pktcdvd: failed get speed\n");
-+              return ret;
-+      }
-+
-+      DPRINTK("pktcdvd: speed (R/W) %u/%u\n", (pd->speed * 3) / 2, pd->speed);
-+      return 0;
-+}
-+
-+static int pkt_open_write(struct pktcdvd_device *pd)
-+{
-+      int ret;
-+
-+      if ((ret = pkt_probe_settings(pd))) {
-+              DPRINTK("pktcdvd: %s failed probe\n", pd->name);
-+              return -EIO;
-+      }
-+
-+      if ((ret = pkt_set_write_settings(pd))) {
-+              DPRINTK("pktcdvd: %s failed saving write settings\n", pd->name);
-+              return -EIO;
-+      }
-+
-+      (void) pkt_write_caching(pd, USE_WCACHING);
-+
-+      if ((ret = pkt_adjust_speed(pd, 16))) {
-+              DPRINTK("pktcdvd: %s couldn't set write speed\n", pd->name);
-+              return -EIO;
-+      }
-+      return 0;
-+}
-+
-+/*
-+ * called at open time.
-+ */
-+static int pkt_open_dev(struct pktcdvd_device *pd, int write)
-+{
-+      int ret;
-+      long lba;
-+
-+      if (!pd->dev)
-+              return -ENXIO;
-+
-+      pd->bdev = bdget(kdev_t_to_nr(pd->dev));
-+      if (!pd->bdev) {
-+              printk("pktcdvd: can't find cdrom block device\n");
-+              return -ENXIO;
-+      }
-+
-+      if ((ret = blkdev_get(pd->bdev, FMODE_READ, 0, BDEV_FILE))) {
-+              pd->bdev = NULL;
-+              return ret;
-+      }
-+
-+      if ((ret = cdrom_get_last_written(pd->dev, &lba))) {
-+              printk("pktcdvd: cdrom_get_last_written failed\n");
-+              return ret;
-+      }
-+
-+      pkt_sizes[MINOR(pd->pkt_dev)] = lba << 1;
-+
-+      if (write) {
-+              if ((ret = pkt_open_write(pd)))
-+                      return ret;
-+              pkt_mark_readonly(pd, 0);
-+      } else {
-+              (void) pkt_adjust_speed(pd, 0xff);
-+              pkt_mark_readonly(pd, 1);
-+      }
-+
-+      if (write)
-+              printk("pktcdvd: %lukB available on disc\n", lba << 1);
-+
-+      return 0;
-+}
-+
-+/*
-+ * called when the device is closed. makes sure that the device flushes
-+ * the internal cache before we close.
-+ */
-+static void pkt_release_dev(struct pktcdvd_device *pd, int flush)
-+{
-+      atomic_dec(&pd->refcnt);
-+      if (atomic_read(&pd->refcnt) > 0)
-+              return;
-+
-+      fsync_dev(pd->pkt_dev);
-+
-+      if (flush && pkt_flush_cache(pd))
-+              DPRINTK("pktcdvd: %s not flushing cache\n", pd->name);
-+
-+      if (pd->bdev) {
-+              blkdev_put(pd->bdev, BDEV_FILE);
-+              pd->bdev = NULL;
-+      }
-+}
-+
-+static int pkt_open(struct inode *inode, struct file *file)
-+{
-+      struct pktcdvd_device *pd = NULL;
-+      int ret;
-+
-+      VPRINTK("pktcdvd: entering open\n");
-+
-+      if (MINOR(inode->i_rdev) >= MAX_WRITERS) {
-+              printk("pktcdvd: max %d writers supported\n", MAX_WRITERS);
-+              ret = -ENODEV;
-+              goto out;
-+      }
-+
-+      /*
-+       * either device is not configured, or pktsetup is old and doesn't
-+       * use O_CREAT to create device
-+       */
-+      pd = &pkt_devs[MINOR(inode->i_rdev)];
-+      if (!pd->dev && !(file->f_flags & O_CREAT)) {
-+              VPRINTK("pktcdvd: not configured and O_CREAT not set\n");
-+              ret = -ENXIO;
-+              goto out;
-+      }
-+
-+      atomic_inc(&pd->refcnt);
-+      if (atomic_read(&pd->refcnt) > 1) {
-+              if (file->f_mode & FMODE_WRITE) {
-+                      VPRINTK("pktcdvd: busy open for write\n");
-+                      ret = -EBUSY;
-+                      goto out_dec;
-+              }
-+
-+              /*
-+               * Not first open, everything is already set up
-+               */
-+              return 0;
-+      }
-+
-+      if (((file->f_flags & O_ACCMODE) != O_RDONLY) || !(file->f_flags & O_CREAT)) {
-+              if (pkt_open_dev(pd, file->f_mode & FMODE_WRITE)) {
-+                      ret = -EIO;
-+                      goto out_dec;
-+              }
-+      }
-+
-+      /*
-+       * needed here as well, since ext2 (among others) may change
-+       * the blocksize at mount time
-+       */
-+      set_blocksize(pd->pkt_dev, CD_FRAMESIZE);
-+      return 0;
-+
-+out_dec:
-+      atomic_dec(&pd->refcnt);
-+      if (atomic_read(&pd->refcnt) == 0) {
-+              if (pd->bdev) {
-+                      blkdev_put(pd->bdev, BDEV_FILE);
-+                      pd->bdev = NULL;
-+              }
-+      }
-+out:
-+      VPRINTK("pktcdvd: failed open (%d)\n", ret);
-+      return ret;
-+}
-+
-+static int pkt_close(struct inode *inode, struct file *file)
-+{
-+      struct pktcdvd_device *pd = &pkt_devs[MINOR(inode->i_rdev)];
-+      int ret = 0;
-+
-+      if (pd->dev) {
-+              int flush = !test_bit(PACKET_READONLY, &pd->flags);
-+              pkt_release_dev(pd, flush);
-+      }
-+
-+      return ret;
-+}
-+
-+/*
-+ * pktcdvd i/o elevator parts
-+ */
-+static inline int pkt_bh_rq_ordered(struct buffer_head *bh, struct request *rq,
-+                                  struct list_head *head)
-+{
-+      struct list_head *next;
-+      struct request *next_rq;
-+
-+      next = rq->queue.next;
-+      if (next == head)
-+              return 0;
-+
-+      next_rq = blkdev_entry_to_request(next);
-+      if (next_rq->rq_dev != rq->rq_dev)
-+              return bh->b_rsector > rq->sector;
-+
-+      if (bh->b_rsector < next_rq->sector && bh->b_rsector > rq->sector)
-+              return 1;
-+
-+      if (next_rq->sector > rq->sector)
-+              return 0;
-+
-+      if (bh->b_rsector > rq->sector || bh->b_rsector < next_rq->sector)
-+              return 1;
-+
-+      return 0;
-+}
-+
-+static int pkt_elevator_merge(request_queue_t *q, struct request **req,
-+                            struct list_head *head,
-+                            struct buffer_head *bh, int rw,
-+                            int max_sectors)
-+{
-+      struct list_head *entry = &q->queue_head;
-+      unsigned int count = bh->b_size >> 9, ret = ELEVATOR_NO_MERGE;
-+
-+      if (bh->b_reqnext)
-+              BUG();
-+
-+      VPRINTK("pkt_elevator_merge: rw=%d, ms=%d, bh=%lu, dev=%d\n", rw, max_sectors, bh->b_rsector, bh->b_rdev);
-+
-+      while ((entry = entry->prev) != head) {
-+              struct request *__rq = blkdev_entry_to_request(entry);
-+              if (__rq->waiting)
-+                      continue;
-+              if (__rq->rq_dev != bh->b_rdev)
-+                      continue;
-+              if (!*req && pkt_bh_rq_ordered(bh, __rq, &q->queue_head))
-+                      *req = __rq;
-+              if (__rq->cmd != rw)
-+                      continue;
-+              if (__rq->nr_sectors + count > max_sectors)
-+                      continue;
-+              if (__rq->sector + __rq->nr_sectors == bh->b_rsector) {
-+                      ret = ELEVATOR_BACK_MERGE;
-+                      *req = __rq;
-+                      break;
-+              } else if (__rq->sector - count == bh->b_rsector) {
-+                      ret = ELEVATOR_FRONT_MERGE;
-+                      *req = __rq;
-+                      break;
-+              }
-+#if 0 /* makes sense, chance of two matches probably slim */
-+              else if (*req)
-+                      break;
-+#endif
-+      }
-+      VPRINTK("*req=%p, ret=%d\n", *req, ret);
-+
-+      return ret;
-+}
-+
-+static int pkt_make_request(request_queue_t *q, int rw, struct buffer_head *bh)
-+{
-+      struct pktcdvd_device *pd;
-+      struct buffer_head *new_bh;
-+
-+      if (MINOR(bh->b_rdev) >= MAX_WRITERS) {
-+              printk("pktcdvd: %s out of range\n", kdevname(bh->b_rdev));
-+              goto end_io;
-+      }
-+
-+      pd = &pkt_devs[MINOR(bh->b_rdev)];
-+      if (!pd->dev) {
-+              printk("pktcdvd: request received for non-active pd\n");
-+              goto end_io;
-+      }
-+
-+      /*
-+       * quick remap a READ
-+       */
-+      if (rw == READ || rw == READA) {
-+              down(&pd->cache_sync_mutex);
-+              pkt_flush_writes(pd);
-+              bh->b_rdev = pd->dev;
-+              generic_make_request(rw, bh);
-+              up(&pd->cache_sync_mutex);
-+              return 0;
-+      }
-+
-+      if (!(rw & WRITE))
-+              BUG();
-+
-+      if (test_bit(PACKET_READONLY, &pd->flags)) {
-+              printk("pktcdvd: WRITE for ro device %s (%lu)\n",
-+                      pd->name, bh->b_rsector);
-+              goto end_io;
-+      }
-+
-+      VPRINTK("pkt_make_request: bh:%p block:%ld size:%d\n",
-+              bh, bh->b_blocknr, bh->b_size);
-+
-+      if (bh->b_size != CD_FRAMESIZE) {
-+              printk("pktcdvd: wrong bh size\n");
-+              goto end_io;
-+      }
-+
-+      /*
-+       * This is deadlock safe, since pkt_get_stacked_bh can only
-+       * fail if there are already buffers in flight for this
-+       * packet device. When the in-flight buffers finish, we
-+       * will be woken up and try again.
-+       */
-+      new_bh = kmem_cache_alloc(bh_cachep, GFP_ATOMIC);
-+      while (!new_bh) {
-+              DECLARE_WAITQUEUE(wait, current);
-+
-+              generic_unplug_device(q);
-+
-+              add_wait_queue(&pd_bh_wait, &wait);
-+              set_current_state(TASK_UNINTERRUPTIBLE);
-+
-+              new_bh = pkt_get_stacked_bh(pd);
-+              if (!new_bh)
-+                      schedule();
-+
-+              set_current_state(TASK_RUNNING);
-+              remove_wait_queue(&pd_bh_wait, &wait);
-+      }
-+
-+      new_bh->b_size = bh->b_size;
-+      new_bh->b_list = PKT_BUF_LIST + 1;
-+      new_bh->b_dev = bh->b_dev;
-+      atomic_set(&new_bh->b_count, 1);
-+      new_bh->b_rdev = bh->b_rdev;
-+      new_bh->b_state = bh->b_state;
-+      new_bh->b_page = bh->b_page;
-+      new_bh->b_data = bh->b_data;
-+      new_bh->b_private = bh;
-+      new_bh->b_end_io = pkt_end_io_write_stacked;
-+      new_bh->b_rsector = bh->b_rsector;
-+
-+      return pd->make_request_fn(q, rw, new_bh);
-+
-+end_io:
-+      buffer_IO_error(bh);
-+      return 0;
-+}
-+
-+static void show_requests(request_queue_t *q)
-+{
-+      struct list_head *entry;
-+
-+      spin_lock_irq(&io_request_lock);
-+
-+      list_for_each(entry, &q->queue_head) {
-+              struct request *rq = blkdev_entry_to_request(entry);
-+              int zone = rq->sector & ~127;
-+              int hole;
-+
-+              hole = 0;
-+              if ((rq->sector + rq->nr_sectors - (rq->bhtail->b_size >> 9))
-+                  != rq->bhtail->b_rsector)
-+                      hole = 1;
-+
-+              printk("rq: cmd %d, sector %lu (-> %lu), zone %u, hole %d, nr_sectors %lu\n", rq->cmd, rq->sector, rq->sector + rq->nr_sectors - 1, zone, hole, rq->nr_sectors);
-+      }
-+
-+      spin_unlock_irq(&io_request_lock);
-+}
-+
-+static void sysrq_handle_show_requests(int key, struct pt_regs *pt_regs,
-+              struct kbd_struct *kbd, struct tty_struct *tty)
-+{
-+      /*
-+       * quick hack to show pending requests in /dev/pktcdvd0 queue
-+       */
-+      queue_proc *qp = blk_dev[PACKET_MAJOR].queue;
-+      if (qp) {
-+              request_queue_t *q = qp(MKDEV(PACKET_MAJOR, 0));
-+              if (q)
-+                      show_requests(q);
-+      }
-+}
-+static struct sysrq_key_op sysrq_show_requests_op = {
-+      handler:        sysrq_handle_show_requests,
-+      help_msg:       "showreQuests",
-+      action_msg:     "Show requests",
-+};
-+
-+static void pkt_init_queue(struct pktcdvd_device *pd)
-+{
-+      request_queue_t *q = &pd->cdrw.r_queue;
-+
-+      blk_init_queue(q, pkt_request);
-+      elevator_init(&q->elevator, ELEVATOR_PKTCDVD);
-+      pd->make_request_fn = q->make_request_fn;
-+      blk_queue_make_request(q, pkt_make_request);
-+      blk_queue_headactive(q, 0);
-+      q->front_merge_fn = pkt_front_merge_fn;
-+      q->back_merge_fn = pkt_back_merge_fn;
-+      q->merge_requests_fn = pkt_merge_requests_fn;
-+      q->queuedata = pd;
-+}
-+
-+static int pkt_proc_device(struct pktcdvd_device *pd, char *buf)
-+{
-+      char *b = buf, *msg;
-+      struct list_head *foo;
-+      int i;
-+
-+      b += sprintf(b, "\nWriter %s (%s):\n", pd->name, kdevname(pd->dev));
-+
-+      b += sprintf(b, "\nSettings:\n");
-+      b += sprintf(b, "\tpacket size:\t\t%dkB\n", pd->settings.size / 2);
-+
-+      if (pd->settings.write_type == 0)
-+              msg = "Packet";
-+      else
-+              msg = "Unknown";
-+      b += sprintf(b, "\twrite type:\t\t%s\n", msg);
-+
-+      b += sprintf(b, "\tpacket type:\t\t%s\n", pd->settings.fp ? "Fixed" : "Variable");
-+      b += sprintf(b, "\tlink loss:\t\t%d\n", pd->settings.link_loss);
-+
-+      b += sprintf(b, "\ttrack mode:\t\t%d\n", pd->settings.track_mode);
-+
-+      if (pd->settings.block_mode == PACKET_BLOCK_MODE1)
-+              msg = "Mode 1";
-+      else if (pd->settings.block_mode == PACKET_BLOCK_MODE2)
-+              msg = "Mode 2";
-+      else
-+              msg = "Unknown";
-+      b += sprintf(b, "\tblock mode:\t\t%s\n", msg);
-+
-+      b += sprintf(b, "\nStatistics:\n");
-+      b += sprintf(b, "\tbuffers started:\t%lu\n", pd->stats.bh_s);
-+      b += sprintf(b, "\tbuffers ended:\t\t%lu\n", pd->stats.bh_e);
-+      b += sprintf(b, "\tsectors written:\t%lu\n", pd->stats.secs_w);
-+      b += sprintf(b, "\tsectors read:\t\t%lu\n", pd->stats.secs_r);
-+      b += sprintf(b, "\tbuffer cache hits:\t%lu\n", pd->stats.bh_cache_hits);
-+      b += sprintf(b, "\tpage cache hits:\t%lu\n", pd->stats.page_cache_hits);
-+
-+      b += sprintf(b, "\nMisc:\n");
-+      b += sprintf(b, "\treference count:\t%d\n", atomic_read(&pd->refcnt));
-+      b += sprintf(b, "\tflags:\t\t\t0x%lx\n", pd->flags);
-+      b += sprintf(b, "\twrite speed:\t\t%ukB/s\n", pd->speed * 150);
-+      b += sprintf(b, "\tstart offset:\t\t%lu\n", pd->offset);
-+      b += sprintf(b, "\tmode page offset:\t%u\n", pd->mode_offset);
-+
-+      b += sprintf(b, "\nQueue state:\n");
-+      b += sprintf(b, "\tfree buffers:\t\t%u\n", atomic_read(&pd->cdrw.free_bh));
-+      b += sprintf(b, "\trequest active:\t\t%s\n", pd->rq ? "yes" : "no");
-+      b += sprintf(b, "\twrite rq depth:\t\t%d\n", atomic_read(&pd->wrqcnt));
-+
-+      spin_lock_irq(&io_request_lock);
-+      i = 0;
-+      list_for_each(foo, &pd->cdrw.r_queue.queue_head)
-+              i++;
-+      spin_unlock_irq(&io_request_lock);
-+      b += sprintf(b, "\tqueue requests:\t\t%u\n", i);
-+
-+      return b - buf;
-+}
-+
-+static int pkt_read_proc(char *page, char **start, off_t off, int count,
-+                       int *eof, void *data)
-+{
-+      struct pktcdvd_device *pd = data;
-+      char *buf = page;
-+      int len;
-+
-+      len = pkt_proc_device(pd, buf);
-+      buf += len;
-+
-+      if (len <= off + count)
-+              *eof = 1;
-+
-+      *start = page + off;
-+      len -= off;
-+      if (len > count)
-+              len = count;
-+      if (len < 0)
-+              len = 0;
-+
-+      return len;
-+}
-+
-+static int pkt_new_dev(struct pktcdvd_device *pd, kdev_t dev)
-+{
-+      struct cdrom_device_info *cdi;
-+      request_queue_t *q;
-+      int i;
-+
-+      for (i = 0; i < MAX_WRITERS; i++) {
-+              if (pkt_devs[i].dev == dev) {
-+                      printk("pktcdvd: %s already setup\n", kdevname(dev));
-+                      return -EBUSY;
-+              }
-+      }
-+
-+      for (i = 0; i < MAX_WRITERS; i++)
-+              if (pd == &pkt_devs[i])
-+                      break;
-+      BUG_ON(i == MAX_WRITERS);
-+
-+      cdi = cdrom_find_device(dev);
-+      if (cdi == NULL) {
-+              printk("pktcdvd: %s is not a CD-ROM\n", kdevname(dev));
-+              return -ENXIO;
-+      }
-+
-+      MOD_INC_USE_COUNT;
-+
-+      memset(pd, 0, sizeof(struct pktcdvd_device));
-+      atomic_set(&pd->cdrw.free_bh, 0);
-+
-+      spin_lock_init(&pd->lock);
-+      if (pkt_grow_bhlist(pd, PACKET_MAX_SIZE) < PACKET_MAX_SIZE) {
-+              MOD_DEC_USE_COUNT;
-+              printk("pktcdvd: not enough memory for buffers\n");
-+              return -ENOMEM;
-+      }
-+
-+      pd->stacked_bhcnt = 0;
-+      if (!pkt_grow_stacked_bhlist(pd)) {
-+              MOD_DEC_USE_COUNT;
-+              printk("pktcdvd: not enough memory for buffer heads\n");
-+              return -ENOMEM;
-+      }
-+
-+      set_blocksize(dev, CD_FRAMESIZE);
-+      pd->cdi = cdi;
-+      pd->dev = dev;
-+      pd->bdev = NULL;
-+      pd->pkt_dev = MKDEV(PACKET_MAJOR, i);
-+      sprintf(pd->name, "pktcdvd%d", i);
-+      atomic_set(&pd->refcnt, 0);
-+      atomic_set(&pd->wrqcnt, 0);
-+      init_MUTEX(&pd->cache_sync_mutex);
-+      pd->unflushed_writes = 0;
-+      init_waitqueue_head(&pd->wqueue);
-+      init_completion(&pd->cdrw.thr_compl);
-+
-+      /*
-+       * store device merge functions (SCSI uses their own to build
-+       * scatter-gather tables)
-+       */
-+      q = blk_get_queue(dev);
-+      pkt_init_queue(pd);
-+      pd->cdrw.front_merge_fn = q->front_merge_fn;
-+      pd->cdrw.back_merge_fn = q->back_merge_fn;
-+      pd->cdrw.merge_requests_fn = q->merge_requests_fn;
-+      pd->cdrw.queuedata = q->queuedata;
-+
-+      pd->cdrw.pid = kernel_thread(kcdrwd, pd, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
-+      if (pd->cdrw.pid < 0) {
-+              MOD_DEC_USE_COUNT;
-+              printk("pktcdvd: can't start kernel thread\n");
-+              blk_cleanup_queue(&pd->cdrw.r_queue);
-+              pkt_shrink_stacked_bhlist(pd);
-+              pkt_shrink_bhlist(pd, PACKET_MAX_SIZE);
-+              memset(pd, 0, sizeof(*pd));
-+              return -EBUSY;
-+      }
-+
-+      create_proc_read_entry(pd->name, 0, pkt_proc, pkt_read_proc, pd);
-+      DPRINTK("pktcdvd: writer %s sucessfully registered\n", cdi->name);
-+      return 0;
-+}
-+
-+/*
-+ * arg contains file descriptor of CD-ROM device.
-+ */
-+static int pkt_setup_dev(struct pktcdvd_device *pd, unsigned int arg)
-+{
-+      struct inode *inode;
-+      struct file *file;
-+      int ret;
-+
-+      if ((file = fget(arg)) == NULL) {
-+              printk("pktcdvd: bad file descriptor passed\n");
-+              return -EBADF;
-+      }
-+
-+      ret = -EINVAL;
-+      if ((inode = file->f_dentry->d_inode) == NULL) {
-+              printk("pktcdvd: huh? file descriptor contains no inode?\n");
-+              goto out;
-+      }
-+      ret = -ENOTBLK;
-+      if (!S_ISBLK(inode->i_mode)) {
-+              printk("pktcdvd: device is not a block device (duh)\n");
-+              goto out;
-+      }
-+      ret = -EROFS;
-+      if (IS_RDONLY(inode)) {
-+              printk("pktcdvd: Can't write to read-only dev\n");
-+              goto out;
-+      }
-+      if ((ret = pkt_new_dev(pd, inode->i_rdev))) {
-+              printk("pktcdvd: all booked up\n");
-+              goto out;
-+      }
-+
-+      atomic_inc(&pd->refcnt);
-+
-+out:
-+      fput(file);
-+      return ret;
-+}
-+
-+static int pkt_remove_dev(struct pktcdvd_device *pd)
-+{
-+      int ret;
-+
-+      if (pd->cdrw.pid >= 0) {
-+              ret = kill_proc(pd->cdrw.pid, SIGKILL, 1);
-+              if (ret) {
-+                      printk("pkt_exit: can't kill kernel thread\n");
-+                      return ret;
-+              }
-+              wait_for_completion(&pd->cdrw.thr_compl);
-+      }
-+
-+      /*
-+       * will also invalidate buffers for CD-ROM
-+       */
-+      invalidate_device(pd->pkt_dev, 1);
-+
-+      pkt_shrink_stacked_bhlist(pd);
-+      if ((ret = pkt_shrink_bhlist(pd, PACKET_MAX_SIZE)) != PACKET_MAX_SIZE)
-+              printk("pktcdvd: leaked %d buffers\n", PACKET_MAX_SIZE - ret);
-+
-+      blk_cleanup_queue(&pd->cdrw.r_queue);
-+      remove_proc_entry(pd->name, pkt_proc);
-+      DPRINTK("pktcdvd: writer %s unregistered\n", pd->cdi->name);
-+      memset(pd, 0, sizeof(struct pktcdvd_device));
-+      MOD_DEC_USE_COUNT;
-+      return 0;
-+}
-+
-+static int pkt_media_change(kdev_t dev)
-+{
-+      struct pktcdvd_device *pd = pkt_find_dev(dev);
-+      if (!pd)
-+              return 0;
-+      return cdrom_media_changed(pd->dev);
-+}
-+
-+static int pkt_ioctl(struct inode *inode, struct file *file,
-+                   unsigned int cmd, unsigned long arg)
-+{
-+      struct pktcdvd_device *pd = &pkt_devs[MINOR(inode->i_rdev)];
-+
-+      VPRINTK("pkt_ioctl: cmd %d, dev %x\n", cmd, inode->i_rdev);
-+
-+      if ((cmd != PACKET_SETUP_DEV) && !pd->dev) {
-+              DPRINTK("pktcdvd: dev not setup\n");
-+              return -ENXIO;
-+      }
-+
-+      switch (cmd) {
-+      case PACKET_GET_STATS:
-+              if (copy_to_user(&arg, &pd->stats, sizeof(struct packet_stats)))
-+                      return -EFAULT;
-+              break;
-+
-+      case PACKET_SETUP_DEV:
-+              if (!capable(CAP_SYS_ADMIN))
-+                      return -EPERM;
-+              if (pd->dev) {
-+                      printk("pktcdvd: dev already setup\n");
-+                      return -EBUSY;
-+              }
-+              return pkt_setup_dev(pd, arg);
-+
-+      case PACKET_TEARDOWN_DEV:
-+              if (!capable(CAP_SYS_ADMIN))
-+                      return -EPERM;
-+              if (atomic_read(&pd->refcnt) != 1)
-+                      return -EBUSY;
-+              return pkt_remove_dev(pd);
-+
-+      case BLKGETSIZE:
-+              return put_user(blk_size[PACKET_MAJOR][MINOR(inode->i_rdev)] << 1, (unsigned long *)arg);
-+
-+      case BLKGETSIZE64:
-+              return put_user((u64)blk_size[PACKET_MAJOR][MINOR(inode->i_rdev)] << 10,
-+                              (u64 *)arg);
-+
-+      case BLKROSET:
-+              if (capable(CAP_SYS_ADMIN))
-+                      set_bit(PACKET_READONLY, &pd->flags);
-+      case BLKROGET:
-+      case BLKSSZGET:
-+      case BLKRASET:
-+      case BLKRAGET:
-+      case BLKFLSBUF:
-+              if (!pd->bdev)
-+                      return -ENXIO;
-+              return blk_ioctl(inode->i_rdev, cmd, arg);
-+
-+      /*
-+       * forward selected CDROM ioctls to CD-ROM, for UDF
-+       */
-+      case CDROMMULTISESSION:
-+      case CDROMREADTOCENTRY:
-+      case CDROM_LAST_WRITTEN:
-+      case CDROM_SEND_PACKET:
-+      case SCSI_IOCTL_SEND_COMMAND:
-+              if (!pd->bdev)
-+                      return -ENXIO;
-+              return ioctl_by_bdev(pd->bdev, cmd, arg);
-+
-+      default:
-+              printk("pktcdvd: Unknown ioctl for %s (%x)\n", pd->name, cmd);
-+              return -ENOTTY;
-+      }
-+
-+      return 0;
-+}
-+
-+static struct block_device_operations pktcdvd_ops = {
-+      owner:                  THIS_MODULE,
-+      open:                   pkt_open,
-+      release:                pkt_close,
-+      ioctl:                  pkt_ioctl,
-+      check_media_change:     pkt_media_change,
-+};
-+
-+int pkt_init(void)
-+{
-+      int i;
-+
-+      devfs_register(NULL, "pktcdvd", DEVFS_FL_DEFAULT, PACKET_MAJOR, 0,
-+                     S_IFBLK | S_IRUSR | S_IWUSR, &pktcdvd_ops, NULL);
-+      if (devfs_register_blkdev(PACKET_MAJOR, "pktcdvd", &pktcdvd_ops)) {
-+              printk("unable to register pktcdvd device\n");
-+              return -EIO;
-+      }
-+
-+      pkt_sizes = kmalloc(MAX_WRITERS * sizeof(int), GFP_KERNEL);
-+      if (pkt_sizes == NULL)
-+              goto err;
-+
-+      pkt_blksize = kmalloc(MAX_WRITERS * sizeof(int), GFP_KERNEL);
-+      if (pkt_blksize == NULL)
-+              goto err;
-+
-+      pkt_readahead = kmalloc(MAX_WRITERS * sizeof(int), GFP_KERNEL);
-+      if (pkt_readahead == NULL)
-+              goto err;
-+
-+      pkt_devs = kmalloc(MAX_WRITERS * sizeof(struct pktcdvd_device), GFP_KERNEL);
-+      if (pkt_devs == NULL)
-+              goto err;
-+
-+      memset(pkt_devs, 0, MAX_WRITERS * sizeof(struct pktcdvd_device));
-+      memset(pkt_sizes, 0, MAX_WRITERS * sizeof(int));
-+      memset(pkt_blksize, 0, MAX_WRITERS * sizeof(int));
-+
-+      for (i = 0; i < MAX_WRITERS; i++)
-+              pkt_readahead[i] = vm_max_readahead;
-+
-+      blk_size[PACKET_MAJOR] = pkt_sizes;
-+      blksize_size[PACKET_MAJOR] = pkt_blksize;
-+      max_readahead[PACKET_MAJOR] = pkt_readahead;
-+      read_ahead[PACKET_MAJOR] = 128;
-+      set_blocksize(MKDEV(PACKET_MAJOR, 0), CD_FRAMESIZE);
-+
-+      blk_dev[PACKET_MAJOR].queue = pkt_get_queue;
-+
-+      pkt_proc = proc_mkdir("pktcdvd", proc_root_driver);
-+
-+      register_sysrq_key('q', &sysrq_show_requests_op);
-+
-+      DPRINTK("pktcdvd: %s\n", VERSION_CODE);
-+      return 0;
-+
-+err:
-+      printk("pktcdvd: out of memory\n");
-+      devfs_unregister(devfs_find_handle(NULL, "pktcdvd", 0, 0,
-+                       DEVFS_SPECIAL_BLK, 0));
-+      devfs_unregister_blkdev(PACKET_MAJOR, "pktcdvd");
-+      kfree(pkt_devs);
-+      kfree(pkt_sizes);
-+      kfree(pkt_blksize);
-+      kfree(pkt_readahead);
-+      return -ENOMEM;
-+}
-+
-+void pkt_exit(void)
-+{
-+      unregister_sysrq_key('q', &sysrq_show_requests_op);
-+
-+      devfs_unregister(devfs_find_handle(NULL, "pktcdvd", 0, 0,
-+                       DEVFS_SPECIAL_BLK, 0));
-+      devfs_unregister_blkdev(PACKET_MAJOR, "pktcdvd");
-+      blk_dev[PACKET_MAJOR].queue = NULL;
-+
-+      remove_proc_entry("pktcdvd", proc_root_driver);
-+      kfree(pkt_sizes);
-+      kfree(pkt_blksize);
-+      kfree(pkt_devs);
-+      kfree(pkt_readahead);
-+}
-+
-+MODULE_DESCRIPTION("Packet writing layer for CD/DVD drives");
-+MODULE_AUTHOR("Jens Axboe <axboe@suse.de>");
-+MODULE_LICENSE("GPL");
-+
-+module_init(pkt_init);
-+module_exit(pkt_exit);
-diff -u -r -N ../../linus/2.4/linux/drivers/cdrom/Makefile linux/drivers/cdrom/Makefile
---- ../../linus/2.4/linux/drivers/cdrom/Makefile       Tue Aug  6 21:14:34 2002
-+++ linux/drivers/cdrom/Makefile       Tue Aug  6 21:22:09 2002
-@@ -27,6 +27,7 @@
- obj-$(CONFIG_BLK_DEV_IDECD)   +=              cdrom.o
- obj-$(CONFIG_BLK_DEV_SR)      +=              cdrom.o
- obj-$(CONFIG_PARIDE_PCD)      +=              cdrom.o
-+obj-$(CONFIG_CDROM_PKTCDVD)   +=              cdrom.o
- obj-$(CONFIG_AZTCD)           += aztcd.o
- obj-$(CONFIG_CDU31A)          += cdu31a.o     cdrom.o
-diff -u -r -N ../../linus/2.4/linux/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
---- ../../linus/2.4/linux/drivers/ide/ide-cd.c Tue Aug  6 21:14:39 2002
-+++ linux/drivers/ide/ide-cd.c Tue Aug  6 21:22:36 2002
-@@ -292,9 +292,11 @@
-  *                      correctly reporting tray status -- from
-  *                      Michael D Johnson <johnsom@orst.edu>
-  *
-+ * 4.99                       - Added write support for packet writing.
-+ *
-  *************************************************************************/
-  
--#define IDECD_VERSION "4.59"
-+#define IDECD_VERSION "4.99"
- #include <linux/config.h>
- #include <linux/module.h>
-@@ -526,7 +528,7 @@
-       memset(pc, 0, sizeof(struct packet_command));
-       pc->c[0] = GPCMD_REQUEST_SENSE;
--      pc->c[4] = pc->buflen = 18;
-+      pc->c[4] = pc->buflen = 14;
-       pc->buffer = (char *) sense;
-       pc->sense = (struct request_sense *) failed_command;
-@@ -640,7 +642,7 @@
-                       cdrom_saw_media_change (drive);
-                       /* Fail the request. */
--                      printk ("%s: tray open\n", drive->name);
-+                      /* printk ("%s: tray open\n", drive->name); */
-                       cdrom_end_request (0, drive);
-               } else if (sense_key == UNIT_ATTENTION) {
-                       /* Media change. */
-@@ -1200,6 +1202,8 @@
-        * partitions not really working, but better check anyway...
-        */
-       if (rq->cmd == nxt->cmd && rq->rq_dev == nxt->rq_dev) {
-+              if (rq->cmd == WRITE)
-+                      printk("merged write\n");
-               rq->nr_sectors += nxt->nr_sectors;
-               rq->hard_nr_sectors += nxt->nr_sectors;
-               rq->bhtail->b_reqnext = nxt->bh;
-@@ -2497,6 +2501,12 @@
- static
- void ide_cdrom_release_real (struct cdrom_device_info *cdi)
- {
-+      struct cdrom_generic_command cgc;
-+
-+      init_cdrom_command(&cgc, NULL, 0, CGC_DATA_NONE);
-+      cgc.cmd[0] = GPCMD_FLUSH_CACHE;
-+      cgc.quiet = 1;
-+      (void) ide_cdrom_packet(cdi, &cgc);
- }
-@@ -2685,15 +2695,10 @@
-               printk(" %dX", CDROM_CONFIG_FLAGS(drive)->max_speed);
-       printk(" %s", CDROM_CONFIG_FLAGS(drive)->dvd ? "DVD-ROM" : "CD-ROM");
--      if (CDROM_CONFIG_FLAGS (drive)->dvd_r|CDROM_CONFIG_FLAGS (drive)->dvd_ram)
--              printk (" DVD%s%s", 
--              (CDROM_CONFIG_FLAGS (drive)->dvd_r)? "-R" : "", 
--              (CDROM_CONFIG_FLAGS (drive)->dvd_ram)? "-RAM" : "");
--
--        if (CDROM_CONFIG_FLAGS (drive)->cd_r|CDROM_CONFIG_FLAGS (drive)->cd_rw) 
--              printk (" CD%s%s", 
--              (CDROM_CONFIG_FLAGS (drive)->cd_r)? "-R" : "", 
--              (CDROM_CONFIG_FLAGS (drive)->cd_rw)? "/RW" : "");
-+      if (CDROM_CONFIG_FLAGS(drive)->dvd_r || CDROM_CONFIG_FLAGS(drive)->dvd_ram)
-+              printk (" DVD-R%s", (CDROM_CONFIG_FLAGS (drive)->dvd_ram)? "AM" : "");
-+      if (CDROM_CONFIG_FLAGS(drive)->cd_r ||CDROM_CONFIG_FLAGS(drive)->cd_rw)
-+              printk (" CD-R%s", (CDROM_CONFIG_FLAGS (drive)->cd_rw)? "/RW" : "");
-         if (CDROM_CONFIG_FLAGS (drive)->is_changer) 
-               printk (" changer w/%d slots", nslots);
-@@ -2716,7 +2721,7 @@
-       int major = HWIF(drive)->major;
-       int minor = drive->select.b.unit << PARTN_BITS;
--      ide_add_setting(drive,  "breada_readahead",     SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 2, &read_ahead[major], NULL);
-+      ide_add_setting(drive,  "breada_readahead",     SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 1024, &read_ahead[major], NULL);
-       ide_add_setting(drive,  "file_readahead",       SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, INT_MAX, 1, 1024, &max_readahead[major][minor], NULL);
-       ide_add_setting(drive,  "max_kb_per_request",   SETTING_RW, BLKSECTGET, BLKSECTSET, TYPE_INTA, 1, 255, 1, 2, &max_sectors[major][minor], NULL);
-       ide_add_setting(drive,  "dsc_overlap",          SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->dsc_overlap, NULL);
-@@ -2733,7 +2738,7 @@
-       /*
-        * default to read-only always and fix latter at the bottom
-        */
--      set_device_ro(MKDEV(HWIF(drive)->major, minor), 1);
-+      set_device_ro(MKDEV(HWIF(drive)->major, minor), 0);
-       set_blocksize(MKDEV(HWIF(drive)->major, minor), CD_FRAMESIZE);
-       drive->special.all      = 0;
-diff -u -r -N ../../linus/2.4/linux/drivers/scsi/Config.in linux/drivers/scsi/Config.in
---- ../../linus/2.4/linux/drivers/scsi/Config.in       Tue Aug  6 21:15:02 2002
-+++ linux/drivers/scsi/Config.in       Tue Aug  6 21:23:16 2002
-@@ -20,10 +20,6 @@
- comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
--#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
--   bool '  Enable extra checks in new queueing code' CONFIG_SCSI_DEBUG_QUEUES
--#fi
--
- bool '  Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN
-   
- bool '  Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
-diff -u -r -N ../../linus/2.4/linux/drivers/scsi/scsi_merge.c linux/drivers/scsi/scsi_merge.c
---- ../../linus/2.4/linux/drivers/scsi/scsi_merge.c    Tue Aug  6 21:15:21 2002
-+++ linux/drivers/scsi/scsi_merge.c    Tue Aug  6 21:23:18 2002
-@@ -71,11 +71,6 @@
-  */
- #define DMA_SEGMENT_SIZE_LIMITED
--#ifdef CONFIG_SCSI_DEBUG_QUEUES
--/*
-- * Enable a bunch of additional consistency checking.   Turn this off
-- * if you are benchmarking.
-- */
- static int dump_stats(struct request *req,
-                     int use_clustering,
-                     int dma_host,
-@@ -100,22 +95,6 @@
-       panic("Ththththaats all folks.  Too dangerous to continue.\n");
- }
--
--/*
-- * Simple sanity check that we will use for the first go around
-- * in order to ensure that we are doing the counting correctly.
-- * This can be removed for optimization.
-- */
--#define SANITY_CHECK(req, _CLUSTER, _DMA)                             \
--    if( req->nr_segments != __count_segments(req, _CLUSTER, _DMA, NULL) )     \
--    {                                                                 \
--      printk("Incorrect segment count at 0x%p", current_text_addr()); \
--      dump_stats(req, _CLUSTER, _DMA, __count_segments(req, _CLUSTER, _DMA, NULL)); \
--    }
--#else
--#define SANITY_CHECK(req, _CLUSTER, _DMA)
--#endif
--
- static void dma_exhausted(Scsi_Cmnd * SCpnt, int i)
- {
-       int jj;
-@@ -532,7 +511,6 @@
-                    int max_segments)                                  \
- {                                                                     \
-     int ret;                                                          \
--    SANITY_CHECK(req, _CLUSTER, _DMA);                                        \
-     ret =  __scsi_ ## _BACK_FRONT ## _merge_fn(q,                     \
-                                              req,                     \
-                                              bh,                      \
-@@ -742,7 +720,6 @@
-                    int max_segments)                  \
- {                                                     \
-     int ret;                                          \
--    SANITY_CHECK(req, _CLUSTER, _DMA);                        \
-     ret =  __scsi_merge_requests_fn(q, req, next, max_segments, _CLUSTER, _DMA); \
-     return ret;                                               \
- }
-@@ -829,11 +806,7 @@
-       /*
-        * First we need to know how many scatter gather segments are needed.
-        */
--      if (!sg_count_valid) {
--              count = __count_segments(req, use_clustering, dma_host, NULL);
--      } else {
--              count = req->nr_segments;
--      }
-+      count = __count_segments(req, use_clustering, dma_host, NULL);
-       /*
-        * If the dma pool is nearly empty, then queue a minimal request
-@@ -949,9 +922,7 @@
-        */
-       if (count != SCpnt->use_sg) {
-               printk("Incorrect number of segments after building list\n");
--#ifdef CONFIG_SCSI_DEBUG_QUEUES
-               dump_stats(req, use_clustering, dma_host, count);
--#endif
-       }
-       if (!dma_host) {
-               return 1;
-diff -u -r -N ../../linus/2.4/linux/drivers/scsi/sr.c linux/drivers/scsi/sr.c
---- ../../linus/2.4/linux/drivers/scsi/sr.c    Tue Aug  6 21:15:22 2002
-+++ linux/drivers/scsi/sr.c    Tue Aug  6 21:23:18 2002
-@@ -28,12 +28,16 @@
-  *       Modified by Jens Axboe <axboe@suse.de> - support DVD-RAM
-  *     transparently and loose the GHOST hack
-  *
-+ *          Modified by Jens Axboe <axboe@suse.de> - support packet writing
-+ *          through generic packet layer.
-+ *
-  *     Modified by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
-  *     check resource allocation in sr_init and some cleanups
-  *
-  */
- #include <linux/module.h>
-+#include <linux/config.h>
- #include <linux/fs.h>
- #include <linux/kernel.h>
-@@ -716,7 +720,7 @@
-       cmd[2] = 0x2a;
-       cmd[4] = 128;
-       cmd[3] = cmd[5] = 0;
--      rc = sr_do_ioctl(i, cmd, buffer, 128, 1, SCSI_DATA_READ, NULL);
-+      rc = sr_do_ioctl(i, cmd, buffer, 128, 1, SCSI_DATA_READ, NULL, SR_TIMEOUT);
-       if (rc) {
-               /* failed, drive doesn't have capabilities mode page */
-@@ -748,16 +752,13 @@
-       if ((buffer[n + 2] & 0x8) == 0)
-               /* not a DVD drive */
-               scsi_CDs[i].cdi.mask |= CDC_DVD;
--      if ((buffer[n + 3] & 0x20) == 0) {
-+      if ((buffer[n + 3] & 0x20) == 0)
-               /* can't write DVD-RAM media */
-               scsi_CDs[i].cdi.mask |= CDC_DVD_RAM;
--      } else {
--              scsi_CDs[i].device->writeable = 1;
--      }
-       if ((buffer[n + 3] & 0x10) == 0)
-               /* can't write DVD-R media */
-               scsi_CDs[i].cdi.mask |= CDC_DVD_R;
--      if ((buffer[n + 3] & 0x2) == 0)
-+      if ((buffer[n + 3] & 0x02) == 0)
-               /* can't write CD-RW media */
-               scsi_CDs[i].cdi.mask |= CDC_CD_RW;
-       if ((buffer[n + 3] & 0x1) == 0)
-@@ -777,6 +778,10 @@
-       /*else    I don't think it can close its tray
-          scsi_CDs[i].cdi.mask |= CDC_CLOSE_TRAY; */
-+      if (~scsi_CDs[i].cdi.mask & (CDC_DVD_RAM | CDC_CD_RW))
-+              /* can write to DVD-RAM or CD-RW */
-+              scsi_CDs[i].device->writeable = 1;
-+
-       scsi_free(buffer, 512);
- }
-@@ -792,7 +797,10 @@
-       if (device->scsi_level <= SCSI_2)
-               cgc->cmd[1] |= device->lun << 5;
--      cgc->stat = sr_do_ioctl(MINOR(cdi->dev), cgc->cmd, cgc->buffer, cgc->buflen, cgc->quiet, cgc->data_direction, cgc->sense);
-+      if (cgc->timeout <= 0)
-+              cgc->timeout = 5 * HZ;
-+
-+      cgc->stat = sr_do_ioctl(MINOR(cdi->dev), cgc->cmd, cgc->buffer, cgc->buflen, cgc->quiet, cgc->data_direction, cgc->sense, cgc->timeout);
-       return cgc->stat;
- }
-diff -u -r -N ../../linus/2.4/linux/drivers/scsi/sr.h linux/drivers/scsi/sr.h
---- ../../linus/2.4/linux/drivers/scsi/sr.h    Tue Aug  6 21:15:22 2002
-+++ linux/drivers/scsi/sr.h    Tue Aug  6 21:23:18 2002
-@@ -36,7 +36,7 @@
- extern Scsi_CD *scsi_CDs;
--int sr_do_ioctl(int, unsigned char *, void *, unsigned, int, int, struct request_sense *);
-+int sr_do_ioctl(int, unsigned char *, void *, unsigned, int, int, struct request_sense *, int);
- int sr_lock_door(struct cdrom_device_info *, int);
- int sr_tray_move(struct cdrom_device_info *, int);
-diff -u -r -N ../../linus/2.4/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
---- ../../linus/2.4/linux/drivers/scsi/sr_ioctl.c      Tue Aug  6 21:15:22 2002
-+++ linux/drivers/scsi/sr_ioctl.c      Tue Aug  6 21:23:18 2002
-@@ -68,14 +68,14 @@
-       sr_cmd[6] = trk1_te.cdte_addr.msf.minute;
-       sr_cmd[7] = trk1_te.cdte_addr.msf.second;
-       sr_cmd[8] = trk1_te.cdte_addr.msf.frame;
--      return sr_do_ioctl(MINOR(cdi->dev), sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL);
-+      return sr_do_ioctl(MINOR(cdi->dev), sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL, IOCTL_TIMEOUT);
- }
- /* We do our own retries because we want to know what the specific
-    error code is.  Normally the UNIT_ATTENTION code will automatically
-    clear after one error */
--int sr_do_ioctl(int target, unsigned char *sr_cmd, void *buffer, unsigned buflength, int quiet, int readwrite, struct request_sense *sense)
-+int sr_do_ioctl(int target, unsigned char *sr_cmd, void *buffer, unsigned buflength, int quiet, int readwrite, struct request_sense *sense, int timeout)
- {
-       Scsi_Request *SRpnt;
-       Scsi_Device *SDev;
-@@ -109,7 +109,7 @@
-       scsi_wait_req(SRpnt, (void *) sr_cmd, (void *) buffer, buflength,
--                    IOCTL_TIMEOUT, IOCTL_RETRIES);
-+                    timeout, IOCTL_RETRIES);
-       req = &SRpnt->sr_request;
-       if (SRpnt->sr_buffer && req->buffer && SRpnt->sr_buffer != req->buffer) {
-@@ -198,7 +198,7 @@
-       sr_cmd[1] = (scsi_CDs[minor].device->scsi_level <= SCSI_2) ?
-                   ((scsi_CDs[minor].device->lun) << 5) : 0;
-       sr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
--      return sr_do_ioctl(minor, sr_cmd, NULL, 0, 1, SCSI_DATA_NONE, NULL);
-+      return sr_do_ioctl(minor, sr_cmd, NULL, 0, 1, SCSI_DATA_NONE, NULL, IOCTL_TIMEOUT);
- }
- int sr_tray_move(struct cdrom_device_info *cdi, int pos)
-@@ -211,7 +211,7 @@
-       sr_cmd[2] = sr_cmd[3] = sr_cmd[5] = 0;
-       sr_cmd[4] = (pos == 0) ? 0x03 /* close */ : 0x02 /* eject */ ;
--      return sr_do_ioctl(MINOR(cdi->dev), sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL);
-+      return sr_do_ioctl(MINOR(cdi->dev), sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL, IOCTL_TIMEOUT);
- }
- int sr_lock_door(struct cdrom_device_info *cdi, int lock)
-@@ -289,7 +289,7 @@
-       sr_cmd[8] = 24;
-       sr_cmd[9] = 0;
--      result = sr_do_ioctl(MINOR(cdi->dev), sr_cmd, buffer, 24, 0, SCSI_DATA_READ, NULL);
-+      result = sr_do_ioctl(MINOR(cdi->dev), sr_cmd, buffer, 24, 0, SCSI_DATA_READ, NULL, IOCTL_TIMEOUT);
-       memcpy(mcn->medium_catalog_number, buffer + 9, 13);
-       mcn->medium_catalog_number[13] = 0;
-@@ -319,7 +319,7 @@
-       sr_cmd[2] = (speed >> 8) & 0xff;        /* MSB for speed (in kbytes/sec) */
-       sr_cmd[3] = speed & 0xff;       /* LSB */
--      if (sr_do_ioctl(MINOR(cdi->dev), sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL))
-+      if (sr_do_ioctl(MINOR(cdi->dev), sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL, IOCTL_TIMEOUT))
-               return -EIO;
-       return 0;
- }
-@@ -349,7 +349,7 @@
-                       sr_cmd[2] = sr_cmd[3] = sr_cmd[4] = sr_cmd[5] = 0;
-                       sr_cmd[8] = 12;         /* LSB of length */
--                      result = sr_do_ioctl(target, sr_cmd, buffer, 12, 1, SCSI_DATA_READ, NULL);
-+                      result = sr_do_ioctl(target, sr_cmd, buffer, 12, 1, SCSI_DATA_READ, NULL, IOCTL_TIMEOUT);
-                       tochdr->cdth_trk0 = buffer[2];
-                       tochdr->cdth_trk1 = buffer[3];
-@@ -369,7 +369,7 @@
-                       sr_cmd[6] = tocentry->cdte_track;
-                       sr_cmd[8] = 12;         /* LSB of length */
--                      result = sr_do_ioctl(target, sr_cmd, buffer, 12, 0, SCSI_DATA_READ, NULL);
-+                      result = sr_do_ioctl(target, sr_cmd, buffer, 12, 0, SCSI_DATA_READ, NULL, IOCTL_TIMEOUT);
-                       tocentry->cdte_ctrl = buffer[5] & 0xf;
-                       tocentry->cdte_adr = buffer[5] >> 4;
-@@ -396,7 +396,7 @@
-               sr_cmd[7] = ti->cdti_trk1;
-               sr_cmd[8] = ti->cdti_ind1;
--              result = sr_do_ioctl(target, sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL);
-+              result = sr_do_ioctl(target, sr_cmd, NULL, 0, 0, SCSI_DATA_NONE, NULL, IOCTL_TIMEOUT);
-               if (result == -EDRIVE_CANT_DO_THIS)
-                       result = sr_fake_playtrkind(cdi, ti);
-@@ -462,7 +462,7 @@
-               cmd[9] = 0x10;
-               break;
-       }
--      return sr_do_ioctl(minor, cmd, dest, blksize, 0, SCSI_DATA_READ, NULL);
-+      return sr_do_ioctl(minor, cmd, dest, blksize, 0, SCSI_DATA_READ, NULL, IOCTL_TIMEOUT);
- }
- /*
-@@ -501,7 +501,7 @@
-       cmd[4] = (unsigned char) (lba >> 8) & 0xff;
-       cmd[5] = (unsigned char) lba & 0xff;
-       cmd[8] = 1;
--      rc = sr_do_ioctl(minor, cmd, dest, blksize, 0, SCSI_DATA_READ, NULL);
-+      rc = sr_do_ioctl(minor, cmd, dest, blksize, 0, SCSI_DATA_READ, NULL, IOCTL_TIMEOUT);
-       return rc;
- }
-diff -u -r -N ../../linus/2.4/linux/drivers/scsi/sr_vendor.c linux/drivers/scsi/sr_vendor.c
---- ../../linus/2.4/linux/drivers/scsi/sr_vendor.c     Tue Aug  6 21:15:22 2002
-+++ linux/drivers/scsi/sr_vendor.c     Tue Aug  6 21:23:18 2002
-@@ -60,6 +60,8 @@
- #define VENDOR_ID (scsi_CDs[minor].vendor)
-+#define VENDOR_TIMEOUT        30*HZ
-+
- void sr_vendor_init(int minor)
- {
- #ifndef CONFIG_BLK_DEV_SR_VENDOR
-@@ -134,7 +136,7 @@
-       modesel->density = density;
-       modesel->block_length_med = (blocklength >> 8) & 0xff;
-       modesel->block_length_lo = blocklength & 0xff;
--      if (0 == (rc = sr_do_ioctl(minor, cmd, buffer, sizeof(*modesel), 0, SCSI_DATA_WRITE, NULL))) {
-+      if (0 == (rc = sr_do_ioctl(minor, cmd, buffer, sizeof(*modesel), 0, SCSI_DATA_WRITE, NULL, VENDOR_TIMEOUT))) {
-               scsi_CDs[minor].device->sector_size = blocklength;
-       }
- #ifdef DEBUG
-@@ -179,7 +181,7 @@
-                        (scsi_CDs[minor].device->lun << 5) : 0;
-               cmd[8] = 12;
-               cmd[9] = 0x40;
--              rc = sr_do_ioctl(minor, cmd, buffer, 12, 1, SCSI_DATA_READ, NULL);
-+              rc = sr_do_ioctl(minor, cmd, buffer, 12, 1, SCSI_DATA_READ, NULL, VENDOR_TIMEOUT);
-               if (rc != 0)
-                       break;
-               if ((buffer[0] << 8) + buffer[1] < 0x0a) {
-@@ -205,7 +207,7 @@
-                                (scsi_CDs[minor].device->lun << 5) : 0;
-                       cmd[1] |= 0x03;
-                       cmd[2] = 0xb0;
--                      rc = sr_do_ioctl(minor, cmd, buffer, 0x16, 1, SCSI_DATA_READ, NULL);
-+                      rc = sr_do_ioctl(minor, cmd, buffer, 0x16, 1, SCSI_DATA_READ, NULL, VENDOR_TIMEOUT);
-                       if (rc != 0)
-                               break;
-                       if (buffer[14] != 0 && buffer[14] != 0xb0) {
-@@ -231,7 +233,7 @@
-                       cmd[1] = (scsi_CDs[minor].device->scsi_level <= SCSI_2) ?
-                                (scsi_CDs[minor].device->lun << 5) : 0;
-                       cmd[1] |= 0x03;
--                      rc = sr_do_ioctl(minor, cmd, buffer, 4, 1, SCSI_DATA_READ, NULL);
-+                      rc = sr_do_ioctl(minor, cmd, buffer, 4, 1, SCSI_DATA_READ, NULL, VENDOR_TIMEOUT);
-                       if (rc == -EINVAL) {
-                               printk(KERN_INFO "sr%d: Hmm, seems the drive "
-                                      "doesn't support multisession CD's\n", minor);
-@@ -257,7 +259,7 @@
-                        (scsi_CDs[minor].device->lun << 5) : 0;
-               cmd[8] = 0x04;
-               cmd[9] = 0x40;
--              rc = sr_do_ioctl(minor, cmd, buffer, 0x04, 1, SCSI_DATA_READ, NULL);
-+              rc = sr_do_ioctl(minor, cmd, buffer, 0x04, 1, SCSI_DATA_READ, NULL, VENDOR_TIMEOUT);
-               if (rc != 0) {
-                       break;
-               }
-@@ -272,7 +274,7 @@
-               cmd[6] = rc & 0x7f;     /* number of last session */
-               cmd[8] = 0x0c;
-               cmd[9] = 0x40;
--              rc = sr_do_ioctl(minor, cmd, buffer, 12, 1, SCSI_DATA_READ, NULL);
-+              rc = sr_do_ioctl(minor, cmd, buffer, 12, 1, SCSI_DATA_READ, NULL, VENDOR_TIMEOUT);
-               if (rc != 0) {
-                       break;
-               }
-diff -u -r -N ../../linus/2.4/linux/fs/udf/balloc.c linux/fs/udf/balloc.c
---- ../../linus/2.4/linux/fs/udf/balloc.c      Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/balloc.c      Thu Aug  8 20:44:32 2002
-@@ -461,8 +461,7 @@
-       elen = 0;
-       obloc = nbloc = UDF_I_LOCATION(table);
--      obh = nbh = udf_tread(sb, udf_get_lb_pblock(sb, nbloc, 0));
--      atomic_inc(&nbh->b_count);
-+      obh = nbh = NULL;
-       while (count && (etype =
-               udf_next_aext(table, &nbloc, &nextoffset, &eloc, &elen, &nbh, 1)) != -1)
-@@ -506,7 +505,7 @@
-                       udf_write_aext(table, obloc, &oextoffset, eloc, elen, obh, 1);
-               }
--              if (memcmp(&nbloc, &obloc, sizeof(lb_addr)))
-+              if (nbh != obh)
-               {
-                       i = -1;
-                       obloc = nbloc;
-@@ -580,7 +579,10 @@
-                       {
-                               loffset = nextoffset;
-                               aed->lengthAllocDescs = cpu_to_le32(adsize);
--                              sptr = (obh)->b_data + nextoffset - adsize;
-+                              if (obh)
-+                                      sptr = UDF_I_DATA(inode) + nextoffset -  udf_file_entry_alloc_offset(inode) + UDF_I_LENEATTR(inode) - adsize;
-+                              else
-+                                      sptr = obh->b_data + nextoffset - adsize;
-                               dptr = nbh->b_data + sizeof(struct allocExtDesc);
-                               memcpy(dptr, sptr, adsize);
-                               nextoffset = sizeof(struct allocExtDesc) + adsize;
-@@ -591,8 +593,8 @@
-                               aed->lengthAllocDescs = cpu_to_le32(0);
-                               sptr = (obh)->b_data + nextoffset;
-                               nextoffset = sizeof(struct allocExtDesc);
--      
--                              if (memcmp(&UDF_I_LOCATION(table), &obloc, sizeof(lb_addr)))
-+
-+                              if (obh)
-                               {
-                                       aed = (struct allocExtDesc *)(obh)->b_data;
-                                       aed->lengthAllocDescs =
-@@ -631,15 +633,20 @@
-                                       break;
-                               }
-                       }
--                      udf_update_tag(obh->b_data, loffset);
--                      mark_buffer_dirty(obh);
-+                      if (obh)
-+                      {
-+                              udf_update_tag(obh->b_data, loffset);
-+                              mark_buffer_dirty(obh);
-+                      }
-+                      else
-+                              mark_inode_dirty(table);
-               }
-               if (elen) /* It's possible that stealing the block emptied the extent */
-               {
-                       udf_write_aext(table, nbloc, &nextoffset, eloc, elen, nbh, 1);
--                      if (!memcmp(&UDF_I_LOCATION(table), &nbloc, sizeof(lb_addr)))
-+                      if (!nbh)
-                       {
-                               UDF_I_LENALLOC(table) += adsize;
-                               mark_inode_dirty(table);
-@@ -690,7 +697,7 @@
-       extoffset = sizeof(struct unallocSpaceEntry);
-       bloc = UDF_I_LOCATION(table);
--      bh = udf_tread(sb, udf_get_lb_pblock(sb, bloc, 0));
-+      bh = NULL;
-       eloc.logicalBlockNum = 0xFFFFFFFF;
-       while (first_block != eloc.logicalBlockNum && (etype =
-@@ -768,8 +775,7 @@
-       extoffset = sizeof(struct unallocSpaceEntry);
-       bloc = UDF_I_LOCATION(table);
--      goal_bh = bh = udf_tread(sb, udf_get_lb_pblock(sb, bloc, 0));
--      atomic_inc(&goal_bh->b_count);
-+      goal_bh = bh = NULL;
-       while (spread && (etype =
-               udf_next_aext(table, &bloc, &extoffset, &eloc, &elen, &bh, 1)) != -1)
-diff -u -r -N ../../linus/2.4/linux/fs/udf/dir.c linux/fs/udf/dir.c
---- ../../linus/2.4/linux/fs/udf/dir.c Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/dir.c Thu Aug  8 20:44:32 2002
-@@ -122,7 +122,9 @@
-               nf_pos = (udf_ext0_offset(dir) >> 2);
-       fibh.soffset = fibh.eoffset = (nf_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2;
--      if (inode_bmap(dir, nf_pos >> (dir->i_sb->s_blocksize_bits - 2),
-+      if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
-+              fibh.sbh = fibh.ebh = NULL;
-+      else if (inode_bmap(dir, nf_pos >> (dir->i_sb->s_blocksize_bits - 2),
-               &bloc, &extoffset, &eloc, &elen, &offset, &bh) == (EXT_RECORDED_ALLOCATED >> 30))
-       {
-               offset >>= dir->i_sb->s_blocksize_bits;
-@@ -136,40 +138,40 @@
-               }
-               else
-                       offset = 0;
--      }
--      else
--      {
--              udf_release_data(bh);
--              return -ENOENT;
--      }
--
--      if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block)))
--      {
--              udf_release_data(bh);
--              return -EIO;
--      }
--      if (!(offset & ((16 >> (dir->i_sb->s_blocksize_bits - 9))-1)))
--      {
--              i = 16 >> (dir->i_sb->s_blocksize_bits - 9);
--              if (i+offset > (elen >> dir->i_sb->s_blocksize_bits))
--                      i = (elen >> dir->i_sb->s_blocksize_bits)-offset;
--              for (num=0; i>0; i--)
-+              if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block)))
-               {
--                      block = udf_get_lb_pblock(dir->i_sb, eloc, offset+i);
--                      tmp = udf_tgetblk(dir->i_sb, block);
--                      if (tmp && !buffer_uptodate(tmp) && !buffer_locked(tmp))
--                              bha[num++] = tmp;
--                      else
--                              brelse(tmp);
-+                      udf_release_data(bh);
-+                      return -EIO;
-               }
--              if (num)
-+      
-+              if (!(offset & ((16 >> (dir->i_sb->s_blocksize_bits - 9))-1)))
-               {
--                      ll_rw_block(READA, num, bha);
--                      for (i=0; i<num; i++)
--                              brelse(bha[i]);
-+                      i = 16 >> (dir->i_sb->s_blocksize_bits - 9);
-+                      if (i+offset > (elen >> dir->i_sb->s_blocksize_bits))
-+                              i = (elen >> dir->i_sb->s_blocksize_bits)-offset;
-+                      for (num=0; i>0; i--)
-+                      {
-+                              block = udf_get_lb_pblock(dir->i_sb, eloc, offset+i);
-+                              tmp = udf_tgetblk(dir->i_sb, block);
-+                              if (tmp && !buffer_uptodate(tmp) && !buffer_locked(tmp))
-+                                      bha[num++] = tmp;
-+                              else
-+                                      brelse(tmp);
-+                      }
-+                      if (num)
-+                      {
-+                              ll_rw_block(READA, num, bha);
-+                              for (i=0; i<num; i++)
-+                                      brelse(bha[i]);
-+                      }
-               }
-       }
-+      else
-+      {
-+              udf_release_data(bh);
-+              return -ENOENT;
-+      }
-       while ( nf_pos < size )
-       {
-diff -u -r -N ../../linus/2.4/linux/fs/udf/directory.c linux/fs/udf/directory.c
---- ../../linus/2.4/linux/fs/udf/directory.c   Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/directory.c   Thu Aug  8 20:44:32 2002
-@@ -17,6 +17,7 @@
-  */
- #include "udfdecl.h"
-+#include "udf_i.h"
- #include <linux/fs.h>
- #include <linux/string.h>
-@@ -84,6 +85,21 @@
-       fibh->soffset = fibh->eoffset;
-+      if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
-+      {
-+              fi = udf_get_fileident(UDF_I_DATA(dir) - udf_file_entry_alloc_offset(dir),
-+                      dir->i_sb->s_blocksize, &(fibh->eoffset));
-+
-+              if (!fi)
-+                      return NULL;
-+
-+              *nf_pos += ((fibh->eoffset - fibh->soffset) >> 2);
-+
-+              memcpy((uint8_t *)cfi, (uint8_t *)fi, sizeof(struct fileIdentDesc));
-+
-+              return fi;
-+      }
-+
-       if (fibh->eoffset == dir->i_sb->s_blocksize)
-       {
-               int lextoffset = *extoffset;
-@@ -275,53 +291,43 @@
- }
- short_ad *
--udf_get_fileshortad(void * buffer, int maxoffset, int *offset, int inc)
-+udf_get_fileshortad(uint8_t *ptr, int maxoffset, int *offset, int inc)
- {
--      short_ad * sa;
--      uint8_t * ptr;
-+      short_ad *sa;
--      if ( (!buffer) || (!offset) )
-+      if ( (!ptr) || (!offset) )
-       {
-               printk(KERN_ERR "udf: udf_get_fileshortad() invalidparms\n");
-               return NULL;
-       }
--      ptr = (uint8_t *)buffer;
--
--      if ( (*offset > 0) && (*offset < maxoffset) )
--              ptr += *offset;
--      else
-+      if ( (*offset < 0) || ((*offset + sizeof(short_ad)) > maxoffset) )
-               return NULL;
--
--      if ((sa = (short_ad *)ptr)->extLength == 0)
-+      else if ((sa = (short_ad *)ptr)->extLength == 0)
-               return NULL;
--      else if (inc)
--              (*offset) += sizeof(short_ad);
-+
-+      if (inc)
-+              *offset += sizeof(short_ad);
-       return sa;
- }
- long_ad *
--udf_get_filelongad(void * buffer, int maxoffset, int * offset, int inc)
-+udf_get_filelongad(uint8_t *ptr, int maxoffset, int * offset, int inc)
- {
--      long_ad * la;
--      uint8_t * ptr;
-+      long_ad *la;
--      if ( (!buffer) || !(offset) ) 
-+      if ( (!ptr) || (!offset) ) 
-       {
-               printk(KERN_ERR "udf: udf_get_filelongad() invalidparms\n");
-               return NULL;
-       }
--      ptr = (uint8_t *)buffer;
--
--      if ( (*offset > 0) && (*offset < maxoffset) )
--              ptr += *offset;
--      else
-+      if ( (*offset < 0) || ((*offset + sizeof(long_ad)) > maxoffset) )
-               return NULL;
--
--      if ((la = (long_ad *)ptr)->extLength == 0)
-+      else if ((la = (long_ad *)ptr)->extLength == 0)
-               return NULL;
--      else if (inc)
--              (*offset) += sizeof(long_ad);
-+
-+      if (inc)
-+              *offset += sizeof(long_ad);
-       return la;
- }
-diff -u -r -N ../../linus/2.4/linux/fs/udf/ecma_167.h linux/fs/udf/ecma_167.h
---- ../../linus/2.4/linux/fs/udf/ecma_167.h    Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/ecma_167.h    Tue Aug  6 21:23:58 2002
-@@ -606,7 +606,7 @@
- #define FE_RECORD_FMT_CRLF            0x0A
- #define FE_RECORD_FMT_LFCR            0x0B
--#define Record Display Attributes (ECMA 167r3 4/14.9.8) */
-+/*  Record Display Attributes (ECMA 167r3 4/14.9.8) */
- #define FE_RECORD_DISPLAY_ATTR_UNDEF  0x00
- #define FE_RECORD_DISPLAY_ATTR_1      0x01
- #define FE_RECORD_DISPLAY_ATTR_2      0x02
-diff -u -r -N ../../linus/2.4/linux/fs/udf/file.c linux/fs/udf/file.c
---- ../../linus/2.4/linux/fs/udf/file.c        Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/file.c        Thu Aug  8 20:44:32 2002
-@@ -46,64 +46,36 @@
- static int udf_adinicb_readpage(struct file *file, struct page * page)
- {
-       struct inode *inode = page->mapping->host;
--
--      struct buffer_head *bh;
--      int block;
-       char *kaddr;
--      int err = 0;
-       if (!PageLocked(page))
-               PAGE_BUG(page);
-       kaddr = kmap(page);
-       memset(kaddr, 0, PAGE_CACHE_SIZE);
--      block = udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0);
--      bh = sb_bread(inode->i_sb, block);
--      if (!bh)
--      {
--              SetPageError(page);
--              err = -EIO;
--              goto out;
--      }
--      memcpy(kaddr, bh->b_data + udf_ext0_offset(inode), inode->i_size);
--      brelse(bh);
-+      memcpy(kaddr, UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), inode->i_size);
-       flush_dcache_page(page);
-       SetPageUptodate(page);
--out:
-       kunmap(page);
-       UnlockPage(page);
--      return err;
-+      return 0;
- }
- static int udf_adinicb_writepage(struct page *page)
- {
-       struct inode *inode = page->mapping->host;
--
--      struct buffer_head *bh;
--      int block;
-       char *kaddr;
--      int err = 0;
-       if (!PageLocked(page))
-               PAGE_BUG(page);
-       kaddr = kmap(page);
--      block = udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0);
--      bh = sb_bread(inode->i_sb, block);
--      if (!bh)
--      {
--              SetPageError(page);
--              err = -EIO;
--              goto out;
--      }
--      memcpy(bh->b_data + udf_ext0_offset(inode), kaddr, inode->i_size);
--      mark_buffer_dirty(bh);
--      brelse(bh);
-+      memcpy(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), kaddr, inode->i_size);
-+      mark_inode_dirty(inode);
-       SetPageUptodate(page);
--out:
-       kunmap(page);
-       UnlockPage(page);
--      return err;
-+      return 0;
- }
- static int udf_adinicb_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to)
-@@ -115,31 +87,17 @@
- static int udf_adinicb_commit_write(struct file *file, struct page *page, unsigned offset, unsigned to)
- {
-       struct inode *inode = page->mapping->host;
--
--      struct buffer_head *bh;
--      int block;
-       char *kaddr = page_address(page);
--      int err = 0;
--      block = udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0);
--      bh = sb_bread(inode->i_sb, block);
--      if (!bh)
--      {
--              SetPageError(page);
--              err = -EIO;
--              goto out;
--      }
--      memcpy(bh->b_data + udf_file_entry_alloc_offset(inode) + offset,
-+      memcpy(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode) + offset,
-               kaddr + offset, to - offset);
--      mark_buffer_dirty(bh);
--      brelse(bh);
-+      mark_inode_dirty(inode);
-       SetPageUptodate(page);
--out:
-       kunmap(page);
-       /* only one page here */
-       if (to > inode->i_size)
-               inode->i_size = to;
--      return err;
-+      return 0;
- }
- struct address_space_operations udf_adinicb_aops = {
-@@ -231,9 +189,6 @@
-       unsigned long arg)
- {
-       int result = -EINVAL;
--      struct buffer_head *bh = NULL;
--      long_ad eaicb;
--      uint8_t *ea = NULL;
-       if ( permission(inode, MAY_READ) != 0 )
-       {
-@@ -248,7 +203,6 @@
-               return -EINVAL;
-       }
--      /* first, do ioctls that don't need to udf_read */
-       switch (cmd)
-       {
-               case UDF_GETVOLIDENT:
-@@ -266,50 +220,16 @@
-                       return result;
-               }
--      }
--
--      /* ok, we need to read the inode */
--      bh = udf_tread(inode->i_sb,
--              udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0));
--
--      if (!bh)
--      {
--              udf_debug("bread failed (inode=%ld)\n", inode->i_ino);
--              return -EIO;
--      }
--
--      if (UDF_I_EXTENDED_FE(inode) == 0)
--      {
--              struct fileEntry *fe;
--
--              fe = (struct fileEntry *)bh->b_data;
--              eaicb = lela_to_cpu(fe->extendedAttrICB);
--              if (UDF_I_LENEATTR(inode))
--                      ea = fe->extendedAttr;
--      }
--      else
--      {
--              struct extendedFileEntry *efe;
--
--              efe = (struct extendedFileEntry *)bh->b_data;
--              eaicb = lela_to_cpu(efe->extendedAttrICB);
--              if (UDF_I_LENEATTR(inode))
--                      ea = efe->extendedAttr;
--      }
--
--      switch (cmd) 
--      {
-               case UDF_GETEASIZE:
-                       result = put_user(UDF_I_LENEATTR(inode), (int *)arg);
-                       break;
-               case UDF_GETEABLOCK:
--                      result = copy_to_user((char *)arg, ea,
-+                      result = copy_to_user((char *)arg, UDF_I_DATA(inode),
-                               UDF_I_LENEATTR(inode)) ? -EFAULT : 0;
-                       break;
-       }
--      udf_release_data(bh);
-       return result;
- }
-diff -u -r -N ../../linus/2.4/linux/fs/udf/ialloc.c linux/fs/udf/ialloc.c
---- ../../linus/2.4/linux/fs/udf/ialloc.c      Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/ialloc.c      Thu Aug  8 20:44:32 2002
-@@ -28,6 +28,7 @@
- #include <linux/locks.h>
- #include <linux/quotaops.h>
- #include <linux/udf_fs.h>
-+#include <linux/slab.h>
- #include "udf_i.h"
- #include "udf_sb.h"
-@@ -130,13 +131,20 @@
-       inode->i_blocks = 0;
-       UDF_I_LENEATTR(inode) = 0;
-       UDF_I_LENALLOC(inode) = 0;
-+      UDF_I_USE(inode) = 0;
-       if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_EXTENDED_FE))
-       {
--              UDF_I_EXTENDED_FE(inode) = 1;
-+              UDF_I_EFE(inode) = 1;
-               UDF_UPDATE_UDFREV(inode->i_sb, UDF_VERS_USE_EXTENDED_FE);
-+              UDF_I_DATA(inode) = kmalloc(inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry), GFP_KERNEL);
-+              memset(UDF_I_DATA(inode), 0x00, inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry));
-       }
-       else
--              UDF_I_EXTENDED_FE(inode) = 0;
-+      {
-+              UDF_I_EFE(inode) = 0;
-+              UDF_I_DATA(inode) = kmalloc(inode->i_sb->s_blocksize - sizeof(struct fileEntry), GFP_KERNEL);
-+              memset(UDF_I_DATA(inode), 0x00, inode->i_sb->s_blocksize - sizeof(struct fileEntry));
-+      }
-       if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_AD_IN_ICB))
-               UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_IN_ICB;
-       else if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD))
-@@ -147,7 +155,6 @@
-               UDF_I_CRTIME(inode) = CURRENT_TIME;
-       UDF_I_UMTIME(inode) = UDF_I_UCTIME(inode) =
-               UDF_I_UCRTIME(inode) = CURRENT_UTIME;
--      UDF_I_NEW_INODE(inode) = 1;
-       insert_inode_hash(inode);
-       mark_inode_dirty(inode);
-diff -u -r -N ../../linus/2.4/linux/fs/udf/inode.c linux/fs/udf/inode.c
---- ../../linus/2.4/linux/fs/udf/inode.c       Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/inode.c       Thu Aug  8 20:44:32 2002
-@@ -38,6 +38,7 @@
- #include <linux/mm.h>
- #include <linux/smp_lock.h>
- #include <linux/module.h>
-+#include <linux/slab.h>
- #include "udf_i.h"
- #include "udf_sb.h"
-@@ -122,6 +123,11 @@
-       clear_inode(inode);
- }
-+void udf_clear_inode(struct inode *inode)
-+{
-+      kfree(UDF_I_DATA(inode));
-+}
-+
- void udf_discard_prealloc(struct inode * inode)
- {
-       if (inode->i_size && inode->i_size != UDF_I_LENEXTENTS(inode) &&
-@@ -162,10 +168,8 @@
- void udf_expand_file_adinicb(struct inode * inode, int newsize, int * err)
- {
--      struct buffer_head *bh = NULL;
-       struct page *page;
-       char *kaddr;
--      int block;
-       /* from now on we have normal address_space methods */
-       inode->i_data.a_ops = &udf_aops;
-@@ -180,10 +184,6 @@
-               return;
-       }
--      block = udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0);
--      bh = udf_tread(inode->i_sb, block);
--      if (!bh)
--              return;
-       page = grab_cache_page(inode->i_mapping, 0);
-       if (!PageLocked(page))
-               PAGE_BUG(page);
-@@ -192,21 +192,19 @@
-               kaddr = kmap(page);
-               memset(kaddr + UDF_I_LENALLOC(inode), 0x00,
-                       PAGE_CACHE_SIZE - UDF_I_LENALLOC(inode));
--              memcpy(kaddr, bh->b_data + udf_file_entry_alloc_offset(inode),
-+              memcpy(kaddr, UDF_I_DATA(inode) + UDF_I_LENEATTR(inode),
-                       UDF_I_LENALLOC(inode));
-               flush_dcache_page(page);
-               SetPageUptodate(page);
-               kunmap(page);
-       }
--      memset(bh->b_data + udf_file_entry_alloc_offset(inode),
--              0, UDF_I_LENALLOC(inode));
-+      memset(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), 0x00,
-+              UDF_I_LENALLOC(inode));
-       UDF_I_LENALLOC(inode) = 0;
-       if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD))
-               UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_SHORT;
-       else
-               UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_LONG;
--      mark_buffer_dirty_inode(bh, inode);
--      udf_release_data(bh);
-       inode->i_data.a_ops->writepage(page);
-       page_cache_release(page);
-@@ -221,18 +219,21 @@
-       struct buffer_head *sbh = NULL, *dbh = NULL;
-       lb_addr bloc, eloc;
-       uint32_t elen, extoffset;
-+      uint8_t alloctype;
-       struct udf_fileident_bh sfibh, dfibh;
-       loff_t f_pos = udf_ext0_offset(inode) >> 2;
-       int size = (udf_ext0_offset(inode) + inode->i_size) >> 2;
-       struct fileIdentDesc cfi, *sfi, *dfi;
-+      if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD))
-+              alloctype = ICBTAG_FLAG_AD_SHORT;
-+      else
-+              alloctype = ICBTAG_FLAG_AD_LONG;
-+
-       if (!inode->i_size)
-       {
--              if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD))
--                      UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_SHORT;
--              else
--                      UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_LONG;
-+              UDF_I_ALLOCTYPE(inode) = alloctype;
-               mark_inode_dirty(inode);
-               return NULL;
-       }
-@@ -248,9 +249,6 @@
-               UDF_I_LOCATION(inode).partitionReferenceNum, 0);
-       if (!newblock)
-               return NULL;
--      sbh = udf_tread(inode->i_sb, inode->i_ino);
--      if (!sbh)
--              return NULL;
-       dbh = udf_tgetblk(inode->i_sb, newblock);
-       if (!dbh)
-               return NULL;
-@@ -261,18 +259,19 @@
-       mark_buffer_dirty_inode(dbh, inode);
-       sfibh.soffset = sfibh.eoffset = (f_pos & ((inode->i_sb->s_blocksize - 1) >> 2)) << 2;
--      sfibh.sbh = sfibh.ebh = sbh;
-+      sbh = sfibh.sbh = sfibh.ebh = NULL;
-       dfibh.soffset = dfibh.eoffset = 0;
-       dfibh.sbh = dfibh.ebh = dbh;
-       while ( (f_pos < size) )
-       {
-+              UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_IN_ICB;
-               sfi = udf_fileident_read(inode, &f_pos, &sfibh, &cfi, NULL, NULL, NULL, NULL, NULL, NULL);
-               if (!sfi)
-               {
--                      udf_release_data(sbh);
-                       udf_release_data(dbh);
-                       return NULL;
-               }
-+              UDF_I_ALLOCTYPE(inode) = alloctype;
-               sfi->descTag.tagLocation = *block;
-               dfibh.soffset = dfibh.eoffset;
-               dfibh.eoffset += (sfibh.eoffset - sfibh.soffset);
-@@ -280,21 +279,15 @@
-               if (udf_write_fi(inode, sfi, dfi, &dfibh, sfi->impUse,
-                       sfi->fileIdent + sfi->lengthOfImpUse))
-               {
--                      udf_release_data(sbh);
-+                      UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_IN_ICB;
-                       udf_release_data(dbh);
-                       return NULL;
-               }
-       }
-       mark_buffer_dirty_inode(dbh, inode);
--      memset(sbh->b_data + udf_file_entry_alloc_offset(inode),
--              0, UDF_I_LENALLOC(inode));
--
-+      memset(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode), 0, UDF_I_LENALLOC(inode));
-       UDF_I_LENALLOC(inode) = 0;
--      if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD))
--              UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_SHORT;
--      else
--              UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_LONG;
-       bloc = UDF_I_LOCATION(inode);
-       eloc.logicalBlockNum = *block;
-       eloc.partitionReferenceNum = UDF_I_LOCATION(inode).partitionReferenceNum;
-@@ -304,7 +297,6 @@
-       udf_add_aext(inode, &bloc, &extoffset, eloc, elen, &sbh, 0);
-       /* UniqueID stuff */
--      mark_buffer_dirty(sbh);
-       udf_release_data(sbh);
-       mark_inode_dirty(inode);
-       inode->i_version ++;
-@@ -732,7 +724,7 @@
-                               if (elen > numalloc)
-                               {
--                                      laarr[c].extLength -=
-+                                      laarr[i].extLength -=
-                                               (numalloc << inode->i_sb->s_blocksize_bits);
-                                       numalloc = 0;
-                               }
-@@ -854,7 +846,6 @@
- void udf_truncate(struct inode * inode)
- {
-       int offset;
--      struct buffer_head *bh;
-       int err;
-       if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
-@@ -879,16 +870,8 @@
-               }
-               else
-               {
--                      offset = (inode->i_size & (inode->i_sb->s_blocksize - 1)) +
--                              udf_file_entry_alloc_offset(inode);
--
--                      if ((bh = udf_tread(inode->i_sb,
--                              udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0))))
--                      {
--                              memset(bh->b_data + offset, 0x00, inode->i_sb->s_blocksize - offset);
--                              mark_buffer_dirty(bh);
--                              udf_release_data(bh);
--                      }
-+                      offset = inode->i_size & (inode->i_sb->s_blocksize - 1);
-+                      memset(UDF_I_DATA(inode) + UDF_I_LENEATTR(inode) + offset, 0x00, inode->i_sb->s_blocksize - offset - udf_file_entry_alloc_offset(inode));
-                       UDF_I_LENALLOC(inode) = inode->i_size;
-               }
-       }
-@@ -1037,7 +1020,6 @@
-       int offset, alen;
-       inode->i_version = ++event;
--      UDF_I_NEW_INODE(inode) = 0;
-       fe = (struct fileEntry *)bh->b_data;
-       efe = (struct extendedFileEntry *)bh->b_data;
-@@ -1049,14 +1031,28 @@
-       UDF_I_ALLOCTYPE(inode) = le16_to_cpu(fe->icbTag.flags) & ICBTAG_FLAG_AD_MASK;
-       if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_EFE)
--              UDF_I_EXTENDED_FE(inode) = 1;
-+      {
-+              UDF_I_EFE(inode) = 1;
-+              UDF_I_USE(inode) = 0;
-+              UDF_I_DATA(inode) = kmalloc(inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry), GFP_KERNEL);
-+              memcpy(UDF_I_DATA(inode), bh->b_data + sizeof(struct extendedFileEntry), inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry));
-+      }
-       else if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_FE)
--              UDF_I_EXTENDED_FE(inode) = 0;
-+      {
-+              UDF_I_EFE(inode) = 0;
-+              UDF_I_USE(inode) = 0;
-+              UDF_I_DATA(inode) = kmalloc(inode->i_sb->s_blocksize - sizeof(struct fileEntry), GFP_KERNEL);
-+              memcpy(UDF_I_DATA(inode), bh->b_data + sizeof(struct fileEntry), inode->i_sb->s_blocksize - sizeof(struct fileEntry));
-+      }
-       else if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_USE)
-       {
-+              UDF_I_EFE(inode) = 0;
-+              UDF_I_USE(inode) = 1;
-               UDF_I_LENALLOC(inode) =
-                       le32_to_cpu(
-                               ((struct unallocSpaceEntry *)bh->b_data)->lengthAllocDescs);
-+              UDF_I_DATA(inode) = kmalloc(inode->i_sb->s_blocksize - sizeof(struct unallocSpaceEntry), GFP_KERNEL);
-+              memcpy(UDF_I_DATA(inode), bh->b_data + sizeof(struct unallocSpaceEntry), inode->i_sb->s_blocksize - sizeof(struct unallocSpaceEntry));
-               return;
-       }
-@@ -1079,7 +1075,7 @@
-       UDF_I_NEXT_ALLOC_BLOCK(inode) = 0;
-       UDF_I_NEXT_ALLOC_GOAL(inode) = 0;
--      if (UDF_I_EXTENDED_FE(inode) == 0)
-+      if (UDF_I_EFE(inode) == 0)
-       {
-               inode->i_blocks = le64_to_cpu(fe->logicalBlocksRecorded) <<
-                       (inode->i_sb->s_blocksize_bits - 9);
-@@ -1325,19 +1321,11 @@
-               udf_debug("bread failure\n");
-               return -EIO;
-       }
-+
-+      memset(bh->b_data, 0x00, inode->i_sb->s_blocksize);
-+
-       fe = (struct fileEntry *)bh->b_data;
-       efe = (struct extendedFileEntry *)bh->b_data;
--      if (UDF_I_NEW_INODE(inode) == 1)
--      {
--              if (UDF_I_EXTENDED_FE(inode) == 0)
--                      memset(bh->b_data, 0x00, sizeof(struct fileEntry));
--              else
--                      memset(bh->b_data, 0x00, sizeof(struct extendedFileEntry));
--              memset(bh->b_data + udf_file_entry_alloc_offset(inode) +
--                      UDF_I_LENALLOC(inode), 0x0, inode->i_sb->s_blocksize -
--                      udf_file_entry_alloc_offset(inode) - UDF_I_LENALLOC(inode));
--              UDF_I_NEW_INODE(inode) = 0;
--      }
-       if (le16_to_cpu(fe->descTag.tagIdent) == TAG_IDENT_USE)
-       {
-@@ -1345,6 +1333,7 @@
-                       (struct unallocSpaceEntry *)bh->b_data;
-               use->lengthAllocDescs = cpu_to_le32(UDF_I_LENALLOC(inode));
-+              memcpy(bh->b_data + sizeof(struct unallocSpaceEntry), UDF_I_DATA(inode), inode->i_sb->s_blocksize - sizeof(struct unallocSpaceEntry));
-               crclen = sizeof(struct unallocSpaceEntry) + UDF_I_LENALLOC(inode) -
-                       sizeof(tag);
-               use->descTag.tagLocation = cpu_to_le32(UDF_I_LOCATION(inode).logicalBlockNum);
-@@ -1415,8 +1404,9 @@
-               udf_release_data(tbh);
-       }
--      if (UDF_I_EXTENDED_FE(inode) == 0)
-+      if (UDF_I_EFE(inode) == 0)
-       {
-+              memcpy(bh->b_data + sizeof(struct fileEntry), UDF_I_DATA(inode), inode->i_sb->s_blocksize - sizeof(struct fileEntry));
-               fe->logicalBlocksRecorded = cpu_to_le64(
-                       (inode->i_blocks + (1 << (inode->i_sb->s_blocksize_bits - 9)) - 1) >>
-                       (inode->i_sb->s_blocksize_bits - 9));
-@@ -1439,6 +1429,7 @@
-       }
-       else
-       {
-+              memcpy(bh->b_data + sizeof(struct extendedFileEntry), UDF_I_DATA(inode), inode->i_sb->s_blocksize - sizeof(struct extendedFileEntry));
-               efe->objectSize = cpu_to_le64(inode->i_size);
-               efe->logicalBlocksRecorded = cpu_to_le64(
-                       (inode->i_blocks + (1 << (inode->i_sb->s_blocksize_bits - 9)) - 1) >>
-@@ -1619,17 +1610,12 @@
-       long_ad *lad = NULL;
-       struct allocExtDesc *aed;
-       int8_t etype;
-+      uint8_t *ptr;
--      if (!(*bh))
--      {
--              if (!(*bh = udf_tread(inode->i_sb,
--                      udf_get_lb_pblock(inode->i_sb, *bloc, 0))))
--              {
--                      udf_debug("reading block %d failed!\n",
--                              udf_get_lb_pblock(inode->i_sb, *bloc, 0));
--                      return -1;
--              }
--      }
-+      if (!*bh)
-+              ptr = UDF_I_DATA(inode) + *extoffset - udf_file_entry_alloc_offset(inode) + UDF_I_LENEATTR(inode);
-+      else
-+              ptr = (*bh)->b_data + *extoffset;
-       if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
-               adsize = sizeof(short_ad);
-@@ -1668,7 +1654,7 @@
-               {
-                       loffset = *extoffset;
-                       aed->lengthAllocDescs = cpu_to_le32(adsize);
--                      sptr = (*bh)->b_data + *extoffset - adsize;
-+                      sptr = ptr - adsize;
-                       dptr = nbh->b_data + sizeof(struct allocExtDesc);
-                       memcpy(dptr, sptr, adsize);
-                       *extoffset = sizeof(struct allocExtDesc) + adsize;
-@@ -1677,10 +1663,10 @@
-               {
-                       loffset = *extoffset + adsize;
-                       aed->lengthAllocDescs = cpu_to_le32(0);
--                      sptr = (*bh)->b_data + *extoffset;
-+                      sptr = ptr;
-                       *extoffset = sizeof(struct allocExtDesc);
--                      if (memcmp(&UDF_I_LOCATION(inode), &obloc, sizeof(lb_addr)))
-+                      if (*bh)
-                       {
-                               aed = (struct allocExtDesc *)(*bh)->b_data;
-                               aed->lengthAllocDescs =
-@@ -1720,18 +1706,23 @@
-                               break;
-                       }
-               }
--              if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || UDF_SB_UDFREV(inode->i_sb) >= 0x0201)
--                      udf_update_tag((*bh)->b_data, loffset);
-+              if (*bh)
-+              {
-+                      if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || UDF_SB_UDFREV(inode->i_sb) >= 0x0201)
-+                              udf_update_tag((*bh)->b_data, loffset);
-+                      else
-+                              udf_update_tag((*bh)->b_data, sizeof(struct allocExtDesc));
-+                      mark_buffer_dirty_inode(*bh, inode);
-+                      udf_release_data(*bh);
-+              }
-               else
--                      udf_update_tag((*bh)->b_data, sizeof(struct allocExtDesc));
--              mark_buffer_dirty_inode(*bh, inode);
--              udf_release_data(*bh);
-+                      mark_inode_dirty(inode);
-               *bh = nbh;
-       }
-       etype = udf_write_aext(inode, *bloc, extoffset, eloc, elen, *bh, inc);
--      if (!memcmp(&UDF_I_LOCATION(inode), bloc, sizeof(lb_addr)))
-+      if (!*bh)
-       {
-               UDF_I_LENALLOC(inode) += adsize;
-               mark_inode_dirty(inode);
-@@ -1755,49 +1746,40 @@
-     lb_addr eloc, uint32_t elen, struct buffer_head *bh, int inc)
- {
-       int adsize;
--      short_ad *sad = NULL;
--      long_ad *lad = NULL;
-+      uint8_t *ptr;
--      if (!(bh))
--      {
--              if (!(bh = udf_tread(inode->i_sb,
--                      udf_get_lb_pblock(inode->i_sb, bloc, 0))))
--              {
--                      udf_debug("reading block %d failed!\n",
--                              udf_get_lb_pblock(inode->i_sb, bloc, 0));
--                      return -1;
--              }
--      }
-+      if (!bh)
-+              ptr = UDF_I_DATA(inode) + *extoffset - udf_file_entry_alloc_offset(inode) + UDF_I_LENEATTR(inode);
-       else
-+      {
-+              ptr = bh->b_data + *extoffset;
-               atomic_inc(&bh->b_count);
--
--      if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
--              adsize = sizeof(short_ad);
--      else if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_LONG)
--              adsize = sizeof(long_ad);
--      else
--              return -1;
-+      }
-       switch (UDF_I_ALLOCTYPE(inode))
-       {
-               case ICBTAG_FLAG_AD_SHORT:
-               {
--                      sad = (short_ad *)((bh)->b_data + *extoffset);
-+                      short_ad *sad = (short_ad *)ptr;
-                       sad->extLength = cpu_to_le32(elen);
-                       sad->extPosition = cpu_to_le32(eloc.logicalBlockNum);
-+                      adsize = sizeof(short_ad);
-                       break;
-               }
-               case ICBTAG_FLAG_AD_LONG:
-               {
--                      lad = (long_ad *)((bh)->b_data + *extoffset);
-+                      long_ad *lad = (long_ad *)ptr;
-                       lad->extLength = cpu_to_le32(elen);
-                       lad->extLocation = cpu_to_lelb(eloc);
-                       memset(lad->impUse, 0x00, sizeof(lad->impUse));
-+                      adsize = sizeof(long_ad);
-                       break;
-               }
-+              default:
-+                      return -1;
-       }
--      if (memcmp(&UDF_I_LOCATION(inode), &bloc, sizeof(lb_addr)))
-+      if (bh)
-       {
-               if (!UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT) || UDF_SB_UDFREV(inode->i_sb) >= 0x0201)
-               {
-@@ -1806,30 +1788,28 @@
-                               le32_to_cpu(aed->lengthAllocDescs) + sizeof(struct allocExtDesc));
-               }
-               mark_buffer_dirty_inode(bh, inode);
-+              udf_release_data(bh);
-       }
-       else
--      {
-               mark_inode_dirty(inode);
--              mark_buffer_dirty(bh);
--      }
-       if (inc)
-               *extoffset += adsize;
--      udf_release_data(bh);
-       return (elen >> 30);
- }
- int8_t udf_next_aext(struct inode *inode, lb_addr *bloc, int *extoffset,
-       lb_addr *eloc, uint32_t *elen, struct buffer_head **bh, int inc)
- {
--      uint16_t tagIdent;
--      int pos, alen;
-       int8_t etype;
--      if (!(*bh))
-+      while ((etype = udf_current_aext(inode, bloc, extoffset, eloc, elen, bh, inc)) ==
-+              (EXT_NEXT_EXTENT_ALLOCDECS >> 30))
-       {
--              if (!(*bh = udf_tread(inode->i_sb,
--                      udf_get_lb_pblock(inode->i_sb, *bloc, 0))))
-+              *bloc = *eloc;
-+              *extoffset = sizeof(struct allocExtDesc);
-+              udf_release_data(*bh);
-+              if (!(*bh = udf_tread(inode->i_sb, udf_get_lb_pblock(inode->i_sb, *bloc, 0))))
-               {
-                       udf_debug("reading block %d failed!\n",
-                               udf_get_lb_pblock(inode->i_sb, *bloc, 0));
-@@ -1837,154 +1817,38 @@
-               }
-       }
--      tagIdent = le16_to_cpu(((tag *)(*bh)->b_data)->tagIdent);
--
--      if (!memcmp(&UDF_I_LOCATION(inode), bloc, sizeof(lb_addr)))
--      {
--              if (tagIdent == TAG_IDENT_FE || tagIdent == TAG_IDENT_EFE ||
--                      UDF_I_NEW_INODE(inode))
--              {
--                      pos = udf_file_entry_alloc_offset(inode);
--                      alen = UDF_I_LENALLOC(inode) + pos;
--              }
--              else if (tagIdent == TAG_IDENT_USE)
--              {
--                      pos = sizeof(struct unallocSpaceEntry);
--                      alen = UDF_I_LENALLOC(inode) + pos;
--              }
--              else
--                      return -1;
--      }
--      else if (tagIdent == TAG_IDENT_AED)
--      {
--              struct allocExtDesc *aed = (struct allocExtDesc *)(*bh)->b_data;
--
--              pos = sizeof(struct allocExtDesc);
--              alen = le32_to_cpu(aed->lengthAllocDescs) + pos;
--      }
--      else
--              return -1;
--
--      if (!(*extoffset))
--              *extoffset = pos;
--
--      switch (UDF_I_ALLOCTYPE(inode))
--      {
--              case ICBTAG_FLAG_AD_SHORT:
--              {
--                      short_ad *sad;
--
--                      if (!(sad = udf_get_fileshortad((*bh)->b_data, alen, extoffset, inc)))
--                              return -1;
--
--                      if ((etype = le32_to_cpu(sad->extLength) >> 30) == (EXT_NEXT_EXTENT_ALLOCDECS >> 30))
--                      {
--                              bloc->logicalBlockNum = le32_to_cpu(sad->extPosition);
--                              *extoffset = 0;
--                              udf_release_data(*bh);
--                              *bh = NULL;
--                              return udf_next_aext(inode, bloc, extoffset, eloc, elen, bh, inc);
--                      }
--                      else
--                      {
--                              eloc->logicalBlockNum = le32_to_cpu(sad->extPosition);
--                              eloc->partitionReferenceNum = UDF_I_LOCATION(inode).partitionReferenceNum;
--                              *elen = le32_to_cpu(sad->extLength) & UDF_EXTENT_LENGTH_MASK;
--                      }
--                      break;
--              }
--              case ICBTAG_FLAG_AD_LONG:
--              {
--                      long_ad *lad;
--
--                      if (!(lad = udf_get_filelongad((*bh)->b_data, alen, extoffset, inc)))
--                              return -1;
--
--                      if ((etype = le32_to_cpu(lad->extLength) >> 30) == (EXT_NEXT_EXTENT_ALLOCDECS >> 30))
--                      {
--                              *bloc = lelb_to_cpu(lad->extLocation);
--                              *extoffset = 0;
--                              udf_release_data(*bh);
--                              *bh = NULL;
--                              return udf_next_aext(inode, bloc, extoffset, eloc, elen, bh, inc);
--                      }
--                      else
--                      {
--                              *eloc = lelb_to_cpu(lad->extLocation);
--                              *elen = le32_to_cpu(lad->extLength) & UDF_EXTENT_LENGTH_MASK;
--                      }
--                      break;
--              }
--              case ICBTAG_FLAG_AD_IN_ICB:
--              {
--                      if (UDF_I_LENALLOC(inode) == 0)
--                              return -1;
--                      etype = (EXT_RECORDED_ALLOCATED >> 30);
--                      *eloc = UDF_I_LOCATION(inode);
--                      *elen = UDF_I_LENALLOC(inode);
--                      break;
--              }
--              default:
--              {
--                      udf_debug("alloc_type = %d unsupported\n", UDF_I_ALLOCTYPE(inode));
--                      return -1;
--              }
--      }
--      if (*elen)
--              return etype;
--
--      udf_debug("Empty Extent, inode=%ld, alloctype=%d, eloc=%d, elen=%d, etype=%d, extoffset=%d\n",
--              inode->i_ino, UDF_I_ALLOCTYPE(inode), eloc->logicalBlockNum, *elen, etype, *extoffset);
--      if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
--              *extoffset -= sizeof(short_ad);
--      else if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_LONG)
--              *extoffset -= sizeof(long_ad);
--      return -1;
-+      return etype;
- }
- int8_t udf_current_aext(struct inode *inode, lb_addr *bloc, int *extoffset,
-       lb_addr *eloc, uint32_t *elen, struct buffer_head **bh, int inc)
- {
--      int pos, alen;
-+      int alen;
-       int8_t etype;
-+      uint8_t *ptr;
--      if (!(*bh))
-+      if (!*bh)
-       {
--              if (!(*bh = udf_tread(inode->i_sb,
--                      udf_get_lb_pblock(inode->i_sb, *bloc, 0))))
--              {
--                      udf_debug("reading block %d failed!\n",
--                              udf_get_lb_pblock(inode->i_sb, *bloc, 0));
--                      return -1;
--              }
--      }
--
--      if (!memcmp(&UDF_I_LOCATION(inode), bloc, sizeof(lb_addr)))
--      {
--              if (!(UDF_I_EXTENDED_FE(inode)))
--                      pos = sizeof(struct fileEntry) + UDF_I_LENEATTR(inode);
--              else
--                      pos = sizeof(struct extendedFileEntry) + UDF_I_LENEATTR(inode);
--              alen = UDF_I_LENALLOC(inode) + pos;
-+              if (!(*extoffset))
-+                      *extoffset = udf_file_entry_alloc_offset(inode);
-+              ptr = UDF_I_DATA(inode) + *extoffset - udf_file_entry_alloc_offset(inode) + UDF_I_LENEATTR(inode);
-+              alen = udf_file_entry_alloc_offset(inode) + UDF_I_LENALLOC(inode);
-       }
-       else
-       {
--              struct allocExtDesc *aed = (struct allocExtDesc *)(*bh)->b_data;
--
--              pos = sizeof(struct allocExtDesc);
--              alen = le32_to_cpu(aed->lengthAllocDescs) + pos;
-+              if (!(*extoffset))
-+                      *extoffset = sizeof(struct allocExtDesc);
-+              ptr = (*bh)->b_data + *extoffset;
-+              alen = le32_to_cpu(((struct allocExtDesc *)(*bh)->b_data)->lengthAllocDescs);
-       }
--      if (!(*extoffset))
--              *extoffset = pos;
--
-       switch (UDF_I_ALLOCTYPE(inode))
-       {
-               case ICBTAG_FLAG_AD_SHORT:
-               {
-                       short_ad *sad;
--                      if (!(sad = udf_get_fileshortad((*bh)->b_data, alen, extoffset, inc)))
-+                      if (!(sad = udf_get_fileshortad(ptr, alen, extoffset, inc)))
-                               return -1;
-                       etype = le32_to_cpu(sad->extLength) >> 30;
-@@ -1997,7 +1861,7 @@
-               {
-                       long_ad *lad;
--                      if (!(lad = udf_get_filelongad((*bh)->b_data, alen, extoffset, inc)))
-+                      if (!(lad = udf_get_filelongad(ptr, alen, extoffset, inc)))
-                               return -1;
-                       etype = le32_to_cpu(lad->extLength) >> 30;
-@@ -2011,15 +1875,8 @@
-                       return -1;
-               }
-       }
--      if (*elen)
--              return etype;
--      udf_debug("Empty Extent!\n");
--      if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
--              *extoffset -= sizeof(short_ad);
--      else if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_LONG)
--              *extoffset -= sizeof(long_ad);
--      return -1;
-+      return etype;
- }
- int8_t udf_insert_aext(struct inode *inode, lb_addr bloc, int extoffset,
-@@ -2029,17 +1886,7 @@
-       uint32_t oelen;
-       int8_t etype;
--      if (!bh)
--      {
--              if (!(bh = udf_tread(inode->i_sb,
--                      udf_get_lb_pblock(inode->i_sb, bloc, 0))))
--              {
--                      udf_debug("reading block %d failed!\n",
--                              udf_get_lb_pblock(inode->i_sb, bloc, 0));
--                      return -1;
--              }
--      }
--      else
-+      if (bh)
-               atomic_inc(&bh->b_count);
-       while ((etype = udf_next_aext(inode, &bloc, &extoffset, &oeloc, &oelen, &bh, 0)) != -1)
-@@ -2063,19 +1910,11 @@
-       int8_t etype;
-       struct allocExtDesc *aed;
--      if (!(nbh))
-+      if (nbh)
-       {
--              if (!(nbh = udf_tread(inode->i_sb,
--                      udf_get_lb_pblock(inode->i_sb, nbloc, 0))))
--              {
--                      udf_debug("reading block %d failed!\n",
--                              udf_get_lb_pblock(inode->i_sb, nbloc, 0));
--                      return -1;
--              }
--      }
--      else
-               atomic_inc(&nbh->b_count);
--      atomic_inc(&nbh->b_count);
-+              atomic_inc(&nbh->b_count);
-+      }
-       if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_SHORT)
-               adsize = sizeof(short_ad);
-@@ -2094,7 +1933,7 @@
-       while ((etype = udf_next_aext(inode, &nbloc, &nextoffset, &eloc, &elen, &nbh, 1)) != -1)
-       {
-               udf_write_aext(inode, obloc, &oextoffset, eloc, (etype << 30) | elen, obh, 1);
--              if (memcmp(&nbloc, &obloc, sizeof(lb_addr)))
-+              if (obh != nbh)
-               {
-                       obloc = nbloc;
-                       udf_release_data(obh);
-@@ -2106,12 +1945,12 @@
-       memset(&eloc, 0x00, sizeof(lb_addr));
-       elen = 0;
--      if (memcmp(&nbloc, &obloc, sizeof(lb_addr)))
-+      if (nbh != obh)
-       {
-               udf_free_blocks(inode->i_sb, inode, nbloc, 0, 1);
-               udf_write_aext(inode, obloc, &oextoffset, eloc, elen, obh, 1);
-               udf_write_aext(inode, obloc, &oextoffset, eloc, elen, obh, 1);
--              if (!memcmp(&UDF_I_LOCATION(inode), &obloc, sizeof(lb_addr)))
-+              if (!obh)
-               {
-                       UDF_I_LENALLOC(inode) -= (adsize * 2);
-                       mark_inode_dirty(inode);
-@@ -2131,7 +1970,7 @@
-       else
-       {
-               udf_write_aext(inode, obloc, &oextoffset, eloc, elen, obh, 1);
--              if (!memcmp(&UDF_I_LOCATION(inode), &obloc, sizeof(lb_addr)))
-+              if (!obh)
-               {
-                       UDF_I_LENALLOC(inode) -= adsize;
-                       mark_inode_dirty(inode);
-@@ -2206,9 +2045,7 @@
-               ret = 0;
-       unlock_kernel();
--
--      if (bh)
--              udf_release_data(bh);
-+      udf_release_data(bh);
-       if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_VARCONV))
-               return udf_fixed_to_variable(ret);
-diff -u -r -N ../../linus/2.4/linux/fs/udf/misc.c linux/fs/udf/misc.c
---- ../../linus/2.4/linux/fs/udf/misc.c        Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/misc.c        Thu Aug  8 20:44:32 2002
-@@ -73,7 +73,7 @@
-       *bh = udf_tread(inode->i_sb, inode->i_ino);
--      if (UDF_I_EXTENDED_FE(inode) == 0)
-+      if (UDF_I_EFE(inode) == 0)
-       {
-               struct fileEntry *fe;
-@@ -189,7 +189,7 @@
-       *bh = udf_tread(inode->i_sb, inode->i_ino);
--      if (UDF_I_EXTENDED_FE(inode) == 0)
-+      if (UDF_I_EFE(inode) == 0)
-       {
-               struct fileEntry *fe;
-diff -u -r -N ../../linus/2.4/linux/fs/udf/namei.c linux/fs/udf/namei.c
---- ../../linus/2.4/linux/fs/udf/namei.c       Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/namei.c       Thu Aug  8 20:44:32 2002
-@@ -56,12 +56,16 @@
-       uint8_t lfi = cfi->lengthFileIdent;
-       int padlen = fibh->eoffset - fibh->soffset - liu - lfi -
-               sizeof(struct fileIdentDesc);
-+      int adinicb = 0;
-+
-+      if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB)
-+              adinicb = 1;
-       offset = fibh->soffset + sizeof(struct fileIdentDesc);
-       if (impuse)
-       {
--              if (offset + liu < 0)
-+              if (adinicb || (offset + liu < 0))
-                       memcpy((uint8_t *)sfi->impUse, impuse, liu);
-               else if (offset >= 0)
-                       memcpy(fibh->ebh->b_data + offset, impuse, liu);
-@@ -76,7 +80,7 @@
-       if (fileident)
-       {
--              if (offset + lfi < 0)
-+              if (adinicb || (offset + lfi < 0))
-                       memcpy((uint8_t *)sfi->fileIdent + liu, fileident, lfi);
-               else if (offset >= 0)
-                       memcpy(fibh->ebh->b_data + offset, fileident, lfi);
-@@ -89,7 +93,7 @@
-       offset += lfi;
--      if (offset + padlen < 0)
-+      if (adinicb || (offset + padlen < 0))
-               memset((uint8_t *)sfi->padding + liu + lfi, 0x00, padlen);
-       else if (offset >= 0)
-               memset(fibh->ebh->b_data + offset, 0x00, padlen);
-@@ -123,7 +127,7 @@
-                       checksum += ((uint8_t *)&cfi->descTag)[i];
-       cfi->descTag.tagChecksum = checksum;
--      if (sizeof(struct fileIdentDesc) <= -fibh->soffset)
-+      if (adinicb || (sizeof(struct fileIdentDesc) <= -fibh->soffset))
-               memcpy((uint8_t *)sfi, (uint8_t *)cfi, sizeof(struct fileIdentDesc));
-       else
-       {
-@@ -132,9 +136,14 @@
-                       sizeof(struct fileIdentDesc) + fibh->soffset);
-       }
--      if (fibh->sbh != fibh->ebh)
--              mark_buffer_dirty_inode(fibh->ebh, inode);
--      mark_buffer_dirty_inode(fibh->sbh, inode);
-+      if (adinicb)
-+              mark_inode_dirty(inode);
-+      else
-+      {
-+              if (fibh->sbh != fibh->ebh)
-+                      mark_buffer_dirty_inode(fibh->ebh, inode);
-+              mark_buffer_dirty_inode(fibh->sbh, inode);
-+      }
-       return 0;
- }
-@@ -161,7 +170,9 @@
-       f_pos = (udf_ext0_offset(dir) >> 2);
-       fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2;
--      if (inode_bmap(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2),
-+      if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
-+              fibh->sbh = fibh->ebh = NULL;
-+      else if (inode_bmap(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2),
-               &bloc, &extoffset, &eloc, &elen, &offset, &bh) == (EXT_RECORDED_ALLOCATED >> 30))
-       {
-               offset >>= dir->i_sb->s_blocksize_bits;
-@@ -175,6 +186,12 @@
-               }
-               else
-                       offset = 0;
-+
-+              if (!(fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block)))
-+              {
-+                      udf_release_data(bh);
-+                      return NULL;
-+              }
-       }
-       else
-       {
-@@ -182,12 +199,6 @@
-               return NULL;
-       }
--      if (!(fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block)))
--      {
--              udf_release_data(bh);
--              return NULL;
--      }
--
-       while ( (f_pos < size) )
-       {
-               fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh);
-@@ -388,7 +399,9 @@
-       f_pos = (udf_ext0_offset(dir) >> 2);
-       fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2;
--      if (inode_bmap(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2),
-+      if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
-+              fibh->sbh = fibh->ebh = NULL;
-+      else if (inode_bmap(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2),
-               &bloc, &extoffset, &eloc, &elen, &offset, &bh) == (EXT_RECORDED_ALLOCATED >> 30))
-       {
-               offset >>= dir->i_sb->s_blocksize_bits;
-@@ -409,94 +422,89 @@
-                       *err = -EIO;
-                       return NULL;
-               }
--      
-+
-               block = UDF_I_LOCATION(dir).logicalBlockNum;
--      
--              while ( (f_pos < size) )
-+
-+      }
-+      else
-+      {
-+              block = udf_get_lb_pblock(dir->i_sb, UDF_I_LOCATION(dir), 0);
-+              fibh->sbh = fibh->ebh = NULL;
-+              fibh->soffset = fibh->eoffset = sb->s_blocksize;
-+              goto add;
-+      }
-+
-+      while ( (f_pos < size) )
-+      {
-+              fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh);
-+
-+              if (!fi)
-               {
--                      fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh);
--      
--                      if (!fi)
--                      {
--                              if (fibh->sbh != fibh->ebh)
--                                      udf_release_data(fibh->ebh);
--                              udf_release_data(fibh->sbh);
--                              udf_release_data(bh);
--                              *err = -EIO;
--                              return NULL;
--                      }
--      
--                      liu = le16_to_cpu(cfi->lengthOfImpUse);
--                      lfi = cfi->lengthFileIdent;
--      
--                      if (fibh->sbh == fibh->ebh)
--                              nameptr = fi->fileIdent + liu;
-+                      if (fibh->sbh != fibh->ebh)
-+                              udf_release_data(fibh->ebh);
-+                      udf_release_data(fibh->sbh);
-+                      udf_release_data(bh);
-+                      *err = -EIO;
-+                      return NULL;
-+              }
-+
-+              liu = le16_to_cpu(cfi->lengthOfImpUse);
-+              lfi = cfi->lengthFileIdent;
-+
-+              if (fibh->sbh == fibh->ebh)
-+                      nameptr = fi->fileIdent + liu;
-+              else
-+              {
-+                      int poffset;    /* Unpaded ending offset */
-+
-+                      poffset = fibh->soffset + sizeof(struct fileIdentDesc) + liu + lfi;
-+
-+                      if (poffset >= lfi)
-+                              nameptr = (char *)(fibh->ebh->b_data + poffset - lfi);
-                       else
-                       {
--                              int poffset;    /* Unpaded ending offset */
--      
--                              poffset = fibh->soffset + sizeof(struct fileIdentDesc) + liu + lfi;
--      
--                              if (poffset >= lfi)
--                                      nameptr = (char *)(fibh->ebh->b_data + poffset - lfi);
--                              else
--                              {
--                                      nameptr = fname;
--                                      memcpy(nameptr, fi->fileIdent + liu, lfi - poffset);
--                                      memcpy(nameptr + lfi - poffset, fibh->ebh->b_data, poffset);
--                              }
-+                              nameptr = fname;
-+                              memcpy(nameptr, fi->fileIdent + liu, lfi - poffset);
-+                              memcpy(nameptr + lfi - poffset, fibh->ebh->b_data, poffset);
-                       }
--      
--                      if ( (cfi->fileCharacteristics & FID_FILE_CHAR_DELETED) != 0 )
-+              }
-+
-+              if ( (cfi->fileCharacteristics & FID_FILE_CHAR_DELETED) != 0 )
-+              {
-+                      if (((sizeof(struct fileIdentDesc) + liu + lfi + 3) & ~3) == nfidlen)
-                       {
--                              if (((sizeof(struct fileIdentDesc) + liu + lfi + 3) & ~3) == nfidlen)
-+                              udf_release_data(bh);
-+                              cfi->descTag.tagSerialNum = cpu_to_le16(1);
-+                              cfi->fileVersionNum = cpu_to_le16(1);
-+                              cfi->fileCharacteristics = 0;
-+                              cfi->lengthFileIdent = namelen;
-+                              cfi->lengthOfImpUse = cpu_to_le16(0);
-+                              if (!udf_write_fi(dir, cfi, fi, fibh, NULL, name))
-+                                      return fi;
-+                              else
-                               {
--                                      udf_release_data(bh);
--                                      cfi->descTag.tagSerialNum = cpu_to_le16(1);
--                                      cfi->fileVersionNum = cpu_to_le16(1);
--                                      cfi->fileCharacteristics = 0;
--                                      cfi->lengthFileIdent = namelen;
--                                      cfi->lengthOfImpUse = cpu_to_le16(0);
--                                      if (!udf_write_fi(dir, cfi, fi, fibh, NULL, name))
--                                              return fi;
--                                      else
--                                      {
--                                              *err = -EIO;
--                                              return NULL;
--                                      }
-+                                      *err = -EIO;
-+                                      return NULL;
-                               }
-                       }
-+              }
--                      if (!lfi || !dentry)
--                              continue;
-+              if (!lfi || !dentry)
-+                      continue;
--                      if ((flen = udf_get_filename(dir->i_sb, nameptr, fname, lfi)) &&
--                              udf_match(flen, fname, &(dentry->d_name)))
--                      {
--                              if (fibh->sbh != fibh->ebh)
--                                      udf_release_data(fibh->ebh);
--                              udf_release_data(fibh->sbh);
--                              udf_release_data(bh);
--                              *err = -EEXIST;
--                              return NULL;
--                      }
--              }
--      }
--      else
--      {
--              block = udf_get_lb_pblock(dir->i_sb, UDF_I_LOCATION(dir), 0);
--              if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
-+              if ((flen = udf_get_filename(dir->i_sb, nameptr, fname, lfi)) &&
-+                      udf_match(flen, fname, &(dentry->d_name)))
-               {
--                      fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block);
--                      fibh->soffset = fibh->eoffset = udf_file_entry_alloc_offset(dir);
--              }
--              else
--              {
--                      fibh->sbh = fibh->ebh = NULL;
--                      fibh->soffset = fibh->eoffset = sb->s_blocksize;
-+                      if (fibh->sbh != fibh->ebh)
-+                              udf_release_data(fibh->ebh);
-+                      udf_release_data(fibh->sbh);
-+                      udf_release_data(bh);
-+                      *err = -EEXIST;
-+                      return NULL;
-               }
-       }
-+add:
-       f_pos += nfidlen;
-       if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB &&
-@@ -533,13 +541,17 @@
-                       fibh->sbh = fibh->ebh;
-               }
--              if (UDF_I_ALLOCTYPE(dir) != ICBTAG_FLAG_AD_IN_ICB)
-+              if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
-+              {
-+                      block = UDF_I_LOCATION(dir).logicalBlockNum;
-+                      fi = (struct fileIdentDesc *)(UDF_I_DATA(dir) + fibh->soffset - udf_ext0_offset(dir));
-+              }
-+              else
-+              {
-                       block = eloc.logicalBlockNum + ((elen - 1) >>
-                               dir->i_sb->s_blocksize_bits);
--              else
--                      block = UDF_I_LOCATION(dir).logicalBlockNum;
--                              
--              fi = (struct fileIdentDesc *)(fibh->sbh->b_data + fibh->soffset);
-+                      fi = (struct fileIdentDesc *)(fibh->sbh->b_data + fibh->soffset);
-+              }
-       }
-       else
-       {
-@@ -784,7 +796,10 @@
-       f_pos = (udf_ext0_offset(dir) >> 2);
-       fibh.soffset = fibh.eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2;
--      if (inode_bmap(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2),
-+
-+      if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
-+              fibh.sbh = fibh.ebh = NULL;
-+      else if (inode_bmap(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2),
-               &bloc, &extoffset, &eloc, &elen, &offset, &bh) == (EXT_RECORDED_ALLOCATED >> 30))
-       {
-               offset >>= dir->i_sb->s_blocksize_bits;
-@@ -798,6 +813,12 @@
-               }
-               else
-                       offset = 0;
-+
-+              if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block)))
-+              {
-+                      udf_release_data(bh);
-+                      return 0;
-+              }
-       }
-       else
-       {
-@@ -805,8 +826,6 @@
-               return 0;
-       }
--      if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block)))
--              return 0;
-       while ( (f_pos < size) )
-       {
-@@ -823,6 +842,9 @@
-               if (cfi.lengthFileIdent && (cfi.fileCharacteristics & FID_FILE_CHAR_DELETED) == 0)
-               {
-+                      if (fibh.sbh != fibh.ebh)
-+                              udf_release_data(fibh.ebh);
-+                      udf_release_data(fibh.sbh);
-                       udf_release_data(bh);
-                       return 0;
-               }
-diff -u -r -N ../../linus/2.4/linux/fs/udf/super.c linux/fs/udf/super.c
---- ../../linus/2.4/linux/fs/udf/super.c       Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/super.c       Thu Aug  8 20:44:32 2002
-@@ -104,6 +104,7 @@
-       write_inode:            udf_write_inode,
-       put_inode:              udf_put_inode,
-       delete_inode:           udf_delete_inode,
-+      clear_inode:            udf_clear_inode,
-       put_super:              udf_put_super,
-       write_super:            udf_write_super,
-       statfs:                 udf_statfs,
-@@ -313,10 +314,6 @@
-       UDF_SB(sb)->s_gid   = uopt.gid;
-       UDF_SB(sb)->s_umask = uopt.umask;
--#if UDFFS_RW != 1
--      *flags |= MS_RDONLY;
--#endif
--
-       if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
-               return 0;
-       if (*flags & MS_RDONLY)
-@@ -1373,10 +1370,6 @@
-       memset(UDF_SB(sb), 0x00, sizeof(struct udf_sb_info));
--#if UDFFS_RW != 1
--      sb->s_flags |= MS_RDONLY;
--#endif
--
-       if (!udf_parse_options((char *)options, &uopt))
-               goto error_out;
-@@ -1488,8 +1481,8 @@
-       {
-               timestamp ts;
-               udf_time_to_stamp(&ts, UDF_SB_RECORDTIME(sb), 0);
--              udf_info("UDF %s-%s (%s) Mounting volume '%s', timestamp %04u/%02u/%02u %02u:%02u (%x)\n",
--                      UDFFS_VERSION, UDFFS_RW ? "rw" : "ro", UDFFS_DATE,
-+              udf_info("UDF %s (%s) Mounting volume '%s', timestamp %04u/%02u/%02u %02u:%02u (%x)\n",
-+                      UDFFS_VERSION, UDFFS_DATE,
-                       UDF_SB_VOLIDENT(sb), ts.year, ts.month, ts.day, ts.hour, ts.minute,
-                       ts.typeAndTimezone);
-       }
-diff -u -r -N ../../linus/2.4/linux/fs/udf/symlink.c linux/fs/udf/symlink.c
---- ../../linus/2.4/linux/fs/udf/symlink.c     Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/symlink.c     Thu Aug  8 20:44:32 2002
-@@ -87,14 +87,7 @@
-       
-       lock_kernel();
-       if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB)
--      {
--              bh = udf_tread(inode->i_sb, inode->i_ino);
--
--              if (!bh)
--                      goto out;
--
--              symlink = bh->b_data + udf_file_entry_alloc_offset(inode);
--      }
-+              symlink = UDF_I_DATA(inode) + UDF_I_LENALLOC(inode);
-       else
-       {
-               bh = sb_bread(inode->i_sb, udf_block_map(inode, 0));
-diff -u -r -N ../../linus/2.4/linux/fs/udf/truncate.c linux/fs/udf/truncate.c
---- ../../linus/2.4/linux/fs/udf/truncate.c    Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/truncate.c    Thu Aug  8 20:44:32 2002
-@@ -57,7 +57,9 @@
-               if (last_block - first_block > 0)
-               {
-                       if (etype == (EXT_RECORDED_ALLOCATED >> 30))
-+                      {
-                               mark_inode_dirty(inode);
-+                      }
-                       if (etype != (EXT_NOT_RECORDED_NOT_ALLOCATED >> 30))
-                               udf_free_blocks(inode->i_sb, inode, eloc, first_block, last_block - first_block);
-@@ -94,7 +96,7 @@
-               else
-                       lenalloc = extoffset - adsize;
--              if (!memcmp(&UDF_I_LOCATION(inode), &bloc, sizeof(lb_addr)))
-+              if (!bh)
-                       lenalloc -= udf_file_entry_alloc_offset(inode);
-               else
-                       lenalloc -= sizeof(struct allocExtDesc);
-@@ -107,15 +109,15 @@
-                               extoffset = 0;
-                               if (lelen)
-                               {
--                                      if (!memcmp(&UDF_I_LOCATION(inode), &bloc, sizeof(lb_addr)))
--                                              memset(bh->b_data, 0x00, udf_file_entry_alloc_offset(inode));
-+                                      if (!bh)
-+                                              BUG();
-                                       else
-                                               memset(bh->b_data, 0x00, sizeof(struct allocExtDesc));
-                                       udf_free_blocks(inode->i_sb, inode, bloc, 0, lelen);
-                               }
-                               else
-                               {
--                                      if (!memcmp(&UDF_I_LOCATION(inode), &bloc, sizeof(lb_addr)))
-+                                      if (!bh)
-                                       {
-                                               UDF_I_LENALLOC(inode) = lenalloc;
-                                               mark_inode_dirty(inode);
-@@ -134,9 +136,9 @@
-                               }
-                               udf_release_data(bh);
--                              bh = NULL;
--
-+                              extoffset = sizeof(struct allocExtDesc);
-                               bloc = eloc;
-+                              bh = udf_tread(inode->i_sb, udf_get_lb_pblock(inode->i_sb, bloc, 0));
-                               if (elen)
-                                       lelen = (elen + inode->i_sb->s_blocksize - 1) >>
-                                               inode->i_sb->s_blocksize_bits;
-@@ -152,15 +154,15 @@
-               if (lelen)
-               {
--                      if (!memcmp(&UDF_I_LOCATION(inode), &bloc, sizeof(lb_addr)))
--                              memset(bh->b_data, 0x00, udf_file_entry_alloc_offset(inode));
-+                      if (!bh)
-+                              BUG();
-                       else
-                               memset(bh->b_data, 0x00, sizeof(struct allocExtDesc));
-                       udf_free_blocks(inode->i_sb, inode, bloc, 0, lelen);
-               }
-               else
-               {
--                      if (!memcmp(&UDF_I_LOCATION(inode), &bloc, sizeof(lb_addr)))
-+                      if (!bh)
-                       {
-                               UDF_I_LENALLOC(inode) = lenalloc;
-                               mark_inode_dirty(inode);
-diff -u -r -N ../../linus/2.4/linux/fs/udf/udf_i.h linux/fs/udf/udf_i.h
---- ../../linus/2.4/linux/fs/udf/udf_i.h       Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/udf_i.h       Thu Aug  8 20:44:32 2002
-@@ -9,14 +9,17 @@
- #define UDF_I_LENEXTENTS(X)   ( UDF_I(X)->i_lenExtents )
- #define UDF_I_UNIQUE(X)               ( UDF_I(X)->i_unique )
- #define UDF_I_ALLOCTYPE(X)    ( UDF_I(X)->i_alloc_type )
--#define UDF_I_EXTENDED_FE(X)  ( UDF_I(X)->i_extended_fe )
--#define UDF_I_STRAT4096(X)    ( UDF_I(X)->i_strat_4096 )
--#define UDF_I_NEW_INODE(X)    ( UDF_I(X)->i_new_inode )
-+#define UDF_I_EFE(X)          ( UDF_I(X)->i_efe )
-+#define UDF_I_USE(X)          ( UDF_I(X)->i_use )
-+#define UDF_I_STRAT4096(X)    ( UDF_I(X)->i_strat4096 )
- #define UDF_I_NEXT_ALLOC_BLOCK(X)     ( UDF_I(X)->i_next_alloc_block )
- #define UDF_I_NEXT_ALLOC_GOAL(X)      ( UDF_I(X)->i_next_alloc_goal )
- #define UDF_I_UMTIME(X)               ( UDF_I(X)->i_umtime )
- #define UDF_I_UCTIME(X)               ( UDF_I(X)->i_uctime )
- #define UDF_I_CRTIME(X)               ( UDF_I(X)->i_crtime )
- #define UDF_I_UCRTIME(X)      ( UDF_I(X)->i_ucrtime )
-+#define UDF_I_SAD(X)          ( UDF_I(X)->i_ext.i_sad )
-+#define UDF_I_LAD(X)          ( UDF_I(X)->i_ext.i_lad )
-+#define UDF_I_DATA(X)         ( UDF_I(X)->i_ext.i_data )
- #endif /* !defined(_LINUX_UDF_I_H) */
-diff -u -r -N ../../linus/2.4/linux/fs/udf/udfdecl.h linux/fs/udf/udfdecl.h
---- ../../linus/2.4/linux/fs/udf/udfdecl.h     Tue Aug  6 21:16:21 2002
-+++ linux/fs/udf/udfdecl.h     Thu Aug  8 20:44:32 2002
-@@ -34,9 +34,11 @@
- #define CURRENT_UTIME (xtime.tv_usec)
- #define udf_file_entry_alloc_offset(inode)\
--      ((UDF_I_EXTENDED_FE(inode) ?\
--              sizeof(struct extendedFileEntry) :\
--              sizeof(struct fileEntry)) + UDF_I_LENEATTR(inode))
-+      (UDF_I_USE(inode) ?\
-+              sizeof(struct unallocSpaceEntry) :\
-+              ((UDF_I_EFE(inode) ?\
-+                      sizeof(struct extendedFileEntry) :\
-+                      sizeof(struct fileEntry)) + UDF_I_LENEATTR(inode)))
- #define udf_ext0_offset(inode)\
-       (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ?\
-@@ -113,6 +115,7 @@
- extern void udf_read_inode(struct inode *);
- extern void udf_put_inode(struct inode *);
- extern void udf_delete_inode(struct inode *);
-+extern void udf_clear_inode(struct inode *);
- extern void udf_write_inode(struct inode *, int);
- extern long udf_block_map(struct inode *, long);
- extern int8_t inode_bmap(struct inode *, int, lb_addr *, uint32_t *, lb_addr *, uint32_t *, uint32_t *, struct buffer_head **);
-@@ -199,8 +202,8 @@
- /* directory.c */
- extern struct fileIdentDesc * udf_get_fileident(void * buffer, int bufsize, int * offset);
- extern extent_ad * udf_get_fileextent(void * buffer, int bufsize, int * offset);
--extern long_ad * udf_get_filelongad(void * buffer, int bufsize, int * offset, int);
--extern short_ad * udf_get_fileshortad(void * buffer, int bufsize, int * offset, int);
-+extern long_ad * udf_get_filelongad(uint8_t *, int, int *, int);
-+extern short_ad * udf_get_fileshortad(uint8_t *, int, int *, int);
- extern uint8_t * udf_get_filead(struct fileEntry *, uint8_t *, int, int, int, int *);
- #endif /* __UDF_DECL_H */
-diff -u -r -N ../../linus/2.4/linux/include/linux/cdrom.h linux/include/linux/cdrom.h
---- ../../linus/2.4/linux/include/linux/cdrom.h        Tue Aug  6 21:17:10 2002
-+++ linux/include/linux/cdrom.h        Tue Aug  6 21:24:33 2002
-@@ -494,6 +494,7 @@
- /* Mode page codes for mode sense/set */
- #define GPMODE_R_W_ERROR_PAGE         0x01
- #define GPMODE_WRITE_PARMS_PAGE               0x05
-+#define GPMODE_WCACHING_PAGE          0x08
- #define GPMODE_AUDIO_CTL_PAGE         0x0e
- #define GPMODE_POWER_PAGE             0x1a
- #define GPMODE_FAULT_FAIL_PAGE                0x1c
-@@ -504,6 +505,11 @@
-  * of MODE_SENSE_POWER_PAGE */
- #define GPMODE_CDROM_PAGE             0x0d
-+#define GPMODE_PAGE_CURRENT           0
-+#define GPMODE_PAGE_CHANGE            1
-+#define GPMODE_PAGE_DEFAULT           2
-+#define GPMODE_PAGE_SAVE              3
-+
- /* DVD struct types */
-diff -u -r -N ../../linus/2.4/linux/include/linux/fs.h linux/include/linux/fs.h
---- ../../linus/2.4/linux/include/linux/fs.h   Tue Aug  6 21:17:11 2002
-+++ linux/include/linux/fs.h   Tue Aug  6 21:24:33 2002
-@@ -894,6 +894,7 @@
-       int (*remount_fs) (struct super_block *, int *, char *);
-       void (*clear_inode) (struct inode *);
-       void (*umount_begin) (struct super_block *);
-+      int (*relocate_blocks) (struct super_block *, unsigned long, unsigned long *);
-       /* Following are for knfsd to interact with "interesting" filesystems
-        * Currently just reiserfs, but possibly FAT and others later
-diff -u -r -N ../../linus/2.4/linux/include/linux/major.h linux/include/linux/major.h
---- ../../linus/2.4/linux/include/linux/major.h        Tue Aug  6 21:17:15 2002
-+++ linux/include/linux/major.h        Tue Aug  6 21:24:45 2002
-@@ -108,6 +108,8 @@
- #define SPECIALIX_NORMAL_MAJOR 75
- #define SPECIALIX_CALLOUT_MAJOR 76
-+#define PACKET_MAJOR          97
-+
- #define COMPAQ_CISS_MAJOR     104
- #define COMPAQ_CISS_MAJOR1    105
- #define COMPAQ_CISS_MAJOR2      106
-diff -u -r -N ../../linus/2.4/linux/include/linux/pktcdvd.h linux/include/linux/pktcdvd.h
---- ../../linus/2.4/linux/include/linux/pktcdvd.h      Thu Jan  1 01:00:00 1970
-+++ linux/include/linux/pktcdvd.h      Wed Aug  7 21:55:25 2002
-@@ -0,0 +1,215 @@
-+/*
-+ * Copyright (C) 2000 Jens Axboe <axboe@suse.de>
-+ *
-+ * May be copied or modified under the terms of the GNU General Public
-+ * License.  See linux/COPYING for more information.
-+ *
-+ * Packet writing layer for ATAPI and SCSI CD-R, CD-RW, DVD-R, and
-+ * DVD-RW devices.
-+ *
-+ */
-+#ifndef __PKTCDVD_H
-+#define __PKTCDVD_H
-+
-+/*
-+ * 1 for normal debug messages, 2 is very verbose. 0 to turn it off.
-+ */
-+#define PACKET_DEBUG          1
-+
-+#define       MAX_WRITERS             8
-+
-+#define STACKED_BH_POOL_SIZE  64
-+
-+/*
-+ * use drive write caching -- we need deferred error handling to be
-+ * able to sucessfully recover with this option (drive will return good
-+ * status as soon as the cdb is validated).
-+ */
-+#if defined(CONFIG_CDROM_PKTCDVD_WCACHE)
-+#warning Enabling write caching, use at your own risk
-+#define USE_WCACHING          1
-+#else
-+#define USE_WCACHING          0
-+#endif
-+
-+/*
-+ * No user-servicable parts beyond this point ->
-+ */
-+
-+#if PACKET_DEBUG
-+#define DPRINTK(fmt, args...) printk(KERN_NOTICE fmt, ##args)
-+#else
-+#define DPRINTK(fmt, args...)
-+#endif
-+
-+#if PACKET_DEBUG > 1
-+#define VPRINTK(fmt, args...) printk(KERN_NOTICE fmt, ##args)
-+#else
-+#define VPRINTK(fmt, args...)
-+#endif
-+
-+#define PKT_BUF_LIST          0x89
-+
-+/*
-+ * device types
-+ */
-+#define PACKET_CDR            1
-+#define       PACKET_CDRW             2
-+#define PACKET_DVDR           3
-+#define PACKET_DVDRW          4
-+
-+/*
-+ * flags
-+ */
-+#define PACKET_WRITEABLE      1       /* pd is writeable */
-+#define PACKET_NWA_VALID      2       /* next writeable address valid */
-+#define PACKET_LRA_VALID      3       /* last recorded address valid */
-+#define PACKET_READONLY               4       /* read only pd */
-+#define PACKET_RECOVERY               5       /* rq recovery in progress */
-+#define PACKET_RQ             6       /* current rq is set */
-+#define PACKET_BUSY           7       /* current rq is being processed */
-+
-+/*
-+ * Disc status -- from READ_DISC_INFO
-+ */
-+#define PACKET_DISC_EMPTY     0
-+#define PACKET_DISC_INCOMPLETE        1
-+#define PACKET_DISC_COMPLETE  2
-+#define PACKET_DISC_OTHER     3
-+
-+/*
-+ * write type, and corresponding data block type
-+ */
-+#define PACKET_MODE1          1
-+#define PACKET_MODE2          2
-+#define PACKET_BLOCK_MODE1    8
-+#define PACKET_BLOCK_MODE2    10
-+
-+/*
-+ * Last session/border status
-+ */
-+#define PACKET_SESSION_EMPTY          0
-+#define PACKET_SESSION_INCOMPLETE     1
-+#define PACKET_SESSION_RESERVED               2
-+#define PACKET_SESSION_COMPLETE               3
-+
-+#define PACKET_MCN                    "4a656e734178626f65323030300000"
-+
-+#undef PACKET_USE_LS
-+
-+/*
-+ * special requests
-+ */
-+#define PKT_THROTTLE_SPEED    1
-+
-+#define PKT_TRAY_UNLOCK               0
-+#define PKT_TRAY_LOCK         1
-+
-+/*
-+ * Very crude stats for now
-+ */
-+struct packet_stats
-+{
-+      unsigned long           bh_s;
-+      unsigned long           bh_e;
-+      unsigned long           bh_cache_hits;
-+      unsigned long           page_cache_hits;
-+      unsigned long           secs_w;
-+      unsigned long           secs_r;
-+};
-+
-+/*
-+ * packet ioctls
-+ */
-+#define PACKET_IOCTL_MAGIC    ('X')
-+#define PACKET_GET_STATS      _IOR(PACKET_IOCTL_MAGIC, 0, struct packet_stats)
-+#define PACKET_SETUP_DEV      _IOW(PACKET_IOCTL_MAGIC, 1, unsigned int)
-+#define PACKET_TEARDOWN_DEV   _IOW(PACKET_IOCTL_MAGIC, 2, unsigned int)
-+
-+#ifdef __KERNEL__
-+#include <linux/blkdev.h>
-+#include <linux/completion.h>
-+
-+struct packet_settings
-+{
-+      __u8                    size;           /* packet size in frames */
-+      __u8                    fp;             /* fixed packets */
-+      __u8                    link_loss;      /* the rest is specified
-+                                               * as per Mt Fuji */
-+      __u8                    write_type;
-+      __u8                    track_mode;
-+      __u8                    block_mode;
-+};
-+
-+struct packet_cdrw
-+{
-+      struct buffer_head              *bhlist;        /* string of bhs */
-+      atomic_t                        free_bh;
-+      merge_request_fn                *front_merge_fn;
-+      merge_request_fn                *back_merge_fn;
-+      merge_requests_fn               *merge_requests_fn;
-+      request_queue_t                 r_queue;
-+      void                            *queuedata;
-+      pid_t                           pid;
-+      struct completion               thr_compl;
-+};
-+
-+struct pktcdvd_device
-+{
-+      struct block_device             *bdev;
-+      kdev_t                          dev;            /* dev attached */
-+      kdev_t                          pkt_dev;        /* our dev */
-+      char                            name[20];
-+      struct cdrom_device_info        *cdi;           /* cdrom matching dev */
-+      struct packet_settings          settings;
-+      struct packet_stats             stats;
-+      atomic_t                        refcnt;
-+      __u8                            speed;          /* cur write speed */
-+      unsigned long                   offset;         /* start offset */
-+      __u8                            mode_offset;    /* 0 / 8 */
-+      __u8                            type;
-+      unsigned long                   flags;
-+      __u8                            disc_status;
-+      __u8                            track_status;   /* last one */
-+      __u32                           nwa;    /* next writable address */
-+      __u32                           lra;    /* last recorded address */
-+      spinlock_t                      lock;
-+      struct packet_cdrw              cdrw;
-+      wait_queue_head_t               wqueue;
-+      struct request                  *rq;
-+      atomic_t                        wrqcnt;
-+      struct buffer_head              *stacked_bhlist;
-+      int                             stacked_bhcnt;
-+
-+      struct semaphore                cache_sync_mutex;
-+      int                             unflushed_writes;
-+
-+      make_request_fn                 *make_request_fn;
-+};
-+
-+/*
-+ * following possibly belongs in cdrom.h
-+ */
-+
-+struct cdvd_capacity
-+{
-+      __u32 lba;
-+      __u32 block_length;
-+};
-+
-+void pkt_elevator_merge_req(struct request *rq, struct request *nxt) {}
-+void pkt_elevator_cleanup(request_queue_t *q, struct request *rq, int count) {}
-+
-+#define ELEVATOR_PKTCDVD                                      \
-+((elevator_t) {                                                       \
-+      0,                              /* not used */          \
-+      0,                              /* not used */          \
-+                                                              \
-+      pkt_elevator_merge,             /* elevator_merge_fn */ \
-+      pkt_elevator_cleanup,                                   \
-+      pkt_elevator_merge_req,                                 \
-+      })
-+
-+#endif /* __KERNEL__ */
-+
-+#endif /* __PKTCDVD_H */
-diff -u -r -N ../../linus/2.4/linux/include/linux/udf_fs.h linux/include/linux/udf_fs.h
---- ../../linus/2.4/linux/include/linux/udf_fs.h       Tue Aug  6 21:17:20 2002
-+++ linux/include/linux/udf_fs.h       Thu Aug  8 20:44:32 2002
-@@ -30,7 +30,6 @@
-  * HISTORY
-  *
-  */
--#include <linux/config.h>
- #ifndef _UDF_FS_H
- #define _UDF_FS_H 1
-@@ -38,19 +37,9 @@
- #define UDF_PREALLOCATE
- #define UDF_DEFAULT_PREALLOC_BLOCKS   8
--#define UDFFS_DATE                    "2002/03/11"
-+#define UDFFS_DATE                    "2002/03/14"
- #define UDFFS_VERSION                 "0.9.6"
--#if !defined(UDFFS_RW)
--
--#if defined(CONFIG_UDF_RW)
--#define UDFFS_RW                      1
--#else /* !defined(CONFIG_UDF_RW) */
--#define UDFFS_RW                      0
--#endif /* defined(CONFIG_UDF_RW) */
--
--#endif /* !defined(UDFFS_RW) */
--
- #define UDFFS_DEBUG
- #ifdef UDFFS_DEBUG
-@@ -67,4 +56,12 @@
- #define udf_info(f, a...) \
-               printk (KERN_INFO "UDF-fs INFO " f, ##a);
-+#ifdef __KERNEL__
-+
-+#ifndef LINUX_VERSION_CODE
-+#include <linux/version.h>
-+#endif
-+
-+#endif /* __KERNEL__ */
-+
- #endif /* _UDF_FS_H */
-diff -u -r -N ../../linus/2.4/linux/include/linux/udf_fs_i.h linux/include/linux/udf_fs_i.h
---- ../../linus/2.4/linux/include/linux/udf_fs_i.h     Tue Aug  6 21:17:20 2002
-+++ linux/include/linux/udf_fs_i.h     Thu Aug  8 20:44:32 2002
-@@ -23,30 +23,49 @@
- #ifndef _ECMA_167_H
- typedef struct
- {
--      __u32 logicalBlockNum;
--      __u16 partitionReferenceNum;
-+      __u32                   logicalBlockNum;
-+      __u16                   partitionReferenceNum;
- } __attribute__ ((packed)) lb_addr;
-+
-+typedef struct
-+{
-+      __u32                   extLength;
-+      __u32                   extPosition;
-+} __attribute__ ((packed)) short_ad;
-+
-+typedef struct
-+{
-+      __u32                   extLength;
-+      lb_addr                 extLocation;
-+      __u8                    impUse[6];
-+} __attribute__ ((packed)) long_ad;
- #endif
- struct udf_inode_info
- {
--      long i_umtime;
--      long i_uctime;
--      long i_crtime;
--      long i_ucrtime;
-+      long                    i_umtime;
-+      long                    i_uctime;
-+      long                    i_crtime;
-+      long                    i_ucrtime;
-       /* Physical address of inode */
--      lb_addr i_location;
--      __u64 i_unique;
--      __u32 i_lenEAttr;
--      __u32 i_lenAlloc;
--      __u64 i_lenExtents;
--      __u32 i_next_alloc_block;
--      __u32 i_next_alloc_goal;
--      unsigned i_alloc_type : 3;
--      unsigned i_extended_fe : 1;
--      unsigned i_strat_4096 : 1;
--      unsigned i_new_inode : 1;
--      unsigned reserved : 26;
-+      lb_addr                 i_location;
-+      __u64                   i_unique;
-+      __u32                   i_lenEAttr;
-+      __u32                   i_lenAlloc;
-+      __u64                   i_lenExtents;
-+      __u32                   i_next_alloc_block;
-+      __u32                   i_next_alloc_goal;
-+      unsigned                i_alloc_type : 3;
-+      unsigned                i_efe : 1;
-+      unsigned                i_use : 1;
-+      unsigned                i_strat4096 : 1;
-+      unsigned                reserved : 26;
-+      union
-+      {
-+              short_ad        *i_sad;
-+              long_ad         *i_lad;
-+              __u8            *i_data;
-+      } i_ext;
- };
- #endif
diff --git a/kernel-pldfblogo.patch b/kernel-pldfblogo.patch
deleted file mode 100644 (file)
index 734396e..0000000
+++ /dev/null
@@ -1,4490 +0,0 @@
-diff -Nru linux/drivers/video/fbcon.c linux.pldlogo/drivers/video/fbcon.c
---- linux/drivers/video/fbcon.c        Thu Apr 20 09:22:54 2000
-+++ linux.pldlogo/drivers/video/fbcon.c        Thu Apr 20 09:22:24 2000
-@@ -107,8 +107,8 @@
- #  define DPRINTK(fmt, args...)
- #endif
--#define LOGO_H                        80
--#define LOGO_W                        80
-+#define LOGO_H                        100
-+#define LOGO_W                        200
- #define LOGO_LINE     (LOGO_W/8)
- struct display fb_display[MAX_NR_CONSOLES];
-diff -Nru linux/include/linux/linux_logo.h linux.pldlogo/include/linux/linux_logo.h
---- linux/include/linux/linux_logo.h   Wed Sep 30 23:16:33 1998
-+++ linux.pldlogo/include/linux/linux_logo.h   Thu Apr 20 09:09:04 2000
-@@ -27,887 +27,2611 @@
- #ifndef __HAVE_ARCH_LINUX_LOGO
- unsigned char linux_logo_red[] __initdata = {
--    0x00, 0x06, 0x0a, 0x0e, 0x16, 0x1a, 0x1e, 0x22,
--    0x12, 0x00, 0x2a, 0x36, 0x42, 0x4e, 0x4a, 0x56,
--    0x26, 0x46, 0x2e, 0x32, 0x52, 0x3a, 0x02, 0x65,
--    0x5e, 0x3e, 0x74, 0x8a, 0xa2, 0x9a, 0x86, 0xc6,
--    0xc3, 0x65, 0xbb, 0xd2, 0xda, 0xd6, 0xe2, 0xf6,
--    0xfd, 0xae, 0x7b, 0xdd, 0xea, 0x6a, 0xaa, 0xe7,
--    0xbe, 0x5a, 0xee, 0x9e, 0x95, 0x80, 0x76, 0x79,
--    0x62, 0x36, 0x9a, 0xe2, 0xec, 0xe1, 0xb8, 0xd7,
--    0xaf, 0x25, 0xbc, 0xc0, 0xef, 0xea, 0xe8, 0xe8,
--    0xf5, 0xf1, 0xda, 0xd3, 0x79, 0xdb, 0xf4, 0xf6,
--    0xf6, 0xf6, 0xe2, 0x3d, 0xb4, 0xce, 0xe6, 0xee,
--    0xf6, 0x68, 0xd8, 0xec, 0xf5, 0xc6, 0xc8, 0x9c,
--    0x89, 0xd2, 0xee, 0xcb, 0xb9, 0xd2, 0x66, 0x5e,
--    0x8b, 0xbe, 0xa8, 0xd5, 0xca, 0xb6, 0xae, 0x9c,
--    0xc5, 0xbe, 0xbe, 0xca, 0x90, 0xb2, 0x9a, 0xa8,
--    0xb6, 0xf2, 0xce, 0xfa, 0xb2, 0x6e, 0xa6, 0x12,
--    0x4a, 0x8e, 0xf2, 0xf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xea, 0xfe, 0xfe, 0xfe, 0xfe,
-+ 0xee, 0xea, 0xea, 0xfe, 0xfe, 0xfe, 0xfe, 0xc6,
-+ 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xc6,
-+ 0xd6, 0xda, 0xe8, 0xe4, 0xfe, 0xfe, 0xfe, 0xfe,
-+ 0xea, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfa, 0xe6,
-+ 0xf6, 0xde, 0xfe, 0xfe, 0xfe, 0xfe, 0x86, 0x8a,
-+ 0x96, 0x9e, 0xa2, 0xac, 0xb6, 0xbe, 0xc2, 0xce,
-+ 0xca, 0xfe, 0xfe, 0xd0, 0xd6, 0xfe, 0xfe, 0xfe,
-+ 0xe2, 0xfe, 0xfe, 0xfe, 0xc2, 0xce, 0xd6, 0xe2,
-+ 0xfa, 0xfa, 0xe6, 0xea, 0xfe, 0xfa, 0xfe, 0xfe,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- };
- unsigned char linux_logo_green[] __initdata = {
--    0x00, 0x06, 0x0a, 0x0e, 0x16, 0x1a, 0x1e, 0x22,
--    0x12, 0x00, 0x2a, 0x36, 0x42, 0x4e, 0x4a, 0x56,
--    0x26, 0x46, 0x2e, 0x32, 0x52, 0x3a, 0x02, 0x65,
--    0x5e, 0x3e, 0x74, 0x8a, 0xa2, 0x9a, 0x86, 0xc6,
--    0xc3, 0x62, 0xbb, 0xd2, 0xda, 0xd6, 0xe2, 0xf6,
--    0xfd, 0xae, 0x7b, 0xdd, 0xea, 0x6a, 0xaa, 0xe7,
--    0xbe, 0x5a, 0xee, 0x9e, 0x95, 0x80, 0x62, 0x5c,
--    0x4e, 0x26, 0x72, 0xaa, 0xba, 0xaf, 0x90, 0xae,
--    0x92, 0x1a, 0xa4, 0x85, 0xb6, 0xbe, 0xc3, 0xc8,
--    0xcf, 0xd0, 0xc2, 0xce, 0x57, 0xa2, 0xd6, 0xda,
--    0xda, 0xd7, 0xb8, 0x2a, 0x7b, 0x91, 0xae, 0xca,
--    0xda, 0x45, 0x9e, 0xb2, 0xd7, 0x9b, 0x90, 0x76,
--    0x5c, 0xa2, 0xbe, 0xa6, 0x85, 0x96, 0x4e, 0x46,
--    0x66, 0x92, 0x7a, 0x9a, 0x96, 0x9d, 0x9a, 0x6b,
--    0x8a, 0x8e, 0xb2, 0xca, 0x90, 0xa6, 0x79, 0x7c,
--    0xb6, 0xf2, 0xce, 0xfa, 0xb2, 0x6e, 0xa6, 0x0e,
--    0x36, 0x86, 0xba, 0xbe, 0xe6, 0xcc, 0x8e, 0xb8,
--    0xc4, 0x1e, 0x8e, 0xae, 0xba, 0xb2, 0xa6, 0x12,
--    0x7a, 0x20, 0x64, 0xaa, 0x2f, 0x70, 0x85, 0x46,
--    0xa6, 0x6e, 0x51, 0x72, 0x92, 0xa2, 0xa6, 0x87,
--    0x96, 0xa2, 0x85, 0x7a, 0x6a, 0x6e, 0x22, 0x76,
--    0x36, 0x76, 0x3c, 0x6e, 0x63, 0x53, 0x66, 0x62,
--    0x42, 0x50, 0x56, 0x42, 0x56, 0x56, 0x56, 0x3e,
--    0x51, 0x52, 0x56,
-+ 0x02, 0x0a, 0x02, 0x16, 0x1e, 0x02, 0x16, 0x06,
-+ 0x1a, 0x26, 0x2e, 0x26, 0x2a, 0x36, 0x3e, 0x0a,
-+ 0x16, 0x0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 0xea, 0xe2, 0xf6, 0xfe, 0xfe,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- };
- unsigned char linux_logo_blue[] __initdata = {
--    0x00, 0x06, 0x0a, 0x0e, 0x16, 0x1a, 0x1e, 0x22,
--    0x12, 0x01, 0x2a, 0x36, 0x42, 0x4e, 0x4a, 0x56,
--    0x26, 0x46, 0x2e, 0x32, 0x52, 0x3a, 0x06, 0x65,
--    0x5e, 0x3e, 0x74, 0x8a, 0xa2, 0x9a, 0x86, 0xc6,
--    0xc3, 0x59, 0xbb, 0xd2, 0xda, 0xd6, 0xe2, 0xf6,
--    0xfd, 0xae, 0x7b, 0xdd, 0xea, 0x6a, 0xaa, 0xe7,
--    0xbe, 0x5a, 0xee, 0x9e, 0x95, 0x80, 0x2e, 0x08,
--    0x0a, 0x06, 0x0a, 0x0b, 0x0b, 0x0f, 0x0c, 0x0f,
--    0x3d, 0x09, 0x73, 0x09, 0x0d, 0x0a, 0x10, 0x1e,
--    0x2d, 0x13, 0x86, 0xba, 0x19, 0x0a, 0x36, 0x3c,
--    0x26, 0x14, 0x0d, 0x06, 0x07, 0x0a, 0x0b, 0x0f,
--    0x4a, 0x06, 0x0a, 0x0c, 0x2b, 0x0a, 0x0b, 0x0a,
--    0x06, 0x0a, 0x0a, 0x11, 0x0b, 0x0a, 0x0a, 0x1e,
--    0x0f, 0x0d, 0x0a, 0x0b, 0x22, 0x6a, 0x72, 0x0b,
--    0x0b, 0x22, 0x90, 0xca, 0x90, 0x92, 0x3c, 0x2c,
--    0xb6, 0xf2, 0xce, 0xfa, 0xb2, 0x6e, 0xa6, 0x06,
--    0x0e, 0x6a, 0x0e, 0x0e, 0xbe, 0x5b, 0x2c, 0x3e,
--    0x0e, 0x0a, 0x5a, 0x0d, 0x0e, 0x3e, 0x0a, 0x06,
--    0x2e, 0x06, 0x4e, 0x36, 0x06, 0x58, 0x24, 0x06,
--    0x3a, 0x08, 0x08, 0x07, 0x5e, 0x45, 0x0a, 0x32,
--    0x2e, 0x2a, 0x43, 0x48, 0x5f, 0x2e, 0x06, 0x06,
--    0x07, 0x24, 0x06, 0x32, 0x06, 0x06, 0x46, 0x2e,
--    0x22, 0x06, 0x06, 0x1e, 0x4c, 0x06, 0x3a, 0x22,
--    0x42, 0x34, 0x42,
-+ 0x06, 0x0a, 0x06, 0x12, 0x1a, 0x06, 0x06, 0x06,
-+ 0x06, 0x1e, 0x1e, 0x06, 0x26, 0x2a, 0x32, 0x06,
-+ 0x06, 0x06, 0x06, 0x06, 0x06, 0x16, 0x06, 0x06,
-+ 0x06, 0x06, 0x06, 0x16, 0x06, 0x0c, 0x06, 0x0a,
-+ 0x06, 0x06, 0x06, 0x42, 0x4a, 0x56, 0x5a, 0x62,
-+ 0x6a, 0x72, 0x7a, 0x06, 0x09, 0x0a, 0x0a, 0x06,
-+ 0x12, 0x0e, 0x16, 0x12, 0x0e, 0x15, 0x17, 0x0e,
-+ 0x16, 0x0e, 0x16, 0x1e, 0x06, 0x2a, 0x06, 0x06,
-+ 0x06, 0x06, 0x06, 0x06, 0x17, 0x1a, 0x0a, 0x16,
-+ 0x16, 0x06, 0x2a, 0x1e, 0x1a, 0x1e, 0x26, 0x0a,
-+ 0x0e, 0x0e, 0x12, 0x06, 0x06, 0x06, 0x06, 0x06,
-+ 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x56, 0x52,
-+ 0x5e, 0x0f, 0x13, 0x1a, 0x12, 0x0e, 0x16, 0x0e,
-+ 0x12, 0x0e, 0x0d, 0x7a, 0x12, 0x26, 0x1e, 0x0e,
-+ 0x1e, 0x22, 0x0e, 0x1b, 0x06, 0x06, 0x06, 0x06,
-+ 0x1a, 0x1e, 0x1a, 0x06, 0x06, 0x06, 0x06, 0x6e,
-+ 0x5a, 0x66, 0x76, 0x56, 0x4a, 0x4e, 0x76, 0x12,
-+ 0x1e, 0x26, 0x12, 0x18, 0x06, 0x06, 0x06, 0x06,
-+ 0x2e, 0x32, 0x06, 0x06, 0x0a, 0x06, 0x1e, 0x22,
-+ 0x2a, 0x4e, 0x5e, 0x5e, 0x56, 0x56, 0x82, 0x8e,
-+ 0x92, 0x9e, 0xa2, 0xaa, 0xb2, 0xba, 0x82, 0x86,
-+ 0x8a, 0xa2, 0xaa, 0x98, 0xbe, 0xae, 0xae, 0xa6,
-+ 0xa6, 0xa6, 0xaa, 0xa6, 0xc2, 0xca, 0xd6, 0xda,
-+ 0xc2, 0xda, 0xe2, 0xe6, 0xe2, 0xe2, 0xe6, 0xfe,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
- };
- unsigned char linux_logo[] __initdata = {
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x22, 0x22,
--    0x22, 0x21, 0x21, 0x21, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
--    0x26, 0x26, 0x25, 0x28, 0x23, 0x22, 0x21, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x21, 0x23, 0x25, 0x2a, 0x2b, 0x2c, 0x2d, 0x2d,
--    0x2d, 0x2e, 0x2c, 0x2b, 0x2a, 0x25, 0x28, 0x22,
--    0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
--    0x24, 0x2a, 0x2c, 0x2f, 0x2c, 0x30, 0x30, 0x24,
--    0x25, 0x27, 0x2b, 0x2c, 0x2f, 0x31, 0x32, 0x25,
--    0x23, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x25,
--    0x33, 0x34, 0x35, 0x21, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x21, 0x2b, 0x2f, 0x2c,
--    0x30, 0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x24, 0x33,
--    0x2d, 0x27, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x21, 0x31,
--    0x2d, 0x32, 0x24, 0x21, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x21, 0x28, 0x2a, 0x34,
--    0x25, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x23, 0x32, 0x27, 0x21, 0x36,
--    0x2a, 0x2d, 0x2a, 0x28, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x20, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x22, 0x26, 0x2c, 0x35,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x25, 0x2f, 0x37, 0x32, 0x22,
--    0x36, 0x35, 0x31, 0x27, 0x22, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x23, 0x2a, 0x2f, 0x22,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x26, 0x38, 0x38, 0x35, 0x25,
--    0x36, 0x21, 0x2d, 0x2b, 0x24, 0x21, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x21, 0x24, 0x39, 0x39, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x25, 0x2b, 0x30, 0x28, 0x22,
--    0x36, 0x36, 0x27, 0x34, 0x30, 0x23, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x21, 0x26, 0x2d, 0x26, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x22, 0x22, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x2d, 0x33, 0x28, 0x21, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x30, 0x2f, 0x23, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x2b, 0x2c, 0x25, 0x21, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x2a, 0x34, 0x36, 0x36,
--    0x36, 0x21, 0x22, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x21, 0x23, 0x22, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x28, 0x34, 0x27, 0x22, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x32, 0x2f, 0x36, 0x36,
--    0x21, 0x21, 0x24, 0x27, 0x21, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x28, 0x27, 0x22, 0x33, 0x24, 0x36,
--    0x36, 0x36, 0x36, 0x22, 0x2f, 0x2a, 0x23, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x32, 0x2f, 0x36, 0x36,
--    0x30, 0x3a, 0x38, 0x24, 0x24, 0x36, 0x36, 0x36,
--    0x23, 0x2f, 0x3b, 0x3c, 0x3d, 0x30, 0x25, 0x21,
--    0x36, 0x36, 0x36, 0x36, 0x2f, 0x32, 0x23, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x32, 0x2f, 0x36, 0x23,
--    0x3e, 0x3f, 0x40, 0x3a, 0x22, 0x36, 0x36, 0x21,
--    0x41, 0x42, 0x43, 0x44, 0x45, 0x3e, 0x23, 0x21,
--    0x36, 0x36, 0x36, 0x36, 0x2f, 0x33, 0x28, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x29, 0x20, 0x29, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x32, 0x2f, 0x36, 0x2b,
--    0x44, 0x40, 0x46, 0x47, 0x35, 0x36, 0x36, 0x26,
--    0x43, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x2e, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x31, 0x35, 0x24, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x32, 0x34, 0x36, 0x4d,
--    0x4e, 0x25, 0x2f, 0x46, 0x4a, 0x22, 0x23, 0x32,
--    0x4f, 0x50, 0x21, 0x31, 0x51, 0x52, 0x53, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x31, 0x35, 0x24, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x29, 0x20, 0x29, 0x29, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x2a, 0x2f, 0x21, 0x3a,
--    0x4d, 0x21, 0x31, 0x54, 0x55, 0x28, 0x30, 0x2b,
--    0x4b, 0x4d, 0x36, 0x23, 0x32, 0x50, 0x3f, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x2e, 0x39, 0x24, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x29, 0x20, 0x29, 0x20, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x2a, 0x38, 0x23, 0x37,
--    0x55, 0x36, 0x28, 0x3a, 0x56, 0x57, 0x57, 0x58,
--    0x3c, 0x4d, 0x36, 0x36, 0x36, 0x40, 0x40, 0x21,
--    0x36, 0x36, 0x36, 0x36, 0x2e, 0x39, 0x24, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x29, 0x29, 0x29, 0x20, 0x29, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x30, 0x51, 0x23, 0x35,
--    0x43, 0x25, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e,
--    0x5f, 0x60, 0x61, 0x36, 0x31, 0x47, 0x3b, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x31, 0x2c, 0x25, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x30, 0x2f, 0x23, 0x22,
--    0x40, 0x62, 0x63, 0x5d, 0x64, 0x65, 0x66, 0x67,
--    0x68, 0x69, 0x66, 0x5e, 0x6a, 0x6b, 0x2a, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x33, 0x2e, 0x26, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x27, 0x2f, 0x23, 0x36,
--    0x6c, 0x63, 0x6d, 0x64, 0x5c, 0x66, 0x69, 0x6e,
--    0x6f, 0x70, 0x71, 0x69, 0x69, 0x72, 0x6c, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x33, 0x34, 0x27, 0x22,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x27, 0x34, 0x26, 0x73,
--    0x74, 0x75, 0x76, 0x64, 0x65, 0x77, 0x69, 0x78,
--    0x70, 0x71, 0x71, 0x71, 0x72, 0x5f, 0x5e, 0x21,
--    0x36, 0x36, 0x36, 0x36, 0x25, 0x38, 0x2a, 0x23,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x26, 0x2d, 0x33, 0x79,
--    0x63, 0x7a, 0x7b, 0x5c, 0x66, 0x69, 0x6e, 0x7c,
--    0x71, 0x71, 0x69, 0x7d, 0x7e, 0x7a, 0x7f, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x21, 0x51, 0x2b, 0x28,
--    0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x26, 0x2d, 0x32, 0x24,
--    0x80, 0x81, 0x64, 0x82, 0x77, 0x69, 0x71, 0x71,
--    0x69, 0x83, 0x84, 0x85, 0x7a, 0x85, 0x86, 0x36,
--    0x21, 0x2b, 0x23, 0x36, 0x36, 0x39, 0x2e, 0x26,
--    0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x27, 0x2d, 0x33, 0x21,
--    0x87, 0x88, 0x89, 0x72, 0x67, 0x66, 0x5f, 0x89,
--    0x8a, 0x63, 0x85, 0x8b, 0x8c, 0x8d, 0x41, 0x36,
--    0x36, 0x2d, 0x3a, 0x35, 0x36, 0x24, 0x51, 0x32,
--    0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x30, 0x2f, 0x33, 0x21,
--    0x55, 0x8e, 0x8f, 0x8a, 0x7d, 0x5e, 0x90, 0x7e,
--    0x75, 0x75, 0x90, 0x62, 0x40, 0x3f, 0x49, 0x23,
--    0x36, 0x24, 0x3a, 0x3a, 0x24, 0x36, 0x2e, 0x31,
--    0x26, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x21, 0x28, 0x33, 0x37, 0x25, 0x22,
--    0x3b, 0x50, 0x8e, 0x8f, 0x90, 0x7e, 0x90, 0x63,
--    0x74, 0x91, 0x92, 0x42, 0x93, 0x4b, 0x45, 0x2c,
--    0x36, 0x36, 0x33, 0x39, 0x21, 0x36, 0x22, 0x51,
--    0x33, 0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x22, 0x27, 0x2e, 0x2e, 0x36, 0x21,
--    0x94, 0x3f, 0x50, 0x95, 0x96, 0x8f, 0x8f, 0x97,
--    0x8e, 0x42, 0x50, 0x43, 0x47, 0x48, 0x48, 0x98,
--    0x21, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x39,
--    0x2e, 0x27, 0x23, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x22, 0x24, 0x2b, 0x38, 0x28, 0x36, 0x32,
--    0x4c, 0x4b, 0x50, 0x50, 0x50, 0x42, 0x42, 0x50,
--    0x50, 0x40, 0x45, 0x99, 0x48, 0x48, 0x48, 0x48,
--    0x34, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x23,
--    0x2f, 0x2b, 0x24, 0x21, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x21, 0x28, 0x32, 0x51, 0x32, 0x28, 0x21, 0x98,
--    0x48, 0x47, 0x9a, 0x50, 0x50, 0x50, 0x50, 0x50,
--    0x9a, 0x4f, 0x9b, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x93, 0x23, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x2a, 0x2f, 0x2a, 0x28, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x23, 0x30, 0x2e, 0x2c, 0x36, 0x21, 0x51, 0x9b,
--    0x48, 0x48, 0x52, 0x3f, 0x50, 0x50, 0x40, 0x4b,
--    0x47, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x34, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x2d, 0x31, 0x27, 0x23, 0x21, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x23,
--    0x27, 0x2c, 0x2d, 0x21, 0x36, 0x28, 0x44, 0x48,
--    0x48, 0x48, 0x48, 0x47, 0x46, 0x4f, 0x47, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x9c, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x28, 0x51, 0x39, 0x26, 0x22, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x25,
--    0x35, 0x51, 0x28, 0x36, 0x36, 0x9d, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x9b, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x4f, 0x28, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x28, 0x38, 0x2b, 0x25, 0x22, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x24, 0x33,
--    0x51, 0x25, 0x36, 0x36, 0x23, 0x40, 0x9b, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x9b, 0x99, 0x2b, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x30, 0x2f, 0x33, 0x24, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x21, 0x23, 0x30, 0x34,
--    0x27, 0x36, 0x36, 0x36, 0x2a, 0x40, 0x47, 0x48,
--    0x48, 0x48, 0x48, 0x9b, 0x99, 0x99, 0x9b, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x9b, 0x47, 0x52,
--    0x46, 0x4f, 0x37, 0x21, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x30, 0x34, 0x2a, 0x23,
--    0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x22, 0x25, 0x39, 0x2c,
--    0x36, 0x36, 0x36, 0x21, 0x31, 0x4e, 0x9a, 0x4c,
--    0x47, 0x9b, 0x9b, 0x52, 0x46, 0x4f, 0x52, 0x9b,
--    0x9b, 0x9b, 0x47, 0x4f, 0x45, 0x9a, 0x93, 0x93,
--    0x3f, 0x93, 0x98, 0x28, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x39, 0x2c, 0x26,
--    0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x23, 0x2a, 0x34, 0x28,
--    0x36, 0x36, 0x36, 0x22, 0x38, 0x98, 0x44, 0x99,
--    0x9b, 0x48, 0x48, 0x9b, 0x4c, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x47, 0x52, 0x46, 0x43, 0x93,
--    0x40, 0x40, 0x43, 0x53, 0x21, 0x23, 0x33, 0x23,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x21, 0x2f, 0x32,
--    0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x21, 0x24, 0x2b, 0x31, 0x36,
--    0x36, 0x22, 0x36, 0x24, 0x9e, 0x4f, 0x9b, 0x48,
--    0x48, 0x48, 0x48, 0x9b, 0x99, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x47,
--    0x4f, 0x9a, 0x3f, 0x46, 0x38, 0x36, 0x21, 0x30,
--    0x26, 0x36, 0x36, 0x36, 0x36, 0x36, 0x39, 0x2c,
--    0x25, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x22, 0x26, 0x2e, 0x33, 0x36,
--    0x25, 0x25, 0x36, 0x4d, 0x52, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x47, 0x44, 0x93, 0x43, 0x23, 0x36, 0x36,
--    0x26, 0x24, 0x36, 0x36, 0x36, 0x36, 0x28, 0x2f,
--    0x2a, 0x23, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x23, 0x2a, 0x51, 0x24, 0x36,
--    0x2a, 0x36, 0x28, 0x44, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x9b, 0x4b, 0x44, 0x37, 0x36, 0x23,
--    0x28, 0x30, 0x22, 0x36, 0x36, 0x36, 0x36, 0x2d,
--    0x35, 0x24, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x21, 0x28, 0x2b, 0x34, 0x36, 0x25,
--    0x24, 0x36, 0x4a, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x9b, 0x52, 0x3f, 0x21, 0x30,
--    0x35, 0x25, 0x30, 0x36, 0x36, 0x36, 0x36, 0x32,
--    0x2d, 0x26, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x22, 0x26, 0x2e, 0x35, 0x36, 0x2a,
--    0x36, 0x24, 0x4f, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x9b, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x47, 0x32, 0x30,
--    0x2a, 0x23, 0x30, 0x23, 0x36, 0x36, 0x36, 0x21,
--    0x2f, 0x32, 0x23, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x21, 0x23, 0x2a, 0x51, 0x28, 0x28, 0x25,
--    0x36, 0x3a, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x9b, 0x52, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x38, 0x21,
--    0x36, 0x36, 0x22, 0x27, 0x36, 0x36, 0x36, 0x36,
--    0x2e, 0x35, 0x24, 0x21, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x22, 0x25, 0x2c, 0x34, 0x36, 0x30, 0x21,
--    0x23, 0x43, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x47, 0x99, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x94, 0x36,
--    0x36, 0x36, 0x36, 0x32, 0x36, 0x36, 0x36, 0x36,
--    0x2a, 0x2e, 0x26, 0x22, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x21, 0x23, 0x2a, 0x51, 0x25, 0x21, 0x2a, 0x36,
--    0x2e, 0x9b, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x99, 0x99, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x98, 0x36,
--    0x36, 0x36, 0x36, 0x32, 0x36, 0x36, 0x36, 0x36,
--    0x22, 0x2f, 0x30, 0x22, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x22, 0x25, 0x2c, 0x34, 0x36, 0x24, 0x28, 0x36,
--    0x54, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4c, 0x99, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x9a, 0x36,
--    0x36, 0x36, 0x36, 0x30, 0x36, 0x36, 0x36, 0x36,
--    0x21, 0x2f, 0x32, 0x23, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x28, 0x32, 0x2f, 0x28, 0x36, 0x27, 0x22, 0x21,
--    0x43, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4c, 0x99, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x4b, 0x21,
--    0x36, 0x36, 0x21, 0x26, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x34, 0x2b, 0x28, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
--    0x25, 0x2c, 0x39, 0x36, 0x36, 0x30, 0x22, 0x25,
--    0x52, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x52, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x4f, 0x21,
--    0x36, 0x36, 0x22, 0x26, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x2c, 0x35, 0x24, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
--    0x30, 0x2d, 0x21, 0x36, 0x36, 0x32, 0x23, 0x2a,
--    0x47, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x99, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x4c, 0x22,
--    0x36, 0x36, 0x24, 0x23, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x2c, 0x39, 0x24, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x28,
--    0x33, 0x2e, 0x36, 0x36, 0x23, 0x31, 0x27, 0x39,
--    0x9b, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x47, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x4c, 0x23,
--    0x36, 0x36, 0x26, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x2c, 0x39, 0x24, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x28,
--    0x2b, 0x39, 0x36, 0x36, 0x36, 0x26, 0x32, 0x31,
--    0x9b, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x47, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x46, 0x22,
--    0x36, 0x21, 0x26, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x2c, 0x35, 0x24, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x24,
--    0x35, 0x39, 0x36, 0x36, 0x36, 0x36, 0x26, 0x2d,
--    0x9b, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x47, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x9a, 0x36,
--    0x24, 0x27, 0x9f, 0x24, 0x25, 0x28, 0x21, 0x36,
--    0x36, 0x34, 0x2b, 0x28, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x25,
--    0x39, 0x4d, 0xa0, 0x84, 0x81, 0x57, 0x21, 0x39,
--    0x52, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x47, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x53, 0x28,
--    0x23, 0x36, 0x36, 0x36, 0x21, 0x28, 0x2c, 0x30,
--    0x21, 0x38, 0x33, 0x28, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x21, 0x22, 0x22, 0x28, 0x30,
--    0x2d, 0xa1, 0x7a, 0xa2, 0xa3, 0xa3, 0x7f, 0x22,
--    0x51, 0x52, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x9b, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0xa4, 0xa5, 0xa5, 0xa6, 0x61,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x30, 0x32,
--    0x25, 0x4d, 0x2b, 0x28, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x21, 0x23, 0x24, 0x26, 0x30, 0x33, 0x31,
--    0x4d, 0x91, 0x5b, 0xa2, 0xa3, 0xa3, 0xa3, 0x5a,
--    0x21, 0x2e, 0x46, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4f, 0x9b, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0xa7, 0xa8, 0x69, 0x66, 0xa9,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x21, 0x26, 0x25,
--    0x83, 0xaa, 0x2c, 0x25, 0x21, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x21, 0x28, 0x30, 0x35, 0x2d, 0x2f, 0x37, 0x4a,
--    0x60, 0x85, 0xab, 0xac, 0xa3, 0xa3, 0xa3, 0x82,
--    0x86, 0x36, 0x32, 0x3f, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x4c, 0x99, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0xad, 0xa2, 0xa8, 0xae, 0xaf,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x21, 0x57,
--    0x77, 0x66, 0x34, 0x27, 0x22, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x23, 0x30, 0x31, 0xb0, 0x91, 0x7e, 0x90, 0x90,
--    0x8b, 0x5b, 0xa2, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0x5d, 0xb1, 0x36, 0x24, 0x53, 0x9b, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x9b, 0x99, 0xad, 0x64, 0x5c, 0x8b, 0xb1,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x73, 0x5d,
--    0x82, 0x5c, 0xb2, 0x2a, 0x23, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x24, 0x2b, 0xb0, 0x8b, 0x5b, 0x76, 0x5b, 0x5b,
--    0x7b, 0xa2, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa8, 0x5e, 0x22, 0x36, 0x21, 0x3a, 0x99, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x4f, 0x3f, 0xb3, 0x7b, 0x7b, 0x85, 0x80,
--    0x9f, 0x36, 0x36, 0x36, 0x21, 0xb4, 0x7e, 0x7b,
--    0x64, 0x64, 0xb5, 0x35, 0x24, 0x21, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
--    0x26, 0x31, 0xb6, 0x5b, 0x64, 0xa2, 0xa2, 0xac,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0x66, 0xb7, 0x36, 0x36, 0x36, 0x2c, 0x4b,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x9a, 0x3f, 0xb8, 0x76, 0x76, 0x7a, 0x63,
--    0xb9, 0xba, 0x86, 0xba, 0xbb, 0x90, 0x5b, 0x64,
--    0xa2, 0xa2, 0xbc, 0x2d, 0x27, 0x23, 0x21, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x26, 0x2d, 0x91, 0x5b, 0x64, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa8, 0x83, 0xaf, 0x36, 0x36, 0x36, 0x30,
--    0x44, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x9b, 0x9a, 0x3f, 0xbd, 0x5b, 0x7b, 0xbe, 0x85,
--    0x7e, 0x90, 0x63, 0x90, 0x85, 0x5b, 0xa2, 0xa3,
--    0xa3, 0xac, 0x5d, 0xb5, 0x39, 0x26, 0x23, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
--    0x26, 0x2d, 0xbf, 0xbe, 0x64, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa8, 0x88, 0x36, 0x36, 0x36, 0x36,
--    0x2d, 0x9b, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x9b, 0x45, 0x3f, 0xc0, 0x6d, 0x7b, 0xab, 0xbe,
--    0x7a, 0x8b, 0x8b, 0x7a, 0x5b, 0x64, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa2, 0xc1, 0x37, 0x35, 0x26, 0x23,
--    0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
--    0x26, 0x2e, 0xbf, 0x7a, 0x7b, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa8, 0x72, 0x73, 0x36, 0x36, 0x36,
--    0x24, 0x52, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x46, 0x42, 0xb6, 0x7a, 0x7b, 0x64, 0x7b,
--    0x76, 0x5b, 0x5b, 0x76, 0x7b, 0xa2, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xac, 0x64, 0xc1, 0x4d, 0x2c, 0x27,
--    0x23, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x25, 0x31, 0xc2, 0x8b, 0x7b, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa8, 0x89, 0x9f, 0x36, 0x36,
--    0x32, 0x47, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x4b, 0x2f, 0x8f, 0x7a, 0x7b, 0xa2, 0xac,
--    0xa2, 0x64, 0x64, 0xa2, 0xa2, 0xac, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa2, 0x5d, 0xc3, 0x2c,
--    0x26, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x25, 0x31, 0xc2, 0x85, 0x7b, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0x66, 0x57, 0x27, 0x4d,
--    0x4b, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x99, 0x34, 0x9f, 0xb9, 0x7a, 0x7b, 0xa2, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa2, 0xc2,
--    0x32, 0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
--    0x26, 0x2d, 0xc2, 0x85, 0x7b, 0xac, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa8, 0x5f, 0x92, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x44,
--    0x35, 0x36, 0xaf, 0xbb, 0x7a, 0x7b, 0xac, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xac, 0xa2, 0xc0,
--    0x2b, 0x24, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x23,
--    0x30, 0x2f, 0xb6, 0x8b, 0x7b, 0xac, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0x66, 0x89, 0x45,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x48, 0x9b, 0x4e, 0x25,
--    0x36, 0x36, 0x61, 0xb9, 0x6d, 0x64, 0xac, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xac, 0x7b, 0xbe, 0xc3,
--    0x32, 0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x28,
--    0x33, 0xc4, 0x63, 0xbe, 0xa2, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa2, 0x72, 0x81, 0xc5,
--    0x46, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48,
--    0x48, 0x48, 0x48, 0x48, 0x3f, 0x2c, 0x36, 0x36,
--    0x36, 0x36, 0xc6, 0x8f, 0x6d, 0x64, 0xac, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa2, 0xab, 0x8b, 0xb0, 0x2c,
--    0x26, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x24,
--    0x35, 0x96, 0x75, 0xab, 0xa2, 0xac, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xac, 0x7b, 0x81, 0xb9,
--    0x73, 0x3b, 0x44, 0x9b, 0x48, 0x48, 0x48, 0x9b,
--    0x99, 0x43, 0x94, 0x2c, 0x21, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x73, 0xb9, 0x7a, 0x7b, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0x64, 0x76, 0x7a, 0x91, 0xb5, 0x31, 0x30,
--    0x28, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x24,
--    0x39, 0x97, 0x75, 0xbe, 0x7b, 0x64, 0xa2, 0xa2,
--    0xac, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0x7b, 0x7a, 0xc7,
--    0xc8, 0x36, 0x21, 0x26, 0x2b, 0x39, 0x33, 0x30,
--    0x23, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x21, 0xc8, 0xbb, 0x8b, 0x7b, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa2, 0x64, 0x64,
--    0x76, 0x85, 0xbf, 0xb5, 0x34, 0x2b, 0x27, 0x28,
--    0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x28,
--    0x33, 0xc9, 0x63, 0x7e, 0x7a, 0x6d, 0xbe, 0x5b,
--    0x76, 0x7b, 0x64, 0x64, 0xa2, 0xac, 0xa3, 0xa3,
--    0xa3, 0xa3, 0xa3, 0xa3, 0xac, 0x76, 0x85, 0xb9,
--    0x79, 0x22, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x21, 0xca, 0xbb, 0x75, 0x76, 0xa2, 0xa3,
--    0xa3, 0xa3, 0xac, 0xa2, 0x64, 0x76, 0xbe, 0x8b,
--    0xb6, 0xb5, 0x2f, 0x35, 0x30, 0x24, 0x22, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x23,
--    0x27, 0x31, 0xcb, 0xc9, 0xbb, 0x74, 0x63, 0x90,
--    0x7e, 0x75, 0x8b, 0x6d, 0xbe, 0x76, 0x64, 0xa2,
--    0xac, 0xac, 0xac, 0xac, 0x64, 0x7a, 0x84, 0xcc,
--    0x79, 0x9f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
--    0x36, 0x21, 0xc8, 0xcc, 0x63, 0x6d, 0x7b, 0x64,
--    0xac, 0xa2, 0x64, 0x7b, 0xbe, 0x75, 0x63, 0x96,
--    0x38, 0x39, 0x2a, 0x24, 0x23, 0x21, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x28, 0x27, 0x35, 0x2d, 0x41, 0xb5, 0xc5, 0x8f,
--    0xb9, 0xbb, 0xc7, 0x74, 0x84, 0x90, 0x85, 0x6d,
--    0x5b, 0x7b, 0x7b, 0xab, 0x6d, 0x90, 0xb9, 0xcd,
--    0xca, 0x22, 0x36, 0x36, 0x28, 0x30, 0x30, 0x30,
--    0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x25, 0x36,
--    0x36, 0x21, 0xb4, 0x80, 0xc7, 0x7e, 0x6d, 0x76,
--    0xab, 0x76, 0x6d, 0x85, 0x63, 0xb9, 0xb5, 0x34,
--    0x33, 0x26, 0x23, 0x21, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x21, 0x23, 0x24, 0x27, 0x2a, 0x35, 0x2e, 0x2f,
--    0x41, 0xce, 0xcf, 0x6c, 0x80, 0xcc, 0xb9, 0x74,
--    0x84, 0x90, 0x75, 0x7e, 0x74, 0x8f, 0xcd, 0x79,
--    0xc6, 0x2b, 0x9d, 0x41, 0x2f, 0x34, 0x2d, 0x2d,
--    0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x34, 0x2f, 0x38,
--    0x4d, 0x37, 0xd0, 0xd1, 0x8f, 0x74, 0x63, 0x7e,
--    0x75, 0x7e, 0x63, 0xc7, 0x88, 0xc4, 0x31, 0x2a,
--    0x24, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x21, 0x22, 0x23, 0x24, 0x26, 0x30,
--    0x33, 0x39, 0x2e, 0x51, 0x41, 0xb2, 0x6c, 0xd1,
--    0x80, 0xcc, 0xcc, 0xcc, 0xd2, 0xd1, 0xb7, 0xd3,
--    0x41, 0x34, 0x35, 0x32, 0x30, 0x27, 0x27, 0x27,
--    0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x30, 0x2a,
--    0x2b, 0x34, 0xd4, 0xca, 0xd5, 0x8f, 0xbb, 0xc7,
--    0xc7, 0xbb, 0xcc, 0x6c, 0x41, 0x39, 0x27, 0x28,
--    0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x22,
--    0x28, 0x24, 0x26, 0x2a, 0x33, 0x2c, 0x2f, 0x41,
--    0xd6, 0xb7, 0x79, 0x79, 0x79, 0xca, 0xd7, 0x51,
--    0x39, 0x30, 0x24, 0x23, 0x22, 0x22, 0x22, 0x22,
--    0x22, 0x22, 0x21, 0x22, 0x22, 0x22, 0x22, 0x23,
--    0x24, 0x2a, 0x31, 0xd8, 0xc8, 0x79, 0xd1, 0x80,
--    0xd5, 0xba, 0xd9, 0x2f, 0x35, 0x26, 0x23, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x21, 0x22, 0x23, 0x28, 0x25, 0x30, 0x2b,
--    0x31, 0x2f, 0xd4, 0xd8, 0xd8, 0x2f, 0x2e, 0x33,
--    0x26, 0x23, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x21, 0x28, 0x27, 0x35, 0x34, 0xd8, 0xd8, 0xd8,
--    0xda, 0xd4, 0x2e, 0x33, 0x25, 0x23, 0x21, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x23, 0x28,
--    0x26, 0x30, 0x32, 0x2b, 0x33, 0x2a, 0x26, 0x28,
--    0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x21, 0x23, 0x25, 0x30, 0x33, 0x35, 0x35,
--    0x2b, 0x2a, 0x26, 0x28, 0x22, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21,
--    0x21, 0x22, 0x23, 0x28, 0x28, 0x23, 0x22, 0x21,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x21, 0x23, 0x28, 0x24, 0x24,
--    0x28, 0x23, 0x22, 0x21, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
--    0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,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-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf,
-+ 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf
- };
- #endif /* !__HAVE_ARCH_LINUX_LOGO */
-@@ -915,86 +2639,106 @@
- #ifndef __HAVE_ARCH_LINUX_LOGOBW
- unsigned char linux_logo_bw[] __initdata = {
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xcf, 0xf3, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xbf, 0xfc, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfd, 0xff, 0xf3, 0xdf, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfd, 0xff, 0xf7, 0xef, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x9f, 0x87, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x0f, 0x03, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x67, 0x33, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xe7, 0x79, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xf7, 0x79, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xff, 0xf9, 0xf7, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x60, 0x3b, 0xf7, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x89, 0x07, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x00, 0x03, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x00, 0x0d, 0xfb, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x80, 0x33, 0xfd, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xc0, 0xc3, 0xfd, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0xff, 0x0d, 0xdd, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xfb, 0x40, 0x31, 0xee, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf7, 0x20, 0xc1, 0xee, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf7, 0x1f, 0x00, 0xff, 0x7f, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xef, 0x00, 0x00, 0x7f, 0xbf, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xee, 0x00, 0x00, 0x7f, 0xbf, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xde, 0x00, 0x00, 0x7f, 0xdf, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xbc, 0x00, 0x00, 0x3f, 0xef, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x3f, 0xf7, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x1f, 0xf7, 0xff, 0xff,
--    0xff, 0xff, 0xfe, 0xff, 0x1c, 0x07, 0xdf, 0xfb, 0xff, 0xff,
--    0xff, 0xff, 0xfd, 0xfc, 0x08, 0x0f, 0xef, 0xfd, 0xff, 0xff,
--    0xff, 0xff, 0xfd, 0xf8, 0x00, 0x01, 0xef, 0xfd, 0xff, 0xff,
--    0xff, 0xff, 0xfb, 0xf0, 0x00, 0x00, 0x7f, 0xfe, 0xff, 0xff,
--    0xff, 0xff, 0xfb, 0xe0, 0x00, 0x00, 0x1f, 0xfe, 0xff, 0xff,
--    0xff, 0xff, 0xf7, 0xe0, 0x00, 0x00, 0x07, 0xbf, 0x7f, 0xff,
--    0xff, 0xff, 0xf7, 0xc0, 0x00, 0x00, 0x03, 0xbf, 0x7f, 0xff,
--    0xff, 0xff, 0xef, 0xc0, 0x00, 0x00, 0x03, 0xdf, 0xbf, 0xff,
--    0xff, 0xff, 0xef, 0x80, 0x00, 0x00, 0x03, 0xdf, 0xbf, 0xff,
--    0xff, 0xff, 0xdf, 0x80, 0x00, 0x00, 0x03, 0xdf, 0xbf, 0xff,
--    0xff, 0xff, 0xdf, 0x80, 0x00, 0x00, 0x01, 0xef, 0xdf, 0xff,
--    0xff, 0xff, 0xdf, 0x80, 0x00, 0x00, 0x01, 0xef, 0xdf, 0xff,
--    0xff, 0xff, 0xbf, 0x00, 0x20, 0x00, 0x01, 0xef, 0xdf, 0xff,
--    0xff, 0xff, 0xbf, 0x00, 0x20, 0x00, 0x01, 0xef, 0xdf, 0xff,
--    0xff, 0xff, 0xbf, 0x00, 0x20, 0x00, 0x01, 0xef, 0xdf, 0xff,
--    0xff, 0xff, 0xbf, 0x00, 0x20, 0x00, 0x01, 0xef, 0xdf, 0xff,
--    0xff, 0xff, 0xbf, 0x00, 0x20, 0x00, 0x03, 0x03, 0xdf, 0xff,
--    0xff, 0xff, 0xbf, 0x00, 0x20, 0x00, 0x02, 0xfd, 0xdf, 0xff,
--    0xff, 0xff, 0xa3, 0x80, 0x00, 0x00, 0x1f, 0xff, 0xdf, 0xff,
--    0xff, 0xff, 0xc1, 0xc0, 0x00, 0x00, 0x11, 0xff, 0x3f, 0xff,
--    0xff, 0xff, 0x80, 0xe0, 0x00, 0x00, 0x21, 0xfe, 0x3f, 0xff,
--    0xff, 0xff, 0x00, 0x70, 0x00, 0x00, 0x21, 0xfc, 0x3f, 0xff,
--    0xff, 0xfe, 0x00, 0x3c, 0x00, 0x00, 0x20, 0xf8, 0x3f, 0xff,
--    0xff, 0xf0, 0x00, 0x3e, 0x00, 0x00, 0x20, 0x00, 0x3f, 0xff,
--    0xff, 0xc0, 0x00, 0x1f, 0x00, 0x00, 0x20, 0x00, 0x3f, 0xff,
--    0xff, 0xc0, 0x00, 0x1f, 0x80, 0x00, 0x20, 0x00, 0x1f, 0xff,
--    0xff, 0xc0, 0x00, 0x0f, 0x80, 0x00, 0x20, 0x00, 0x07, 0xff,
--    0xff, 0xc0, 0x00, 0x07, 0x80, 0x00, 0x20, 0x00, 0x03, 0xff,
--    0xff, 0xc0, 0x00, 0x07, 0x80, 0x00, 0x60, 0x00, 0x01, 0xff,
--    0xff, 0xc0, 0x00, 0x02, 0x00, 0x00, 0xe0, 0x00, 0x01, 0xff,
--    0xff, 0xc0, 0x00, 0x01, 0x00, 0x01, 0xe0, 0x00, 0x01, 0xff,
--    0xff, 0xc0, 0x00, 0x00, 0x80, 0x07, 0xe0, 0x00, 0x03, 0xff,
--    0xff, 0xc0, 0x00, 0x00, 0x80, 0x3f, 0xe0, 0x00, 0x0f, 0xff,
--    0xff, 0xc0, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x1f, 0xff,
--    0xff, 0xc0, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x7f, 0xff,
--    0xff, 0xe0, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0xff, 0xff,
--    0xff, 0xfc, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x03, 0xff, 0xff,
--    0xff, 0xff, 0xc0, 0x00, 0x70, 0x00, 0xc0, 0x07, 0xff, 0xff,
--    0xff, 0xff, 0xfc, 0x00, 0x8f, 0xff, 0x20, 0x0f, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0xe0, 0x1f, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x3F,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F,
-+      0xFE, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFE, 0x3F, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFE, 0x7F, 0xFF, 0xC7, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xC3,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF,
-+      0xFB, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFD, 0xFF, 0xFF, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF,
-+      0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xF9, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xF9, 0xCF, 0xC3, 0xF8, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x87, 0x81, 0xF9,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xA7,
-+      0x99, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xF9, 0xF3, 0xBC, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xF9, 0xE3, 0xBC, 0xF9, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0, 0x3C, 0xF9,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0,
-+      0x19, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xF9, 0xC0, 0x03, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x80,
-+      0x01, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xF9, 0xC0, 0x21, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xF9, 0xB1, 0x80, 0xEC, 0xC0, 0x1F,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x90, 0x00, 0xE4,
-+      0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8C,
-+      0xC0, 0x7C, 0x04, 0x81, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xE3, 0x80, 0x00, 0x7C, 0x40, 0x11, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xE3, 0x80, 0x00, 0x7F, 0xD2, 0x29,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x00, 0x00, 0x3F,
-+      0x80, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0x0E, 0x00,
-+      0x00, 0x3F, 0x80, 0x19, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0x1E, 0x00, 0x00, 0x1F, 0x80, 0x19, 0xFF, 0xFF,
-+      0xFF, 0xFE, 0x1C, 0x00, 0x00, 0x1E, 0x80, 0x19,
-+      0xFF, 0xFF, 0xFF, 0xFE, 0x3C, 0x00, 0x00, 0x1E,
-+      0x80, 0x11, 0xFF, 0xFF, 0xFF, 0xFC, 0x7C, 0x00,
-+      0x00, 0x0F, 0x80, 0x11, 0xFF, 0xFF, 0xFF, 0xFC,
-+      0xF8, 0x00, 0x00, 0x0E, 0x80, 0x11, 0xFF, 0xFF,
-+      0xFF, 0xFC, 0xF8, 0x00, 0x00, 0x06, 0x00, 0x11,
-+      0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0x00, 0x00, 0x06,
-+      0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xF9, 0xF0, 0x00,
-+      0x00, 0x02, 0x00, 0x09, 0xFF, 0xFF, 0xFF, 0xF1,
-+      0xF0, 0x00, 0x00, 0x02, 0x80, 0x10, 0xFF, 0xFF,
-+      0xFF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x97, 0x10,
-+      0xFF, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x00, 0x00,
-+      0xDF, 0xF0, 0xFF, 0xFF, 0xFF, 0xE3, 0xC0, 0x00,
-+      0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xC7,
-+      0xC0, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF,
-+      0xFF, 0xC7, 0x80, 0x00, 0x00, 0x01, 0xFF, 0xF8,
-+      0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x00, 0x01,
-+      0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00,
-+      0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0x9F,
-+      0x80, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF,
-+      0xFF, 0x9F, 0x80, 0x00, 0x00, 0x01, 0x80, 0x18,
-+      0xFF, 0xFF, 0xFF, 0x9E, 0x80, 0x00, 0x00, 0x03,
-+      0xA8, 0x11, 0xFF, 0xFF, 0xFF, 0x9F, 0x80, 0x00,
-+      0x00, 0x02, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0x99,
-+      0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xFF, 0xFF,
-+      0xFF, 0x00, 0x80, 0x00, 0x00, 0x01, 0xC0, 0x01,
-+      0xFF, 0xFF, 0xFE, 0x20, 0x60, 0x00, 0x00, 0x00,
-+      0xFF, 0xC3, 0xFF, 0xFF, 0xF8, 0x00, 0x30, 0x00,
-+      0x00, 0x00, 0xFF, 0x0F, 0xFF, 0xFF, 0xC0, 0x40,
-+      0x38, 0x00, 0x00, 0x00, 0xFE, 0x47, 0xFF, 0xFF,
-+      0x81, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFC, 0x23,
-+      0xFF, 0xFF, 0x90, 0x00, 0x1E, 0x00, 0x00, 0x00,
-+      0x78, 0x11, 0xFF, 0xFF, 0x80, 0x00, 0x0F, 0x80,
-+      0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00,
-+      0x07, 0xC0, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xFF,
-+      0xC0, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x04,
-+      0x7F, 0xFF, 0x80, 0x00, 0x03, 0xC0, 0x00, 0x10,
-+      0x00, 0x00, 0x1F, 0xFF, 0x80, 0x00, 0x01, 0x80,
-+      0x00, 0x30, 0x00, 0x00, 0x0F, 0xFF, 0x80, 0x00,
-+      0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x4F, 0xFF,
-+      0x80, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00,
-+      0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0x03, 0xF0,
-+      0x00, 0x00, 0x8F, 0xFF, 0x80, 0x00, 0x00, 0x40,
-+      0x0F, 0xF0, 0x00, 0x04, 0x1F, 0xFF, 0x80, 0x00,
-+      0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x10, 0x1F, 0xFF,
-+      0xC0, 0x00, 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x40,
-+      0xFF, 0xFF, 0x98, 0x00, 0x00, 0xFF, 0xFF, 0xF0,
-+      0x00, 0x83, 0xFF, 0xFF, 0x81, 0xE0, 0x01, 0xFF,
-+      0xFF, 0xF8, 0x02, 0x07, 0xFF, 0xFF, 0x80, 0x3F,
-+      0x07, 0xE0, 0x00, 0x1C, 0x0C, 0x1F, 0xFF, 0xFF,
-+      0xF8, 0x03, 0xFF, 0x80, 0x00, 0x1F, 0x78, 0x1F,
-+      0xFF, 0xFF, 0xFF, 0x80, 0x7F, 0x00, 0x07, 0x0F,
-+      0xF0, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0x0C, 0x07,
-+      0xFF, 0x83, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0x00, 0x1F, 0xFF, 0xC0, 0x03, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x07, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-+      0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- };
- #endif /* !__HAVE_ARCH_LINUX_LOGOBW */
-@@ -1002,406 +2746,401 @@
- #ifndef __HAVE_ARCH_LINUX_LOGO16
- unsigned char linux_logo16[] __initdata = {
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x88, 0x80, 0x00, 0x00, 0x08, 0x88, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
--    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x80,
--    0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x08, 0x70, 0x00, 0x00, 0x00, 0x77, 0x70, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x87, 0x77, 0x00, 0x00, 0x07, 0xff, 0xf7, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
--    0x77, 0xff, 0x00, 0x00, 0x7f, 0x77, 0xf7, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
--    0x70, 0x0f, 0x80, 0x00, 0xf7, 0x08, 0x7f, 0x70,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
--    0x80, 0x07, 0x80, 0x00, 0xf8, 0x00, 0x8f, 0x70,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08,
--    0x70, 0x07, 0x88, 0x88, 0xf8, 0x00, 0x8f, 0x70,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0xf0, 0x06, 0xe6, 0xe6, 0xe6, 0x00, 0x8f, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x77, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x77, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x06, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0x00,
--    0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x60,
--    0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0x60,
--    0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x66, 0x66, 0x80,
--    0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80,
--    0x86, 0xe6, 0xe6, 0xe6, 0x66, 0x66, 0x66, 0x80,
--    0x08, 0x78, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80,
--    0x86, 0x66, 0x66, 0x66, 0x66, 0x66, 0x77, 0x70,
--    0x00, 0x77, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x87, 0x66, 0x66, 0x66, 0x66, 0x77, 0x77, 0x78,
--    0x00, 0x88, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x87, 0x76, 0x66, 0x66, 0x77, 0x77, 0xff, 0xf7,
--    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08,
--    0xff, 0x77, 0x77, 0x77, 0x77, 0xff, 0xff, 0xff,
--    0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07,
--    0xff, 0x77, 0x77, 0x77, 0x7f, 0xff, 0xff, 0xff,
--    0x70, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x8f,
--    0xff, 0xf7, 0x77, 0x77, 0xff, 0xff, 0xff, 0xff,
--    0xf0, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x7f,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf8, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf7, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x87, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x87, 0x77,
--    0xff, 0xf7, 0x77, 0xff, 0xff, 0xff, 0x77, 0x77,
--    0x77, 0x78, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x77, 0x7f,
--    0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x77,
--    0x77, 0x78, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x7f, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf7, 0x77, 0x00, 0x08, 0x80, 0x00, 0x00, 0x80,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x80, 0x80, 0x08, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x77, 0x80, 0x00, 0x08, 0x00, 0x00, 0x08,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x08, 0x00, 0x80, 0x07, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0x78, 0x00, 0x08, 0x80, 0x00, 0x08,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x08, 0x08, 0x00, 0x8f, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xf7, 0x08, 0x80, 0x80, 0x00, 0x08,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x08, 0x08, 0x08, 0x7f, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xf7, 0x08, 0x80, 0x80, 0x00, 0x00,
--    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x80, 0x08, 0x07, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0x80, 0x00, 0x08, 0x00, 0x00,
--    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x80, 0x80, 0x0f, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0x70, 0x00, 0x08, 0x00, 0x00,
--    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x08, 0x00, 0x80, 0x8f, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0x70, 0x00, 0x08, 0x00, 0x00,
--    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x08, 0x08, 0x00, 0x7f, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0x70, 0x00, 0x08, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x80, 0x08, 0x00, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf0, 0x00, 0x08, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x08, 0x00, 0x08, 0x00, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf0, 0x00, 0x08, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x08, 0x00, 0x08, 0x08, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf0, 0x00, 0x08, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x08, 0x00, 0x08, 0x08, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf0, 0x00, 0x08, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x88, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf0, 0x00, 0x08, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x08, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf0, 0x88, 0x88, 0x80, 0x00,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x08, 0x06, 0xe6, 0x00, 0x8f, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x08, 0x80,
--    0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x6e, 0x6e, 0x60, 0x08, 0xff, 0xff, 0xff,
--    0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xff, 0xe6, 0xe0, 0x00, 0x00, 0x00, 0x88,
--    0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x06, 0xe6, 0xe6, 0xe6, 0x00, 0x8f, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xfe, 0x6e, 0x60, 0x00, 0x00, 0x00, 0x00,
--    0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x60, 0x08, 0xff, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xf6, 0xe6, 0xe0, 0x00, 0x00, 0x00, 0x06,
--    0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe0, 0x00, 0x8f, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0xfe, 0x6e, 0x60, 0x00, 0x00, 0x00, 0x0e,
--    0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x00, 0x08, 0xff,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xff, 0x76, 0xe6, 0xe6, 0x00, 0x00, 0x00, 0xe6,
--    0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe0, 0x00, 0x8f,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf7, 0x7e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x60, 0x00, 0x08,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf7, 0x76, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0x00, 0x00,
--    0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf7, 0x7e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x60, 0x00,
--    0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf7, 0x76, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe0, 0x00,
--    0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0xf7, 0x8e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x88,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--    0x78, 0x86, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xef,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
--    0x80, 0x06, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e,
--    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78,
--    0x00, 0x06, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe0, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x78, 0x80,
--    0x00, 0x06, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x0e, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x66,
--    0x67, 0xff, 0xff, 0xff, 0xff, 0x78, 0x80, 0x00,
--    0x00, 0x86, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x06, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x86, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e,
--    0x66, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x0e, 0x6e, 0x6e, 0x6e,
--    0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x66,
--    0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x86, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xe6, 0xe6,
--    0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
--    0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x86, 0x6e, 0x6e, 0x6e, 0x6e, 0x66, 0x66,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
--    0x66, 0x66, 0x6e, 0x6e, 0x6e, 0x6e, 0x6e, 0x66,
--    0x60, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x80,
--    0x00, 0x06, 0x66, 0xe6, 0xe6, 0xe6, 0x66, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x66, 0x66, 0x66, 0x66, 0xe6, 0xe6, 0x66,
--    0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
--    0x88, 0x86, 0x66, 0x6e, 0x6e, 0x66, 0x60, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x06, 0x66, 0x66, 0x66, 0x66,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x06, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0x66, 0x60,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x66, 0x66, 0x66, 0x60, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa1, 0x11, 0x11,
-+      0x61, 0x16, 0x66, 0x66, 0x11, 0x11, 0x11, 0x11,
-+      0x11, 0x11, 0x1a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0xa8, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x87, 0x77, 0x77, 0x77, 0x77,
-+      0x77, 0x77, 0x73, 0x33, 0x33, 0x3a, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xa3, 0x33, 0x33, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x77, 0x77, 0x77, 0x77,
-+      0x77, 0x27, 0x77, 0x77, 0x77, 0x33, 0x3a, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xa3, 0x33, 0x33, 0x30, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x55, 0x50, 0x08, 0x33, 0x77, 0x77,
-+      0x77, 0x72, 0x72, 0x27, 0x77, 0x77, 0x33, 0x33,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xa3, 0x33, 0x33, 0x77, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x58, 0x85, 0x00, 0x11, 0x11, 0xaa,
-+      0xa3, 0x37, 0x77, 0x72, 0x22, 0x22, 0x77, 0x73,
-+      0x33, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3,
-+      0x33, 0x37, 0x77, 0x33, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x56, 0x85, 0x00, 0x06, 0x66, 0x11,
-+      0x11, 0x1a, 0xa3, 0x37, 0x77, 0x72, 0x22, 0x77,
-+      0x73, 0x33, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33,
-+      0x33, 0x33, 0x33, 0x30, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x55, 0x00, 0x00, 0x06, 0x66, 0x66,
-+      0x66, 0x66, 0x11, 0x1a, 0xa3, 0x77, 0x72, 0x22,
-+      0x77, 0x73, 0x3a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33,
-+      0x33, 0x33, 0x33, 0xa0, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11,
-+      0x66, 0x66, 0x66, 0x66, 0x11, 0xa3, 0x77, 0x22,
-+      0x22, 0x77, 0x33, 0x33, 0xaa, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x33,
-+      0x33, 0x3a, 0xa1, 0x10, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x33,
-+      0xaa, 0x11, 0x16, 0x66, 0x66, 0x61, 0x1a, 0x37,
-+      0x22, 0x22, 0x77, 0x33, 0x3a, 0xaa, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0x33,
-+      0x3a, 0xa1, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x22,
-+      0x22, 0x77, 0x3a, 0x11, 0x66, 0x66, 0x66, 0x1a,
-+      0x37, 0x22, 0x22, 0x77, 0x33, 0x3a, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x33, 0x3a,
-+      0xa1, 0x11, 0x11, 0x10, 0x00, 0x00, 0x50, 0x00,
-+      0x00, 0x05, 0x80, 0x50, 0x00, 0x00, 0x07, 0x72,
-+      0x22, 0x22, 0x22, 0x73, 0xa1, 0x66, 0x66, 0x61,
-+      0x1a, 0x77, 0x22, 0x27, 0x73, 0x33, 0xaa, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x3a, 0xaa,
-+      0x11, 0x11, 0x1a, 0xa0, 0x08, 0x71, 0x05, 0x00,
-+      0x00, 0x12, 0x22, 0x50, 0x00, 0x00, 0x07, 0x77,
-+      0x77, 0x72, 0x22, 0x22, 0x27, 0x31, 0x16, 0x66,
-+      0x61, 0x13, 0x77, 0x22, 0x77, 0x33, 0x3a, 0xaa,
-+      0xaa, 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0xaa, 0xa1,
-+      0x11, 0x1a, 0x33, 0x70, 0x07, 0x2e, 0x70, 0x00,
-+      0x01, 0x44, 0x42, 0x60, 0x00, 0x00, 0x02, 0x22,
-+      0x22, 0x22, 0x22, 0x22, 0x22, 0x27, 0x31, 0x66,
-+      0x66, 0x61, 0xa3, 0x72, 0x22, 0x77, 0x33, 0xaa,
-+      0xaa, 0xaa, 0xa3, 0x33, 0x33, 0xaa, 0xaa, 0x11,
-+      0x1a, 0x33, 0x77, 0x30, 0x04, 0x82, 0x40, 0x00,
-+      0x54, 0x48, 0x54, 0x40, 0x00, 0x00, 0x01, 0xaa,
-+      0x32, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x31,
-+      0x66, 0x66, 0x11, 0x37, 0x22, 0x27, 0x73, 0x3a,
-+      0xaa, 0xaa, 0xa3, 0x33, 0x3a, 0xaa, 0xaa, 0xaa,
-+      0xa3, 0x77, 0xaa, 0x10, 0x50, 0x08, 0x46, 0x05,
-+      0x54, 0x80, 0x50, 0x42, 0x00, 0x00, 0x08, 0x66,
-+      0x66, 0x1a, 0x32, 0x22, 0x22, 0x22, 0x22, 0x27,
-+      0x31, 0x66, 0x66, 0x13, 0x72, 0x22, 0x77, 0x33,
-+      0xaa, 0xaa, 0xaa, 0x33, 0xaa, 0xa1, 0xaa, 0xa3,
-+      0x37, 0xa1, 0x1a, 0x30, 0x50, 0x06, 0x26, 0x00,
-+      0x54, 0x00, 0x00, 0x44, 0x00, 0x00, 0x08, 0xe2,
-+      0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22, 0x22,
-+      0x27, 0xa6, 0x66, 0x61, 0xa7, 0x72, 0x27, 0x73,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33,
-+      0x31, 0x11, 0x37, 0x70, 0x02, 0x00, 0xab, 0xbb,
-+      0xb6, 0x00, 0x00, 0xf4, 0x00, 0x00, 0xee, 0xee,
-+      0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22,
-+      0x22, 0x23, 0x16, 0x66, 0x1a, 0x37, 0x22, 0x77,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0x3a,
-+      0x11, 0xa7, 0x33, 0x10, 0x04, 0x09, 0xbd, 0xdd,
-+      0xbd, 0xd0, 0x04, 0x45, 0x00, 0x0e, 0xee, 0xee,
-+      0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22,
-+      0x22, 0x22, 0x71, 0x66, 0x66, 0x13, 0x72, 0x27,
-+      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x11,
-+      0xa3, 0x73, 0xa1, 0x60, 0x08, 0xbd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdb, 0x90, 0x00, 0x02, 0xec, 0xee,
-+      0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xce, 0x22,
-+      0x22, 0x22, 0x27, 0xa6, 0x66, 0x61, 0x37, 0x27,
-+      0x1a, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0xa1, 0x1a,
-+      0x33, 0xa1, 0x16, 0x60, 0x0b, 0xbd, 0xdd, 0xdd,
-+      0xcd, 0xdd, 0xdd, 0xd9, 0x00, 0x00, 0xec, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0xa2,
-+      0x22, 0x22, 0x22, 0x7a, 0x66, 0x66, 0x13, 0x77,
-+      0x1a, 0xaa, 0xaa, 0xaa, 0xaa, 0x3a, 0x11, 0x33,
-+      0xaa, 0x11, 0x66, 0x60, 0x9b, 0xdd, 0xdd, 0xdd,
-+      0xcd, 0xdd, 0xdb, 0xb9, 0x00, 0x00, 0xec, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xee, 0x61,
-+      0x72, 0x22, 0x22, 0x22, 0xa1, 0x66, 0x61, 0x37,
-+      0x1a, 0xaa, 0xaa, 0xaa, 0xa3, 0xa1, 0x13, 0x3a,
-+      0x11, 0x11, 0x11, 0x10, 0x5b, 0xdd, 0xdd, 0xdc,
-+      0xdd, 0xdd, 0xbd, 0xd9, 0x00, 0x00, 0xec, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xee, 0x86,
-+      0x17, 0x22, 0x22, 0x22, 0x23, 0x16, 0x66, 0xaa,
-+      0xaa, 0xa3, 0x3a, 0xaa, 0xaa, 0x1a, 0x3a, 0xa1,
-+      0x11, 0x11, 0x1a, 0x70, 0x05, 0xbd, 0xdd, 0xdd,
-+      0xdb, 0x5b, 0xdd, 0xb0, 0x00, 0x60, 0x2e, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xe6, 0x88,
-+      0x66, 0x32, 0x22, 0x22, 0x22, 0x36, 0x66, 0x11,
-+      0x33, 0x33, 0x3a, 0xaa, 0x11, 0xaa, 0xaa, 0xa1,
-+      0x11, 0x1a, 0x3a, 0x60, 0x02, 0x99, 0xbb, 0xb9,
-+      0x9b, 0xbb, 0xbc, 0x22, 0x00, 0x86, 0x5e, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xe1, 0x68,
-+      0x86, 0x63, 0x22, 0x22, 0x22, 0x2a, 0x66, 0x66,
-+      0x33, 0x33, 0xaa, 0xaa, 0x1a, 0xaa, 0xaa, 0x11,
-+      0x1a, 0xa7, 0x68, 0x80, 0x02, 0x2b, 0xbd, 0xbb,
-+      0xbb, 0xb9, 0x22, 0x22, 0x00, 0x06, 0x6e, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc7, 0xa6,
-+      0x88, 0x86, 0x32, 0x22, 0x22, 0x27, 0xa6, 0x66,
-+      0x33, 0x3a, 0xaa, 0xa1, 0xaa, 0xaa, 0xa1, 0x11,
-+      0xa3, 0xa6, 0x88, 0x80, 0x02, 0x22, 0x9b, 0xbb,
-+      0xbb, 0x22, 0x24, 0xf4, 0x60, 0x00, 0x0c, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc2, 0x21,
-+      0x68, 0x88, 0x63, 0x22, 0x22, 0x22, 0x71, 0x66,
-+      0x33, 0x3a, 0x11, 0x11, 0xaa, 0xaa, 0x11, 0xaa,
-+      0x71, 0x88, 0x88, 0x00, 0x02, 0xe2, 0x26, 0x99,
-+      0x22, 0x22, 0x4f, 0xf4, 0x40, 0x00, 0x0c, 0xcc,
-+      0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x22, 0x22,
-+      0x16, 0x88, 0x86, 0xa2, 0x22, 0x22, 0x27, 0x11,
-+      0x33, 0xa1, 0x11, 0x11, 0xaa, 0x31, 0x1a, 0xa3,
-+      0x68, 0x88, 0x81, 0x00, 0x54, 0x42, 0x22, 0x22,
-+      0x22, 0x44, 0xff, 0xff, 0x48, 0x00, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x22, 0x22,
-+      0x21, 0x88, 0x88, 0x6a, 0x22, 0x22, 0x22, 0x31,
-+      0x3a, 0xa1, 0x11, 0x1a, 0xa3, 0x11, 0x33, 0x36,
-+      0x88, 0x86, 0x30, 0x00, 0x4f, 0x44, 0x22, 0x22,
-+      0x24, 0xff, 0xff, 0xff, 0x44, 0x00, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x95, 0x22, 0x72,
-+      0x22, 0x18, 0x88, 0x86, 0x32, 0x22, 0x22, 0x27,
-+      0xaa, 0x11, 0x11, 0x1a, 0x31, 0x13, 0x33, 0x68,
-+      0x88, 0x6a, 0x00, 0x02, 0x4f, 0x4f, 0x42, 0x24,
-+      0x4f, 0xff, 0xff, 0xff, 0xf4, 0x50, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x22, 0x73,
-+      0x72, 0x26, 0x88, 0x88, 0x63, 0x22, 0x22, 0x22,
-+      0x11, 0x11, 0x11, 0xa3, 0xa1, 0x73, 0xa6, 0x88,
-+      0x81, 0xa5, 0x00, 0x04, 0x4f, 0x4f, 0x44, 0x4f,
-+      0xff, 0xff, 0xff, 0xff, 0xf4, 0x40, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x12, 0x27,
-+      0xaa, 0x22, 0x68, 0x55, 0x86, 0x72, 0x22, 0x22,
-+      0x11, 0x11, 0x1a, 0x33, 0x13, 0x3a, 0x18, 0x88,
-+      0x1a, 0x10, 0x00, 0x44, 0x4f, 0x4f, 0xff, 0x4f,
-+      0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x61, 0x22,
-+      0x3a, 0xa2, 0x26, 0x85, 0x58, 0x67, 0x22, 0x22,
-+      0x61, 0x61, 0x1a, 0x7a, 0x37, 0x31, 0x88, 0x81,
-+      0x11, 0x00, 0x05, 0xe4, 0x44, 0xff, 0xff, 0xff,
-+      0x4f, 0xf4, 0x44, 0xff, 0xff, 0xf5, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x88, 0x12,
-+      0x2a, 0xaa, 0x72, 0x68, 0x55, 0x81, 0x22, 0x22,
-+      0x66, 0x61, 0xa3, 0x33, 0x73, 0x16, 0x88, 0x11,
-+      0x10, 0x00, 0x08, 0x74, 0x44, 0x4f, 0x44, 0x44,
-+      0xf4, 0xf4, 0x44, 0x44, 0xe2, 0x44, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x88, 0x81,
-+      0x22, 0xaa, 0xa7, 0x26, 0x85, 0x88, 0x12, 0x22,
-+      0x66, 0x61, 0x37, 0xa7, 0x3a, 0x66, 0x66, 0x11,
-+      0x80, 0x00, 0x0a, 0x72, 0x44, 0x4f, 0x44, 0x4f,
-+      0xff, 0x44, 0x44, 0x22, 0x22, 0x24, 0x00, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x85, 0x88,
-+      0x12, 0x2a, 0xaa, 0x22, 0x68, 0x58, 0x63, 0x22,
-+      0x66, 0x1a, 0x73, 0x77, 0x31, 0x66, 0x61, 0x11,
-+      0x00, 0x00, 0x07, 0x44, 0xff, 0x4f, 0xf4, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0x42, 0x22, 0x40, 0x9b,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x85, 0x55,
-+      0x81, 0x27, 0xaa, 0xa2, 0x78, 0x88, 0x86, 0x72,
-+      0x66, 0x13, 0x77, 0x73, 0x11, 0x66, 0x61, 0x76,
-+      0x00, 0x50, 0x84, 0xf4, 0xff, 0x4f, 0xf4, 0xff,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x42, 0x40, 0x9b,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x68, 0x55,
-+      0x58, 0x12, 0x3a, 0xaa, 0x23, 0x88, 0x88, 0xa7,
-+      0x66, 0xa7, 0x77, 0x7a, 0x16, 0x66, 0x1a, 0x15,
-+      0x05, 0x00, 0x4f, 0xf4, 0xff, 0x4f, 0xf4, 0xff,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0x24, 0x9b,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x26, 0x55,
-+      0x55, 0x81, 0x23, 0xaa, 0x32, 0x18, 0x88, 0x6a,
-+      0x61, 0x37, 0x77, 0x31, 0x66, 0x66, 0x17, 0x60,
-+      0x05, 0x08, 0x4f, 0xf4, 0xff, 0x4f, 0xf4, 0xff,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x4e, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0xa2, 0x65,
-+      0x55, 0x58, 0xa2, 0x7a, 0xa2, 0x26, 0x88, 0x61,
-+      0x61, 0x32, 0x27, 0xa1, 0x66, 0x61, 0x31, 0x60,
-+      0x00, 0x04, 0x4f, 0xf4, 0xff, 0x44, 0x44, 0xff,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0xf4, 0x99,
-+      0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x9b, 0xaa, 0x26,
-+      0x55, 0x55, 0x87, 0x27, 0x33, 0x27, 0x68, 0x61,
-+      0x1a, 0x72, 0x27, 0xa6, 0x66, 0x6a, 0x71, 0x00,
-+      0x80, 0x84, 0xff, 0xf4, 0xff, 0x44, 0x44, 0xff,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0xf4, 0x99,
-+      0x9b, 0x9b, 0x99, 0xb9, 0xb9, 0x99, 0xaa, 0xa2,
-+      0x85, 0x55, 0x56, 0x22, 0x27, 0x22, 0x36, 0x66,
-+      0x13, 0x22, 0x23, 0x16, 0x86, 0x63, 0x73, 0x00,
-+      0x00, 0x44, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0xff,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x4f, 0x99,
-+      0x9b, 0x99, 0x99, 0x99, 0xb9, 0x99, 0xaa, 0xaa,
-+      0x28, 0x55, 0x58, 0x12, 0x22, 0x22, 0x21, 0x11,
-+      0xa3, 0x27, 0x7a, 0x66, 0x86, 0x17, 0x75, 0x05,
-+      0x05, 0xff, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0xff,
-+      0xff, 0x4f, 0x44, 0x4f, 0x4f, 0x44, 0x4f, 0x99,
-+      0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x3a, 0xaa,
-+      0xa2, 0x85, 0x58, 0x67, 0x72, 0x22, 0x27, 0xa1,
-+      0x37, 0x27, 0x7a, 0x68, 0x86, 0xa2, 0x70, 0x00,
-+      0x02, 0xff, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0xf4, 0x99,
-+      0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x23, 0xaa,
-+      0xa7, 0x78, 0x88, 0x81, 0x77, 0x22, 0x27, 0x3a,
-+      0x72, 0x73, 0x71, 0x68, 0x66, 0x32, 0x50, 0x00,
-+      0x04, 0x4f, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0x44, 0x95,
-+      0x99, 0x99, 0x99, 0x99, 0x99, 0x55, 0x12, 0x3a,
-+      0xaa, 0x21, 0x88, 0x81, 0x77, 0x27, 0x73, 0x73,
-+      0x72, 0x33, 0x36, 0x86, 0x61, 0x72, 0x00, 0x00,
-+      0x04, 0x44, 0xf4, 0xf4, 0xf4, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x44, 0x55,
-+      0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x8a, 0x27,
-+      0xaa, 0x77, 0x68, 0x61, 0x23, 0x71, 0x11, 0x3a,
-+      0x27, 0xa3, 0x36, 0x86, 0x61, 0x20, 0x00, 0x00,
-+      0x04, 0xf4, 0xf4, 0xf4, 0xf4, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x41, 0x59,
-+      0x99, 0x99, 0x99, 0x99, 0x99, 0x95, 0x58, 0x77,
-+      0x27, 0x32, 0x36, 0x63, 0x23, 0x71, 0x66, 0x11,
-+      0x27, 0x13, 0xa6, 0x86, 0x6a, 0x20, 0x00, 0x50,
-+      0x04, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x41, 0x99,
-+      0x9b, 0xbb, 0xbb, 0xbb, 0xb9, 0x99, 0x68, 0x13,
-+      0x32, 0x22, 0x73, 0xa7, 0x2a, 0x31, 0x88, 0x66,
-+      0x7a, 0x13, 0x18, 0x66, 0x63, 0x20, 0x00, 0x06,
-+      0x0f, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x49, 0x95,
-+      0xa9, 0xa9, 0x99, 0x97, 0x92, 0x99, 0x65, 0x6a,
-+      0x17, 0x22, 0x23, 0x72, 0x27, 0xaa, 0x88, 0x88,
-+      0xa1, 0x17, 0x68, 0x66, 0x67, 0x70, 0x00, 0x05,
-+      0x0f, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xff, 0xf4, 0xf4, 0x49, 0x9c,
-+      0x2e, 0xee, 0xee, 0xee, 0xee, 0xa9, 0x65, 0x8a,
-+      0x1a, 0xaa, 0x37, 0x72, 0x27, 0x37, 0x88, 0x88,
-+      0x11, 0x17, 0x68, 0x66, 0x67, 0x10, 0x9d, 0xd0,
-+      0x84, 0x44, 0xff, 0x4f, 0x4f, 0x44, 0xf4, 0x4f,
-+      0xff, 0x4f, 0x44, 0xff, 0xf4, 0xf4, 0x4f, 0x69,
-+      0xcc, 0xee, 0xee, 0xee, 0xec, 0x99, 0x88, 0x63,
-+      0x61, 0x68, 0x61, 0x72, 0x22, 0x7a, 0x68, 0x88,
-+      0x11, 0x17, 0x88, 0x66, 0x12, 0x1b, 0xdd, 0xdd,
-+      0x02, 0x44, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xff, 0xff, 0x4f, 0x4c, 0xc5,
-+      0x0c, 0xc1, 0x11, 0x1c, 0xc0, 0x26, 0x66, 0x17,
-+      0x66, 0x88, 0x88, 0x12, 0x22, 0x23, 0xa8, 0x88,
-+      0x11, 0x13, 0x88, 0x66, 0x17, 0xbb, 0xdd, 0xdd,
-+      0xd0, 0x8f, 0xff, 0xf4, 0xf4, 0x44, 0xf4, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0x4f, 0x44, 0xdd, 0xdd,
-+      0x00, 0x00, 0x00, 0x05, 0x9d, 0x21, 0x66, 0x27,
-+      0xa6, 0x65, 0x58, 0x67, 0x22, 0x27, 0x28, 0x88,
-+      0x11, 0xaa, 0x86, 0x68, 0x1a, 0xbb, 0xdd, 0xdd,
-+      0xdb, 0x05, 0xf4, 0xf4, 0xf4, 0xf4, 0x44, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0xdd, 0xdb,
-+      0x00, 0x00, 0x00, 0x00, 0xdd, 0xda, 0x66, 0x22,
-+      0x71, 0x15, 0x55, 0x81, 0x22, 0x22, 0x76, 0x88,
-+      0x11, 0x31, 0x88, 0x88, 0xab, 0xbd, 0xdd, 0xdd,
-+      0xdd, 0x00, 0x04, 0x44, 0xff, 0xff, 0x4f, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0xf4, 0x44, 0xdd, 0xdb,
-+      0x00, 0x00, 0x00, 0x0b, 0xdd, 0xda, 0x11, 0x22,
-+      0x23, 0x68, 0x55, 0x86, 0x22, 0x22, 0x7a, 0x88,
-+      0x1a, 0x71, 0x88, 0x89, 0xbb, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xd0, 0x00, 0x4f, 0x44, 0xff, 0x4f, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0xff, 0xe2, 0xdd, 0xdb,
-+      0x90, 0x00, 0x05, 0xbd, 0xdd, 0xb8, 0x63, 0x22,
-+      0x27, 0xa6, 0x55, 0x88, 0x77, 0x22, 0x22, 0x88,
-+      0x1a, 0x28, 0xbd, 0xdb, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdb, 0x00, 0x07, 0x44, 0x4f, 0x4f, 0x4f,
-+      0xff, 0x4f, 0x44, 0x4f, 0x4f, 0x22, 0xdd, 0xdb,
-+      0xbb, 0x9b, 0xbb, 0xbd, 0xdd, 0xd5, 0x86, 0x22,
-+      0x22, 0x77, 0x85, 0x88, 0x17, 0x22, 0x22, 0x88,
-+      0xaa, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0x00, 0x00, 0x54, 0x4f, 0x4f, 0x4f,
-+      0xff, 0x4f, 0x44, 0xf4, 0x44, 0x22, 0xbd, 0xdd,
-+      0xbb, 0xbb, 0xbb, 0xdd, 0xdd, 0xdd, 0x88, 0x72,
-+      0x27, 0x22, 0x88, 0x88, 0x67, 0x72, 0x22, 0x18,
-+      0x33, 0x2d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xd0, 0x00, 0x05, 0x4f, 0x4f, 0x4f,
-+      0xff, 0x4f, 0x44, 0x44, 0x4f, 0x22, 0xbd, 0xdd,
-+      0xdb, 0xbb, 0xdd, 0xdd, 0xdd, 0xdd, 0x88, 0x17,
-+      0x27, 0x72, 0x68, 0x88, 0x87, 0x32, 0x22, 0x36,
-+      0x37, 0x2d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xd5, 0x00, 0x00, 0x4f, 0x4f, 0x4f,
-+      0xff, 0xf4, 0xf4, 0xf4, 0xf4, 0x22, 0xbb, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd8, 0x67,
-+      0x72, 0x77, 0x38, 0x88, 0x83, 0x37, 0x22, 0x26,
-+      0x72, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0x00, 0x00, 0x4f, 0x4f, 0x4f,
-+      0xff, 0xf4, 0xf4, 0xf4, 0x44, 0x25, 0xbb, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd3,
-+      0x32, 0x73, 0x76, 0x88, 0x81, 0x33, 0x22, 0x2a,
-+      0x22, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xb0, 0x54, 0x4f, 0x4f, 0x4f,
-+      0xff, 0xf4, 0xf4, 0xff, 0x44, 0x00, 0xbb, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xa7, 0x73, 0x26, 0x88, 0x86, 0x7a, 0x72, 0x27,
-+      0x22, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdb, 0x44, 0xff, 0x4f, 0x4f,
-+      0xff, 0xf4, 0xf4, 0x44, 0x40, 0x05, 0xbb, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0x13, 0x23, 0x21, 0x68, 0x86, 0x17, 0x72, 0x22,
-+      0x22, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0x94, 0x44, 0x44, 0x44,
-+      0x44, 0x44, 0x44, 0x00, 0x00, 0x05, 0xbb, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xb8,
-+      0x86, 0x22, 0x22, 0x7a, 0x68, 0x81, 0x22, 0x22,
-+      0x37, 0x7b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdb, 0xb5, 0x44, 0x44, 0x44,
-+      0x44, 0x47, 0x00, 0x00, 0x00, 0x05, 0xbd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd8, 0x68,
-+      0x58, 0x72, 0x22, 0x27, 0x18, 0x86, 0x72, 0x22,
-+      0x1a, 0xbb, 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdb, 0xb5, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xbb, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xb9, 0x18, 0x85,
-+      0x58, 0x12, 0x22, 0x36, 0x18, 0x88, 0x32, 0x22,
-+      0x61, 0x3b, 0xbb, 0xbb, 0xbd, 0xdd, 0xdd, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdb, 0xb9, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xbb, 0xdd,
-+      0xdd, 0xdd, 0xdd, 0xdd, 0xb9, 0x7a, 0x68, 0x85,
-+      0x88, 0x62, 0x27, 0x16, 0x18, 0x88, 0x12, 0x27,
-+      0x86, 0x18, 0x9b, 0xbb, 0xbb, 0xbb, 0xbb, 0xbd,
-+      0xdd, 0xdd, 0xdd, 0xbb, 0xb5, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xbb, 0xbd,
-+      0xdd, 0xdd, 0xdb, 0xbb, 0x87, 0x31, 0x68, 0x65,
-+      0x88, 0x82, 0x23, 0x16, 0x18, 0x88, 0x12, 0x23,
-+      0x88, 0x67, 0x27, 0xa8, 0x9b, 0xbb, 0xbb, 0xbb,
-+      0xbd, 0xdd, 0xbb, 0xbb, 0x95, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x9b, 0xbb,
-+      0xbb, 0xbb, 0xbb, 0x96, 0x87, 0x16, 0x68, 0x18,
-+      0x88, 0x62, 0x31, 0x66, 0x18, 0x88, 0x62, 0x73,
-+      0x88, 0x63, 0x27, 0x33, 0x65, 0x55, 0x99, 0x9b,
-+      0xbb, 0xbb, 0xbb, 0x99, 0x55, 0x0a, 0xa1, 0x86,
-+      0x81, 0x68, 0x88, 0x55, 0x58, 0x85, 0x9b, 0xbb,
-+      0xbb, 0xbb, 0x95, 0x88, 0x83, 0x66, 0x66, 0x18,
-+      0x66, 0x82, 0xa1, 0x66, 0x18, 0x88, 0x62, 0x33,
-+      0x88, 0x81, 0x27, 0x7a, 0x18, 0x58, 0x86, 0x85,
-+      0x99, 0x99, 0x99, 0x95, 0x53, 0x2a, 0xaa, 0x88,
-+      0x67, 0x31, 0x68, 0x55, 0x58, 0x85, 0x59, 0xbb,
-+      0xbb, 0xb9, 0x58, 0x68, 0x83, 0x66, 0x61, 0x16,
-+      0x66, 0x62, 0x16, 0x66, 0x68, 0x88, 0x62, 0xaa,
-+      0x88, 0x86, 0x27, 0x77, 0x78, 0x55, 0x88, 0x22,
-+      0x25, 0x55, 0x95, 0x55, 0x6a, 0xa2, 0x2a, 0x88,
-+      0x62, 0x27, 0x37, 0x38, 0x88, 0x87, 0x55, 0x59,
-+      0x95, 0x58, 0x16, 0x88, 0x8a, 0x66, 0x63, 0x68,
-+      0x86, 0x67, 0x66, 0x66, 0x68, 0x88, 0x12, 0x11,
-+      0x88, 0x88, 0x72, 0x77, 0x78, 0x85, 0x58, 0x17,
-+      0x23, 0x32, 0x55, 0x55, 0x81, 0x13, 0x73, 0x66,
-+      0x62, 0x7a, 0xaa, 0x38, 0x88, 0x58, 0x27, 0x55,
-+      0x58, 0x32, 0x38, 0x88, 0x81, 0x66, 0xa2, 0x88,
-+      0x86, 0x61, 0x66, 0x61, 0x66, 0x68, 0x13, 0x11,
-+      0x88, 0x88, 0x12, 0x22, 0x71, 0x85, 0x58, 0x62,
-+      0x23, 0xa2, 0x68, 0x88, 0x81, 0x66, 0x88, 0x88,
-+      0x63, 0x2a, 0xaa, 0x28, 0x88, 0x55, 0x86, 0x61,
-+      0x66, 0x66, 0x68, 0x88, 0x66, 0x66, 0x77, 0x88,
-+      0x68, 0x16, 0x66, 0x62, 0x66, 0x68, 0xa1, 0x61,
-+      0x88, 0x88, 0x62, 0x22, 0x22, 0x85, 0x55, 0x83,
-+      0x72, 0x37, 0xa8, 0x88, 0x61, 0x66, 0x85, 0x55,
-+      0x86, 0x23, 0xaa, 0x71, 0x88, 0x85, 0x88, 0x66,
-+      0x88, 0x86, 0x88, 0x88, 0x16, 0x61, 0x21, 0x88,
-+      0x66, 0xa6, 0x86, 0x17, 0x66, 0x66, 0x31, 0x61,
-+      0x88, 0x88, 0x87, 0x72, 0x22, 0x68, 0x55, 0x86,
-+      0x77, 0x77, 0x36, 0x88, 0x13, 0x68, 0x85, 0x55,
-+      0x58, 0x12, 0x73, 0x72, 0x76, 0x88, 0x88, 0x68,
-+      0x88, 0x88, 0x88, 0x66, 0x36, 0x63, 0x26, 0x86,
-+      0x86, 0x36, 0x86, 0x11, 0x66, 0x66, 0x76, 0x61,
-+      0x88, 0x88, 0x81, 0x22, 0x22, 0x38, 0x85, 0x58,
-+      0x37, 0x22, 0x21, 0x68, 0xa2, 0x31, 0x68, 0x55,
-+      0x55, 0x81, 0x22, 0x22, 0xa8, 0x88, 0x88, 0x68,
-+      0x86, 0x88, 0x68, 0x81, 0x36, 0x17, 0x21, 0x68,
-+      0x86, 0x16, 0x66, 0x26, 0x66, 0x61, 0x36, 0x66,
-+      0x68, 0x88, 0x86, 0x27, 0x22, 0x28, 0x88, 0x88,
-+      0x17, 0x72, 0x2a, 0x66, 0xa2, 0x22, 0x36, 0x55,
-+      0x55, 0x58, 0x37, 0x3a, 0x16, 0x66, 0x66, 0x66,
-+      0x66, 0x18, 0x88, 0x67, 0x16, 0x12, 0x71, 0x68,
-+      0x81, 0x68, 0x61, 0x76, 0x66, 0x6a, 0x16, 0x66,
-+      0x88, 0x88, 0x86, 0x77, 0x22, 0x26, 0x88, 0x88,
-+      0x13, 0x37, 0x71, 0x66, 0xa2, 0x33, 0x2a, 0x85,
-+      0x55, 0x55, 0x17, 0x73, 0x16, 0x66, 0x66, 0x68,
-+      0x63, 0x88, 0x88, 0xa2, 0x66, 0xa2, 0xa6, 0x88,
-+      0x61, 0x68, 0x6a, 0x76, 0x66, 0x6a, 0x66, 0x6a
- };
- #endif /* !__HAVE_ARCH_LINUX_LOGO16 */
diff --git a/kernel-pswscancode.patch b/kernel-pswscancode.patch
deleted file mode 100644 (file)
index 8329012..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- linux-2.4.19/drivers/char/pc_keyb.c~       Sat Oct 19 17:06:29 2002
-+++ linux-2.4.19/drivers/char/pc_keyb.c        Sat Oct 19 17:06:29 2002
-@@ -228,7 +228,14 @@
- #define E0_MSLW       125
- #define E0_MSRW       126
- #define E0_MSTM       127
--
-+/*
-+ * Some keyboards have Power/Sleep/Wake buttons:
-+ * e0 5e for Power, e0 5f for sleep, e0 63 for wake
-+*/ 
-+#define E0_POWER 124
-+#define E0_SLEEP 125
-+#define E0_WAKE  126
-+ 
- static unsigned char e0_keys[128] = {
-   0, 0, 0, 0, 0, 0, 0, 0,                           /* 0x00-0x07 */
-   0, 0, 0, 0, 0, 0, 0, 0,                           /* 0x08-0x0f */
-@@ -241,8 +248,8 @@
-   E0_DO, E0_F17, 0, 0, 0, 0, E0_BREAK, E0_HOME,             /* 0x40-0x47 */
-   E0_UP, E0_PGUP, 0, E0_LEFT, E0_OK, E0_RIGHT, E0_KPMINPLUS, E0_END,/* 0x48-0x4f */
-   E0_DOWN, E0_PGDN, E0_INS, E0_DEL, 0, 0, 0, 0,             /* 0x50-0x57 */
--  0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, 0, 0,         /* 0x58-0x5f */
--  0, 0, 0, 0, 0, 0, 0, 0,                           /* 0x60-0x67 */
-+  0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, E0_POWER, E0_SLEEP,  /* 0x58-0x5f */
-+  0, 0, 0, E0_WAKE, 0, 0, 0, 0,                             /* 0x60-0x67 */
-   0, 0, 0, 0, 0, 0, 0, E0_MACRO,                    /* 0x68-0x6f */
-   0, 0, 0, 0, 0, 0, 0, 0,                           /* 0x70-0x77 */
-   0, 0, 0, 0, 0, 0, 0, 0                            /* 0x78-0x7f */
diff --git a/linux-2.4-sysctl-empty.patch b/linux-2.4-sysctl-empty.patch
deleted file mode 100644 (file)
index 27c8b49..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-Don't register empty sysctl dirs in /proc/sys.
-They would be removed after registering some other sysctl(s) in the
-same directory (e.g. rtc in /proc/sys/dev) and unregistering all of
-them (then initially empty e.g. /proc/sys/dev disappears).
-After disappearing of directory topdir ->de (for "dev") points to
-structure which has been freed.
-It's harmless in vanilla 2.4, but with grsecurity causes an Oops
-on numeric sysctls referring to removed directory (even with all
-grsecurity features disabled, only patch applied).
-
-The same issue seems to exist in 2.6, and _probably_ can cause similar
-problems in selinux.
-
-       -- Jakub Bogusz <qboosh@pld-linux.org>
-
---- linux-2.4.20/kernel/sysctl.c.orig  Mon Dec 15 11:05:08 2003
-+++ linux-2.4.20/kernel/sysctl.c       Mon Dec 15 15:48:46 2003
-@@ -124,10 +124,8 @@
- #ifdef CONFIG_NET
- extern ctl_table net_table[];
- #endif
--static ctl_table proc_table[];
- static ctl_table fs_table[];
- static ctl_table debug_table[];
--static ctl_table dev_table[];
- extern ctl_table random_table[];
- static ctl_table grsecurity_table[];
-@@ -163,10 +161,8 @@
- #ifdef CONFIG_NET
-       {CTL_NET, "net", NULL, 0, 0555, net_table},
- #endif
--      {CTL_PROC, "proc", NULL, 0, 0555, proc_table},
-       {CTL_FS, "fs", NULL, 0, 0555, fs_table},
-       {CTL_DEBUG, "debug", NULL, 0, 0555, debug_table},
--        {CTL_DEV, "dev", NULL, 0, 0555, dev_table},
-       {0}
- };
-@@ -488,10 +484,6 @@
-       {0}
- };
--static ctl_table proc_table[] = {
--      {0}
--};
--
- static ctl_table fs_table[] = {
-       {FS_NRINODE, "inode-nr", &inodes_stat, 2*sizeof(int),
-        0444, NULL, &proc_dointvec},
-@@ -526,10 +518,6 @@
-       {0}
- };
--static ctl_table dev_table[] = {
--      {0}
--};  
--
- extern void init_irq_proc (void);
- void __init sysctl_init(void)
diff --git a/linux-2.4.0-nonintconfig.patch b/linux-2.4.0-nonintconfig.patch
deleted file mode 100644 (file)
index bf16740..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-diff -urNp linux-400/Makefile linux-600/Makefile
---- linux-400/Makefile 
-+++ linux-600/Makefile 
-@@ -305,6 +305,9 @@ symlinks:
- oldconfig: symlinks
-       $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
-+oldconfig_nonint: symlinks
-+      $(CONFIG_SHELL) scripts/Configure -D arch/$(ARCH)/config.in
-+
- xconfig: symlinks
-       $(MAKE) -C scripts kconfig.tk
-       wish -f scripts/kconfig.tk
-diff -urNp linux-400/scripts/Configure linux-600/scripts/Configure
---- linux-400/scripts/Configure        
-+++ linux-600/scripts/Configure        
-@@ -122,8 +122,14 @@ function readln () {
-       else
-               echo -n "$1"
-               [ -z "$3" ] && echo -n "(NEW) "
--              IFS='@' read ans || exit 1
--              [ -z "$ans" ] && ans=$2
-+              if [ "$NONINTERACTIVE" = "y" ]; then
-+                      echo "$1" >> nodefaults
-+                      broken="y"
-+                      ans="n"
-+              else
-+                      IFS='@' read ans || exit 1
-+                      [ -z "$ans" ] && ans=$2
-+              fi
-       fi
- }
-@@ -510,6 +516,7 @@ function choice () {
- CONFIG=.tmpconfig
- CONFIG_H=.tmpconfig.h
- trap "rm -f $CONFIG $CONFIG_H ; exit 1" 1 2
-+trap "rm -f nodefaults ; exit 1" 1 2
- #
- # Make sure we start out with a clean slate.
-@@ -524,11 +531,20 @@ echo " */" >> $CONFIG_H
- echo "#define AUTOCONF_INCLUDED" >> $CONFIG_H
- DEFAULT=""
-+NONINTERACTIVE=""
-+
- if [ "$1" = "-d" ] ; then
-       DEFAULT="-d"
-       shift
- fi
-+if [ "$1" = "-D" ] ; then
-+# non interactive oldconfig
-+      DEFAULT="-d"
-+      NONINTERACTIVE="y"
-+      shift
-+fi
-+
- CONFIG_IN=./config.in
- if [ "$1" != "" ] ; then
-       CONFIG_IN=$1
-@@ -572,4 +588,9 @@ else
- fi
- echo
-+if [ "$broken" = "y" ] ; then
-+ echo "The following defaults are missing:"
-+ cat nodefaults
-+ exit 1
-+fi
- exit 0
diff --git a/linux-2.4.0-raid5xor.patch b/linux-2.4.0-raid5xor.patch
deleted file mode 100644 (file)
index dfaa805..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
---- linux/include/asm-i386/xor.h-o     Sat Dec 23 08:13:50 2000
-+++ linux/include/asm-i386/xor.h       Mon Jan  8 16:33:26 2001
-@@ -13,6 +13,8 @@
-  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-  */
-+#include <linux/config.h>
-+
- /*
-  * High-speed RAID5 checksumming functions utilizing MMX instructions.
-  * Copyright (C) 1998 Ingo Molnar.
-@@ -525,6 +527,8 @@
- #undef FPU_SAVE
- #undef FPU_RESTORE
-+#if defined(CONFIG_X86_FXSR) || defined(CONFIG_X86_RUNTIME_FXSR)
-+
- /*
-  * Cache avoiding checksumming functions utilizing KNI instructions
-  * Copyright (C) 1999 Zach Brown (with obvious credit due Ingo)
-@@ -835,6 +839,26 @@
-         do_5: xor_sse_5,
- };
-+#define XOR_SSE2 \
-+              if (cpu_has_xmm)                        \
-+                      xor_speed(&xor_block_pIII_sse); 
-+
-+
-+/* We force the use of the SSE xor block because it can write around L2.
-+   We may also be able to load into the L1 only depending on how the cpu
-+   deals with a load to a line that is being prefetched.  */
-+#define XOR_SELECT_TEMPLATE(FASTEST) \
-+      (cpu_has_xmm ? &xor_block_pIII_sse : FASTEST)
-+
-+#else
-+
-+/* Don't try any SSE2 when FXSR is not enabled, because OSFXSR will not be set
-+   -AK */ 
-+#define XOR_SSE2 
-+#define XOR_SELECT_TEMPLATE(FASTEST) (FASTEST)
-+
-+#endif
-+
- /* Also try the generic routines.  */
- #include <asm-generic/xor.h>
-@@ -843,16 +867,9 @@
-       do {                                            \
-               xor_speed(&xor_block_8regs);            \
-               xor_speed(&xor_block_32regs);           \
--              if (cpu_has_xmm)                        \
--                      xor_speed(&xor_block_pIII_sse); \
-+              XOR_SSE2        \
-               if (md_cpu_has_mmx()) {                 \
-                       xor_speed(&xor_block_pII_mmx);  \
-                       xor_speed(&xor_block_p5_mmx);   \
-               }                                       \
-       } while (0)
--
--/* We force the use of the SSE xor block because it can write around L2.
--   We may also be able to load into the L1 only depending on how the cpu
--   deals with a load to a line that is being prefetched.  */
--#define XOR_SELECT_TEMPLATE(FASTEST) \
--      (cpu_has_xmm ? &xor_block_pIII_sse : FASTEST)
--
diff --git a/linux-2.4.1-compilefailure.patch b/linux-2.4.1-compilefailure.patch
deleted file mode 100644 (file)
index 8b588af..0000000
+++ /dev/null
@@ -1,815 +0,0 @@
-diff -urN linux-2.4.22.org/arch/alpha/kernel/sys_sable.c linux-2.4.22/arch/alpha/kernel/sys_sable.c
---- linux-2.4.22.org/arch/alpha/kernel/sys_sable.c     2003-11-23 16:00:51.000000000 +0100
-+++ linux-2.4.22/arch/alpha/kernel/sys_sable.c 2003-11-23 16:04:29.000000000 +0100
-@@ -194,8 +194,9 @@
-  */
- static int __init
--sable_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
-+sable_map_irq(struct pci_dev *dev, u8 slota, u8 pin)
- {
-+      int slot=slota;
-       static char irq_tab[9][5] __initdata = {
-               /*INT    INTA   INTB   INTC   INTD */
-               { 32+0,  32+0,  32+0,  32+0,  32+0},  /* IdSel 0,  TULIP  */
-diff -urN linux-2.4.22.org/arch/alpha/kernel/sys_titan.c linux-2.4.22/arch/alpha/kernel/sys_titan.c
---- linux-2.4.22.org/arch/alpha/kernel/sys_titan.c     2003-11-23 16:00:51.000000000 +0100
-+++ linux-2.4.22/arch/alpha/kernel/sys_titan.c 2003-11-23 16:04:29.000000000 +0100
-@@ -99,7 +99,7 @@
-       *dim2;
-       *dim3;
- #else
--      volatile unsigned long *dimB;
-+      volatile unsigned long *dimB=NULL;
-       dimB = &cchip->dim0.csr;
-       if (bcpu == 1) dimB = &cchip->dim1.csr;
-       else if (bcpu == 2) dimB = &cchip->dim2.csr;
-diff -urN linux-2.4.22.org/arch/alpha/kernel/sys_wildfire.c linux-2.4.22/arch/alpha/kernel/sys_wildfire.c
---- linux-2.4.22.org/arch/alpha/kernel/sys_wildfire.c  2003-11-23 16:00:51.000000000 +0100
-+++ linux-2.4.22/arch/alpha/kernel/sys_wildfire.c      2003-11-23 16:04:29.000000000 +0100
-@@ -300,8 +300,9 @@
-  */
- static int __init
--wildfire_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
-+wildfire_map_irq(struct pci_dev *dev, u8 slotu, u8 pin)
- {
-+      int slot=slotu;
-       static char irq_tab[8][5] __initdata = {
-               /*INT    INTA   INTB   INTC   INTD */
-               { -1,    -1,    -1,    -1,    -1}, /* IdSel 0 ISA Bridge */
-diff -urN linux-2.4.22.org/arch/sparc64/solaris/misc.c linux-2.4.22/arch/sparc64/solaris/misc.c
---- linux-2.4.22.org/arch/sparc64/solaris/misc.c       2003-11-23 16:01:09.000000000 +0100
-+++ linux-2.4.22/arch/sparc64/solaris/misc.c   2003-11-23 16:04:29.000000000 +0100
-@@ -15,6 +15,7 @@
- #include <linux/mman.h>
- #include <linux/file.h>
- #include <linux/timex.h>
-+#include <linux/major.h>
- #include <asm/uaccess.h>
- #include <asm/string.h>
-diff -urN linux-2.4.22.org/drivers/block/blkpg.c linux-2.4.22/drivers/block/blkpg.c
---- linux-2.4.22.org/drivers/block/blkpg.c     2003-11-23 15:59:47.000000000 +0100
-+++ linux-2.4.22/drivers/block/blkpg.c 2003-11-23 16:04:29.000000000 +0100
-@@ -32,6 +32,7 @@
- #include <linux/fs.h>                 /* for BLKRASET, ... */
- #include <linux/sched.h>              /* for capable() */
- #include <linux/blk.h>                        /* for set_device_ro() */
-+#include <linux/blkdev.h>
- #include <linux/blkpg.h>
- #include <linux/genhd.h>
- #include <linux/swap.h>                       /* for is_swap_partition() */
-diff -urN linux-2.4.22.org/drivers/block/DAC960.c linux-2.4.22/drivers/block/DAC960.c
---- linux-2.4.22.org/drivers/block/DAC960.c    2003-11-23 15:59:45.000000000 +0100
-+++ linux-2.4.22/drivers/block/DAC960.c        2003-11-23 16:04:29.000000000 +0100
-@@ -5491,11 +5491,7 @@
-                                      .part[MINOR(Inode->i_rdev)]
-                                      .nr_sects << 9,
-                     (u64 *) Argument);
--    case BLKRAGET:
--    case BLKRASET:
--    case BLKFLSBUF:
--    case BLKBSZGET:
--    case BLKBSZSET:
-+    default:
-       return blk_ioctl(Inode->i_rdev, Request, Argument);
-     case BLKRRPART:
-       /* Re-Read Partition Table. */
-diff -urN linux-2.4.22.org/drivers/block/nbd.c linux-2.4.22/drivers/block/nbd.c
---- linux-2.4.22.org/drivers/block/nbd.c       2003-11-23 15:59:44.000000000 +0100
-+++ linux-2.4.22/drivers/block/nbd.c   2003-11-23 16:04:29.000000000 +0100
-@@ -563,7 +563,7 @@
-  *  (Just smiley confuses emacs :-)
-  */
--static int __init nbd_init(void)
-+int __init nbd_init(void)
- {
-       int i;
-diff -urN linux-2.4.22.org/drivers/char/amd76x_pm.c linux-2.4.22/drivers/char/amd76x_pm.c
---- linux-2.4.22.org/drivers/char/amd76x_pm.c  2003-11-23 15:59:47.000000000 +0100
-+++ linux-2.4.22/drivers/char/amd76x_pm.c      2003-11-23 16:04:29.000000000 +0100
-@@ -73,6 +73,7 @@
- #include <linux/config.h>
-+#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/slab.h>
- #include <linux/pci.h>
-diff -urN linux-2.4.22.org/drivers/md/dm-io.c linux-2.4.22/drivers/md/dm-io.c
---- linux-2.4.22.org/drivers/md/dm-io.c        2003-11-23 16:00:41.000000000 +0100
-+++ linux-2.4.22/drivers/md/dm-io.c    2003-11-23 16:04:12.000000000 +0100
-@@ -11,6 +11,8 @@
- #include <linux/slab.h>
- #include <linux/sched.h>
-+#include <linux/bitops.h>
-+
- /* FIXME: can we shrink this ? */
- struct io_context {
-       int rw;
-@@ -177,11 +179,6 @@
- /*
-  * Primitives for alignment calculations.
-  */
--int fls(unsigned n)
--{
--      return generic_fls32(n);
--}
--
- static inline int log2_floor(unsigned n)
- {
-       return ffs(n) - 1;
-diff -urN linux-2.4.22.org/drivers/net/ns83820.c linux-2.4.22/drivers/net/ns83820.c
---- linux-2.4.22.org/drivers/net/ns83820.c     2003-11-23 15:59:37.000000000 +0100
-+++ linux-2.4.22/drivers/net/ns83820.c 2003-11-23 16:04:29.000000000 +0100
-@@ -94,6 +94,7 @@
- #include <linux/module.h>
- #include <linux/types.h>
-+#include <asm/io.h>
- #include <linux/pci.h>
- #include <linux/netdevice.h>
- #include <linux/etherdevice.h>
-diff -urN linux-2.4.22.org/drivers/net/plip.c linux-2.4.22/drivers/net/plip.c
---- linux-2.4.22.org/drivers/net/plip.c        2003-11-23 15:59:36.000000000 +0100
-+++ linux-2.4.22/drivers/net/plip.c    2003-11-23 16:04:29.000000000 +0100
-@@ -1383,7 +1383,7 @@
- static int parport_ptr;
--static int __init plip_setup(char *str)
-+int __init plip_setup(char *str)
- {
-       int ints[4];
-diff -urN linux-2.4.22.org/drivers/net/wan/sdla_chdlc.c linux-2.4.22/drivers/net/wan/sdla_chdlc.c
---- linux-2.4.22.org/drivers/net/wan/sdla_chdlc.c      2003-11-23 15:59:40.000000000 +0100
-+++ linux-2.4.22/drivers/net/wan/sdla_chdlc.c  2003-11-23 16:04:29.000000000 +0100
-@@ -50,6 +50,7 @@
- #include <linux/module.h>
- #include <linux/version.h>
-+#include <linux/module.h>
- #include <linux/kernel.h>     /* printk(), and other useful stuff */
- #include <linux/stddef.h>     /* offsetof(), etc. */
- #include <linux/errno.h>      /* return codes */
-diff -urN linux-2.4.22.org/drivers/net/wan/sdla_fr.c linux-2.4.22/drivers/net/wan/sdla_fr.c
---- linux-2.4.22.org/drivers/net/wan/sdla_fr.c 2003-11-23 15:59:40.000000000 +0100
-+++ linux-2.4.22/drivers/net/wan/sdla_fr.c     2003-11-23 16:04:29.000000000 +0100
-@@ -140,6 +140,7 @@
- #include <linux/module.h>
- #include <linux/version.h>
-+#include <linux/module.h>
- #include <linux/kernel.h>     /* printk(), and other useful stuff */
- #include <linux/stddef.h>     /* offsetof(), etc. */
- #include <linux/errno.h>      /* return codes */
-diff -urN linux-2.4.22.org/drivers/net/wan/sdla_ppp.c linux-2.4.22/drivers/net/wan/sdla_ppp.c
---- linux-2.4.22.org/drivers/net/wan/sdla_ppp.c        2003-11-23 15:59:41.000000000 +0100
-+++ linux-2.4.22/drivers/net/wan/sdla_ppp.c    2003-11-23 16:04:29.000000000 +0100
-@@ -92,6 +92,7 @@
- #include <linux/module.h>
- #include <linux/version.h>
-+#include <linux/module.h>
- #include <linux/kernel.h>     /* printk(), and other useful stuff */
- #include <linux/stddef.h>     /* offsetof(), etc. */
- #include <linux/errno.h>      /* return codes */
-diff -urN linux-2.4.22.org/drivers/net/wan/sdla_x25.c linux-2.4.22/drivers/net/wan/sdla_x25.c
---- linux-2.4.22.org/drivers/net/wan/sdla_x25.c        2003-11-23 15:59:40.000000000 +0100
-+++ linux-2.4.22/drivers/net/wan/sdla_x25.c    2003-11-23 16:04:29.000000000 +0100
-@@ -83,6 +83,7 @@
- #include <linux/module.h>
- #include <linux/version.h>
-+#include <linux/module.h>
- #include <linux/kernel.h>     /* printk(), and other useful stuff */
- #include <linux/stddef.h>     /* offsetof(), etc. */
- #include <linux/errno.h>      /* return codes */
-diff -urN linux-2.4.22.org/drivers/net/wan/wanpipe_multppp.c linux-2.4.22/drivers/net/wan/wanpipe_multppp.c
---- linux-2.4.22.org/drivers/net/wan/wanpipe_multppp.c 2003-11-23 15:59:41.000000000 +0100
-+++ linux-2.4.22/drivers/net/wan/wanpipe_multppp.c     2003-11-23 16:04:29.000000000 +0100
-@@ -19,6 +19,7 @@
- #include <linux/module.h>
- #include <linux/version.h>
-+#include <linux/module.h>
- #include <linux/kernel.h>     /* printk(), and other useful stuff */
- #include <linux/stddef.h>     /* offsetof(), etc. */
- #include <linux/errno.h>      /* return codes */
-diff -urN linux-2.4.22.org/drivers/net/wireless/hermes.c linux-2.4.22/drivers/net/wireless/hermes.c
---- linux-2.4.22.org/drivers/net/wireless/hermes.c     2003-11-23 15:59:44.000000000 +0100
-+++ linux-2.4.22/drivers/net/wireless/hermes.c 2003-11-23 16:04:29.000000000 +0100
-@@ -48,6 +48,7 @@
- #include <linux/delay.h>
- #include <linux/init.h>
- #include <linux/kernel.h>
-+#include <linux/sched.h>
- #include <asm/errno.h>
- #include "hermes.h"
-diff -urN linux-2.4.22.org/drivers/parport/parport_cs.c linux-2.4.22/drivers/parport/parport_cs.c
---- linux-2.4.22.org/drivers/parport/parport_cs.c      2003-11-23 16:00:28.000000000 +0100
-+++ linux-2.4.22/drivers/parport/parport_cs.c  2003-11-23 16:04:29.000000000 +0100
-@@ -43,6 +43,7 @@
- #include <linux/string.h>
- #include <linux/timer.h>
- #include <linux/ioport.h>
-+#include <linux/major.h>
- #include <linux/parport.h>
- #include <linux/parport_pc.h>
-diff -urN linux-2.4.22.org/drivers/scsi/53c7,8xx.c linux-2.4.22/drivers/scsi/53c7,8xx.c
---- linux-2.4.22.org/drivers/scsi/53c7,8xx.c   2003-11-23 15:59:58.000000000 +0100
-+++ linux-2.4.22/drivers/scsi/53c7,8xx.c       2003-11-23 16:04:29.000000000 +0100
-@@ -1433,14 +1433,13 @@
-       command |= PCI_COMMAND_MASTER|PCI_COMMAND_IO;
-       pci_write_config_word(pdev, PCI_COMMAND, command);
--      if (io_port >= 0x10000000 && is_prep ) {
-+      if (io_port >= 0x10000000 && (_machine == _MACH_prep) ) {
-             /* Mapping on PowerPC can't handle this! */
-             unsigned long new_io_port;
-             new_io_port = (io_port & 0x00FFFFFF) | 0x01000000;
-             printk("SCSI: I/O moved from %08X to %08x\n", io_port, new_io_port);
-             io_port = new_io_port;
-             pci_write_config_dword(pdev, PCI_BASE_ADDRESS_0, io_port);
--            pdev->base_address[0] = io_port;
-       }
-     }
- #endif
-;diff -urN linux-2.4.22.org/drivers/scsi/advansys.c linux-2.4.22/drivers/scsi/advansys.c
-;--- linux-2.4.22.org/drivers/scsi/advansys.c  2003-11-23 15:59:57.000000000 +0100
-;+++ linux-2.4.22/drivers/scsi/advansys.c      2003-11-23 16:04:29.000000000 +0100
-;@@ -5551,7 +5551,7 @@
-;                 }
-;             } else {
-;                 ADV_CARR_T      *carrp;
-;-                int             req_cnt;
-;+                int             req_cnt=0;
-;                 adv_req_t       *reqp = NULL;
-;                 int             sg_cnt = 0;
-; 
-;@@ -9258,7 +9258,6 @@
-;             ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
-;         offset, byte_data);
-; #else /* CONFIG_PCI */
-;-    return 0;
-; #endif /* CONFIG_PCI */
-; }
-; 
-diff -urN linux-2.4.22.org/drivers/scsi/imm.c linux-2.4.22/drivers/scsi/imm.c
---- linux-2.4.22.org/drivers/scsi/imm.c        2003-11-23 15:59:58.000000000 +0100
-+++ linux-2.4.22/drivers/scsi/imm.c    2003-11-23 16:04:29.000000000 +0100
-@@ -322,10 +322,10 @@
-      * STR      imm     imm
-      * ===================================
-      * 0x80     S_REQ   S_REQ
--     * 0x40     !S_BSY  (????)
-+     * 0x40     !S_BSY  (?)
-      * 0x20     !S_CD   !S_CD
-      * 0x10     !S_IO   !S_IO
--     * 0x08     (????)  !S_BSY
-+     * 0x08     (?)  !S_BSY
-      *
-      * imm      imm     meaning
-      * ==================================
-@@ -927,7 +927,7 @@
-       printk("imm: told to abort\n");
-       break;
-     case DID_PARITY:
--      printk("imm: parity error (???)\n");
-+      printk("imm: parity error (?)\n");
-       break;
-     case DID_ERROR:
-       printk("imm: internal driver error\n");
-@@ -936,7 +936,7 @@
-       printk("imm: told to reset device\n");
-       break;
-     case DID_BAD_INTR:
--      printk("imm: bad interrupt (???)\n");
-+      printk("imm: bad interrupt (?)\n");
-       break;
-     default:
-       printk("imm: bad return code (%02x)\n", (cmd->result >> 16) & 0xff);
-diff -urN linux-2.4.22.org/drivers/scsi/ppa.c linux-2.4.22/drivers/scsi/ppa.c
---- linux-2.4.22.org/drivers/scsi/ppa.c        2003-11-23 15:59:58.000000000 +0100
-+++ linux-2.4.22/drivers/scsi/ppa.c    2003-11-23 16:04:29.000000000 +0100
-@@ -824,7 +824,7 @@
-       printk("ppa: told to abort\n");
-       break;
-     case DID_PARITY:
--      printk("ppa: parity error (???)\n");
-+      printk("ppa: parity error (?)\n");
-       break;
-     case DID_ERROR:
-       printk("ppa: internal driver error\n");
-@@ -833,7 +833,7 @@
-       printk("ppa: told to reset device\n");
-       break;
-     case DID_BAD_INTR:
--      printk("ppa: bad interrupt (???)\n");
-+      printk("ppa: bad interrupt (?)\n");
-       break;
-     default:
-       printk("ppa: bad return code (%02x)\n", (cmd->result >> 16) & 0xff);
-diff -urN linux-2.4.22.org/drivers/scsi/qlogicisp.c linux-2.4.22/drivers/scsi/qlogicisp.c
---- linux-2.4.22.org/drivers/scsi/qlogicisp.c  2003-11-23 15:59:57.000000000 +0100
-+++ linux-2.4.22/drivers/scsi/qlogicisp.c      2003-11-23 16:04:29.000000000 +0100
-@@ -1034,6 +1034,9 @@
-               cmd_slot = sts->handle;
-               Cmnd = hostdata->cmd_slots[cmd_slot];
-+#ifdef __alpha__
-+              if (Cmnd == NULL) mb(); /* Magic, don't move */
-+#endif
-               hostdata->cmd_slots[cmd_slot] = NULL;
-               TRACE("done", out_ptr, Cmnd);
-diff -urN linux-2.4.22.org/drivers/sound/cs4281/cs4281m.c linux-2.4.22/drivers/sound/cs4281/cs4281m.c
---- linux-2.4.22.org/drivers/sound/cs4281/cs4281m.c    2003-11-23 16:00:06.000000000 +0100
-+++ linux-2.4.22/drivers/sound/cs4281/cs4281m.c        2003-11-23 16:04:30.000000000 +0100
-@@ -4597,8 +4597,8 @@
-       id_table:cs4281_pci_tbl,
-       probe:cs4281_probe,
-       remove:cs4281_remove,
--      suspend:CS4281_SUSPEND_TBL,
--      resume:CS4281_RESUME_TBL,
-+      suspend:NULL,
-+      resume:NULL,
- };
- int __init cs4281_init_module(void)
-diff -urN linux-2.4.22.org/drivers/video/fbcon-mac.c linux-2.4.22/drivers/video/fbcon-mac.c
---- linux-2.4.22.org/drivers/video/fbcon-mac.c 2003-11-23 16:00:19.000000000 +0100
-+++ linux-2.4.22/drivers/video/fbcon-mac.c     2003-11-23 16:04:30.000000000 +0100
-@@ -18,6 +18,7 @@
- #include <linux/string.h>
- #include <linux/fb.h>
- #include <linux/delay.h>
-+#include <linux/sched.h>
- #include <video/fbcon.h>
- #include <video/fbcon-mac.h>
-diff -urN linux-2.4.22.org/drivers/video/sis/sis_main.c linux-2.4.22/drivers/video/sis/sis_main.c
---- linux-2.4.22.org/drivers/video/sis/sis_main.c      2003-11-23 16:00:24.000000000 +0100
-+++ linux-2.4.22/drivers/video/sis/sis_main.c  2003-11-23 16:04:30.000000000 +0100
-@@ -41,6 +41,7 @@
- #include <linux/fs.h>
- #include <linux/agp_backend.h>
- #include <linux/types.h>
-+#include <linux/vmalloc.h>
- #include <asm/uaccess.h>
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-diff -urN linux-2.4.22.org/fs/dquot.c linux-2.4.22/fs/dquot.c
---- linux-2.4.22.org/fs/dquot.c        2003-11-23 15:58:31.000000000 +0100
-+++ linux-2.4.22/fs/dquot.c    2003-11-23 16:04:30.000000000 +0100
-@@ -70,6 +70,7 @@
- #include <linux/proc_fs.h>
- #include <asm/uaccess.h>
-+#include <asm/cache.h>
- static char *quotatypes[] = INITQFNAMES;
- static struct quota_format_type *quota_formats;       /* List of registered formats */
-diff -urN linux-2.4.22.org/fs/intermezzo/dir.c linux-2.4.22/fs/intermezzo/dir.c
---- linux-2.4.22.org/fs/intermezzo/dir.c       2003-11-23 15:58:36.000000000 +0100
-+++ linux-2.4.22/fs/intermezzo/dir.c   2003-11-23 16:04:30.000000000 +0100
-@@ -27,6 +27,8 @@
- #include <asm/bitops.h>
- #include <asm/uaccess.h>
- #include <asm/system.h>
-+#include <asm/ioctls.h>
-+#include <asm/termios.h>
- #include <linux/smp_lock.h>
- #include <linux/errno.h>
-diff -urN linux-2.4.22.org/fs/locks.c linux-2.4.22/fs/locks.c
---- linux-2.4.22.org/fs/locks.c        2003-11-23 15:58:30.000000000 +0100
-+++ linux-2.4.22/fs/locks.c    2003-11-23 16:04:30.000000000 +0100
-@@ -422,9 +422,15 @@
-                              struct file_lock *waiter)
- {
-       if (!list_empty(&waiter->fl_block)) {
-+#ifdef __alpha__
-+              printk(KERN_ERR "locks_insert_block: removing duplicated lock "
-+                      "(pid=%d %ld-%ld type=%d)\n", waiter->fl_pid,
-+                      waiter->fl_start, waiter->fl_end, waiter->fl_type);
-+#else
-               printk(KERN_ERR "locks_insert_block: removing duplicated lock "
-                       "(pid=%d %Ld-%Ld type=%d)\n", waiter->fl_pid,
-                       waiter->fl_start, waiter->fl_end, waiter->fl_type);
-+#endif
-               locks_delete_block(waiter);
-       }
-       list_add_tail(&waiter->fl_block, &blocker->fl_block);
-@@ -1862,11 +1868,19 @@
-                    fl->fl_pid,
-                    inode ? kdevname(inode->i_dev) : "<none>",
-                    inode ? inode->i_ino : 0);
-+#if __alpha__
-+      out += sprintf(out, "%ld ", fl->fl_start);
-+#else
-       out += sprintf(out, "%Ld ", fl->fl_start);
-+#endif
-       if (fl->fl_end == OFFSET_MAX)
-               out += sprintf(out, "EOF ");
-       else
-+#if __alpha__
-+              out += sprintf(out, "%ld ", fl->fl_end);
-+#else
-               out += sprintf(out, "%Ld ", fl->fl_end);
-+#endif
-       sprintf(out, "%08lx %08lx %08lx %08lx %08lx\n",
-               (long)fl, (long)fl->fl_link.prev, (long)fl->fl_link.next,
-               (long)fl->fl_next, (long)fl->fl_block.next);
-diff -urN linux-2.4.22.org/fs/proc/proc_tty.c linux-2.4.22/fs/proc/proc_tty.c
---- linux-2.4.22.org/fs/proc/proc_tty.c        2003-11-23 15:58:32.000000000 +0100
-+++ linux-2.4.22/fs/proc/proc_tty.c    2003-11-23 16:04:30.000000000 +0100
-@@ -161,7 +161,7 @@
-       if (!ent)
-               return;
-               
--      remove_proc_entry(driver->driver_name, proc_tty_driver);
-+      remove_proc_entry(ent->name, proc_tty_driver);
-       
-       driver->proc_entry = 0;
- }
-diff -urN linux-2.4.22.org/include/asm-alpha/hardirq.h linux-2.4.22/include/asm-alpha/hardirq.h
---- linux-2.4.22.org/include/asm-alpha/hardirq.h       2003-11-23 15:58:57.000000000 +0100
-+++ linux-2.4.22/include/asm-alpha/hardirq.h   2003-11-23 16:04:30.000000000 +0100
-@@ -41,6 +41,7 @@
- #define synchronize_irq()     barrier()
-+#define release_irqlock(cpu) ((void) 0)
- #else
- #define irq_attempt(cpu, irq) (cpu_data[cpu].irq_attempt[irq])
-diff -urN linux-2.4.22.org/include/asm-alpha/smplock.h linux-2.4.22/include/asm-alpha/smplock.h
---- linux-2.4.22.org/include/asm-alpha/smplock.h       2003-11-23 15:58:57.000000000 +0100
-+++ linux-2.4.22/include/asm-alpha/smplock.h   2003-11-23 16:04:30.000000000 +0100
-@@ -7,7 +7,7 @@
- #include <linux/sched.h>
- #include <linux/interrupt.h>
- #include <linux/spinlock.h>
--
-+#include <asm/hardirq.h>
- extern spinlock_t kernel_flag;
- #define kernel_locked()               spin_is_locked(&kernel_flag)
-diff -urN linux-2.4.22.org/include/asm-i386/rwsem.h linux-2.4.22/include/asm-i386/rwsem.h
---- linux-2.4.22.org/include/asm-i386/rwsem.h  2003-11-23 15:58:53.000000000 +0100
-+++ linux-2.4.22/include/asm-i386/rwsem.h      2003-11-23 16:04:30.000000000 +0100
-@@ -42,6 +42,7 @@
- #include <linux/list.h>
- #include <linux/spinlock.h>
-+#include <asm/system.h>
- struct rwsem_waiter;
-diff -urN linux-2.4.22.org/include/linux/binfmts.h linux-2.4.22/include/linux/binfmts.h
---- linux-2.4.22.org/include/linux/binfmts.h   2003-11-23 15:58:49.000000000 +0100
-+++ linux-2.4.22/include/linux/binfmts.h       2003-11-23 16:04:30.000000000 +0100
-@@ -16,6 +16,8 @@
- #ifdef __KERNEL__
-+struct mm_struct;
-+
- /*
-  * This structure is used to hold the arguments that are used when loading binaries.
-  */
-diff -urN linux-2.4.22.org/include/linux/brlock.h linux-2.4.22/include/linux/brlock.h
---- linux-2.4.22.org/include/linux/brlock.h    2003-11-23 15:58:47.000000000 +0100
-+++ linux-2.4.22/include/linux/brlock.h        2003-11-23 16:04:30.000000000 +0100
-@@ -39,6 +39,7 @@
- };
- #include <linux/config.h>
-+#include <linux/sched.h>
- #ifdef CONFIG_SMP
-diff -urN linux-2.4.22.org/include/linux/kbd_kern.h linux-2.4.22/include/linux/kbd_kern.h
---- linux-2.4.22.org/include/linux/kbd_kern.h  2003-11-23 15:58:47.000000000 +0100
-+++ linux-2.4.22/include/linux/kbd_kern.h      2003-11-23 16:04:30.000000000 +0100
-@@ -3,6 +3,8 @@
- #include <linux/interrupt.h>
- #include <linux/keyboard.h>
-+#include <linux/sched.h>
-+#include <linux/tty.h>
- extern struct tasklet_struct keyboard_tasklet;
-diff -urN linux-2.4.22.org/include/linux/list.h linux-2.4.22/include/linux/list.h
---- linux-2.4.22.org/include/linux/list.h      2003-11-23 15:58:47.000000000 +0100
-+++ linux-2.4.22/include/linux/list.h  2003-11-23 16:04:30.000000000 +0100
-@@ -15,9 +15,9 @@
-  * using the generic single-entry routines.
-  */
--struct list_head {
-+typedef struct list_head {
-       struct list_head *next, *prev;
--};
-+} list_t;
- #define LIST_HEAD_INIT(name) { &(name), &(name) }
-diff -urN linux-2.4.22.org/include/linux/proc_fs.h linux-2.4.22/include/linux/proc_fs.h
---- linux-2.4.22.org/include/linux/proc_fs.h   2003-11-23 15:58:47.000000000 +0100
-+++ linux-2.4.22/include/linux/proc_fs.h       2003-11-23 16:04:30.000000000 +0100
-@@ -206,6 +206,8 @@
- static inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
- extern struct proc_dir_entry proc_root;
-+extern struct proc_dir_entry proc_root_driver;
-+
- #endif /* CONFIG_PROC_FS */
-diff -urN linux-2.4.22.org/include/linux/vt_kern.h linux-2.4.22/include/linux/vt_kern.h
---- linux-2.4.22.org/include/linux/vt_kern.h   2003-11-23 15:58:47.000000000 +0100
-+++ linux-2.4.22/include/linux/vt_kern.h       2003-11-23 16:04:30.000000000 +0100
-@@ -9,6 +9,7 @@
- #include <linux/config.h>
- #include <linux/vt.h>
- #include <linux/kd.h>
-+#include <linux/tty.h>
- /*
-  * Presently, a lot of graphics programs do not restore the contents of
-diff -urN linux-2.4.22.org/include/net/sctp/compat.h linux-2.4.22/include/net/sctp/compat.h
---- linux-2.4.22.org/include/net/sctp/compat.h 2003-11-23 15:59:00.000000000 +0100
-+++ linux-2.4.22/include/net/sctp/compat.h     2003-11-23 16:03:28.000000000 +0100
-@@ -67,36 +67,4 @@
- #define sk_wmem_queued wmem_queued
- #define sk_bound_dev_if bound_dev_if
-
--/*
-- * find last bit set.
-- */
--static __inline__ int fls(int x)
--{
--      int r = 32;
--      
--      if (!x)
--              return 0;
--      if (!(x & 0xffff0000u)) {
--              x <<= 16;
--              r -= 16;
--      }
--      if (!(x & 0xff000000u)) {
--              x <<= 8;
--              r -= 8;
--      }
--      if (!(x & 0xf0000000u)) {
--              x <<= 4;
--              r -= 4;
--      }
--      if (!(x & 0xc0000000u)) {
--              x <<= 2;
--              r -= 2;
--      }
--      if (!(x & 0x80000000u)) {
--              x <<= 1;
--              r -= 1;
--      }
--      return r;
--}
--
- #endif /* __net_sctp_compat_h__ */
-diff -urN linux-2.4.22.org/init/do_mounts.c linux-2.4.22/init/do_mounts.c
---- linux-2.4.22.org/init/do_mounts.c  2003-11-23 15:58:39.000000000 +0100
-+++ linux-2.4.22/init/do_mounts.c      2003-11-23 16:04:30.000000000 +0100
-@@ -462,6 +462,10 @@
-               close(fd);
-       }
- }
-+#else
-+static void __init change_floppy(char *fmt, ...)
-+{
-+}
- #endif
- #ifdef CONFIG_BLK_DEV_RAM
-diff -urN linux-2.4.22.org/kernel/ksyms.c linux-2.4.22/kernel/ksyms.c
---- linux-2.4.22.org/kernel/ksyms.c    2003-11-23 15:58:39.000000000 +0100
-+++ linux-2.4.22/kernel/ksyms.c        2003-11-23 16:04:30.000000000 +0100
-@@ -512,9 +512,6 @@
- EXPORT_SYMBOL(simple_strtoull);
- EXPORT_SYMBOL(system_utsname);        /* UTS data */
- EXPORT_SYMBOL(uts_sem);               /* UTS semaphore */
--#ifndef __mips__
--EXPORT_SYMBOL(sys_call_table);
--#endif
- EXPORT_SYMBOL(machine_restart);
- EXPORT_SYMBOL(machine_halt);
- EXPORT_SYMBOL(machine_power_off);
-diff -urN linux-2.4.22.org/lib/rwsem-spinlock.c linux-2.4.22/lib/rwsem-spinlock.c
---- linux-2.4.22.org/lib/rwsem-spinlock.c      2003-11-23 15:58:40.000000000 +0100
-+++ linux-2.4.22/lib/rwsem-spinlock.c  2003-11-23 16:04:30.000000000 +0100
-@@ -280,6 +280,8 @@
- EXPORT_SYMBOL(__down_write);
- EXPORT_SYMBOL(__up_read);
- EXPORT_SYMBOL(__up_write);
-+EXPORT_SYMBOL(__down_write_trylock);
-+EXPORT_SYMBOL(__down_read_trylock);
- #if RWSEM_DEBUG
- EXPORT_SYMBOL(rwsemtrace);
- #endif
-diff -urN linux-2.4.22.org/mm/vmalloc.c linux-2.4.22/mm/vmalloc.c
---- linux-2.4.22.org/mm/vmalloc.c      2003-11-23 15:58:40.000000000 +0100
-+++ linux-2.4.22/mm/vmalloc.c  2003-11-23 16:04:30.000000000 +0100
-@@ -12,6 +12,7 @@
- #include <linux/spinlock.h>
- #include <linux/highmem.h>
- #include <linux/smp_lock.h>
-+#include <linux/interrupt.h>
- #include <asm/uaccess.h>
- #include <asm/pgalloc.h>
-@@ -19,6 +20,9 @@
- rwlock_t vmlist_lock = RW_LOCK_UNLOCKED;
- struct vm_struct * vmlist;
-+extern void show_stack(unsigned long *);
-+
-+
- static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned long size)
- {
-       pte_t * pte;
-@@ -244,6 +248,12 @@
-               printk(KERN_ERR "Trying to vfree() bad address (%p)\n", addr);
-               return;
-       }
-+      if (in_interrupt()) {
-+              printk("vfree(): sleeping in interrupt!! \n");
-+#ifdef __i386__       
-+              show_stack(NULL);
-+#endif        
-+      }
-       write_lock(&vmlist_lock);
-       for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
-               if (tmp->addr == addr) {
-diff -urN linux-2.4.22.org/net/sctp/ipv6.c linux-2.4.22/net/sctp/ipv6.c
---- linux-2.4.22.org/net/sctp/ipv6.c   2003-11-23 15:59:36.000000000 +0100
-+++ linux-2.4.22/net/sctp/ipv6.c       2003-11-23 16:03:04.000000000 +0100
-@@ -74,6 +74,7 @@
- #include <net/sctp/sctp.h>
- #include <asm/uaccess.h>
-+#include <linux/bitops.h>
- extern struct notifier_block sctp_inetaddr_notifier;
-diff -urN linux-2.4.22.org/net/sunrpc/auth.c linux-2.4.22/net/sunrpc/auth.c
---- linux-2.4.22.org/net/sunrpc/auth.c 2003-11-23 15:59:34.000000000 +0100
-+++ linux-2.4.22/net/sunrpc/auth.c     2003-11-23 16:04:30.000000000 +0100
-@@ -13,6 +13,7 @@
- #include <linux/socket.h>
- #include <linux/sunrpc/clnt.h>
- #include <linux/spinlock.h>
-+#include <linux/module.h>
- #ifdef RPC_DEBUG
- # define RPCDBG_FACILITY      RPCDBG_AUTH
-diff -urN linux-2.4.22.org/net/wanrouter/wanproc.c linux-2.4.22/net/wanrouter/wanproc.c
---- linux-2.4.22.org/net/wanrouter/wanproc.c   2003-11-23 15:59:34.000000000 +0100
-+++ linux-2.4.22/net/wanrouter/wanproc.c       2003-11-23 16:04:30.000000000 +0100
-@@ -1081,6 +1081,13 @@
- }
- #endif
-+#ifndef CONFIG_PROC_FS
-+      int __init wanrouter_proc_init (void)
-+      {
-+              return 0;
-+      }
-+#endif
-+
- /*
-  *    End
-  */
-diff -urN linux-2.4.24.org/drivers/scsi/scsi_module.c linux-2.4.24/drivers/scsi/scsi_module.c
---- linux-2.4.24.org/drivers/scsi/scsi_module.c        2004-01-18 20:35:20.949771349 +0100
-+++ linux-2.4.24/drivers/scsi/scsi_module.c    2004-01-18 20:35:44.792782897 +0100
-@@ -29,6 +29,7 @@
-  * scsi_register.
-  */
-+#ifndef PCMCIA
- #include <linux/module.h>
- #include <linux/init.h>
-@@ -50,6 +51,7 @@
- module_init(init_this_scsi_driver);
- module_exit(exit_this_scsi_driver);
-+#endif
- /*
-  * Overrides for Emacs so that we almost follow Linus's tabbing style.
-diff -urN linux-2.4.24.org/include/asm-alpha/bitops.h linux-2.4.24/include/asm-alpha/bitops.h
---- linux-2.4.24.org/include/asm-alpha/bitops.h        2004-01-19 20:58:56.469350313 +0100
-+++ linux-2.4.24/include/asm-alpha/bitops.h    2004-01-23 19:18:12.882761301 +0100
-@@ -315,6 +315,11 @@
-       return word ? result+1 : 0;
- }
-+/*
-+ * fls: find last bit set.
-+ */
-+#define fls     generic_fls
-+
- /* Compute powers of two for the given integer.  */
- static inline int floor_log2(unsigned long word)
- {
---- linux-2.4.26/drivers/char/drm/drmP.h.org   2004-04-19 02:52:58.034427096 +0200
-+++ linux-2.4.26/drivers/char/drm/drmP.h       2004-04-19 02:53:24.323430560 +0200
-@@ -107,76 +107,6 @@
- #define __REALLY_HAVE_MTRR    (__HAVE_MTRR && defined(CONFIG_MTRR))
--                              /* Generic cmpxchg added in 2.3.x */
--#ifndef __HAVE_ARCH_CMPXCHG
--                              /* Include this here so that driver can be
--                                   used with older kernels. */
--#if defined(__alpha__)
--static __inline__ unsigned long
--__cmpxchg_u32(volatile int *m, int old, int new)
--{
--      unsigned long prev, cmp;
--
--      __asm__ __volatile__(
--      "1:     ldl_l %0,%2\n"
--      "       cmpeq %0,%3,%1\n"
--      "       beq %1,2f\n"
--      "       mov %4,%1\n"
--      "       stl_c %1,%2\n"
--      "       beq %1,3f\n"
--      "2:     mb\n"
--      ".subsection 2\n"
--      "3:     br 1b\n"
--      ".previous"
--      : "=&r"(prev), "=&r"(cmp), "=m"(*m)
--      : "r"((long) old), "r"(new), "m"(*m));
--
--      return prev;
--}
--
--static __inline__ unsigned long
--__cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new)
--{
--      unsigned long prev, cmp;
--
--      __asm__ __volatile__(
--      "1:     ldq_l %0,%2\n"
--      "       cmpeq %0,%3,%1\n"
--      "       beq %1,2f\n"
--      "       mov %4,%1\n"
--      "       stq_c %1,%2\n"
--      "       beq %1,3f\n"
--      "2:     mb\n"
--      ".subsection 2\n"
--      "3:     br 1b\n"
--      ".previous"
--      : "=&r"(prev), "=&r"(cmp), "=m"(*m)
--      : "r"((long) old), "r"(new), "m"(*m));
--
--      return prev;
--}
--
--static __inline__ unsigned long
--__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
--{
--      switch (size) {
--              case 4:
--                      return __cmpxchg_u32(ptr, old, new);
--              case 8:
--                      return __cmpxchg_u64(ptr, old, new);
--      }
--      return old;
--}
--#define cmpxchg(ptr,o,n)                                               \
--  ({                                                                   \
--     __typeof__(*(ptr)) _o_ = (o);                                     \
--     __typeof__(*(ptr)) _n_ = (n);                                     \
--     (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_,                 \
--                                  (unsigned long)_n_, sizeof(*(ptr))); \
--  })
--
--#endif /* alpha */
--#endif
- #define __REALLY_HAVE_SG      (__HAVE_SG)
- /* Begin the DRM...
-
diff --git a/linux-2.4.1-netdebug.patch b/linux-2.4.1-netdebug.patch
deleted file mode 100644 (file)
index a820f5b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
---- linux/include/net/sock.h.~1~       Thu Feb 22 21:12:12 2001
-+++ linux/include/net/sock.h   Sun Feb 25 21:26:16 2001
-@@ -1279,7 +1279,7 @@
-  *    Enable debug/info messages 
-  */
--#if 0
-+#if 1
- #define NETDEBUG(x)   do { } while (0)
- #else
- #define NETDEBUG(x)   do { x; } while (0)
-
diff --git a/linux-2.4.18-hpfs.patch b/linux-2.4.18-hpfs.patch
deleted file mode 100644 (file)
index d3c62f8..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-diff -Nur linux-2.4.18-2.27/fs/hpfs/buffer.c linux-2.4.6/fs/hpfs/buffer.c
---- linux-2.4.18-2.27/fs/hpfs/buffer.c Mon Feb 25 20:38:08 2002
-+++ linux-2.4.6/fs/hpfs/buffer.c       Sat Dec  9 20:43:03 2000
-@@ -122,9 +122,12 @@
- void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head **bhp,
-                int ahead)
- {
-+      kdev_t dev = s->s_dev;
-       struct buffer_head *bh;
--      *bhp = bh = sb_bread(s, secno);
-+      if (!ahead || secno + ahead >= s->s_hpfs_fs_size)
-+              *bhp = bh = bread(dev, secno, 512);
-+      else *bhp = bh = bread(dev, secno, 512);
-       if (bh != NULL)
-               return bh->b_data;
-       else {
-@@ -140,7 +143,7 @@
-       struct buffer_head *bh;
-       /*return hpfs_map_sector(s, secno, bhp, 0);*/
--      if ((*bhp = bh = sb_getblk(s, secno)) != NULL) {
-+      if ((*bhp = bh = getblk(s->s_dev, secno, 512)) != NULL) {
-               if (!buffer_uptodate(bh)) wait_on_buffer(bh);
-               mark_buffer_uptodate(bh, 1);
-               return bh->b_data;
-@@ -155,6 +158,7 @@
- void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffer_head *qbh,
-                  int ahead)
- {
-+      kdev_t dev = s->s_dev;
-       struct buffer_head *bh;
-       char *data;
-@@ -169,22 +173,24 @@
-               goto bail;
-       }
--      qbh->bh[0] = bh = sb_bread(s, secno);
-+      if (!ahead || secno + 4 + ahead > s->s_hpfs_fs_size)
-+              qbh->bh[0] = bh = bread(dev, secno, 512);
-+      else qbh->bh[0] = bh = bread(dev, secno, 512);
-       if (!bh)
-               goto bail0;
-       memcpy(data, bh->b_data, 512);
--      qbh->bh[1] = bh = sb_bread(s, secno + 1);
-+      qbh->bh[1] = bh = bread(dev, secno + 1, 512);
-       if (!bh)
-               goto bail1;
-       memcpy(data + 512, bh->b_data, 512);
--      qbh->bh[2] = bh = sb_bread(s, secno + 2);
-+      qbh->bh[2] = bh = bread(dev, secno + 2, 512);
-       if (!bh)
-               goto bail2;
-       memcpy(data + 2 * 512, bh->b_data, 512);
--      qbh->bh[3] = bh = sb_bread(s, secno + 3);
-+      qbh->bh[3] = bh = bread(dev, secno + 3, 512);
-       if (!bh)
-               goto bail3;
-       memcpy(data + 3 * 512, bh->b_data, 512);
-diff -Nur linux-2.4.18-2.27/fs/hpfs/file.c linux-2.4.6/fs/hpfs/file.c
---- linux-2.4.18-2.27/fs/hpfs/file.c   Mon Aug 13 02:37:53 2001
-+++ linux-2.4.6/fs/hpfs/file.c Fri Dec 29 23:07:57 2000
-@@ -11,8 +11,6 @@
- #include <linux/smp_lock.h>
- #include "hpfs_fn.h"
--#define BLOCKS(size) (((size) + 511) >> 9)
--
- /* HUH? */
- int hpfs_open(struct inode *i, struct file *f)
- {
-@@ -48,7 +46,7 @@
-       unsigned n, disk_secno;
-       struct fnode *fnode;
-       struct buffer_head *bh;
--      if (BLOCKS(inode->u.hpfs_i.mmu_private) <= file_secno) return 0;
-+      if (((inode->i_size + 511) >> 9) <= file_secno) return 0;
-       n = file_secno - inode->i_hpfs_file_sec;
-       if (n < inode->i_hpfs_n_secs) return inode->i_hpfs_disk_sec + n;
-       if (!(fnode = hpfs_map_fnode(inode->i_sb, inode->i_ino, &bh))) return 0;
-diff -Nur linux-2.4.18-2.27/fs/hpfs/inode.c linux-2.4.6/fs/hpfs/inode.c
---- linux-2.4.18-2.27/fs/hpfs/inode.c  Mon Sep 10 16:31:25 2001
-+++ linux-2.4.6/fs/hpfs/inode.c        Mon Jan 22 19:40:47 2001
-@@ -12,7 +12,6 @@
- static struct file_operations hpfs_file_ops =
- {
--      llseek:         generic_file_llseek,
-       read:           generic_file_read,
-       write:          hpfs_file_write,
-       mmap:           generic_file_mmap,
-@@ -300,12 +299,10 @@
- {
-       struct inode *inode = dentry->d_inode;
-       int error;
--      if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) 
--              return -EINVAL;
-+      if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) return -EINVAL;
-       if (inode->i_sb->s_hpfs_root == inode->i_ino) return -EINVAL;
-       if ((error = inode_change_ok(inode, attr))) return error;
--      error = inode_setattr(inode, attr);
--      if (error) return error;
-+      inode_setattr(inode, attr);
-       hpfs_write_inode(inode);
-       return 0;
- }
-diff -Nur linux-2.4.18-2.27/fs/hpfs/super.c linux-2.4.6/fs/hpfs/super.c
---- linux-2.4.18-2.27/fs/hpfs/super.c  Mon Feb 25 20:38:08 2002
-+++ linux-2.4.6/fs/hpfs/super.c        Tue Jun 12 04:15:27 2001
-@@ -3,7 +3,7 @@
-  *
-  *  Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-1999
-  *
-- *  mounting, unmounting, error handling
-+ *  mouning, unmounting, error handling
-  */
- #include <linux/string.h>
diff --git a/linux-2.4.18-input-35215.patch b/linux-2.4.18-input-35215.patch
deleted file mode 100644 (file)
index 71f8cd6..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -urNp linux-1255/drivers/input/input.c linux-1261/drivers/input/input.c
---- linux-1255/drivers/input/input.c   
-+++ linux-1261/drivers/input/input.c   
-@@ -34,6 +34,7 @@
- #include <linux/input.h>
- #include <linux/module.h>
- #include <linux/random.h>
-+#include <linux/kmod.h>
- MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
- MODULE_DESCRIPTION("Input layer module");
-@@ -370,12 +371,20 @@ void input_unregister_handler(struct inp
- static int input_open_file(struct inode *inode, struct file *file)
- {
--      struct input_handler *handler = input_table[MINOR(inode->i_rdev) >> 5];
--      struct file_operations *old_fops, *new_fops = NULL;
-+      struct input_handler *handler;
-+      struct file_operations *old_fops, *new_fops;
-+      unsigned int minor = MINOR(inode->i_rdev);
-       int err;
--      /* No load-on-demand here? */
--      if (!handler || !(new_fops = fops_get(handler->fops)))
-+      /* XXX Are we sure there's no locking problem here? */
-+      if (!(handler = input_table[minor >> 5])) {
-+              char modnam[sizeof("char-major-00000-000000000")];
-+              sprintf(modnam, "char-major-%d-%d", INPUT_MAJOR, minor & ~0x1f);
-+              request_module(modnam);
-+              if (!(handler = input_table[minor >> 5]))
-+                      return -ENODEV;
-+      }
-+      if (!(new_fops = fops_get(handler->fops)))
-               return -ENODEV;
-       /*
diff --git a/linux-2.4.18-kiobuf.patch b/linux-2.4.18-kiobuf.patch
deleted file mode 100644 (file)
index 1216676..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-diff -urNp linux-1580/drivers/char/raw.c linux-1620/drivers/char/raw.c
---- linux-1580/drivers/char/raw.c      
-+++ linux-1620/drivers/char/raw.c      
-@@ -86,12 +86,6 @@ int raw_open(struct inode *inode, struct
-               filp->f_op = &raw_ctl_fops;
-               return 0;
-       }
--      
--      if (!filp->f_iobuf) {
--              err = alloc_kiovec(1, &filp->f_iobuf);
--              if (err)
--                      return err;
--      }
-       down(&raw_devices[minor].mutex);
-       /*
-@@ -295,7 +289,6 @@ ssize_t    rw_raw_dev(int rw, struct file *
-                  size_t size, loff_t *offp)
- {
-       struct kiobuf * iobuf;
--      int             new_iobuf;
-       int             err = 0;
-       unsigned long   blocknr, blocks;
-       size_t          transferred;
-@@ -314,18 +307,10 @@ ssize_t  rw_raw_dev(int rw, struct file *
-       minor = MINOR(filp->f_dentry->d_inode->i_rdev);
--      new_iobuf = 0;
--      iobuf = filp->f_iobuf;
--      if (test_and_set_bit(0, &filp->f_iobuf_lock)) {
--              /*
--               * A parallel read/write is using the preallocated iobuf
--               * so just run slow and allocate a new one.
--               */
--              err = alloc_kiovec(1, &iobuf);
--              if (err)
--                      goto out;
--              new_iobuf = 1;
--      }
-+      err = alloc_kiovec(1, &iobuf);
-+      if (err)
-+              return err;
-+      
-       dev = to_kdev_t(raw_devices[minor].binding->bd_dev);
-       sector_size = raw_devices[minor].sector_size;
-@@ -398,10 +383,6 @@ ssize_t   rw_raw_dev(int rw, struct file *
-       }
-  out_free:
--      if (!new_iobuf)
--              clear_bit(0, &filp->f_iobuf_lock);
--      else
--              free_kiovec(1, &iobuf);
-- out: 
-+      free_kiovec(1, &iobuf);
-       return err;
- }
-diff -urNp linux-1580/fs/iobuf.c linux-1620/fs/iobuf.c
---- linux-1580/fs/iobuf.c      
-+++ linux-1620/fs/iobuf.c      
-@@ -8,8 +8,6 @@
- #include <linux/iobuf.h>
- #include <linux/slab.h>
--#include <linux/vmalloc.h>
--
- static kmem_cache_t *kiobuf_cachep;
-@@ -27,6 +25,8 @@ void end_kio_request(struct kiobuf *kiob
- static int kiobuf_init(struct kiobuf *iobuf)
- {
-+      int retval;
-+
-       init_waitqueue_head(&iobuf->wait_queue);
-       iobuf->array_len = 0;
-       iobuf->nr_pages = 0;
-@@ -35,7 +35,16 @@ static int kiobuf_init(struct kiobuf *io
-       iobuf->blocks = NULL;
-       atomic_set(&iobuf->io_count, 0);
-       iobuf->end_io = NULL;
--      return expand_kiobuf(iobuf, KIO_STATIC_PAGES);
-+      iobuf->initialized = 0;
-+      retval = expand_kiobuf(iobuf, KIO_STATIC_PAGES);
-+      if (retval) return retval;
-+      retval = alloc_kiobuf_bhs(iobuf);
-+      if (retval) {
-+              kfree(iobuf->maplist);
-+              return retval;
-+      }
-+      iobuf->initialized = 1;
-+      return 0;
- }
- int alloc_kiobuf_bhs(struct kiobuf * kiobuf)
-@@ -89,6 +98,21 @@ void free_kiobuf_bhs(struct kiobuf * kio
-       }
- }
-+void kiobuf_ctor(void * objp, kmem_cache_t * cachep, unsigned long flag)
-+{
-+      struct kiobuf * iobuf = (struct kiobuf *) objp;
-+      kiobuf_init(iobuf);
-+}
-+
-+void kiobuf_dtor(void * objp, kmem_cache_t * cachep, unsigned long flag)
-+{
-+      struct kiobuf * iobuf = (struct kiobuf *) objp;
-+      if (iobuf->initialized) {
-+              kfree(iobuf->maplist);
-+              free_kiobuf_bhs(iobuf);
-+      }
-+}
-+
- int alloc_kiovec(int nr, struct kiobuf **bufp)
- {
-       int i;
-@@ -98,10 +122,11 @@ int alloc_kiovec(int nr, struct kiobuf *
-               iobuf = kmem_cache_alloc(kiobuf_cachep, GFP_KERNEL);
-               if (unlikely(!iobuf))
-                       goto nomem;
--              if (unlikely(kiobuf_init(iobuf)))
--                      goto nomem2;
--              if (unlikely(alloc_kiobuf_bhs(iobuf)))
--                      goto nomem2;
-+              if (unlikely(!iobuf->initialized)) {
-+                      /* try again to complete previously failed ctor */
-+                      if (unlikely(kiobuf_init(iobuf)))
-+                              goto nomem2;
-+              }
-               bufp[i] = iobuf;
-       }
-       
-@@ -121,11 +146,10 @@ void free_kiovec(int nr, struct kiobuf *
-       
-       for (i = 0; i < nr; i++) {
-               iobuf = bufp[i];
--              if (iobuf->locked)
--                      unlock_kiovec(1, &iobuf);
--              kfree(iobuf->maplist);
--              free_kiobuf_bhs(iobuf);
--              kmem_cache_free(kiobuf_cachep, bufp[i]);
-+              init_waitqueue_head(&iobuf->wait_queue);
-+              iobuf->io_count.counter = 0;
-+              iobuf->end_io = NULL;
-+              kmem_cache_free(kiobuf_cachep, iobuf);
-       }
- }
-@@ -180,7 +204,7 @@ repeat:
- void __init iobuf_cache_init(void)
- {
-       kiobuf_cachep = kmem_cache_create("kiobuf", sizeof(struct kiobuf),
--                                        0, SLAB_HWCACHE_ALIGN, NULL, NULL);
-+                                        0, SLAB_HWCACHE_ALIGN, kiobuf_ctor, kiobuf_dtor);
-       if (!kiobuf_cachep)
-               panic("Cannot create kiobuf SLAB cache");
- }
-diff -urNp linux-1580/include/linux/iobuf.h linux-1620/include/linux/iobuf.h
---- linux-1580/include/linux/iobuf.h   
-+++ linux-1620/include/linux/iobuf.h   
-@@ -39,7 +39,8 @@ struct kiobuf 
-       int             offset;         /* Offset to start of valid data */
-       int             length;         /* Number of valid bytes of data */
--      unsigned int    locked : 1;     /* If set, pages has been locked */
-+      unsigned int    locked : 1,     /* If set, pages has been locked */
-+                      initialized:1;  /* If set, done initialize */
-       struct page **  maplist;
-       struct buffer_head ** bh;
diff --git a/linux-2.4.18-mppe.patch b/linux-2.4.18-mppe.patch
deleted file mode 100644 (file)
index 591067c..0000000
+++ /dev/null
@@ -1,1133 +0,0 @@
-diff -urN linux-2.4.18.org/drivers/net/arcfour.c linux-2.4.18/drivers/net/arcfour.c
---- linux-2.4.18.org/drivers/net/arcfour.c     Thu Jan  1 01:00:00 1970
-+++ linux-2.4.18/drivers/net/arcfour.c Tue Apr  2 16:01:37 2002
-@@ -0,0 +1,72 @@
-+/*
-+ * arcfour.c
-+ * by Frank Cusack <frank@google.com>
-+ * 100% public domain
-+ *
-+ * Implemented from the description in _Applied Cryptography_, 2nd ed.
-+ *
-+ * ** Distribution ** of this software is unlimited and unrestricted.
-+ *
-+ * ** Use ** of this software is almost certainly legal; however, refer
-+ * to <http://theory.lcs.mit.edu/~rivest/faq.html>.
-+ */
-+
-+#include "arcfour.h"
-+
-+#define swap(a, b)            \
-+{                             \
-+    unsigned char t = b;      \
-+    b = a;                    \
-+    a = t;                    \
-+}
-+
-+/*
-+ * Initialize arcfour from a key.
-+ */
-+void
-+arcfour_setkey(arcfour_context *context, const unsigned char *key,
-+             unsigned keylen)
-+{
-+    unsigned i, j;
-+    unsigned char K[256];
-+
-+    context->i = context->j = 0;
-+
-+    for (i = 0; i < 256; i++) {
-+      context->S[i] = i;
-+      K[i] = key[i % keylen];
-+    }
-+
-+    j = 0;
-+    for (i = 0; i < 256; i++) {
-+      j = (j + context->S[i] + K[i]) % 256;
-+      swap(context->S[i], context->S[j]);
-+    }
-+
-+    memset(K, 0, sizeof(K));
-+}
-+
-+/*
-+ * plaintext -> ciphertext (or vice versa)
-+ */
-+void
-+arcfour_encrypt(arcfour_context *context, const unsigned char *in, unsigned len,
-+              unsigned char *out)
-+{
-+    unsigned i = context->i;
-+    unsigned j = context->j;
-+    unsigned char *S = context->S;
-+    unsigned char K;
-+
-+    while (len--) {
-+      i = (i + 1) % 256;
-+      j = (j + S[i]) % 256;
-+      swap(S[i], S[j]);
-+      K = S[(S[i] + S[j]) % 256];
-+      *out++ = *in++ ^ K;
-+    }
-+
-+    context->i = i;
-+    context->j = j;
-+}
-+
-diff -urN linux-2.4.18.org/drivers/net/arcfour.h linux-2.4.18/drivers/net/arcfour.h
---- linux-2.4.18.org/drivers/net/arcfour.h     Thu Jan  1 01:00:00 1970
-+++ linux-2.4.18/drivers/net/arcfour.h Tue Apr  2 16:01:37 2002
-@@ -0,0 +1,17 @@
-+/* arcfour.h */
-+
-+#ifndef _ARCFOUR_H
-+#define _ARCFOUR_H
-+
-+typedef struct {
-+    unsigned i;
-+    unsigned j;
-+    unsigned char S[256];
-+} arcfour_context;
-+
-+extern void arcfour_setkey(arcfour_context *, const unsigned char *, unsigned);
-+extern void arcfour_encrypt(arcfour_context *, const unsigned char *, unsigned,
-+                          unsigned char *);
-+#define arcfour_decrypt arcfour_encrypt
-+
-+#endif /* _ARCFOUR_H */
-diff -urN linux-2.4.18.org/drivers/net/ppp_mppe_compress.c linux-2.4.18/drivers/net/ppp_mppe_compress.c
---- linux-2.4.18.org/drivers/net/ppp_mppe_compress.c   Thu Jan  1 01:00:00 1970
-+++ linux-2.4.18/drivers/net/ppp_mppe_compress.c       Tue Apr  2 16:12:48 2002
-@@ -0,0 +1,615 @@
-+/*
-+ *  ==FILEVERSION 20020320==
-+ *
-+ * ppp_mppe_compress.c - interface MPPE to the PPP code.
-+ * This version is for use with Linux kernel 2.2.19+ and 2.4.x.
-+ *
-+ * By Frank Cusack <frank@google.com>.
-+ * Copyright (c) 2002 Google, Inc.
-+ * All rights reserved.
-+ *
-+ * Permission to use, copy, modify, and distribute this software and its
-+ * documentation is hereby granted, provided that the above copyright
-+ * notice appears in all copies.  This software is provided without any
-+ * warranty, express or implied.
-+ *
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/init.h>
-+#include <linux/types.h>
-+#include <linux/slab.h>
-+#include <linux/string.h>
-+
-+#include <linux/ppp_defs.h>
-+#include <linux/ppp-comp.h>
-+
-+#include "arcfour.h"
-+#include "sha1.h"
-+
-+/*
-+ * State for an MPPE (de)compressor.
-+ */
-+typedef struct ppp_mppe_state {
-+    unsigned char     master_key[MPPE_MAX_KEY_LEN];
-+    unsigned char     session_key[MPPE_MAX_KEY_LEN];
-+    arcfour_context   arcfour_context; /* encryption state */
-+    unsigned          keylen;         /* key length in bytes             */
-+                                      /* NB: 128-bit == 16, 40-bit == 8! */
-+                                      /* If we want to support 56-bit,   */
-+                                      /* the unit has to change to bits  */
-+    unsigned char     bits;           /* MPPE control bits */
-+    unsigned          ccount;         /* 12-bit coherency count (seqno)  */
-+    unsigned          stateful;       /* stateful mode flag */
-+    int                       discard;        /* stateful mode packet loss flag */
-+    int                       sanity_errors;  /* take down LCP if too many */
-+    int                       unit;
-+    int                       debug;
-+    struct compstat   stats;
-+} ppp_mppe_state;
-+
-+/* ppp_mppe_state.bits definitions */
-+#define MPPE_BIT_A    0x80    /* Encryption table were (re)inititalized */
-+#define MPPE_BIT_B    0x40    /* MPPC only (not implemented) */
-+#define MPPE_BIT_C    0x20    /* MPPC only (not implemented) */
-+#define MPPE_BIT_D    0x10    /* This is an encrypted frame */
-+
-+#define MPPE_BIT_FLUSHED      MPPE_BIT_A
-+#define MPPE_BIT_ENCRYPTED    MPPE_BIT_D
-+
-+#define MPPE_BITS(p) ((p)[4] & 0xf0)
-+#define MPPE_CCOUNT(p) ((((p)[4] & 0x0f) << 8) + (p)[5])
-+#define MPPE_CCOUNT_SPACE 0x1000      /* The size of the ccount space */
-+
-+/*
-+ * MPPE overhead/packet.
-+ * Note that we use this differently than other compressors.
-+ */
-+#define MPPE_OVHD     2               /* MPPE overhead/packet */
-+/* Max bogon factor we will tolerate */
-+#define SANITY_MAX    1600
-+
-+static void   GetNewKeyFromSHA __P((unsigned char *StartKey,
-+                                    unsigned char *SessionKey,
-+                                    unsigned SessionKeyLength,
-+                                    unsigned char *InterimKey));
-+static void   mppe_rekey __P((ppp_mppe_state *state, int));
-+static void   *mppe_alloc __P((unsigned char *options, int optlen));
-+static void   mppe_free __P((void *state));
-+static int    mppe_init __P((void *state, unsigned char *options,
-+                             int optlen, int unit, int debug, const char *));
-+static int    mppe_comp_init __P((void *state, unsigned char *options,
-+                                  int optlen,
-+                                  int unit, int hdrlen, int debug));
-+static int    mppe_decomp_init __P((void *state, unsigned char *options,
-+                                    int optlen, int unit,
-+                                    int hdrlen, int mru, int debug));
-+static int    mppe_compress __P((void *state, unsigned char *ibuf,
-+                                 unsigned char *obuf,
-+                                 int isize, int osize));
-+static void   mppe_incomp __P((void *state, unsigned char *ibuf, int icnt));
-+static int    mppe_decompress __P((void *state, unsigned char *ibuf,
-+                                   int isize, unsigned char *obuf,int osize));
-+static void   mppe_comp_reset __P((void *state));
-+static void   mppe_decomp_reset __P((void *state));
-+static void   mppe_comp_stats __P((void *state, struct compstat *stats));
-+
-+
-+/*
-+ * Key Derivation, from RFC 3078, RFC 3079.
-+ * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079.
-+ */
-+static void
-+GetNewKeyFromSHA(unsigned char *MasterKey, unsigned char *SessionKey,
-+               unsigned SessionKeyLength, unsigned char *InterimKey)
-+{
-+    SHA1_CTX Context;
-+    unsigned char Digest[SHA1_SIGNATURE_SIZE];
-+
-+    unsigned char SHApad1[40] =
-+    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-+    unsigned char SHApad2[40] =
-+    { 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2,
-+      0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2,
-+      0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2,
-+      0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2 };
-+
-+    /* assert(SessionKeyLength <= SHA1_SIGNATURE_SIZE); */
-+
-+    SHA1_Init(&Context);
-+    SHA1_Update(&Context, MasterKey, SessionKeyLength);
-+    SHA1_Update(&Context, SHApad1, sizeof(SHApad1));
-+    SHA1_Update(&Context, SessionKey, SessionKeyLength);
-+    SHA1_Update(&Context, SHApad2, sizeof(SHApad2));
-+    SHA1_Final(Digest, &Context);
-+
-+    memcpy(InterimKey, Digest, SessionKeyLength);
-+}
-+
-+/*
-+ * Perform the MPPE rekey algorithm, from RFC 3078, sec. 7.3.
-+ * Well, not what's written there, but rather what they meant.
-+ */
-+static void
-+mppe_rekey(ppp_mppe_state *state, int initial_key)
-+{
-+    unsigned char InterimKey[MPPE_MAX_KEY_LEN];
-+
-+    GetNewKeyFromSHA(state->master_key, state->session_key,
-+                   state->keylen, InterimKey);
-+    if (!initial_key) {
-+      arcfour_setkey(&state->arcfour_context, InterimKey, state->keylen);
-+      arcfour_encrypt(&state->arcfour_context, InterimKey, state->keylen,
-+                      state->session_key);
-+    } else {
-+      memcpy(state->session_key, InterimKey, state->keylen);
-+    }
-+    if (state->keylen == 8) {
-+      /* See RFC 3078 */
-+      state->session_key[0] = 0xd1;
-+      state->session_key[1] = 0x26;
-+      state->session_key[2] = 0x9e;
-+    }
-+    arcfour_setkey(&state->arcfour_context, state->session_key, state->keylen);
-+}
-+
-+
-+/*
-+ * Allocate space for a (de)compressor.
-+ */
-+static void *
-+mppe_alloc(unsigned char *options, int optlen)
-+{
-+    ppp_mppe_state *state;
-+
-+    if (optlen != CILEN_MPPE + sizeof(state->master_key)
-+      || options[0] != CI_MPPE
-+      || options[1] != CILEN_MPPE)
-+      return NULL;
-+
-+    state = (ppp_mppe_state *) kmalloc(sizeof(*state), GFP_KERNEL);
-+    if (state == NULL)
-+      return NULL;
-+
-+    MOD_INC_USE_COUNT;
-+    memset(state, 0, sizeof(*state));
-+
-+    /* Save keys. */
-+    memcpy(state->master_key, &options[CILEN_MPPE], sizeof(state->master_key));
-+    memcpy(state->session_key, state->master_key, sizeof(state->master_key));
-+    /*
-+     * We defer initial key generation until mppe_init(), as mppe_alloc()
-+     * is called frequently during negotiation.
-+     */
-+
-+    return (void *) state;
-+}
-+
-+/*
-+ * Deallocate space for a (de)compressor.
-+ */
-+static void
-+mppe_free(void *arg)
-+{
-+    ppp_mppe_state *state = (ppp_mppe_state *) arg;
-+
-+    if (state) {
-+      kfree(state);
-+      MOD_DEC_USE_COUNT;
-+    }
-+}
-+
-+
-+/* 
-+ * Initialize (de)compressor state.
-+ */
-+static int
-+mppe_init(void *arg, unsigned char *options, int optlen, int unit, int debug,
-+        const char *debugstr)
-+{
-+    ppp_mppe_state *state = (ppp_mppe_state *) arg;
-+    unsigned char mppe_opts;
-+
-+    if (optlen != CILEN_MPPE
-+      || options[0] != CI_MPPE
-+      || options[1] != CILEN_MPPE)
-+      return 0;
-+
-+    MPPE_CI_TO_OPTS(&options[2], mppe_opts);
-+    if (mppe_opts & MPPE_OPT_128)
-+      state->keylen = 16;
-+    else if (mppe_opts & MPPE_OPT_40)
-+      state->keylen = 8;
-+    else {
-+      printk(KERN_WARNING "%s[%d]: unknown key length\n", debugstr, unit);
-+      return 0;
-+    }
-+    if (mppe_opts & MPPE_OPT_STATEFUL)
-+      state->stateful = 1;
-+
-+    /* Generate the initial session key. */
-+    mppe_rekey(state, 1);
-+
-+    if (debug) {
-+      int i;
-+      char mkey[sizeof(state->master_key) * 3 + 1];
-+      char skey[sizeof(state->session_key) * 3 + 1];
-+
-+      printk(KERN_DEBUG "%s[%d]: initialized with %d-bit %s mode\n", debugstr,
-+             unit, (state->keylen == 16)? 128: 40,
-+             (state->stateful)? "stateful": "stateless");
-+
-+      for (i = 0; i < sizeof(state->master_key); i++)
-+          sprintf(mkey + i * 2, "%.2x ", state->master_key[i]);
-+      for (i = 0; i < sizeof(state->session_key); i++)
-+          sprintf(skey + i * 2, "%.2x ", state->session_key[i]);
-+      printk(KERN_DEBUG "%s[%d]: keys: master: %s initial session: %s\n",
-+             debugstr, unit, mkey, skey);
-+    }
-+
-+    /*
-+     * Initialize the coherency count.  The initial value is not specified
-+     * in RFC 3078, but we can make a reasonable assumption that it will
-+     * start at 0.  Setting it to the max here makes the comp/decomp code
-+     * do the right thing (determined through experiment).
-+     */
-+    state->ccount = MPPE_CCOUNT_SPACE - 1;
-+
-+    /*
-+     * Note that even though we have initialized the key table, we don't
-+     * set the FLUSHED bit.  This is contrary to RFC 3078, sec. 3.1.
-+     */
-+    state->bits = MPPE_BIT_ENCRYPTED;
-+
-+    state->unit  = unit;
-+    state->debug = debug;
-+
-+    return 1;
-+}
-+
-+
-+
-+static int
-+mppe_comp_init(void *arg, unsigned char *options, int optlen, int unit,
-+             int hdrlen, int debug)
-+{
-+    /* ARGSUSED */
-+    return mppe_init(arg, options, optlen, unit, debug, "mppe_comp_init");
-+}
-+
-+/*
-+ * We received a CCP Reset-Request (actually, we are sending a Reset-Ack),
-+ * tell the compressor to rekey.  Note that we MUST NOT rekey for
-+ * every CCP Reset-Request; we only rekey on the next xmit packet.
-+ * We might get multiple CCP Reset-Requests if our CCP Reset-Ack is lost.
-+ * So, rekeying for every CCP Reset-Request is broken as the peer will not
-+ * know how many times we've rekeyed.  (If we rekey and THEN get another
-+ * CCP Reset-Request, we must rekey again.)
-+ */
-+static void
-+mppe_comp_reset(void *arg)
-+{
-+    ppp_mppe_state *state = (ppp_mppe_state *) arg;
-+
-+    state->bits |= MPPE_BIT_FLUSHED;
-+}
-+
-+/*
-+ * Compress (encrypt) a packet.
-+ * It's strange to call this a compressor, since the output is always
-+ * MPPE_OVHD + 2 bytes larger than the input.
-+ */
-+int
-+mppe_compress(void *arg, unsigned char *ibuf, unsigned char *obuf,
-+            int isize, int osize)
-+{
-+    ppp_mppe_state *state = (ppp_mppe_state *) arg;
-+    int proto;
-+
-+    /*
-+     * Check that the protocol is in the range we handle.
-+     */
-+    proto = PPP_PROTOCOL(ibuf);
-+    if (proto < 0x0021 || proto > 0x00fa)
-+      return 0;
-+
-+    /* Make sure we have enough room to generate an encrypted packet. */
-+    if (osize < isize + MPPE_OVHD + 2) {
-+      /* Drop the packet if we should encrypt it, but can't. */
-+      printk(KERN_DEBUG "mppe_compress[%d]: osize too small! "
-+             "(have: %d need: %d)\n", state->unit,
-+             osize, osize + MPPE_OVHD + 2);
-+      return -1;
-+    }
-+
-+    osize = isize + MPPE_OVHD + 2;
-+
-+    /*
-+     * Copy over the PPP header and set control bits.
-+     */
-+    obuf[0] = PPP_ADDRESS(ibuf);
-+    obuf[1] = PPP_CONTROL(ibuf);
-+    obuf[2] = PPP_COMP >> 8;          /* isize + MPPE_OVHD + 1 */
-+    obuf[3] = PPP_COMP;                       /* isize + MPPE_OVHD + 2 */
-+    obuf += PPP_HDRLEN;
-+
-+    state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE;
-+    obuf[0] = state->ccount >> 8;
-+    obuf[1] = state->ccount & 0xff;
-+
-+    if (!state->stateful ||                   /* stateless mode     */
-+      ((state->ccount & 0xff) == 0xff) ||     /* "flag" packet      */
-+      (state->bits & MPPE_BIT_FLUSHED)) {     /* CCP Reset-Request  */
-+      /* We must rekey */
-+      if (state->debug && state->stateful)
-+          printk(KERN_DEBUG "mppe_compress[%d]: rekeying\n", state->unit);
-+      mppe_rekey(state, 0);
-+      state->bits |= MPPE_BIT_FLUSHED;
-+    }
-+    obuf[0] |= state->bits;
-+    state->bits &= ~MPPE_BIT_FLUSHED; /* reset for next xmit */
-+
-+    obuf  += MPPE_OVHD;
-+    ibuf  += 2;       /* skip to proto field */
-+    isize -= 2;
-+
-+    /* Encrypt packet */
-+    arcfour_encrypt(&state->arcfour_context, ibuf, isize, obuf);
-+
-+    state->stats.unc_bytes += isize;
-+    state->stats.unc_packets++;
-+    state->stats.comp_bytes += osize;
-+    state->stats.comp_packets++;
-+
-+    return osize;
-+}
-+
-+/*
-+ * Since every frame grows by MPPE_OVHD + 2 bytes, this is always going
-+ * to look bad ... and the longer the link is up the worse it will get.
-+ */
-+static void
-+mppe_comp_stats(void *arg, struct compstat *stats)
-+{
-+    ppp_mppe_state *state = (ppp_mppe_state *) arg;
-+
-+    *stats = state->stats;
-+}
-+
-+
-+static int
-+mppe_decomp_init(void *arg, unsigned char *options, int optlen, int unit,
-+               int hdrlen, int mru, int debug)
-+{
-+    /* ARGSUSED */
-+    return mppe_init(arg, options, optlen, unit, debug, "mppe_decomp_init");
-+}
-+
-+/*
-+ * We received a CCP Reset-Ack.  Just ignore it.
-+ */
-+static void
-+mppe_decomp_reset(void *arg)
-+{
-+    /* ARGSUSED */
-+    return;
-+}
-+
-+/*
-+ * Decompress (decrypt) an MPPE packet.
-+ */
-+int
-+mppe_decompress(void *arg, unsigned char *ibuf, int isize, unsigned char *obuf,
-+              int osize)
-+{
-+    ppp_mppe_state *state = (ppp_mppe_state *) arg;
-+    unsigned ccount;
-+    int flushed = MPPE_BITS(ibuf) & MPPE_BIT_FLUSHED;
-+    int sanity = 0;
-+
-+    if (isize <= PPP_HDRLEN + MPPE_OVHD) {
-+      if (state->debug)
-+          printk(KERN_DEBUG "mppe_decompress[%d]: short pkt (%d)\n",
-+                 state->unit, isize);
-+      return DECOMP_ERROR;
-+    }
-+    /* Strange ... our output size is always LESS than the input size. */
-+    /* assert(osize >= isize - MPPE_OVHD - 2); */
-+
-+    osize = isize - MPPE_OVHD - 2;
-+
-+    ccount = MPPE_CCOUNT(ibuf);
-+
-+    /* sanity checks -- terminate with extreme prejudice */
-+    if (!(MPPE_BITS(ibuf) & MPPE_BIT_ENCRYPTED)) {
-+      printk(KERN_DEBUG "mppe_decompress[%d]: ENCRYPTED bit not set!\n",
-+             state->unit);
-+      state->sanity_errors += 100;
-+      sanity = 1;
-+    }
-+    if (!state->stateful && !flushed) {
-+      printk(KERN_DEBUG "mppe_decompress[%d]: FLUSHED bit not set in "
-+             "stateless mode!\n", state->unit);
-+      state->sanity_errors += 100;
-+      sanity = 1;
-+    }
-+    if (state->stateful && ((ccount & 0xff) == 0xff) && !flushed) {
-+      printk(KERN_DEBUG "mppe_decompress[%d]: FLUSHED bit not set on "
-+             "flag packet!\n", state->unit);
-+      state->sanity_errors += 100;
-+      sanity = 1;
-+    }
-+
-+    if (sanity) {
-+      if (state->sanity_errors < SANITY_MAX)
-+          return DECOMP_ERROR;
-+      else
-+          /*
-+           * Take LCP down if the peer is sending too many bogons.
-+           * We don't want to do this for a single or just a few
-+           * instances since it could just be due to packet corruption.
-+           */
-+          return DECOMP_FATALERROR;
-+    }
-+
-+    /*
-+     * Check the coherency count.
-+     */
-+
-+    if (!state->stateful) {
-+      /* RFC 3078, sec 8.1.  Rekey for every packet. */
-+      while (state->ccount != ccount) {
-+          mppe_rekey(state, 0);
-+          state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE;
-+      }
-+    } else {
-+      /* RFC 3078, sec 8.2. */
-+      if (!state->discard) {
-+          /* normal state */
-+          state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE;
-+          if (ccount != state->ccount) {
-+              /*
-+               * (ccount > state->ccount)
-+               * Packet loss detected, enter the discard state.
-+               * Signal the peer to rekey (by sending a CCP Reset-Request).
-+               */
-+              state->discard = 1;
-+              return DECOMP_ERROR;
-+          }
-+      } else {
-+          /* discard state */
-+         if (!flushed) {
-+              /* ccp.c will be silent (no additional CCP Reset-Requests). */
-+              return DECOMP_ERROR;
-+          } else {
-+              /* Rekey for every missed "flag" packet. */
-+              while ((ccount & ~0xff) != (state->ccount & ~0xff)) {
-+                  mppe_rekey(state, 0);
-+                  state->ccount = (state->ccount + 256) % MPPE_CCOUNT_SPACE;
-+              }
-+
-+              /* reset */
-+              state->discard = 0;
-+              state->ccount = ccount;
-+              /*
-+               * Another problem with RFC 3078 here.  It implies that the
-+               * peer need not send a Reset-Ack packet.  But RFC 1962
-+               * requires it.  Hopefully, M$ does send a Reset-Ack; even
-+               * though it isn't required for MPPE synchronization, it is
-+               * required to reset CCP state.
-+               */
-+          }
-+      }
-+      if (flushed)
-+          mppe_rekey(state, 0);
-+    }
-+
-+    /*
-+     * Fill in the first part of the PPP header.  The protocol field
-+     * comes from the decrypted data.
-+     */
-+    obuf[0] = PPP_ADDRESS(ibuf);      /* +1 */
-+    obuf[1] = PPP_CONTROL(ibuf);      /* +2 */
-+    obuf  += 2;
-+    ibuf  += PPP_HDRLEN + MPPE_OVHD;
-+    isize -= PPP_HDRLEN + MPPE_OVHD;  /* -6 */
-+                                      /* net: -4 */
-+
-+    /* And finally, decrypt the packet. */
-+    arcfour_decrypt(&state->arcfour_context, ibuf, isize, obuf);
-+
-+    state->stats.unc_bytes += osize;
-+    state->stats.unc_packets++;
-+    state->stats.comp_bytes += isize;
-+    state->stats.comp_packets++;
-+
-+    /* good packet credit */
-+    state->sanity_errors >>= 1;
-+
-+    return osize;
-+}
-+
-+/*
-+ * Incompressible data has arrived (this should never happen!).
-+ * We should probably drop the link if the protocol is in the range
-+ * of what should be encrypted.  At the least, we should drop this
-+ * packet.  (How to do this?)
-+ */
-+static void
-+mppe_incomp(void *arg, unsigned char *ibuf, int icnt)
-+{
-+    ppp_mppe_state *state = (ppp_mppe_state *) arg;
-+
-+    if (state->debug &&
-+      (PPP_PROTOCOL(ibuf) >= 0x0021 && PPP_PROTOCOL(ibuf) <= 0x00fa))
-+      printk(KERN_DEBUG "mppe_incomp[%d]: incompressible (unencrypted) data! "
-+             "(proto %04x)\n", state->unit, PPP_PROTOCOL(ibuf));
-+
-+    state->stats.inc_bytes += icnt;
-+    state->stats.inc_packets++;
-+    state->stats.unc_bytes += icnt;
-+    state->stats.unc_packets++;
-+}
-+
-+/*************************************************************
-+ * Module interface table
-+ *************************************************************/
-+
-+/* These are in ppp.c (2.2.x) or ppp_generic.c (2.4.x) */
-+extern int  ppp_register_compressor   (struct compressor *cp);
-+extern void ppp_unregister_compressor (struct compressor *cp);
-+
-+/*
-+ * Procedures exported to if_ppp.c.
-+ */
-+struct compressor ppp_mppe = {
-+    CI_MPPE,          /* compress_proto */
-+    mppe_alloc,               /* comp_alloc */
-+    mppe_free,                /* comp_free */
-+    mppe_comp_init,   /* comp_init */
-+    mppe_comp_reset,  /* comp_reset */
-+    mppe_compress,    /* compress */
-+    mppe_comp_stats,  /* comp_stat */
-+    mppe_alloc,               /* decomp_alloc */
-+    mppe_free,                /* decomp_free */
-+    mppe_decomp_init, /* decomp_init */
-+    mppe_decomp_reset,        /* decomp_reset */
-+    mppe_decompress,  /* decompress */
-+    mppe_incomp,      /* incomp */
-+    mppe_comp_stats,  /* decomp_stat */
-+};
-+
-+/* 2.2 compatibility defines */
-+#ifndef __init
-+#define __init
-+#endif
-+#ifndef __exit
-+#define __exit
-+#endif
-+#ifndef MODULE_LICENSE
-+#define MODULE_LICENSE(license)
-+#endif
-+
-+int __init
-+ppp_mppe_init(void)
-+{  
-+    int answer = ppp_register_compressor(&ppp_mppe);
-+
-+    if (answer == 0)
-+      printk(KERN_INFO "PPP MPPE Compression module registered\n");
-+    return answer;
-+}
-+
-+void __exit
-+ppp_mppe_cleanup(void)
-+{
-+    ppp_unregister_compressor(&ppp_mppe);
-+}
-+
-+module_init(ppp_mppe_init);
-+module_exit(ppp_mppe_cleanup);
-+MODULE_LICENSE("BSD without advertisement clause");
-diff -urN linux-2.4.18.org/drivers/net/sha1.c linux-2.4.18/drivers/net/sha1.c
---- linux-2.4.18.org/drivers/net/sha1.c        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.18/drivers/net/sha1.c    Tue Apr  2 16:01:37 2002
-@@ -0,0 +1,185 @@
-+/*
-+ * ftp://ftp.funet.fi/pub/crypt/hash/sha/sha1.c
-+ * 
-+ * SHA-1 in C
-+ * By Steve Reid <steve@edmweb.com>
-+ * 100% Public Domain
-+ * 
-+ * Test Vectors (from FIPS PUB 180-1)
-+ * "abc"
-+ * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
-+ * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
-+ * 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
-+ * A million repetitions of "a"
-+ * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
-+ */
-+
-+/* #define SHA1HANDSOFF * Copies data before messing with it. */
-+
-+#if defined(__linux__)
-+#include <asm/byteorder.h>
-+#include <linux/string.h>
-+#else if defined(__solaris__)
-+#include <sys/isa_defs.h>
-+#include <sys/ddi.h>
-+#include <sys/sunddi.h>
-+#define memcpy(d, s, c) bcopy(s, d, c)
-+#define memset(d, b, c) bzero(d, c)
-+#endif
-+
-+#include "sha1.h"
-+
-+static void SHA1_Transform(unsigned long[5], const unsigned char[64]);
-+
-+#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
-+
-+/* blk0() and blk() perform the initial expand. */
-+/* I got the idea of expanding during the round function from SSLeay */
-+#if defined(__LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN)
-+#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
-+    |(rol(block->l[i],8)&0x00FF00FF))
-+#elif defined(__BIG_ENDIAN) || defined(_BIG_ENDIAN)
-+#define blk0(i) block->l[i]
-+#else
-+#error Endianness not defined
-+#endif
-+#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
-+    ^block->l[(i+2)&15]^block->l[i&15],1))
-+
-+/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
-+#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
-+#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
-+#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
-+#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
-+#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
-+
-+
-+/* Hash a single 512-bit block. This is the core of the algorithm. */
-+
-+static void
-+SHA1_Transform(unsigned long state[5], const unsigned char buffer[64])
-+{
-+    unsigned long a, b, c, d, e;
-+    typedef union {
-+      unsigned char c[64];
-+      unsigned long l[16];
-+    } CHAR64LONG16;
-+    CHAR64LONG16 *block;
-+
-+#ifdef SHA1HANDSOFF
-+    static unsigned char workspace[64];
-+    block = (CHAR64LONG16 *) workspace;
-+    memcpy(block, buffer, 64);
-+#else
-+    block = (CHAR64LONG16 *) buffer;
-+#endif
-+    /* Copy context->state[] to working vars */
-+    a = state[0];
-+    b = state[1];
-+    c = state[2];
-+    d = state[3];
-+    e = state[4];
-+    /* 4 rounds of 20 operations each. Loop unrolled. */
-+    R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
-+    R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
-+    R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
-+    R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
-+    R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
-+    R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
-+    R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
-+    R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
-+    R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
-+    R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
-+    R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
-+    R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
-+    R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
-+    R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
-+    R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
-+    R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
-+    R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
-+    R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
-+    R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
-+    R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
-+    /* Add the working vars back into context.state[] */
-+    state[0] += a;
-+    state[1] += b;
-+    state[2] += c;
-+    state[3] += d;
-+    state[4] += e;
-+    /* Wipe variables */
-+    a = b = c = d = e = 0;
-+}
-+
-+
-+/* SHA1Init - Initialize new context */
-+
-+void
-+SHA1_Init(SHA1_CTX *context)
-+{
-+    /* SHA1 initialization constants */
-+    context->state[0] = 0x67452301;
-+    context->state[1] = 0xEFCDAB89;
-+    context->state[2] = 0x98BADCFE;
-+    context->state[3] = 0x10325476;
-+    context->state[4] = 0xC3D2E1F0;
-+    context->count[0] = context->count[1] = 0;
-+}
-+
-+
-+/* Run your data through this. */
-+
-+void
-+SHA1_Update(SHA1_CTX *context, const unsigned char *data, unsigned int len)
-+{
-+    unsigned int i, j;
-+
-+    j = (context->count[0] >> 3) & 63;
-+    if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
-+    context->count[1] += (len >> 29);
-+    if ((j + len) > 63) {
-+      memcpy(&context->buffer[j], data, (i = 64-j));
-+      SHA1_Transform(context->state, context->buffer);
-+      for ( ; i + 63 < len; i += 64) {
-+          SHA1_Transform(context->state, &data[i]);
-+      }
-+      j = 0;
-+    }
-+    else
-+      i = 0;
-+
-+    memcpy(&context->buffer[j], &data[i], len - i);
-+}
-+
-+
-+/* Add padding and return the message digest. */
-+
-+void
-+SHA1_Final(unsigned char digest[20], SHA1_CTX *context)
-+{
-+    unsigned long i, j;
-+    unsigned char finalcount[8];
-+
-+    for (i = 0; i < 8; i++) {
-+        finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
-+         >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
-+    }
-+    SHA1_Update(context, (unsigned char *) "\200", 1);
-+    while ((context->count[0] & 504) != 448) {
-+      SHA1_Update(context, (unsigned char *) "\0", 1);
-+    }
-+    SHA1_Update(context, finalcount, 8);  /* Should cause a SHA1Transform() */
-+    for (i = 0; i < 20; i++) {
-+      digest[i] = (unsigned char)
-+                   ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
-+    }
-+    /* Wipe variables */
-+    i = j = 0;
-+    memset(context->buffer, 0, 64);
-+    memset(context->state, 0, 20);
-+    memset(context->count, 0, 8);
-+    memset(&finalcount, 0, 8);
-+#ifdef SHA1HANDSOFF  /* make SHA1Transform overwrite it's own static vars */
-+    SHA1Transform(context->state, context->buffer);
-+#endif
-+}
-+
-diff -urN linux-2.4.18.org/drivers/net/sha1.h linux-2.4.18/drivers/net/sha1.h
---- linux-2.4.18.org/drivers/net/sha1.h        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.18/drivers/net/sha1.h    Tue Apr  2 16:01:37 2002
-@@ -0,0 +1,18 @@
-+/* sha1.h */
-+
-+#ifndef _SHA1_H
-+#define _SHA1_H
-+
-+typedef struct {
-+    unsigned long state[5];
-+    unsigned long count[2];
-+    unsigned char buffer[64];
-+} SHA1_CTX;
-+
-+#define SHA1_SIGNATURE_SIZE 20
-+
-+extern void SHA1_Init(SHA1_CTX *);
-+extern void SHA1_Update(SHA1_CTX *, const unsigned char *, unsigned int);
-+extern void SHA1_Final(unsigned char[SHA1_SIGNATURE_SIZE], SHA1_CTX *);
-+
-+#endif /* _SHA1_H */
---- linux/include/linux/ppp-comp.h.orig        Fri Aug  6 10:44:11 1999
-+++ linux/include/linux/ppp-comp.h     Mon Mar 25 09:11:33 2002
-@@ -187,6 +187,100 @@
- #define DEFLATE_CHK_SEQUENCE  0
- /*
-+ * Definitions for MPPE.
-+ */
-+
-+#define CI_MPPE                       18      /* config option for MPPE */
-+#define CILEN_MPPE            6       /* length of config option */
-+
-+#define MPPE_PAD              4       /* MPPE growth per frame */
-+#define MPPE_MAX_KEY_LEN      16      /* largest key length (128-bit) */
-+
-+/* option bits for ccp_options.mppe */
-+#define MPPE_OPT_40           0x01    /* 40 bit */
-+#define MPPE_OPT_128          0x02    /* 128 bit */
-+#define MPPE_OPT_STATEFUL     0x04    /* stateful mode */
-+/* unsupported opts */
-+#define MPPE_OPT_56           0x08    /* 56 bit */
-+#define MPPE_OPT_MPPC         0x10    /* MPPC compression */
-+#define MPPE_OPT_D            0x20    /* Unknown */
-+#define MPPE_OPT_UNSUPPORTED (MPPE_OPT_56|MPPE_OPT_MPPC|MPPE_OPT_D)
-+#define MPPE_OPT_UNKNOWN      0x40    /* Bits !defined in RFC 3078 were set */
-+
-+/*
-+ * This is not nice ... the alternative is a bitfield struct though.
-+ * And unfortunately, we cannot share the same bits for the option
-+ * names above since C and H are the same bit.  We could do a u_int32
-+ * but then we have to do a htonl() all the time and/or we still need
-+ * to know which octet is which.
-+ */
-+#define MPPE_C_BIT            0x01    /* MPPC */
-+#define MPPE_D_BIT            0x10    /* Obsolete, usage unknown */
-+#define MPPE_L_BIT            0x20    /* 40-bit */
-+#define MPPE_S_BIT            0x40    /* 128-bit */
-+#define MPPE_M_BIT            0x80    /* 56-bit, not supported */
-+#define MPPE_H_BIT            0x01    /* Stateless (in a different byte) */
-+
-+/* Does not include H bit; used for least significant octet only. */
-+#define MPPE_ALL_BITS (MPPE_D_BIT|MPPE_L_BIT|MPPE_S_BIT|MPPE_M_BIT|MPPE_H_BIT)
-+
-+/* Build a CI from mppe opts (see RFC 3078) */
-+#define MPPE_OPTS_TO_CI(opts, ci)             \
-+    do {                                      \
-+      u_char *ptr = ci; /* u_char[4] */       \
-+                                              \
-+      /* H bit */                             \
-+      if (opts & MPPE_OPT_STATEFUL)           \
-+          *ptr++ = 0x0;                       \
-+      else                                    \
-+          *ptr++ = MPPE_H_BIT;                \
-+      *ptr++ = 0;                             \
-+      *ptr++ = 0;                             \
-+                                              \
-+      /* S,L bits */                          \
-+      *ptr = 0;                               \
-+      if (opts & MPPE_OPT_128)                \
-+          *ptr |= MPPE_S_BIT;                 \
-+      if (opts & MPPE_OPT_40)                 \
-+          *ptr |= MPPE_L_BIT;                 \
-+      /* M,D,C bits not supported */          \
-+    } while (/* CONSTCOND */ 0)
-+
-+/* The reverse of the above */
-+#define MPPE_CI_TO_OPTS(ci, opts)             \
-+    do {                                      \
-+      u_char *ptr = ci; /* u_char[4] */       \
-+                                              \
-+      opts = 0;                               \
-+                                              \
-+      /* H bit */                             \
-+      if (!(ptr[0] & MPPE_H_BIT))             \
-+          opts |= MPPE_OPT_STATEFUL;          \
-+                                              \
-+      /* S,L bits */                          \
-+      if (ptr[3] & MPPE_S_BIT)                \
-+          opts |= MPPE_OPT_128;               \
-+      if (ptr[3] & MPPE_L_BIT)                \
-+          opts |= MPPE_OPT_40;                \
-+                                              \
-+      /* M,D,C bits */                        \
-+      if (ptr[3] & MPPE_M_BIT)                \
-+          opts |= MPPE_OPT_56;                \
-+      if (ptr[3] & MPPE_D_BIT)                \
-+          opts |= MPPE_OPT_D;                 \
-+      if (ptr[3] & MPPE_C_BIT)                \
-+          opts |= MPPE_OPT_MPPC;              \
-+                                              \
-+      /* Other bits */                        \
-+      if (ptr[0] & ~MPPE_H_BIT)               \
-+          opts |= MPPE_OPT_UNKNOWN;           \
-+      if (ptr[1] || ptr[2])                   \
-+          opts |= MPPE_OPT_UNKNOWN;           \
-+      if (ptr[3] & ~MPPE_ALL_BITS)            \
-+          opts |= MPPE_OPT_UNKNOWN;           \
-+    } while (/* CONSTCOND */ 0)
-+
-+/*
-  * Definitions for other, as yet unsupported, compression methods.
-  */
---- linux/drivers/net/Config.in.orig   Mon Mar 25 09:07:26 2002
-+++ linux/drivers/net/Config.in        Mon Mar 25 11:18:03 2002
-@@ -279,6 +279,7 @@
-    dep_tristate '  PPP support for sync tty ports' CONFIG_PPP_SYNC_TTY $CONFIG_PPP
-    dep_tristate '  PPP Deflate compression' CONFIG_PPP_DEFLATE $CONFIG_PPP
-    dep_tristate '  PPP BSD-Compress compression' CONFIG_PPP_BSDCOMP $CONFIG_PPP
-+   dep_tristate '  PPP MPPE compression (encryption)' CONFIG_PPP_MPPE $CONFIG_PPP
-    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
-       dep_tristate '  PPP over Ethernet (EXPERIMENTAL)' CONFIG_PPPOE $CONFIG_PPP
-    fi
---- linux/drivers/net/Makefile.orig    Mon Mar 25 09:07:26 2002
-+++ linux/drivers/net/Makefile Mon Mar 25 11:58:11 2002
-@@ -18,8 +18,9 @@
- export-objs     :=    8390.o arlan.o aironet4500_core.o aironet4500_card.o \
-                       ppp_async.o ppp_generic.o slhc.o pppox.o auto_irq.o \
-                       net_init.o mii.o
--list-multi    :=      rcpci.o
-+list-multi    :=      rcpci.o ppp_mppe.o
- rcpci-objs    :=      rcpci45.o rclanmtl.o
-+ppp_mppe-objs :=      ppp_mppe_compress.o sha1.o arcfour.o
- ifeq ($(CONFIG_TULIP),y)
-   obj-y += tulip/tulip.o
-@@ -139,6 +140,14 @@
- obj-$(CONFIG_PPP_BSDCOMP) += bsd_comp.o
- obj-$(CONFIG_PPPOE) += pppox.o pppoe.o
-+ifeq ($(CONFIG_PPP_MPPE),y)
-+  obj-y += $(ppp_mppe-objs)
-+else
-+  ifeq ($(CONFIG_PPP_MPPE),m)
-+    obj-m += ppp_mppe.o
-+  endif
-+endif
-+
- obj-$(CONFIG_SLIP) += slip.o
- ifeq ($(CONFIG_SLIP_COMPRESSED),y)
-   obj-$(CONFIG_SLIP) += slhc.o
-@@ -237,3 +246,5 @@
- rcpci.o: $(rcpci-objs)
-       $(LD) -r -o $@ $(rcpci-objs)
-+ppp_mppe.o: $(ppp_mppe-objs)
-+      $(LD) -r -o $@ $(ppp_mppe-objs)
---- linux/drivers/net/ppp_generic.c.orig       Mon Feb 25 11:37:59 2002
-+++ linux/drivers/net/ppp_generic.c    Mon Mar 25 10:19:53 2002
-@@ -1006,8 +1006,15 @@
-       /* try to do packet compression */
-       if ((ppp->xstate & SC_COMP_RUN) && ppp->xc_state != 0
-           && proto != PPP_LCP && proto != PPP_CCP) {
--              new_skb = alloc_skb(ppp->dev->mtu + ppp->dev->hard_header_len,
--                                  GFP_ATOMIC);
-+              int new_skb_size = ppp->dev->mtu + ppp->dev->hard_header_len;
-+              int compressor_skb_size = ppp->dev->mtu + PPP_HDRLEN;
-+
-+              if (ppp->xcomp->compress_proto == CI_MPPE) {
-+                      /* CCP [must have] reduced MTU by MPPE_PAD. */
-+                      new_skb_size += MPPE_PAD;
-+                      compressor_skb_size += MPPE_PAD;
-+              }
-+              new_skb = alloc_skb(new_skb_size, GFP_ATOMIC);
-               if (new_skb == 0) {
-                       printk(KERN_ERR "PPP: no memory (comp pkt)\n");
-                       goto drop;
-@@ -1019,15 +1026,27 @@
-               /* compressor still expects A/C bytes in hdr */
-               len = ppp->xcomp->compress(ppp->xc_state, skb->data - 2,
-                                          new_skb->data, skb->len + 2,
--                                         ppp->dev->mtu + PPP_HDRLEN);
-+                                         compressor_skb_size);
-               if (len > 0 && (ppp->flags & SC_CCP_UP)) {
-                       kfree_skb(skb);
-                       skb = new_skb;
-                       skb_put(skb, len);
-                       skb_pull(skb, 2);       /* pull off A/C bytes */
--              } else {
-+              } else if (len == 0) {
-                       /* didn't compress, or CCP not up yet */
-                       kfree_skb(new_skb);
-+              } else {
-+                      /*
-+                       * (len < 0)
-+                       * MPPE requires that we do not send unencrypted
-+                       * frames.  The compressor will return -1 if we
-+                       * should drop the frame.  We cannot simply test
-+                       * the compress_proto because MPPE and MPPC share
-+                       * the same number.
-+                       */
-+                      printk(KERN_ERR "ppp: compressor dropped pkt\n");
-+                      kfree_skb(new_skb);
-+                      goto drop;
-               }
-       }
-@@ -1515,7 +1534,7 @@
-       int len;
-       if (proto == PPP_COMP) {
--              ns = dev_alloc_skb(ppp->mru + PPP_HDRLEN);
-+              ns = dev_alloc_skb(ppp->mru + 128 + PPP_HDRLEN);
-               if (ns == 0) {
-                       printk(KERN_ERR "ppp_decompress_frame: no memory\n");
-                       goto err;
diff --git a/linux-2.4.18-nfs-default-size.patch b/linux-2.4.18-nfs-default-size.patch
deleted file mode 100644 (file)
index fd1e504..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -urNp linux-1380/fs/nfs/inode.c linux-1391/fs/nfs/inode.c
---- linux-1380/fs/nfs/inode.c  
-+++ linux-1391/fs/nfs/inode.c  
-@@ -418,10 +418,16 @@ nfs_read_super(struct super_block *sb, v
-         }
-       /* Work out a lot of parameters */
--      if (data->rsize == 0)
-+      if (data->rsize == 0) {
-               server->rsize = nfs_block_size(fsinfo.rtpref, NULL);
--      if (data->wsize == 0)
-+              if (server->rsize > NFS_DEF_FILE_IO_BUFFER_SIZE)
-+                      server->rsize = NFS_DEF_FILE_IO_BUFFER_SIZE;
-+      }
-+      if (data->wsize == 0) {
-               server->wsize = nfs_block_size(fsinfo.wtpref, NULL);
-+              if (server->wsize > NFS_DEF_FILE_IO_BUFFER_SIZE)
-+                      server->wsize = NFS_DEF_FILE_IO_BUFFER_SIZE;
-+      }
-       /* NFSv3: we don't have bsize, but rather rtmult and wtmult... */
-       if (!fsinfo.bsize)
-               fsinfo.bsize = (fsinfo.rtmult>fsinfo.wtmult) ? fsinfo.rtmult : fsinfo.wtmult;
diff --git a/linux-2.4.2-blkioctl-sector.patch b/linux-2.4.2-blkioctl-sector.patch
deleted file mode 100644 (file)
index 0de5317..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
---- linux/include/linux/fs.h.sector    Mon Feb 26 23:48:46 2001
-+++ linux/include/linux/fs.h   Mon Feb 26 23:53:57 2001
-@@ -187,6 +187,8 @@
- /* This was here just to show that the number is taken -
-    probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */
- #endif
-+#define BLKGETLASTSECT  _IO(0x12,108) /* get last sector of block device */
-+#define BLKSETLASTSECT  _IO(0x12,109) /* get last sector of block device */
- #define BMAP_IOCTL 1          /* obsolete - kept for compatibility */
---- linux/drivers/block/blkpg.c.sector Fri Oct 27 02:35:47 2000
-+++ linux/drivers/block/blkpg.c        Mon Feb 26 23:53:57 2001
-@@ -39,6 +39,9 @@
- #include <asm/uaccess.h>
-+static int set_last_sector( kdev_t dev, const void *param );
-+static int get_last_sector( kdev_t dev, const void *param );
-+
- /*
-  * What is the data describing a partition?
-  *
-@@ -210,6 +213,16 @@
-       int intval;
-       switch (cmd) {
-+              case BLKGETLASTSECT:
-+                      return get_last_sector(dev, (char *)(arg));
-+
-+              case BLKSETLASTSECT:
-+                      if( is_read_only(dev) )
-+                              return -EACCES;
-+                      if (!capable(CAP_SYS_ADMIN))
-+                              return -EACCES;
-+                      return set_last_sector(dev, (char *)(arg));
-+
-               case BLKROSET:
-                       if (!capable(CAP_SYS_ADMIN))
-                               return -EACCES;
-@@ -281,3 +294,209 @@
- }
- EXPORT_SYMBOL(blk_ioctl);
-+
-+ /*********************
-+  * get_last_sector()
-+  *  
-+  * Description: This function will read any inaccessible blocks at the end
-+  *   of a device
-+  * Why: Normal read/write calls through the block layer will not read the 
-+  *      last sector of an odd-size disk. 
-+  * parameters: 
-+  *    dev: kdev_t -- which device to read
-+  *    param: a pointer to a userspace struct. The struct has these members: 
-+  *   block:  an int which denotes which block to return:
-+  *           0 == Last block
-+  *           1 == Last block - 1
-+  *           n == Last block - n
-+  *           This is validated so that only values of 
-+  *             <= ((total_sects + 1) % logical_block_size)  ||  0
-+  *             are allowed.
-+  *   block_contents: a pointer to userspace char*, this is where we write 
-+  *    returned blocks to.
-+  *   content_length: How big the userspace buffer is.
-+  * return: 
-+  *    0 on success
-+  *   -ERRVAL on error.
-+  *********************/
-+int get_last_sector( kdev_t dev, const void *param )
-+{   
-+        struct buffer_head *bh;
-+        struct gendisk *g;
-+        int rc = 0;
-+        unsigned int lastlba, readlba;
-+        int orig_blksize = BLOCK_SIZE;
-+        int hardblocksize;
-+
-+      struct {
-+              unsigned int block;
-+              size_t content_length;
-+              char *block_contents;
-+      } blk_ioctl_parameter;
-+
-+        if( !dev ) return -EINVAL;
-+
-+        if(copy_from_user(&blk_ioctl_parameter, param, sizeof(blk_ioctl_parameter)))
-+              return -EFAULT;
-+
-+        g = get_gendisk( dev );
-+
-+        if( !g ) return -EINVAL;
-+
-+        lastlba = g->part[MINOR(dev)].nr_sects;
-+
-+        if( !lastlba ) return -EINVAL;
-+
-+        hardblocksize = get_hardsect_size(dev);
-+        if( ! hardblocksize ) hardblocksize = 512;
-+
-+         /* Need to change the block size that the block layer uses */
-+        if (blksize_size[MAJOR(dev)]){
-+                orig_blksize = blksize_size[MAJOR(dev)][MINOR(dev)];
-+        }
-+
-+         /* validate userspace input */
-+        if( blk_ioctl_parameter.block == 0 )
-+              goto good_params;
-+
-+      /* so we don't divide by zero below */  
-+      if(orig_blksize == 0) 
-+              return -EINVAL; 
-+
-+        if( blk_ioctl_parameter.block <= (lastlba % (orig_blksize / hardblocksize)))
-+              goto good_params;
-+
-+      return -EINVAL; 
-+
-+good_params:
-+        readlba = lastlba - blk_ioctl_parameter.block - 1;
-+
-+        if (orig_blksize != hardblocksize)
-+                   set_blocksize(dev, hardblocksize);
-+
-+        bh =  bread(dev, readlba, hardblocksize);
-+        if (!bh) {
-+              /* We hit the end of the disk */
-+              printk(KERN_WARNING
-+                      "get_last_sector ioctl: bread returned NULL.\n");
-+              return -1;
-+        }
-+
-+        rc = copy_to_user(blk_ioctl_parameter.block_contents, bh->b_data, 
-+              (bh->b_size > blk_ioctl_parameter.content_length) ? 
-+              blk_ioctl_parameter.content_length : bh->b_size);
-+
-+        brelse(bh);
-+
-+        /* change block size back */
-+        if (orig_blksize != hardblocksize)
-+                   set_blocksize(dev, orig_blksize);
-+   
-+        return rc;
-+}
-+
-+ /*********************
-+  * set_last_sector()
-+  *  
-+  * Description: This function will write to any inaccessible blocks at the end
-+  *   of a device
-+  * Why: Normal read/write calls through the block layer will not read the 
-+  *      last sector of an odd-size disk. 
-+  * parameters: 
-+  *    dev: kdev_t -- which device to read
-+  *    sect: a pointer to a userspace struct. The struct has these members: 
-+  *   block:  an int which denotes which block to return:
-+  *           0 == Last block
-+  *           1 == Last block - 1
-+  *           n == Last block - n
-+  *           This is validated so that only values of 
-+  *             <= ((total_sects + 1) % logical_block_size)  ||  0
-+  *             are allowed.
-+  *   block_contents: a pointer to userspace char*, this is where we write 
-+  *    returned blocks to.
-+  *   content_length: How big the userspace buffer is.
-+  * return: 
-+  *    0 on success
-+  *   -ERRVAL on error.
-+  *********************/
-+int set_last_sector( kdev_t dev, const void *param ) 
-+{
-+        struct buffer_head *bh;
-+        struct gendisk *g;
-+        int rc = 0;
-+        unsigned int lastlba, writelba;
-+        int orig_blksize = BLOCK_SIZE;
-+        int hardblocksize;
-+
-+      struct {
-+              unsigned int block;
-+              size_t content_length;
-+              char *block_contents;
-+      } blk_ioctl_parameter;
-+
-+        if( !dev ) return -EINVAL;
-+
-+      if(copy_from_user(&blk_ioctl_parameter, param, sizeof(blk_ioctl_parameter)))
-+              return -EFAULT;
-+
-+        g = get_gendisk( dev );
-+
-+        if( !g ) return -EINVAL;
-+    
-+        lastlba = g->part[MINOR(dev)].nr_sects ;
-+    
-+        if( !lastlba ) return -EINVAL;
-+    
-+        hardblocksize = get_hardsect_size(dev);
-+        if( ! hardblocksize ) hardblocksize = 512;
-+    
-+         /* Need to change the block size that the block layer uses */
-+        if (blksize_size[MAJOR(dev)]){
-+                orig_blksize = blksize_size[MAJOR(dev)][MINOR(dev)];
-+        }
-+
-+         /* validate userspace input */
-+        if( blk_ioctl_parameter.block == 0 )
-+              goto good_params;
-+
-+      /* so we don't divide by zero below */  
-+      if(orig_blksize == 0) 
-+              return -EINVAL; 
-+
-+        if( blk_ioctl_parameter.block <= (lastlba % (orig_blksize / hardblocksize)))
-+              goto good_params;
-+
-+      return -EINVAL; 
-+
-+good_params:
-+        writelba = lastlba - blk_ioctl_parameter.block - 1;
-+
-+        if (orig_blksize != hardblocksize)
-+                 set_blocksize(dev, hardblocksize);
-+    
-+        bh =  bread(dev, writelba, hardblocksize);
-+        if (!bh) {
-+              /* We hit the end of the disk */
-+              printk(KERN_WARNING
-+                      "get_last_sector ioctl: getblk returned NULL.\n");
-+              return -1;
-+        }
-+    
-+        copy_from_user(bh->b_data, blk_ioctl_parameter.block_contents, 
-+              (bh->b_size > blk_ioctl_parameter.content_length) ? 
-+              blk_ioctl_parameter.content_length : bh->b_size);
-+    
-+        mark_buffer_dirty(bh);
-+        ll_rw_block (WRITE, 1, &bh);
-+        wait_on_buffer (bh);
-+        if (!buffer_uptodate(bh))
-+          rc=-1; 
-+    
-+        brelse(bh);
-+    
-+        /* change block size back */
-+        if (orig_blksize != hardblocksize)
-+                 set_blocksize(dev, orig_blksize);
-+       
-+       return rc;
-+}
---- linux/drivers/scsi/sd.c.sector     Mon Feb 26 23:48:45 2001
-+++ linux/drivers/scsi/sd.c    Mon Feb 26 23:53:57 2001
-@@ -228,6 +228,8 @@
-               }
-               case BLKGETSIZE:
-               case BLKGETSIZE64:
-+              case BLKGETLASTSECT:
-+              case BLKSETLASTSECT:
-               case BLKROSET:
-               case BLKROGET:
-               case BLKRASET:
---- linux/drivers/ide/ide.c.sector     Mon Feb 26 23:48:49 2001
-+++ linux/drivers/ide/ide.c    Mon Feb 26 23:53:57 2001
-@@ -2664,6 +2664,8 @@
-                       }
-                       return 0;
-               }
-+              case BLKGETLASTSECT:
-+              case BLKSETLASTSECT:
-               case BLKROSET:
-               case BLKROGET:
-               case BLKFLSBUF:
diff --git a/linux-2.4.2-raw-ip.patch b/linux-2.4.2-raw-ip.patch
deleted file mode 100644 (file)
index 94e0ae8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
---- linux-2.4.2/net/ipv4/raw.c Fri Feb  9 14:29:44 2001
-+++ linux/net/ipv4/raw.c       Wed Feb 28 17:43:59 2001
-@@ -54,6 +54,7 @@
- #include <linux/inet.h>
- #include <linux/netdevice.h>
- #include <linux/mroute.h>
-+#include <linux/igmp.h>
- #include <net/ip.h>
- #include <net/protocol.h>
- #include <linux/skbuff.h>
-@@ -107,6 +108,18 @@
-                  !(s->rcv_saddr && s->rcv_saddr != laddr)     &&
-                  !(s->bound_dev_if && s->bound_dev_if != dif))
-                       break; /* gotcha */
-+              if (LOCAL_MCAST(laddr)) {
-+
-+                  struct ip_mc_socklist *iml;
-+                  struct ip_mreqn *imr;
-+
-+                  for (iml=sk->protinfo.af_inet.mc_list; iml; iml=iml->next) {
-+                    imr = &(iml->multi);
-+                    if ((imr->imr_multiaddr.s_addr == laddr) && !(imr->imr_ifindex && imr->imr_ifindex != dif))
-+                              return s;
-+                  }
-+
-+              }
-       }
-       return s;
- }
-
diff --git a/linux-2.4.20-AXP-avma1_cs.patch b/linux-2.4.20-AXP-avma1_cs.patch
deleted file mode 100644 (file)
index f34c068..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- linux-2.4.20.org/drivers/isdn/hisax/avma1_cs.c     Sat Aug  3 00:39:44 2002
-+++ linux-2.4.20/drivers/isdn/hisax/avma1_cs.c Sat Dec 14 08:25:44 2002
-@@ -522,9 +522,9 @@
-     return 0;
- } /* avma1cs_event */
--/*====================================================================*/
-+/* ==================================================================== */
--static int __init init_avma1_cs(void)
-+static int init_avma1_cs(void)
- {
-     servinfo_t serv;
-     DEBUG(0, "%s\n", version);
-@@ -538,7 +538,7 @@
-     return 0;
- }
--static void __exit exit_avma1_cs(void)
-+static int exit_avma1_cs(void)
- {
-     DEBUG(0, "avma1_cs: unloading\n");
-     unregister_pccard_driver(&dev_info);
diff --git a/linux-2.4.20-EXPORT_SYMBOL.patch b/linux-2.4.20-EXPORT_SYMBOL.patch
deleted file mode 100644 (file)
index 0953f97..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
---- linux-2.4.26/arch/ppc/kernel/ppc_ksyms.c.orig      Wed Apr 14 15:05:27 2004
-+++ linux-2.4.26/arch/ppc/kernel/ppc_ksyms.c   Tue May 11 19:55:55 2004
-@@ -78,6 +78,7 @@
- extern unsigned long mm_ptov (unsigned long paddr);
- EXPORT_SYMBOL(clear_page);
-+EXPORT_SYMBOL(clear_user_page);
- EXPORT_SYMBOL(do_signal);
- EXPORT_SYMBOL(syscall_trace);
- EXPORT_SYMBOL(transfer_to_handler);
-@@ -198,6 +199,10 @@
- EXPORT_SYMBOL(flush_dcache_all);
- #endif
-+#ifdef CONFIG_PPC_STD_MMU
-+EXPORT_SYMBOL(local_flush_tlb_page);
-+#endif
-+
- EXPORT_SYMBOL(start_thread);
- EXPORT_SYMBOL(kernel_thread);
-@@ -256,6 +261,7 @@
- #ifdef CONFIG_PMAC_BACKLIGHT
- EXPORT_SYMBOL(get_backlight_level);
- EXPORT_SYMBOL(set_backlight_level);
-+EXPORT_SYMBOL(get_backlight_enable);
- EXPORT_SYMBOL(set_backlight_enable);
- EXPORT_SYMBOL(register_backlight_controller);
- #endif /* CONFIG_PMAC_BACKLIGHT */
-diff -urN linux-2.4.22.org/arch/sparc/kernel/sparc_ksyms.c linux-2.4.22/arch/sparc/kernel/sparc_ksyms.c
---- linux-2.4.22.org/arch/sparc/kernel/sparc_ksyms.c   2003-11-21 20:40:44.000000000 +0100
-+++ linux-2.4.22/arch/sparc/kernel/sparc_ksyms.c       2003-11-21 20:41:45.000000000 +0100
-@@ -283,6 +283,7 @@
- /* Moving data to/from userspace. */
- EXPORT_SYMBOL(__copy_user);
- EXPORT_SYMBOL(__strncpy_from_user);
-+EXPORT_SYMBOL(__strnlen_user);
- /* Networking helper routines. */
- /* XXX This is NOVERS because C_LABEL_STR doesn't get the version number. -DaveM */
---- linux-2.4.32/arch/sparc64/kernel/sparc64_ksyms.c.orig      2005-11-16 20:12:54.000000000 +0100
-+++ linux-2.4.32/arch/sparc64/kernel/sparc64_ksyms.c   2005-11-17 11:29:03.000000000 +0100
-@@ -20,6 +20,7 @@
- #include <linux/interrupt.h>
- #include <linux/fs_struct.h>
- #include <linux/mm.h>
-+#include <linux/tty.h>
- #include <asm/oplib.h>
- #include <asm/delay.h>
-@@ -62,7 +63,7 @@
- extern unsigned prom_cpu_nodes[64];
- extern void die_if_kernel(char *str, struct pt_regs *regs);
- void _sigpause_common (unsigned int set, struct pt_regs *);
--extern void *__bzero(void *, size_t);
-+extern __kernel_size_t *__bzero(void *, __kernel_size_t);
- extern void *__memscan_zero(void *, size_t);
- extern void *__memscan_generic(void *, int, size_t);
- extern int __memcmp(const void *, const void *, __kernel_size_t);
-@@ -352,6 +353,8 @@
- EXPORT_SYMBOL(phys_base);
- EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
-+EXPORT_SYMBOL(screen_info);
-+
- /* No version information on this, heavily used in inline asm,
-  * and will always be 'void __ret_efault(void)'.
-  */
-diff -urN linux-2.4.22.org/drivers/sbus/char/Makefile linux-2.4.22/drivers/sbus/char/Makefile
---- linux-2.4.22.org/drivers/sbus/char/Makefile        2003-11-21 20:40:09.000000000 +0100
-+++ linux-2.4.22/drivers/sbus/char/Makefile    2003-11-21 20:41:45.000000000 +0100
-@@ -9,7 +9,7 @@
- O_TARGET := sunchar.o
--export-objs := su.o bbc_i2c.o
-+export-objs := su.o bbc_i2c.o sunserial.o
- obj-y := sunkbd.o sunkbdmap.o sunmouse.o sunserial.o zs.o
- list-multi := vfc.o bbc.o
-diff -urN linux-2.4.22.org/drivers/sbus/char/sunserial.c linux-2.4.22/drivers/sbus/char/sunserial.c
---- linux-2.4.22.org/drivers/sbus/char/sunserial.c     2003-11-21 20:40:09.000000000 +0100
-+++ linux-2.4.22/drivers/sbus/char/sunserial.c 2003-11-21 20:41:45.000000000 +0100
-@@ -25,11 +25,13 @@
- int serial_console;
- int stop_a_enabled = 1;
--int __init con_is_present(void)
-+int con_is_present(void)
- {
-       return serial_console ? 0 : 1;
- }
-+EXPORT_SYMBOL(con_is_present);
-+
- static void __init nop_rs_kgdb_hook(int channel)
- {
-       printk("Oops: %s called\n", __FUNCTION__);
-diff -urN linux-2.4.22.org/drivers/video/macmodes.c linux-2.4.22/drivers/video/macmodes.c
---- linux-2.4.22.org/drivers/video/macmodes.c  2003-11-21 20:40:11.000000000 +0100
-+++ linux-2.4.22/drivers/video/macmodes.c      2003-11-21 20:41:45.000000000 +0100
-@@ -19,6 +19,7 @@
- #include <linux/errno.h>
- #include <linux/fb.h>
- #include <linux/string.h>
-+#include <linux/module.h>
- #ifdef CONFIG_FB_COMPAT_XPMAC
- #include <asm/vc_ioctl.h>
-@@ -211,6 +212,9 @@
- struct fb_info *console_fb_info = NULL;
- struct vc_mode display_info;
-+EXPORT_SYMBOL(console_fb_info);
-+EXPORT_SYMBOL(display_info);
-+
- static u16 palette_red[16];
- static u16 palette_green[16];
- static u16 palette_blue[16];
-@@ -453,7 +457,7 @@
-     return 0;
- }
--
-+EXPORT_SYMBOL(mac_vmode_to_var);
- /**
-  *    mac_var_to_vmode - convert var structure to MacOS vmode/cmode pair
-  *    @var: frame buffer video mode structure
-@@ -498,7 +502,7 @@
-     return -EINVAL;
- }
--
-+EXPORT_SYMBOL(mac_var_to_vmode);
- /**
-  *    mac_map_monitor_sense - Convert monitor sense to vmode
-  *    @sense: Macintosh monitor sense number
-@@ -541,7 +545,7 @@
-  *
-  */
--int __init mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
-+int mac_find_mode(struct fb_var_screeninfo *var, struct fb_info *info,
-                        const char *mode_option, unsigned int default_bpp)
- {
-     const struct fb_videomode *db = NULL;
-@@ -554,3 +558,4 @@
-     return fb_find_mode(var, info, mode_option, db, dbsize,
-                       &mac_modedb[DEFAULT_MODEDB_INDEX], default_bpp);
- }
-+EXPORT_SYMBOL(mac_find_mode);
-diff -urN linux-2.4.22.org/drivers/video/Makefile linux-2.4.22/drivers/video/Makefile
---- linux-2.4.22.org/drivers/video/Makefile    2003-11-21 20:40:10.000000000 +0100
-+++ linux-2.4.22/drivers/video/Makefile        2003-11-21 20:41:45.000000000 +0100
-@@ -15,7 +15,7 @@
-                 fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o \
-                 fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o \
-                 fbcon-cfb8.o fbcon-mac.o fbcon-mfb.o \
--                cyber2000fb.o sa1100fb.o fbcon-hga.o fbgen.o
-+                cyber2000fb.o sa1100fb.o fbcon-hga.o fbgen.o macmodes.o
- # Each configuration option enables a list of files.
-diff -urN linux-2.4.22.org/kernel/ksyms.c linux-2.4.22/kernel/ksyms.c
---- linux-2.4.22.org/kernel/ksyms.c    2003-11-21 20:38:46.000000000 +0100
-+++ linux-2.4.22/kernel/ksyms.c        2003-11-21 20:41:45.000000000 +0100
-@@ -384,6 +384,7 @@
- EXPORT_SYMBOL(proc_dointvec_minmax);
- EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
- EXPORT_SYMBOL(proc_doulongvec_minmax);
-+EXPORT_SYMBOL(proc_get_inode);
- /* interrupt handling */
- EXPORT_SYMBOL(add_timer);
---- linux-2.4.23/kernel/printk.c.orig  2003-12-27 10:40:07.000000000 +0100
-+++ linux-2.4.23/kernel/printk.c       2003-12-27 12:59:40.000000000 +0100
-@@ -540,6 +540,7 @@
-       if (must_wake_klogd && !oops_in_progress)
-               wake_up_interruptible(&log_wait);
- }
-+EXPORT_SYMBOL(release_console_sem);
- /** console_conditional_schedule - yield the CPU if required
-  *
diff --git a/linux-2.4.20-Nokia5510.patch b/linux-2.4.20-Nokia5510.patch
deleted file mode 100644 (file)
index 4b1ef3e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- linux-2.4.20/drivers/usb/storage/unusual_devs.h.org        Tue Feb 25 22:23:56 2003
-+++ linux-2.4.20/drivers/usb/storage/unusual_devs.h    Wed Feb 26 10:14:05 2003
-@@ -76,6 +76,11 @@
-               US_SC_SCSI, US_PR_BULK, NULL,
-               US_FL_FIX_INQUIRY | US_FL_START_STOP),
-+UNUSUAL_DEV(  0x0421, 0x0404, 0x0001, 0x0001,
-+              "Nokia",
-+              "Nokia 5510",
-+              US_SC_SCSI, US_PR_BULK, NULL, 0 ),
-+
- #ifdef CONFIG_USB_STORAGE_DPCM
- UNUSUAL_DEV(  0x0436, 0x0005, 0x0100, 0x0100,
-               "Microtech",
diff --git a/linux-2.4.20-agp_uninorth.patch b/linux-2.4.20-agp_uninorth.patch
deleted file mode 100644 (file)
index 1297903..0000000
+++ /dev/null
@@ -1,481 +0,0 @@
-diff -urN linux-2.4.22.org/drivers/char/agp/agpgart_be.c linux-2.4.22/drivers/char/agp/agpgart_be.c
---- linux-2.4.22.org/drivers/char/agp/agpgart_be.c     2003-11-21 18:32:42.000000000 +0100
-+++ linux-2.4.22/drivers/char/agp/agpgart_be.c 2003-11-21 18:34:41.000000000 +0100
-@@ -53,6 +53,10 @@
- #include <asm/msr.h>
- #endif
-+#ifdef CONFIG_AGP_UNINORTH
-+#include <asm/uninorth.h>
-+#endif
-+
- #include <linux/agp_backend.h>
- #include "agp.h"
-@@ -81,7 +85,7 @@
- {
- #if defined(__i386__) || defined(__x86_64__)
-       asm volatile ("wbinvd":::"memory");
--#elif defined(__alpha__) || defined(__ia64__) || defined(__sparc__)
-+#elif defined(__alpha__) || defined(__ia64__) || defined(__sparc__) || defined(__powerpc__)
-       /* ??? I wonder if we'll really need to flush caches, or if the
-          core logic can manage to keep the system coherent.  The ARM
-          speaks only of using `cflush' to get things in memory in
-@@ -5918,6 +5922,405 @@
- }
- #endif /* CONFIG_AGP_ATI */
-+#ifdef CONFIG_AGP_UNINORTH
-+
-+static int uninorth_fetch_size(void)
-+{
-+      int i;
-+      u32 temp;
-+      aper_size_info_32 *values;
-+
-+      pci_read_config_dword(agp_bridge.dev, UNI_N_CFG_GART_BASE, &temp);
-+      temp &= ~(0xfffff000);
-+      values = A_SIZE_32(agp_bridge.aperture_sizes);
-+
-+      for (i = 0; i < agp_bridge.num_aperture_sizes; i++) {
-+              if (temp == values[i].size_value) {
-+                      agp_bridge.previous_size =
-+                          agp_bridge.current_size = (void *) (values + i);
-+                      agp_bridge.aperture_size_idx = i;
-+                      return values[i].size;
-+              }
-+      }
-+
-+      agp_bridge.previous_size =
-+          agp_bridge.current_size = (void *) (values + 1);
-+      agp_bridge.aperture_size_idx = 1;
-+      return values[1].size;
-+
-+      return 0;
-+}
-+
-+static void uninorth_tlbflush(agp_memory * mem)
-+{
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_INVAL);
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      UNI_N_CFG_GART_ENABLE);
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_2xRESET);
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      UNI_N_CFG_GART_ENABLE);
-+}
-+
-+static void uninorth_cleanup(void)
-+{
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      UNI_N_CFG_GART_ENABLE | UNI_N_CFG_GART_INVAL);
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      0);
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      UNI_N_CFG_GART_2xRESET);
-+      pci_write_config_dword(agp_bridge.dev, UNI_N_CFG_GART_CTRL,
-+                      0);
-+}
-+
-+static int uninorth_configure(void)
-+{
-+      aper_size_info_32 *current_size;
-+      
-+      current_size = A_SIZE_32(agp_bridge.current_size);
-+
-+      printk("agp: configuring for size idx: %d\n", current_size->size_value);
-+      
-+      /* aperture size and gatt addr */
-+      pci_write_config_dword(agp_bridge.dev,
-+              UNI_N_CFG_GART_BASE,
-+              (agp_bridge.gatt_bus_addr & 0xfffff000)
-+                      | current_size->size_value);
-+
-+      /* HACK ALERT
-+       * UniNorth seem to be buggy enough not to handle properly when
-+       * the AGP aperture isn't mapped at bus physical address 0
-+       */
-+      agp_bridge.gart_bus_addr = 0;
-+      pci_write_config_dword(agp_bridge.dev,
-+              UNI_N_CFG_AGP_BASE, agp_bridge.gart_bus_addr);
-+      
-+      return 0;
-+}
-+
-+static unsigned long uninorth_mask_memory(unsigned long addr, int type)
-+{
-+      return addr;/* | agp_bridge.masks[0].mask;*/
-+}
-+
-+static int uninorth_insert_memory(agp_memory * mem,
-+                                   off_t pg_start, int type)
-+{
-+      int i, j, num_entries;
-+      void *temp;
-+
-+      temp = agp_bridge.current_size;
-+      num_entries = A_SIZE_32(temp)->num_entries;
-+
-+      if (type != 0 || mem->type != 0) {
-+              /* The generic routines know nothing of memory types */
-+              return -EINVAL;
-+      }
-+      if ((pg_start + mem->page_count) > num_entries) {
-+              return -EINVAL;
-+      }
-+      j = pg_start;
-+
-+      while (j < (pg_start + mem->page_count)) {
-+              if (!PGE_EMPTY(agp_bridge.gatt_table[j])) {
-+                      return -EBUSY;
-+              }
-+              j++;
-+      }
-+
-+      if (mem->is_flushed == FALSE) {
-+              CACHE_FLUSH();
-+              mem->is_flushed = TRUE;
-+      }
-+      for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
-+              agp_bridge.gatt_table[j] = cpu_to_le32((mem->memory[i] & 0xfffff000) | 0x00000001UL);
-+              flush_dcache_range(__va(mem->memory[i]), __va(mem->memory[i])+0x1000);
-+      }
-+      (void)in_le32((volatile u32*)&agp_bridge.gatt_table[pg_start]);
-+      mb();
-+      flush_dcache_range((unsigned long)&agp_bridge.gatt_table[pg_start], 
-+              (unsigned long)&agp_bridge.gatt_table[pg_start + mem->page_count]);
-+
-+      agp_bridge.tlb_flush(mem);
-+      return 0;
-+}
-+
-+static void uninorth_agp_enable(u32 mode)
-+{
-+      struct pci_dev *device = NULL;
-+      u32 command, scratch, cap_id;
-+      u8 cap_ptr;
-+
-+      pci_read_config_dword(agp_bridge.dev,
-+                            agp_bridge.capndx + 4,
-+                            &command);
-+
-+      /*
-+       * PASS1: go throu all devices that claim to be
-+       *        AGP devices and collect their data.
-+       */
-+
-+      while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
-+                                      device)) != NULL) {
-+              pci_read_config_dword(device, 0x04, &scratch);
-+
-+              if (!(scratch & 0x00100000))
-+                      continue;
-+
-+              pci_read_config_byte(device, 0x34, &cap_ptr);
-+
-+              if (cap_ptr != 0x00) {
-+                      do {
-+                              pci_read_config_dword(device,
-+                                                    cap_ptr, &cap_id);
-+
-+                              if ((cap_id & 0xff) != 0x02)
-+                                      cap_ptr = (cap_id >> 8) & 0xff;
-+                      }
-+                      while (((cap_id & 0xff) != 0x02) && (cap_ptr != 0x00));
-+              }
-+              if (cap_ptr != 0x00) {
-+                      /*
-+                       * Ok, here we have a AGP device. Disable impossible 
-+                       * settings, and adjust the readqueue to the minimum.
-+                       */
-+
-+                      pci_read_config_dword(device, cap_ptr + 4, &scratch);
-+
-+                      /* adjust RQ depth */
-+                      command =
-+                          ((command & ~0xff000000) |
-+                           min_t(u32, (mode & 0xff000000),
-+                               min_t(u32, (command & 0xff000000),
-+                                   (scratch & 0xff000000))));
-+
-+                      /* disable SBA if it's not supported */
-+                      if (!((command & 0x00000200) &&
-+                            (scratch & 0x00000200) &&
-+                            (mode & 0x00000200)))
-+                              command &= ~0x00000200;
-+
-+                      /* disable FW if it's not supported */
-+                      if (!((command & 0x00000010) &&
-+                            (scratch & 0x00000010) &&
-+                            (mode & 0x00000010)))
-+                              command &= ~0x00000010;
-+
-+                      if (!((command & 4) &&
-+                            (scratch & 4) &&
-+                            (mode & 4)))
-+                              command &= ~0x00000004;
-+
-+                      if (!((command & 2) &&
-+                            (scratch & 2) &&
-+                            (mode & 2)))
-+                              command &= ~0x00000002;
-+
-+                      if (!((command & 1) &&
-+                            (scratch & 1) &&
-+                            (mode & 1)))
-+                              command &= ~0x00000001;
-+              }
-+      }
-+      /*
-+       * PASS2: Figure out the 4X/2X/1X setting and enable the
-+       *        target (our motherboard chipset).
-+       */
-+
-+      if (command & 4) {
-+              command &= ~3;  /* 4X */
-+      }
-+      if (command & 2) {
-+              command &= ~5;  /* 2X */
-+      }
-+      if (command & 1) {
-+              command &= ~6;  /* 1X */
-+      }
-+      command |= 0x00000100;
-+
-+      uninorth_tlbflush(NULL);
-+
-+      do {
-+              pci_write_config_dword(agp_bridge.dev,
-+                                     agp_bridge.capndx + 8,
-+                                     command);
-+              pci_read_config_dword(agp_bridge.dev,
-+                                     agp_bridge.capndx + 8,
-+                                     &scratch);
-+      } while((scratch & 0x100) == 0);
-+
-+      /*
-+       * PASS3: Go throu all AGP devices and update the
-+       *        command registers.
-+       */
-+
-+      while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
-+                                      device)) != NULL) {
-+              pci_read_config_dword(device, 0x04, &scratch);
-+
-+              if (!(scratch & 0x00100000))
-+                      continue;
-+
-+              pci_read_config_byte(device, 0x34, &cap_ptr);
-+
-+              if (cap_ptr != 0x00) {
-+                      do {
-+                              pci_read_config_dword(device,
-+                                                    cap_ptr, &cap_id);
-+
-+                              if ((cap_id & 0xff) != 0x02)
-+                                      cap_ptr = (cap_id >> 8) & 0xff;
-+                      }
-+                      while (((cap_id & 0xff) != 0x02) && (cap_ptr != 0x00));
-+              }
-+              if (cap_ptr != 0x00)
-+                      pci_write_config_dword(device, cap_ptr + 8, command);
-+      }
-+
-+      uninorth_tlbflush(NULL);
-+}
-+
-+static int uninorth_create_gatt_table(void)
-+{
-+      char *table;
-+      char *table_end;
-+      int size;
-+      int page_order;
-+      int num_entries;
-+      int i;
-+      void *temp;
-+      struct page *page;
-+
-+      /* The generic routines can't handle 2 level gatt's */
-+      if (agp_bridge.size_type == LVL2_APER_SIZE) {
-+              return -EINVAL;
-+      }
-+
-+      table = NULL;
-+      i = agp_bridge.aperture_size_idx;
-+      temp = agp_bridge.current_size;
-+      size = page_order = num_entries = 0;
-+
-+      do {
-+              size = A_SIZE_32(temp)->size;
-+              page_order = A_SIZE_32(temp)->page_order;
-+              num_entries = A_SIZE_32(temp)->num_entries;
-+
-+              table = (char *) __get_free_pages(GFP_KERNEL, page_order);
-+
-+              if (table == NULL) {
-+                      i++;
-+                      agp_bridge.current_size = A_IDX32();
-+              } else {
-+                      agp_bridge.aperture_size_idx = i;
-+              }
-+      } while ((table == NULL) &&
-+                       (i < agp_bridge.num_aperture_sizes));
-+
-+      if (table == NULL) {
-+              return -ENOMEM;
-+      }
-+      table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1);
-+
-+      for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
-+              SetPageReserved(page);
-+
-+      agp_bridge.gatt_table_real = (unsigned long *) table;
-+      agp_bridge.gatt_table = (unsigned long *)table;
-+      agp_bridge.gatt_bus_addr = virt_to_phys(table);
-+
-+      for (i = 0; i < num_entries; i++) {
-+              agp_bridge.gatt_table[i] =
-+                  (unsigned long) agp_bridge.scratch_page;
-+      }
-+
-+      flush_dcache_range((unsigned long)table, (unsigned long)table_end);
-+
-+      return 0;
-+}
-+
-+static int uninorth_free_gatt_table(void)
-+{
-+      int page_order;
-+      char *table, *table_end;
-+      void *temp;
-+      struct page *page;
-+
-+      temp = agp_bridge.current_size;
-+      page_order = A_SIZE_32(temp)->page_order;
-+
-+      /* Do not worry about freeing memory, because if this is
-+       * called, then all agp memory is deallocated and removed
-+       * from the table.
-+       */
-+
-+      table = (char *) agp_bridge.gatt_table_real;
-+      table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1);
-+
-+      for (page = virt_to_page(table); page <= virt_to_page(table_end); page++)
-+              ClearPageReserved(page);
-+
-+      free_pages((unsigned long) agp_bridge.gatt_table_real, page_order);
-+
-+      return 0;
-+}
-+
-+/* Setup function */
-+static gatt_mask uninorth_masks[] =
-+{
-+      {0x00000000, 0}
-+};
-+
-+static aper_size_info_32 uninorth_sizes[7] =
-+{
-+#if 0 /* Not sure uninorth supports that high aperture sizes */
-+      {256, 65536, 6, 64},
-+      {128, 32768, 5, 32},
-+      {64, 16384, 4, 16},
-+#endif        
-+      {32, 8192, 3, 8},
-+      {16, 4096, 2, 4},
-+      {8, 2048, 1, 2},
-+      {4, 1024, 0, 1}
-+};
-+
-+static int __init uninorth_setup (struct pci_dev *pdev)
-+{
-+      agp_bridge.masks = uninorth_masks;
-+      agp_bridge.num_of_masks = 1;
-+      agp_bridge.aperture_sizes = (void *)uninorth_sizes;
-+      agp_bridge.size_type = U32_APER_SIZE;
-+      agp_bridge.num_aperture_sizes = 4; //7;
-+      agp_bridge.dev_private_data = NULL;
-+      agp_bridge.needs_scratch_page = FALSE;
-+      agp_bridge.configure = uninorth_configure;
-+      agp_bridge.fetch_size = uninorth_fetch_size;
-+      agp_bridge.cleanup = uninorth_cleanup;
-+      agp_bridge.tlb_flush = uninorth_tlbflush;
-+      agp_bridge.mask_memory = uninorth_mask_memory;
-+      agp_bridge.agp_enable = uninorth_agp_enable;
-+      agp_bridge.cache_flush = global_cache_flush;
-+      agp_bridge.create_gatt_table = uninorth_create_gatt_table;
-+      agp_bridge.free_gatt_table = uninorth_free_gatt_table;
-+      agp_bridge.insert_memory = uninorth_insert_memory;
-+      agp_bridge.remove_memory = agp_generic_remove_memory;
-+      agp_bridge.alloc_by_type = agp_generic_alloc_by_type;
-+      agp_bridge.free_by_type = agp_generic_free_by_type;
-+      agp_bridge.agp_alloc_page = agp_generic_alloc_page;
-+      agp_bridge.agp_destroy_page = agp_generic_destroy_page;
-+      agp_bridge.suspend = agp_generic_suspend;
-+      agp_bridge.resume = agp_generic_resume;
-+      agp_bridge.cant_use_aperture = 1;
-+
-+      return 0;
-+      
-+      (void) pdev; /* unused */
-+}
-+
-+#endif /* CONFIG_AGP_UNINORTH */
-+
- /* per-chipset initialization data.
-  * note -- all chipsets for a single vendor MUST be grouped together
-  */
-@@ -6462,6 +6865,27 @@
-         ati_generic_setup },
- #endif /* CONFIG_AGP_ATI */
-+#ifdef CONFIG_AGP_UNINORTH
-+      { PCI_DEVICE_ID_APPLE_UNI_N_AGP,
-+              PCI_VENDOR_ID_APPLE,
-+              APPLE_UNINORTH,
-+              "Apple",
-+              "UniNorth",
-+              uninorth_setup },
-+      { PCI_DEVICE_ID_APPLE_UNI_N_AGP_P,
-+              PCI_VENDOR_ID_APPLE,
-+              APPLE_UNINORTH,
-+              "Apple",
-+              "UniNorth/Pangea",
-+              uninorth_setup },
-+      { PCI_DEVICE_ID_APPLE_UNI_N_AGP15,
-+              PCI_VENDOR_ID_APPLE,
-+              APPLE_UNINORTH,
-+              "Apple",
-+              "UniNorth 1.5",
-+              uninorth_setup },
-+#endif /* CONFIG_AGP_UNINORTH */
-+
-       { 0, }, /* dummy final entry, always present */
- };
-diff -urN linux-2.4.22.org/drivers/char/Config.in linux-2.4.22/drivers/char/Config.in
---- linux-2.4.22.org/drivers/char/Config.in    2003-11-21 18:32:29.000000000 +0100
-+++ linux-2.4.22/drivers/char/Config.in        2003-11-21 18:34:42.000000000 +0100
-@@ -210,6 +210,9 @@
-       comment '  from the tpqic02-support package.  It is available at'
-       comment '  metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/'
-    fi
-+   if [ "$CONFIG_ALL_PPC" = "y" ]; then
-+      bool '  Apple UniNorth support' CONFIG_AGP_UNINORTH
-+   fi
- fi
- tristate 'IPMI top-level message handler' CONFIG_IPMI_HANDLER
-diff -urN linux-2.4.22.org/include/linux/agp_backend.h linux-2.4.22/include/linux/agp_backend.h
---- linux-2.4.22.org/include/linux/agp_backend.h       2003-11-21 18:31:25.000000000 +0100
-+++ linux-2.4.22/include/linux/agp_backend.h   2003-11-21 18:35:20.000000000 +0100
-@@ -95,6 +95,7 @@
-       NVIDIA_NFORCE3,
-       NVIDIA_GENERIC,
-       HP_ZX1,
-+      APPLE_UNINORTH,
-       ATI_RS100,
-       ATI_RS200,
-       ATI_RS250,
diff --git a/linux-2.4.20-amd-golem.patch b/linux-2.4.20-amd-golem.patch
deleted file mode 100644 (file)
index e5cc34c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -urNp linux-4/arch/i386/kernel/apic.c linux-200/arch/i386/kernel/apic.c
---- linux-4/arch/i386/kernel/apic.c    
-+++ linux-200/arch/i386/kernel/apic.c  
-@@ -1179,9 +1179,10 @@ int __init APIC_init_uniprocessor (void)
-       if (nmi_watchdog == NMI_LOCAL_APIC)
-               check_nmi_watchdog();
- #ifdef CONFIG_X86_IO_APIC
--      if (smp_found_config)
--              if (!skip_ioapic_setup && nr_ioapics)
--                      setup_IO_APIC();
-+      if (smp_found_config && !skip_ioapic_setup && nr_ioapics) {
-+              setup_IO_APIC();
-+      } else
-+              nr_ioapics = 0;
- #endif
-       setup_APIC_clocks();
-diff -urNp linux-4/arch/i386/kernel/smpboot.c linux-200/arch/i386/kernel/smpboot.c
---- linux-4/arch/i386/kernel/smpboot.c 
-+++ linux-200/arch/i386/kernel/smpboot.c       
-@@ -1207,8 +1207,10 @@ void __init smp_boot_cpus(void)
-        * Here we can be sure that there is an IO-APIC in the system. Let's
-        * go and set it up:
-        */
--      if (!skip_ioapic_setup && nr_ioapics)
-+      if (!skip_ioapic_setup && nr_ioapics) {
-               setup_IO_APIC();
-+      } else
-+              nr_ioapics = 0;
- #endif
-       /*
-diff -urNp linux-4/drivers/pci/quirks.c linux-200/drivers/pci/quirks.c
---- linux-4/drivers/pci/quirks.c       
-+++ linux-200/drivers/pci/quirks.c     
-@@ -644,6 +664,8 @@ static struct pci_fixup pci_fixups[] __i
- #ifdef CONFIG_X86_IO_APIC 
-       { PCI_FIXUP_FINAL,      PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_82C686,       quirk_via_ioapic },
-+      { PCI_FIXUP_FINAL,      PCI_VENDOR_ID_AMD,      0x7451,
-+quirk_amd_8131_ioapic },
- #endif
-       { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_82C586_3,     quirk_via_acpi },
-       { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_82C686_4,     quirk_via_acpi },
diff --git a/linux-2.4.20-davfs-_FUNCTION_.patch b/linux-2.4.20-davfs-_FUNCTION_.patch
deleted file mode 100644 (file)
index 2a3b513..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -up new/fs/davfs/dav_debug.h.orig new/fs/davfs/dav_debug.h
---- new/fs/davfs/dav_debug.h.orig      2002-08-09 22:38:28.000000000 +0200
-+++ new/fs/davfs/dav_debug.h   2002-08-09 22:35:32.000000000 +0200
-@@ -11,14 +11,14 @@
-  * these are normally enabled.
-  */
- #ifdef SMBFS_PARANOIA
--#define PARANOIA(x...) printk(KERN_NOTICE __FUNCTION__ ": " x)
-+#define PARANOIA(fmt,args...) printk(KERN_NOTICE "%s: " fmt, __FUNCTION__, args)
- #else
- #define PARANOIA(x...) do { ; } while(0)
- #endif
- /* lots of debug messages */
- #ifdef SMBFS_DEBUG_VERBOSE
--#define VERBOSE(x...) printk(KERN_DEBUG __FUNCTION__ ": " x)
-+#define VERBOSE(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, args)
- #else
- #define VERBOSE(x...) do { ; } while(0)
- #endif
-@@ -28,19 +28,19 @@
-  * too common name.
-  */
- #ifdef SMBFS_TRACE
--#define TRACE() printk(KERN_DEBUG __FUNCTION__ "--trace--\n")
-+#define TRACE() printk(KERN_DEBUG "%s--trace--\n", __FUNCTION__)
- #else
- #define TRACE() do { ; } while(0)
- #endif
- #ifdef SMBFS_DEBUG
--#define DEBUG1(x...) printk(KERN_DEBUG __FUNCTION__ ": " x)
-+#define DEBUG1(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, args)
- #else
- #define DEBUG1(x...) do { ; } while(0)
- #endif
- #ifdef SMBFS_DEBUG2
--#define DEBUG2(x...) printk(KERN_DEBUG __FUNCTION__ ": " x)
-+#define DEBUG2(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, args)
- #else
- #define DEBUG2(x...) do { ; } while(0)
- #endif
diff --git a/linux-2.4.20-e820.patch b/linux-2.4.20-e820.patch
deleted file mode 100644 (file)
index 4238ae0..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-diff -urN linux/arch/i386/config.in linux/arch/i386/config.in
---- linux/arch/i386/config.in  Tue Jan  9 16:24:13 2001
-+++ linux/arch/i386/config.in  Wed Jan 10 07:08:08 2001
-@@ -143,6 +143,7 @@
- tristate '/dev/cpu/microcode - Intel P6 CPU microcode support' CONFIG_MICROCODE
- tristate '/dev/cpu/*/msr - Model-specific register support' CONFIG_X86_MSR
- tristate '/dev/cpu/*/cpuid - CPU information support' CONFIG_X86_CPUID
-+bool 'E820 proc support' CONFIG_E820_PROC
- choice 'High Memory Support' \
-       "off    CONFIG_NOHIGHMEM \
---- linux/arch/i386/kernel/Makefile    Wed Jan 17 15:58:23 2001
-+++ linux/arch/i386/kernel/Makefile    Wed Jan 17 15:58:47 2001
-@@ -31,6 +31,7 @@
- endif
- obj-$(CONFIG_MCA)             += mca.o
-+obj-$(CONFIG_E820_PROC)       += e820.o rpmhelper.o
- obj-$(CONFIG_MTRR)            += mtrr.o
- obj-$(CONFIG_X86_MSR)         += msr.o
- obj-$(CONFIG_X86_CPUID)               += cpuid.o
-diff -urN linux/arch/i386/kernel/e820.c linux/arch/i386/kernel/e820.c
---- linux/arch/i386/kernel/e820.c      Wed Dec 31 19:00:00 1969
-+++ linux/arch/i386/kernel/e820.c      Wed Jan 10 07:05:51 2001
-@@ -0,0 +1,89 @@
-+/* Copyright (c) 2001 Red Hat, Inc. All rights reserved.
-+ * This software may be freely redistributed under the terms of the
-+ * GNU General Public License.
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ * Author: Arjan van de Ven <arjanv@redhat.com
-+ */
-+#include <linux/config.h>
-+#include <linux/kernel.h>
-+#include <linux/init.h>      /* for module_init/exit */
-+#include <linux/proc_fs.h>
-+#include <linux/module.h>
-+#include <linux/version.h>
-+#include <linux/types.h>
-+
-+#include <asm/e820.h>
-+
-+extern struct e820map e820;
-+struct proc_dir_entry *e820_proc_entry;
-+
-+static int e820_proc_output(char *buffer, int bufsize)
-+{
-+        int i,bufpos=0;
-+
-+        for (i = 0; i < e820.nr_map; i++) {
-+              /* FIXME: check for overflow */
-+                bufpos += sprintf(buffer+bufpos,"%016Lx @ %016Lx ", 
-+                        e820.map[i].size, e820.map[i].addr);
-+                switch (e820.map[i].type) {
-+                case E820_RAM:  bufpos += sprintf(buffer+bufpos,"(usable)\n");
-+                                break;
-+                case E820_RESERVED:
-+                                bufpos += sprintf(buffer+bufpos,"(reserved)\n");
-+                                break;
-+                case E820_ACPI:
-+                                bufpos += sprintf(buffer+bufpos,"(ACPI data)\n");
-+                                break;
-+                case E820_NVS:
-+                                bufpos += sprintf(buffer+bufpos,"(ACPI NVS)\n");
-+                                break;
-+                default:        bufpos += sprintf(buffer+bufpos,"type %lu\n", e820.map[i].type);
-+                                break;
-+                }
-+        }
-+      return bufpos;
-+}
-+
-+
-+
-+
-+
-+
-+static int e820_read_proc(char *page, char **start, off_t off,
-+                         int count, int *eof, void *data)
-+{
-+        int len = e820_proc_output (page,4096);
-+        if (len <= off+count) *eof = 1;
-+        *start = page + off;
-+        len -= off;
-+        if (len>count) len = count;
-+        if (len<0) len = 0;
-+        return len;
-+}
-+
-+int e820_module_init(void)
-+{        
-+        /* /proc/e820info probably isn't the best place for it, need
-+           to find a better one */
-+      e820_proc_entry = create_proc_entry ("e820info", 0, NULL);
-+      if (e820_proc_entry==NULL)
-+              return -EIO;
-+
-+      e820_proc_entry->read_proc = e820_read_proc;
-+      e820_proc_entry->owner = THIS_MODULE;
-+
-+      return 0;
-+}
-+
-+
-+void e820_module_exit(void)
-+{
-+       remove_proc_entry ("e820info", e820_proc_entry);
-+}
-+
-+module_init(e820_module_init);
-+module_exit(e820_module_exit);
-+
-diff -urN /usr/src/linux-2.4.9-7/arch/i386/kernel/rpmhelper.c linux/arch/i386/kernel/rpmhelper.c
---- /usr/src/linux-2.4.9-7/arch/i386/kernel/rpmhelper.c        Thu Jan  1 01:00:00 1970
-+++ linux/arch/i386/kernel/rpmhelper.c Sun Oct 28 17:09:58 2001
-@@ -0,0 +1,102 @@
-+#include <linux/config.h>
-+#include <linux/kernel.h>
-+#include <linux/init.h>      /* for module_init/exit */
-+#include <linux/proc_fs.h>
-+#include <linux/module.h>
-+#include <linux/version.h>
-+#include <linux/types.h>
-+
-+#include <asm/e820.h>
-+#include <asm/cpufeature.h>
-+#include <asm/processor.h>
-+
-+
-+/* this file, present in the -BOOT kernel, informs anaconda about which 
-+   kernels this system needs. While not impossible to do in userspace,
-+   the kernel has the authorative list of defective bioses (440GX etc) that
-+   have special needs.
-+ */
-+
-+#define cpu_has_cmov    (test_bit(X86_FEATURE_CMOV, boot_cpu_data.x86_capability))
-+
-+
-+extern char rpmarchitecture[];
-+extern char rpmkerneltype[];
-+extern int skip_ioapic_setup;
-+
-+extern struct e820map e820;
-+extern struct cpuinfo_x86 boot_cpu_data;
-+
-+static inline int needbigmem()
-+{
-+        int i;
-+        
-+        /* no pae no bigmem */
-+        if ( (!cpu_has_pae) || (!cpu_has_xmm) )
-+              return 0;
-+
-+        for (i = 0; i < e820.nr_map; i++) {
-+                switch (e820.map[i].type) {
-+                case E820_RAM:  
-+                              if (e820.map[i].addr > 0xffffffff)
-+                                      return 1;
-+                              if (e820.map[i].addr+e820.map[i].size > 0xffffffff)
-+                                      return 1;
-+                                break;
-+                default:        
-+                                break;
-+                }
-+        }
-+      return 0;
-+}
-+
-+static inline void cputype(void)
-+{
-+      /* i386 works always */
-+      sprintf(rpmarchitecture,"i386");
-+      /* test for i586 and up */
-+      if (boot_cpu_data.x86_model<5)
-+              return;
-+      sprintf(rpmarchitecture,"i586 i385");
-+      /* i686 and above needs cmov support */
-+      if (!cpu_has_cmov)
-+              return;
-+      sprintf(rpmarchitecture,"i686 i586 i386");
-+      
-+      /* athlon */
-+      if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && 
-+          (boot_cpu_data.x86>=6) )
-+              sprintf(rpmarchitecture,"athlon i686 i586 i386");
-+      
-+}
-+
-+int __init rpmhelper_init(void)
-+{        
-+      int ent=0,smp=0;
-+      /* > 4Gb ram addressable -> Enterprise kernel */
-+      ent = needbigmem();
-+      /* 440GX or similarly broken bios ? -> smp kernel */
-+      #if CONFIG_X86_LOCAL_APIC
-+      if (skip_ioapic_setup==0)
-+              smp = 1;
-+      #endif
-+      
-+      if (ent && smp)
-+              sprintf(rpmkerneltype,"bigmem smp");
-+      else
-+              if (smp)
-+                      sprintf(rpmkerneltype,"smp");
-+      
-+      cputype();
-+      
-+      return 0;
-+}
-+
-+
-+void rpmhelper_exit(void)
-+{
-+}
-+
-+module_init(rpmhelper_init);
-+module_exit(rpmhelper_exit);
-+
-diff -urN /usr/src/linux-2.4.9-7/include/linux/sysctl.h linux/include/linux/sysctl.h
---- /usr/src/linux-2.4.9-7/include/linux/sysctl.h      Thu Oct 18 18:42:27 2001
-+++ linux/include/linux/sysctl.h       Sun Oct 28 17:13:51 2001
-@@ -601,6 +601,11 @@
- /* CTL_DEBUG names: */
-+enum {
-+      DEBUG_RPM1=500,
-+      DEBUG_RPM2=501
-+};
-+
- /* CTL_DEV names: */
- enum {
-       DEV_CDROM=1,
-diff -urN /usr/src/linux-2.4.9-7/kernel/sysctl.c linux/kernel/sysctl.c
---- /usr/src/linux-2.4.9-7/kernel/sysctl.c     Thu Oct 18 18:34:52 2001
-+++ linux/kernel/sysctl.c      Sun Oct 28 17:13:18 2001
-@@ -76,6 +76,9 @@
- extern int sem_ctls[];
- #endif
-+char rpmarchitecture[64];
-+char rpmkerneltype[64];
-+
- #ifdef __sparc__
- extern char reboot_command [];
- extern int stop_a_enabled;
-@@ -335,6 +338,10 @@
- };
- static ctl_table debug_table[] = {
-+      {DEBUG_RPM1, "kerneltype", rpmkerneltype, 64,
-+       0444, NULL, &proc_doutsstring, &sysctl_string},
-+      {DEBUG_RPM2, "rpmarch", rpmarchitecture, 64,
-+       0444, NULL, &proc_doutsstring, &sysctl_string},
-       {0}
- };
diff --git a/linux-2.4.20-ecc.patch b/linux-2.4.20-ecc.patch
deleted file mode 100644 (file)
index 1c30d43..0000000
+++ /dev/null
@@ -1,1460 +0,0 @@
-diff -urN Linux/drivers/char/Config.in linux/drivers/char/Config.in
---- Linux/drivers/char/Config.in       Tue May 21 11:16:05 2002
-+++ linux/drivers/char/Config.in       Tue May 21 11:18:53 2002
-@@ -5,6 +5,7 @@
- comment 'Character devices'
- bool 'Virtual terminal' CONFIG_VT
-+tristate '   ECC memory monitoring' CONFIG_ECC
- if [ "$CONFIG_VT" = "y" ]; then
-    bool '  Support for console on virtual terminal' CONFIG_VT_CONSOLE
- fi
-diff -urN Linux/drivers/char/Makefile linux/drivers/char/Makefile
---- Linux/drivers/char/Makefile        Tue May 21 11:16:05 2002
-+++ linux/drivers/char/Makefile        Tue May 21 11:18:53 2002
-@@ -144,6 +144,7 @@
- endif
- obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o
-+obj-$(CONFIG_ECC) += ecc.o
- obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o
- obj-$(CONFIG_ROCKETPORT) += rocket.o
- obj-$(CONFIG_MOXA_SMARTIO) += mxser.o
-diff -urN Linux/drivers/char/ecc.c linux/drivers/char/ecc.c
---- Linux/drivers/char/ecc.c   Thu Jan  1 01:00:00 1970
-+++ linux/drivers/char/ecc.c   Tue May 21 11:19:17 2002
-@@ -0,0 +1,1434 @@
-+/*
-+ * ECC kernel module (C) 1998, 1999, 2002 Dan Hollis <goemon at anime dot net>
-+ * Portions thanks to
-+ *    Michael O'Reilly <michael at metal dot iinet dot net dot au>
-+ *    Osma Ahvenlampi <oa at spray dot fi>
-+ *    Martin Maney <maney at pobox dot com>
-+ *    Peter Heckert <peter.heckert at arcormail dot de>
-+ *      Ishikawa <ishikawa at yk dot rim dot or dot jp>
-+ *    Jaakko Hyvti <jaakko dot hyvatti at iki dot fi>
-+ *      Various Linux Networx, LLNL & Red Hat staff.
-+ */
-+
-+#define DEBUG 0
-+
-+#include <linux/config.h>
-+#include <linux/version.h>
-+#include <linux/module.h>
-+
-+#include <linux/mm.h>
-+#include <linux/sched.h>
-+#include <linux/delay.h>
-+#include <linux/pci.h>
-+#include <linux/timer.h>
-+#include <asm/io.h>
-+#include <linux/proc_fs.h>
-+#include <linux/sysctl.h>
-+#include <linux/kernel.h>
-+#include <asm/uaccess.h>
-+
-+#define       ECC_VER "0.14 (Oct 10 2001)"
-+
-+static struct timer_list ecctimer;
-+static struct pci_dev *bridge = NULL;
-+static u16 vendor, device;
-+static int scrub_needed;
-+static int scrub_row;
-+
-+/* These are tunable by either module parameter or sysctl */
-+int panic_on_mbe = 1;
-+int log_mbe = 1;
-+int log_sbe = 1;
-+int poll_msec = 1000;
-+
-+#ifdef MODULE
-+MODULE_PARM(panic_on_mbe, "i");
-+MODULE_PARM(log_mbe, "i");
-+MODULE_PARM(log_sbe, "i");
-+MODULE_PARM(poll_msec, "i");
-+#endif
-+
-+#define CTL_ECC 2740
-+
-+static ctl_table ecc_table[] = {
-+      {1, "panic_on_mbe",
-+              &panic_on_mbe, sizeof(int), 0644, NULL, &proc_dointvec},
-+      {2, "log_mbe",
-+              &log_mbe, sizeof(int), 0644, NULL, &proc_dointvec},
-+      {3, "log_sbe",
-+              &log_sbe, sizeof(int), 0644, NULL, &proc_dointvec},
-+      {4, "poll_msec",
-+              &poll_msec, sizeof(int), 0644, NULL, &proc_dointvec},
-+      {0}
-+};
-+
-+static ctl_table ecc_root_table[] = {
-+      {CTL_DEBUG, "ecc", NULL, 0, 0555, ecc_table},
-+      {0}
-+};
-+
-+static struct ctl_table_header *ecc_sysctl_header = NULL;
-+
-+#define MAXBANKS 16
-+
-+#define I860_DUMPCONFIG 0
-+
-+#define mbe_printk(fmt,args...) do { \
-+    if (panic_on_mbe) panic("ECC: MBE " fmt,##args); \
-+    else if (log_mbe) printk(KERN_EMERG "ECC: MBE " fmt,##args); \
-+} while(0)
-+#define sbe_printk(fmt,args...) do { \
-+    if (log_sbe) printk(KERN_WARNING "ECC: SBE " fmt,##args); \
-+} while(0)
-+
-+#if     defined(NDEBUG)
-+#define assert(EX) do { } while (0)
-+#else
-+#define assert(EX) do { \
-+      if (!(EX)) printk("assertion failed: %s, %s::%d\n", \
-+                      #EX, __FILE__, __LINE__); \
-+      } while (0)
-+#endif
-+
-+/* memory types */
-+#define BANK_EMPTY    0       /* Empty bank */
-+#define BANK_RESERVED 1       /* Reserved bank type */
-+#define BANK_UNKNOWN  2       /* Unknown bank type */
-+#define BANK_FPM      3       /* Fast page mode */
-+#define BANK_EDO      4       /* Extended data out */
-+#define BANK_BEDO     5       /* Burst Extended data out */
-+#define BANK_SDR      6       /* Single data rate SDRAM */
-+#define BANK_DDR      7       /* Double data rate SDRAM */
-+#define BANK_RDR      8       /* Registered SDRAM */
-+#define BANK_RMBS     9       /* Rambus DRAM */
-+
-+/* Memory bank info */
-+static struct bankstruct
-+{
-+      u32 endaddr;            /* bank ending address */
-+      u32 mbecount;           /* total number of MBE errors */
-+      u32 sbecount;           /* total number of SBE errors */
-+      u8 eccmode;             /* ECC enabled for this bank? */
-+      u8 mtype;               /* memory bank type */
-+} bank[MAXBANKS];                     /* do any chipsets support more? */
-+
-+/* chipset ECC capabilities and mode */
-+#define ECC_NONE      0       /* Doesnt support ECC (or is BIOS disabled) */
-+#define ECC_RESERVED  1       /* Reserved ECC type */
-+#define ECC_PARITY    2       /* Detects parity errors */
-+#define ECC_DETECT    3       /* Detects ECC errors */
-+#define ECC_CORRECT   4       /* Detects ECC errors and corrects SBE */
-+#define ECC_AUTO      5       /* Detects ECC errors and has hardware scrubber */
-+
-+static struct ChipsetInfo
-+{
-+      int ecc_cap;            /* chipset ECC capabilities */
-+      int ecc_mode;           /* current ECC mode */
-+      void (*check)(void);    /* pointer to ecc checking routine */
-+      void (*clear_err)(void);/* pointer to error clear routine */
-+#if 0
-+/*
-+ * I dont think we care about SERR at the moment.
-+ * We may if/when we hook into an NMI handler.
-+ */
-+      int SERR;               /* SERR enabled? */
-+      int SERR_MBE;           /* SERR on multi-bit error? */
-+      int SERR_SBE;           /* SERR on single-bit error? */
-+#endif
-+      int MBE_flag_address;   /* pci offset for mbe register */
-+      int MBE_flag_shift;     /* bits to shift for mbe flag */
-+      int MBE_flag_mask;      /* mask for mbe flag */
-+      int MBE_row_shift;      /* bits to shift for mbe row flag */
-+      int MBE_row_mask;       /* mask for mbe register (shifted) */
-+      int SBE_flag_address;   /* pci offset for sbe register */
-+      int SBE_flag_shift;     /* bits to shift for sbe flag */
-+      int SBE_flag_mask;      /* mask for sbe flag */
-+      int SBE_row_shift;      /* bits to shift for sbe row flag */    
-+      int SBE_row_mask;       /* mask for sbe register (shifted) */
-+      int MBE_err_address1;   /* pci offset for mbe address register */
-+      int MBE_err_shift1;     /* bits to shift for mbe address register */
-+      int MBE_err_address2;   /* pci offset for mbe address register */
-+      int MBE_err_shift2;     /* bits to shift for mbe address register */
-+      u32 MBE_err_mask;       /* mask for mbe address register */
-+      int MBE_err_flag;       /* MBE error flag */
-+      int MBE_err_row;        /* MBE row */
-+      u32 MBE_addr;           /* address of last MBE */
-+      int SBE_err_address1;   /* pci offset for mbe address register */
-+      int SBE_err_shift1;     /* bits to shift for mbe address register */
-+      int SBE_err_address2;   /* pci offset for mbe address register */
-+      int SBE_err_shift2;     /* bits to shift for mbe address register */
-+      u32 SBE_err_mask;       /* mask for mbe address register */
-+      int SBE_err_flag;       /* SBE error flag */
-+      int SBE_err_row;        /* SBE row */
-+      u32 SBE_addr;           /* address of last SBE */
-+} cs;
-+
-+static inline unsigned int pci_byte(int offset)
-+{
-+      u8 value;
-+      pci_read_config_byte(bridge, offset, &value);
-+      return value & 0xFF;
-+}
-+
-+static inline unsigned int pci_word(int offset)
-+{
-+      u16 value;
-+      pci_read_config_word(bridge, offset, &value);
-+      return value;
-+}
-+
-+static inline unsigned int pci_dword(int offset)
-+{
-+      u32 value;
-+      pci_read_config_dword(bridge, offset, &value);
-+      return value;
-+}
-+
-+/* write all or some bits in a byte-register*/
-+static inline void pci_write_bits8(int offset,u8 value,u8 mask)
-+{ 
-+        if (mask != 0xff){
-+                u8 buf;
-+                pci_read_config_byte(bridge,offset, &buf);
-+                value &=mask;
-+                buf &= ~mask;
-+                value |= buf;
-+        }
-+        pci_write_config_byte(bridge,offset,value);
-+}  
-+
-+static int find_row(unsigned long err_addr)
-+{
-+      int row = 0, loop;
-+      for(loop=0; loop < MAXBANKS; loop++) {
-+              if (err_addr < bank[loop].endaddr) {
-+              row=loop;
-+                      break;
-+              }
-+      }
-+      return row;
-+}
-+
-+/*
-+ *    generic ECC check routine
-+ *
-+ *    This routine assumes that the MBE and SBE error status consist of:
-+ *     * one or more bits in a status byte that are non-zero on error
-+ *     * zero or more bits in a status byte that encode the row
-+ *    It accomodates both the case where both the MBE and SBE data are
-+ *    packed into a single byte (all chipsets currently known to me) as
-+ *    well as the case where the MBE and SBE information are contained in
-+ *    separate locations.  The status byte is read only once for the packed
-+ *    case in case the status value should be altered by being read.
-+ */
-+static void generic_check(void)
-+{
-+      int status = pci_byte(cs.MBE_flag_address);
-+      if ((status >> cs.MBE_flag_shift) & cs.MBE_flag_mask)
-+      {
-+              int row = (status >> cs.MBE_row_shift) & cs.MBE_row_mask;
-+              mbe_printk("detected in DRAM row %d\n", row);
-+              if (cs.MBE_err_address1)
-+              {
-+                      cs.MBE_addr =
-+                      ( pci_word(cs.MBE_err_address1 << cs.MBE_err_shift1) |
-+                        pci_word(cs.MBE_err_address2 << cs.MBE_err_shift2) ) &
-+                        cs.MBE_err_mask;
-+                      mbe_printk("at memory address %lx\n", (long unsigned int)cs.MBE_addr);
-+              }
-+              scrub_needed = 2;
-+              scrub_row = row;
-+              bank[row].mbecount++;
-+      }
-+      if (cs.SBE_flag_address != cs.MBE_flag_address)
-+              status = pci_byte(cs.SBE_flag_address);
-+      if ((status >> cs.SBE_flag_shift) & cs.SBE_flag_mask)
-+      {
-+              int row = (status >> cs.SBE_row_shift) & cs.SBE_row_mask;
-+              sbe_printk("detected in DRAM row %d\n", row);
-+              if (cs.SBE_err_address1)
-+              {
-+                      cs.SBE_addr =
-+                      ( pci_word(cs.SBE_err_address1 << cs.SBE_err_shift1) |
-+                        pci_word(cs.SBE_err_address2 << cs.SBE_err_shift2) ) &
-+                        cs.SBE_err_mask;
-+                      sbe_printk("at memory address %lx\n", (long unsigned int)cs.SBE_addr);
-+              }
-+              scrub_needed = 1;
-+              scrub_row = row;
-+              bank[row].sbecount++;
-+      }
-+}
-+
-+/* VIA specific error clearing */
-+static void clear_via_err(void)
-+{
-+      pci_write_bits8(0x6f,0xff,0xff);
-+      /* as scrubbing is unimplemented, we reset it here */
-+      scrub_needed = 0;
-+}
-+
-+/* unified VIA probe */
-+static void probe_via(void)
-+{
-+      int loop, ecc_ctrl, dimmslots = 3, bankshift = 23;
-+      int m_mem[] = { BANK_FPM, BANK_EDO, BANK_DDR, BANK_SDR };
-+      switch (device) {
-+              case 0x0391: /* VIA VT8371   - KX133            */
-+                      dimmslots = 4;
-+                      bankshift = 24;
-+                      bank[6].endaddr=(unsigned long)pci_byte(0x56)<<24;
-+                      bank[7].endaddr=(unsigned long)pci_byte(0x57)<<24;
-+              case 0x0595: /* VIA VT82C595 - VP2,VP2/97       */
-+                      m_mem[2] = BANK_RESERVED;
-+                      cs.ecc_cap = ECC_CORRECT;
-+                      break;
-+              case 0x0501: /* VIA VT8501   - MVP4             */
-+              case 0x0597: /* VIA VT82C597 - VP3              */
-+              case 0x0598: /* VIA VT82C598 - MVP3             */
-+                      cs.ecc_cap = ECC_CORRECT;
-+                      break;
-+              case 0x0694: /* VIA VT82C694XDP - Apollo PRO133A smp */
-+                      dimmslots = 4;
-+              case 0x0691: /* VIA VT82C691 - Apollo PRO       */
-+                           /* VIA VT82C693A - Apollo Pro133 (rev 40?) */
-+                           /* VIA VT82C694X - Apollo Pro133A (rev 8x,Cx)
-+                              has 4 dimm slots */
-+              case 0x0693: /* VIA VT82C693 - Apollo PRO-Plus  */
-+                      bankshift = 24;
-+                      cs.ecc_cap = ECC_CORRECT;
-+                      break;
-+              case 0x0305: /* VIA VT8363   - KT133 - no ecc!! */
-+                           /* VIA VT8363A  - KT133A (rev 8) - no ecc!! */
-+                      bankshift = 24;
-+                      cs.ecc_cap = ECC_NONE;
-+                      break;
-+              case 0x0585: /* VIA VT82C585 - VP,VPX,VPX/97    */
-+              default:
-+                      cs.ecc_cap = ECC_NONE;
-+                      return;
-+      }
-+      ecc_ctrl = pci_byte(0x6E);
-+      cs.ecc_mode = (ecc_ctrl>>7)&1 ? cs.ecc_cap : ECC_NONE;
-+
-+      cs.check = generic_check;
-+      if (cs.ecc_mode != ECC_NONE) {
-+              cs.clear_err = clear_via_err;
-+              /* clear initial errors */
-+              cs.clear_err();
-+      }
-+      cs.MBE_flag_address = 0x6F;
-+      cs.MBE_flag_shift = 7;
-+      cs.MBE_flag_mask = 1;
-+      cs.MBE_row_shift = 4;
-+      cs.MBE_row_mask = 7;
-+      cs.SBE_flag_address = 0x6F;
-+      cs.SBE_flag_shift = 3;
-+      cs.SBE_flag_mask = 1;
-+      cs.SBE_row_shift = 0;
-+      cs.SBE_row_mask = 7;
-+
-+      for(loop=0;loop<6;loop++)
-+                bank[loop].endaddr = (unsigned long)pci_byte(0x5a+loop)<<bankshift;
-+      for(loop=0;loop<dimmslots;loop++)
-+      {
-+              bank[loop*2].mtype = m_mem[(pci_byte(0x60)>>(loop*2))&3];
-+              bank[(loop*2)+1].mtype = m_mem[(pci_byte(0x60)>>(loop*2))&3];
-+              bank[loop*2].eccmode = (ecc_ctrl>>(loop))&1;
-+              bank[(loop*2)+1].eccmode = (ecc_ctrl>>(loop))&1;
-+      }
-+}
-+
-+static void check_serverworks(void)
-+{
-+      unsigned long mesr;
-+      int row;
-+
-+      mesr = pci_dword(0x94); /* mesr0 */
-+      row = (int)(mesr>>29)&0x7;
-+      if((mesr>>31)&1)
-+      {
-+              mbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed |= 2;
-+              bank[row].mbecount++;
-+      }
-+      if((mesr>>30)&1)
-+      {
-+              sbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed |= 1;
-+              bank[row].sbecount++;
-+      }
-+      if (scrub_needed)
-+      {
-+              /*
-+               * clear error flag bits that were set by writing 1 to them
-+               * we hope the error was a fluke or something :)
-+               */
-+              unsigned long value = scrub_needed<<30;
-+              pci_write_config_dword(bridge, 0x94, value);
-+              scrub_needed = 0;
-+      }
-+
-+      mesr = pci_dword(0x98); /* mesr1 */
-+      row = (int)(mesr>>29)&0x7;
-+      if((mesr>>31)&1)
-+      {
-+              mbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed |= 2;
-+              bank[row].mbecount++;
-+      }
-+      if((mesr>>30)&1)
-+      {
-+              sbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed |= 1;
-+              bank[row].sbecount++;
-+      }
-+      if (scrub_needed)
-+      {
-+              /*
-+               * clear error flag bits that were set by writing 1 to them
-+               * we hope the error was a fluke or something :)
-+               */
-+              unsigned long value = scrub_needed<<30;
-+              pci_write_config_dword(bridge, 0x98, value);
-+              scrub_needed = 0;
-+        }
-+}
-+
-+static void probe_serverworks(void)
-+{
-+      int loop, efcr, mccr;
-+      switch (device) {
-+              case 0x0008: /* serverworks iii he */
-+              case 0x0009: /* serverworks iii le */
-+                      cs.ecc_cap = ECC_AUTO;
-+                      break;
-+              default:
-+                      cs.ecc_cap = ECC_NONE;
-+                      return;
-+      }
-+      efcr = pci_byte(0xE0);
-+      mccr = pci_word(0x92);
-+      cs.ecc_mode = (efcr>>2)&1 ? (mccr&1 ? ECC_AUTO : ECC_CORRECT) : ECC_NONE;
-+
-+      cs.check = check_serverworks;
-+
-+      for(loop=0;loop<8;loop++)
-+      {
-+              bank[loop].mtype = BANK_UNKNOWN;
-+              bank[loop].eccmode = cs.ecc_mode;
-+                bank[loop].endaddr = 0;
-+      }
-+}
-+
-+/*
-+ * 450gx probing is buggered at the moment. help me obi-wan.
-+ */
-+static void probe_450gx(void)
-+{
-+      int loop, dramc, merrcmd;
-+      u32 nbxcfg;
-+      int m_mem[] = { BANK_EDO, BANK_SDR, BANK_RDR, BANK_RESERVED };
-+/*    int ddim[] = { ECC_NONE, ECC_DETECT, ECC_CORRECT, ECC_AUTO }; */
-+      nbxcfg = pci_dword(0x50);
-+      dramc = pci_byte(0x57);
-+      merrcmd = pci_word(0xC0);
-+      for(loop=0;loop<8;loop++)
-+      {
-+              bank[loop].endaddr=(unsigned long)pci_byte(0x60+loop)<<23;
-+              /* 450gx doesnt allow mixing memory types. bleah. */
-+              bank[loop].mtype = m_mem[(dramc>>3)&3];
-+              /* yes, bit is _zero_ if ecc is _enabled_. */
-+              bank[loop].eccmode = !((nbxcfg>>(loop+24))&1);
-+      }
-+      cs.ecc_cap = ECC_AUTO;
-+      cs.ecc_mode = (merrcmd>>1)&1 ? ECC_AUTO : ECC_DETECT;
-+
-+        cs.check = generic_check;
-+        cs.MBE_flag_address = 0xC2;
-+        cs.MBE_flag_shift = 0;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+        cs.SBE_flag_address = 0xC2;
-+        cs.SBE_flag_shift = 1;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 1;
-+        cs.SBE_row_mask = 7;
-+
-+      cs.MBE_err_address1 = 0xA8;
-+      cs.MBE_err_shift1 = 0;
-+      cs.MBE_err_address2 = 0xAA;
-+      cs.MBE_err_shift2 = 16;
-+      cs.MBE_err_mask = 0xFFFFFFFC;
-+
-+      cs.SBE_err_address1 = 0x74;
-+      cs.SBE_err_shift1 = 0;
-+      cs.SBE_err_address2 = 0x76;
-+      cs.SBE_err_shift2 = 16;
-+      cs.SBE_err_mask = 0xFFFFFFFC;
-+}
-+
-+/* there seems to be NO WAY to distinguish 440zx from 440bx!! >B( */
-+static void probe_440bx(void)
-+{
-+      int loop, dramc, errcmd;
-+      u32 nbxcfg;
-+      int m_mem[] = { BANK_EDO, BANK_SDR, BANK_RDR, BANK_RESERVED };
-+      int ddim[] = { ECC_NONE, ECC_DETECT, ECC_CORRECT, ECC_AUTO };
-+      nbxcfg = pci_dword(0x50);
-+      dramc = pci_byte(0x57);
-+      errcmd = pci_byte(0x90);
-+      cs.ecc_cap = ECC_AUTO;
-+      cs.ecc_mode = ddim[(nbxcfg>>7)&3];
-+
-+        cs.check = generic_check;
-+        cs.MBE_flag_address = 0x91;
-+        cs.MBE_flag_shift = 4;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+        cs.SBE_flag_address = 0x91;
-+        cs.SBE_flag_shift = 0;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 1;
-+        cs.SBE_row_mask = 7;
-+
-+      cs.MBE_err_address1 = 80;
-+      cs.MBE_err_shift1 = 0;
-+      cs.MBE_err_address2 = 82;
-+      cs.MBE_err_shift2 = 16;
-+      cs.MBE_err_mask = 0xFFFFF000;
-+
-+      cs.SBE_err_address1 = 80;
-+      cs.SBE_err_shift1 = 0;
-+      cs.SBE_err_address2 = 82;
-+      cs.SBE_err_shift2 = 16;
-+      cs.SBE_err_mask = 0xFFFFF000;
-+
-+      for(loop=0;loop<8;loop++)
-+      {
-+              bank[loop].endaddr=(unsigned long)pci_byte(0x60+loop)<<23;
-+              /* 440bx doesnt allow mixing memory types. bleah. */
-+              bank[loop].mtype = m_mem[(dramc>>3)&3];
-+              /* yes, bit is _zero_ if ecc is _enabled_. */
-+              bank[loop].eccmode = !((nbxcfg>>(loop+24))&1);
-+      }
-+}
-+
-+/* no way to tell 440ex from 440lx!? grr. */
-+static void probe_440lx(void)
-+{
-+      int loop, drt, paccfg, errcmd;
-+      int m_mem[] = { BANK_EDO, BANK_RESERVED, BANK_SDR, BANK_EMPTY };
-+      int ddim[] = { ECC_NONE, ECC_DETECT, ECC_RESERVED, ECC_CORRECT } ;
-+      paccfg = pci_word(0x50);
-+      drt = pci_byte(0x55) | (pci_byte(0x56)<<8);
-+      errcmd = pci_byte(0x90);
-+      /* 440ex doesnt support ecc, but no way to tell if its 440ex! */
-+      cs.ecc_cap = ECC_CORRECT;
-+      cs.ecc_mode = ddim[(paccfg>>7)&3];
-+
-+        cs.check = generic_check;
-+        cs.MBE_flag_address = 0x91;
-+        cs.MBE_flag_shift = 4;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+        cs.SBE_flag_address = 0x91;
-+        cs.SBE_flag_shift = 0;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 1;
-+        cs.SBE_row_mask = 7;
-+
-+      for(loop=0;loop<8;loop++)
-+      {
-+              bank[loop].endaddr = (unsigned long)pci_byte(0x60+loop)<<23;
-+              bank[loop].mtype = m_mem[(drt>>(loop*2))&3];
-+              bank[loop].eccmode = (cs.ecc_mode != 0);
-+      }
-+}
-+
-+static void probe_440fx(void)
-+{
-+      int loop, drt, pmccfg, errcmd;
-+      int m_mem[] = { BANK_FPM, BANK_EDO, BANK_BEDO, BANK_EMPTY };
-+      int ddim[] = { ECC_NONE, ECC_PARITY, ECC_DETECT, ECC_CORRECT };
-+      pmccfg = pci_word(0x50);
-+      drt = pci_byte(0x55) | (pci_byte(0x56)<<8);
-+      errcmd = pci_byte(0x90);
-+      for(loop=0;loop<8;loop++)
-+      {
-+              bank[loop].endaddr=(unsigned long)pci_byte(0x60+loop)<<23;
-+              bank[loop].mtype = m_mem[(drt>>(loop*2))&3];
-+      }
-+      cs.ecc_cap = ECC_CORRECT;
-+      cs.ecc_mode = ddim[(pmccfg>>4)&3];
-+
-+        cs.check = generic_check;
-+        cs.MBE_flag_address = 0x91;
-+        cs.MBE_flag_shift = 4;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+        cs.SBE_flag_address = 0x91;
-+        cs.SBE_flag_shift = 0;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 1;
-+        cs.SBE_row_mask = 7;
-+}
-+
-+static void probe_430hx(void)
-+{
-+      int pcicmd, pcon, errcmd, drt, loop;
-+      pcicmd = pci_word(0x4);
-+      pcon = pci_byte(0x50);
-+      drt = pci_byte(0x68);
-+      errcmd = pci_byte(0x90);
-+      cs.ecc_cap = ECC_CORRECT;
-+      cs.ecc_mode = (pcon>>7)&1 ? ECC_CORRECT : ECC_PARITY;
-+
-+        cs.check = generic_check;
-+        cs.MBE_flag_address = 0x91;
-+        cs.MBE_flag_shift = 4;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+        cs.SBE_flag_address = 0x91;
-+        cs.SBE_flag_shift = 0;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 1;
-+        cs.SBE_row_mask = 7;
-+
-+      for(loop=0;loop<8;loop++)
-+      {
-+              bank[loop].endaddr=(unsigned long)pci_byte(0x60+loop)<<22;
-+              bank[loop].mtype = (drt>>loop)&1 ? BANK_EDO : BANK_FPM;
-+              bank[loop].eccmode = cs.ecc_mode;
-+      }
-+}
-+
-+static void check_840(void)
-+{
-+       int errsts = pci_word(0xE2);
-+       if ((errsts>>9) & 1)
-+       {
-+               u32 eap = pci_dword(0xE4) & 0xFFFFF800;
-+               mbe_printk("at memory address %lx\n row %d syndrome %x",
-+                       (long unsigned int)eap, find_row(eap), errsts&0xFF);
-+               scrub_needed = 2;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].mbecount++;
-+       }
-+       if ((errsts>>10) & 1)
-+       {
-+               u32 eap = pci_dword(0xE4) & 0xFFFFF800;
-+               sbe_printk("at memory address %lx row %d syndrome %x\n",
-+                       (long unsigned int)eap, find_row(eap), errsts&0xFF);
-+               scrub_needed = 1;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].sbecount++;
-+       }
-+}
-+
-+static void probe_840(void)
-+{
-+       int loop, mchcfg;
-+       int ddim[] = { ECC_NONE, ECC_RESERVED, ECC_CORRECT, ECC_AUTO };
-+       mchcfg = pci_word(0x50);
-+       cs.ecc_cap = ECC_AUTO;
-+       cs.ecc_mode = ddim[(mchcfg>>7)&3];
-+
-+       cs.check = check_840;
-+
-+       for(loop=0;loop<16;loop++)
-+       {
-+               bank[loop].endaddr=(unsigned long)pci_word(0x60+(loop*2))<<23;
-+               bank[loop].mtype = BANK_RMBS;
-+               bank[loop].eccmode = cs.ecc_mode;
-+       }
-+}
-+
-+static void check_845(void)
-+{
-+       int errsts = pci_word(0xC8);
-+       if ((errsts>>1) & 1)
-+       {
-+               u32 eap = (pci_dword(0x8C) & 0xFFFFFFFE)<<4;
-+               char derrsyn = pci_byte(0x86);
-+               mbe_printk("at memory address %lx\n row %d syndrome %x",
-+                       (long unsigned int)eap, find_row(eap), derrsyn);
-+               scrub_needed = 2;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].mbecount++;
-+       }
-+       if (errsts & 1)
-+       {
-+               u32 eap = (pci_dword(0x8C) & 0xFFFFFFFE)<<4;
-+               char derrsyn = pci_byte(0x86);
-+               sbe_printk("at memory address %lx row %d syndrome %x\n",
-+                       (long unsigned int)eap, find_row(eap), derrsyn);
-+               scrub_needed = 1;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].sbecount++;
-+       }
-+}
-+
-+static void probe_845(void)
-+{
-+       int loop;
-+       u32 drc;
-+       int ddim[] = { ECC_NONE, ECC_RESERVED, ECC_CORRECT, ECC_RESERVED };
-+       drc = pci_dword(0x7C);
-+       cs.ecc_cap = ECC_CORRECT;
-+       cs.ecc_mode = ddim[(drc>>19)&3];
-+
-+       cs.check = check_845;
-+
-+       for(loop=0;loop<8;loop++)
-+       {
-+               bank[loop].endaddr=(unsigned long)pci_byte(0x60+loop)<<24;
-+               bank[loop].mtype = BANK_SDR;
-+               bank[loop].eccmode = cs.ecc_mode;
-+       }
-+}
-+
-+static void check_850(void)
-+{
-+       int errsts = pci_word(0xC8);
-+       if ((errsts>>1) & 1)
-+       {
-+               u32 eap = pci_dword(0xE4) & 0xFFFFE000;
-+               char derrsyn = pci_word(0xE2) & 0x7F;
-+               mbe_printk("at memory address %lx\n row %d syndrome %x",
-+                       (long unsigned int)eap, find_row(eap), derrsyn);
-+               scrub_needed = 2;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].mbecount++;
-+       }
-+       if (errsts & 1)
-+       {
-+               u32 eap = pci_dword(0xE4) & 0xFFFFE000;
-+               char derrsyn = pci_byte(0xE2) & 0x7F;
-+               sbe_printk("at memory address %lx row %d syndrome %x\n",
-+                       (long unsigned int)eap, find_row(eap), derrsyn);
-+               scrub_needed = 1;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].sbecount++;
-+       }
-+}
-+
-+static void probe_850(void)
-+{
-+       int loop;
-+       int mchcfg;
-+       int ddim[] = { ECC_NONE, ECC_RESERVED, ECC_CORRECT, ECC_RESERVED };
-+       mchcfg = pci_word(0x50);
-+       cs.ecc_cap = ECC_CORRECT;
-+       cs.ecc_mode = ddim[(mchcfg>>7)&3];
-+
-+       cs.check = check_850;
-+
-+       for(loop=0;loop<16;loop++)
-+       {
-+               bank[loop].endaddr=(unsigned long)pci_word(0x60+(loop*2))<<23;
-+               bank[loop].mtype = BANK_RMBS;
-+               bank[loop].eccmode = cs.ecc_mode;
-+       }
-+}
-+
-+/* 860 specific error clearing */
-+static void clear_860_err(void)
-+{
-+       pci_write_bits8(0xc8,0x03,0x03);
-+       /* as scrubbing is unimplemented, we reset it here */
-+       scrub_needed = 0;
-+       cs.clear_err = 0;
-+}
-+
-+static void check_860(void)
-+{
-+       int errsts = pci_word(0xC8);
-+       if ((errsts>>1) & 1)
-+       {
-+               u32 eap = (pci_dword(0xE4) & 0xFFFFFE00)<<2;
-+               int channel = pci_dword(0xE4) & 1;
-+               unsigned char derrsyn = pci_word(0xE2) & 0xFF;
-+               mbe_printk("at memory address %08lx row %d syndrome %02x channel=%s\n",
-+                       (long unsigned int)eap, find_row(eap), derrsyn, channel==0?"A":"B");
-+               scrub_needed = 2;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].mbecount++;
-+               cs.clear_err = clear_860_err;
-+       }
-+       if (errsts & 1)
-+       {
-+             u32 eap = (pci_dword(0xE4) & 0xFFFFFE00)<<2;
-+               int channel = pci_dword(0xE4) & 1;
-+               unsigned char derrsyn = pci_byte(0xE2) & 0xFF;
-+               sbe_printk("at memory address %08lx row %d syndrome %02x channel=%s\n",
-+                       (long unsigned int)eap, find_row(eap), derrsyn, channel==0?"A":"B");
-+               scrub_needed = 1;
-+               scrub_row = find_row(eap);
-+               bank[scrub_row].sbecount++;
-+               cs.clear_err = clear_860_err;
-+       }
-+       /* 
-+        * We should catch other error bits, however we need to add code
-+        * to clear them if we want to continue on (otherwise we will report
-+        * the same error on every poll).  Having never seen other bits set
-+        * on our systems, just panic for now. -jg
-+        */
-+       if (errsts & 0xfc)
-+               panic("ECC: MCH ERRSTS register contains 0x%x\n", errsts);
-+}
-+
-+#if    I860_DUMPCONFIG
-+void info_860(void)
-+{
-+       int i;
-+
-+       printk("RDRAM Device Group Architecture Registers (16): \n");
-+       for (i = 0; i < 16; i++) {
-+               printk("GAR[%d]=%-2.2x ", i, pci_byte(0x40 + i));
-+               if ((i + 1) % 4 == 0)
-+                       printk("\n");
-+       }
-+       printk("MCH Configuration Register: MCHCFG=%-4.4x\n", pci_word(0x50));
-+       printk("Fixed DRAM Hole Control Register: FDHC=%-2.2x\n", 
-+                       pci_byte(0x58));
-+       printk("Programmable Attribute Map Registers (7):\n");
-+       for (i = 0; i < 7; i++) {
-+               printk("PAM[%d]=%-2.2x ", i, pci_byte(0x59 + i));
-+               if ((i + 1) % 4 == 0)
-+                       printk("\n");
-+       }
-+       printk("\n");
-+       printk("RDRAM Device Pool Sizing Register: RDPS=%-2.2x\n", 
-+                       pci_byte(0x88));
-+       printk("RDRAM Device Init Control Management Register: RICM=%-8.8x\n", 
-+                       pci_dword(0x94));
-+       printk("System Management RAM Control Register: SMRAM=%-2.2x\n",
-+                       pci_byte(0x9D));
-+       printk("Extended System Mgmt RAM Control Register: ESMRAMC=%-2.2x\n",
-+                       pci_byte(0x9E));
-+       printk("RDRAM Device Timing Register: RDTR=%-2.2x\n", pci_byte(0xBE));
-+       printk("Top of Low Memory Register: TOM=%-4.4x\n", pci_word(0xC4));
-+       printk("Error Command Register: ERRCMD=%-4.4x\n", pci_word(0xCA));
-+       printk("SMI Command Register: SCICMD=%-4.4x\n", pci_word(0xCC));
-+       printk("SCI Command Register: SCICMD=%-4.4x\n", pci_word(0xCE));
-+       printk("RDRAM Device Refresh Control Register: DRAMRC=%-4.4x\n",
-+                       pci_word(0xDC));
-+       printk("Misc. Control Register: MISC_CNTL=%-8.8x\n", pci_dword(0xF4));
-+       printk("PCI Command Register: PCICMD=%-4.4x\n", pci_word(0x04));
-+}
-+#else
-+void info_860(void)
-+{
-+       printk("ECC: Intel 860 MCH probed successfully\n");
-+}
-+#endif
-+
-+static void probe_860(void)
-+{
-+       int loop;
-+       u32 drc;
-+       int ddim[] = { ECC_NONE, ECC_RESERVED, ECC_CORRECT, ECC_RESERVED };
-+       drc = pci_word(0x50);
-+       cs.ecc_cap = ECC_CORRECT;
-+       cs.ecc_mode = ddim[(drc>>7)&3];
-+
-+       cs.check = check_860;
-+
-+       for(loop=0;loop<MAXBANKS;loop++)
-+       {
-+               bank[loop].endaddr=(unsigned long)pci_word(0x60+(loop*2))<<24;
-+               bank[loop].mtype = BANK_RMBS;
-+               bank[loop].eccmode = cs.ecc_mode;
-+               if (loop > 0) { /* find_bank assumes ascending addresses */
-+                       assert(bank[loop].endaddr >= bank[loop-1].endaddr);
-+       }
-+       }
-+       clear_860_err(); /* start off with a clean slate */
-+       info_860();
-+}
-+
-+static void check_amd751(void)
-+{
-+      int eccstat = pci_word(0x58);
-+        int csbits = eccstat & 0x3F;
-+        int row;
-+        switch (csbits)
-+      {
-+              case 1: row = 0; break;
-+              case 2: row = 1; break;
-+              case 4: row = 2; break;
-+              case 8: row = 3; break;
-+              case 16: row = 4; break;
-+              case 32: row = 5; break;
-+              default: row = 6;
-+      }
-+      if(((eccstat>>8)&3) == 1)
-+      {
-+              mbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed=2;
-+              bank[row].mbecount++;
-+      }
-+      if(((eccstat>>8)&3) == 2)
-+      {
-+              sbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed=1;
-+              bank[row].sbecount++;
-+      }
-+      if(((eccstat>>8)&3) == 3)
-+      {
-+              mbe_printk("and SBE Detected in DRAM row %d\n", row);
-+              scrub_needed=1;
-+              bank[row].sbecount++;
-+      }
-+      if (scrub_needed)
-+      {
-+              /*
-+               * clear error flag bits that were set by writing 0 to them
-+               * we hope the error was a fluke or something :)
-+               */
-+              int value = eccstat & 0xFCFF;
-+              pci_write_config_word(bridge, 0x58, value);
-+              scrub_needed = 0;
-+        }
-+}
-+
-+static void probe_amd751(void)
-+{
-+      int loop;
-+      cs.ecc_cap = ECC_CORRECT;
-+      cs.ecc_mode = (pci_byte(0x5a)>>2)&1 ? ECC_CORRECT : ECC_NONE;
-+      cs.check = check_amd751;
-+      for(loop=0;loop<6;loop++)
-+      {
-+              unsigned flag = pci_byte(0x40+loop*2);
-+              /* bank address mask. */
-+              unsigned mask = (flag&0x7F)>>1;
-+              /* actually starting address */
-+              bank[loop].endaddr=(unsigned long)(pci_word(0x40+loop*2)&0xFF80)<<(23-7);
-+              /* only when bank is populated */
-+              if((flag&1)&&(mask!=0)){
-+                      /* mask+1 * 8mb appears to be bank size */
-+                      bank[loop].endaddr += (mask + 1) * 8 * (1024 * 1024); /* -1? */
-+              }
-+              bank[loop].mtype = flag&1 ? BANK_SDR : BANK_EMPTY;
-+              /* no per-bank register, assumed same for all banks? */
-+              bank[loop].eccmode = (pci_byte(0x5a)>>2)&1;
-+      }
-+}
-+
-+static void check_amd76x(void)
-+{
-+      unsigned long eccstat = pci_dword(0x48);
-+      if(eccstat & 0x10)
-+      {
-+              /* bits 7-4 of eccstat indicate the row the MBE occurred. */
-+              int row = (eccstat >> 4) & 0xf;
-+              mbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed |= 2;
-+              bank[row].mbecount++;
-+      }
-+      if(eccstat & 0x20)
-+      {
-+              /* bits 3-0 of eccstat indicate the row the SBE occurred. */
-+              int row = eccstat & 0xf;
-+              sbe_printk("Detected in DRAM row %d\n", row);
-+              scrub_needed |= 1;
-+              bank[row].sbecount++;
-+      }
-+      if (scrub_needed)
-+      {
-+              /*
-+               * clear error flag bits that were set by writing 0 to them
-+               * we hope the error was a fluke or something :)
-+               */
-+              unsigned long value = eccstat;
-+              if (scrub_needed & 1)
-+                      value &= 0xFFFFFDFF;
-+              if (scrub_needed & 2)
-+                      value &= 0xFFFFFEFF;
-+              pci_write_config_dword(bridge, 0x48, value);
-+              scrub_needed = 0;
-+        }
-+}
-+
-+static void probe_amd76x(void)
-+{
-+      static const int modetab[] = {ECC_NONE, ECC_DETECT, ECC_CORRECT, ECC_AUTO};
-+      int loop;
-+      unsigned long addr = 0;
-+      cs.ecc_cap = ECC_AUTO;
-+      cs.ecc_mode = modetab [(pci_dword(0x48)>>10)&3];
-+      cs.check = check_amd76x;
-+
-+      /* create fake end addresses, as the chipset is capable of
-+         matching addresses to banks in random order */
-+      for(loop=0;loop<8;loop++)
-+      {
-+              unsigned long r = pci_dword(0xc0+(loop*4));
-+              bank[loop].mtype = r & 1 ? BANK_DDR : BANK_EMPTY;
-+              if (r & 1)
-+                      addr += ((r & 0xff80) << 16) + 0x800000;
-+              bank[loop].endaddr=addr;
-+              /* no per-bank register, assumed same for all banks? */
-+              bank[loop].eccmode = cs.ecc_mode != ECC_NONE;
-+      }
-+}
-+
-+/* SiS */
-+void probe_sis(void)
-+{
-+      int loop;
-+      u32 endaddr;
-+      int m_mem[] = { BANK_FPM, BANK_EDO, BANK_RESERVED, BANK_SDR };
-+      int dramsize[] = { 256, 1024, 4096, 16384, 1024, 2048, 4096,
-+              8192, 512, 1024, 2048, 0, 0, 0, 0, 0 };
-+      int sdramsize[] = { 1024, 4096, 4096, 8192, 2048, 8192,
-+              8192, 16384, 4096, 16384, 16384, 32768, 2048, 0, 0, 0 };
-+
-+      cs.ecc_cap = ECC_CORRECT;
-+
-+        cs.check = generic_check;
-+
-+        cs.MBE_flag_address = 0x64;
-+        cs.MBE_flag_shift = 4;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+
-+        cs.SBE_flag_address = 0x64;
-+        cs.SBE_flag_shift = 3;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 5;
-+        cs.SBE_row_mask = 7;
-+
-+      cs.MBE_err_address1 = 0x64;
-+      cs.MBE_err_shift1 = 0;
-+      cs.MBE_err_address2 = 0x66;
-+      cs.MBE_err_shift2 = 16;
-+      cs.MBE_err_mask = 0xFFFFF000;
-+
-+      cs.SBE_err_address1 = 0x64;
-+      cs.SBE_err_shift1 = 0;
-+      cs.SBE_err_address2 = 0x66;
-+      cs.SBE_err_shift2 = 16;
-+      cs.MBE_err_mask = 0xFFFFF000;
-+
-+      endaddr = 0;
-+      for(loop=0;loop<3;loop++)
-+      {
-+              /* populated bank? */
-+              if ((pci_byte(0x63)>>loop)&1)
-+              {
-+                      u32 banksize;
-+                      int mtype = pci_byte(0x60+loop);
-+
-+                      bank[loop*2].mtype = m_mem[(mtype>>6)&3];
-+                      if(bank[loop*2].mtype == BANK_SDR)
-+                      {
-+                              banksize = sdramsize[mtype&15]*1024;
-+                      } else {
-+                              banksize = dramsize[mtype&15]*1024;
-+                      }
-+                      endaddr += banksize;
-+                      bank[loop*2].endaddr = endaddr;
-+                      /* double sided dimm? */
-+                      if ((mtype>>5)&1)
-+                      {
-+                              bank[(loop*2)+1].mtype = bank[loop*2].mtype;
-+                              endaddr += banksize;
-+                              bank[(loop*2)+1].endaddr = endaddr;
-+                      }
-+              } else {
-+                      bank[loop*2].mtype = BANK_EMPTY;
-+                      bank[(loop*2)+1].mtype = BANK_EMPTY;
-+                      bank[loop*2].endaddr = endaddr;
-+                      bank[(loop*2)+1].endaddr = endaddr;
-+              }
-+      }
-+      cs.ecc_mode = ECC_NONE;
-+      for(loop=0;loop<6;loop++)
-+      {
-+              int eccmode = (pci_byte(0x74)>>loop)&1;
-+              bank[loop].eccmode = eccmode;
-+              if(eccmode)
-+                      cs.ecc_mode = ECC_CORRECT;
-+      }
-+}
-+
-+/* ALi */
-+void probe_aladdin4(void)
-+{
-+      int loop;
-+      int m_mem[] = { BANK_FPM, BANK_EDO, BANK_RESERVED, BANK_SDR };
-+      cs.ecc_cap = ECC_CORRECT;
-+      cs.ecc_mode = pci_byte(0x49)&1 ? ECC_CORRECT : ECC_PARITY;
-+
-+        cs.check = generic_check;
-+
-+        cs.MBE_flag_address = 0x4a;
-+        cs.MBE_flag_shift = 4;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+
-+        cs.SBE_flag_address = 0x4a;
-+        cs.SBE_flag_shift = 0;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 1;
-+        cs.SBE_row_mask = 7;
-+
-+      for(loop=0;loop<8;loop++)
-+      {
-+              bank[loop].endaddr = (unsigned long)(pci_byte(0x61+(loop*2))&15)<<27|(pci_byte(0x60+(loop*2))<<20);
-+              bank[loop].mtype = m_mem[(pci_byte(0x61+(loop*2))>>1)&3];
-+              if (cs.ecc_mode == ECC_CORRECT) {
-+                      bank[loop].eccmode = 1;
-+              } else {
-+                      bank[loop].eccmode = 0;
-+              }
-+      }
-+}
-+
-+void probe_aladdin5(void)
-+{
-+      int loop;
-+      int m_mem[] = { BANK_FPM, BANK_EDO, BANK_RDR, BANK_SDR };
-+      cs.ecc_cap = ECC_CORRECT;
-+      cs.ecc_mode = pci_byte(0x50)&1 ? ECC_CORRECT : ECC_PARITY;
-+
-+        cs.check = generic_check;
-+
-+        cs.MBE_flag_address = 0x51;
-+        cs.MBE_flag_shift = 4;
-+        cs.MBE_flag_mask = 1;
-+        cs.MBE_row_shift = 5;
-+        cs.MBE_row_mask = 7;
-+
-+        cs.SBE_flag_address = 0x51;
-+        cs.SBE_flag_shift = 0;
-+        cs.SBE_flag_mask = 1;
-+        cs.SBE_row_shift = 1;
-+        cs.SBE_row_mask = 7;
-+
-+      for(loop=0;loop<8;loop++)
-+      {
-+              /* DBxCII not disabled address mapping? */
-+              if(pci_byte(0x61+(loop*2))&0xF0)
-+              {
-+                      /* endaddr always 1 unit low, granularity 1mb */
-+                      bank[loop].endaddr = (unsigned long)((pci_byte(0x61+(loop*2))&15)<<27|(pci_byte(0x60+(loop*2))<<20))+1048576;
-+                      bank[loop].mtype = m_mem[(pci_byte(0x61+(loop*2))>>1)&3];
-+                      if (cs.ecc_mode == ECC_CORRECT) {
-+                              bank[loop].eccmode = 1;
-+                      } else {
-+                              bank[loop].eccmode = 0;
-+                      }
-+              }
-+      }
-+}
-+
-+#if 0
-+/*
-+ * memory scrubber routines, not ready to be used yet...
-+ */
-+/* start at 16mb */
-+unsigned long start = 4096;
-+unsigned long pages = 1;
-+/* other architectures have different page sizes... */
-+unsigned long step = 4096;
-+
-+char buff[8192] = {0,};
-+
-+/*
-+ * Michael's page scrubber routine
-+ */
-+void scrub_page(unsigned long volatile * p)
-+{
-+      int i;
-+      int len, err = 0;
-+      unsigned long *q;
-+      q = (unsigned long *) ((((int)buff)+4095) & ~4095);
-+
-+      if (((int)p) >= 640 * 1024 && ((int)p) < 1024 * 1024)
-+              return;
-+
-+      cli();  /* kill interrupts */
-+      err = pci_byte(0x91);
-+      outb(0x11, PCI_DATA + 1); /* clear the memory error indicator */
-+      
-+      for (i = 0; i < step / 4 ; ++i)
-+              q[i] = p[i];
-+      for (i = 0; i < step / 4 ; ++i)
-+              p[i] = q[i];
-+      err = inb(PCI_DATA + 1);
-+      sti();
-+      if (err & 0x11) {
-+              printk(KERN_ERR "ECC: Memory error @ %08x (0x%02x)\n", p, err);
-+              return 1;
-+      }
-+      return 0;
-+}
-+
-+void scrub(void)
-+{
-+      int i,j = 0;
-+      for (i = 0; i < pages; ++i) {
-+              j = scrub_page(start);
-+              start += step;
-+      }
-+      if (!j) {
-+              /*
-+               * Hmm... This is probably a very bad situation.
-+               */
-+              printk(KERN_ERR "ECC: Scrubbed, no errors found?!\n");
-+              scrub_needed=0;
-+              return;
-+      }
-+      if (scrub_needed==2) {
-+              /*
-+               * TODO: We should determine what process owns the memory
-+               * and send a SIGBUS to it. We should also printk something
-+               * along the lines of
-+               * "ECC: Process (PID) killed with SIGBUS due to uncorrectable memory error at 0xDEADBEEF"
-+               */
-+              scrub_needed=0;
-+      }
-+}
-+#endif
-+
-+int unload = 0;
-+/*
-+ * Check ECC status every second.
-+ * SMP safe, doesn't use NMI, and auto-rate-limits.
-+ */
-+void checkecc(void) {
-+        MOD_INC_USE_COUNT;
-+      if (!scrub_needed)
-+              if (cs.check)
-+                      cs.check();
-+      if (cs.clear_err)
-+              cs.clear_err();
-+      init_timer(&ecctimer);
-+      ecctimer.expires = jiffies + (HZ * poll_msec) / 1000;
-+      ecctimer.function = (void *)&checkecc;
-+      if (!unload)
-+              add_timer(&ecctimer);
-+      MOD_DEC_USE_COUNT;
-+}
-+
-+#ifdef CONFIG_PROC_FS
-+int procfile_read(char *memstat, char **buffer_location, off_t offset,
-+      int buffer_length, int *eof, void *data)
-+{
-+      char *ecc[] = { "None", "Reserved", "Parity checking", "ECC detection",
-+              "ECC detection and correction", "ECC with hardware scrubber" };
-+      char *dram[] = { "Empty", "Reserved", "Unknown", "FPM", "EDO", "BEDO", "SDR",
-+              "DDR", "RDR", "RMBS" };
-+      unsigned long mem_end = 0;
-+      unsigned long last_mem = 0;
-+      int loop;
-+      int len = 0;
-+
-+      if (offset)
-+              return 0;
-+
-+      len += sprintf(memstat, "Chipset ECC capability : %s\n", ecc[cs.ecc_cap]);
-+      len += sprintf(memstat + len, "Current ECC mode : %s\n", ecc[cs.ecc_mode]);
-+      len += sprintf(memstat + len, "Bank\tSize\tType\tECC\tSBE\tMBE\n");
-+      for (loop=0;loop<MAXBANKS;loop++){
-+              last_mem=bank[loop].endaddr;
-+              if (last_mem>mem_end) {
-+                      len += sprintf(memstat + len, "%d\t", loop);
-+                      len += sprintf(memstat + len, "%dM\t", (int)(last_mem-mem_end)/1048576);
-+                      len += sprintf(memstat + len, "%s\t", dram[bank[loop].mtype]);
-+                      len += sprintf(memstat + len, "%s\t", bank[loop].eccmode ? "Y" : "N");
-+                      len += sprintf(memstat + len, "%ld\t", (unsigned long)bank[loop].sbecount);
-+                      len += sprintf(memstat + len, "%ld\n", (unsigned long)bank[loop].mbecount);
-+                      mem_end=last_mem;
-+              }
-+      }
-+      len += sprintf(memstat + len, "Total\t%dM\n", (int)(mem_end>>20));
-+
-+      if (len <= buffer_length)
-+              *eof = 1;
-+      else
-+              len = buffer_length;
-+      return len;
-+}
-+#endif
-+
-+struct pci_probe_matrix {
-+      int vendor;             /* pci vendor id */
-+      int device;             /* pci device id */
-+      void (*check)(void);    /* pointer to chipset probing routine */
-+};
-+
-+static struct pci_probe_matrix probe_matrix[] = {
-+      /* AMD */
-+      { 0x1022, 0x7006, probe_amd751 },
-+      { 0x1022, 0x700c, probe_amd76x }, /* amd762 2 CPU */
-+      { 0x1022, 0x700e, probe_amd76x }, /* amd761 1 CPU */
-+      /* Motorola */
-+      { 0x1057, 0x4802, 0 }, /* falcon - not yet supported */
-+      /* Apple */
-+      { 0x106b, 0x0001, 0 }, /* bandit - not yet supported */
-+      /* SiS */
-+      { 0x1039, 0x0600, probe_sis }, /* 600 programatically same as 5600 */
-+      { 0x1039, 0x0620, 0 }, /* 620 doesnt support ecc */
-+      { 0x1039, 0x5600, probe_sis },
-+      /* ALi */
-+      { 0x10b9, 0x1531, probe_aladdin4 },
-+      { 0x10b9, 0x1541, probe_aladdin5 },
-+      /* VIA */
-+      { 0x1106, 0x0305, probe_via }, /* vt8363 - kt133/km133 */
-+      { 0x1106, 0x0391, probe_via }, /* vt8371 - kx133 */
-+      { 0x1106, 0x0501, probe_via }, /* vt8501 - mvp4 */
-+      { 0x1106, 0x0585, probe_via }, /* vt82c585 - vp/vpx */
-+      { 0x1106, 0x0595, probe_via }, /* vt82c595 - vp2 */
-+      { 0x1106, 0x0597, probe_via }, /* vt82c597 - vp3 */
-+      { 0x1106, 0x0598, probe_via }, /* vt82c598 - mvp3 */
-+      { 0x1106, 0x0691, probe_via }, /* vt82c691 - pro133/pro133a */
-+      { 0x1106, 0x0693, probe_via }, /* vt82c693 - pro+ */
-+      { 0x1106, 0x0694, probe_via }, /* vt82c694 - pro133a */
-+      /* Serverworks */
-+      { 0x1166, 0x0008, probe_serverworks }, /* CNB20HE - serverset iii he */
-+      { 0x1166, 0x0009, probe_serverworks }, /* serverset iii le */
-+      /* Intel */
-+      { 0x8086, 0x1130, 0 }, /* 815 doesnt support ecc */
-+      { 0x8086, 0x122d, 0 }, /* 430fx doesnt support ecc */
-+      { 0x8086, 0x1237, probe_440fx },
-+      { 0x8086, 0x1250, probe_430hx },
-+      { 0x8086, 0x1A21, probe_840 },
-+      { 0x8086, 0x1A30, probe_845 },
-+      { 0x8086, 0x2530, probe_850 },
-+      { 0x8086, 0x2531, probe_860 },
-+      { 0x8086, 0x7030, 0 }, /* 430vx doesnt support ecc */
-+      { 0x8086, 0x7120, 0 }, /* 810 doesnt support ecc */
-+      { 0x8086, 0x7122, 0 },
-+      { 0x8086, 0x7124, 0 }, /* 810e doesnt support ecc */
-+      { 0x8086, 0x7180, probe_440lx }, /* also 440ex */
-+      { 0x8086, 0x7190, probe_440bx }, /* also 440zx */
-+      { 0x8086, 0x7192, probe_440bx }, /* also 440zx */
-+      { 0x8086, 0x71A0, probe_440bx }, /* also 440gx */
-+      { 0x8086, 0x71A2, probe_440bx }, /* also 440gx */
-+      { 0x8086, 0x84C5, probe_450gx },
-+      { 0, 0, 0 }
-+};
-+
-+static int find_chipset(void) {
-+
-+      if (!pci_present()) {
-+              printk(KERN_ERR "ECC: No PCI bus.\n");
-+              return 0;
-+      }
-+
-+      while ((bridge = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, bridge)))
-+      {
-+              int loop = 0;
-+              /* Direct reading of the pci config space of these is not 
-+                 allowed in linux (eg it leaves no place for fixups and 
-+                 other items); so replacing the following two lines with 
-+                 those that follow immediately after it is a bugfix added by 
-+                 RH. - arjanv@redhat.com 3/26/2002
-+                pci_read_config_word(bridge, PCI_VENDOR_ID, &vendor);
-+                pci_read_config_word(bridge, PCI_DEVICE_ID, &device);
-+              */
-+              vendor = bridge->vendor;
-+              device = bridge->device;
-+              while(probe_matrix[loop].vendor)
-+              {
-+                      if( (vendor == probe_matrix[loop].vendor) &&
-+                          (device == probe_matrix[loop].device) )
-+                      {
-+                              if(probe_matrix[loop].check)
-+                              {
-+                                      probe_matrix[loop].check();
-+                                      return 1;
-+                              } else {
-+                                      printk(KERN_WARNING "ECC: Unsupported device %x:%x.\n", vendor, device);
-+                                      return 0;
-+                              }
-+                      }
-+                      loop++;
-+              }
-+              printk(KERN_DEBUG "ECC: Unknown device %x:%x.\n", vendor, device);
-+      }
-+      printk(KERN_ERR "ECC: Can't find host bridge.\n");
-+      return 0;
-+}
-+
-+static void ecc_fini(void) {
-+        unload = 1;
-+        wmb();
-+        del_timer_sync(&ecctimer);
-+#ifdef CONFIG_PROC_FS
-+      remove_proc_entry("ram", 0);
-+#endif
-+       if (ecc_sysctl_header) {
-+               unregister_sysctl_table(ecc_sysctl_header);
-+               ecc_sysctl_header = NULL;
-+       }
-+
-+       /* 
-+        * If we are expecting to find errors in the logs, we need notification
-+        * when the module is unloaded.
-+        */
-+       if (log_sbe || log_mbe || panic_on_mbe) {
-+               printk("ECC: Unloaded\n");
-+       }
-+}
-+
-+static int ecc_init(void) {
-+      int loop;
-+#ifdef CONFIG_PROC_FS
-+      struct proc_dir_entry *ent;
-+#endif
-+      printk(KERN_INFO "ECC: monitor version %s\n", ECC_VER);
-+
-+      for (loop=0;loop<MAXBANKS;loop++) {
-+              bank[loop].endaddr = 0;
-+              bank[loop].sbecount = 0;
-+              bank[loop].mbecount = 0;
-+              bank[loop].eccmode = 0;
-+              bank[loop].mtype = ECC_RESERVED;
-+      }
-+
-+       if (!find_chipset()) {
-+               printk("ECC: failed to find a supported memory controller\n");
-+              return -ENODEV;
-+       }
-+
-+#ifdef CONFIG_PROC_FS
-+      ent = create_proc_entry("ram", S_IFREG | S_IRUGO, 0);
-+      if (ent) {
-+              ent->nlink = 1;
-+              ent->read_proc = procfile_read;
-+      }
-+#endif
-+        ecc_sysctl_header = register_sysctl_table(ecc_root_table, 1);
-+
-+      init_timer(&ecctimer);
-+      ecctimer.expires = jiffies + (HZ * poll_msec) / 1000;
-+      ecctimer.function = (void *)&checkecc;
-+      add_timer(&ecctimer);
-+
-+      return 0; 
-+}
-+
-+#ifdef MODULE
-+int init_module(void) {
-+       return ecc_init();
-+}
-+void cleanup_module(void) {
-+       ecc_fini();
-+}
-+#ifdef MODULE_LICENSE
-+MODULE_LICENSE("GPL");
-+#endif
-+#endif
diff --git a/linux-2.4.20-irixnfs.patch b/linux-2.4.20-irixnfs.patch
deleted file mode 100644 (file)
index 697bee9..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-diff -urN linux-2.4.22.org/fs/nfs/dir.c linux-2.4.22/fs/nfs/dir.c
---- linux-2.4.22.org/fs/nfs/dir.c      2003-11-21 19:45:07.000000000 +0100
-+++ linux-2.4.22/fs/nfs/dir.c  2003-11-21 19:52:27.000000000 +0100
-@@ -34,6 +34,7 @@
- #define NFS_PARANOIA 1
- /* #define NFS_DEBUG_VERBOSE 1 */
-+static loff_t nfs_dir_llseek(struct file *, loff_t, int);
- static int nfs_readdir(struct file *, void *, filldir_t);
- static struct dentry *nfs_lookup(struct inode *, struct dentry *);
- static int nfs_create(struct inode *, struct dentry *, int);
-@@ -48,6 +49,7 @@
- static int nfs_fsync_dir(struct file *, struct dentry *, int);
- struct file_operations nfs_dir_operations = {
-+      llseek:         nfs_dir_llseek,
-       read:           generic_read_dir,
-       readdir:        nfs_readdir,
-       open:           nfs_open,
-@@ -74,6 +76,25 @@
-       removexattr:    nfs_removexattr,
- };
-+static loff_t nfs_dir_llseek(struct file *file, loff_t offset, int origin)
-+{
-+      switch (origin) {
-+              case 1:
-+                      if (offset == 0) {
-+                              offset = file->f_pos;
-+                              break;
-+                      }
-+              case 2:
-+                      return -EINVAL;
-+      }
-+      if (offset != file->f_pos) {
-+              file->f_pos = offset;
-+              file->f_reada = 0;
-+              file->f_version = ++event;
-+      }
-+      return (offset <= 0) ? 0 : offset;
-+}
-+
- typedef u32 * (*decode_dirent_t)(u32 *, struct nfs_entry *, int);
- typedef struct {
-       struct file     *file;
-diff -urN linux-2.4.22.org/fs/nfs/nfs2xdr.c linux-2.4.22/fs/nfs/nfs2xdr.c
---- linux-2.4.22.org/fs/nfs/nfs2xdr.c  2003-11-21 19:45:07.000000000 +0100
-+++ linux-2.4.22/fs/nfs/nfs2xdr.c      2003-11-21 19:52:27.000000000 +0100
-@@ -369,7 +369,7 @@
-               count = count >> 2;
-       p = xdr_encode_fhandle(p, args->fh);
--      *p++ = htonl(args->cookie);
-+      *p++ = htonl(args->cookie & 0xFFFFFFFF);
-       *p++ = htonl(count); /* see above */
-       req->rq_slen = xdr_adjust_iovec(req->rq_svec, p);
-@@ -466,7 +466,7 @@
-       entry->name       = (const char *) p;
-       p                += XDR_QUADLEN(entry->len);
-       entry->prev_cookie        = entry->cookie;
--      entry->cookie     = ntohl(*p++);
-+      entry->cookie     = (s64)((off_t)ntohl(*p++));
-       entry->eof        = !p[0] && p[1];
-       return p;
-diff -urN linux-2.4.22.org/fs/nfs/nfs3xdr.c linux-2.4.22/fs/nfs/nfs3xdr.c
---- linux-2.4.22.org/fs/nfs/nfs3xdr.c  2003-11-21 19:45:07.000000000 +0100
-+++ linux-2.4.22/fs/nfs/nfs3xdr.c      2003-11-21 19:52:52.000000000 +0100
-@@ -471,6 +471,13 @@
-       return 0;
- }
-+/* Hack to sign-extending 32-bit cookies */
-+static inline
-+u64 nfs_transform_cookie64(u64 cookie)
-+{
-+      return (cookie & 0x80000000) ? (cookie ^ 0xFFFFFFFF00000000) : cookie;
-+}
-+
- /*
-  * Encode arguments to readdir call
-  */
-@@ -482,7 +489,7 @@
-       u32 count = args->count;
-       p = xdr_encode_fhandle(p, args->fh);
--      p = xdr_encode_hyper(p, args->cookie);
-+      p = xdr_encode_hyper(p, nfs_transform_cookie64(args->cookie));
-       *p++ = args->verf[0];
-       *p++ = args->verf[1];
-       if (args->plus) {
-@@ -605,6 +612,8 @@
- u32 *
- nfs3_decode_dirent(u32 *p, struct nfs_entry *entry, int plus)
- {
-+      u64 cookie;
-+
-       if (!*p++) {
-               if (!*p)
-                       return ERR_PTR(-EAGAIN);
-@@ -617,7 +626,8 @@
-       entry->name = (const char *) p;
-       p += XDR_QUADLEN(entry->len);
-       entry->prev_cookie = entry->cookie;
--      p = xdr_decode_hyper(p, &entry->cookie);
-+      p = xdr_decode_hyper(p, &cookie);
-+      entry->cookie = nfs_transform_cookie64(cookie);
-       if (plus) {
-               struct nfs_fattr fattr;
diff --git a/linux-2.4.20-lvm-updates.patch b/linux-2.4.20-lvm-updates.patch
deleted file mode 100644 (file)
index 5279c18..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -urN linux.org/drivers/md/lvm-snap.c linux/drivers/md/lvm-snap.c
---- linux.org/drivers/md/lvm-snap.c    2003-11-21 18:22:24.000000000 +0100
-+++ linux/drivers/md/lvm-snap.c        2003-11-21 18:22:53.000000000 +0100
-@@ -120,6 +120,9 @@
-       lv_block_exception_t *ret;
-       int i = 0;
-+      if (!hash_table)
-+         BUG();
-+      
-       hash_table =
-           &hash_table[hashfn(org_dev, org_start, mask, chunk_size)];
-       ret = NULL;
diff --git a/linux-2.4.20-missing-license-tags.patch b/linux-2.4.20-missing-license-tags.patch
deleted file mode 100644 (file)
index 055f051..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-diff -urNp linux-10020/drivers/net/pcmcia/xircom_tulip_cb.c linux-10030/drivers/net/pcmcia/xircom_tulip_cb.c
---- linux-10020/drivers/net/pcmcia/xircom_tulip_cb.c   
-+++ linux-10030/drivers/net/pcmcia/xircom_tulip_cb.c   
-@@ -115,7 +115,7 @@ KERN_INFO " unofficial 2.4.x kernel port
- MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
- MODULE_DESCRIPTION("Xircom CBE-100 ethernet driver");
--MODULE_LICENSE("GPL v2");
-+MODULE_LICENSE("GPL");
- MODULE_PARM(debug, "i");
- MODULE_PARM(max_interrupt_work, "i");
-diff -Nur linux-2.4.19.org/drivers/net/3c523.c linux-2.4.19/drivers/net/3c523.c
---- linux-2.4.19.org/drivers/net/3c523.c       Mon Feb 25 20:37:59 2002
-+++ linux-2.4.19/drivers/net/3c523.c   Thu Nov  7 21:04:05 2002
-@@ -114,6 +114,10 @@
- #include "3c523.h"
-+MODULE_AUTHOR("");
-+MODULE_DESCRIPTION("net-3-driver for the 3c523 Etherlink/MC card (i82586 Ethernet chip)");
-+MODULE_LICENSE("GPL");
-+
- /*************************************************************************/
- #define DEBUG                 /* debug on */
- #define SYSBUSVAL 0           /* 1 = 8 Bit, 0 = 16 bit - 3c523 only does 16 bit */
-diff -Nur linux-2.4.19.org/drivers/net/tc35815.c linux-2.4.19/drivers/net/tc35815.c
---- linux-2.4.19.org/drivers/net/tc35815.c     Sat Aug  3 02:39:44 2002
-+++ linux-2.4.19/drivers/net/tc35815.c Thu Nov  7 21:15:50 2002
-@@ -64,6 +64,9 @@
- #include <linux/proc_fs.h>
- #include <asm/byteorder.h>
-+MODULE_AUTHOR("MontaVista Software, Inc. Based on skelton.c by Donald Becker.");
-+MODULE_DESCRIPTION("TOSHIBA TC35815CF PCI 10/100Mbps ethernet driver");
-+MODULE_LICENSE("GPL");
- /*
-  * The name of the card. Is used for messages and in the requests for
-diff -Nur linux-2.4.19.org/drivers/scsi/fd_mcs.c linux-2.4.19/drivers/scsi/fd_mcs.c
---- linux-2.4.19.org/drivers/scsi/fd_mcs.c     Sun Sep 30 21:26:07 2001
-+++ linux-2.4.19/drivers/scsi/fd_mcs.c Thu Nov  7 21:18:49 2002
-@@ -97,6 +97,9 @@
- #define DRIVER_VERSION "v0.2 by ZP Gu<zpg@castle.net>"
-   
-+MODULE_DESCRIPTION("Future Domain MCS 600/700 (or IBM OEM) driver");
-+MODULE_LICENSE("GPL");
-+
- /* START OF USER DEFINABLE OPTIONS */
- #define DEBUG            0    /* Enable debugging output */
-diff -Nur linux-2.4.19.org/drivers/scsi/ibmmca.c linux-2.4.19/drivers/scsi/ibmmca.c
---- linux-2.4.19.org/drivers/scsi/ibmmca.c     Wed May  2 01:05:00 2001
-+++ linux-2.4.19/drivers/scsi/ibmmca.c Thu Nov  7 21:19:45 2002
-@@ -38,6 +38,9 @@
- #include "ibmmca.h"
- #include <linux/config.h>
-+MODULE_DESCRIPTION("Low Level Linux Driver for the IBM Microchannel SCSI Subsystem");
-+MODULE_LICENSE("GPL");
-+
- /* current version of this driver-source: */
- #define IBMMCA_SCSI_DRIVER_VERSION "4.0b"
-diff -Nur linux-2.4.19.org/drivers/sound/rme96xx.c linux-2.4.19/drivers/sound/rme96xx.c
---- linux-2.4.19.org/drivers/sound/rme96xx.c   Sat Aug  3 02:39:44 2002
-+++ linux-2.4.19/drivers/sound/rme96xx.c       Thu Nov  7 21:04:05 2002
-@@ -66,7 +66,7 @@
- MODULE_AUTHOR("Guenter Geiger, geiger@debian.org");
- MODULE_DESCRIPTION("RME9652/36 \"Hammerfall\" Driver");
--/*MODULE_LICENSE("GPL");*/
-+MODULE_LICENSE("GPL");
- #ifdef DEBUG
-diff -Nur linux-2.4.19.org/drivers/video/pm3fb.c linux-2.4.19/drivers/video/pm3fb.c
---- linux-2.4.19.org/drivers/video/pm3fb.c     Sat Aug  3 02:39:45 2002
-+++ linux-2.4.19/drivers/video/pm3fb.c Thu Nov  7 21:04:05 2002
-@@ -3734,6 +3734,7 @@
- #ifdef MODULE
- MODULE_AUTHOR("Romain Dolbeau");
- MODULE_DESCRIPTION("Permedia3 framebuffer device driver");
-+MODULE_LICENSE("GPL");
- static char *mode[PM3_MAX_BOARD];
- MODULE_PARM(mode,PM3_MAX_BOARD_MODULE_ARRAY_STRING);
- MODULE_PARM_DESC(mode,"video mode");
-diff -Nur linux-2.4.19.org/net/ipv4/netfilter/ip_nat_talk.c linux-2.4.19/net/ipv4/netfilter/ip_nat_talk.c
---- linux-2.4.19.org/net/ipv4/netfilter/ip_nat_talk.c  Thu Nov  7 20:47:13 2002
-+++ linux-2.4.19/net/ipv4/netfilter/ip_nat_talk.c      Thu Nov  7 21:04:05 2002
-@@ -38,6 +38,7 @@
- static int ntalk2 = 1;
- MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
- MODULE_DESCRIPTION("talk network address translation module");
-+MODULE_LICENSE("GPL");
- #ifdef MODULE_PARM
- MODULE_PARM(talk, "i");
- MODULE_PARM_DESC(talk, "support (old) talk protocol");
-diff -Nur linux-2.4.19.org/net/ipv4/netfilter/ipt_POOL.c linux-2.4.19/net/ipv4/netfilter/ipt_POOL.c
---- linux-2.4.19.org/net/ipv4/netfilter/ipt_POOL.c     Thu Nov  7 20:45:14 2002
-+++ linux-2.4.19/net/ipv4/netfilter/ipt_POOL.c Thu Nov  7 21:24:31 2002
-@@ -22,6 +22,8 @@
- #include <linux/netfilter_ipv4/ip_nat_rule.h>
- #include <linux/netfilter_ipv4/ipt_pool.h>
-+MODULE_LICENSE("GPL");
-+
- #if 0
- #define DEBUGP printk
- #else
-diff -Nur linux-2.4.19.org/net/ipv4/netfilter/ipt_pool.c linux-2.4.19/net/ipv4/netfilter/ipt_pool.c
---- linux-2.4.19.org/net/ipv4/netfilter/ipt_pool.c     Thu Nov  7 20:45:14 2002
-+++ linux-2.4.19/net/ipv4/netfilter/ipt_pool.c Thu Nov  7 21:04:05 2002
-@@ -8,6 +8,8 @@
- #include <linux/netfilter_ipv4/ip_pool.h>
- #include <linux/netfilter_ipv4/ipt_pool.h>
-+MODULE_LICENSE("GPL");
-+
- static inline int match_pool(
-       ip_pool_t index,
-       __u32 addr,
-diff -Nur linux-2.4.19.org/net/ipv6/netfilter/ip6t_REJECT.c linux-2.4.19/net/ipv6/netfilter/ip6t_REJECT.c
---- linux-2.4.19.org/net/ipv6/netfilter/ip6t_REJECT.c  Thu Nov  7 20:44:03 2002
-+++ linux-2.4.19/net/ipv6/netfilter/ip6t_REJECT.c      Thu Nov  7 21:04:05 2002
-@@ -18,6 +18,8 @@
- #define DEBUGP(format, args...)
- #endif
-+MODULE_LICENSE("GPL");
-+
- #if 0
- /* Send RST reply */
- static void send_reset(struct sk_buff *oldskb)
-diff -Nur linux-2.4.19.org/net/ipv6/netfilter/ip6t_multiport.c linux-2.4.19/net/ipv6/netfilter/ip6t_multiport.c
---- linux-2.4.19.org/net/ipv6/netfilter/ip6t_multiport.c       Wed Oct 31 00:08:12 2001
-+++ linux-2.4.19/net/ipv6/netfilter/ip6t_multiport.c   Thu Nov  7 21:04:05 2002
-@@ -9,6 +9,8 @@
- #include <linux/netfilter_ipv6/ip6t_multiport.h>
- #include <linux/netfilter_ipv6/ip6_tables.h>
-+MODULE_LICENSE("GPL");
-+
- #if 0
- #define duprintf(format, args...) printk(format , ## args)
- #else
-diff -Nur linux-2.4.19.org/net/sched/sch_wrr.c linux-2.4.19/net/sched/sch_wrr.c
---- linux-2.4.19.org/net/sched/sch_wrr.c       Thu Nov  7 20:47:43 2002
-+++ linux-2.4.19/net/sched/sch_wrr.c   Thu Nov  7 21:26:32 2002
-@@ -113,6 +113,10 @@
- #include <linux/if_arp.h>
- #include <linux/version.h>
-+MODULE_AUTHOR("Christian Worm Mortensen, cworm@it-c.dk.");
-+MODULE_DESCRIPTION("Weighted Round Robin scheduler.");
-+MODULE_LICENSE("GPL");
-+
- // Kernel depend stuff:
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
-   #define KERNEL22
-diff -Nur linux-2.4.19.org/net/wanrouter/wanmain.c linux-2.4.19/net/wanrouter/wanmain.c
---- linux-2.4.19.org/net/wanrouter/wanmain.c   Wed Aug 15 10:22:18 2001
-+++ linux-2.4.19/net/wanrouter/wanmain.c       Thu Nov  7 21:27:04 2002
-@@ -55,6 +55,9 @@
- #include <asm/byteorder.h>    /* htons(), etc. */
- #include <linux/wanrouter.h>  /* WAN router API definitions */
-+MODULE_AUTHOR("Gideon Hack");
-+MODULE_DESCRIPTION("WAN Multiprotocol Router Module. Main code.");
-+MODULE_LICENSE("GPL");
- #if defined(LINUX_2_4)
-  #include <linux/vmalloc.h>   /* vmalloc, vfree */
---- linux/fs/quota_v1.c.org    Fri Apr 26 11:33:20 2002
-+++ linux/fs/quota_v1.c        Fri Apr 26 11:58:33 2002
-@@ -234,6 +234,10 @@
- EXPORT_NO_SYMBOLS;
-+MODULE_AUTHOR("");
-+MODULE_DESCRIPTION("QUOTA Version 1 support.");
-+MODULE_LICENSE("GPL");
-+
- module_init(init_v1_quota_format);
- module_exit(exit_v1_quota_format);
-diff -urN linux.org/net/unix/af_unix.c linux/net/unix/af_unix.c
---- linux.org/net/unix/af_unix.c       Sun May 19 02:49:28 2002
-+++ linux/net/unix/af_unix.c   Sun May 19 02:50:14 2002
-@@ -1880,6 +1880,9 @@
-       remove_proc_entry("net/unix", 0);
- }
-+MODULE_AUTHOR("Alan Cox");
-+MODULE_DESCRIPTION("Implementation of BSD Unix domain sockets.");
-+
- module_init(af_unix_init);
- module_exit(af_unix_exit);
---- linux-2.4.20/drivers/net/hamradio/soundmodem/sm.c.org      Wed Apr 18 23:40:05 2001
-+++ linux-2.4.20/drivers/net/hamradio/soundmodem/sm.c  Mon Dec 16 15:12:44 2002
-@@ -634,6 +634,7 @@
- MODULE_AUTHOR("Thomas M. Sailer, sailer@ife.ee.ethz.ch, hb9jnx@hb9w.che.eu");
- MODULE_DESCRIPTION("Soundcard amateur radio modem driver");
-+MODULE_LICENSE("GPL");
- /* --------------------------------------------------------------------- */
---- linux-2.4.20/drivers/net/wan/8253x/8253xini.c.org  Sat Aug  3 02:39:44 2002
-+++ linux-2.4.20/drivers/net/wan/8253x/8253xini.c      Mon Dec 16 15:36:42 2002
-@@ -3041,3 +3041,4 @@
- module_exit(auraXX20_cleanup);
- MODULE_DESCRIPTION("Aurora Multiport Multiprotocol Serial Driver");
- MODULE_AUTHOR("Joachim Martillo <martillo@telfordtools.com>");
-+MODULE_LICENSE("GPL");
---- linux-2.4.20/drivers/scsi/mca_53c9x.c.org  Thu Oct 25 22:53:51 2001
-+++ linux-2.4.20/drivers/scsi/mca_53c9x.c      Mon Dec 16 15:24:43 2002
-@@ -51,6 +51,11 @@
- #include <asm/pgtable.h>
-+#include <linux/module.h>
-+MODULE_DESCRIPTION("Driver for the SCSI adapter on NCR 35xx Microchannel machines");
-+MODULE_AUTHOR("unknown");
-+MODULE_LICENSE("GPL");
-+
- static int  dma_bytes_sent(struct NCR_ESP *, int);
- static int  dma_can_transfer(struct NCR_ESP *, Scsi_Cmnd *);
- static void dma_dump_state(struct NCR_ESP *);
---- linux-2.4.20/net/ipv4/netfilter/ipfwadm_core.c.org Mon Feb 25 20:38:14 2002
-+++ linux-2.4.20/net/ipv4/netfilter/ipfwadm_core.c     Mon Dec 16 15:27:52 2002
-@@ -130,6 +130,10 @@
- #include <linux/stat.h>
- #include <linux/version.h>
-+MODULE_AUTHOR("");
-+MODULE_DESCRIPTION("IP firewalling code");
-+MODULE_LICENSE("Dual BSD/GPL");
-+
- /*
-  *    Implement IP packet firewall
-  */
---- linux-2.4.20/net/ipv6/netfilter/ip6t_length.c.org  Fri Nov 29 00:53:15 2002
-+++ linux-2.4.20/net/ipv6/netfilter/ip6t_length.c      Mon Dec 16 15:31:08 2002
-@@ -5,6 +5,8 @@
- #include <linux/netfilter_ipv6/ip6t_length.h>
- #include <linux/netfilter_ipv6/ip6_tables.h>
-+MODULE_LICENSE("GPL");
-+
- static int
- match(const struct sk_buff *skb,
-       const struct net_device *in,
diff --git a/linux-2.4.20-pre1-nr_frags.patch b/linux-2.4.20-pre1-nr_frags.patch
deleted file mode 100644 (file)
index 3e5955e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urNp linux-2432/net/core/sock.c linux-2450/net/core/sock.c
---- linux-2432/net/core/sock.c 
-+++ linux-2450/net/core/sock.c 
-@@ -785,7 +785,6 @@ struct sk_buff *sock_alloc_send_pskb(str
-                               npages = (data_len + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
-                               skb->truesize += data_len;
--                              skb_shinfo(skb)->nr_frags = npages;
-                               for (i = 0; i < npages; i++) {
-                                       struct page *page;
-                                       skb_frag_t *frag;
-@@ -804,6 +803,9 @@ struct sk_buff *sock_alloc_send_pskb(str
-                                                     PAGE_SIZE :
-                                                     data_len);
-                                       data_len -= PAGE_SIZE;
-+
-+                                      /* frag[i] is now initialized */
-+                                      skb_shinfo(skb)->nr_frags = i + 1;
-                               }
-                               /* Full success... */
diff --git a/linux-2.4.20-serverworks.patch b/linux-2.4.20-serverworks.patch
deleted file mode 100644 (file)
index a29e90c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- ../kernel-2.4.20.orig/linux-2.4.20/drivers/pci/quirks.c    2003-01-27 16:58:29.000000000 -0500
-+++ linux-2.4.20/drivers/pci/quirks.c  2003-01-27 17:13:22.000000000 -0500
-@@ -615,6 +615,25 @@
-       }
- }
-+
-+static void __init quirk_serverworks_writeoverlap(struct pci_dev *dev)
-+{
-+      /* extended memory controller configuration register 0 */
-+      static const int emccr = 0xCD;
-+      static const u8 wovl = (1 << 1); /* Write Overlap Enable bit */
-+      u8 tmp;
-+
-+      /* this is multi-function PCI device, only apply fixup to function 0 */
-+      if (PCI_FUNC(dev->devfn))
-+              return;
-+
-+      pci_read_config_byte(dev, emccr, &tmp);
-+      if (tmp & wovl) {
-+              tmp &= ~wovl; /* clear Write Overlap Enable */
-+              pci_write_config_byte(dev, emccr, tmp);
-+      }
-+}
-+
- /*
-  *  The main table of quirks.
-  */
-@@ -661,6 +680,7 @@
-       { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_INTEL,    PCI_DEVICE_ID_INTEL_82371SB_2,  quirk_piix3_usb },
-       { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_INTEL,    PCI_DEVICE_ID_INTEL_82371AB_2,  quirk_piix3_usb },
-       { PCI_FIXUP_FINAL,      PCI_ANY_ID,             PCI_ANY_ID,                     quirk_cardbus_legacy },
-+      { PCI_FIXUP_FINAL,      PCI_VENDOR_ID_SERVERWORKS, 0x0014, quirk_serverworks_writeoverlap },
- #ifdef CONFIG_X86_IO_APIC 
-       { PCI_FIXUP_FINAL,      PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_82C686,       quirk_via_ioapic },
diff --git a/linux-2.4.21-agp-num_of_masks.patch b/linux-2.4.21-agp-num_of_masks.patch
deleted file mode 100644 (file)
index b7402ab..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- linux-2.4.21/drivers/char/agp/agpgart_be.c~        Mon Jun 30 19:05:11 2003
-+++ linux-2.4.21/drivers/char/agp/agpgart_be.c Mon Jun 30 19:36:34 2003
-@@ -4738,7 +4738,6 @@
- static int __init uninorth_setup (struct pci_dev *pdev)
- {
-       agp_bridge.masks = uninorth_masks;
--      agp_bridge.num_of_masks = 1;
-       agp_bridge.aperture_sizes = (void *)uninorth_sizes;
-       agp_bridge.size_type = U32_APER_SIZE;
-       agp_bridge.num_aperture_sizes = 4; //7;
diff --git a/linux-2.4.21-cpqfc.patch b/linux-2.4.21-cpqfc.patch
deleted file mode 100644 (file)
index 045eb8a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- linux-2.4.10-pre7/include/scsi/scsi.h      Fri Apr 27 13:59:19 2001
-+++ linux/include/scsi/scsi.h  Mon Sep 10 03:53:58 2001
-@@ -214,6 +214,12 @@
- /* Used to get the PCI location of a device */
- #define SCSI_IOCTL_GET_PCI 0x5387
-+/* Used to invoke Target Defice Reset for Fibre Channel */
-+#define SCSI_IOCTL_FC_TDR 0x5388
-+
-+/* Used to get Fibre Channel WWN and port_id from device */
-+#define SCSI_IOCTL_FC_TARGET_ADDRESS 0x5389
-+
- /*
-  * Overrides for Emacs so that we follow Linus's tabbing style.
-  * Emacs will notice this stuff at the end of the file and automatically
diff --git a/linux-2.4.21-hpt372-chicken-egg-hack.patch b/linux-2.4.21-hpt372-chicken-egg-hack.patch
deleted file mode 100644 (file)
index fd84e24..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
---- linux-2.4.21/drivers/ide/ide-disk.c~       Fri Jun 13 16:51:33 2003
-+++ linux-2.4.21/drivers/ide/ide-disk.c        Sun Jun 29 18:48:33 2003
-@@ -698,12 +698,9 @@
- {
-       ide_hwif_t *hwif        = HWIF(drive);
-       if (hwif->rw_disk)
--              return hwif->rw_disk(drive, rq, block);
--      else 
--              return __ide_do_rw_disk(drive, rq, block);
-+              hwif->rw_disk(drive, rq, block);
-+      return __ide_do_rw_disk(drive, rq, block);
- }
--
--EXPORT_SYMBOL_GPL(__ide_do_rw_disk);
- static int idedisk_open (struct inode *inode, struct file *filp, ide_drive_t *drive)
- {
---- linux-2.4.21/drivers/ide/pci/hpt366.c~     Sun Jun 29 15:09:43 2003
-+++ linux-2.4.21/drivers/ide/pci/hpt366.c      Sun Jun 29 18:50:33 2003
-@@ -742,7 +742,7 @@
-               hpt372n_set_clock(drive, wantclock);
-               HWIF(drive)->config_data = wantclock;
-       }
--      return __ide_do_rw_disk(drive, rq, block);
-+      return ide_started;
- }
- /*
diff --git a/linux-2.4.21-i2c-headers.patch b/linux-2.4.21-i2c-headers.patch
deleted file mode 100644 (file)
index 5cd24c2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- linux-2.4.21/drivers/i2c/scx200_acb.c~     Mon Aug 11 14:45:01 2003
-+++ linux-2.4.21/drivers/i2c/scx200_acb.c      Mon Aug 11 17:17:00 2003
-@@ -33,6 +33,7 @@
- #include <linux/i2c.h>
- #include <linux/smp_lock.h>
- #include <linux/pci.h>
-+#include <linux/slab.h>
- #include <asm/io.h>
- #include <linux/scx200.h>
diff --git a/linux-2.4.21-i2c-sparc64.patch b/linux-2.4.21-i2c-sparc64.patch
deleted file mode 100644 (file)
index 5381bbd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- linux-2.4.21/arch/sparc64/config.in.orig   2003-08-18 16:56:47.000000000 +0200
-+++ linux-2.4.21/arch/sparc64/config.in        2003-08-18 16:57:39.000000000 +0200
-@@ -271,6 +271,7 @@
- endmenu
- source drivers/input/Config.in
-+source drivers/i2c/Config.in
- source fs/Config.in
diff --git a/linux-2.4.21-irda-ibm.patch b/linux-2.4.21-irda-ibm.patch
deleted file mode 100644 (file)
index 133e575..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- drivers/net/irda/nsc-ircc.c.old    2003-08-13 01:01:56.000000000 +0200
-+++ drivers/net/irda/nsc-ircc.c        2003-08-13 01:03:25.000000000 +0200
-@@ -704,11 +704,12 @@
-                  driver_name, version);
-       /* Should be 0x2? */
-+#if 0
-       if (0x20 != (version & 0xf0)) {
-               ERROR("%s, Wrong chip version %02x\n", driver_name, version);
-               return -1;
-       }
--
-+#endif
-       /* Switch to advanced mode */
-       switch_bank(iobase, BANK2);
-       outb(ECR1_EXT_SL, iobase+ECR1);
diff --git a/linux-2.4.21-nfs-silly-rename.patch b/linux-2.4.21-nfs-silly-rename.patch
deleted file mode 100644 (file)
index 30cd183..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
---- linux-2.4.33/fs/namei.c.orig       2006-08-16 13:23:40.315971000 +0200
-+++ linux-2.4.33/fs/namei.c    2006-08-16 13:44:39.595971000 +0200
-@@ -1505,7 +1505,8 @@
-       double_up(&dir->i_zombie, &inode->i_zombie);
-       iput(inode);
--      if (!error) {
-+      /* We don't d_delete() NFS sillyrenamed files--they still exist. */
-+      if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
-               d_delete(dentry);
-               inode_dir_notify(dir, DN_DELETE);
-       }
-@@ -1851,6 +1852,11 @@
-              struct inode *new_dir, struct dentry *new_dentry)
- {
-       int error;
-+
-+      if (old_dentry->d_flags & DCACHE_NFSFS_RENAMED ||
-+          new_dentry->d_flags & DCACHE_NFSFS_RENAMED)
-+              return -EBUSY;
-+
-       if (S_ISDIR(old_dentry->d_inode->i_mode))
-               error = vfs_rename_dir(old_dir,old_dentry,new_dir,new_dentry);
-       else
diff --git a/linux-2.4.21-no-FPU.patch b/linux-2.4.21-no-FPU.patch
deleted file mode 100644 (file)
index 0ef5bab..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur linux-2.4.20/fs/davfs/proc.c linux-2.4.20.fpu/fs/davfs/proc.c
---- linux-2.4.20/fs/davfs/proc.c       Sun Mar  9 21:12:08 2003
-+++ linux-2.4.20.fpu/fs/davfs/proc.c   Sun Mar  9 21:05:33 2003
-@@ -156,7 +156,7 @@
- int dav_atoi(char *digit) {
-     int ret=0;
-     int i = (strlen(digit)-1);
--    double weight=1;
-+    unsigned int weight=1;
-     
-     for(;i;i--)
-         weight*=10;
diff --git a/linux-2.4.21-nousb.patch b/linux-2.4.21-nousb.patch
deleted file mode 100644 (file)
index 263b5a0..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-diff -urN linux-2.4.22.org/drivers/usb/host/ehci-hcd.c linux-2.4.22/drivers/usb/host/ehci-hcd.c
---- linux-2.4.22.org/drivers/usb/host/ehci-hcd.c       2003-11-21 19:50:57.000000000 +0100
-+++ linux-2.4.22/drivers/usb/host/ehci-hcd.c   2003-11-21 19:59:22.000000000 +0100
-@@ -1041,8 +1041,11 @@
- MODULE_AUTHOR (DRIVER_AUTHOR);
- MODULE_LICENSE ("GPL");
-+extern int disable_all_usb;
- static int __init init (void) 
- {
-+      if (disable_all_usb)
-+              return -ENODEV;
-       pr_debug ("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
-               hcd_name,
-               sizeof (struct ehci_qh), sizeof (struct ehci_qtd),
-diff -urN linux-2.4.22.org/drivers/usb/host/uhci.c linux-2.4.22/drivers/usb/host/uhci.c
---- linux-2.4.22.org/drivers/usb/host/uhci.c   2003-11-21 19:50:57.000000000 +0100
-+++ linux-2.4.22/drivers/usb/host/uhci.c       2003-11-21 19:59:22.000000000 +0100
-@@ -3099,10 +3099,14 @@
- #endif        /* PM */
- };
-+extern int disable_all_usb; 
-  
- static int __init uhci_hcd_init(void)
- {
-       int retval = -ENOMEM;
-+      
-+      if (disable_all_usb)
-+              return -ENODEV;
-       info(DRIVER_DESC " " DRIVER_VERSION);
-diff -urN linux-2.4.22.org/drivers/usb/host/usb-ohci.c linux-2.4.22/drivers/usb/host/usb-ohci.c
---- linux-2.4.22.org/drivers/usb/host/usb-ohci.c       2003-11-21 19:50:57.000000000 +0100
-+++ linux-2.4.22/drivers/usb/host/usb-ohci.c   2003-11-21 19:59:22.000000000 +0100
-@@ -2939,9 +2939,12 @@
-  
- /*-------------------------------------------------------------------------*/
-+extern int disable_all_usb;
- static int __init ohci_hcd_init (void) 
- {
-+      if (disable_all_usb)
-+              return -ENODEV;
-       return pci_module_init (&ohci_pci_driver);
- }
-diff -urN linux-2.4.22.org/drivers/usb/host/usb-uhci.c linux-2.4.22/drivers/usb/host/usb-uhci.c
---- linux-2.4.22.org/drivers/usb/host/usb-uhci.c       2003-11-21 19:50:57.000000000 +0100
-+++ linux-2.4.22/drivers/usb/host/usb-uhci.c   2003-11-21 19:59:22.000000000 +0100
-@@ -3092,10 +3092,14 @@
- };
- /*-------------------------------------------------------------------------*/
-+extern int disable_all_usb;
- static int __init uhci_hcd_init (void) 
- {
-       int retval;
-+      
-+      if (disable_all_usb)
-+              return -ENODEV;
- #ifdef DEBUG_SLAB
-       urb_priv_kmem = kmem_cache_create("urb_priv", sizeof(urb_priv_t), 0, SLAB_HWCACHE_ALIGN, NULL, NULL);
-diff -urN linux-2.4.22.org/init/main.c linux-2.4.22/init/main.c
---- linux-2.4.22.org/init/main.c       2003-11-21 19:45:09.000000000 +0100
-+++ linux-2.4.22/init/main.c   2003-11-21 19:59:22.000000000 +0100
-@@ -138,6 +138,15 @@
- __setup("profile=", profile_setup);
-+int disable_all_usb = 0;
-+static int __init no_usb(char * s)
-+{
-+      disable_all_usb = 1;
-+      return 1;
-+}
-+__setup("nousb", no_usb);
-+
-+
- static int __init checksetup(char *line)
- {
-       struct kernel_param *p;
-diff -urN linux-2.4.22.org/kernel/ksyms.c linux-2.4.22/kernel/ksyms.c
---- linux-2.4.22.org/kernel/ksyms.c    2003-11-21 19:45:09.000000000 +0100
-+++ linux-2.4.22/kernel/ksyms.c        2003-11-21 20:00:08.000000000 +0100
-@@ -530,6 +530,8 @@
- EXPORT_SYMBOL(seq_release);
- EXPORT_SYMBOL(seq_read);
- EXPORT_SYMBOL(seq_lseek);
-+extern int disable_all_usb;
-+EXPORT_SYMBOL(disable_all_usb);
- EXPORT_SYMBOL(single_open);
- EXPORT_SYMBOL(single_release);
- EXPORT_SYMBOL(seq_release_private);
-
diff --git a/linux-2.4.21-tru64nfs.patch b/linux-2.4.21-tru64nfs.patch
deleted file mode 100644 (file)
index 960220b..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -u -N -r linux.orig/fs/nfs/inode.c linux.nfs/fs/nfs/inode.c
---- linux.orig/fs/nfs/inode.c  Tue Feb 13 19:14:28 2001
-+++ linux.nfs/fs/nfs/inode.c   Fri Mar  9 10:58:47 2001
-@@ -548,6 +548,22 @@
-       nfs_zap_caches(inode);
- }
-+/* This kludge (of Lance's) converts 16bit DUNIX device numbers
-+ * into 8-bit Linux ones.
-+ */
-+static u32
-+do_that_magic(u32 rdev)
-+{
-+    if (((rdev & 0xffff0000) != 0) &&
-+        ((rdev & 0x0ff000ff) == rdev)) {
-+        u32 tmp ;
-+        tmp = ((rdev & 0x0ff00000) >> 12) | (rdev & 0xff) ;
-+        //printk("doing that magic!! %08x -> %08x\n", rdev, tmp) ;
-+        rdev = tmp ;
-+    }
-+    return rdev ;
-+}
-+
- /*
-  * Fill in inode information from the fattr.
-  */
-@@ -575,7 +591,7 @@
-                       inode->i_op = &nfs_symlink_inode_operations;
-               else {
-                       inode->i_op = &nfs_special_inode_operations;
--                      init_special_inode(inode, inode->i_mode, fattr->rdev);
-+                      init_special_inode(inode, inode->i_mode, do_that_magic(fattr->rdev));
-               }
-               memcpy(&inode->u.nfs_i.fh, fh, sizeof(inode->u.nfs_i.fh));
-       }
-@@ -1010,7 +1026,7 @@
-       }
-       inode->i_rdev = 0;
-       if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
--              inode->i_rdev = to_kdev_t(fattr->rdev);
-+              inode->i_rdev = to_kdev_t(do_that_magic(fattr->rdev));
-  
-       /* Update attrtimeo value */
-       if (!invalid && time_after(jiffies, NFS_ATTRTIMEO_UPDATE(inode)+NFS_ATTRTIMEO(inode))) {
-diff -u -N -r linux.orig/fs/nfs/mount_clnt.c linux.nfs/fs/nfs/mount_clnt.c
---- linux.orig/fs/nfs/mount_clnt.c     Thu Apr 13 10:54:19 2000
-+++ linux.nfs/fs/nfs/mount_clnt.c      Fri Mar  9 10:58:47 2001
-@@ -87,7 +87,7 @@
-       clnt = rpc_create_client(xprt, hostname,
-                               &mnt_program, version,
--                              RPC_AUTH_NULL);
-+                              RPC_AUTH_UNIX);
-       if (!clnt) {
-               xprt_destroy(xprt);
-       } else {
-diff -u -N -r linux.orig/fs/nfs/proc.c linux.nfs/fs/nfs/proc.c
---- linux.orig/fs/nfs/proc.c   Fri Feb  9 14:29:44 2001
-+++ linux.nfs/fs/nfs/proc.c    Mon Apr 30 16:54:48 2001
-@@ -181,6 +181,10 @@
-       return status;
- }
-+/* convert Linux major/minor number into Tru64 major/minor */
-+#define linux2tru64(rdev) \
-+        (MAJOR((rdev))<<20 | MINOR((rdev)))
-+
- /*
-  * In NFSv2, mknod is grafted onto the create call.
-  */
-@@ -201,7 +205,7 @@
-               sattr->ia_valid &= ~ATTR_SIZE;
-       } else if (S_ISCHR(mode) || S_ISBLK(mode)) {
-               sattr->ia_valid |= ATTR_SIZE;
--              sattr->ia_size   = rdev;        /* get out your barf bag */
-+              sattr->ia_size   = linux2tru64(rdev);   /* get out your barf bag */
-       }
-       fattr->valid = 0;
diff --git a/linux-2.4.22-andrea-9980_fix-pausing-6.patch b/linux-2.4.22-andrea-9980_fix-pausing-6.patch
deleted file mode 100644 (file)
index c7146b3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -urNp --exclude CVS --exclude BitKeeper x-ref/drivers/block/ll_rw_blk.c x/drivers/block/ll_rw_blk.c
---- x-ref/drivers/block/ll_rw_blk.c    2003-07-17 05:23:59.000000000 +0200
-+++ x/drivers/block/ll_rw_blk.c        2003-07-17 05:29:00.000000000 +0200
-@@ -1263,7 +1263,7 @@ void __submit_bh(int rw, struct buffer_h
-       /* fix race condition with wait_on_buffer() */
-       smp_mb(); /* spin_unlock may have inclusive semantics */
-       if (waitqueue_active(&bh->b_wait))
--              wake_up(&bh->b_wait);
-+              run_task_queue(&tq_disk);
-       put_bh(bh);
-       switch (rw) {
-diff -urNp --exclude CVS --exclude BitKeeper x-ref/mm/filemap.c x/mm/filemap.c
---- x-ref/mm/filemap.c 2003-07-17 05:23:58.000000000 +0200
-+++ x/mm/filemap.c     2003-07-17 05:29:35.000000000 +0200
-@@ -788,7 +788,7 @@ void wakeup_page_waiters(struct page * p
-       head = page_waitqueue(page);
-       if (waitqueue_active(head))
--              wake_up(head);
-+              sync_page(page);
- }
- /* 
-diff -urNp --exclude CVS --exclude BitKeeper x-ref/mm/swapfile.c x/mm/swapfile.c
---- x-ref/mm/swapfile.c        2003-07-17 05:23:58.000000000 +0200
-+++ x/mm/swapfile.c    2003-07-17 05:24:00.000000000 +0200
-@@ -997,8 +997,10 @@ asmlinkage long sys_swapon(const char * 
-               goto bad_swap;
-       }
-+      get_page(virt_to_page(swap_header));
-       lock_page(virt_to_page(swap_header));
-       rw_swap_page_nolock(READ, SWP_ENTRY(type,0), (char *) swap_header);
-+      put_page(virt_to_page(swap_header));
-       if (!memcmp("SWAP-SPACE",swap_header->magic.magic,10))
-               swap_header_version = 1;
diff --git a/linux-2.4.22-gcc33-inline.patch b/linux-2.4.22-gcc33-inline.patch
deleted file mode 100644 (file)
index f0cc862..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-On 06.27, Marcelo Tosatti wrote:
-> 
-> Hello,
-> 
-> Here goes -pre2 with a big number of changes, including the new aic7xxx
-> driver.
-> 
-> I wont accept any big changes after -pre4: I want 2.4.22 timecycle to be
-> short.
-> 
-
-This fixes inlining (really, not-inlining) with gcc3. How about next -pre ?
-
---- 25/include/linux/compiler.h~gcc3-inline-fix        2003-03-06 03:02:43.000000000 -0800
-+++ 25-akpm/include/linux/compiler.h   2003-03-06 03:11:42.000000000 -0800
-@@ -1,6 +1,13 @@
- #ifndef __LINUX_COMPILER_H
- #define __LINUX_COMPILER_H
-+#if __GNUC__ >= 3
-+#define inline                __inline__ __attribute__((always_inline))
-+#define inline__      __inline__ __attribute__((always_inline))
-+#define __inline      __inline__ __attribute__((always_inline))
-+#define __inline__    __inline__ __attribute__((always_inline))
-+#endif
-+
- /* Somewhere in the middle of the GCC 2.96 development cycle, we implemented
-    a mechanism by which the user can annotate likely branch directions and
-    expect the blocks to be reordered appropriately.  Define __builtin_expect
-
-
-
--- 
-J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
-werewolf.able.es                         \           It's better when it's free
-Mandrake Linux release 9.2 (Cooker) for i586
-Linux 2.4.21-jam1 (gcc 3.3 (Mandrake Linux 9.2 3.3-2mdk))
--
-To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at  http://vger.kernel.org/majordomo-info.html
-Please read the FAQ at  http://www.tux.org/lkml/
diff --git a/linux-2.4.22-ppc-amd8111e.patch b/linux-2.4.22-ppc-amd8111e.patch
deleted file mode 100644 (file)
index c6f20a6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- linux-2.4.22/drivers/net/amd8111e.h~       Thu Sep 25 16:00:55 2003
-+++ linux-2.4.22/drivers/net/amd8111e.h        Thu Sep 25 16:02:48 2003
-@@ -249,7 +249,7 @@
-       /* VAL3 */
-       CONDUIT_MODE            = (1 << 29),
-       /* VAL2 */
--      RPA                     = (1 << 19),
-+      xRPA                    = (1 << 19),
-       DRCVPA                  = (1 << 18),
-       DRCVBC                  = (1 << 17),
-       PROM                    = (1 << 16),
diff --git a/linux-2.4.22-tun-new-style.patch b/linux-2.4.22-tun-new-style.patch
deleted file mode 100644 (file)
index 711d7e7..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-
-  "new style" netdevice allocation patch for TUN driver (2.4.18 kernel)
-
-From: Jacek Konieczny (jajcus@pld.org.pl)
-Date: Thu Aug 01 2002 - 08:35:06 EST
-
-I had a lot of problem with tun devices created with both openvpn and
-vtund. When I wanted to shut down my system when the devices were in
-use (eg. TCP connection established on tun0 interface), even if the
-tunneling daemon was killed, it stopped while trying to deconfigure
-network. And "unregister_netdevice: waiting for tun0 to become free"
-message was displayed again and again. I tried to resolve this problem
-using Google, but I have only found out, that this is behaviour of 2.4
-kernels, and that it is proper. After further investigation, in kernel
-sources, I found out, that there are "old style" and "new style" network
-devices, and that only the "old style" devices have this problem.
-I had similar problem with VLAN devices some time ago, so I checked VLAN
-driver sources too. As I suspected, it was "new style" device now.
-The patch below is my try to make tun device "new style" too. It seems
-to work for me, but I am not sure if it is 100% proper. This is patch
-against 2.4.18 sources.
-
-Sorry, for spamming all those addresses, but I am not sure which one is
-correct. Driver on URL given in MAINTAINERS file seems to be a bit
-outdated.
-
-Greets,
-        Jacek
-
-diff -ur linux-2.4.22-up/drivers/net/tun.c linux-2.4.22-tun/drivers/net/tun.c
---- linux-2.4.22-up/drivers/net/tun.c  Sat Aug  3 02:39:44 2002
-+++ linux-2.4.22-tun/drivers/net/tun.c Sun Sep 21 00:08:08 2003
-@@ -20,6 +20,14 @@
-  *    Modifications for 2.3.99-pre5 kernel.
-  */
-+/*
-+ * 01.08.2002
-+ * Jacek Konieczny <jajcus@pld.org.pl>
-+ * Modifications for "new style" device allocation
-+ * (fixes "wating for tunX to become free" problem)
-+ */
-+
-+
- #define TUN_VER "1.5"
- #include <linux/config.h>
-@@ -159,6 +167,17 @@
-       return 0;
- }
-+void tun_net_destruct(struct net_device *dev)
-+{
-+      if (dev) {
-+              if (dev->priv) {
-+                      kfree(dev->priv);
-+                      dev->priv=NULL;
-+                      MOD_DEC_USE_COUNT;
-+              }
-+      }
-+}
-+
- /* Character device part */
- /* Poll */
-@@ -202,14 +221,14 @@
-       skb_reserve(skb, 2);
-       memcpy_fromiovec(skb_put(skb, len), iv, len);
--      skb->dev = &tun->dev;
-+      skb->dev = tun->dev;
-       switch (tun->flags & TUN_TYPE_MASK) {
-       case TUN_TUN_DEV:
-               skb->mac.raw = skb->data;
-               skb->protocol = pi.proto;
-               break;
-       case TUN_TAP_DEV:
--              skb->protocol = eth_type_trans(skb, &tun->dev);
-+              skb->protocol = eth_type_trans(skb, tun->dev);
-               break;
-       };
-@@ -326,7 +345,7 @@
-                       schedule();
-                       continue;
-               }
--              netif_start_queue(&tun->dev);
-+              netif_start_queue(tun->dev);
-               ret = tun_put_user(tun, skb, (struct iovec *) iv, len);
-@@ -378,8 +397,6 @@
-               init_waitqueue_head(&tun->read_wait);
-               tun->owner = -1;
--              tun->dev.init = tun_net_init;
--              tun->dev.priv = tun;
-               err = -EINVAL;
-@@ -398,18 +415,24 @@
-               if (*ifr->ifr_name)
-                       name = ifr->ifr_name;
--              if ((err = dev_alloc_name(&tun->dev, name)) < 0)
-+              dev = dev_alloc(name, &err);
-+              if (!dev)
-                       goto failed;
--              if ((err = register_netdevice(&tun->dev)))
-+
-+              tun->dev=dev;
-+              dev->init = tun_net_init;
-+              dev->priv = tun;
-+              dev->destructor = tun_net_destruct;
-+              dev->features |= NETIF_F_DYNALLOC;
-+              tun->name = dev->name;
-+
-+              err=register_netdevice(dev);
-+              if (err<0)
-                       goto failed;
--      
--              MOD_INC_USE_COUNT;
--              tun->name = tun->dev.name;
-+              MOD_INC_USE_COUNT;
-       }
--      DBG(KERN_INFO "%s: tun_set_iff\n", tun->name);
--
-       if (ifr->ifr_flags & IFF_NO_PI)
-               tun->flags |= TUN_NO_PI;
-@@ -423,6 +446,7 @@
-       return 0;
- failed:
-+      kfree(dev);
-       kfree(tun);
-       return err;
- }
-@@ -553,10 +577,8 @@
-       skb_queue_purge(&tun->readq);
-       if (!(tun->flags & TUN_PERSIST)) {
--              dev_close(&tun->dev);
--              unregister_netdevice(&tun->dev);
--              kfree(tun);
--              MOD_DEC_USE_COUNT;
-+              dev_close(tun->dev);
-+              unregister_netdevice(tun->dev);
-       }
-       rtnl_unlock();
-diff -ur linux-2.4.22-up/include/linux/if_tun.h linux-2.4.22-tun/include/linux/if_tun.h
---- linux-2.4.22-up/include/linux/if_tun.h     Tue Jun 12 04:15:27 2001
-+++ linux-2.4.22-tun/include/linux/if_tun.h    Sun Sep 21 00:08:08 2003
-@@ -40,7 +40,7 @@
-       wait_queue_head_t       read_wait;
-       struct sk_buff_head     readq;
--      struct net_device       dev;
-+      struct net_device       *dev;
-       struct net_device_stats stats;
-       struct fasync_struct    *fasync;
diff --git a/linux-2.4.23-ppc-symbols.patch b/linux-2.4.23-ppc-symbols.patch
deleted file mode 100644 (file)
index 9db5da1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urN linux-2.4.22.org/arch/ppc/mm/init.c linux-2.4.22/arch/ppc/mm/init.c
---- linux-2.4.22.org/arch/ppc/mm/init.c        2003-11-24 19:16:20.000000000 +0100
-+++ linux-2.4.22/arch/ppc/mm/init.c    2003-11-24 19:17:12.000000000 +0100
-@@ -70,6 +70,7 @@
- #endif
- unsigned long vmalloc_start;
-+EXPORT_SYMBOL(vmalloc_start);
- mmu_gather_t mmu_gathers[NR_CPUS];
diff --git a/linux-2.4.25-change-imq_with_nat.patch b/linux-2.4.25-change-imq_with_nat.patch
deleted file mode 100644 (file)
index 442d778..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---- linux-2.4.25.orig/drivers/net/imq.c        Mon Mar 22 01:19:20 2004
-+++ linux-2.4.25/drivers/net/imq.c     Mon Mar 22 01:31:26 2004
-@@ -38,7 +38,7 @@
-       imq_nf_hook,
-       PF_INET,
-       NF_IP_PRE_ROUTING,
--      NF_IP_PRI_MANGLE + 1
-+      NF_IP_PRI_NAT_DST + 1
- };
- static struct nf_hook_ops imq_egress_ipv4 = {
-@@ -55,7 +55,7 @@
-       imq_nf_hook,
-       PF_INET6,
-       NF_IP6_PRE_ROUTING,
--      NF_IP6_PRI_MANGLE + 1
-+      NF_IP_PRI_NAT_DST + 1
- };
- static struct nf_hook_ops imq_egress_ipv6 = {
diff --git a/linux-2.4.25-intermezzo-acl.patch b/linux-2.4.25-intermezzo-acl.patch
deleted file mode 100644 (file)
index 194837f..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -urN linux-2.4.24.org/fs/intermezzo/vfs.c linux-2.4.24/fs/intermezzo/vfs.c
---- linux-2.4.24.org/fs/intermezzo/vfs.c       2004-01-18 16:55:22.382895163 +0100
-+++ linux-2.4.24/fs/intermezzo/vfs.c   2004-01-18 16:56:21.407533002 +0100
-@@ -74,7 +74,7 @@
- #ifdef CONFIG_FS_EXT_ATTR
- # include <linux/ext_attr.h>
--#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL
-+#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL && 0
- #  include <linux/posix_acl.h>
- # endif
- #endif
-@@ -466,7 +466,7 @@
-         struct dentry *dentry;
-         struct presto_file_set *fset;
-         int error;
--#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL
-+#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL && 0
-         int (*set_posix_acl)(struct inode *, int type, posix_acl_t *)=NULL;
- #endif
-@@ -507,7 +507,7 @@
-                                  (dentry->d_inode->i_mode & ~S_IALLUGO);
-                 CDEBUG(D_PIOCTL, "chmod: orig %#o, set %#o, result %#o\n",
-                        dentry->d_inode->i_mode, set_mode, iattr->ia_mode);
--#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL
-+#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL && 0
-                 /* ACl code interacts badly with setattr 
-                  * since it tries to modify the ACL using 
-                  * set_ext_attr which recurses back into presto.  
-@@ -535,7 +535,7 @@
-                 }
-         }
--#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL
-+#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL && 0
-         /* restore the inode_operations if we changed them*/
-         if (iattr->ia_valid & ATTR_MODE) 
-                 dentry->d_inode->i_op->set_posix_acl=set_posix_acl;
-@@ -2271,7 +2271,7 @@
- #ifdef CONFIG_FS_EXT_ATTR
--#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL
-+#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL && 0
- /* Posix ACL code changes i_mode without using a notify_change (or
-  * a mark_inode_dirty!). We need to duplicate this at the reintegrator
-  * which is done by this function. This function also takes care of 
-@@ -2414,7 +2414,7 @@
-                 goto exit;
-         }
--#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL
-+#ifdef CONFIG_INTERMEZZO_FS_POSIX_ACL && 0
-         /* Reset mode if specified*/
-         /* XXX: when we do native acl support, move this code out! */
-         if (mode != NULL) {
diff --git a/linux-2.4.25-sched-O1.patch b/linux-2.4.25-sched-O1.patch
deleted file mode 100644 (file)
index f108339..0000000
+++ /dev/null
@@ -1,9837 +0,0 @@
-diff -urN linux-2.4.24.org/arch/alpha/kernel/entry.S linux-2.4.24/arch/alpha/kernel/entry.S
---- linux-2.4.24.org/arch/alpha/kernel/entry.S 2004-02-04 20:50:50.273627588 +0100
-+++ linux-2.4.24/arch/alpha/kernel/entry.S     2004-02-04 20:52:52.801142450 +0100
-@@ -695,7 +695,9 @@
- ret_from_fork:
-       lda     $26,ret_from_sys_call
-       mov     $17,$16
-+#if CONFIG_SMP
-       jsr     $31,schedule_tail
-+#endif
- .end ret_from_fork
- .align 3
-diff -urN linux-2.4.24.org/arch/alpha/kernel/process.c linux-2.4.24/arch/alpha/kernel/process.c
---- linux-2.4.24.org/arch/alpha/kernel/process.c       2004-02-04 20:50:48.800933904 +0100
-+++ linux-2.4.24/arch/alpha/kernel/process.c   2004-02-04 20:52:52.805141619 +0100
-@@ -74,9 +74,6 @@
- cpu_idle(void)
- {
-       /* An endless idle loop with no priority at all.  */
--      current->nice = 20;
--      current->counter = -100;
--
-       while (1) {
-               /* FIXME -- EV6 and LCA45 know how to power down
-                  the CPU.  */
-diff -urN linux-2.4.24.org/arch/alpha/kernel/smp.c linux-2.4.24/arch/alpha/kernel/smp.c
---- linux-2.4.24.org/arch/alpha/kernel/smp.c   2004-02-04 20:50:49.083875053 +0100
-+++ linux-2.4.24/arch/alpha/kernel/smp.c       2004-02-04 20:52:52.820138499 +0100
-@@ -81,6 +81,8 @@
- int smp_num_probed;           /* Internal processor count */
- int smp_num_cpus = 1;         /* Number that came online.  */
- int smp_threads_ready;                /* True once the per process idle is forked. */
-+cycles_t cacheflush_time;
-+unsigned long cache_decay_ticks;
- int __cpu_number_map[NR_CPUS];
- int __cpu_logical_map[NR_CPUS];
-@@ -155,11 +157,6 @@
- {
-       int cpuid = hard_smp_processor_id();
--      if (current != init_tasks[cpu_number_map(cpuid)]) {
--              printk("BUG: smp_calling: cpu %d current %p init_tasks[cpu_number_map(cpuid)] %p\n",
--                     cpuid, current, init_tasks[cpu_number_map(cpuid)]);
--      }
--
-       DBGS(("CALLIN %d state 0x%lx\n", cpuid, current->state));
-       /* Turn on machine checks.  */
-@@ -217,9 +214,6 @@
-       DBGS(("smp_callin: commencing CPU %d current %p\n",
-             cpuid, current));
--      /* Setup the scheduler for this processor.  */
--      init_idle();
--
-       /* ??? This should be in init_idle.  */
-       atomic_inc(&init_mm.mm_count);
-       current->active_mm = &init_mm;
-@@ -227,6 +221,57 @@
-       cpu_idle();
- }
-+
-+/*
-+ * Rough estimation for SMP scheduling, this is the number of cycles it
-+ * takes for a fully memory-limited process to flush the SMP-local cache.
-+ *
-+ * We are not told how much cache there is, so we have to guess.
-+ */
-+static void __init
-+smp_tune_scheduling (int cpuid)
-+{
-+      struct percpu_struct *cpu;
-+      unsigned long on_chip_cache;    /* kB */
-+      unsigned long freq;             /* Hz */
-+      unsigned long bandwidth = 350;  /* MB/s */
-+
-+      cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset
-+                                    + cpuid * hwrpb->processor_size);
-+      switch (cpu->type)
-+      {
-+      case EV45_CPU:
-+              on_chip_cache = 16 + 16;
-+              break;
-+
-+      case EV5_CPU:
-+      case EV56_CPU:
-+              on_chip_cache = 8 + 8 + 96;
-+              break;
-+
-+      case PCA56_CPU:
-+              on_chip_cache = 16 + 8;
-+              break;
-+
-+      case EV6_CPU:
-+      case EV67_CPU:
-+      default:
-+              on_chip_cache = 64 + 64;
-+              break;
-+      }
-+
-+      freq = hwrpb->cycle_freq ? : est_cycle_freq;
-+
-+      cacheflush_time = (freq / 1000000) * (on_chip_cache << 10) / bandwidth;
-+      cache_decay_ticks = cacheflush_time / (freq / 1000) * HZ / 1000;
-+
-+      printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n",
-+             cacheflush_time/(freq/1000000),
-+             (cacheflush_time*100/(freq/1000000)) % 100);
-+      printk("task migration cache decay timeout: %ld msecs.\n",
-+             (cache_decay_ticks + 1) * 1000 / HZ);
-+}
-+
- /*
-  * Send a message to a secondary's console.  "START" is one such
-  * interesting message.  ;-)
-@@ -449,14 +494,11 @@
-       if (idle == &init_task)
-               panic("idle process is init_task for CPU %d", cpuid);
--      idle->processor = cpuid;
--      idle->cpus_runnable = 1 << cpuid; /* we schedule the first task manually */
-+      init_idle(idle, cpuid);
-+      unhash_process(idle);
-+
-       __cpu_logical_map[cpunum] = cpuid;
-       __cpu_number_map[cpuid] = cpunum;
-- 
--      del_from_runqueue(idle);
--      unhash_process(idle);
--      init_tasks[cpunum] = idle;
-       DBGS(("smp_boot_one_cpu: CPU %d state 0x%lx flags 0x%lx\n",
-             cpuid, idle->state, idle->flags));
-@@ -563,13 +605,11 @@
-       __cpu_number_map[boot_cpuid] = 0;
-       __cpu_logical_map[0] = boot_cpuid;
--      current->processor = boot_cpuid;
-       smp_store_cpu_info(boot_cpuid);
-+      smp_tune_scheduling(boot_cpuid);
-       smp_setup_percpu_timer(boot_cpuid);
--      init_idle();
--
-       /* ??? This should be in init_idle.  */
-       atomic_inc(&init_mm.mm_count);
-       current->active_mm = &init_mm;
-diff -urN linux-2.4.24.org/arch/arm/kernel/process.c linux-2.4.24/arch/arm/kernel/process.c
---- linux-2.4.24.org/arch/arm/kernel/process.c 2004-02-04 20:51:34.213488266 +0100
-+++ linux-2.4.24/arch/arm/kernel/process.c     2004-02-04 20:52:52.824137668 +0100
-@@ -87,8 +87,6 @@
- {
-       /* endless idle loop with no priority at all */
-       init_idle();
--      current->nice = 20;
--      current->counter = -100;
-       while (1) {
-               void (*idle)(void) = pm_idle;
-diff -urN linux-2.4.24.org/arch/i386/kernel/entry.S linux-2.4.24/arch/i386/kernel/entry.S
---- linux-2.4.24.org/arch/i386/kernel/entry.S  2004-02-04 20:50:47.376230238 +0100
-+++ linux-2.4.24/arch/i386/kernel/entry.S      2004-02-04 20:52:52.828136836 +0100
-@@ -79,7 +79,7 @@
- exec_domain   = 16
- need_resched  = 20
- tsk_ptrace    = 24
--processor     = 52
-+cpu           = 32
- ENOSYS = 38
-@@ -184,9 +184,11 @@
- ENTRY(ret_from_fork)
-+#if CONFIG_SMP
-       pushl %ebx
-       call SYMBOL_NAME(schedule_tail)
-       addl $4, %esp
-+#endif
-       GET_CURRENT(%ebx)
-       testb $0x02,tsk_ptrace(%ebx)    # PT_TRACESYS
-       jne tracesys_exit
-diff -urN linux-2.4.24.org/arch/i386/kernel/process.c linux-2.4.24/arch/i386/kernel/process.c
---- linux-2.4.24.org/arch/i386/kernel/process.c        2004-02-04 20:50:46.799350227 +0100
-+++ linux-2.4.24/arch/i386/kernel/process.c    2004-02-04 20:52:52.833135796 +0100
-@@ -84,7 +84,7 @@
- {
-       if (current_cpu_data.hlt_works_ok && !hlt_counter) {
-               __cli();
--              if (!current->need_resched)
-+              if (!need_resched())
-                       safe_halt();
-               else
-                       __sti();
-@@ -126,9 +126,6 @@
- void cpu_idle (void)
- {
-       /* endless idle loop with no priority at all */
--      init_idle();
--      current->nice = 20;
--      current->counter = -100;
-       while (1) {
-               void (*idle)(void) = pm_idle;
-@@ -665,15 +662,17 @@
-       asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
-       /*
--       * Restore %fs and %gs.
-+       * Restore %fs and %gs if needed.
-        */
--      loadsegment(fs, next->fs);
--      loadsegment(gs, next->gs);
-+      if (unlikely(prev->fs | prev->gs | next->fs | next->gs)) {
-+              loadsegment(fs, next->fs);
-+              loadsegment(gs, next->gs);
-+      }
-       /*
-        * Now maybe reload the debug registers
-        */
--      if (next->debugreg[7]){
-+      if (unlikely(next->debugreg[7])) {
-               loaddebug(next, 0);
-               loaddebug(next, 1);
-               loaddebug(next, 2);
-@@ -683,7 +682,7 @@
-               loaddebug(next, 7);
-       }
--      if (prev->ioperm || next->ioperm) {
-+      if (unlikely(prev->ioperm || next->ioperm)) {
-               if (next->ioperm) {
-                       /*
-                        * 4 cachelines copy ... not good, but not that
-diff -urN linux-2.4.24.org/arch/i386/kernel/setup.c linux-2.4.24/arch/i386/kernel/setup.c
---- linux-2.4.24.org/arch/i386/kernel/setup.c  2004-02-04 20:50:46.790352099 +0100
-+++ linux-2.4.24/arch/i386/kernel/setup.c      2004-02-04 20:52:52.840134340 +0100
-@@ -3193,9 +3193,10 @@
-       load_TR(nr);
-       load_LDT(&init_mm.context);
--      /*
--       * Clear all 6 debug registers:
--       */
-+      /* Clear %fs and %gs. */
-+      asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
-+
-+      /* Clear all 6 debug registers: */
- #define CD(register) __asm__("movl %0,%%db" #register ::"r"(0) );
-diff -urN linux-2.4.24.org/arch/i386/kernel/smpboot.c linux-2.4.24/arch/i386/kernel/smpboot.c
---- linux-2.4.24.org/arch/i386/kernel/smpboot.c        2004-02-04 20:50:46.762357921 +0100
-+++ linux-2.4.24/arch/i386/kernel/smpboot.c    2004-02-04 20:52:52.864129350 +0100
-@@ -308,14 +308,14 @@
-                       if (tsc_values[i] < avg)
-                               realdelta = -realdelta;
--                      printk("BIOS BUG: CPU#%d improperly initialized, has %ld usecs TSC skew! FIXED.\n",
--                              i, realdelta);
-+                      printk("BIOS BUG: CPU#%d improperly initialized, has %ld usecs TSC skew! FIXED.\n", i, realdelta);
-               }
-               sum += delta;
-       }
-       if (!buggy)
-               printk("passed.\n");
-+              ;
- }
- static void __init synchronize_tsc_ap (void)
-@@ -365,7 +365,7 @@
-        * (This works even if the APIC is not enabled.)
-        */
-       phys_id = GET_APIC_ID(apic_read(APIC_ID));
--      cpuid = current->processor;
-+      cpuid = cpu();
-       if (test_and_set_bit(cpuid, &cpu_online_map)) {
-               printk("huh, phys CPU#%d, CPU#%d already present??\n",
-                                       phys_id, cpuid);
-@@ -435,6 +435,7 @@
-        */
-       smp_store_cpu_info(cpuid);
-+      disable_APIC_timer();
-       /*
-        * Allow the master to continue.
-        */
-@@ -465,6 +466,7 @@
-       smp_callin();
-       while (!atomic_read(&smp_commenced))
-               rep_nop();
-+      enable_APIC_timer();
-       /*
-        * low-memory mappings have been cleared, flush them from
-        * the local TLBs too.
-@@ -803,16 +805,13 @@
-       if (!idle)
-               panic("No idle process for CPU %d", cpu);
--      idle->processor = cpu;
--      idle->cpus_runnable = 1 << cpu; /* we schedule the first task manually */
-+      init_idle(idle, cpu);
-       map_cpu_to_boot_apicid(cpu, apicid);
-       idle->thread.eip = (unsigned long) start_secondary;
--      del_from_runqueue(idle);
-       unhash_process(idle);
--      init_tasks[cpu] = idle;
-       /* start_eip had better be page-aligned! */
-       start_eip = setup_trampoline();
-@@ -925,6 +924,7 @@
- }
- cycles_t cacheflush_time;
-+unsigned long cache_decay_ticks;
- static void smp_tune_scheduling (void)
- {
-@@ -958,9 +958,13 @@
-               cacheflush_time = (cpu_khz>>10) * (cachesize<<10) / bandwidth;
-       }
-+      cache_decay_ticks = (long)cacheflush_time/cpu_khz * HZ / 1000;
-+
-       printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n",
-               (long)cacheflush_time/(cpu_khz/1000),
-               ((long)cacheflush_time*100/(cpu_khz/1000)) % 100);
-+      printk("task migration cache decay timeout: %ld msecs.\n",
-+              (cache_decay_ticks + 1) * 1000 / HZ);
- }
- /*
-@@ -1026,8 +1030,7 @@
-       map_cpu_to_boot_apicid(0, boot_cpu_apicid);
-       global_irq_holder = 0;
--      current->processor = 0;
--      init_idle();
-+      current->cpu = 0;
-       smp_tune_scheduling();
-       /*
-diff -urN linux-2.4.24.org/arch/i386/kernel/smp.c linux-2.4.24/arch/i386/kernel/smp.c
---- linux-2.4.24.org/arch/i386/kernel/smp.c    2004-02-04 20:50:47.312243547 +0100
-+++ linux-2.4.24/arch/i386/kernel/smp.c        2004-02-04 20:52:52.868128518 +0100
-@@ -503,6 +503,17 @@
- }
- /*
-+ * this function sends a reschedule IPI to all (other) CPUs.
-+ * This should only be used if some 'global' task became runnable,
-+ * such as a RT task, that must be handled now. The first CPU
-+ * that manages to grab the task will run it.
-+ */
-+void smp_send_reschedule_all(void)
-+{
-+      send_IPI_allbutself(RESCHEDULE_VECTOR);
-+}
-+
-+/*
-  * Structure and data for smp_call_function(). This is designed to minimise
-  * static memory requirements. It also looks cleaner.
-  */
-diff -urN linux-2.4.24.org/arch/mips64/kernel/process.c linux-2.4.24/arch/mips64/kernel/process.c
---- linux-2.4.24.org/arch/mips64/kernel/process.c      2004-02-04 20:51:53.268524907 +0100
-+++ linux-2.4.24/arch/mips64/kernel/process.c  2004-02-04 20:52:52.872127686 +0100
-@@ -39,8 +39,7 @@
- {
-       /* endless idle loop with no priority at all */
-       init_idle();
--      current->nice = 20;
--      current->counter = -100;
-+
-       while (1) {
-               while (!current->need_resched)
-                       if (cpu_wait)
-diff -urN linux-2.4.24.org/arch/parisc/kernel/process.c linux-2.4.24/arch/parisc/kernel/process.c
---- linux-2.4.24.org/arch/parisc/kernel/process.c      2004-02-04 20:51:58.602415484 +0100
-+++ linux-2.4.24/arch/parisc/kernel/process.c  2004-02-04 20:52:52.876126854 +0100
-@@ -65,8 +65,6 @@
- {
-       /* endless idle loop with no priority at all */
-       init_idle();
--      current->nice = 20;
--      current->counter = -100;
-       while (1) {
-               while (!current->need_resched) {
-diff -urN linux-2.4.24.org/arch/ppc/kernel/entry.S linux-2.4.24/arch/ppc/kernel/entry.S
---- linux-2.4.24.org/arch/ppc/kernel/entry.S   2004-02-04 20:51:15.913294629 +0100
-+++ linux-2.4.24/arch/ppc/kernel/entry.S       2004-02-04 20:52:52.903121239 +0100
-@@ -269,7 +269,9 @@
-       .globl  ret_from_fork
- ret_from_fork:
-+#if CONFIG_SMP
-       bl      schedule_tail
-+#endif
-       lwz     r0,TASK_PTRACE(r2)
-       andi.   r0,r0,PT_TRACESYS
-       bnel-   syscall_trace
-diff -urN linux-2.4.24.org/arch/ppc/kernel/idle.c linux-2.4.24/arch/ppc/kernel/idle.c
---- linux-2.4.24.org/arch/ppc/kernel/idle.c    2004-02-04 20:51:16.300214151 +0100
-+++ linux-2.4.24/arch/ppc/kernel/idle.c        2004-02-04 20:52:52.908120200 +0100
-@@ -46,9 +46,7 @@
-               do_power_save = 1;
-       /* endless loop with no priority at all */
--      current->nice = 20;
--      current->counter = -100;
--      init_idle();
-+
-       for (;;) {
- #ifdef CONFIG_SMP
-               if (!do_power_save) {
-diff -urN linux-2.4.24.org/arch/ppc/kernel/mk_defs.c linux-2.4.24/arch/ppc/kernel/mk_defs.c
---- linux-2.4.24.org/arch/ppc/kernel/mk_defs.c 2004-02-04 20:51:14.150661249 +0100
-+++ linux-2.4.24/arch/ppc/kernel/mk_defs.c     2004-02-04 20:52:52.913119160 +0100
-@@ -34,8 +34,8 @@
-       /*DEFINE(KERNELBASE, KERNELBASE);*/
-       DEFINE(STATE, offsetof(struct task_struct, state));
-       DEFINE(NEXT_TASK, offsetof(struct task_struct, next_task));
--      DEFINE(COUNTER, offsetof(struct task_struct, counter));
--      DEFINE(PROCESSOR, offsetof(struct task_struct, processor));
-+      DEFINE(COUNTER, offsetof(struct task_struct, time_slice));
-+      DEFINE(PROCESSOR, offsetof(struct task_struct, cpu));
-       DEFINE(SIGPENDING, offsetof(struct task_struct, sigpending));
-       DEFINE(THREAD, offsetof(struct task_struct, thread));
-       DEFINE(MM, offsetof(struct task_struct, mm));
-diff -urN linux-2.4.24.org/arch/ppc/kernel/process.c linux-2.4.24/arch/ppc/kernel/process.c
---- linux-2.4.24.org/arch/ppc/kernel/process.c 2004-02-04 20:51:14.062679549 +0100
-+++ linux-2.4.24/arch/ppc/kernel/process.c     2004-02-04 20:52:52.917118328 +0100
-@@ -281,7 +281,7 @@
- #endif
- #ifdef CONFIG_SMP
--      printk(" CPU: %d", current->processor);
-+      printk(" CPU: %d", current->cpu);
- #endif /* CONFIG_SMP */
-       printk("\n");
-diff -urN linux-2.4.24.org/arch/ppc/kernel/smp.c linux-2.4.24/arch/ppc/kernel/smp.c
---- linux-2.4.24.org/arch/ppc/kernel/smp.c     2004-02-04 20:51:15.993277992 +0100
-+++ linux-2.4.24/arch/ppc/kernel/smp.c 2004-02-04 20:52:52.923117080 +0100
-@@ -51,6 +51,7 @@
- unsigned long cpu_online_map;
- int smp_hw_index[NR_CPUS];
- static struct smp_ops_t *smp_ops;
-+unsigned long cache_decay_ticks = HZ/100;
- /* all cpu mappings are 1-1 -- Cort */
- volatile unsigned long cpu_callin_map[NR_CPUS];
-@@ -292,9 +293,7 @@
-        * cpu 0, the master -- Cort
-        */
-       cpu_callin_map[0] = 1;
--      current->processor = 0;
--
--      init_idle();
-+      current->cpu = 0;
-       for (i = 0; i < NR_CPUS; i++) {
-               prof_counter[i] = 1;
-@@ -351,12 +350,9 @@
-               p = init_task.prev_task;
-               if (!p)
-                       panic("No idle task for CPU %d", i);
--              del_from_runqueue(p);
-+              init_idle(p, i);
-               unhash_process(p);
--              init_tasks[i] = p;
--              p->processor = i;
--              p->cpus_runnable = 1 << i; /* we schedule the first task manually */
-               current_set[i] = p;
-               /*
-@@ -505,7 +501,7 @@
- void __init smp_callin(void)
- {
--      int cpu = current->processor;
-+      int cpu = current->cpu;
-         smp_store_cpu_info(cpu);
-       smp_ops->setup_cpu(cpu);
-diff -urN linux-2.4.24.org/arch/ppc/lib/dec_and_lock.c linux-2.4.24/arch/ppc/lib/dec_and_lock.c
---- linux-2.4.24.org/arch/ppc/lib/dec_and_lock.c       2004-02-04 20:51:18.406775995 +0100
-+++ linux-2.4.24/arch/ppc/lib/dec_and_lock.c   2004-02-04 20:52:52.927116249 +0100
-@@ -1,4 +1,5 @@
- #include <linux/module.h>
-+#include <linux/sched.h>
- #include <linux/spinlock.h>
- #include <asm/atomic.h>
- #include <asm/system.h>
-diff -urN linux-2.4.24.org/arch/ppc/mm/init.c linux-2.4.24/arch/ppc/mm/init.c
---- linux-2.4.24.org/arch/ppc/mm/init.c        2004-02-04 20:51:13.814731121 +0100
-+++ linux-2.4.24/arch/ppc/mm/init.c    2004-02-04 20:52:52.931115417 +0100
-@@ -192,9 +192,9 @@
-               {
-                       int iscur = 0;
- #ifdef CONFIG_SMP
--                      printk("%3d ", p->processor);
--                      if ( (p->processor != NO_PROC_ID) &&
--                           (p == current_set[p->processor]) )
-+                      printk("%3d ", p->cpu);
-+                      if ( (p->cpu != NO_PROC_ID) &&
-+                           (p == current_set[p->cpu]) )
-                       {
-                               iscur = 1;
-                               printk("current");
-diff -urN linux-2.4.24.org/arch/ppc64/kernel/entry.S linux-2.4.24/arch/ppc64/kernel/entry.S
---- linux-2.4.24.org/arch/ppc64/kernel/entry.S 2004-02-04 20:50:43.056128805 +0100
-+++ linux-2.4.24/arch/ppc64/kernel/entry.S     2004-02-04 20:53:40.136297052 +0100
-@@ -299,7 +299,9 @@
-       blr
- _GLOBAL(ret_from_fork)
-+#if CONFIG_SMP
-       bl      .schedule_tail
-+#endif
-       ld      r4,PACACURRENT(r13)
-       ld      r0,TASK_PTRACE(r4)
-       andi.   r0,r0,PT_TRACESYS
-diff -urN linux-2.4.24.org/arch/ppc64/kernel/idle.c linux-2.4.24/arch/ppc64/kernel/idle.c
---- linux-2.4.24.org/arch/ppc64/kernel/idle.c  2004-02-04 20:50:43.329072034 +0100
-+++ linux-2.4.24/arch/ppc64/kernel/idle.c      2004-02-04 20:55:09.907625341 +0100
-@@ -88,15 +88,12 @@
-       unsigned long CTRL;
-       /* endless loop with no priority at all */
--      current->nice = 20;
--      current->counter = -100;
--
-+      
-       /* ensure iSeries run light will be out when idle */
-       current->thread.flags &= ~PPC_FLAG_RUN_LIGHT;
-       CTRL = mfspr(CTRLF);
-       CTRL &= ~RUNLATCH;
-       mtspr(CTRLT, CTRL);
--      init_idle();    
-       lpaca = get_paca();
-diff -urN linux-2.4.24.org/arch/ppc64/kernel/process.c linux-2.4.24/arch/ppc64/kernel/process.c
---- linux-2.4.24.org/arch/ppc64/kernel/process.c       2004-02-04 20:50:42.774187448 +0100
-+++ linux-2.4.24/arch/ppc64/kernel/process.c   2004-02-04 20:52:52.986103980 +0100
-@@ -138,7 +138,7 @@
- #ifdef SHOW_TASK_SWITCHES
-       printk("%s/%d -> %s/%d NIP %08lx cpu %d root %x/%x\n",
-              prev->comm,prev->pid,
--             new->comm,new->pid,new->thread.regs->nip,new->processor,
-+             new->comm,new->pid,new->thread.regs->nip,new->cpu,
-              new->fs->root,prev->fs->root);
- #endif
- #ifdef CONFIG_SMP
-diff -urN linux-2.4.24.org/arch/ppc64/kernel/smp.c linux-2.4.24/arch/ppc64/kernel/smp.c
---- linux-2.4.24.org/arch/ppc64/kernel/smp.c   2004-02-04 20:50:43.176103851 +0100
-+++ linux-2.4.24/arch/ppc64/kernel/smp.c       2004-02-04 20:52:52.990103148 +0100
-@@ -70,6 +70,7 @@
- extern atomic_t ipi_sent;
- spinlock_t kernel_flag __cacheline_aligned = SPIN_LOCK_UNLOCKED;
- cycles_t cacheflush_time;
-+unsigned long cache_decay_ticks = HZ/100;
- static int max_cpus __initdata = NR_CPUS;
- unsigned long cpu_online_map;
-@@ -636,9 +637,7 @@
-        * cpu 0, the master -- Cort
-        */
-       cpu_callin_map[0] = 1;
--      current->processor = 0;
--
--      init_idle();
-+      current->cpu = 0;
-       for (i = 0; i < NR_CPUS; i++) {
-               paca[i].prof_counter = 1;
-@@ -709,12 +708,9 @@
-               PPCDBG(PPCDBG_SMP,"\tProcessor %d, task = 0x%lx\n", i, p);
--              del_from_runqueue(p);
-+              init_idle(p, i);
-               unhash_process(p);
--              init_tasks[i] = p;
--              p->processor = i;
--              p->cpus_runnable = 1 << i; /* we schedule the first task manually */
-               current_set[i].task = p;
-               sp = ((unsigned long)p) + sizeof(union task_union)
-                       - STACK_FRAME_OVERHEAD;
-@@ -765,7 +761,7 @@
- void __init smp_callin(void)
- {
--      int cpu = current->processor;
-+      int cpu = current->cpu;
-       
-         smp_store_cpu_info(cpu);
-       set_dec(paca[cpu].default_decr);
-@@ -773,8 +769,6 @@
-       ppc_md.smp_setup_cpu(cpu);
--      init_idle();
--
-       set_bit(smp_processor_id(), &cpu_online_map);
-       
-       while(!smp_commenced) {
-@@ -793,7 +787,7 @@
- {
-       int cpu; 
--      cpu = current->processor;
-+      cpu = current->cpu;
-       atomic_inc(&init_mm.mm_count);
-       current->active_mm = &init_mm;
-       smp_callin();
-diff -urN linux-2.4.24.org/arch/s390/kernel/process.c linux-2.4.24/arch/s390/kernel/process.c
---- linux-2.4.24.org/arch/s390/kernel/process.c        2004-02-04 20:51:56.088938275 +0100
-+++ linux-2.4.24/arch/s390/kernel/process.c    2004-02-04 20:52:52.994102316 +0100
-@@ -57,8 +57,7 @@
-       /* endless idle loop with no priority at all */
-         init_idle();
--      current->nice = 20;
--      current->counter = -100;
-+
-       while (1) {
-               __cli();
-               if (current->need_resched) {
-diff -urN linux-2.4.24.org/arch/s390x/kernel/process.c linux-2.4.24/arch/s390x/kernel/process.c
---- linux-2.4.24.org/arch/s390x/kernel/process.c       2004-02-04 20:52:03.781338295 +0100
-+++ linux-2.4.24/arch/s390x/kernel/process.c   2004-02-04 20:52:52.997101692 +0100
-@@ -57,8 +57,7 @@
-       /* endless idle loop with no priority at all */
-         init_idle();
--      current->nice = 20;
--      current->counter = -100;
-+
-       while (1) {
-               __cli();
-               if (current->need_resched) {
-diff -urN linux-2.4.24.org/arch/sh/kernel/process.c linux-2.4.24/arch/sh/kernel/process.c
---- linux-2.4.24.org/arch/sh/kernel/process.c  2004-02-04 20:51:43.820490054 +0100
-+++ linux-2.4.24/arch/sh/kernel/process.c      2004-02-04 20:52:53.000101068 +0100
-@@ -42,8 +42,6 @@
- {
-       /* endless idle loop with no priority at all */
-       init_idle();
--      current->nice = 20;
--      current->counter = -100;
-       while (1) {
-               if (hlt_counter) {
-diff -urN linux-2.4.24.org/arch/sparc/kernel/entry.S linux-2.4.24/arch/sparc/kernel/entry.S
---- linux-2.4.24.org/arch/sparc/kernel/entry.S 2004-02-04 20:50:51.877294031 +0100
-+++ linux-2.4.24/arch/sparc/kernel/entry.S     2004-02-04 20:52:53.005100028 +0100
-@@ -1471,7 +1471,9 @@
-       .globl  C_LABEL(ret_from_fork)
- C_LABEL(ret_from_fork):
-+#if CONFIG_SMP
-       call    schedule_tail
-+#endif
-        mov    %g3, %o0
-       b       C_LABEL(ret_sys_call)
-        ld     [%sp + STACKFRAME_SZ + PT_I0], %o0
-diff -urN linux-2.4.24.org/arch/sparc/kernel/process.c linux-2.4.24/arch/sparc/kernel/process.c
---- linux-2.4.24.org/arch/sparc/kernel/process.c       2004-02-04 20:50:51.550362032 +0100
-+++ linux-2.4.24/arch/sparc/kernel/process.c   2004-02-04 20:52:53.009099197 +0100
-@@ -74,9 +74,6 @@
-               goto out;
-       /* endless idle loop with no priority at all */
--      current->nice = 20;
--      current->counter = -100;
--      init_idle();
-       for (;;) {
-               if (ARCH_SUN4C_SUN4) {
-@@ -128,9 +125,6 @@
- int cpu_idle(void)
- {
-       /* endless idle loop with no priority at all */
--      current->nice = 20;
--      current->counter = -100;
--      init_idle();
-       while(1) {
-               if(current->need_resched) {
-diff -urN linux-2.4.24.org/arch/sparc/kernel/smp.c linux-2.4.24/arch/sparc/kernel/smp.c
---- linux-2.4.24.org/arch/sparc/kernel/smp.c   2004-02-04 20:50:51.522367854 +0100
-+++ linux-2.4.24/arch/sparc/kernel/smp.c       2004-02-04 20:52:53.013098365 +0100
-@@ -57,6 +57,7 @@
- volatile int __cpu_number_map[NR_CPUS];
- volatile int __cpu_logical_map[NR_CPUS];
- cycles_t cacheflush_time = 0; /* XXX */
-+unsigned long cache_decay_ticks = HZ/100; /* XXX */
- /* The only guaranteed locking primitive available on all Sparc
-  * processors is 'ldstub [%reg + immediate], %dest_reg' which atomically
-diff -urN linux-2.4.24.org/arch/sparc/kernel/sun4d_smp.c linux-2.4.24/arch/sparc/kernel/sun4d_smp.c
---- linux-2.4.24.org/arch/sparc/kernel/sun4d_smp.c     2004-02-04 20:50:51.254423586 +0100
-+++ linux-2.4.24/arch/sparc/kernel/sun4d_smp.c 2004-02-04 20:52:53.027095454 +0100
-@@ -107,7 +107,6 @@
-        * the SMP initialization the master will be just allowed
-        * to call the scheduler code.
-        */
--      init_idle();
-       /* Get our local ticker going. */
-       smp_setup_percpu_timer();
-@@ -127,7 +126,7 @@
-       while((unsigned long)current_set[cpuid] < PAGE_OFFSET)
-               barrier();
-               
--      while(current_set[cpuid]->processor != cpuid)
-+      while(current_set[cpuid]->cpu != cpuid)
-               barrier();
-               
-       /* Fix idle thread fields. */
-@@ -197,10 +196,8 @@
-               mid_xlate[i] = i;
-       __cpu_number_map[boot_cpu_id] = 0;
-       __cpu_logical_map[0] = boot_cpu_id;
--      current->processor = boot_cpu_id;
-       smp_store_cpu_info(boot_cpu_id);
-       smp_setup_percpu_timer();
--      init_idle();
-       local_flush_cache_all();
-       if(linux_num_cpus == 1)
-               return;  /* Not an MP box. */
-@@ -222,14 +219,10 @@
-                       cpucount++;
-                       p = init_task.prev_task;
--                      init_tasks[i] = p;
--
--                      p->processor = i;
--                      p->cpus_runnable = 1 << i; /* we schedule the first task manually */
-                       current_set[i] = p;
--                      del_from_runqueue(p);
-+                      init_idle(p, i);
-                       unhash_process(p);
-                       for (no = 0; no < linux_num_cpus; no++)
-diff -urN linux-2.4.24.org/arch/sparc/kernel/sun4m_smp.c linux-2.4.24/arch/sparc/kernel/sun4m_smp.c
---- linux-2.4.24.org/arch/sparc/kernel/sun4m_smp.c     2004-02-04 20:50:52.194228110 +0100
-+++ linux-2.4.24/arch/sparc/kernel/sun4m_smp.c 2004-02-04 20:52:53.030094830 +0100
-@@ -104,7 +104,6 @@
-        * the SMP initialization the master will be just allowed
-        * to call the scheduler code.
-        */
--      init_idle();
-       /* Allow master to continue. */
-       swap((unsigned long *)&cpu_callin_map[cpuid], 1);
-@@ -170,12 +169,10 @@
-       mid_xlate[boot_cpu_id] = (linux_cpus[boot_cpu_id].mid & ~8);
-       __cpu_number_map[boot_cpu_id] = 0;
-       __cpu_logical_map[0] = boot_cpu_id;
--      current->processor = boot_cpu_id;
-       smp_store_cpu_info(boot_cpu_id);
-       set_irq_udt(mid_xlate[boot_cpu_id]);
-       smp_setup_percpu_timer();
--      init_idle();
-       local_flush_cache_all();
-       if(linux_num_cpus == 1)
-               return;  /* Not an MP box. */
-@@ -195,14 +192,10 @@
-                       cpucount++;
-                       p = init_task.prev_task;
--                      init_tasks[i] = p;
--
--                      p->processor = i;
--                      p->cpus_runnable = 1 << i; /* we schedule the first task manually */
-                       current_set[i] = p;
--                      del_from_runqueue(p);
-+                      init_idle(p, i);
-                       unhash_process(p);
-                       /* See trampoline.S for details... */
-diff -urN linux-2.4.24.org/arch/sparc64/kernel/entry.S linux-2.4.24/arch/sparc64/kernel/entry.S
---- linux-2.4.24.org/arch/sparc64/kernel/entry.S       2004-02-04 20:51:29.076556726 +0100
-+++ linux-2.4.24/arch/sparc64/kernel/entry.S   2004-02-04 20:52:53.039092958 +0100
-@@ -1627,7 +1627,9 @@
-                */
-               andn            %o7, SPARC_FLAG_NEWCHILD, %l0
-               mov             %g5, %o0        /* 'prev' */
-+#if CONFIG_SMP
-               call            schedule_tail
-+#endif
-                stb            %l0, [%g6 + AOFF_task_thread + AOFF_thread_flags]
-               andcc           %l0, SPARC_FLAG_PERFCTR, %g0
-               be,pt           %icc, 1f
-diff -urN linux-2.4.24.org/arch/sparc64/kernel/irq.c linux-2.4.24/arch/sparc64/kernel/irq.c
---- linux-2.4.24.org/arch/sparc64/kernel/irq.c 2004-02-04 20:51:28.993573986 +0100
-+++ linux-2.4.24/arch/sparc64/kernel/irq.c     2004-02-04 20:52:53.044091918 +0100
-@@ -174,7 +174,7 @@
-               tid = ((tid & UPA_CONFIG_MID) << 9);
-               tid &= IMAP_TID_UPA;
-       } else {
--              tid = (starfire_translate(imap, current->processor) << 26);
-+              tid = (starfire_translate(imap, current->cpu) << 26);
-               tid &= IMAP_TID_UPA;
-       }
-diff -urN linux-2.4.24.org/arch/sparc64/kernel/process.c linux-2.4.24/arch/sparc64/kernel/process.c
---- linux-2.4.24.org/arch/sparc64/kernel/process.c     2004-02-04 20:51:29.998364993 +0100
-+++ linux-2.4.24/arch/sparc64/kernel/process.c 2004-02-04 20:52:53.049090879 +0100
-@@ -54,9 +54,6 @@
-               return -EPERM;
-       /* endless idle loop with no priority at all */
--      current->nice = 20;
--      current->counter = -100;
--      init_idle();
-       for (;;) {
-               /* If current->need_resched is zero we should really
-@@ -80,14 +77,10 @@
- /*
-  * the idle loop on a UltraMultiPenguin...
-  */
--#define idle_me_harder()      (cpu_data[current->processor].idle_volume += 1)
--#define unidle_me()           (cpu_data[current->processor].idle_volume = 0)
-+#define idle_me_harder()      (cpu_data[current->cpu].idle_volume += 1)
-+#define unidle_me()           (cpu_data[current->cpu].idle_volume = 0)
- int cpu_idle(void)
- {
--      current->nice = 20;
--      current->counter = -100;
--      init_idle();
--
-       while(1) {
-               if (current->need_resched != 0) {
-                       unidle_me();
-diff -urN linux-2.4.24.org/arch/sparc64/kernel/rtrap.S linux-2.4.24/arch/sparc64/kernel/rtrap.S
---- linux-2.4.24.org/arch/sparc64/kernel/rtrap.S       2004-02-04 20:51:29.910383293 +0100
-+++ linux-2.4.24/arch/sparc64/kernel/rtrap.S   2004-02-04 20:52:53.053090047 +0100
-@@ -140,7 +140,7 @@
-               .align                  64
-               .globl                  rtrap_clr_l6, rtrap, irqsz_patchme, rtrap_xcall
- rtrap_clr_l6: clr                     %l6
--rtrap:                lduw                    [%g6 + AOFF_task_processor], %l0
-+rtrap:                lduw                    [%g6 + AOFF_task_cpu], %l0
-               sethi                   %hi(irq_stat), %l2      ! &softirq_active
-               or                      %l2, %lo(irq_stat), %l2 ! &softirq_active
- irqsz_patchme:        sllx                    %l0, 0, %l0
-diff -urN linux-2.4.24.org/arch/sparc64/kernel/smp.c linux-2.4.24/arch/sparc64/kernel/smp.c
---- linux-2.4.24.org/arch/sparc64/kernel/smp.c 2004-02-04 20:51:28.749624726 +0100
-+++ linux-2.4.24/arch/sparc64/kernel/smp.c     2004-02-04 20:52:53.068086928 +0100
-@@ -347,6 +347,8 @@
- extern unsigned long sparc64_cpu_startup;
-+static void __init smp_tune_scheduling(void);
-+
- /* The OBP cpu startup callback truncates the 3rd arg cookie to
-  * 32-bits (I think) so to be safe we have it read the pointer
-  * contained here so we work on >4GB machines. -DaveM
-@@ -360,7 +360,7 @@
-       printk("Entering UltraSMPenguin Mode...\n");
-       __sti();
-       smp_store_cpu_info(boot_cpu_id);
--      init_idle();
-+      smp_tune_scheduling();
-       if (linux_num_cpus == 1)
-               return;
-@@ -383,12 +383,8 @@
-                       cpucount++;
-                       p = init_task.prev_task;
--                      init_tasks[cpucount] = p;
--                      p->processor = i;
--                      p->cpus_runnable = 1UL << i; /* we schedule the first task manually */
--
--                      del_from_runqueue(p);
-+                      init_idle(p, i);
-                       unhash_process(p);
-                       callin_flag = 0;
-@@ -1214,10 +1210,96 @@
-       __cpu_number_map[boot_cpu_id] = 0;
-       prom_cpu_nodes[boot_cpu_id] = linux_cpus[0].prom_node;
-       __cpu_logical_map[0] = boot_cpu_id;
--      current->processor = boot_cpu_id;
-       prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1;
- }
-+cycles_t cacheflush_time;
-+unsigned long cache_decay_ticks;
-+
-+extern unsigned long cheetah_tune_scheduling(void);
-+
-+static void __init smp_tune_scheduling(void)
-+{
-+      unsigned long orig_flush_base, flush_base, flags, *p;
-+      unsigned int ecache_size, order;
-+      cycles_t tick1, tick2, raw;
-+
-+      /* Approximate heuristic for SMP scheduling.  It is an
-+       * estimation of the time it takes to flush the L2 cache
-+       * on the local processor.
-+       *
-+       * The ia32 chooses to use the L1 cache flush time instead,
-+       * and I consider this complete nonsense.  The Ultra can service
-+       * a miss to the L1 with a hit to the L2 in 7 or 8 cycles, and
-+       * L2 misses are what create extra bus traffic (ie. the "cost"
-+       * of moving a process from one cpu to another).
-+       */
-+      printk("SMP: Calibrating ecache flush... ");
-+      if (tlb_type == cheetah || tlb_type == cheetah_plus) {
-+              cacheflush_time = cheetah_tune_scheduling();
-+              goto report;
-+      }
-+
-+      ecache_size = prom_getintdefault(linux_cpus[0].prom_node,
-+                                       "ecache-size", (512 * 1024));
-+      if (ecache_size > (4 * 1024 * 1024))
-+              ecache_size = (4 * 1024 * 1024);
-+      orig_flush_base = flush_base =
-+              __get_free_pages(GFP_KERNEL, order = get_order(ecache_size));
-+
-+      if (flush_base != 0UL) {
-+              local_irq_save(flags);
-+
-+              /* Scan twice the size once just to get the TLB entries
-+               * loaded and make sure the second scan measures pure misses.
-+               */
-+              for (p = (unsigned long *)flush_base;
-+                   ((unsigned long)p) < (flush_base + (ecache_size<<1));
-+                   p += (64 / sizeof(unsigned long)))
-+                      *((volatile unsigned long *)p);
-+
-+              tick1 = tick_ops->get_tick();
-+
-+              __asm__ __volatile__("1:\n\t"
-+                                   "ldx       [%0 + 0x000], %%g1\n\t"
-+                                   "ldx       [%0 + 0x040], %%g2\n\t"
-+                                   "ldx       [%0 + 0x080], %%g3\n\t"
-+                                   "ldx       [%0 + 0x0c0], %%g5\n\t"
-+                                   "add       %0, 0x100, %0\n\t"
-+                                   "cmp       %0, %2\n\t"
-+                                   "bne,pt    %%xcc, 1b\n\t"
-+                                   " nop"
-+                                   : "=&r" (flush_base)
-+                                   : "0" (flush_base),
-+                                     "r" (flush_base + ecache_size)
-+                                   : "g1", "g2", "g3", "g5");
-+
-+              tick2 = tick_ops->get_tick();
-+
-+              local_irq_restore(flags);
-+
-+              raw = (tick2 - tick1);
-+
-+              /* Dampen it a little, considering two processes
-+               * sharing the cache and fitting.
-+               */
-+              cacheflush_time = (raw - (raw >> 2));
-+
-+              free_pages(orig_flush_base, order);
-+      } else {
-+              cacheflush_time = ((ecache_size << 2) +
-+                                 (ecache_size << 1));
-+      }
-+report:
-+      /* Convert ticks/sticks to jiffies. */
-+      cache_decay_ticks = cacheflush_time / timer_tick_offset;
-+      if (cache_decay_ticks < 1)
-+              cache_decay_ticks = 1;
-+
-+      printk("Using heuristic of %ld cycles, %ld ticks.\n",
-+             cacheflush_time, cache_decay_ticks);
-+}
-+
- static inline unsigned long find_flush_base(unsigned long size)
- {
-       struct page *p = mem_map;
-diff -urN linux-2.4.24.org/arch/sparc64/kernel/trampoline.S linux-2.4.24/arch/sparc64/kernel/trampoline.S
---- linux-2.4.24.org/arch/sparc64/kernel/trampoline.S  2004-02-04 20:51:29.425484150 +0100
-+++ linux-2.4.24/arch/sparc64/kernel/trampoline.S      2004-02-04 20:52:53.073085888 +0100
-@@ -250,7 +250,7 @@
-       wrpr            %o1, PSTATE_IG, %pstate
-       /* Get our UPA MID. */
--      lduw            [%o2 + AOFF_task_processor], %g1
-+      lduw            [%o2 + AOFF_task_cpu], %g1
-       sethi           %hi(cpu_data), %g5
-       or              %g5, %lo(cpu_data), %g5
-diff -urN linux-2.4.24.org/arch/sparc64/kernel/traps.c linux-2.4.24/arch/sparc64/kernel/traps.c
---- linux-2.4.24.org/arch/sparc64/kernel/traps.c       2004-02-04 20:51:28.672640738 +0100
-+++ linux-2.4.24/arch/sparc64/kernel/traps.c   2004-02-04 20:52:53.078084848 +0100
-@@ -16,6 +16,7 @@
- #include <linux/smp.h>
- #include <linux/smp_lock.h>
- #include <linux/mm.h>
-+#include <linux/init.h>
- #include <asm/delay.h>
- #include <asm/system.h>
-@@ -755,6 +756,48 @@
-                              "i" (ASI_PHYS_USE_EC));
- }
-+#ifdef CONFIG_SMP
-+unsigned long __init cheetah_tune_scheduling(void)
-+{
-+      unsigned long tick1, tick2, raw;
-+      unsigned long flush_base = ecache_flush_physbase;
-+      unsigned long flush_linesize = ecache_flush_linesize;
-+      unsigned long flush_size = ecache_flush_size;
-+
-+      /* Run through the whole cache to guarentee the timed loop
-+       * is really displacing cache lines.
-+       */
-+      __asm__ __volatile__("1: subcc  %0, %4, %0\n\t"
-+                           "   bne,pt %%xcc, 1b\n\t"
-+                           "    ldxa  [%2 + %0] %3, %%g0\n\t"
-+                           : "=&r" (flush_size)
-+                           : "0" (flush_size), "r" (flush_base),
-+                             "i" (ASI_PHYS_USE_EC), "r" (flush_linesize));
-+
-+      /* The flush area is 2 X Ecache-size, so cut this in half for
-+       * the timed loop.
-+       */
-+      flush_base = ecache_flush_physbase;
-+      flush_linesize = ecache_flush_linesize;
-+      flush_size = ecache_flush_size >> 1;
-+
-+      __asm__ __volatile__("rd %%tick, %0" : "=r" (tick1));
-+
-+      __asm__ __volatile__("1: subcc  %0, %4, %0\n\t"
-+                           "   bne,pt %%xcc, 1b\n\t"
-+                           "    ldxa  [%2 + %0] %3, %%g0\n\t"
-+                           : "=&r" (flush_size)
-+                           : "0" (flush_size), "r" (flush_base),
-+                             "i" (ASI_PHYS_USE_EC), "r" (flush_linesize));
-+
-+      __asm__ __volatile__("rd %%tick, %0" : "=r" (tick2));
-+
-+      raw = (tick2 - tick1);
-+
-+      return (raw - (raw >> 2));
-+}
-+#endif
-+
- /* Unfortunately, the diagnostic access to the I-cache tags we need to
-  * use to clear the thing interferes with I-cache coherency transactions.
-  *
-diff -urN linux-2.4.24.org/Documentation/sched-coding.txt linux-2.4.24/Documentation/sched-coding.txt
---- linux-2.4.24.org/Documentation/sched-coding.txt    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/Documentation/sched-coding.txt        2004-02-04 20:52:53.082084016 +0100
-@@ -0,0 +1,126 @@
-+     Reference for various scheduler-related methods in the O(1) scheduler
-+              Robert Love <rml@tech9.net>, MontaVista Software
-+
-+
-+Note most of these methods are local to kernel/sched.c - this is by design.
-+The scheduler is meant to be self-contained and abstracted away.  This document
-+is primarily for understanding the scheduler, not interfacing to it.  Some of
-+the discussed interfaces, however, are general process/scheduling methods.
-+They are typically defined in include/linux/sched.h.
-+
-+
-+Main Scheduling Methods
-+-----------------------
-+
-+void load_balance(runqueue_t *this_rq, int idle)
-+      Attempts to pull tasks from one cpu to another to balance cpu usage,
-+      if needed.  This method is called explicitly if the runqueues are
-+      inbalanced or periodically by the timer tick.  Prior to calling,
-+      the current runqueue must be locked and interrupts disabled.
-+
-+void schedule()
-+      The main scheduling function.  Upon return, the highest priority
-+      process will be active.
-+
-+
-+Locking
-+-------
-+
-+Each runqueue has its own lock, rq->lock.  When multiple runqueues need
-+to be locked, lock acquires must be ordered by ascending &runqueue value.
-+
-+A specific runqueue is locked via
-+
-+      task_rq_lock(task_t pid, unsigned long *flags)
-+
-+which disables preemption, disables interrupts, and locks the runqueue pid is
-+running on.  Likewise,
-+
-+      task_rq_unlock(task_t pid, unsigned long *flags)
-+
-+unlocks the runqueue pid is running on, restores interrupts to their previous
-+state, and reenables preemption.
-+
-+The routines
-+
-+      double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)
-+
-+and
-+
-+      double_rq_unlock(runqueue_t *rq1, runqueue_t rq2)
-+
-+safely lock and unlock, respectively, the two specified runqueues.  They do
-+not, however, disable and restore interrupts.  Users are required to do so
-+manually before and after calls.
-+
-+
-+Values
-+------
-+
-+MAX_PRIO
-+      The maximum priority of the system, stored in the task as task->prio.
-+      Lower priorities are higher.  Normal (non-RT) priorities range from
-+      MAX_RT_PRIO to (MAX_PRIO - 1).
-+MAX_RT_PRIO
-+      The maximum real-time priority of the system.  Valid RT priorities
-+      range from 0 to (MAX_RT_PRIO - 1).
-+MAX_USER_RT_PRIO
-+      The maximum real-time priority that is exported to user-space.  Should
-+      always be equal to or less than MAX_RT_PRIO.  Setting it less allows
-+      kernel threads to have higher priorities than any user-space task.
-+MIN_TIMESLICE
-+MAX_TIMESLICE
-+      Respectively, the minimum and maximum timeslices (quanta) of a process.
-+
-+Data
-+----
-+
-+struct runqueue
-+      The main per-CPU runqueue data structure.
-+struct task_struct
-+      The main per-process data structure.
-+
-+
-+General Methods
-+---------------
-+
-+cpu_rq(cpu)
-+      Returns the runqueue of the specified cpu.
-+this_rq()
-+      Returns the runqueue of the current cpu.
-+task_rq(pid)
-+      Returns the runqueue which holds the specified pid.
-+cpu_curr(cpu)
-+      Returns the task currently running on the given cpu.
-+rt_task(pid)
-+      Returns true if pid is real-time, false if not.
-+
-+
-+Process Control Methods
-+-----------------------
-+
-+void set_user_nice(task_t *p, long nice)
-+      Sets the "nice" value of task p to the given value.
-+int setscheduler(pid_t pid, int policy, struct sched_param *param)
-+      Sets the scheduling policy and parameters for the given pid.
-+void set_cpus_allowed(task_t *p, unsigned long new_mask)
-+      Sets a given task's CPU affinity and migrates it to a proper cpu.
-+      Callers must have a valid reference to the task and assure the
-+      task not exit prematurely.  No locks can be held during the call.
-+set_task_state(tsk, state_value)
-+      Sets the given task's state to the given value.
-+set_current_state(state_value)
-+      Sets the current task's state to the given value.
-+void set_tsk_need_resched(struct task_struct *tsk)
-+      Sets need_resched in the given task.
-+void clear_tsk_need_resched(struct task_struct *tsk)
-+      Clears need_resched in the given task.
-+void set_need_resched()
-+      Sets need_resched in the current task.
-+void clear_need_resched()
-+      Clears need_resched in the current task.
-+int need_resched()
-+      Returns true if need_resched is set in the current task, false
-+      otherwise.
-+yield()
-+      Place the current process at the end of the runqueue and call schedule.
-diff -urN linux-2.4.24.org/Documentation/sched-design.txt linux-2.4.24/Documentation/sched-design.txt
---- linux-2.4.24.org/Documentation/sched-design.txt    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/Documentation/sched-design.txt        2004-02-04 20:52:53.088082769 +0100
-@@ -0,0 +1,165 @@
-+                 Goals, Design and Implementation of the
-+                    new ultra-scalable O(1) scheduler
-+
-+
-+  This is an edited version of an email Ingo Molnar sent to
-+  lkml on 4 Jan 2002.  It describes the goals, design, and
-+  implementation of Ingo's new ultra-scalable O(1) scheduler.
-+  Last Updated: 18 April 2002.
-+
-+
-+Goal
-+====
-+
-+The main goal of the new scheduler is to keep all the good things we know
-+and love about the current Linux scheduler:
-+
-+ - good interactive performance even during high load: if the user
-+   types or clicks then the system must react instantly and must execute
-+   the user tasks smoothly, even during considerable background load.
-+
-+ - good scheduling/wakeup performance with 1-2 runnable processes.
-+
-+ - fairness: no process should stay without any timeslice for any
-+   unreasonable amount of time. No process should get an unjustly high
-+   amount of CPU time.
-+
-+ - priorities: less important tasks can be started with lower priority,
-+   more important tasks with higher priority.
-+
-+ - SMP efficiency: no CPU should stay idle if there is work to do.
-+
-+ - SMP affinity: processes which run on one CPU should stay affine to
-+   that CPU. Processes should not bounce between CPUs too frequently.
-+
-+ - plus additional scheduler features: RT scheduling, CPU binding.
-+
-+and the goal is also to add a few new things:
-+
-+ - fully O(1) scheduling. Are you tired of the recalculation loop
-+   blowing the L1 cache away every now and then? Do you think the goodness
-+   loop is taking a bit too long to finish if there are lots of runnable
-+   processes? This new scheduler takes no prisoners: wakeup(), schedule(),
-+   the timer interrupt are all O(1) algorithms. There is no recalculation
-+   loop. There is no goodness loop either.
-+
-+ - 'perfect' SMP scalability. With the new scheduler there is no 'big'
-+   runqueue_lock anymore - it's all per-CPU runqueues and locks - two
-+   tasks on two separate CPUs can wake up, schedule and context-switch
-+   completely in parallel, without any interlocking. All
-+   scheduling-relevant data is structured for maximum scalability.
-+
-+ - better SMP affinity. The old scheduler has a particular weakness that
-+   causes the random bouncing of tasks between CPUs if/when higher
-+   priority/interactive tasks, this was observed and reported by many
-+   people. The reason is that the timeslice recalculation loop first needs
-+   every currently running task to consume its timeslice. But when this
-+   happens on eg. an 8-way system, then this property starves an
-+   increasing number of CPUs from executing any process. Once the last
-+   task that has a timeslice left has finished using up that timeslice,
-+   the recalculation loop is triggered and other CPUs can start executing
-+   tasks again - after having idled around for a number of timer ticks.
-+   The more CPUs, the worse this effect.
-+
-+   Furthermore, this same effect causes the bouncing effect as well:
-+   whenever there is such a 'timeslice squeeze' of the global runqueue,
-+   idle processors start executing tasks which are not affine to that CPU.
-+   (because the affine tasks have finished off their timeslices already.)
-+
-+   The new scheduler solves this problem by distributing timeslices on a
-+   per-CPU basis, without having any global synchronization or
-+   recalculation.
-+
-+ - batch scheduling. A significant proportion of computing-intensive tasks
-+   benefit from batch-scheduling, where timeslices are long and processes
-+   are roundrobin scheduled. The new scheduler does such batch-scheduling
-+   of the lowest priority tasks - so nice +19 jobs will get
-+   'batch-scheduled' automatically. With this scheduler, nice +19 jobs are
-+   in essence SCHED_IDLE, from an interactiveness point of view.
-+
-+ - handle extreme loads more smoothly, without breakdown and scheduling
-+   storms.
-+
-+ - O(1) RT scheduling. For those RT folks who are paranoid about the
-+   O(nr_running) property of the goodness loop and the recalculation loop.
-+
-+ - run fork()ed children before the parent. Andrea has pointed out the
-+   advantages of this a few months ago, but patches for this feature
-+   do not work with the old scheduler as well as they should,
-+   because idle processes often steal the new child before the fork()ing
-+   CPU gets to execute it.
-+
-+
-+Design
-+======
-+
-+the core of the new scheduler are the following mechanizms:
-+
-+ - *two*, priority-ordered 'priority arrays' per CPU. There is an 'active'
-+   array and an 'expired' array. The active array contains all tasks that
-+   are affine to this CPU and have timeslices left. The expired array
-+   contains all tasks which have used up their timeslices - but this array
-+   is kept sorted as well. The active and expired array is not accessed
-+   directly, it's accessed through two pointers in the per-CPU runqueue
-+   structure. If all active tasks are used up then we 'switch' the two
-+   pointers and from now on the ready-to-go (former-) expired array is the
-+   active array - and the empty active array serves as the new collector
-+   for expired tasks.
-+
-+ - there is a 64-bit bitmap cache for array indices. Finding the highest
-+   priority task is thus a matter of two x86 BSFL bit-search instructions.
-+
-+the split-array solution enables us to have an arbitrary number of active
-+and expired tasks, and the recalculation of timeslices can be done
-+immediately when the timeslice expires. Because the arrays are always
-+access through the pointers in the runqueue, switching the two arrays can
-+be done very quickly.
-+
-+this is a hybride priority-list approach coupled with roundrobin
-+scheduling and the array-switch method of distributing timeslices.
-+
-+ - there is a per-task 'load estimator'.
-+
-+one of the toughest things to get right is good interactive feel during
-+heavy system load. While playing with various scheduler variants i found
-+that the best interactive feel is achieved not by 'boosting' interactive
-+tasks, but by 'punishing' tasks that want to use more CPU time than there
-+is available. This method is also much easier to do in an O(1) fashion.
-+
-+to establish the actual 'load' the task contributes to the system, a
-+complex-looking but pretty accurate method is used: there is a 4-entry
-+'history' ringbuffer of the task's activities during the last 4 seconds.
-+This ringbuffer is operated without much overhead. The entries tell the
-+scheduler a pretty accurate load-history of the task: has it used up more
-+CPU time or less during the past N seconds. [the size '4' and the interval
-+of 4x 1 seconds was found by lots of experimentation - this part is
-+flexible and can be changed in both directions.]
-+
-+the penalty a task gets for generating more load than the CPU can handle
-+is a priority decrease - there is a maximum amount to this penalty
-+relative to their static priority, so even fully CPU-bound tasks will
-+observe each other's priorities, and will share the CPU accordingly.
-+
-+the SMP load-balancer can be extended/switched with additional parallel
-+computing and cache hierarchy concepts: NUMA scheduling, multi-core CPUs
-+can be supported easily by changing the load-balancer. Right now it's
-+tuned for my SMP systems.
-+
-+i skipped the prev->mm == next->mm advantage - no workload i know of shows
-+any sensitivity to this. It can be added back by sacrificing O(1)
-+schedule() [the current and one-lower priority list can be searched for a
-+that->mm == current->mm condition], but costs a fair number of cycles
-+during a number of important workloads, so i wanted to avoid this as much
-+as possible.
-+
-+- the SMP idle-task startup code was still racy and the new scheduler
-+triggered this. So i streamlined the idle-setup code a bit. We do not call
-+into schedule() before all processors have started up fully and all idle
-+threads are in place.
-+
-+- the patch also cleans up a number of aspects of sched.c - moves code
-+into other areas of the kernel where it's appropriate, and simplifies
-+certain code paths and data constructs. As a result, the new scheduler's
-+code is smaller than the old one.
-+
-+      Ingo
-diff -urN linux-2.4.24.org/drivers/char/drm-4.0/tdfx_drv.c linux-2.4.24/drivers/char/drm-4.0/tdfx_drv.c
---- linux-2.4.24.org/drivers/char/drm-4.0/tdfx_drv.c   2004-02-04 20:49:21.677055474 +0100
-+++ linux-2.4.24/drivers/char/drm-4.0/tdfx_drv.c       2004-02-04 20:52:53.236051992 +0100
-@@ -554,7 +554,6 @@
-                                       lock.context, current->pid, j,
-                                       dev->lock.lock_time, jiffies);
-                                 current->state = TASK_INTERRUPTIBLE;
--                              current->policy |= SCHED_YIELD;
-                                 schedule_timeout(DRM_LOCK_SLICE-j);
-                               DRM_DEBUG("jiffies=%d\n", jiffies);
-                         }
-diff -urN linux-2.4.24.org/drivers/char/mwave/mwavedd.c linux-2.4.24/drivers/char/mwave/mwavedd.c
---- linux-2.4.24.org/drivers/char/mwave/mwavedd.c      2004-02-04 20:49:18.334750669 +0100
-+++ linux-2.4.24/drivers/char/mwave/mwavedd.c  2004-02-04 20:52:53.321034316 +0100
-@@ -279,7 +279,6 @@
-                       pDrvData->IPCs[ipcnum].bIsHere = FALSE;
-                       pDrvData->IPCs[ipcnum].bIsEnabled = TRUE;
-       #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
--                      current->nice = -20;    /* boost to provide priority timing */
-       #else
-                       current->priority = 0x28;       /* boost to provide priority timing */
-       #endif
-diff -urN linux-2.4.24.org/drivers/char/serial_txx927.c linux-2.4.24/drivers/char/serial_txx927.c
---- linux-2.4.24.org/drivers/char/serial_txx927.c      2004-02-04 20:49:11.902088655 +0100
-+++ linux-2.4.24/drivers/char/serial_txx927.c  2004-02-04 20:52:53.361025998 +0100
-@@ -1533,7 +1533,6 @@
-               printk("cisr = %d (jiff=%lu)...", cisr, jiffies);
- #endif
-               current->state = TASK_INTERRUPTIBLE;
--              current->counter = 0;   /* make us low-priority */
-               schedule_timeout(char_time);
-               if (signal_pending(current))
-                       break;
-diff -urN linux-2.4.24.org/drivers/md/md.c linux-2.4.24/drivers/md/md.c
---- linux-2.4.24.org/drivers/md/md.c   2004-02-04 20:50:32.930234961 +0100
-+++ linux-2.4.24/drivers/md/md.c       2004-02-04 20:52:53.369024334 +0100
-@@ -2939,8 +2939,6 @@
-        * bdflush, otherwise bdflush will deadlock if there are too
-        * many dirty RAID5 blocks.
-        */
--      current->policy = SCHED_OTHER;
--      current->nice = -20;
-       md_unlock_kernel();
-       complete(thread->event);
-@@ -3464,11 +3462,6 @@
-              "(but not more than %d KB/sec) for reconstruction.\n",
-              sysctl_speed_limit_max);
--      /*
--       * Resync has low priority.
--       */
--      current->nice = 19;
--
-       is_mddev_idle(mddev); /* this also initializes IO event counters */
-       for (m = 0; m < SYNC_MARKS; m++) {
-               mark[m] = jiffies;
-@@ -3546,16 +3539,13 @@
-               currspeed = (j-mddev->resync_mark_cnt)/2/((jiffies-mddev->resync_mark)/HZ +1) +1;
-               if (currspeed > sysctl_speed_limit_min) {
--                      current->nice = 19;
--
-                       if ((currspeed > sysctl_speed_limit_max) ||
-                                       !is_mddev_idle(mddev)) {
-                               current->state = TASK_INTERRUPTIBLE;
-                               md_schedule_timeout(HZ/4);
-                               goto repeat;
-                       }
--              } else
--                      current->nice = -20;
-+              }
-       }
-       printk(KERN_INFO "md: md%d: sync done.\n",mdidx(mddev));
-       err = 0;
-diff -urN linux-2.4.24.org/fs/binfmt_elf.c linux-2.4.24/fs/binfmt_elf.c
---- linux-2.4.24.org/fs/binfmt_elf.c   2004-02-04 20:47:14.464515701 +0100
-+++ linux-2.4.24/fs/binfmt_elf.c       2004-02-04 20:52:53.390019967 +0100
-@@ -1173,7 +1173,7 @@
-       psinfo.pr_state = i;
-       psinfo.pr_sname = (i < 0 || i > 5) ? '.' : "RSDZTD"[i];
-       psinfo.pr_zomb = psinfo.pr_sname == 'Z';
--      psinfo.pr_nice = current->nice;
-+      psinfo.pr_nice = task_nice(current);
-       psinfo.pr_flag = current->flags;
-       psinfo.pr_uid = NEW_TO_OLD_UID(current->uid);
-       psinfo.pr_gid = NEW_TO_OLD_GID(current->gid);
-diff -urN linux-2.4.24.org/fs/jffs2/background.c linux-2.4.24/fs/jffs2/background.c
---- linux-2.4.24.org/fs/jffs2/background.c     2004-02-04 20:47:24.029526165 +0100
-+++ linux-2.4.24/fs/jffs2/background.c 2004-02-04 20:52:53.418014145 +0100
-@@ -106,9 +106,6 @@
-         sprintf(current->comm, "jffs2_gcd_mtd%d", c->mtd->index);
--      /* FIXME in the 2.2 backport */
--      current->nice = 10;
--
-       for (;;) {
-               spin_lock_irq(&current->sigmask_lock);
-               siginitsetinv (&current->blocked, sigmask(SIGHUP) | sigmask(SIGKILL) | sigmask(SIGSTOP) | sigmask(SIGCONT));
-diff -urN linux-2.4.24.org/fs/proc/array.c linux-2.4.24/fs/proc/array.c
---- linux-2.4.24.org/fs/proc/array.c   2004-02-04 20:47:14.980408395 +0100
-+++ linux-2.4.24/fs/proc/array.c       2004-02-04 20:52:53.447008114 +0100
-@@ -339,9 +339,8 @@
-       /* scale priority and nice values from timeslices to -20..20 */
-       /* to make it look like a "normal" Unix priority/nice value  */
--      priority = task->counter;
--      priority = 20 - (priority * 10 + DEF_COUNTER / 2) / DEF_COUNTER;
--      nice = task->nice;
-+      priority = task_prio(task);
-+      nice = task_nice(task);
-       read_lock(&tasklist_lock);
-       ppid = task->pid ? task->p_opptr->pid : 0;
-@@ -391,7 +390,7 @@
-               task->nswap,
-               task->cnswap,
-               task->exit_signal,
--              task->processor);
-+              task->cpu);
-       if(mm)
-               mmput(mm);
-       return res;
-diff -urN linux-2.4.24.org/fs/proc/proc_misc.c linux-2.4.24/fs/proc/proc_misc.c
---- linux-2.4.24.org/fs/proc/proc_misc.c       2004-02-04 20:47:14.897425655 +0100
-+++ linux-2.4.24/fs/proc/proc_misc.c   2004-02-04 20:52:53.485000212 +0100
-@@ -109,11 +109,11 @@
-       a = avenrun[0] + (FIXED_1/200);
-       b = avenrun[1] + (FIXED_1/200);
-       c = avenrun[2] + (FIXED_1/200);
--      len = sprintf(page,"%d.%02d %d.%02d %d.%02d %d/%d %d\n",
-+      len = sprintf(page,"%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
-               LOAD_INT(a), LOAD_FRAC(a),
-               LOAD_INT(b), LOAD_FRAC(b),
-               LOAD_INT(c), LOAD_FRAC(c),
--              nr_running, nr_threads, last_pid);
-+              nr_running(), nr_threads, last_pid);
-       return proc_calc_metrics(page, start, off, count, eof, len);
- }
-@@ -125,7 +125,7 @@
-       int len;
-       uptime = jiffies;
--      idle = init_tasks[0]->times.tms_utime + init_tasks[0]->times.tms_stime;
-+      idle = init_task.times.tms_utime + init_task.times.tms_stime;
-       /* The formula for the fraction parts really is ((t * 100) / HZ) % 100, but
-          that would overflow about every five days at HZ == 100.
-@@ -374,10 +374,10 @@
-       }
-       proc_sprintf(page, &off, &len,
--              "\nctxt %u\n"
-+              "\nctxt %lu\n"
-               "btime %lu\n"
-               "processes %lu\n",
--              kstat.context_swtch,
-+              nr_context_switches(),
-               xtime.tv_sec - jif / HZ,
-               total_forks);
-diff -urN linux-2.4.24.org/fs/reiserfs/buffer2.c linux-2.4.24/fs/reiserfs/buffer2.c
---- linux-2.4.24.org/fs/reiserfs/buffer2.c     2004-02-04 20:47:23.322673191 +0100
-+++ linux-2.4.24/fs/reiserfs/buffer2.c 2004-02-04 20:52:53.511994597 +0100
-@@ -51,11 +51,11 @@
- struct buffer_head  * reiserfs_bread (struct super_block *super, int n_block, int n_size) 
- {
-     struct buffer_head  *result;
--    PROC_EXP( unsigned int ctx_switches = kstat.context_swtch );
-+    PROC_EXP( unsigned int ctx_switches = nr_context_switches(); );
-     result = bread (super -> s_dev, n_block, n_size);
-     PROC_INFO_INC( super, breads );
--    PROC_EXP( if( kstat.context_swtch != ctx_switches ) 
-+    PROC_EXP( if( nr_context_switches() != ctx_switches ) 
-             PROC_INFO_INC( super, bread_miss ) );
-     return result;
- }
-diff -urN linux-2.4.24.org/include/asm-alpha/bitops.h linux-2.4.24/include/asm-alpha/bitops.h
---- linux-2.4.24.org/include/asm-alpha/bitops.h        2004-02-04 20:47:46.527846489 +0100
-+++ linux-2.4.24/include/asm-alpha/bitops.h    2004-02-04 20:52:53.537989191 +0100
-@@ -3,6 +3,7 @@
- #include <linux/config.h>
- #include <linux/kernel.h>
-+#include <asm/compiler.h>
- /*
-  * Copyright 1994, Linus Torvalds.
-@@ -60,25 +61,25 @@
-       __asm__ __volatile__(
-       "1:     ldl_l %0,%3\n"
--      "       and %0,%2,%0\n"
-+      "       bic %0,%2,%0\n"
-       "       stl_c %0,%1\n"
-       "       beq %0,2f\n"
-       ".subsection 2\n"
-       "2:     br 1b\n"
-       ".previous"
-       :"=&r" (temp), "=m" (*m)
--      :"Ir" (~(1UL << (nr & 31))), "m" (*m));
-+      :"Ir" (1UL << (nr & 31)), "m" (*m));
- }
- /*
-  * WARNING: non atomic version.
-  */
- static __inline__ void
--__change_bit(unsigned long nr, volatile void * addr)
-+__clear_bit(unsigned long nr, volatile void * addr)
- {
-       int *m = ((int *) addr) + (nr >> 5);
--      *m ^= 1 << (nr & 31);
-+      *m &= ~(1 << (nr & 31));
- }
- static inline void
-@@ -99,6 +100,17 @@
-       :"Ir" (1UL << (nr & 31)), "m" (*m));
- }
-+/*
-+ * WARNING: non atomic version.
-+ */
-+static __inline__ void
-+__change_bit(unsigned long nr, volatile void * addr)
-+{
-+      int *m = ((int *) addr) + (nr >> 5);
-+
-+      *m ^= 1 << (nr & 31);
-+}
-+
- static inline int
- test_and_set_bit(unsigned long nr, volatile void *addr)
- {
-@@ -181,20 +193,6 @@
-       return (old & mask) != 0;
- }
--/*
-- * WARNING: non atomic version.
-- */
--static __inline__ int
--__test_and_change_bit(unsigned long nr, volatile void * addr)
--{
--      unsigned long mask = 1 << (nr & 0x1f);
--      int *m = ((int *) addr) + (nr >> 5);
--      int old = *m;
--
--      *m = old ^ mask;
--      return (old & mask) != 0;
--}
--
- static inline int
- test_and_change_bit(unsigned long nr, volatile void * addr)
- {
-@@ -220,6 +218,20 @@
-       return oldbit != 0;
- }
-+/*
-+ * WARNING: non atomic version.
-+ */
-+static __inline__ int
-+__test_and_change_bit(unsigned long nr, volatile void * addr)
-+{
-+      unsigned long mask = 1 << (nr & 0x1f);
-+      int *m = ((int *) addr) + (nr >> 5);
-+      int old = *m;
-+
-+      *m = old ^ mask;
-+      return (old & mask) != 0;
-+}
-+
- static inline int
- test_bit(int nr, volatile void * addr)
- {
-@@ -235,12 +247,15 @@
-  */
- static inline unsigned long ffz_b(unsigned long x)
- {
--      unsigned long sum = 0;
-+      unsigned long sum, x1, x2, x4;
-       x = ~x & -~x;           /* set first 0 bit, clear others */
--      if (x & 0xF0) sum += 4;
--      if (x & 0xCC) sum += 2;
--      if (x & 0xAA) sum += 1;
-+      x1 = x & 0xAA;
-+      x2 = x & 0xCC;
-+      x4 = x & 0xF0;
-+      sum = x2 ? 2 : 0;
-+      sum += (x4 != 0) * 4;
-+      sum += (x1 != 0);
-       return sum;
- }
-@@ -257,24 +272,46 @@
-       __asm__("cmpbge %1,%2,%0" : "=r"(bits) : "r"(word), "r"(~0UL));
-       qofs = ffz_b(bits);
--      __asm__("extbl %1,%2,%0" : "=r"(bits) : "r"(word), "r"(qofs));
-+      bits = __kernel_extbl(word, qofs);
-       bofs = ffz_b(bits);
-       return qofs*8 + bofs;
- #endif
- }
-+/*
-+ * __ffs = Find First set bit in word.  Undefined if no set bit exists.
-+ */
-+static inline unsigned long __ffs(unsigned long word)
-+{
-+#if defined(__alpha_cix__) && defined(__alpha_fix__)
-+      /* Whee.  EV67 can calculate it directly.  */
-+      unsigned long result;
-+      __asm__("cttz %1,%0" : "=r"(result) : "r"(word));
-+      return result;
-+#else
-+      unsigned long bits, qofs, bofs;
-+
-+      __asm__("cmpbge $31,%1,%0" : "=r"(bits) : "r"(word));
-+      qofs = ffz_b(bits);
-+      bits = __kernel_extbl(word, qofs);
-+      bofs = ffz_b(~bits);
-+
-+      return qofs*8 + bofs;
-+#endif
-+}
-+
- #ifdef __KERNEL__
- /*
-  * ffs: find first bit set. This is defined the same way as
-  * the libc and compiler builtin ffs routines, therefore
-- * differs in spirit from the above ffz (man ffs).
-+ * differs in spirit from the above __ffs.
-  */
- static inline int ffs(int word)
- {
--      int result = ffz(~word);
-+      int result = __ffs(word);
-       return word ? result+1 : 0;
- }
-@@ -316,6 +353,14 @@
- #define hweight16(x) hweight64((x) & 0xfffful)
- #define hweight8(x)  hweight64((x) & 0xfful)
- #else
-+static inline unsigned long hweight64(unsigned long w)
-+{
-+      unsigned long result;
-+      for (result = 0; w ; w >>= 1)
-+              result += (w & 1);
-+      return result;
-+}
-+
- #define hweight32(x) generic_hweight32(x)
- #define hweight16(x) generic_hweight16(x)
- #define hweight8(x)  generic_hweight8(x)
-@@ -365,13 +410,77 @@
- }
- /*
-- * The optimizer actually does good code for this case..
-+ * Find next one bit in a bitmap reasonably efficiently.
-+ */
-+static inline unsigned long
-+find_next_bit(void * addr, unsigned long size, unsigned long offset)
-+{
-+      unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
-+      unsigned long result = offset & ~63UL;
-+      unsigned long tmp;
-+
-+      if (offset >= size)
-+              return size;
-+      size -= result;
-+      offset &= 63UL;
-+      if (offset) {
-+              tmp = *(p++);
-+              tmp &= ~0UL << offset;
-+              if (size < 64)
-+                      goto found_first;
-+              if (tmp)
-+                      goto found_middle;
-+              size -= 64;
-+              result += 64;
-+      }
-+      while (size & ~63UL) {
-+              if ((tmp = *(p++)))
-+                      goto found_middle;
-+              result += 64;
-+              size -= 64;
-+      }
-+      if (!size)
-+              return result;
-+      tmp = *p;
-+found_first:
-+      tmp &= ~0UL >> (64 - size);
-+      if (!tmp)
-+              return result + size;
-+found_middle:
-+      return result + __ffs(tmp);
-+}
-+
-+/*
-+ * The optimizer actually does good code for this case.
-  */
- #define find_first_zero_bit(addr, size) \
-       find_next_zero_bit((addr), (size), 0)
-+#define find_first_bit(addr, size) \
-+      find_next_bit((addr), (size), 0)
- #ifdef __KERNEL__
-+/*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 140-bit bitmap where the first 100 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 140
-+ * bits is set.
-+ */
-+static inline unsigned long
-+sched_find_first_bit(unsigned long b[3])
-+{
-+      unsigned long b0 = b[0], b1 = b[1], b2 = b[2];
-+      unsigned long ofs;
-+
-+      ofs = (b1 ? 64 : 128);
-+      b1 = (b1 ? b1 : b2);
-+      ofs = (b0 ? 0 : ofs);
-+      b0 = (b0 ? b0 : b1);
-+
-+      return __ffs(b0) + ofs;
-+}
-+
-+
- #define ext2_set_bit                 __test_and_set_bit
- #define ext2_clear_bit               __test_and_clear_bit
- #define ext2_test_bit                test_bit
-diff -urN linux-2.4.24.org/include/asm-alpha/smp.h linux-2.4.24/include/asm-alpha/smp.h
---- linux-2.4.24.org/include/asm-alpha/smp.h   2004-02-04 20:47:46.648821326 +0100
-+++ linux-2.4.24/include/asm-alpha/smp.h       2004-02-04 20:52:53.540988567 +0100
-@@ -55,7 +55,7 @@
- #define cpu_logical_map(cpu)  __cpu_logical_map[cpu]
- #define hard_smp_processor_id()       __hard_smp_processor_id()
--#define smp_processor_id()    (current->processor)
-+#define smp_processor_id()    (current->cpu)
- extern unsigned long cpu_present_mask;
- #define cpu_online_map cpu_present_mask
-diff -urN linux-2.4.24.org/include/asm-alpha/system.h linux-2.4.24/include/asm-alpha/system.h
---- linux-2.4.24.org/include/asm-alpha/system.h        2004-02-04 20:47:45.924971887 +0100
-+++ linux-2.4.24/include/asm-alpha/system.h    2004-02-04 20:52:53.545987527 +0100
-@@ -131,7 +131,6 @@
- extern void halt(void) __attribute__((noreturn));
- #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt))
--#define prepare_to_switch()   do { } while(0)
- #define switch_to(prev,next,last)                     \
- do {                                                  \
-       unsigned long pcbb;                             \
-diff -urN linux-2.4.24.org/include/asm-arm/bitops.h linux-2.4.24/include/asm-arm/bitops.h
---- linux-2.4.24.org/include/asm-arm/bitops.h  2004-02-04 20:48:05.614876374 +0100
-+++ linux-2.4.24/include/asm-arm/bitops.h      2004-02-04 20:52:53.589978377 +0100
-@@ -2,6 +2,8 @@
-  * Copyright 1995, Russell King.
-  * Various bits and pieces copyrights include:
-  *  Linus Torvalds (test_bit).
-+ * Big endian support: Copyright 2001, Nicolas Pitre
-+ *  reworked by rmk.
-  *
-  * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
-  *
-@@ -17,81 +19,271 @@
- #ifdef __KERNEL__
-+#include <asm/system.h>
-+
- #define smp_mb__before_clear_bit()    do { } while (0)
- #define smp_mb__after_clear_bit()     do { } while (0)
- /*
-- * Function prototypes to keep gcc -Wall happy.
-+ * These functions are the basis of our bit ops.
-+ * First, the atomic bitops.
-+ *
-+ * The endian issue for these functions is handled by the macros below.
-  */
--extern void set_bit(int nr, volatile void * addr);
-+static inline void
-+____atomic_set_bit_mask(unsigned int mask, volatile unsigned char *p)
-+{
-+      unsigned long flags;
-+
-+      local_irq_save(flags);
-+      *p |= mask;
-+      local_irq_restore(flags);
-+}
-+
-+static inline void
-+____atomic_clear_bit_mask(unsigned int mask, volatile unsigned char *p)
-+{
-+      unsigned long flags;
-+
-+      local_irq_save(flags);
-+      *p &= ~mask;
-+      local_irq_restore(flags);
-+}
-+
-+static inline void
-+____atomic_change_bit_mask(unsigned int mask, volatile unsigned char *p)
-+{
-+      unsigned long flags;
-+
-+      local_irq_save(flags);
-+      *p ^= mask;
-+      local_irq_restore(flags);
-+}
--static inline void __set_bit(int nr, volatile void *addr)
-+static inline int
-+____atomic_test_and_set_bit_mask(unsigned int mask, volatile unsigned char *p)
- {
--      ((unsigned char *) addr)[nr >> 3] |= (1U << (nr & 7));
-+      unsigned long flags;
-+      unsigned int res;
-+
-+      local_irq_save(flags);
-+      res = *p;
-+      *p = res | mask;
-+      local_irq_restore(flags);
-+
-+      return res & mask;
- }
--extern void clear_bit(int nr, volatile void * addr);
-+static inline int
-+____atomic_test_and_clear_bit_mask(unsigned int mask, volatile unsigned char *p)
-+{
-+      unsigned long flags;
-+      unsigned int res;
-+
-+      local_irq_save(flags);
-+      res = *p;
-+      *p = res & ~mask;
-+      local_irq_restore(flags);
-+
-+      return res & mask;
-+}
--static inline void __clear_bit(int nr, volatile void *addr)
-+static inline int
-+____atomic_test_and_change_bit_mask(unsigned int mask, volatile unsigned char *p)
- {
--      ((unsigned char *) addr)[nr >> 3] &= ~(1U << (nr & 7));
-+      unsigned long flags;
-+      unsigned int res;
-+
-+      local_irq_save(flags);
-+      res = *p;
-+      *p = res ^ mask;
-+      local_irq_restore(flags);
-+
-+      return res & mask;
- }
--extern void change_bit(int nr, volatile void * addr);
-+/*
-+ * Now the non-atomic variants.  We let the compiler handle all optimisations
-+ * for these.
-+ */
-+static inline void ____nonatomic_set_bit(int nr, volatile void *p)
-+{
-+      ((unsigned char *) p)[nr >> 3] |= (1U << (nr & 7));
-+}
--static inline void __change_bit(int nr, volatile void *addr)
-+static inline void ____nonatomic_clear_bit(int nr, volatile void *p)
- {
--      ((unsigned char *) addr)[nr >> 3] ^= (1U << (nr & 7));
-+      ((unsigned char *) p)[nr >> 3] &= ~(1U << (nr & 7));
- }
--extern int test_and_set_bit(int nr, volatile void * addr);
-+static inline void ____nonatomic_change_bit(int nr, volatile void *p)
-+{
-+      ((unsigned char *) p)[nr >> 3] ^= (1U << (nr & 7));
-+}
--static inline int __test_and_set_bit(int nr, volatile void *addr)
-+static inline int ____nonatomic_test_and_set_bit(int nr, volatile void *p)
- {
-       unsigned int mask = 1 << (nr & 7);
-       unsigned int oldval;
--      oldval = ((unsigned char *) addr)[nr >> 3];
--      ((unsigned char *) addr)[nr >> 3] = oldval | mask;
-+      oldval = ((unsigned char *) p)[nr >> 3];
-+      ((unsigned char *) p)[nr >> 3] = oldval | mask;
-       return oldval & mask;
- }
--extern int test_and_clear_bit(int nr, volatile void * addr);
--
--static inline int __test_and_clear_bit(int nr, volatile void *addr)
-+static inline int ____nonatomic_test_and_clear_bit(int nr, volatile void *p)
- {
-       unsigned int mask = 1 << (nr & 7);
-       unsigned int oldval;
--      oldval = ((unsigned char *) addr)[nr >> 3];
--      ((unsigned char *) addr)[nr >> 3] = oldval & ~mask;
-+      oldval = ((unsigned char *) p)[nr >> 3];
-+      ((unsigned char *) p)[nr >> 3] = oldval & ~mask;
-       return oldval & mask;
- }
--extern int test_and_change_bit(int nr, volatile void * addr);
--
--static inline int __test_and_change_bit(int nr, volatile void *addr)
-+static inline int ____nonatomic_test_and_change_bit(int nr, volatile void *p)
- {
-       unsigned int mask = 1 << (nr & 7);
-       unsigned int oldval;
--      oldval = ((unsigned char *) addr)[nr >> 3];
--      ((unsigned char *) addr)[nr >> 3] = oldval ^ mask;
-+      oldval = ((unsigned char *) p)[nr >> 3];
-+      ((unsigned char *) p)[nr >> 3] = oldval ^ mask;
-       return oldval & mask;
- }
--extern int find_first_zero_bit(void * addr, unsigned size);
--extern int find_next_zero_bit(void * addr, int size, int offset);
--
- /*
-  * This routine doesn't need to be atomic.
-  */
--static inline int test_bit(int nr, const void * addr)
-+static inline int ____test_bit(int nr, const void * p)
- {
--    return (((unsigned char *) addr)[nr >> 3] >> (nr & 7)) & 1;
-+    return (((volatile unsigned char *) p)[nr >> 3] >> (nr & 7)) & 1;
- }     
- /*
-+ *  A note about Endian-ness.
-+ *  -------------------------
-+ *
-+ * When the ARM is put into big endian mode via CR15, the processor
-+ * merely swaps the order of bytes within words, thus:
-+ *
-+ *          ------------ physical data bus bits -----------
-+ *          D31 ... D24  D23 ... D16  D15 ... D8  D7 ... D0
-+ * little     byte 3       byte 2       byte 1      byte 0
-+ * big        byte 0       byte 1       byte 2      byte 3
-+ *
-+ * This means that reading a 32-bit word at address 0 returns the same
-+ * value irrespective of the endian mode bit.
-+ *
-+ * Peripheral devices should be connected with the data bus reversed in
-+ * "Big Endian" mode.  ARM Application Note 61 is applicable, and is
-+ * available from http://www.arm.com/.
-+ *
-+ * The following assumes that the data bus connectivity for big endian
-+ * mode has been followed.
-+ *
-+ * Note that bit 0 is defined to be 32-bit word bit 0, not byte 0 bit 0.
-+ */
-+
-+/*
-+ * Little endian assembly bitops.  nr = 0 -> byte 0 bit 0.
-+ */
-+extern void _set_bit_le(int nr, volatile void * p);
-+extern void _clear_bit_le(int nr, volatile void * p);
-+extern void _change_bit_le(int nr, volatile void * p);
-+extern int _test_and_set_bit_le(int nr, volatile void * p);
-+extern int _test_and_clear_bit_le(int nr, volatile void * p);
-+extern int _test_and_change_bit_le(int nr, volatile void * p);
-+extern int _find_first_zero_bit_le(void * p, unsigned size);
-+extern int _find_next_zero_bit_le(void * p, int size, int offset);
-+
-+/*
-+ * Big endian assembly bitops.  nr = 0 -> byte 3 bit 0.
-+ */
-+extern void _set_bit_be(int nr, volatile void * p);
-+extern void _clear_bit_be(int nr, volatile void * p);
-+extern void _change_bit_be(int nr, volatile void * p);
-+extern int _test_and_set_bit_be(int nr, volatile void * p);
-+extern int _test_and_clear_bit_be(int nr, volatile void * p);
-+extern int _test_and_change_bit_be(int nr, volatile void * p);
-+extern int _find_first_zero_bit_be(void * p, unsigned size);
-+extern int _find_next_zero_bit_be(void * p, int size, int offset);
-+
-+
-+/*
-+ * The __* form of bitops are non-atomic and may be reordered.
-+ */
-+#define       ATOMIC_BITOP_LE(name,nr,p)              \
-+      (__builtin_constant_p(nr) ?             \
-+       ____atomic_##name##_mask(1 << ((nr) & 7), \
-+                      ((unsigned char *)(p)) + ((nr) >> 3)) : \
-+       _##name##_le(nr,p))
-+
-+#define       ATOMIC_BITOP_BE(name,nr,p)              \
-+      (__builtin_constant_p(nr) ?             \
-+       ____atomic_##name##_mask(1 << ((nr) & 7), \
-+                      ((unsigned char *)(p)) + (((nr) >> 3) ^ 3)) : \
-+       _##name##_be(nr,p))
-+
-+#define NONATOMIC_BITOP_LE(name,nr,p) \
-+      (____nonatomic_##name(nr, p))
-+
-+#define NONATOMIC_BITOP_BE(name,nr,p) \
-+      (____nonatomic_##name(nr ^ 0x18, p))
-+
-+#ifndef __ARMEB__
-+/*
-+ * These are the little endian, atomic definitions.
-+ */
-+#define set_bit(nr,p)                 ATOMIC_BITOP_LE(set_bit,nr,p)
-+#define clear_bit(nr,p)                       ATOMIC_BITOP_LE(clear_bit,nr,p)
-+#define change_bit(nr,p)              ATOMIC_BITOP_LE(change_bit,nr,p)
-+#define test_and_set_bit(nr,p)                ATOMIC_BITOP_LE(test_and_set_bit,nr,p)
-+#define test_and_clear_bit(nr,p)      ATOMIC_BITOP_LE(test_and_clear_bit,nr,p)
-+#define test_and_change_bit(nr,p)     ATOMIC_BITOP_LE(test_and_change_bit,nr,p)
-+#define test_bit(nr,p)                        ____test_bit(nr,p)
-+#define find_first_zero_bit(p,sz)     _find_first_zero_bit_le(p,sz)
-+#define find_next_zero_bit(p,sz,off)  _find_next_zero_bit_le(p,sz,off)
-+
-+/*
-+ * These are the little endian, non-atomic definitions.
-+ */
-+#define __set_bit(nr,p)                       NONATOMIC_BITOP_LE(set_bit,nr,p)
-+#define __clear_bit(nr,p)             NONATOMIC_BITOP_LE(clear_bit,nr,p)
-+#define __change_bit(nr,p)            NONATOMIC_BITOP_LE(change_bit,nr,p)
-+#define __test_and_set_bit(nr,p)      NONATOMIC_BITOP_LE(test_and_set_bit,nr,p)
-+#define __test_and_clear_bit(nr,p)    NONATOMIC_BITOP_LE(test_and_clear_bit,nr,p)
-+#define __test_and_change_bit(nr,p)   NONATOMIC_BITOP_LE(test_and_change_bit,nr,p)
-+#define __test_bit(nr,p)              ____test_bit(nr,p)
-+
-+#else
-+
-+/*
-+ * These are the big endian, atomic definitions.
-+ */
-+#define set_bit(nr,p)                 ATOMIC_BITOP_BE(set_bit,nr,p)
-+#define clear_bit(nr,p)                       ATOMIC_BITOP_BE(clear_bit,nr,p)
-+#define change_bit(nr,p)              ATOMIC_BITOP_BE(change_bit,nr,p)
-+#define test_and_set_bit(nr,p)                ATOMIC_BITOP_BE(test_and_set_bit,nr,p)
-+#define test_and_clear_bit(nr,p)      ATOMIC_BITOP_BE(test_and_clear_bit,nr,p)
-+#define test_and_change_bit(nr,p)     ATOMIC_BITOP_BE(test_and_change_bit,nr,p)
-+#define test_bit(nr,p)                        ____test_bit((nr) ^ 0x18, p)
-+#define find_first_zero_bit(p,sz)     _find_first_zero_bit_be(p,sz)
-+#define find_next_zero_bit(p,sz,off)  _find_next_zero_bit_be(p,sz,off)
-+
-+/*
-+ * These are the big endian, non-atomic definitions.
-+ */
-+#define __set_bit(nr,p)                       NONATOMIC_BITOP_BE(set_bit,nr,p)
-+#define __clear_bit(nr,p)             NONATOMIC_BITOP_BE(clear_bit,nr,p)
-+#define __change_bit(nr,p)            NONATOMIC_BITOP_BE(change_bit,nr,p)
-+#define __test_and_set_bit(nr,p)      NONATOMIC_BITOP_BE(test_and_set_bit,nr,p)
-+#define __test_and_clear_bit(nr,p)    NONATOMIC_BITOP_BE(test_and_clear_bit,nr,p)
-+#define __test_and_change_bit(nr,p)   NONATOMIC_BITOP_BE(test_and_change_bit,nr,p)
-+#define __test_bit(nr,p)              ____test_bit((nr) ^ 0x18, p)
-+
-+#endif
-+
-+/*
-  * ffz = Find First Zero in word. Undefined if no zero exists,
-  * so code should check against ~0UL first..
-  */
-@@ -110,6 +302,29 @@
- }
- /*
-+ * ffz = Find First Zero in word. Undefined if no zero exists,
-+ * so code should check against ~0UL first..
-+ */
-+static inline unsigned long __ffs(unsigned long word)
-+{
-+      int k;
-+
-+      k = 31;
-+      if (word & 0x0000ffff) { k -= 16; word <<= 16; }
-+      if (word & 0x00ff0000) { k -= 8;  word <<= 8;  }
-+      if (word & 0x0f000000) { k -= 4;  word <<= 4;  }
-+      if (word & 0x30000000) { k -= 2;  word <<= 2;  }
-+      if (word & 0x40000000) { k -= 1; }
-+        return k;
-+}
-+
-+/*
-+ * fls: find last bit set.
-+ */
-+
-+#define fls(x) generic_fls(x)
-+
-+/*
-  * ffs: find first bit set. This is defined the same way as
-  * the libc and compiler builtin ffs routines, therefore
-  * differs in spirit from the above ffz (man ffs).
-@@ -118,6 +333,22 @@
- #define ffs(x) generic_ffs(x)
- /*
-+ * Find first bit set in a 168-bit bitmap, where the first
-+ * 128 bits are unlikely to be set.
-+ */
-+static inline int sched_find_first_bit(unsigned long *b)
-+{
-+      unsigned long v;
-+      unsigned int off;
-+
-+      for (off = 0; v = b[off], off < 4; off++) {
-+              if (unlikely(v))
-+                      break;
-+      }
-+      return __ffs(v) + off * 32;
-+}
-+
-+/*
-  * hweightN: returns the hamming weight (i.e. the number
-  * of bits set) of a N-bit word
-  */
-@@ -126,18 +357,25 @@
- #define hweight16(x) generic_hweight16(x)
- #define hweight8(x) generic_hweight8(x)
--#define ext2_set_bit                  test_and_set_bit
--#define ext2_clear_bit                        test_and_clear_bit
--#define ext2_test_bit                 test_bit
--#define ext2_find_first_zero_bit      find_first_zero_bit
--#define ext2_find_next_zero_bit               find_next_zero_bit
--
--/* Bitmap functions for the minix filesystem. */
--#define minix_test_and_set_bit(nr,addr)       test_and_set_bit(nr,addr)
--#define minix_set_bit(nr,addr)                set_bit(nr,addr)
--#define minix_test_and_clear_bit(nr,addr)     test_and_clear_bit(nr,addr)
--#define minix_test_bit(nr,addr)               test_bit(nr,addr)
--#define minix_find_first_zero_bit(addr,size)  find_first_zero_bit(addr,size)
-+/*
-+ * Ext2 is defined to use little-endian byte ordering.
-+ * These do not need to be atomic.
-+ */
-+#define ext2_set_bit(nr,p)                    NONATOMIC_BITOP_LE(test_and_set_bit,nr,p)
-+#define ext2_clear_bit(nr,p)                  NONATOMIC_BITOP_LE(test_and_clear_bit,nr,p)
-+#define ext2_test_bit(nr,p)                   __test_bit(nr,p)
-+#define ext2_find_first_zero_bit(p,sz)                _find_first_zero_bit_le(p,sz)
-+#define ext2_find_next_zero_bit(p,sz,off)     _find_next_zero_bit_le(p,sz,off)
-+
-+/*
-+ * Minix is defined to use little-endian byte ordering.
-+ * These do not need to be atomic.
-+ */
-+#define minix_set_bit(nr,p)                   NONATOMIC_BITOP_LE(set_bit,nr,p)
-+#define minix_test_bit(nr,p)                  __test_bit(nr,p)
-+#define minix_test_and_set_bit(nr,p)          NONATOMIC_BITOP_LE(test_and_set_bit,nr,p)
-+#define minix_test_and_clear_bit(nr,p)                NONATOMIC_BITOP_LE(test_and_clear_bit,nr,p)
-+#define minix_find_first_zero_bit(p,sz)               _find_first_zero_bit_le(p,sz)
- #endif /* __KERNEL__ */
-diff -urN linux-2.4.24.org/include/asm-cris/bitops.h linux-2.4.24/include/asm-cris/bitops.h
---- linux-2.4.24.org/include/asm-cris/bitops.h 2004-02-04 20:48:26.679494929 +0100
-+++ linux-2.4.24/include/asm-cris/bitops.h     2004-02-04 20:52:53.595977130 +0100
-@@ -22,6 +22,7 @@
- /* We use generic_ffs so get it; include guards resolve the possible
-    mutually inclusion.  */
- #include <linux/bitops.h>
-+#include <linux/compiler.h>
- /*
-  * Some hacks to defeat gcc over-optimizations..
-@@ -44,6 +45,8 @@
- #define set_bit(nr, addr)    (void)test_and_set_bit(nr, addr)
- #define __set_bit(nr, addr)    (void)__test_and_set_bit(nr, addr)
-+#define __set_bit(nr, addr)    (void)__test_and_set_bit(nr, addr)
-+
- /*
-  * clear_bit - Clears a bit in memory
-  * @nr: Bit to clear
-@@ -58,6 +61,8 @@
- #define clear_bit(nr, addr)  (void)test_and_clear_bit(nr, addr)
- #define __clear_bit(nr, addr)  (void)__test_and_clear_bit(nr, addr)
-+#define __clear_bit(nr, addr)  (void)__test_and_clear_bit(nr, addr)
-+
- /*
-  * change_bit - Toggle a bit in memory
-  * @nr: Bit to change
-@@ -91,7 +96,7 @@
-  * It also implies a memory barrier.
-  */
--extern __inline__ int test_and_set_bit(int nr, void *addr)
-+extern inline int test_and_set_bit(int nr, void *addr)
- {
-       unsigned int mask, retval;
-       unsigned long flags;
-@@ -119,6 +124,18 @@
-       return retval;
- }
-+extern inline int __test_and_set_bit(int nr, void *addr)
-+{
-+      unsigned int mask, retval;
-+      unsigned int *adr = (unsigned int *)addr;
-+      
-+      adr += nr >> 5;
-+      mask = 1 << (nr & 0x1f);
-+      retval = (mask & *adr) != 0;
-+      *adr |= mask;
-+      return retval;
-+}
-+
- /*
-  * clear_bit() doesn't provide any barrier for the compiler.
-  */
-@@ -134,7 +151,7 @@
-  * It also implies a memory barrier.
-  */
--extern __inline__ int test_and_clear_bit(int nr, void *addr)
-+extern inline int test_and_clear_bit(int nr, void *addr)
- {
-       unsigned int mask, retval;
-       unsigned long flags;
-@@ -160,7 +177,7 @@
-  * but actually fail.  You must protect multiple accesses with a lock.
-  */
--extern __inline__ int __test_and_clear_bit(int nr, void *addr)
-+extern inline int __test_and_clear_bit(int nr, void *addr)
- {
-       unsigned int mask, retval;
-       unsigned int *adr = (unsigned int *)addr;
-@@ -180,7 +197,7 @@
-  * It also implies a memory barrier.
-  */
--extern __inline__ int test_and_change_bit(int nr, void *addr)
-+extern inline int test_and_change_bit(int nr, void *addr)
- {
-       unsigned int mask, retval;
-       unsigned long flags;
-@@ -197,7 +214,7 @@
- /* WARNING: non atomic and it can be reordered! */
--extern __inline__ int __test_and_change_bit(int nr, void *addr)
-+extern inline int __test_and_change_bit(int nr, void *addr)
- {
-       unsigned int mask, retval;
-       unsigned int *adr = (unsigned int *)addr;
-@@ -218,7 +235,7 @@
-  * This routine doesn't need to be atomic.
-  */
--extern __inline__ int test_bit(int nr, const void *addr)
-+extern inline int test_bit(int nr, const void *addr)
- {
-       unsigned int mask;
-       unsigned int *adr = (unsigned int *)addr;
-@@ -239,7 +256,7 @@
-  * number.  They differ in that the first function also inverts all bits
-  * in the input.
-  */
--extern __inline__ unsigned long cris_swapnwbrlz(unsigned long w)
-+extern inline unsigned long cris_swapnwbrlz(unsigned long w)
- {
-       /* Let's just say we return the result in the same register as the
-          input.  Saying we clobber the input but can return the result
-@@ -255,7 +272,7 @@
-       return res;
- }
--extern __inline__ unsigned long cris_swapwbrlz(unsigned long w)
-+extern inline unsigned long cris_swapwbrlz(unsigned long w)
- {
-       unsigned res;
-       __asm__ ("swapwbr %0 \n\t"
-@@ -269,7 +286,7 @@
-  * ffz = Find First Zero in word. Undefined if no zero exists,
-  * so code should check against ~0UL first..
-  */
--extern __inline__ unsigned long ffz(unsigned long w)
-+extern inline unsigned long ffz(unsigned long w)
- {
-       /* The generic_ffs function is used to avoid the asm when the
-          argument is a constant.  */
-@@ -282,7 +299,7 @@
-  * Somewhat like ffz but the equivalent of generic_ffs: in contrast to
-  * ffz we return the first one-bit *plus one*.
-  */
--extern __inline__ unsigned long kernel_ffs(unsigned long w)
-+extern inline unsigned long kernel_ffs(unsigned long w)
- {
-       /* The generic_ffs function is used to avoid the asm when the
-          argument is a constant.  */
-@@ -304,7 +321,7 @@
-  * @offset: The bitnumber to start searching at
-  * @size: The maximum size to search
-  */
--extern __inline__ int find_next_zero_bit (void * addr, int size, int offset)
-+extern inline int find_next_zero_bit (void * addr, int size, int offset)
- {
-       unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
-       unsigned long result = offset & ~31UL;
-@@ -375,7 +392,45 @@
- #define minix_test_bit(nr,addr) test_bit(nr,addr)
- #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
--#endif /* __KERNEL__ */
-+#if 0
-+/* TODO: see below */
-+#define sched_find_first_zero_bit(addr) find_first_zero_bit(addr, 168)
-+
-+#else
-+/* TODO: left out pending where to put it.. (there are .h dependencies) */
-+
-+ /*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 168-bit bitmap where the first 128 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 168
-+ * bits is cleared.
-+ */
-+#if 0
-+#if MAX_RT_PRIO != 128 || MAX_PRIO != 168
-+# error update this function.
-+#endif
-+#else
-+#define MAX_RT_PRIO 128
-+#define MAX_PRIO 168
-+#endif
-+
-+static inline int sched_find_first_zero_bit(char *bitmap)
-+{
-+      unsigned int *b = (unsigned int *)bitmap;
-+      unsigned int rt;
-+
-+      rt = b[0] & b[1] & b[2] & b[3];
-+      if (unlikely(rt != 0xffffffff))
-+              return find_first_zero_bit(bitmap, MAX_RT_PRIO);
-+
-+      if (b[4] != ~0)
-+              return ffz(b[4]) + MAX_RT_PRIO;
-+      return ffz(b[5]) + 32 + MAX_RT_PRIO;
-+}
-+#undef MAX_PRIO
-+#undef MAX_RT_PRIO
-+#endif
-+#endif /* __KERNEL__ */
- #endif /* _CRIS_BITOPS_H */
-diff -urN linux-2.4.24.org/include/asm-generic/bitops.h linux-2.4.24/include/asm-generic/bitops.h
---- linux-2.4.24.org/include/asm-generic/bitops.h      2004-02-04 20:47:40.855026441 +0100
-+++ linux-2.4.24/include/asm-generic/bitops.h  2004-02-04 20:52:53.630969851 +0100
-@@ -51,6 +51,12 @@
-       return ((mask & *addr) != 0);
- }
-+/*
-+ * fls: find last bit set.
-+ */
-+
-+#define fls(x) generic_fls(x)
-+
- #ifdef __KERNEL__
- /*
-diff -urN linux-2.4.24.org/include/asm-i386/bitops.h linux-2.4.24/include/asm-i386/bitops.h
---- linux-2.4.24.org/include/asm-i386/bitops.h 2004-02-04 20:47:40.983999614 +0100
-+++ linux-2.4.24/include/asm-i386/bitops.h     2004-02-04 20:52:53.655964653 +0100
-@@ -6,6 +6,7 @@
-  */
- #include <linux/config.h>
-+#include <linux/compiler.h>
- /*
-  * These have to be done with inline assembly: that way the bit-setting
-@@ -75,6 +76,14 @@
-               :"=m" (ADDR)
-               :"Ir" (nr));
- }
-+
-+static __inline__ void __clear_bit(int nr, volatile void * addr)
-+{
-+      __asm__ __volatile__(
-+              "btrl %1,%0"
-+              :"=m" (ADDR)
-+              :"Ir" (nr));
-+}
- #define smp_mb__before_clear_bit()    barrier()
- #define smp_mb__after_clear_bit()     barrier()
-@@ -284,6 +293,34 @@
- }
- /**
-+ * find_first_bit - find the first set bit in a memory region
-+ * @addr: The address to start the search at
-+ * @size: The maximum size to search
-+ *
-+ * Returns the bit-number of the first set bit, not the number of the byte
-+ * containing a bit.
-+ */
-+static __inline__ int find_first_bit(void * addr, unsigned size)
-+{
-+      int d0, d1;
-+      int res;
-+
-+      /* This looks at memory. Mark it volatile to tell gcc not to move it around */
-+      __asm__ __volatile__(
-+              "xorl %%eax,%%eax\n\t"
-+              "repe; scasl\n\t"
-+              "jz 1f\n\t"
-+              "leal -4(%%edi),%%edi\n\t"
-+              "bsfl (%%edi),%%eax\n"
-+              "1:\tsubl %%ebx,%%edi\n\t"
-+              "shll $3,%%edi\n\t"
-+              "addl %%edi,%%eax"
-+              :"=a" (res), "=&c" (d0), "=&D" (d1)
-+              :"1" ((size + 31) >> 5), "2" (addr), "b" (addr));
-+      return res;
-+}
-+
-+/**
-  * find_next_zero_bit - find the first zero bit in a memory region
-  * @addr: The address to base the search on
-  * @offset: The bitnumber to start searching at
-@@ -296,7 +333,7 @@
-       
-       if (bit) {
-               /*
--               * Look for zero in first byte
-+               * Look for zero in the first 32 bits.
-                */
-               __asm__("bsfl %1,%0\n\t"
-                       "jne 1f\n\t"
-@@ -317,6 +354,39 @@
- }
- /**
-+ * find_next_bit - find the first set bit in a memory region
-+ * @addr: The address to base the search on
-+ * @offset: The bitnumber to start searching at
-+ * @size: The maximum size to search
-+ */
-+static __inline__ int find_next_bit (void * addr, int size, int offset)
-+{
-+      unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
-+      int set = 0, bit = offset & 31, res;
-+      
-+      if (bit) {
-+              /*
-+               * Look for nonzero in the first 32 bits:
-+               */
-+              __asm__("bsfl %1,%0\n\t"
-+                      "jne 1f\n\t"
-+                      "movl $32, %0\n"
-+                      "1:"
-+                      : "=r" (set)
-+                      : "r" (*p >> bit));
-+              if (set < (32 - bit))
-+                      return set + offset;
-+              set = 32 - bit;
-+              p++;
-+      }
-+      /*
-+       * No set bit yet, search remaining full words for a bit
-+       */
-+      res = find_first_bit (p, size - 32 * (p - (unsigned long *) addr));
-+      return (offset + set + res);
-+}
-+
-+/**
-  * ffz - find first zero in word.
-  * @word: The word to search
-  *
-@@ -330,8 +400,41 @@
-       return word;
- }
-+/**
-+ * __ffs - find first bit in word.
-+ * @word: The word to search
-+ * Undefined if no bit exists, so code should check against 0 first.
-+ */
-+static __inline__ unsigned long __ffs(unsigned long word)
-+{
-+      __asm__("bsfl %1,%0"
-+              :"=r" (word)
-+              :"rm" (word));
-+      return word;
-+}
-+#define fls(x) generic_fls(x)
-+
- #ifdef __KERNEL__
-+/*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 140-bit bitmap where the first 100 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 140
-+ * bits is cleared.
-+ */
-+static inline int sched_find_first_bit(unsigned long *b)
-+{
-+      if (unlikely(b[0]))
-+              return __ffs(b[0]);
-+      if (unlikely(b[1]))
-+              return __ffs(b[1]) + 32;
-+      if (unlikely(b[2]))
-+              return __ffs(b[2]) + 64;
-+      if (b[3])
-+              return __ffs(b[3]) + 96;
-+      return __ffs(b[4]) + 128;
-+}
-+
- /**
-  * ffs - find first bit set
-  * @x: the word to search
-diff -urN linux-2.4.24.org/include/asm-i386/mmu_context.h linux-2.4.24/include/asm-i386/mmu_context.h
---- linux-2.4.24.org/include/asm-i386/mmu_context.h    2004-02-04 20:47:41.355922254 +0100
-+++ linux-2.4.24/include/asm-i386/mmu_context.h        2004-02-04 20:57:00.389646201 +0100
-@@ -29,7 +29,7 @@
- static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu)
- {
--      if (prev != next) {
-+      if (likely(prev != next)) {
-               /* stop flush ipis for the previous mm */
-               clear_bit(cpu, &prev->cpu_vm_mask);
- #ifdef CONFIG_SMP
-@@ -42,7 +42,7 @@
-               /* load_LDT, if either the previous or next thread
-                * has a non-default LDT.
-                */
--              if (next->context.size+prev->context.size)
-+              if (unlikely(next->context.size+prev->context.size))
-                       load_LDT(&next->context);
-       }
- #ifdef CONFIG_SMP
-diff -urN linux-2.4.24.org/include/asm-i386/processor.h linux-2.4.24/include/asm-i386/processor.h
---- linux-2.4.24.org/include/asm-i386/processor.h      2004-02-04 20:47:40.967003150 +0100
-+++ linux-2.4.24/include/asm-i386/processor.h  2004-02-04 20:52:53.702954879 +0100
-@@ -498,6 +498,8 @@
- #define cpu_relax()   rep_nop()
-+#define ARCH_HAS_SMP_BALANCE
-+
- /* Prefetch instructions for Pentium III and AMD Athlon */
- #if defined(CONFIG_MPENTIUMIII) || defined (CONFIG_MPENTIUM4)
-diff -urN linux-2.4.24.org/include/asm-i386/smp_balance.h linux-2.4.24/include/asm-i386/smp_balance.h
---- linux-2.4.24.org/include/asm-i386/smp_balance.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/include/asm-i386/smp_balance.h        2004-02-04 20:52:53.705954255 +0100
-@@ -0,0 +1,66 @@
-+#ifndef _ASM_SMP_BALANCE_H
-+#define _ASM_SMP_BALANCE_H
-+
-+/*
-+ * We have an architecture-specific SMP load balancer to improve
-+ * scheduling behavior on hyperthreaded CPUs.  Since only P4s have
-+ * HT, maybe this should be conditional on CONFIG_MPENTIUM4...
-+ *
-+ */
-+
-+/*
-+ * Find any idle processor package (i.e. both virtual processors are idle)
-+ */
-+static inline int find_idle_package(int this_cpu)
-+{
-+      int i;
-+
-+      this_cpu = cpu_number_map(this_cpu);
-+
-+      for (i = (this_cpu + 1) % smp_num_cpus;
-+           i != this_cpu;
-+           i = (i + 1) % smp_num_cpus) {
-+              int physical = cpu_logical_map(i);
-+              int sibling = cpu_sibling_map[physical];
-+
-+              if (idle_cpu(physical) && idle_cpu(sibling))
-+                      return physical;
-+      }
-+      return -1;      /* not found */
-+}
-+
-+static inline int arch_reschedule_idle_override(task_t * p, int idle)
-+{
-+      if (unlikely(smp_num_siblings > 1) && !idle_cpu(cpu_sibling_map[idle])) {
-+              int true_idle = find_idle_package(idle);
-+              if (true_idle >= 0) {
-+                      if (likely(p->cpus_allowed & (1UL << true_idle)))
-+                              idle = true_idle;
-+                      else {
-+                              true_idle = cpu_sibling_map[true_idle];
-+                              if (p->cpus_allowed & (1UL << true_idle))
-+                                      idle = true_idle;
-+                      }
-+              }
-+      }
-+
-+      return idle;
-+}
-+
-+static inline int arch_load_balance(int this_cpu, int idle)
-+{
-+      /* Special hack for hyperthreading */
-+       if (unlikely(smp_num_siblings > 1 && idle == 2 && !idle_cpu(cpu_sibling_map[this_cpu]))) {
-+               int found;
-+               struct runqueue *rq_target;
-+
-+               if ((found = find_idle_package(this_cpu)) >= 0 ) {
-+                       rq_target = cpu_rq(found);
-+                       resched_task(rq_target->idle);
-+                       return 1;
-+               }
-+       }
-+       return 0;
-+}
-+
-+#endif /* _ASM_SMP_BALANCE_H */
-diff -urN linux-2.4.24.org/include/asm-i386/smp.h linux-2.4.24/include/asm-i386/smp.h
---- linux-2.4.24.org/include/asm-i386/smp.h    2004-02-04 20:47:41.153964261 +0100
-+++ linux-2.4.24/include/asm-i386/smp.h        2004-02-04 20:52:53.733948432 +0100
-@@ -40,6 +40,7 @@
- extern void smp_flush_tlb(void);
- extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
- extern void fastcall smp_send_reschedule(int cpu);
-+extern void smp_send_reschedule_all(void);
- extern void smp_invalidate_rcv(void);         /* Process an NMI */
- extern void (*mtrr_hook) (void);
- extern void zap_low_mappings (void);
-@@ -81,7 +82,7 @@
-  * so this is correct in the x86 case.
-  */
--#define smp_processor_id() (current->processor)
-+#define smp_processor_id() (current->cpu)
- static __inline int hard_smp_processor_id(void)
- {
-@@ -99,17 +100,5 @@
- #define NO_PROC_ID            0xFF            /* No processor magic marker */
--/*
-- *    This magic constant controls our willingness to transfer
-- *    a process across CPUs. Such a transfer incurs misses on the L1
-- *    cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
-- *    gut feeling is this will vary by board in value. For a board
-- *    with separate L2 cache it probably depends also on the RSS, and
-- *    for a board with shared L2 cache it ought to decay fast as other
-- *    processes are run.
-- */
-- 
--#define PROC_CHANGE_PENALTY   15              /* Schedule penalty */
--
- #endif
- #endif
-diff -urN linux-2.4.24.org/include/asm-i386/system.h linux-2.4.24/include/asm-i386/system.h
---- linux-2.4.24.org/include/asm-i386/system.h 2004-02-04 20:47:40.963003981 +0100
-+++ linux-2.4.24/include/asm-i386/system.h     2004-02-04 20:52:53.759943026 +0100
-@@ -12,25 +12,22 @@
- struct task_struct;   /* one of the stranger aspects of C forward declarations.. */
- extern void FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next));
--#define prepare_to_switch()   do { } while(0)
- #define switch_to(prev,next,last) do {                                        \
-       asm volatile("pushl %%esi\n\t"                                  \
-                    "pushl %%edi\n\t"                                  \
-                    "pushl %%ebp\n\t"                                  \
-                    "movl %%esp,%0\n\t"        /* save ESP */          \
--                   "movl %3,%%esp\n\t"        /* restore ESP */       \
-+                   "movl %2,%%esp\n\t"        /* restore ESP */       \
-                    "movl $1f,%1\n\t"          /* save EIP */          \
--                   "pushl %4\n\t"             /* restore EIP */       \
-+                   "pushl %3\n\t"             /* restore EIP */       \
-                    "jmp __switch_to\n"                                \
-                    "1:\t"                                             \
-                    "popl %%ebp\n\t"                                   \
-                    "popl %%edi\n\t"                                   \
-                    "popl %%esi\n\t"                                   \
--                   :"=m" (prev->thread.esp),"=m" (prev->thread.eip),  \
--                    "=b" (last)                                       \
-+                   :"=m" (prev->thread.esp),"=m" (prev->thread.eip)   \
-                    :"m" (next->thread.esp),"m" (next->thread.eip),    \
--                    "a" (prev), "d" (next),                           \
--                    "b" (prev));                                      \
-+                    "a" (prev), "d" (next));                          \
- } while (0)
- #define _set_base(addr,base) do { unsigned long __pr; \
-diff -urN linux-2.4.24.org/include/asm-ia64/bitops.h linux-2.4.24/include/asm-ia64/bitops.h
---- linux-2.4.24.org/include/asm-ia64/bitops.h 2004-02-04 20:48:16.659579072 +0100
-+++ linux-2.4.24/include/asm-ia64/bitops.h     2004-02-04 20:52:53.793935955 +0100
-@@ -4,6 +4,9 @@
- /*
-  * Copyright (C) 1998-2003 Hewlett-Packard Co
-  *    David Mosberger-Tang <davidm@hpl.hp.com>
-+ *
-+ * 02/06/02 find_next_bit() and find_first_bit() added from Erich Focht's ia64 O(1)
-+ *        scheduler patch
-  */
- #include <linux/types.h>
-@@ -91,6 +94,17 @@
- }
- /**
-+ * __clear_bit - Clears a bit in memory (non-atomic version)
-+ */
-+static __inline__ void
-+__clear_bit (int nr, volatile void *addr)
-+{
-+      volatile __u32 *p = (__u32 *) addr + (nr >> 5);
-+      __u32 m = 1 << (nr & 31);
-+      *p &= ~m;
-+}
-+
-+/**
-  * change_bit - Toggle a bit in memory
-  * @nr: Bit to clear
-  * @addr: Address to start counting from
-@@ -266,12 +280,11 @@
- }
- /**
-- * ffz - find the first zero bit in a memory region
-- * @x: The address to start the search at
-+ * ffz - find the first zero bit in a long word
-+ * @x: The long word to find the bit in
-  *
-- * Returns the bit-number (0..63) of the first (least significant) zero bit, not
-- * the number of the byte containing a bit.  Undefined if no zero exists, so
-- * code should check against ~0UL first...
-+ * Returns the bit-number (0..63) of the first (least significant) zero bit.  Undefined if
-+ * no zero exists, so code should check against ~0UL first...
-  */
- static inline unsigned long
- ffz (unsigned long x)
-@@ -297,6 +310,21 @@
-       return result;
- }
-+/**
-+ * __ffs - find first bit in word.
-+ * @x: The word to search
-+ *
-+ * Undefined if no bit exists, so code should check against 0 first.
-+ */
-+static __inline__ unsigned long
-+__ffs (unsigned long x)
-+{
-+      unsigned long result;
-+
-+      __asm__ ("popcnt %0=%1" : "=r" (result) : "r" ((x - 1) & ~x));
-+      return result;
-+}
-+
- #ifdef __KERNEL__
- /*
-@@ -313,6 +341,12 @@
-       return exp - 0xffff;
- }
-+static int
-+fls (int x)
-+{
-+      return ia64_fls((unsigned int) x);
-+}
-+
- /*
-  * ffs: find first bit set. This is defined the same way as the libc and compiler builtin
-  * ffs routines, therefore differs in spirit from the above ffz (man ffs): it operates on
-@@ -385,8 +419,53 @@
-  */
- #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
-+/*
-+ * Find next bit in a bitmap reasonably efficiently..
-+ */
-+static inline int
-+find_next_bit (void *addr, unsigned long size, unsigned long offset)
-+{
-+      unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
-+      unsigned long result = offset & ~63UL;
-+      unsigned long tmp;
-+
-+      if (offset >= size)
-+              return size;
-+      size -= result;
-+      offset &= 63UL;
-+      if (offset) {
-+              tmp = *(p++);
-+              tmp &= ~0UL << offset;
-+              if (size < 64)
-+                      goto found_first;
-+              if (tmp)
-+                      goto found_middle;
-+              size -= 64;
-+              result += 64;
-+      }
-+      while (size & ~63UL) {
-+              if ((tmp = *(p++)))
-+                      goto found_middle;
-+              result += 64;
-+              size -= 64;
-+      }
-+      if (!size)
-+              return result;
-+      tmp = *p;
-+  found_first:
-+      tmp &= ~0UL >> (64-size);
-+      if (tmp == 0UL)         /* Are any bits set? */
-+              return result + size; /* Nope. */
-+  found_middle:
-+      return result + __ffs(tmp);
-+}
-+
-+#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
-+
- #ifdef __KERNEL__
-+#define __clear_bit(nr, addr)        clear_bit(nr, addr)
-+
- #define ext2_set_bit                 test_and_set_bit
- #define ext2_clear_bit               test_and_clear_bit
- #define ext2_test_bit                test_bit
-@@ -400,6 +479,16 @@
- #define minix_test_bit(nr,addr)                       test_bit(nr,addr)
- #define minix_find_first_zero_bit(addr,size)  find_first_zero_bit(addr,size)
-+static inline int
-+sched_find_first_bit (unsigned long *b)
-+{
-+      if (unlikely(b[0]))
-+              return __ffs(b[0]);
-+      if (unlikely(b[1]))
-+              return 64 + __ffs(b[1]);
-+      return __ffs(b[2]) + 128;
-+}
-+
- #endif /* __KERNEL__ */
- #endif /* _ASM_IA64_BITOPS_H */
-diff -urN linux-2.4.24.org/include/asm-m68k/bitops.h linux-2.4.24/include/asm-m68k/bitops.h
---- linux-2.4.24.org/include/asm-m68k/bitops.h 2004-02-04 20:47:47.882564706 +0100
-+++ linux-2.4.24/include/asm-m68k/bitops.h     2004-02-04 20:52:53.798934916 +0100
-@@ -97,6 +97,7 @@
-   (__builtin_constant_p(nr) ? \
-    __constant_clear_bit(nr, vaddr) : \
-    __generic_clear_bit(nr, vaddr))
-+#define __clear_bit(nr,vaddr) clear_bit(nr,vaddr)
- static inline void __constant_clear_bit(int nr, volatile void *vaddr)
- {
-@@ -238,6 +239,28 @@
-       return 32 - cnt;
- }
-+#define __ffs(x) (ffs(x) - 1)
-+
-+
-+/*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 140-bit bitmap where the first 100 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 140
-+ * bits is cleared.
-+ */
-+static inline int sched_find_first_bit(unsigned long *b)
-+{
-+      if (unlikely(b[0]))
-+              return __ffs(b[0]);
-+      if (unlikely(b[1]))
-+              return __ffs(b[1]) + 32;
-+      if (unlikely(b[2]))
-+              return __ffs(b[2]) + 64;
-+      if (b[3])
-+              return __ffs(b[3]) + 96;
-+      return __ffs(b[4]) + 128;
-+}
-+
- /*
-  * hweightN: returns the hamming weight (i.e. the number
-diff -urN linux-2.4.24.org/include/asm-mips/bitops.h linux-2.4.24/include/asm-mips/bitops.h
---- linux-2.4.24.org/include/asm-mips/bitops.h 2004-02-04 20:47:43.266524847 +0100
-+++ linux-2.4.24/include/asm-mips/bitops.h     2004-02-04 20:52:53.820930341 +0100
-@@ -51,6 +51,8 @@
- #ifdef CONFIG_CPU_HAS_LLSC
-+#include <asm/mipsregs.h>
-+
- /*
-  * These functions for MIPS ISA > 1 are interrupt and SMP proof and
-  * interrupt friendly
-@@ -593,21 +595,30 @@
-  *
-  * Undefined if no zero exists, so code should check against ~0UL first.
-  */
--static __inline__ unsigned long ffz(unsigned long word)
-+extern __inline__ unsigned long ffz(unsigned long word)
- {
--      int b = 0, s;
-+      unsigned int    __res;
-+      unsigned int    mask = 1;
--      word = ~word;
--      s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s;
--      s =  8; if (word << 24 != 0) s = 0; b += s; word >>= s;
--      s =  4; if (word << 28 != 0) s = 0; b += s; word >>= s;
--      s =  2; if (word << 30 != 0) s = 0; b += s; word >>= s;
--      s =  1; if (word << 31 != 0) s = 0; b += s;
-+      __asm__ (
-+              ".set\tnoreorder\n\t"
-+              ".set\tnoat\n\t"
-+              "move\t%0,$0\n"
-+              "1:\tand\t$1,%2,%1\n\t"
-+              "beqz\t$1,2f\n\t"
-+              "sll\t%1,1\n\t"
-+              "bnez\t%1,1b\n\t"
-+              "addiu\t%0,1\n\t"
-+              ".set\tat\n\t"
-+              ".set\treorder\n"
-+              "2:\n\t"
-+              : "=&r" (__res), "=r" (mask)
-+              : "r" (word), "1" (mask)
-+              : "$1");
--      return b;
-+      return __res;
- }
--
- #ifdef __KERNEL__
- /*
-diff -urN linux-2.4.24.org/include/asm-mips64/bitops.h linux-2.4.24/include/asm-mips64/bitops.h
---- linux-2.4.24.org/include/asm-mips64/bitops.h       2004-02-04 20:48:21.702530138 +0100
-+++ linux-2.4.24/include/asm-mips64/bitops.h   2004-02-04 20:52:53.873919319 +0100
-@@ -27,6 +27,7 @@
- #include <asm/system.h>
- #include <asm/sgidefs.h>
-+#include <asm/mipsregs.h>
- /*
-  * set_bit - Atomically set a bit in memory
-@@ -38,7 +39,8 @@
-  * Note that @nr may be almost arbitrarily large; this function is not
-  * restricted to acting on a single-word quantity.
-  */
--static inline void set_bit(unsigned long nr, volatile void *addr)
-+extern __inline__ void
-+set_bit(unsigned long nr, volatile void *addr)
- {
-       unsigned long *m = ((unsigned long *) addr) + (nr >> 6);
-       unsigned long temp;
-@@ -62,7 +64,7 @@
-  * If it's called on the same region of memory simultaneously, the effect
-  * may be that only one operation succeeds.
-  */
--static inline void __set_bit(int nr, volatile void * addr)
-+extern __inline__ void __set_bit(int nr, volatile void * addr)
- {
-       unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
-@@ -79,7 +81,8 @@
-  * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
-  * in order to ensure changes are visible on other processors.
-  */
--static inline void clear_bit(unsigned long nr, volatile void *addr)
-+extern __inline__ void
-+clear_bit(unsigned long nr, volatile void *addr)
- {
-       unsigned long *m = ((unsigned long *) addr) + (nr >> 6);
-       unsigned long temp;
-@@ -105,7 +108,8 @@
-  * Note that @nr may be almost arbitrarily large; this function is not
-  * restricted to acting on a single-word quantity.
-  */
--static inline void change_bit(unsigned long nr, volatile void *addr)
-+extern __inline__ void
-+change_bit(unsigned long nr, volatile void *addr)
- {
-       unsigned long *m = ((unsigned long *) addr) + (nr >> 6);
-       unsigned long temp;
-@@ -128,7 +132,7 @@
-  * If it's called on the same region of memory simultaneously, the effect
-  * may be that only one operation succeeds.
-  */
--static inline void __change_bit(int nr, volatile void * addr)
-+extern __inline__ void __change_bit(int nr, volatile void * addr)
- {
-       unsigned long * m = ((unsigned long *) addr) + (nr >> 6);
-@@ -143,8 +147,8 @@
-  * This operation is atomic and cannot be reordered.
-  * It also implies a memory barrier.
-  */
--static inline unsigned long test_and_set_bit(unsigned long nr,
--      volatile void *addr)
-+extern __inline__ unsigned long
-+test_and_set_bit(unsigned long nr, volatile void *addr)
- {
-       unsigned long *m = ((unsigned long *) addr) + (nr >> 6);
-       unsigned long temp, res;
-@@ -176,7 +180,8 @@
-  * If two examples of this operation race, one can appear to succeed
-  * but actually fail.  You must protect multiple accesses with a lock.
-  */
--static inline int __test_and_set_bit(int nr, volatile void *addr)
-+extern __inline__ int
-+__test_and_set_bit(int nr, volatile void * addr)
- {
-       unsigned long mask, retval;
-       long *a = (unsigned long *) addr;
-@@ -197,8 +202,8 @@
-  * This operation is atomic and cannot be reordered.
-  * It also implies a memory barrier.
-  */
--static inline unsigned long test_and_clear_bit(unsigned long nr,
--      volatile void *addr)
-+extern __inline__ unsigned long
-+test_and_clear_bit(unsigned long nr, volatile void *addr)
- {
-       unsigned long *m = ((unsigned long *) addr) + (nr >> 6);
-       unsigned long temp, res;
-@@ -231,7 +236,8 @@
-  * If two examples of this operation race, one can appear to succeed
-  * but actually fail.  You must protect multiple accesses with a lock.
-  */
--static inline int __test_and_clear_bit(int nr, volatile void * addr)
-+extern __inline__ int
-+__test_and_clear_bit(int nr, volatile void * addr)
- {
-       unsigned long mask, retval;
-       unsigned long *a = (unsigned long *) addr;
-@@ -252,8 +258,8 @@
-  * This operation is atomic and cannot be reordered.
-  * It also implies a memory barrier.
-  */
--static inline unsigned long test_and_change_bit(unsigned long nr,
--      volatile void *addr)
-+extern __inline__ unsigned long
-+test_and_change_bit(unsigned long nr, volatile void *addr)
- {
-       unsigned long *m = ((unsigned long *) addr) + (nr >> 6);
-       unsigned long temp, res;
-@@ -285,7 +291,8 @@
-  * If two examples of this operation race, one can appear to succeed
-  * but actually fail.  You must protect multiple accesses with a lock.
-  */
--static inline int __test_and_change_bit(int nr, volatile void *addr)
-+extern __inline__ int
-+__test_and_change_bit(int nr, volatile void * addr)
- {
-       unsigned long mask, retval;
-       unsigned long *a = (unsigned long *) addr;
-@@ -302,7 +309,8 @@
-  * @nr: bit number to test
-  * @addr: Address to start counting from
-  */
--static inline int test_bit(int nr, volatile void * addr)
-+extern __inline__ unsigned long
-+test_bit(int nr, volatile void * addr)
- {
-       return 1UL & (((const volatile unsigned long *) addr)[nr >> SZLONG_LOG] >> (nr & SZLONG_MASK));
- }
-@@ -313,19 +321,20 @@
-  *
-  * Undefined if no zero exists, so code should check against ~0UL first.
-  */
--static __inline__ unsigned long ffz(unsigned long word)
-+extern __inline__ unsigned long ffz(unsigned long word)
- {
--      int b = 0, s;
-+      unsigned long k;
-       word = ~word;
--        s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s;
--        s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s;
--        s =  8; if (word << 56 != 0) s = 0; b += s; word >>= s;
--        s =  4; if (word << 60 != 0) s = 0; b += s; word >>= s;
--        s =  2; if (word << 62 != 0) s = 0; b += s; word >>= s;
--        s =  1; if (word << 63 != 0) s = 0; b += s;
-+      k = 63;
-+      if (word & 0x00000000ffffffffUL) { k -= 32; word <<= 32; }
-+      if (word & 0x0000ffff00000000UL) { k -= 16; word <<= 16; }
-+      if (word & 0x00ff000000000000UL) { k -= 8;  word <<= 8;  }
-+      if (word & 0x0f00000000000000UL) { k -= 4;  word <<= 4;  }
-+      if (word & 0x3000000000000000UL) { k -= 2;  word <<= 2;  }
-+      if (word & 0x4000000000000000UL) { k -= 1; }
--      return b;
-+      return k;
- }
- /*
-@@ -334,8 +343,8 @@
-  * @offset: The bitnumber to start searching at
-  * @size: The maximum size to search
-  */
--static inline unsigned long find_next_zero_bit(void *addr, unsigned long size,
--                                             unsigned long offset)
-+extern __inline__ unsigned long
-+find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
- {
-       unsigned long *p = ((unsigned long *) addr) + (offset >> SZLONG_LOG);
-       unsigned long result = offset & ~SZLONG_MASK;
-@@ -400,7 +409,8 @@
- #define hweight16(x) generic_hweight16(x)
- #define hweight8(x)  generic_hweight8(x)
--static inline int __test_and_set_le_bit(unsigned long nr, void * addr)
-+extern inline int
-+__test_and_set_le_bit(unsigned long nr, void * addr
- {
-       unsigned char   *ADDR = (unsigned char *) addr;
-       int             mask, retval;
-@@ -413,7 +423,8 @@
-       return retval;
- }
--static inline int __test_and_clear_le_bit(unsigned long nr, void * addr)
-+extern inline int
-+__test_and_clear_le_bit(unsigned long nr, void * addr)
- {
-       unsigned char   *ADDR = (unsigned char *) addr;
-       int             mask, retval;
-@@ -426,7 +437,8 @@
-       return retval;
- }
--static inline int test_le_bit(unsigned long nr, const void * addr)
-+extern inline int
-+test_le_bit(unsigned long nr, const void * addr)
- {
-       const unsigned char     *ADDR = (const unsigned char *) addr;
-       int                     mask;
-@@ -451,7 +463,7 @@
-       return b;
- }
--static inline unsigned long find_next_zero_le_bit(void *addr,
-+extern inline unsigned long find_next_zero_le_bit(void *addr,
-       unsigned long size, unsigned long offset)
- {
-       unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
-diff -urN linux-2.4.24.org/include/asm-ppc/bitops.h linux-2.4.24/include/asm-ppc/bitops.h
---- linux-2.4.24.org/include/asm-ppc/bitops.h  2004-02-04 20:47:57.992461840 +0100
-+++ linux-2.4.24/include/asm-ppc/bitops.h      2004-02-04 20:52:53.902913289 +0100
-@@ -7,6 +7,7 @@
- #define _PPC_BITOPS_H
- #include <linux/config.h>
-+#include <linux/compiler.h>
- #include <asm/byteorder.h>
- #include <asm/atomic.h>
-@@ -26,7 +27,7 @@
-  * These used to be if'd out here because using : "cc" as a constraint
-  * resulted in errors from egcs.  Things appear to be OK with gcc-2.95.
-  */
--static __inline__ void set_bit(int nr, volatile void * addr)
-+static __inline__ void set_bit(int nr, volatile unsigned long * addr)
- {
-       unsigned long old;
-       unsigned long mask = 1 << (nr & 0x1f);
-@@ -46,7 +47,7 @@
- /*
-  * non-atomic version
-  */
--static __inline__ void __set_bit(int nr, volatile void *addr)
-+static __inline__ void __set_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1 << (nr & 0x1f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
-@@ -60,7 +61,7 @@
- #define smp_mb__before_clear_bit()    smp_mb()
- #define smp_mb__after_clear_bit()     smp_mb()
--static __inline__ void clear_bit(int nr, volatile void *addr)
-+static __inline__ void clear_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long old;
-       unsigned long mask = 1 << (nr & 0x1f);
-@@ -80,7 +81,7 @@
- /*
-  * non-atomic version
-  */
--static __inline__ void __clear_bit(int nr, volatile void *addr)
-+static __inline__ void __clear_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1 << (nr & 0x1f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
-@@ -88,7 +89,7 @@
-       *p &= ~mask;
- }
--static __inline__ void change_bit(int nr, volatile void *addr)
-+static __inline__ void change_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long old;
-       unsigned long mask = 1 << (nr & 0x1f);
-@@ -108,7 +109,7 @@
- /*
-  * non-atomic version
-  */
--static __inline__ void __change_bit(int nr, volatile void *addr)
-+static __inline__ void __change_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1 << (nr & 0x1f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
-@@ -119,7 +120,7 @@
- /*
-  * test_and_*_bit do imply a memory barrier (?)
-  */
--static __inline__ int test_and_set_bit(int nr, volatile void *addr)
-+static __inline__ int test_and_set_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned int old, t;
-       unsigned int mask = 1 << (nr & 0x1f);
-@@ -142,7 +143,7 @@
- /*
-  * non-atomic version
-  */
--static __inline__ int __test_and_set_bit(int nr, volatile void *addr)
-+static __inline__ int __test_and_set_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1 << (nr & 0x1f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
-@@ -152,7 +153,7 @@
-       return (old & mask) != 0;
- }
--static __inline__ int test_and_clear_bit(int nr, volatile void *addr)
-+static __inline__ int test_and_clear_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned int old, t;
-       unsigned int mask = 1 << (nr & 0x1f);
-@@ -175,7 +176,7 @@
- /*
-  * non-atomic version
-  */
--static __inline__ int __test_and_clear_bit(int nr, volatile void *addr)
-+static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1 << (nr & 0x1f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
-@@ -185,7 +186,7 @@
-       return (old & mask) != 0;
- }
--static __inline__ int test_and_change_bit(int nr, volatile void *addr)
-+static __inline__ int test_and_change_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned int old, t;
-       unsigned int mask = 1 << (nr & 0x1f);
-@@ -208,7 +209,7 @@
- /*
-  * non-atomic version
-  */
--static __inline__ int __test_and_change_bit(int nr, volatile void *addr)
-+static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1 << (nr & 0x1f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
-@@ -218,7 +219,7 @@
-       return (old & mask) != 0;
- }
--static __inline__ int test_bit(int nr, __const__ volatile void *addr)
-+static __inline__ int test_bit(int nr, __const__ volatile unsigned long *addr)
- {
-       __const__ unsigned int *p = (__const__ unsigned int *) addr;
-@@ -226,7 +227,7 @@
- }
- /* Return the bit position of the most significant 1 bit in a word */
--static __inline__ int __ilog2(unsigned int x)
-+static __inline__ int __ilog2(unsigned long x)
- {
-       int lz;
-@@ -234,13 +235,18 @@
-       return 31 - lz;
- }
--static __inline__ int ffz(unsigned int x)
-+static __inline__ int ffz(unsigned long x)
- {
-       if ((x = ~x) == 0)
-               return 32;
-       return __ilog2(x & -x);
- }
-+static inline int __ffs(unsigned long x)
-+{
-+      return __ilog2(x & -x);
-+}
-+
- /*
-  * ffs: find first bit set. This is defined the same way as
-  * the libc and compiler builtin ffs routines, therefore
-@@ -252,6 +258,18 @@
- }
- /*
-+ * fls: find last (most-significant) bit set.
-+ * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
-+ */
-+static __inline__ int fls(unsigned int x)
-+{
-+      int lz;
-+
-+      asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
-+      return 32 - lz;
-+}
-+
-+/*
-  * hweightN: returns the hamming weight (i.e. the number
-  * of bits set) of a N-bit word
-  */
-@@ -261,13 +279,86 @@
- #define hweight8(x) generic_hweight8(x)
- /*
-+ * Find the first bit set in a 140-bit bitmap.
-+ * The first 100 bits are unlikely to be set.
-+ */
-+static inline int sched_find_first_bit(unsigned long *b)
-+{
-+      if (unlikely(b[0]))
-+              return __ffs(b[0]);
-+      if (unlikely(b[1]))
-+              return __ffs(b[1]) + 32;
-+      if (unlikely(b[2]))
-+              return __ffs(b[2]) + 64;
-+      if (b[3])
-+              return __ffs(b[3]) + 96;
-+      return __ffs(b[4]) + 128;
-+}
-+
-+/**
-+ * find_next_bit - find the next set bit in a memory region
-+ * @addr: The address to base the search on
-+ * @offset: The bitnumber to start searching at
-+ * @size: The maximum size to search
-+ */
-+static __inline__ unsigned long find_next_bit(unsigned long *addr,
-+      unsigned long size, unsigned long offset)
-+{
-+      unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
-+      unsigned int result = offset & ~31UL;
-+      unsigned int tmp;
-+
-+      if (offset >= size)
-+              return size;
-+      size -= result;
-+      offset &= 31UL;
-+      if (offset) {
-+              tmp = *p++;
-+              tmp &= ~0UL << offset;
-+              if (size < 32)
-+                      goto found_first;
-+              if (tmp)
-+                      goto found_middle;
-+              size -= 32;
-+              result += 32;
-+      }
-+      while (size >= 32) {
-+              if ((tmp = *p++) != 0)
-+                      goto found_middle;
-+              result += 32;
-+              size -= 32;
-+      }
-+      if (!size)
-+              return result;
-+      tmp = *p;
-+
-+found_first:
-+      tmp &= ~0UL >> (32 - size);
-+      if (tmp == 0UL)        /* Are any bits set? */
-+              return result + size; /* Nope. */
-+found_middle:
-+      return result + __ffs(tmp);
-+}
-+
-+/**
-+ * find_first_bit - find the first set bit in a memory region
-+ * @addr: The address to start the search at
-+ * @size: The maximum size to search
-+ *
-+ * Returns the bit-number of the first set bit, not the number of the byte
-+ * containing a bit.
-+ */
-+#define find_first_bit(addr, size) \
-+      find_next_bit((addr), (size), 0)
-+
-+/*
-  * This implementation of find_{first,next}_zero_bit was stolen from
-  * Linus' asm-alpha/bitops.h.
-  */
- #define find_first_zero_bit(addr, size) \
-       find_next_zero_bit((addr), (size), 0)
--static __inline__ unsigned long find_next_zero_bit(void * addr,
-+static __inline__ unsigned long find_next_zero_bit(unsigned long * addr,
-       unsigned long size, unsigned long offset)
- {
-       unsigned int * p = ((unsigned int *) addr) + (offset >> 5);
-@@ -306,8 +397,8 @@
- }
--#define ext2_set_bit(nr, addr)                __test_and_set_bit((nr) ^ 0x18, addr)
--#define ext2_clear_bit(nr, addr)      __test_and_clear_bit((nr) ^ 0x18, addr)
-+#define ext2_set_bit(nr, addr)        __test_and_set_bit((nr) ^ 0x18, (unsigned long *)(addr))
-+#define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 0x18, (unsigned long *)(addr))
- static __inline__ int ext2_test_bit(int nr, __const__ void * addr)
- {
-diff -urN linux-2.4.24.org/include/asm-ppc/smp.h linux-2.4.24/include/asm-ppc/smp.h
---- linux-2.4.24.org/include/asm-ppc/smp.h     2004-02-04 20:47:58.116436054 +0100
-+++ linux-2.4.24/include/asm-ppc/smp.h 2004-02-04 20:52:53.906912457 +0100
-@@ -45,7 +45,7 @@
- #define cpu_logical_map(cpu) (cpu)
- #define cpu_number_map(x) (x)
--#define smp_processor_id() (current->processor)
-+#define smp_processor_id() (current->cpu)
- extern int smp_hw_index[NR_CPUS];
- #define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
-diff -urN linux-2.4.24.org/include/asm-ppc64/bitops.h linux-2.4.24/include/asm-ppc64/bitops.h
---- linux-2.4.24.org/include/asm-ppc64/bitops.h        2004-02-04 20:47:31.682934246 +0100
-+++ linux-2.4.24/include/asm-ppc64/bitops.h    2004-02-04 20:52:53.961901020 +0100
-@@ -41,12 +41,12 @@
- #define smp_mb__before_clear_bit()    smp_mb()
- #define smp_mb__after_clear_bit()     smp_mb()
--static __inline__ int test_bit(unsigned long nr, __const__ volatile void *addr)
-+static __inline__ int test_bit(unsigned long nr, __const__ volatile unsigned long *addr)
- {
-       return (1UL & (((__const__ long *) addr)[nr >> 6] >> (nr & 63)));
- }
--static __inline__ void set_bit(unsigned long nr, volatile void *addr)
-+static __inline__ void set_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long old;
-       unsigned long mask = 1UL << (nr & 0x3f);
-@@ -62,7 +62,7 @@
-       : "cc");
- }
--static __inline__ void clear_bit(unsigned long nr, volatile void *addr)
-+static __inline__ void clear_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long old;
-       unsigned long mask = 1UL << (nr & 0x3f);
-@@ -78,7 +78,7 @@
-       : "cc");
- }
--static __inline__ void change_bit(unsigned long nr, volatile void *addr)
-+static __inline__ void change_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long old;
-       unsigned long mask = 1UL << (nr & 0x3f);
-@@ -94,7 +94,7 @@
-       : "cc");
- }
--static __inline__ int test_and_set_bit(unsigned long nr, volatile void *addr)
-+static __inline__ int test_and_set_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long old, t;
-       unsigned long mask = 1UL << (nr & 0x3f);
-@@ -114,7 +114,7 @@
-       return (old & mask) != 0;
- }
--static __inline__ int test_and_clear_bit(unsigned long nr, volatile void *addr)
-+static __inline__ int test_and_clear_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long old, t;
-       unsigned long mask = 1UL << (nr & 0x3f);
-@@ -134,7 +134,7 @@
-       return (old & mask) != 0;
- }
--static __inline__ int test_and_change_bit(unsigned long nr, volatile void *addr)
-+static __inline__ int test_and_change_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long old, t;
-       unsigned long mask = 1UL << (nr & 0x3f);
-@@ -157,7 +157,7 @@
- /*
-  * non-atomic versions
-  */
--static __inline__ void __set_bit(unsigned long nr, volatile void *addr)
-+static __inline__ void __set_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1UL << (nr & 0x3f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
-@@ -165,7 +165,7 @@
-       *p |= mask;
- }
--static __inline__ void __clear_bit(unsigned long nr, volatile void *addr)
-+static __inline__ void __clear_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1UL << (nr & 0x3f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
-@@ -173,7 +173,7 @@
-       *p &= ~mask;
- }
--static __inline__ void __change_bit(unsigned long nr, volatile void *addr)
-+static __inline__ void __change_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1UL << (nr & 0x3f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
-@@ -181,7 +181,7 @@
-       *p ^= mask;
- }
--static __inline__ int __test_and_set_bit(unsigned long nr, volatile void *addr)
-+static __inline__ int __test_and_set_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1UL << (nr & 0x3f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
-@@ -191,7 +191,7 @@
-       return (old & mask) != 0;
- }
--static __inline__ int __test_and_clear_bit(unsigned long nr, volatile void *addr)
-+static __inline__ int __test_and_clear_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1UL << (nr & 0x3f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
-@@ -201,7 +201,7 @@
-       return (old & mask) != 0;
- }
--static __inline__ int __test_and_change_bit(unsigned long nr, volatile void *addr)
-+static __inline__ int __test_and_change_bit(unsigned long nr, volatile unsigned long *addr)
- {
-       unsigned long mask = 1UL << (nr & 0x3f);
-       unsigned long *p = ((unsigned long *)addr) + (nr >> 6);
-diff -urN linux-2.4.24.org/include/asm-s390/bitops.h linux-2.4.24/include/asm-s390/bitops.h
---- linux-2.4.24.org/include/asm-s390/bitops.h 2004-02-04 20:48:24.809883809 +0100
-+++ linux-2.4.24/include/asm-s390/bitops.h     2004-02-04 20:52:53.990894989 +0100
-@@ -47,272 +47,217 @@
- extern const char _oi_bitmap[];
- extern const char _ni_bitmap[];
- extern const char _zb_findmap[];
-+extern const char _sb_findmap[];
- #ifdef CONFIG_SMP
- /*
-  * SMP save set_bit routine based on compare and swap (CS)
-  */
--static __inline__ void set_bit_cs(int nr, volatile void * addr)
-+static inline void set_bit_cs(int nr, volatile void *ptr)
- {
--      unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lhi   %2,3\n"         /* CS must be aligned on 4 byte b. */
--             "   nr    %2,%1\n"        /* isolate last 2 bits of address */
--             "   xr    %1,%2\n"        /* make addr % 4 == 0 */
--             "   sll   %2,3\n"
--             "   ar    %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 3;               /* align address to 4 */
-+      nr += (addr & 3) << 3;          /* add alignment to bit number */
- #endif
--             "   lhi   %2,31\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srl   %0,3\n"
--             "   lhi   %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sll   %3,0(%2)\n"       /* make OR mask */
--             "   l     %0,0(%1)\n"
--             "0: lr    %2,%0\n"         /* CS loop starts here */
--             "   or    %2,%3\n"          /* set bit */
--             "   cs    %0,%2,0(%1)\n"
--             "   jl    0b"
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
-+      addr += (nr ^ (nr & 31)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 31);        /* make OR mask */
-+      asm volatile(
-+              "   l   %0,0(%4)\n"
-+              "0: lr  %1,%0\n"
-+              "   or  %1,%3\n"
-+              "   cs  %0,%1,0(%4)\n"
-+              "   jl  0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned int *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
- }
- /*
-  * SMP save clear_bit routine based on compare and swap (CS)
-  */
--static __inline__ void clear_bit_cs(int nr, volatile void * addr)
-+static inline void clear_bit_cs(int nr, volatile void *ptr)
- {
--        static const int minusone = -1;
--      unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lhi   %2,3\n"         /* CS must be aligned on 4 byte b. */
--             "   nr    %2,%1\n"        /* isolate last 2 bits of address */
--             "   xr    %1,%2\n"        /* make addr % 4 == 0 */
--             "   sll   %2,3\n"
--             "   ar    %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 3;               /* align address to 4 */
-+      nr += (addr & 3) << 3;          /* add alignment to bit number */
- #endif
--             "   lhi   %2,31\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srl   %0,3\n"
--             "   lhi   %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sll   %3,0(%2)\n"
--             "   x     %3,%4\n"        /* make AND mask */
--             "   l     %0,0(%1)\n"
--             "0: lr    %2,%0\n"        /* CS loop starts here */
--             "   nr    %2,%3\n"        /* clear bit */
--             "   cs    %0,%2,0(%1)\n"
--             "   jl    0b"
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask)
--             : "m" (minusone) : "cc", "memory" );
-+      addr += (nr ^ (nr & 31)) >> 3;  /* calculate address for CS */
-+      mask = ~(1UL << (nr & 31));     /* make AND mask */
-+      asm volatile(
-+              "   l   %0,0(%4)\n"
-+              "0: lr  %1,%0\n"
-+              "   nr  %1,%3\n"
-+              "   cs  %0,%1,0(%4)\n"
-+              "   jl  0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned int *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
- }
- /*
-  * SMP save change_bit routine based on compare and swap (CS)
-  */
--static __inline__ void change_bit_cs(int nr, volatile void * addr)
-+static inline void change_bit_cs(int nr, volatile void *ptr)
- {
--      unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lhi   %2,3\n"         /* CS must be aligned on 4 byte b. */
--             "   nr    %2,%1\n"        /* isolate last 2 bits of address */
--             "   xr    %1,%2\n"        /* make addr % 4 == 0 */
--             "   sll   %2,3\n"
--             "   ar    %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 3;               /* align address to 4 */
-+      nr += (addr & 3) << 3;          /* add alignment to bit number */
- #endif
--             "   lhi   %2,31\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srl   %0,3\n"
--             "   lhi   %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sll   %3,0(%2)\n"     /* make XR mask */
--             "   l     %0,0(%1)\n"
--             "0: lr    %2,%0\n"        /* CS loop starts here */
--             "   xr    %2,%3\n"        /* change bit */
--             "   cs    %0,%2,0(%1)\n"
--             "   jl    0b"
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) : 
--             : "cc", "memory" );
-+      addr += (nr ^ (nr & 31)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 31);        /* make XOR mask */
-+      asm volatile(
-+              "   l   %0,0(%4)\n"
-+              "0: lr  %1,%0\n"
-+              "   xr  %1,%3\n"
-+              "   cs  %0,%1,0(%4)\n"
-+              "   jl  0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned int *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
- }
- /*
-  * SMP save test_and_set_bit routine based on compare and swap (CS)
-  */
--static __inline__ int test_and_set_bit_cs(int nr, volatile void * addr)
-+static inline int test_and_set_bit_cs(int nr, volatile void *ptr)
- {
--      unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lhi   %2,3\n"         /* CS must be aligned on 4 byte b. */
--             "   nr    %2,%1\n"        /* isolate last 2 bits of address */
--             "   xr    %1,%2\n"        /* make addr % 4 == 0 */
--             "   sll   %2,3\n"
--             "   ar    %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 3;               /* align address to 4 */
-+      nr += (addr & 3) << 3;          /* add alignment to bit number */
- #endif
--             "   lhi   %2,31\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srl   %0,3\n"
--             "   lhi   %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sll   %3,0(%2)\n"     /* make OR mask */
--             "   l     %0,0(%1)\n"
--             "0: lr    %2,%0\n"        /* CS loop starts here */
--             "   or    %2,%3\n"        /* set bit */
--             "   cs    %0,%2,0(%1)\n"
--             "   jl    0b\n"
--             "   nr    %0,%3\n"        /* isolate old bit */
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
--        return nr != 0;
-+      addr += (nr ^ (nr & 31)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 31);        /* make OR/test mask */
-+      asm volatile(
-+              "   l   %0,0(%4)\n"
-+              "0: lr  %1,%0\n"
-+              "   or  %1,%3\n"
-+              "   cs  %0,%1,0(%4)\n"
-+              "   jl  0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned int *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
-+      return (old & mask) != 0;
- }
- /*
-  * SMP save test_and_clear_bit routine based on compare and swap (CS)
-  */
--static __inline__ int test_and_clear_bit_cs(int nr, volatile void * addr)
-+static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
- {
--        static const int minusone = -1;
--      unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lhi   %2,3\n"         /* CS must be aligned on 4 byte b. */
--             "   nr    %2,%1\n"        /* isolate last 2 bits of address */
--             "   xr    %1,%2\n"        /* make addr % 4 == 0 */
--             "   sll   %2,3\n"
--             "   ar    %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 3;               /* align address to 4 */
-+      nr += (addr & 3) << 3;          /* add alignment to bit number */
- #endif
--             "   lhi   %2,31\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srl   %0,3\n"
--             "   lhi   %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sll   %3,0(%2)\n"
--             "   l     %0,0(%1)\n"
--             "   x     %3,%4\n"        /* make AND mask */
--             "0: lr    %2,%0\n"        /* CS loop starts here */
--             "   nr    %2,%3\n"        /* clear bit */
--             "   cs    %0,%2,0(%1)\n"
--             "   jl    0b\n"
--             "   x     %3,%4\n"
--             "   nr    %0,%3\n"         /* isolate old bit */
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask)
--             : "m" (minusone) : "cc", "memory" );
--        return nr;
-+      addr += (nr ^ (nr & 31)) >> 3;  /* calculate address for CS */
-+      mask = ~(1UL << (nr & 31));     /* make AND mask */
-+      asm volatile(
-+              "   l   %0,0(%4)\n"
-+              "0: lr  %1,%0\n"
-+              "   nr  %1,%3\n"
-+              "   cs  %0,%1,0(%4)\n"
-+              "   jl  0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned int *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
-+      return (old ^ new) != 0;
- }
- /*
-  * SMP save test_and_change_bit routine based on compare and swap (CS) 
-  */
--static __inline__ int test_and_change_bit_cs(int nr, volatile void * addr)
-+static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
- {
--      unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lhi   %2,3\n"         /* CS must be aligned on 4 byte b. */
--             "   nr    %2,%1\n"        /* isolate last 2 bits of address */
--             "   xr    %1,%2\n"        /* make addr % 4 == 0 */
--             "   sll   %2,3\n"
--             "   ar    %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 3;               /* align address to 4 */
-+      nr += (addr & 3) << 3;          /* add alignment to bit number */
- #endif
--             "   lhi   %2,31\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srl   %0,3\n"
--             "   lhi   %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sll   %3,0(%2)\n"     /* make OR mask */
--             "   l     %0,0(%1)\n"
--             "0: lr    %2,%0\n"        /* CS loop starts here */
--             "   xr    %2,%3\n"        /* change bit */
--             "   cs    %0,%2,0(%1)\n"
--             "   jl    0b\n"
--             "   nr    %0,%3\n"        /* isolate old bit */
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
--        return nr != 0;
-+      addr += (nr ^ (nr & 31)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 31);        /* make XOR mask */
-+      asm volatile(
-+              "   l   %0,0(%4)\n"
-+              "0: lr  %1,%0\n"
-+              "   xr  %1,%3\n"
-+              "   cs  %0,%1,0(%4)\n"
-+              "   jl  0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned int *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
-+      return (old & mask) != 0;
- }
- #endif /* CONFIG_SMP */
- /*
-  * fast, non-SMP set_bit routine
-  */
--static __inline__ void __set_bit(int nr, volatile void * addr)
-+static inline void __set_bit(int nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        __asm__ __volatile__(
--             "   lhi   %1,24\n"
--             "   lhi   %0,7\n"
--             "   xr    %1,%2\n"
--             "   nr    %0,%2\n"
--             "   srl   %1,3\n"
--             "   la    %1,0(%1,%3)\n"
--             "   la    %0,0(%0,%4)\n"
--             "   oc    0(1,%1),0(%0)"
--             : "=&a" (reg1), "=&a" (reg2)
--             : "r" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--}
--
--static __inline__ void 
--__constant_set_bit(const int nr, volatile void * addr)
--{
--  switch (nr&7) {
--  case 0:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x01"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3))) 
--                          : : "1", "cc", "memory");
--    break;
--  case 1:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x02"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 2:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x04"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 3:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x08"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 4:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x10"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 5:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x20"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 6:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x40"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 7:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x80"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  }
-+      unsigned long addr;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 24) >> 3);
-+        asm volatile("oc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+}
-+
-+static inline void 
-+__constant_set_bit(const int nr, volatile void *ptr)
-+{
-+      unsigned long addr;
-+
-+      addr = ((unsigned long) ptr) + ((nr >> 3) ^ 3);
-+      switch (nr&7) {
-+      case 0:
-+              asm volatile ("oi 0(%1),0x01"
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 1:
-+              asm volatile ("oi 0(%1),0x02"
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 2:
-+              asm volatile ("oi 0(%1),0x04" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 3:
-+              asm volatile ("oi 0(%1),0x08" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 4:
-+              asm volatile ("oi 0(%1),0x10" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 5:
-+              asm volatile ("oi 0(%1),0x20" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 6:
-+              asm volatile ("oi 0(%1),0x40" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 7:
-+              asm volatile ("oi 0(%1),0x80" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      }
- }
- #define set_bit_simple(nr,addr) \
-@@ -323,76 +268,58 @@
- /*
-  * fast, non-SMP clear_bit routine
-  */
--static __inline__ void 
--__clear_bit(int nr, volatile void * addr)
-+static inline void 
-+__clear_bit(int nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        __asm__ __volatile__(
--             "   lhi   %1,24\n"
--             "   lhi   %0,7\n"
--             "   xr    %1,%2\n"
--             "   nr    %0,%2\n"
--             "   srl   %1,3\n"
--             "   la    %1,0(%1,%3)\n"
--             "   la    %0,0(%0,%4)\n"
--             "   nc    0(1,%1),0(%0)"
--             : "=&a" (reg1), "=&a" (reg2)
--             : "r" (nr), "a" (addr), "a" (&_ni_bitmap) : "cc", "memory" );
--}
--
--static __inline__ void 
--__constant_clear_bit(const int nr, volatile void * addr)
--{
--  switch (nr&7) {
--  case 0:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xFE"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 1:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xFD"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 2:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xFB"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 3:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xF7"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 4:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xEF"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "cc", "memory" );
--    break;
--  case 5:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xDF"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 6:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xBF"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 7:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0x7F"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  }
-+      unsigned long addr;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 24) >> 3);
-+        asm volatile("nc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_ni_bitmap + (nr & 7))
-+                   : "cc" );
-+}
-+
-+static inline void 
-+__constant_clear_bit(const int nr, volatile void *ptr)
-+{
-+      unsigned long addr;
-+
-+      addr = ((unsigned long) ptr) + ((nr >> 3) ^ 3);
-+      switch (nr&7) {
-+      case 0:
-+              asm volatile ("ni 0(%1),0xFE"
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 1:
-+              asm volatile ("ni 0(%1),0xFD" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 2:
-+              asm volatile ("ni 0(%1),0xFB" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 3:
-+              asm volatile ("ni 0(%1),0xF7" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 4:
-+              asm volatile ("ni 0(%1),0xEF" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 5:
-+              asm volatile ("ni 0(%1),0xDF" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 6:
-+              asm volatile ("ni 0(%1),0xBF" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 7:
-+              asm volatile ("ni 0(%1),0x7F" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      }
- }
- #define clear_bit_simple(nr,addr) \
-@@ -403,75 +330,57 @@
- /* 
-  * fast, non-SMP change_bit routine 
-  */
--static __inline__ void __change_bit(int nr, volatile void * addr)
-+static inline void __change_bit(int nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        __asm__ __volatile__(
--             "   lhi   %1,24\n"
--             "   lhi   %0,7\n"
--             "   xr    %1,%2\n"
--             "   nr    %0,%2\n"
--             "   srl   %1,3\n"
--             "   la    %1,0(%1,%3)\n"
--             "   la    %0,0(%0,%4)\n"
--             "   xc    0(1,%1),0(%0)"
--             : "=&a" (reg1), "=&a" (reg2)
--             : "r" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--}
--
--static __inline__ void 
--__constant_change_bit(const int nr, volatile void * addr) 
--{
--  switch (nr&7) {
--  case 0:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x01"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "cc", "memory" );
--    break;
--  case 1:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x02"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "cc", "memory" );
--    break;
--  case 2:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x04"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "cc", "memory" );
--    break;
--  case 3:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x08"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "cc", "memory" );
--    break;
--  case 4:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x10"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "cc", "memory" );
--    break;
--  case 5:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x20"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 6:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x40"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 7:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x80"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^3)))
--                          : : "1", "cc", "memory" );
--    break;
--  }
-+      unsigned long addr;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 24) >> 3);
-+        asm volatile("xc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+}
-+
-+static inline void 
-+__constant_change_bit(const int nr, volatile void *ptr) 
-+{
-+      unsigned long addr;
-+
-+      addr = ((unsigned long) ptr) + ((nr >> 3) ^ 3);
-+      switch (nr&7) {
-+      case 0:
-+              asm volatile ("xi 0(%1),0x01" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 1:
-+              asm volatile ("xi 0(%1),0x02" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 2:
-+              asm volatile ("xi 0(%1),0x04" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 3:
-+              asm volatile ("xi 0(%1),0x08" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 4:
-+              asm volatile ("xi 0(%1),0x10" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 5:
-+              asm volatile ("xi 0(%1),0x20" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 6:
-+              asm volatile ("xi 0(%1),0x40" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 7:
-+              asm volatile ("xi 0(%1),0x80" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      }
- }
- #define change_bit_simple(nr,addr) \
-@@ -482,74 +391,54 @@
- /*
-  * fast, non-SMP test_and_set_bit routine
-  */
--static __inline__ int test_and_set_bit_simple(int nr, volatile void * addr)
-+static inline int test_and_set_bit_simple(int nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
--        __asm__ __volatile__(
--             "   lhi   %1,24\n"
--             "   lhi   %2,7\n"
--             "   xr    %1,%3\n"
--             "   nr    %2,%3\n"
--             "   srl   %1,3\n"
--             "   la    %1,0(%1,%4)\n"
--             "   ic    %0,0(%1)\n"
--             "   srl   %0,0(%2)\n"
--             "   la    %2,0(%2,%5)\n"
--             "   oc    0(1,%1),0(%2)"
--             : "=d&" (oldbit), "=&a" (reg1), "=&a" (reg2)
--             : "r" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--        return oldbit & 1;
-+      unsigned long addr;
-+      unsigned char ch;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 24) >> 3);
-+      ch = *(unsigned char *) addr;
-+        asm volatile("oc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+      return (ch >> (nr & 7)) & 1;
- }
- #define __test_and_set_bit(X,Y)               test_and_set_bit_simple(X,Y)
- /*
-  * fast, non-SMP test_and_clear_bit routine
-  */
--static __inline__ int test_and_clear_bit_simple(int nr, volatile void * addr)
-+static inline int test_and_clear_bit_simple(int nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
-+      unsigned long addr;
-+      unsigned char ch;
--        __asm__ __volatile__(
--             "   lhi   %1,24\n"
--             "   lhi   %2,7\n"
--             "   xr    %1,%3\n"
--             "   nr    %2,%3\n"
--             "   srl   %1,3\n"
--             "   la    %1,0(%1,%4)\n"
--             "   ic    %0,0(%1)\n"
--             "   srl   %0,0(%2)\n"
--             "   la    %2,0(%2,%5)\n"
--             "   nc    0(1,%1),0(%2)"
--             : "=d&" (oldbit), "=&a" (reg1), "=&a" (reg2)
--             : "r" (nr), "a" (addr), "a" (&_ni_bitmap) : "cc", "memory" );
--        return oldbit & 1;
-+      addr = (unsigned long) ptr + ((nr ^ 24) >> 3);
-+      ch = *(unsigned char *) addr;
-+        asm volatile("nc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_ni_bitmap + (nr & 7))
-+                   : "cc" );
-+      return (ch >> (nr & 7)) & 1;
- }
- #define __test_and_clear_bit(X,Y)     test_and_clear_bit_simple(X,Y)
- /*
-  * fast, non-SMP test_and_change_bit routine
-  */
--static __inline__ int test_and_change_bit_simple(int nr, volatile void * addr)
-+static inline int test_and_change_bit_simple(int nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
-+      unsigned long addr;
-+      unsigned char ch;
--        __asm__ __volatile__(
--             "   lhi   %1,24\n"
--             "   lhi   %2,7\n"
--             "   xr    %1,%3\n"
--             "   nr    %2,%1\n"
--             "   srl   %1,3\n"
--             "   la    %1,0(%1,%4)\n"
--             "   ic    %0,0(%1)\n"
--             "   srl   %0,0(%2)\n"
--             "   la    %2,0(%2,%5)\n"
--             "   xc    0(1,%1),0(%2)"
--             : "=d&" (oldbit), "=&a" (reg1), "=&a" (reg2)
--             : "r" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--        return oldbit & 1;
-+      addr = (unsigned long) ptr + ((nr ^ 24) >> 3);
-+      ch = *(unsigned char *) addr;
-+        asm volatile("xc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+      return (ch >> (nr & 7)) & 1;
- }
- #define __test_and_change_bit(X,Y)    test_and_change_bit_simple(X,Y)
-@@ -574,25 +463,17 @@
-  * This routine doesn't need to be atomic.
-  */
--static __inline__ int __test_bit(int nr, volatile void * addr)
-+static inline int __test_bit(int nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
-+      unsigned long addr;
-+      unsigned char ch;
--        __asm__ __volatile__(
--             "   lhi   %2,24\n"
--             "   lhi   %1,7\n"
--             "   xr    %2,%3\n"
--             "   nr    %1,%3\n"
--             "   srl   %2,3\n"
--             "   ic    %0,0(%2,%4)\n"
--             "   srl   %0,0(%1)"
--             : "=d&" (oldbit), "=&a" (reg1), "=&a" (reg2)
--             : "r" (nr), "a" (addr) : "cc" );
--        return oldbit & 1;
-+      addr = (unsigned long) ptr + ((nr ^ 24) >> 3);
-+      ch = *(unsigned char *) addr;
-+      return (ch >> (nr & 7)) & 1;
- }
--static __inline__ int __constant_test_bit(int nr, volatile void * addr) {
-+static inline int __constant_test_bit(int nr, volatile void * addr) {
-     return (((volatile char *) addr)[(nr>>3)^3] & (1<<(nr&7))) != 0;
- }
-@@ -604,7 +485,7 @@
- /*
-  * Find-bit routines..
-  */
--static __inline__ int find_first_zero_bit(void * addr, unsigned size)
-+static inline int find_first_zero_bit(void * addr, unsigned size)
- {
-       unsigned long cmp, count;
-         int res;
-@@ -642,7 +523,45 @@
-         return (res < size) ? res : size;
- }
--static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
-+static inline int find_first_bit(void * addr, unsigned size)
-+{
-+      unsigned long cmp, count;
-+        int res;
-+
-+        if (!size)
-+                return 0;
-+        __asm__("   slr  %1,%1\n"
-+                "   lr   %2,%3\n"
-+                "   slr  %0,%0\n"
-+                "   ahi  %2,31\n"
-+                "   srl  %2,5\n"
-+                "0: c    %1,0(%0,%4)\n"
-+                "   jne  1f\n"
-+                "   ahi  %0,4\n"
-+                "   brct %2,0b\n"
-+                "   lr   %0,%3\n"
-+                "   j    4f\n"
-+                "1: l    %2,0(%0,%4)\n"
-+                "   sll  %0,3\n"
-+                "   lhi  %1,0xff\n"
-+                "   tml  %2,0xffff\n"
-+                "   jnz  2f\n"
-+                "   ahi  %0,16\n"
-+                "   srl  %2,16\n"
-+                "2: tml  %2,0x00ff\n"
-+                "   jnz  3f\n"
-+                "   ahi  %0,8\n"
-+                "   srl  %2,8\n"
-+                "3: nr   %2,%1\n"
-+                "   ic   %2,0(%2,%5)\n"
-+                "   alr  %0,%2\n"
-+                "4:"
-+                : "=&a" (res), "=&d" (cmp), "=&a" (count)
-+                : "a" (size), "a" (addr), "a" (&_sb_findmap) : "cc" );
-+        return (res < size) ? res : size;
-+}
-+
-+static inline int find_next_zero_bit (void * addr, int size, int offset)
- {
-         unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
-         unsigned long bitvec, reg;
-@@ -680,11 +599,49 @@
-         return (offset + res);
- }
-+static inline int find_next_bit (void * addr, int size, int offset)
-+{
-+        unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
-+        unsigned long bitvec, reg;
-+        int set, bit = offset & 31, res;
-+
-+        if (bit) {
-+                /*
-+                 * Look for set bit in first word
-+                 */
-+                bitvec = (*p) >> bit;
-+                __asm__("   slr  %0,%0\n"
-+                        "   lhi  %2,0xff\n"
-+                        "   tml  %1,0xffff\n"
-+                        "   jnz  0f\n"
-+                        "   ahi  %0,16\n"
-+                        "   srl  %1,16\n"
-+                        "0: tml  %1,0x00ff\n"
-+                        "   jnz  1f\n"
-+                        "   ahi  %0,8\n"
-+                        "   srl  %1,8\n"
-+                        "1: nr   %1,%2\n"
-+                        "   ic   %1,0(%1,%3)\n"
-+                        "   alr  %0,%1"
-+                        : "=&d" (set), "+a" (bitvec), "=&d" (reg)
-+                        : "a" (&_sb_findmap) : "cc" );
-+                if (set < (32 - bit))
-+                        return set + offset;
-+                offset += 32 - bit;
-+                p++;
-+        }
-+        /*
-+         * No set bit yet, search remaining full words for a bit
-+         */
-+        res = find_first_bit (p, size - 32 * (p - (unsigned long *) addr));
-+        return (offset + res);
-+}
-+
- /*
-  * ffz = Find First Zero in word. Undefined if no zero exists,
-  * so code should check against ~0UL first..
-  */
--static __inline__ unsigned long ffz(unsigned long word)
-+static inline unsigned long ffz(unsigned long word)
- {
-       unsigned long reg;
-         int result;
-@@ -708,40 +665,109 @@
- }
- /*
-+ * __ffs = find first bit in word. Undefined if no bit exists,
-+ * so code should check against 0UL first..
-+ */
-+static inline unsigned long __ffs(unsigned long word)
-+{
-+      unsigned long reg, result;
-+
-+        __asm__("   slr  %0,%0\n"
-+                "   lhi  %2,0xff\n"
-+                "   tml  %1,0xffff\n"
-+                "   jnz  0f\n"
-+                "   ahi  %0,16\n"
-+                "   srl  %1,16\n"
-+                "0: tml  %1,0x00ff\n"
-+                "   jnz  1f\n"
-+                "   ahi  %0,8\n"
-+                "   srl  %1,8\n"
-+                "1: nr   %1,%2\n"
-+                "   ic   %1,0(%1,%3)\n"
-+                "   alr  %0,%1"
-+                : "=&d" (result), "+a" (word), "=&d" (reg)
-+                : "a" (&_sb_findmap) : "cc" );
-+        return result;
-+}
-+
-+/*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 140-bit bitmap where the first 100 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 140
-+ * bits is cleared.
-+ */
-+static inline int sched_find_first_bit(unsigned long *b)
-+{
-+      return find_first_bit(b, 140);
-+}
-+
-+/*
-  * ffs: find first bit set. This is defined the same way as
-  * the libc and compiler builtin ffs routines, therefore
-  * differs in spirit from the above ffz (man ffs).
-  */
--extern int __inline__ ffs (int x)
-+extern int inline ffs (int x)
- {
--        int r;
-+        int r = 1;
-         if (x == 0)
--          return 0;
--        __asm__("    slr  %0,%0\n"
--                "    tml  %1,0xffff\n"
-+              return 0;
-+        __asm__("    tml  %1,0xffff\n"
-                 "    jnz  0f\n"
--                "    ahi  %0,16\n"
-                 "    srl  %1,16\n"
-+                "    ahi  %0,16\n"
-                 "0:  tml  %1,0x00ff\n"
-                 "    jnz  1f\n"
--                "    ahi  %0,8\n"
-                 "    srl  %1,8\n"
-+                "    ahi  %0,8\n"
-                 "1:  tml  %1,0x000f\n"
-                 "    jnz  2f\n"
--                "    ahi  %0,4\n"
-                 "    srl  %1,4\n"
-+                "    ahi  %0,4\n"
-                 "2:  tml  %1,0x0003\n"
-                 "    jnz  3f\n"
--                "    ahi  %0,2\n"
-                 "    srl  %1,2\n"
-+                "    ahi  %0,2\n"
-                 "3:  tml  %1,0x0001\n"
-                 "    jnz  4f\n"
-                 "    ahi  %0,1\n"
-                 "4:"
-                 : "=&d" (r), "+d" (x) : : "cc" );
--        return r+1;
-+        return r;
-+}
-+
-+/*
-+ * fls: find last bit set.
-+ */
-+extern __inline__ int fls(int x)
-+{
-+      int r = 32;
-+
-+      if (x == 0)
-+              return 0;
-+      __asm__("    tmh  %1,0xffff\n"
-+              "    jz   0f\n"
-+              "    sll  %1,16\n"
-+              "    ahi  %0,-16\n"
-+              "0:  tmh  %1,0xff00\n"
-+              "    jz   1f\n"
-+              "    sll  %1,8\n"
-+              "    ahi  %0,-8\n"
-+              "1:  tmh  %1,0xf000\n"
-+              "    jz   2f\n"
-+              "    sll  %1,4\n"
-+              "    ahi  %0,-4\n"
-+              "2:  tmh  %1,0xc000\n"
-+              "    jz   3f\n"
-+              "    sll  %1,2\n"
-+              "    ahi  %0,-2\n"
-+              "3:  tmh  %1,0x8000\n"
-+              "    jz   4f\n"
-+              "    ahi  %0,-1\n"
-+              "4:"
-+              : "+d" (r), "+d" (x) : : "cc" );
-+      return r;
- }
- /*
-@@ -769,7 +795,7 @@
- #define ext2_set_bit(nr, addr)       test_and_set_bit((nr)^24, addr)
- #define ext2_clear_bit(nr, addr)     test_and_clear_bit((nr)^24, addr)
- #define ext2_test_bit(nr, addr)      test_bit((nr)^24, addr)
--static __inline__ int ext2_find_first_zero_bit(void *vaddr, unsigned size)
-+static inline int ext2_find_first_zero_bit(void *vaddr, unsigned size)
- {
-       unsigned long cmp, count;
-         int res;
-@@ -808,7 +834,7 @@
-         return (res < size) ? res : size;
- }
--static __inline__ int 
-+static inline int 
- ext2_find_next_zero_bit(void *vaddr, unsigned size, unsigned offset)
- {
-         unsigned long *addr = vaddr;
-diff -urN linux-2.4.24.org/include/asm-s390x/bitops.h linux-2.4.24/include/asm-s390x/bitops.h
---- linux-2.4.24.org/include/asm-s390x/bitops.h        2004-02-04 20:48:28.470122479 +0100
-+++ linux-2.4.24/include/asm-s390x/bitops.h    2004-02-04 20:52:54.030886671 +0100
-@@ -51,271 +51,220 @@
- extern const char _oi_bitmap[];
- extern const char _ni_bitmap[];
- extern const char _zb_findmap[];
-+extern const char _sb_findmap[];
- #ifdef CONFIG_SMP
- /*
-  * SMP save set_bit routine based on compare and swap (CS)
-  */
--static __inline__ void set_bit_cs(unsigned long nr, volatile void * addr)
-+static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
- {
--        unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lghi  %2,7\n"         /* CS must be aligned on 4 byte b. */
--             "   ngr   %2,%1\n"        /* isolate last 2 bits of address */
--             "   xgr   %1,%2\n"        /* make addr % 4 == 0 */
--             "   sllg  %2,%2,3\n"
--             "   agr   %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 7;               /* align address to 8 */
-+      nr += (addr & 7) << 3;          /* add alignment to bit number */
- #endif
--             "   lghi  %2,63\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srlg  %0,%0,3\n"
--             "   lghi  %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sllg  %3,%3,0(%2)\n"  /* make OR mask */
--             "   lg    %0,0(%1)\n"
--             "0: lgr   %2,%0\n"        /* CS loop starts here */
--             "   ogr   %2,%3\n"        /* set bit */
--             "   csg   %0,%2,0(%1)\n"
--             "   jl    0b"
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
-+      addr += (nr ^ (nr & 63)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 63);        /* make OR mask */
-+      asm volatile(
-+              "   lg   %0,0(%4)\n"
-+              "0: lgr  %1,%0\n"
-+              "   ogr  %1,%3\n"
-+              "   csg  %0,%1,0(%4)\n"
-+              "   jl   0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned long *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
- }
- /*
-  * SMP save clear_bit routine based on compare and swap (CS)
-  */
--static __inline__ void clear_bit_cs(unsigned long nr, volatile void * addr)
-+static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
- {
--        unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lghi  %2,7\n"         /* CS must be aligned on 4 byte b. */
--             "   ngr   %2,%1\n"        /* isolate last 2 bits of address */
--             "   xgr   %1,%2\n"        /* make addr % 4 == 0 */
--             "   sllg  %2,%2,3\n"
--             "   agr   %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 7;               /* align address to 8 */
-+      nr += (addr & 7) << 3;          /* add alignment to bit number */
- #endif
--             "   lghi  %2,63\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srlg  %0,%0,3\n"
--             "   lghi  %3,-2\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   lghi  %3,-2\n"
--             "   rllg  %3,%3,0(%2)\n"  /* make AND mask */
--             "   lg    %0,0(%1)\n"
--             "0: lgr   %2,%0\n"        /* CS loop starts here */
--             "   ngr   %2,%3\n"        /* clear bit */
--             "   csg   %0,%2,0(%1)\n"
--             "   jl    0b"
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
-+      addr += (nr ^ (nr & 63)) >> 3;  /* calculate address for CS */
-+      mask = ~(1UL << (nr & 63));     /* make AND mask */
-+      asm volatile(
-+              "   lg   %0,0(%4)\n"
-+              "0: lgr  %1,%0\n"
-+              "   ngr  %1,%3\n"
-+              "   csg  %0,%1,0(%4)\n"
-+              "   jl   0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned long *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
- }
- /*
-  * SMP save change_bit routine based on compare and swap (CS)
-  */
--static __inline__ void change_bit_cs(unsigned long nr, volatile void * addr)
-+static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
- {
--        unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lghi  %2,7\n"         /* CS must be aligned on 4 byte b. */
--             "   ngr   %2,%1\n"        /* isolate last 2 bits of address */
--             "   xgr   %1,%2\n"        /* make addr % 4 == 0 */
--             "   sllg  %2,%2,3\n"
--             "   agr   %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 7;               /* align address to 8 */
-+      nr += (addr & 7) << 3;          /* add alignment to bit number */
- #endif
--             "   lghi  %2,63\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srlg  %0,%0,3\n"
--             "   lghi  %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sllg  %3,%3,0(%2)\n"  /* make XR mask */
--             "   lg    %0,0(%1)\n"
--             "0: lgr   %2,%0\n"        /* CS loop starts here */
--             "   xgr   %2,%3\n"        /* change bit */
--             "   csg   %0,%2,0(%1)\n"
--             "   jl    0b"
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) : 
--             : "cc", "memory" );
-+      addr += (nr ^ (nr & 63)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 63);        /* make XOR mask */
-+      asm volatile(
-+              "   lg   %0,0(%4)\n"
-+              "0: lgr  %1,%0\n"
-+              "   xgr  %1,%3\n"
-+              "   csg  %0,%1,0(%4)\n"
-+              "   jl   0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned long *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
- }
- /*
-  * SMP save test_and_set_bit routine based on compare and swap (CS)
-  */
--static __inline__ int 
--test_and_set_bit_cs(unsigned long nr, volatile void * addr)
-+static inline int 
-+test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
- {
--        unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lghi  %2,7\n"         /* CS must be aligned on 4 byte b. */
--             "   ngr   %2,%1\n"        /* isolate last 2 bits of address */
--             "   xgr   %1,%2\n"        /* make addr % 4 == 0 */
--             "   sllg  %2,%2,3\n"
--             "   agr   %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 7;               /* align address to 8 */
-+      nr += (addr & 7) << 3;          /* add alignment to bit number */
- #endif
--             "   lghi  %2,63\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srlg  %0,%0,3\n"
--             "   lghi  %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sllg  %3,%3,0(%2)\n"  /* make OR mask */
--             "   lg    %0,0(%1)\n"
--             "0: lgr   %2,%0\n"        /* CS loop starts here */
--             "   ogr   %2,%3\n"        /* set bit */
--             "   csg   %0,%2,0(%1)\n"
--             "   jl    0b\n"
--             "   ngr   %0,%3\n"        /* isolate old bit */
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
--        return nr != 0;
-+      addr += (nr ^ (nr & 63)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 63);        /* make OR/test mask */
-+      asm volatile(
-+              "   lg   %0,0(%4)\n"
-+              "0: lgr  %1,%0\n"
-+              "   ogr  %1,%3\n"
-+              "   csg  %0,%1,0(%4)\n"
-+              "   jl   0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned long *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
-+      return (old & mask) != 0;
- }
- /*
-  * SMP save test_and_clear_bit routine based on compare and swap (CS)
-  */
--static __inline__ int
--test_and_clear_bit_cs(unsigned long nr, volatile void * addr)
-+static inline int
-+test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
- {
--        unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lghi  %2,7\n"         /* CS must be aligned on 4 byte b. */
--             "   ngr   %2,%1\n"        /* isolate last 2 bits of address */
--             "   xgr   %1,%2\n"        /* make addr % 4 == 0 */
--             "   sllg  %2,%2,3\n"
--             "   agr   %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 7;               /* align address to 8 */
-+      nr += (addr & 7) << 3;          /* add alignment to bit number */
- #endif
--             "   lghi  %2,63\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srlg  %0,%0,3\n"
--             "   lghi  %3,-2\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   rllg  %3,%3,0(%2)\n"  /* make AND mask */
--             "   lg    %0,0(%1)\n"
--             "0: lgr   %2,%0\n"        /* CS loop starts here */
--             "   ngr   %2,%3\n"        /* clear bit */
--             "   csg   %0,%2,0(%1)\n"
--             "   jl    0b\n"
--             "   xgr   %0,%2\n"        /* isolate old bit */
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
--        return nr != 0;
-+      addr += (nr ^ (nr & 63)) >> 3;  /* calculate address for CS */
-+      mask = ~(1UL << (nr & 63));     /* make AND mask */
-+      asm volatile(
-+              "   lg   %0,0(%4)\n"
-+              "0: lgr  %1,%0\n"
-+              "   ngr  %1,%3\n"
-+              "   csg  %0,%1,0(%4)\n"
-+              "   jl   0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned long *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
-+      return (old ^ new) != 0;
- }
- /*
-  * SMP save test_and_change_bit routine based on compare and swap (CS) 
-  */
--static __inline__ int
--test_and_change_bit_cs(unsigned long nr, volatile void * addr)
-+static inline int
-+test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
- {
--        unsigned long bits, mask;
--        __asm__ __volatile__(
-+        unsigned long addr, old, new, mask;
-+
-+      addr = (unsigned long) ptr;
- #if ALIGN_CS == 1
--             "   lghi  %2,7\n"         /* CS must be aligned on 4 byte b. */
--             "   ngr   %2,%1\n"        /* isolate last 2 bits of address */
--             "   xgr   %1,%2\n"        /* make addr % 4 == 0 */
--             "   sllg  %2,%2,3\n"
--             "   agr   %0,%2\n"        /* add alignement to bitnr */
-+      addr ^= addr & 7;               /* align address to 8 */
-+      nr += (addr & 7) << 3;          /* add alignment to bit number */
- #endif
--             "   lghi  %2,63\n"
--             "   nr    %2,%0\n"        /* make shift value */
--             "   xr    %0,%2\n"
--             "   srlg  %0,%0,3\n"
--             "   lghi  %3,1\n"
--             "   la    %1,0(%0,%1)\n"  /* calc. address for CS */
--             "   sllg  %3,%3,0(%2)\n"  /* make OR mask */
--             "   lg    %0,0(%1)\n"
--             "0: lgr   %2,%0\n"        /* CS loop starts here */
--             "   xgr   %2,%3\n"        /* change bit */
--             "   csg   %0,%2,0(%1)\n"
--             "   jl    0b\n"
--             "   ngr   %0,%3\n"        /* isolate old bit */
--             : "+a" (nr), "+a" (addr), "=&a" (bits), "=&d" (mask) :
--             : "cc", "memory" );
--        return nr != 0;
-+      addr += (nr ^ (nr & 63)) >> 3;  /* calculate address for CS */
-+      mask = 1UL << (nr & 63);        /* make XOR mask */
-+      asm volatile(
-+              "   lg   %0,0(%4)\n"
-+              "0: lgr  %1,%0\n"
-+              "   xgr  %1,%3\n"
-+              "   csg  %0,%1,0(%4)\n"
-+              "   jl   0b"
-+              : "=&d" (old), "=&d" (new), "+m" (*(unsigned long *) addr)
-+              : "d" (mask), "a" (addr) 
-+              : "cc" );
-+      return (old & mask) != 0;
- }
- #endif /* CONFIG_SMP */
- /*
-  * fast, non-SMP set_bit routine
-  */
--static __inline__ void __set_bit(unsigned long nr, volatile void * addr)
-+static inline void __set_bit(unsigned long nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        __asm__ __volatile__(
--             "   lghi  %1,56\n"
--             "   lghi  %0,7\n"
--             "   xgr   %1,%2\n"
--             "   nr    %0,%2\n"
--             "   srlg  %1,%1,3\n"
--             "   la    %1,0(%1,%3)\n"
--             "   la    %0,0(%0,%4)\n"
--             "   oc    0(1,%1),0(%0)"
--             : "=&a" (reg1), "=&a" (reg2)
--             : "a" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--}
--
--static __inline__ void 
--__constant_set_bit(const unsigned long nr, volatile void * addr)
--{
--  switch (nr&7) {
--  case 0:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x01"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7))) 
--                          : : "1", "cc", "memory");
--    break;
--  case 1:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x02"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 2:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x04"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 3:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x08"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 4:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x10"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 5:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x20"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 6:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x40"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 7:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "oi 0(1),0x80"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  }
-+      unsigned long addr;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 56) >> 3);
-+        asm volatile("oc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+}
-+
-+static inline void 
-+__constant_set_bit(const unsigned long nr, volatile void *ptr)
-+{
-+      unsigned long addr;
-+
-+      addr = ((unsigned long) ptr) + ((nr >> 3) ^ 7);
-+      switch (nr&7) {
-+      case 0:
-+              asm volatile ("oi 0(%1),0x01"
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 1:
-+              asm volatile ("oi 0(%1),0x02"
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 2:
-+              asm volatile ("oi 0(%1),0x04" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 3:
-+              asm volatile ("oi 0(%1),0x08" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 4:
-+              asm volatile ("oi 0(%1),0x10" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 5:
-+              asm volatile ("oi 0(%1),0x20" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 6:
-+              asm volatile ("oi 0(%1),0x40" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 7:
-+              asm volatile ("oi 0(%1),0x80" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      }
- }
- #define set_bit_simple(nr,addr) \
-@@ -326,76 +275,58 @@
- /*
-  * fast, non-SMP clear_bit routine
-  */
--static __inline__ void 
--__clear_bit(unsigned long nr, volatile void * addr)
-+static inline void 
-+__clear_bit(unsigned long nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        __asm__ __volatile__(
--             "   lghi  %1,56\n"
--             "   lghi  %0,7\n"
--             "   xgr   %1,%2\n"
--             "   nr    %0,%2\n"
--             "   srlg  %1,%1,3\n"
--             "   la    %1,0(%1,%3)\n"
--             "   la    %0,0(%0,%4)\n"
--             "   nc    0(1,%1),0(%0)"
--             : "=&a" (reg1), "=&a" (reg2)
--           : "d" (nr), "a" (addr), "a" (&_ni_bitmap) : "cc", "memory" );
--}
--
--static __inline__ void 
--__constant_clear_bit(const unsigned long nr, volatile void * addr)
--{
--  switch (nr&7) {
--  case 0:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xFE"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 1:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xFD"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 2:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xFB"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 3:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xF7"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 4:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xEF"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "cc", "memory" );
--    break;
--  case 5:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xDF"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 6:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0xBF"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 7:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "ni 0(1),0x7F"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  }
-+      unsigned long addr;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 56) >> 3);
-+        asm volatile("nc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_ni_bitmap + (nr & 7))
-+                   : "cc" );
-+}
-+
-+static inline void 
-+__constant_clear_bit(const unsigned long nr, volatile void *ptr)
-+{
-+      unsigned long addr;
-+
-+      addr = ((unsigned long) ptr) + ((nr >> 3) ^ 7);
-+      switch (nr&7) {
-+      case 0:
-+              asm volatile ("ni 0(%1),0xFE" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 1:
-+              asm volatile ("ni 0(%1),0xFD"
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 2:
-+              asm volatile ("ni 0(%1),0xFB" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 3:
-+              asm volatile ("ni 0(%1),0xF7" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 4:
-+              asm volatile ("ni 0(%1),0xEF" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 5:
-+              asm volatile ("ni 0(%1),0xDF" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 6:
-+              asm volatile ("ni 0(%1),0xBF" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 7:
-+              asm volatile ("ni 0(%1),0x7F" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      }
- }
- #define clear_bit_simple(nr,addr) \
-@@ -406,75 +337,57 @@
- /* 
-  * fast, non-SMP change_bit routine 
-  */
--static __inline__ void __change_bit(unsigned long nr, volatile void * addr)
-+static inline void __change_bit(unsigned long nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        __asm__ __volatile__(
--             "   lghi  %1,56\n"
--             "   lghi  %0,7\n"
--             "   xgr   %1,%2\n"
--             "   nr    %0,%2\n"
--             "   srlg  %1,%1,3\n"
--             "   la    %1,0(%1,%3)\n"
--             "   la    %0,0(%0,%4)\n"
--             "   xc    0(1,%1),0(%0)"
--             : "=&a" (reg1), "=&a" (reg2)
--           : "d" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--}
--
--static __inline__ void 
--__constant_change_bit(const unsigned long nr, volatile void * addr) 
--{
--  switch (nr&7) {
--  case 0:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x01"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "cc", "memory" );
--    break;
--  case 1:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x02"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "cc", "memory" );
--    break;
--  case 2:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x04"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "cc", "memory" );
--    break;
--  case 3:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x08"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "cc", "memory" );
--    break;
--  case 4:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x10"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "cc", "memory" );
--    break;
--  case 5:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x20"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 6:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x40"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  case 7:
--    __asm__ __volatile__ ("la 1,%0\n\t"
--                          "xi 0(1),0x80"
--                          : "=m" (*((volatile char *) addr + ((nr>>3)^7)))
--                          : : "1", "cc", "memory" );
--    break;
--  }
-+      unsigned long addr;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 56) >> 3);
-+        asm volatile("xc 0(1,%1),0(%2)"
-+                   :  "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+}
-+
-+static inline void 
-+__constant_change_bit(const unsigned long nr, volatile void *ptr) 
-+{
-+      unsigned long addr;
-+
-+      addr = ((unsigned long) ptr) + ((nr >> 3) ^ 7);
-+      switch (nr&7) {
-+      case 0:
-+              asm volatile ("xi 0(%1),0x01" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 1:
-+              asm volatile ("xi 0(%1),0x02" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 2:
-+              asm volatile ("xi 0(%1),0x04" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 3:
-+              asm volatile ("xi 0(%1),0x08" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 4:
-+              asm volatile ("xi 0(%1),0x10" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 5:
-+              asm volatile ("xi 0(%1),0x20" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 6:
-+              asm volatile ("xi 0(%1),0x40" 
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      case 7:
-+              asm volatile ("xi 0(%1),0x80"
-+                            : "+m" (*(char *) addr) : "a" (addr) : "cc" );
-+              break;
-+      }
- }
- #define change_bit_simple(nr,addr) \
-@@ -485,77 +398,57 @@
- /*
-  * fast, non-SMP test_and_set_bit routine
-  */
--static __inline__ int
--test_and_set_bit_simple(unsigned long nr, volatile void * addr)
-+static inline int
-+test_and_set_bit_simple(unsigned long nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
--        __asm__ __volatile__(
--             "   lghi  %1,56\n"
--             "   lghi  %2,7\n"
--             "   xgr   %1,%3\n"
--             "   nr    %2,%3\n"
--             "   srlg  %1,%1,3\n"
--             "   la    %1,0(%1,%4)\n"
--             "   ic    %0,0(%1)\n"
--             "   srl   %0,0(%2)\n"
--             "   la    %2,0(%2,%5)\n"
--             "   oc    0(1,%1),0(%2)"
--             : "=&d" (oldbit), "=&a" (reg1), "=&a" (reg2)
--           : "d" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--        return oldbit & 1;
-+      unsigned long addr;
-+      unsigned char ch;
-+
-+      addr = (unsigned long) ptr + ((nr ^ 56) >> 3);
-+      ch = *(unsigned char *) addr;
-+        asm volatile("oc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+      return (ch >> (nr & 7)) & 1;
- }
- #define __test_and_set_bit(X,Y)               test_and_set_bit_simple(X,Y)
- /*
-  * fast, non-SMP test_and_clear_bit routine
-  */
--static __inline__ int
--test_and_clear_bit_simple(unsigned long nr, volatile void * addr)
-+static inline int
-+test_and_clear_bit_simple(unsigned long nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
-+      unsigned long addr;
-+      unsigned char ch;
--        __asm__ __volatile__(
--             "   lghi  %1,56\n"
--             "   lghi  %2,7\n"
--             "   xgr   %1,%3\n"
--             "   nr    %2,%3\n"
--             "   srlg  %1,%1,3\n"
--             "   la    %1,0(%1,%4)\n"
--             "   ic    %0,0(%1)\n"
--             "   srl   %0,0(%2)\n"
--             "   la    %2,0(%2,%5)\n"
--             "   nc    0(1,%1),0(%2)"
--             : "=&d" (oldbit), "=&a" (reg1), "=&a" (reg2)
--           : "d" (nr), "a" (addr), "a" (&_ni_bitmap) : "cc", "memory" );
--        return oldbit & 1;
-+      addr = (unsigned long) ptr + ((nr ^ 56) >> 3);
-+      ch = *(unsigned char *) addr;
-+        asm volatile("nc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_ni_bitmap + (nr & 7))
-+                   : "cc" );
-+      return (ch >> (nr & 7)) & 1;
- }
- #define __test_and_clear_bit(X,Y)     test_and_clear_bit_simple(X,Y)
- /*
-  * fast, non-SMP test_and_change_bit routine
-  */
--static __inline__ int
--test_and_change_bit_simple(unsigned long nr, volatile void * addr)
-+static inline int
-+test_and_change_bit_simple(unsigned long nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
-+      unsigned long addr;
-+      unsigned char ch;
--        __asm__ __volatile__(
--             "   lghi  %1,56\n"
--             "   lghi  %2,7\n"
--             "   xgr   %1,%3\n"
--             "   nr    %2,%3\n"
--             "   srlg  %1,%1,3\n"
--             "   la    %1,0(%1,%4)\n"
--             "   ic    %0,0(%1)\n"
--             "   srl   %0,0(%2)\n"
--             "   la    %2,0(%2,%5)\n"
--             "   xc    0(1,%1),0(%2)"
--             : "=&d" (oldbit), "=&a" (reg1), "=&a" (reg2)
--           : "d" (nr), "a" (addr), "a" (&_oi_bitmap) : "cc", "memory" );
--        return oldbit & 1;
-+      addr = (unsigned long) ptr + ((nr ^ 56) >> 3);
-+      ch = *(unsigned char *) addr;
-+        asm volatile("xc 0(1,%1),0(%2)"
-+                   : "+m" (*(char *) addr)
-+                   : "a" (addr), "a" (_oi_bitmap + (nr & 7))
-+                   : "cc" );
-+      return (ch >> (nr & 7)) & 1;
- }
- #define __test_and_change_bit(X,Y)    test_and_change_bit_simple(X,Y)
-@@ -580,26 +473,18 @@
-  * This routine doesn't need to be atomic.
-  */
--static __inline__ int __test_bit(unsigned long nr, volatile void * addr)
-+static inline int __test_bit(unsigned long nr, volatile void *ptr)
- {
--      unsigned long reg1, reg2;
--        int oldbit;
-+      unsigned long addr;
-+      unsigned char ch;
--        __asm__ __volatile__(
--             "   lghi  %2,56\n"
--             "   lghi  %1,7\n"
--             "   xgr   %2,%3\n"
--             "   nr    %1,%3\n"
--             "   srlg  %2,%2,3\n"
--             "   ic    %0,0(%2,%4)\n"
--             "   srl   %0,0(%1)\n"
--             : "=&d" (oldbit), "=&a" (reg1), "=&a" (reg2)
--           : "d" (nr), "a" (addr) : "cc" );
--        return oldbit & 1;
-+      addr = (unsigned long) ptr + ((nr ^ 56) >> 3);
-+      ch = *(unsigned char *) addr;
-+      return (ch >> (nr & 7)) & 1;
- }
--static __inline__ int 
--__constant_test_bit(unsigned long nr, volatile void * addr) {
-+static inline int 
-+__constant_test_bit(unsigned long nr, volatile void *addr) {
-     return (((volatile char *) addr)[(nr>>3)^7] & (1<<(nr&7))) != 0;
- }
-@@ -611,7 +496,7 @@
- /*
-  * Find-bit routines..
-  */
--static __inline__ unsigned long
-+static inline unsigned long
- find_first_zero_bit(void * addr, unsigned long size)
- {
-         unsigned long res, cmp, count;
-@@ -653,7 +538,49 @@
-         return (res < size) ? res : size;
- }
--static __inline__ unsigned long
-+static inline unsigned long
-+find_first_bit(void * addr, unsigned long size)
-+{
-+        unsigned long res, cmp, count;
-+
-+        if (!size)
-+                return 0;
-+        __asm__("   slgr  %1,%1\n"
-+                "   lgr   %2,%3\n"
-+                "   slgr  %0,%0\n"
-+                "   aghi  %2,63\n"
-+                "   srlg  %2,%2,6\n"
-+                "0: cg    %1,0(%0,%4)\n"
-+                "   jne   1f\n"
-+                "   aghi  %0,8\n"
-+                "   brct  %2,0b\n"
-+                "   lgr   %0,%3\n"
-+                "   j     5f\n"
-+                "1: lg    %2,0(%0,%4)\n"
-+                "   sllg  %0,%0,3\n"
-+                "   clr   %2,%1\n"
-+              "   jne   2f\n"
-+              "   aghi  %0,32\n"
-+                "   srlg  %2,%2,32\n"
-+              "2: lghi  %1,0xff\n"
-+                "   tmll  %2,0xffff\n"
-+                "   jnz   3f\n"
-+                "   aghi  %0,16\n"
-+                "   srl   %2,16\n"
-+                "3: tmll  %2,0x00ff\n"
-+                "   jnz   4f\n"
-+                "   aghi  %0,8\n"
-+                "   srl   %2,8\n"
-+                "4: ngr   %2,%1\n"
-+                "   ic    %2,0(%2,%5)\n"
-+                "   algr  %0,%2\n"
-+                "5:"
-+                : "=&a" (res), "=&d" (cmp), "=&a" (count)
-+              : "a" (size), "a" (addr), "a" (&_sb_findmap) : "cc" );
-+        return (res < size) ? res : size;
-+}
-+
-+static inline unsigned long
- find_next_zero_bit (void * addr, unsigned long size, unsigned long offset)
- {
-         unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
-@@ -697,14 +624,56 @@
-         return (offset + res);
- }
-+static inline unsigned long
-+find_next_bit (void * addr, unsigned long size, unsigned long offset)
-+{
-+        unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
-+        unsigned long bitvec, reg;
-+        unsigned long set, bit = offset & 63, res;
-+
-+        if (bit) {
-+                /*
-+                 * Look for zero in first word
-+                 */
-+                bitvec = (*p) >> bit;
-+                __asm__("   slgr %0,%0\n"
-+                        "   ltr  %1,%1\n"
-+                        "   jnz  0f\n"
-+                        "   aghi %0,32\n"
-+                        "   srlg %1,%1,32\n"
-+                      "0: lghi %2,0xff\n"
-+                        "   tmll %1,0xffff\n"
-+                        "   jnz  1f\n"
-+                        "   aghi %0,16\n"
-+                        "   srlg %1,%1,16\n"
-+                        "1: tmll %1,0x00ff\n"
-+                        "   jnz  2f\n"
-+                        "   aghi %0,8\n"
-+                        "   srlg %1,%1,8\n"
-+                        "2: ngr  %1,%2\n"
-+                        "   ic   %1,0(%1,%3)\n"
-+                        "   algr %0,%1"
-+                        : "=&d" (set), "+a" (bitvec), "=&d" (reg)
-+                        : "a" (&_sb_findmap) : "cc" );
-+                if (set < (64 - bit))
-+                        return set + offset;
-+                offset += 64 - bit;
-+                p++;
-+        }
-+        /*
-+         * No set bit yet, search remaining full words for a bit
-+         */
-+        res = find_first_bit (p, size - 64 * (p - (unsigned long *) addr));
-+        return (offset + res);
-+}
-+
- /*
-  * ffz = Find First Zero in word. Undefined if no zero exists,
-  * so code should check against ~0UL first..
-  */
--static __inline__ unsigned long ffz(unsigned long word)
-+static inline unsigned long ffz(unsigned long word)
- {
--      unsigned long reg;
--        int result;
-+      unsigned long reg, result;
-         __asm__("   lhi  %2,-1\n"
-                 "   slgr %0,%0\n"
-@@ -730,40 +699,112 @@
- }
- /*
-+ * __ffs = find first bit in word. Undefined if no bit exists,
-+ * so code should check against 0UL first..
-+ */
-+static inline unsigned long __ffs (unsigned long word)
-+{
-+        unsigned long reg, result;
-+
-+        __asm__("   slgr %0,%0\n"
-+                "   ltr  %1,%1\n"
-+                "   jnz  0f\n"
-+                "   aghi %0,32\n"
-+                "   srlg %1,%1,32\n"
-+                "0: lghi %2,0xff\n"
-+                "   tmll %1,0xffff\n"
-+                "   jnz  1f\n"
-+                "   aghi %0,16\n"
-+                "   srlg %1,%1,16\n"
-+                "1: tmll %1,0x00ff\n"
-+                "   jnz  2f\n"
-+                "   aghi %0,8\n"
-+                "   srlg %1,%1,8\n"
-+                "2: ngr  %1,%2\n"
-+                "   ic   %1,0(%1,%3)\n"
-+                "   algr %0,%1"
-+                : "=&d" (result), "+a" (word), "=&d" (reg)
-+                : "a" (&_sb_findmap) : "cc" );
-+        return result;
-+}
-+
-+/*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 140-bit bitmap where the first 100 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 140
-+ * bits is cleared.
-+ */
-+static inline int sched_find_first_bit(unsigned long *b)
-+{
-+      return find_first_bit(b, 140);
-+}
-+
-+/*
-  * ffs: find first bit set. This is defined the same way as
-  * the libc and compiler builtin ffs routines, therefore
-  * differs in spirit from the above ffz (man ffs).
-  */
--
--extern int __inline__ ffs (int x)
-+extern int inline ffs (int x)
- {
--        int r;
-+        int r = 1;
-         if (x == 0)
--          return 0;
--        __asm__("    slr  %0,%0\n"
--                "    tml  %1,0xffff\n"
-+              return 0;
-+        __asm__("    tml  %1,0xffff\n"
-                 "    jnz  0f\n"
--                "    ahi  %0,16\n"
-                 "    srl  %1,16\n"
-+                "    ahi  %0,16\n"
-                 "0:  tml  %1,0x00ff\n"
-                 "    jnz  1f\n"
--                "    ahi  %0,8\n"
-                 "    srl  %1,8\n"
-+                "    ahi  %0,8\n"
-                 "1:  tml  %1,0x000f\n"
-                 "    jnz  2f\n"
--                "    ahi  %0,4\n"
-                 "    srl  %1,4\n"
-+                "    ahi  %0,4\n"
-                 "2:  tml  %1,0x0003\n"
-                 "    jnz  3f\n"
--                "    ahi  %0,2\n"
-                 "    srl  %1,2\n"
-+                "    ahi  %0,2\n"
-                 "3:  tml  %1,0x0001\n"
-                 "    jnz  4f\n"
-                 "    ahi  %0,1\n"
-                 "4:"
-                 : "=&d" (r), "+d" (x) : : "cc" );
--        return r+1;
-+        return r;
-+}
-+
-+/*
-+ * fls: find last bit set.
-+ */
-+extern __inline__ int fls(int x)
-+{
-+      int r = 32;
-+
-+      if (x == 0)
-+              return 0;
-+      __asm__("    tmh  %1,0xffff\n"
-+              "    jz   0f\n"
-+              "    sll  %1,16\n"
-+              "    ahi  %0,-16\n"
-+              "0:  tmh  %1,0xff00\n"
-+              "    jz   1f\n"
-+              "    sll  %1,8\n"
-+              "    ahi  %0,-8\n"
-+              "1:  tmh  %1,0xf000\n"
-+              "    jz   2f\n"
-+              "    sll  %1,4\n"
-+              "    ahi  %0,-4\n"
-+              "2:  tmh  %1,0xc000\n"
-+              "    jz   3f\n"
-+              "    sll  %1,2\n"
-+              "    ahi  %0,-2\n"
-+              "3:  tmh  %1,0x8000\n"
-+              "    jz   4f\n"
-+              "    ahi  %0,-1\n"
-+              "4:"
-+              : "+d" (r), "+d" (x) : : "cc" );
-+      return r;
- }
- /*
-@@ -791,7 +832,7 @@
- #define ext2_set_bit(nr, addr)       test_and_set_bit((nr)^56, addr)
- #define ext2_clear_bit(nr, addr)     test_and_clear_bit((nr)^56, addr)
- #define ext2_test_bit(nr, addr)      test_bit((nr)^56, addr)
--static __inline__ unsigned long
-+static inline unsigned long
- ext2_find_first_zero_bit(void *vaddr, unsigned long size)
- {
-         unsigned long res, cmp, count;
-@@ -833,7 +874,7 @@
-         return (res < size) ? res : size;
- }
--static __inline__ unsigned long
-+static inline unsigned long
- ext2_find_next_zero_bit(void *vaddr, unsigned long size, unsigned long offset)
- {
-         unsigned long *addr = vaddr;
-diff -urN linux-2.4.24.org/include/asm-sparc/bitops.h linux-2.4.24/include/asm-sparc/bitops.h
---- linux-2.4.24.org/include/asm-sparc/bitops.h        2004-02-04 20:47:50.760965997 +0100
-+++ linux-2.4.24/include/asm-sparc/bitops.h    2004-02-04 20:52:54.074877521 +0100
-@@ -231,6 +231,63 @@
-       return result;
- }
-+/**
-+ * __ffs - find first bit in word.
-+ * @word: The word to search
-+ *
-+ * Undefined if no bit exists, so code should check against 0 first.
-+ */
-+static __inline__ int __ffs(unsigned long word)
-+{
-+      int num = 0;
-+
-+      if ((word & 0xffff) == 0) {
-+              num += 16;
-+              word >>= 16;
-+      }
-+      if ((word & 0xff) == 0) {
-+              num += 8;
-+              word >>= 8;
-+      }
-+      if ((word & 0xf) == 0) {
-+              num += 4;
-+              word >>= 4;
-+      }
-+      if ((word & 0x3) == 0) {
-+              num += 2;
-+              word >>= 2;
-+      }
-+      if ((word & 0x1) == 0)
-+              num += 1;
-+      return num;
-+}
-+
-+/*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 140-bit bitmap where the first 100 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 140
-+ * bits is cleared.
-+ */
-+static __inline__ int sched_find_first_bit(unsigned long *b)
-+{
-+
-+      if (unlikely(b[0]))
-+              return __ffs(b[0]);
-+      if (unlikely(b[1]))
-+              return __ffs(b[1]) + 32;
-+      if (unlikely(b[2]))
-+              return __ffs(b[2]) + 64;
-+      if (b[3])
-+              return __ffs(b[3]) + 96;
-+      return __ffs(b[4]) + 128;
-+}
-+
-+/*
-+ * fls: find last bit set.
-+ */
-+
-+#define fls(x) generic_fls(x)
-+
- /*
-  * ffs: find first bit set. This is defined the same way as
-  * the libc and compiler builtin ffs routines, therefore
-@@ -296,6 +353,32 @@
- #define find_first_zero_bit(addr, size) \
-         find_next_zero_bit((addr), (size), 0)
-+/**
-+ * find_next_bit - find the first set bit in a memory region
-+ * @addr: The address to base the search on
-+ * @offset: The bitnumber to start searching at
-+ * @size: The maximum size to search
-+ *
-+ * Scheduler induced bitop, do not use.
-+ */
-+static inline int find_next_bit(unsigned long *addr, int size, int offset)
-+{
-+      unsigned long *p = addr + (offset >> 5);
-+      int num = offset & ~0x1f;
-+      unsigned long word;
-+
-+      word = *p++;
-+      word &= ~((1 << (offset & 0x1f)) - 1);
-+      while (num < size) {
-+              if (word != 0) {
-+                      return __ffs(word) + num;
-+              }
-+              word = *p++;
-+              num += 0x20;
-+      }
-+      return num;
-+}
-+
- static inline int test_le_bit(int nr, __const__ void * addr)
- {
-       __const__ unsigned char *ADDR = (__const__ unsigned char *) addr;
-diff -urN linux-2.4.24.org/include/asm-sparc/system.h linux-2.4.24/include/asm-sparc/system.h
---- linux-2.4.24.org/include/asm-sparc/system.h        2004-02-04 20:47:50.644990120 +0100
-+++ linux-2.4.24/include/asm-sparc/system.h    2004-02-04 20:52:54.110870035 +0100
-@@ -84,7 +84,7 @@
-  *
-  * SWITCH_ENTER and SWITH_DO_LAZY_FPU do not work yet (e.g. SMP does not work)
-  */
--#define prepare_to_switch() do { \
-+#define prepare_arch_switch(rq, next) do { \
-       __asm__ __volatile__( \
-       ".globl\tflush_patch_switch\nflush_patch_switch:\n\t" \
-       "save %sp, -0x40, %sp; save %sp, -0x40, %sp; save %sp, -0x40, %sp\n\t" \
-@@ -92,6 +92,8 @@
-       "save %sp, -0x40, %sp\n\t" \
-       "restore; restore; restore; restore; restore; restore; restore"); \
- } while(0)
-+#define finish_arch_switch(rq, next)  do{ }while(0)
-+#define task_running(rq, p)           ((rq)->curr == (p))
-       /* Much care has gone into this code, do not touch it.
-        *
---- linux-2.4.30/include/asm-sparc64/bitops.h.orig     2005-04-04 03:42:20.000000000 +0200
-+++ linux-2.4.30/include/asm-sparc64/bitops.h  2005-04-05 12:20:56.000000000 +0200
-@@ -130,6 +130,23 @@
- #ifdef __KERNEL__
- /*
-+ * Every architecture must define this function. It's the fastest
-+ * way of searching a 140-bit bitmap where the first 100 bits are
-+ * unlikely to be set. It's guaranteed that at least one of the 140
-+ * bits is cleared.
-+ */
-+static inline int sched_find_first_bit(unsigned long *b)
-+{
-+      if (unlikely(b[0]))
-+              return __ffs(b[0]);
-+      if (unlikely(((unsigned int)b[1])))
-+              return __ffs(b[1]) + 64;
-+      if (b[1] >> 32)
-+              return __ffs(b[1] >> 32) + 96;
-+      return __ffs(b[2]) + 128;
-+}
-+
-+/*
-  * ffs: find first bit set. This is defined the same way as
-  * the libc and compiler builtin ffs routines, therefore
-  * differs in spirit from the above ffz (man ffs).
-@@ -190,14 +207,69 @@
- #endif
- #endif /* __KERNEL__ */
-+/**
-+ * find_next_bit - find the next set bit in a memory region
-+ * @addr: The address to base the search on
-+ * @offset: The bitnumber to start searching at
-+ * @size: The maximum size to search
-+ */
-+static __inline__ unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset)
-+{
-+      unsigned long *p = addr + (offset >> 6);
-+      unsigned long result = offset & ~63UL;
-+      unsigned long tmp;
-+
-+      if (offset >= size)
-+              return size;
-+      size -= result;
-+      offset &= 63UL;
-+      if (offset) {
-+              tmp = *(p++);
-+              tmp &= (~0UL << offset);
-+              if (size < 64)
-+                      goto found_first;
-+              if (tmp)
-+                      goto found_middle;
-+              size -= 64;
-+              result += 64;
-+      }
-+      while (size & ~63UL) {
-+              if ((tmp = *(p++)))
-+                      goto found_middle;
-+              result += 64;
-+              size -= 64;
-+      }
-+      if (!size)
-+              return result;
-+      tmp = *p;
-+
-+found_first:
-+      tmp &= (~0UL >> (64 - size));
-+      if (tmp == 0UL)        /* Are any bits set? */
-+              return result + size; /* Nope. */
-+found_middle:
-+      return result + __ffs(tmp);
-+}
-+
-+/**
-+ * find_first_bit - find the first set bit in a memory region
-+ * @addr: The address to start the search at
-+ * @size: The maximum size to search
-+ *
-+ * Returns the bit-number of the first set bit, not the number of the byte
-+ * containing a bit.
-+ */
-+#define find_first_bit(addr, size) \
-+      find_next_bit((addr), (size), 0)
-+
- /* find_next_zero_bit() finds the first zero bit in a bit string of length
-  * 'size' bits, starting the search at bit 'offset'. This is largely based
-  * on Linus's ALPHA routines, which are pretty portable BTW.
-  */
--static __inline__ unsigned long find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
-+static __inline__ unsigned long find_next_zero_bit(unsigned long *addr, unsigned long size, unsigned long offset)
- {
--      unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
-+      unsigned long *p = addr + (offset >> 6);
-       unsigned long result = offset & ~63UL;
-       unsigned long tmp;
-@@ -241,7 +313,7 @@
- #define test_and_clear_le_bit(nr,addr)        \
-       test_and_clear_bit((nr) ^ 0x38, (addr))
--static __inline__ int test_le_bit(int nr, __const__ void *addr)
-+static __inline__ int test_le_bit(int nr, __const__ unsigned long *addr)
- {
-       int                     mask;
-       __const__ unsigned char *ADDR = (__const__ unsigned char *) addr;
-@@ -254,9 +326,9 @@
- #define find_first_zero_le_bit(addr, size) \
-         find_next_zero_le_bit((addr), (size), 0)
--static __inline__ unsigned long find_next_zero_le_bit(void *addr, unsigned long size, unsigned long offset)
-+static __inline__ unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size, unsigned long offset)
- {
--      unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
-+      unsigned long *p = addr + (offset >> 6);
-       unsigned long result = offset & ~63UL;
-       unsigned long tmp;
-diff -urN linux-2.4.24.org/include/asm-sparc64/smp.h linux-2.4.24/include/asm-sparc64/smp.h
---- linux-2.4.24.org/include/asm-sparc64/smp.h 2004-02-04 20:48:01.767676594 +0100
-+++ linux-2.4.24/include/asm-sparc64/smp.h     2004-02-04 20:52:54.175856518 +0100
-@@ -111,7 +111,7 @@
-       }
- }
--#define smp_processor_id() (current->processor)
-+#define smp_processor_id() (current->cpu)
- /* This needn't do anything as we do not sleep the cpu
-  * inside of the idler task, so an interrupt is not needed
-diff -urN linux-2.4.24.org/include/asm-sparc64/system.h linux-2.4.24/include/asm-sparc64/system.h
---- linux-2.4.24.org/include/asm-sparc64/system.h      2004-02-04 20:48:01.898649351 +0100
-+++ linux-2.4.24/include/asm-sparc64/system.h  2004-02-04 20:52:54.208849656 +0100
-@@ -154,7 +154,18 @@
- #define flush_user_windows flushw_user
- #define flush_register_windows flushw_all
--#define prepare_to_switch flushw_all
-+
-+#define prepare_arch_schedule(prev)           task_lock(prev)
-+#define finish_arch_schedule(prev)            task_unlock(prev)
-+#define prepare_arch_switch(rq, next)           \
-+do {    spin_lock(&(next)->switch_lock);        \
-+        spin_unlock(&(rq)->lock);               \
-+        flushw_all();                           \
-+} while (0)
-+
-+#define finish_arch_switch(rq, prev)            \
-+do {    spin_unlock_irq(&(prev)->switch_lock);  \
-+} while (0)
- #ifndef CONFIG_DEBUG_SPINLOCK
- #define CHECK_LOCKS(PREV)     do { } while(0)
-diff -urN linux-2.4.24.org/include/linux/bitops.h linux-2.4.24/include/linux/bitops.h
---- linux-2.4.24.org/include/linux/bitops.h    2004-02-04 20:47:38.725469391 +0100
-+++ linux-2.4.24/include/linux/bitops.h        2004-02-04 20:52:54.244842170 +0100
-@@ -1,6 +1,38 @@
- #ifndef _LINUX_BITOPS_H
- #define _LINUX_BITOPS_H
-+/*
-+ * fls: find last bit set.
-+ */
-+
-+extern __inline__ int generic_fls(int x)
-+{
-+        int r = 32;
-+
-+        if (!x)
-+                return 0;
-+        if (!(x & 0xffff0000u)) {
-+                x <<= 16;
-+                r -= 16;
-+        }
-+        if (!(x & 0xff000000u)) {
-+                x <<= 8;
-+                r -= 8;
-+        }
-+        if (!(x & 0xf0000000u)) {
-+                x <<= 4;
-+                r -= 4;
-+        }
-+        if (!(x & 0xc0000000u)) {
-+                x <<= 2;
-+                r -= 2;
-+        }
-+        if (!(x & 0x80000000u)) {
-+                x <<= 1;
-+                r -= 1;
-+        }
-+        return r;
-+}
- /*
-  * ffs: find first bit set. This is defined the same way as
-diff -urN linux-2.4.24.org/include/linux/kernel_stat.h linux-2.4.24/include/linux/kernel_stat.h
---- linux-2.4.24.org/include/linux/kernel_stat.h       2004-02-04 20:47:34.063439098 +0100
-+++ linux-2.4.24/include/linux/kernel_stat.h   2004-02-04 20:52:54.297831148 +0100
-@@ -31,7 +31,6 @@
- #elif !defined(CONFIG_ARCH_S390)
-       unsigned int irqs[NR_CPUS][NR_IRQS];
- #endif
--      unsigned int context_swtch;
- };
- extern struct kernel_stat kstat;
-diff -urN linux-2.4.24.org/include/linux/sched.h linux-2.4.24/include/linux/sched.h
---- linux-2.4.24.org/include/linux/sched.h     2004-02-04 20:47:32.755711107 +0100
-+++ linux-2.4.24/include/linux/sched.h 2004-02-04 20:52:54.755735907 +0100
-@@ -6,6 +6,7 @@
- extern unsigned long event;
- #include <linux/config.h>
-+#include <linux/compiler.h>
- #include <linux/binfmts.h>
- #include <linux/threads.h>
- #include <linux/kernel.h>
-@@ -21,7 +22,7 @@
- #include <asm/mmu.h>
- #include <linux/smp.h>
--#include <linux/tty.h>
-+//#include <linux/tty.h>
- #include <linux/sem.h>
- #include <linux/signal.h>
- #include <linux/securebits.h>
-@@ -73,10 +74,12 @@
- #define CT_TO_SECS(x) ((x) / HZ)
- #define CT_TO_USECS(x)        (((x) % HZ) * 1000000/HZ)
--extern int nr_running, nr_threads;
-+extern int nr_threads;
- extern int last_pid;
-+extern unsigned long nr_running(void);
-+extern unsigned long nr_uninterruptible(void);
--#include <linux/fs.h>
-+//#include <linux/fs.h>
- #include <linux/time.h>
- #include <linux/param.h>
- #include <linux/resource.h>
-@@ -109,12 +112,6 @@
- #define SCHED_FIFO            1
- #define SCHED_RR              2
--/*
-- * This is an additional bit set when we want to
-- * yield the CPU for one re-schedule..
-- */
--#define SCHED_YIELD           0x10
--
- struct sched_param {
-       int sched_priority;
- };
-@@ -132,17 +129,21 @@
-  * a separate lock).
-  */
- extern rwlock_t tasklist_lock;
--extern spinlock_t runqueue_lock;
- extern spinlock_t mmlist_lock;
-+typedef struct task_struct task_t;
-+
- extern void sched_init(void);
--extern void init_idle(void);
-+extern void init_idle(task_t *idle, int cpu);
- extern void show_state(void);
- extern void cpu_init (void);
- extern void trap_init(void);
- extern void update_process_times(int user);
--extern void update_one_process(struct task_struct *p, unsigned long user,
-+extern void update_one_process(task_t *p, unsigned long user,
-                              unsigned long system, int cpu);
-+extern void scheduler_tick(int user_tick, int system);
-+extern void migration_init(void);
-+extern unsigned long cache_decay_ticks;
- #define       MAX_SCHEDULE_TIMEOUT    LONG_MAX
- extern signed long FASTCALL(schedule_timeout(signed long timeout));
-@@ -152,6 +153,28 @@
- extern void flush_scheduled_tasks(void);
- extern int start_context_thread(void);
- extern int current_is_keventd(void);
-+extern void FASTCALL(sched_exit(task_t * p));
-+extern int FASTCALL(idle_cpu(int cpu));
-+
-+/*
-+ * Priority of a process goes from 0..MAX_PRIO-1, valid RT
-+ * priority is 0..MAX_RT_PRIO-1, and SCHED_OTHER tasks are
-+ * in the range MAX_RT_PRIO..MAX_PRIO-1. Priority values
-+ * are inverted: lower p->prio value means higher priority.
-+ *
-+ * The MAX_RT_USER_PRIO value allows the actual maximum
-+ * RT priority to be separate from the value exported to
-+ * user-space.  This allows kernel threads to set their
-+ * priority to a value higher than any user task. Note:
-+ * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO.
-+ *
-+ * Both values are configurable at compile-time.
-+ */
-+
-+#define MAX_USER_RT_PRIO      100
-+#define MAX_RT_PRIO           MAX_USER_RT_PRIO
-+
-+#define MAX_PRIO              (MAX_RT_PRIO + 40)
- #if CONFIG_SMP
- extern void set_cpus_allowed(struct task_struct *p, unsigned long new_mask);
-@@ -280,6 +303,8 @@
- extern struct user_struct root_user;
- #define INIT_USER (&root_user)
-+typedef struct prio_array prio_array_t;
-+
- struct task_struct {
-       /*
-        * offsets of these are hardcoded elsewhere - touch with care
-@@ -297,35 +322,26 @@
-       int lock_depth;         /* Lock depth */
--/*
-- * offset 32 begins here on 32-bit platforms. We keep
-- * all fields in a single cacheline that are needed for
-- * the goodness() loop in schedule().
-- */
--      long counter;
--      long nice;
--      unsigned long policy;
--      struct mm_struct *mm;
--      int processor;
-       /*
--       * cpus_runnable is ~0 if the process is not running on any
--       * CPU. It's (1 << cpu) if it's running on a CPU. This mask
--       * is updated under the runqueue lock.
--       *
--       * To determine whether a process might run on a CPU, this
--       * mask is AND-ed with cpus_allowed.
--       */
--      unsigned long cpus_runnable, cpus_allowed;
--      /*
--       * (only the 'next' pointer fits into the cacheline, but
--       * that's just fine.)
-+       * offset 32 begins here on 32-bit platforms.
-        */
-+      unsigned int cpu;
-+      int prio, static_prio;
-       struct list_head run_list;
--      unsigned long sleep_time;
-+      prio_array_t *array;
--      struct task_struct *next_task, *prev_task;
--      struct mm_struct *active_mm;
-+      unsigned long sleep_avg;
-+      unsigned long sleep_timestamp;
-+
-+      unsigned long policy;
-+      unsigned long cpus_allowed;
-+      unsigned int time_slice, first_time_slice;
-+
-+      task_t *next_task, *prev_task;
-+
-+      struct mm_struct *mm, *active_mm;
-       struct list_head local_pages;
-+
-       unsigned int allocation_order, nr_local_pages;
- /* task state */
-@@ -348,12 +364,12 @@
-        * older sibling, respectively.  (p->father can be replaced with 
-        * p->p_pptr->pid)
-        */
--      struct task_struct *p_opptr, *p_pptr, *p_cptr, *p_ysptr, *p_osptr;
-+      task_t *p_opptr, *p_pptr, *p_cptr, *p_ysptr, *p_osptr;
-       struct list_head thread_group;
-       /* PID hash table linkage. */
--      struct task_struct *pidhash_next;
--      struct task_struct **pidhash_pprev;
-+      task_t *pidhash_next;
-+      task_t **pidhash_pprev;
-       wait_queue_head_t wait_chldexit;        /* for wait4() */
-       struct completion *vfork_done;          /* for vfork() */
-@@ -412,6 +428,8 @@
-       u32 self_exec_id;
- /* Protection of (de-)allocation: mm, files, fs, tty */
-       spinlock_t alloc_lock;
-+/* context-switch lock */
-+        spinlock_t switch_lock;
- /* journalling filesystem info */
-       void *journal_info;
-@@ -454,9 +472,15 @@
-  */
- #define _STK_LIM      (8*1024*1024)
--#define DEF_COUNTER   (10*HZ/100)     /* 100 ms time slice */
--#define MAX_COUNTER   (20*HZ/100)
--#define DEF_NICE      (0)
-+#if CONFIG_SMP
-+extern void set_cpus_allowed(task_t *p, unsigned long new_mask);
-+#else
-+#define set_cpus_allowed(p, new_mask) do { } while (0)
-+#endif
-+
-+extern void set_user_nice(task_t *p, long nice);
-+extern int task_prio(task_t *p);
-+extern int task_nice(task_t *p);
- extern void yield(void);
-@@ -477,14 +501,14 @@
-     addr_limit:               KERNEL_DS,                                      \
-     exec_domain:      &default_exec_domain,                           \
-     lock_depth:               -1,                                             \
--    counter:          DEF_COUNTER,                                    \
--    nice:             DEF_NICE,                                       \
-+    prio:             MAX_PRIO-20,                                    \
-+    static_prio:      MAX_PRIO-20,                                    \
-     policy:           SCHED_OTHER,                                    \
-+    cpus_allowed:     ~0UL,                                           \
-     mm:                       NULL,                                           \
-     active_mm:                &init_mm,                                       \
--    cpus_runnable:    ~0UL,                                           \
--    cpus_allowed:     ~0UL,                                           \
-     run_list:         LIST_HEAD_INIT(tsk.run_list),                   \
-+    time_slice:               HZ,                                             \
-     next_task:                &tsk,                                           \
-     prev_task:                &tsk,                                           \
-     p_opptr:          &tsk,                                           \
-@@ -509,6 +533,7 @@
-     pending:          { NULL, &tsk.pending.head, {{0}}},              \
-     blocked:          {{0}},                                          \
-     alloc_lock:               SPIN_LOCK_UNLOCKED,                             \
-+    switch_lock:        SPIN_LOCK_UNLOCKED,                             \
-     journal_info:     NULL,                                           \
- }
-@@ -518,24 +543,23 @@
- #endif
- union task_union {
--      struct task_struct task;
-+      task_t task;
-       unsigned long stack[INIT_TASK_SIZE/sizeof(long)];
- };
- extern union task_union init_task_union;
- extern struct   mm_struct init_mm;
--extern struct task_struct *init_tasks[NR_CPUS];
- /* PID hashing. (shouldnt this be dynamic?) */
- #define PIDHASH_SZ (4096 >> 2)
--extern struct task_struct *pidhash[PIDHASH_SZ];
-+extern task_t *pidhash[PIDHASH_SZ];
- #define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1))
--static inline void hash_pid(struct task_struct *p)
-+static inline void hash_pid(task_t *p)
- {
--      struct task_struct **htable = &pidhash[pid_hashfn(p->pid)];
-+      task_t **htable = &pidhash[pid_hashfn(p->pid)];
-       if((p->pidhash_next = *htable) != NULL)
-               (*htable)->pidhash_pprev = &p->pidhash_next;
-@@ -543,16 +567,16 @@
-       p->pidhash_pprev = htable;
- }
--static inline void unhash_pid(struct task_struct *p)
-+static inline void unhash_pid(task_t *p)
- {
-       if(p->pidhash_next)
-               p->pidhash_next->pidhash_pprev = p->pidhash_pprev;
-       *p->pidhash_pprev = p->pidhash_next;
- }
--static inline struct task_struct *find_task_by_pid(int pid)
-+static inline task_t *find_task_by_pid(int pid)
- {
--      struct task_struct *p, **htable = &pidhash[pid_hashfn(pid)];
-+      task_t *p, **htable = &pidhash[pid_hashfn(pid)];
-       for(p = *htable; p && p->pid != pid; p = p->pidhash_next)
-               ;
-@@ -560,19 +584,6 @@
-       return p;
- }
--#define task_has_cpu(tsk) ((tsk)->cpus_runnable != ~0UL)
--
--static inline void task_set_cpu(struct task_struct *tsk, unsigned int cpu)
--{
--      tsk->processor = cpu;
--      tsk->cpus_runnable = 1UL << cpu;
--}
--
--static inline void task_release_cpu(struct task_struct *tsk)
--{
--      tsk->cpus_runnable = ~0UL;
--}
--
- /* per-UID process charging. */
- extern struct user_struct * alloc_uid(uid_t);
- extern void free_uid(struct user_struct *);
-@@ -600,47 +611,50 @@
- extern void FASTCALL(interruptible_sleep_on(wait_queue_head_t *q));
- extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q,
-                                                   signed long timeout));
--extern int FASTCALL(wake_up_process(struct task_struct * tsk));
-+extern int FASTCALL(wake_up_process(task_t * p));
-+extern void FASTCALL(wake_up_forked_process(task_t * p));
- #define wake_up(x)                    __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1)
- #define wake_up_nr(x, nr)             __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, nr)
- #define wake_up_all(x)                        __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 0)
--#define wake_up_sync(x)                       __wake_up_sync((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1)
--#define wake_up_sync_nr(x, nr)                __wake_up_sync((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, nr)
- #define wake_up_interruptible(x)      __wake_up((x),TASK_INTERRUPTIBLE, 1)
- #define wake_up_interruptible_nr(x, nr)       __wake_up((x),TASK_INTERRUPTIBLE, nr)
- #define wake_up_interruptible_all(x)  __wake_up((x),TASK_INTERRUPTIBLE, 0)
--#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, 1)
--#define wake_up_interruptible_sync_nr(x, nr) __wake_up_sync((x),TASK_INTERRUPTIBLE,  nr)
-+#ifdef CONFIG_SMP
-+#define wake_up_interruptible_sync(x)   __wake_up_sync((x),TASK_INTERRUPTIBLE, 1)
-+#else
-+#define wake_up_interruptible_sync(x)   __wake_up((x),TASK_INTERRUPTIBLE, 1)
-+#endif
-+
- asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struct rusage * ru);
- extern int in_group_p(gid_t);
- extern int in_egroup_p(gid_t);
- extern void proc_caches_init(void);
--extern void flush_signals(struct task_struct *);
--extern void flush_signal_handlers(struct task_struct *);
-+extern void flush_signals(task_t *);
-+extern void flush_signal_handlers(task_t *);
- extern void sig_exit(int, int, struct siginfo *);
- extern int dequeue_signal(sigset_t *, siginfo_t *);
- extern void block_all_signals(int (*notifier)(void *priv), void *priv,
-                             sigset_t *mask);
- extern void unblock_all_signals(void);
--extern int send_sig_info(int, struct siginfo *, struct task_struct *);
--extern int force_sig_info(int, struct siginfo *, struct task_struct *);
-+extern int send_sig_info(int, struct siginfo *, task_t *);
-+extern int force_sig_info(int, struct siginfo *, task_t *);
- extern int kill_pg_info(int, struct siginfo *, pid_t);
- extern int kill_sl_info(int, struct siginfo *, pid_t);
- extern int kill_proc_info(int, struct siginfo *, pid_t);
--extern void notify_parent(struct task_struct *, int);
--extern void do_notify_parent(struct task_struct *, int);
--extern void force_sig(int, struct task_struct *);
--extern int send_sig(int, struct task_struct *, int);
-+extern void notify_parent(task_t *, int);
-+extern void do_notify_parent(task_t *, int);
-+extern void force_sig(int, task_t *);
-+extern int send_sig(int, task_t *, int);
- extern int kill_pg(pid_t, int, int);
- extern int kill_sl(pid_t, int, int);
- extern int kill_proc(pid_t, int, int);
- extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *);
- extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
--static inline int signal_pending(struct task_struct *p)
-+static inline int signal_pending(task_t *p)
- {
-       return (p->sigpending != 0);
- }
-@@ -679,7 +693,7 @@
-    This is required every time the blocked sigset_t changes.
-    All callers should have t->sigmask_lock.  */
--static inline void recalc_sigpending(struct task_struct *t)
-+static inline void recalc_sigpending(task_t *t)
- {
-       t->sigpending = has_pending_signals(&t->pending.signal, &t->blocked);
- }
-@@ -786,16 +800,17 @@
- extern int expand_fdset(struct files_struct *, int nr);
- extern void free_fdset(fd_set *, int);
--extern int  copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
-+extern int  copy_thread(int, unsigned long, unsigned long, unsigned long, task_t *, struct pt_regs *);
- extern void flush_thread(void);
- extern void exit_thread(void);
--extern void exit_mm(struct task_struct *);
--extern void exit_files(struct task_struct *);
--extern void exit_sighand(struct task_struct *);
-+extern void exit_mm(task_t *);
-+extern void exit_files(task_t *);
-+extern void exit_sighand(task_t *);
- extern void reparent_to_init(void);
- extern void daemonize(void);
-+extern task_t *child_reaper;
- extern int do_execve(char *, char **, char **, struct pt_regs *);
- extern int do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long);
-@@ -806,6 +821,9 @@
- extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
-+extern void wait_task_inactive(task_t * p);
-+extern void kick_if_running(task_t * p);
-+
- #define __wait_event(wq, condition)                                   \
- do {                                                                  \
-       wait_queue_t __wait;                                            \
-@@ -887,27 +905,12 @@
-       for (task = next_thread(current) ; task != current ; task = next_thread(task))
- #define next_thread(p) \
--      list_entry((p)->thread_group.next, struct task_struct, thread_group)
-+      list_entry((p)->thread_group.next, task_t, thread_group)
- #define thread_group_leader(p)        (p->pid == p->tgid)
--static inline void del_from_runqueue(struct task_struct * p)
-+static inline void unhash_process(task_t *p)
- {
--      nr_running--;
--      p->sleep_time = jiffies;
--      list_del(&p->run_list);
--      p->run_list.next = NULL;
--}
--
--static inline int task_on_runqueue(struct task_struct *p)
--{
--      return (p->run_list.next != NULL);
--}
--
--static inline void unhash_process(struct task_struct *p)
--{
--      if (task_on_runqueue(p))
--              out_of_line_bug();
-       write_lock_irq(&tasklist_lock);
-       nr_threads--;
-       unhash_pid(p);
-@@ -917,12 +920,12 @@
- }
- /* Protects ->fs, ->files, ->mm, and synchronises with wait4().  Nests inside tasklist_lock */
--static inline void task_lock(struct task_struct *p)
-+static inline void task_lock(task_t *p)
- {
-       spin_lock(&p->alloc_lock);
- }
--static inline void task_unlock(struct task_struct *p)
-+static inline void task_unlock(task_t *p)
- {
-       spin_unlock(&p->alloc_lock);
- }
-@@ -946,6 +949,26 @@
-       return res;
- }
-+static inline void set_need_resched(void)
-+{
-+      current->need_resched = 1;
-+}
-+
-+static inline void clear_need_resched(void)
-+{
-+      current->need_resched = 0;
-+}
-+
-+static inline void set_tsk_need_resched(task_t *tsk)
-+{
-+      tsk->need_resched = 1;
-+}
-+
-+static inline void clear_tsk_need_resched(task_t *tsk)
-+{
-+      tsk->need_resched = 0;
-+}
-+
- static inline int need_resched(void)
- {
-       return (unlikely(current->need_resched));
-@@ -959,4 +982,5 @@
- }
- #endif /* __KERNEL__ */
-+
- #endif
-diff -urN linux-2.4.24.org/include/linux/smp_balance.h linux-2.4.24/include/linux/smp_balance.h
---- linux-2.4.24.org/include/linux/smp_balance.h       1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4.24/include/linux/smp_balance.h   2004-02-04 20:52:54.758735283 +0100
-@@ -0,0 +1,15 @@
-+#ifndef _LINUX_SMP_BALANCE_H
-+#define _LINUX_SMP_BALANCE_H
-+
-+/*
-+ * per-architecture load balancing logic, e.g. for hyperthreading
-+ */
-+
-+#ifdef ARCH_HAS_SMP_BALANCE
-+#include <asm/smp_balance.h>
-+#else
-+#define arch_load_balance(x, y)               (0)
-+#define arch_reschedule_idle_override(x, idle)        (idle)
-+#endif
-+
-+#endif /* _LINUX_SMP_BALANCE_H */
-diff -urN linux-2.4.24.org/include/linux/smp.h linux-2.4.24/include/linux/smp.h
---- linux-2.4.24.org/include/linux/smp.h       2004-02-04 20:47:38.184581896 +0100
-+++ linux-2.4.24/include/linux/smp.h   2004-02-04 20:52:54.806725301 +0100
-@@ -86,6 +86,14 @@
- #define cpu_number_map(cpu)                   0
- #define smp_call_function(func,info,retry,wait)       ({ 0; })
- #define cpu_online_map                                1
-+static inline void smp_send_reschedule(int cpu) { }
-+static inline void smp_send_reschedule_all(void) { }
- #endif
-+
-+/*
-+ * Common definitions:
-+ */
-+#define cpu()                                 smp_processor_id()
-+
- #endif
-diff -urN linux-2.4.24.org/include/linux/wait.h linux-2.4.24/include/linux/wait.h
---- linux-2.4.24.org/include/linux/wait.h      2004-02-04 20:47:33.472562001 +0100
-+++ linux-2.4.24/include/linux/wait.h  2004-02-04 20:52:54.861713864 +0100
-@@ -59,6 +59,7 @@
- # define wq_write_lock_irq write_lock_irq
- # define wq_write_lock_irqsave write_lock_irqsave
- # define wq_write_unlock_irqrestore write_unlock_irqrestore
-+# define wq_write_unlock_irq write_unlock_irq
- # define wq_write_unlock write_unlock
- #else
- # define wq_lock_t spinlock_t
-@@ -71,6 +72,7 @@
- # define wq_write_lock_irq spin_lock_irq
- # define wq_write_lock_irqsave spin_lock_irqsave
- # define wq_write_unlock_irqrestore spin_unlock_irqrestore
-+# define wq_write_unlock_irq spin_unlock_irq
- # define wq_write_unlock spin_unlock
- #endif
-diff -urN linux-2.4.24.org/init/main.c linux-2.4.24/init/main.c
---- linux-2.4.24.org/init/main.c       2004-02-04 20:47:26.630985058 +0100
-+++ linux-2.4.24/init/main.c   2004-02-04 20:52:54.909703882 +0100
-@@ -293,8 +293,6 @@
- extern void setup_arch(char **);
- extern void cpu_idle(void);
--unsigned long wait_init_idle;
--
- #ifndef CONFIG_SMP
- #ifdef CONFIG_X86_LOCAL_APIC
-@@ -303,34 +301,24 @@
-       APIC_init_uniprocessor();
- }
- #else
--#define smp_init()    do { } while (0)
-+#define smp_init()      do { } while (0)
- #endif
- #else
--
- /* Called by boot processor to activate the rest. */
- static void __init smp_init(void)
- {
-       /* Get other processors into their bootup holding patterns. */
-       smp_boot_cpus();
--      wait_init_idle = cpu_online_map;
--      clear_bit(current->processor, &wait_init_idle); /* Don't wait on me! */
-       smp_threads_ready=1;
-       smp_commence();
--
--      /* Wait for the other cpus to set up their idle processes */
--      printk("Waiting on wait_init_idle (map = 0x%lx)\n", wait_init_idle);
--      while (wait_init_idle) {
--              cpu_relax();
--              barrier();
--      }
--      printk("All processors have done init_idle\n");
- }
- #endif
-+
- /*
-  * We need to finalize in a non-__init function or else race conditions
-  * between the root thread and the init thread may cause start_kernel to
-@@ -342,9 +330,8 @@
- {
-       kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
-       unlock_kernel();
--      current->need_resched = 1;
--      cpu_idle();
--} 
-+      cpu_idle();
-+}
- /*
-  *    Activate the first processor.
-@@ -428,6 +415,7 @@
-       check_bugs();
-       printk("POSIX conformance testing by UNIFIX\n");
-+      init_idle(current, smp_processor_id());
-       /* 
-        *      We count on the initial thread going ok 
-        *      Like idlers init is an unlocked kernel thread, which will
-@@ -465,6 +453,10 @@
-  */
- static void __init do_basic_setup(void)
- {
-+      /* Start the per-CPU migration threads */
-+#if CONFIG_SMP
-+      migration_init();
-+#endif
-       /*
-        * Tell the world that we're going to be the grim
-diff -urN linux-2.4.24.org/kernel/capability.c linux-2.4.24/kernel/capability.c
---- linux-2.4.24.org/kernel/capability.c       2004-02-04 20:47:27.302845310 +0100
-+++ linux-2.4.24/kernel/capability.c   2004-02-04 20:52:54.945696396 +0100
-@@ -8,6 +8,8 @@
- #include <linux/mm.h>
- #include <asm/uaccess.h>
-+unsigned securebits = SECUREBITS_DEFAULT; /* systemwide security settings */
-+
- kernel_cap_t cap_bset = CAP_INIT_EFF_SET;
- /* Note: never hold tasklist_lock while spinning for this one */
-diff -urN linux-2.4.24.org/kernel/exit.c linux-2.4.24/kernel/exit.c
---- linux-2.4.24.org/kernel/exit.c     2004-02-04 20:47:27.240858204 +0100
-+++ linux-2.4.24/kernel/exit.c 2004-02-04 20:52:54.951695148 +0100
-@@ -28,49 +28,22 @@
- static void release_task(struct task_struct * p)
- {
--      if (p != current) {
-+      if (p == current)
-+              BUG();
- #ifdef CONFIG_SMP
--              /*
--               * Wait to make sure the process isn't on the
--               * runqueue (active on some other CPU still)
--               */
--              for (;;) {
--                      task_lock(p);
--                      if (!task_has_cpu(p))
--                              break;
--                      task_unlock(p);
--                      do {
--                              cpu_relax();
--                              barrier();
--                      } while (task_has_cpu(p));
--              }
--              task_unlock(p);
-+      wait_task_inactive(p);
- #endif
--              atomic_dec(&p->user->processes);
--              free_uid(p->user);
--              unhash_process(p);
--
--              release_thread(p);
--              current->cmin_flt += p->min_flt + p->cmin_flt;
--              current->cmaj_flt += p->maj_flt + p->cmaj_flt;
--              current->cnswap += p->nswap + p->cnswap;
--              /*
--               * Potentially available timeslices are retrieved
--               * here - this way the parent does not get penalized
--               * for creating too many processes.
--               *
--               * (this cannot be used to artificially 'generate'
--               * timeslices, because any timeslice recovered here
--               * was given away by the parent in the first place.)
--               */
--              current->counter += p->counter;
--              if (current->counter >= MAX_COUNTER)
--                      current->counter = MAX_COUNTER;
--              p->pid = 0;
--              free_task_struct(p);
--      } else {
--              printk("task releasing itself\n");
--      }
-+      atomic_dec(&p->user->processes);
-+      free_uid(p->user);
-+      unhash_process(p);
-+
-+      release_thread(p);
-+      current->cmin_flt += p->min_flt + p->cmin_flt;
-+      current->cmaj_flt += p->maj_flt + p->cmaj_flt;
-+      current->cnswap += p->nswap + p->cnswap;
-+      sched_exit(p);
-+      p->pid = 0;
-+      free_task_struct(p);
- }
- /*
-@@ -150,6 +123,79 @@
-       return retval;
- }
-+/**
-+ * reparent_to_init() - Reparent the calling kernel thread to the init task.
-+ *
-+ * If a kernel thread is launched as a result of a system call, or if
-+ * it ever exits, it should generally reparent itself to init so that
-+ * it is correctly cleaned up on exit.
-+ *
-+ * The various task state such as scheduling policy and priority may have
-+ * been inherited from a user process, so we reset them to sane values here.
-+ *
-+ * NOTE that reparent_to_init() gives the caller full capabilities.
-+ */
-+void reparent_to_init(void)
-+{
-+      write_lock_irq(&tasklist_lock);
-+
-+      /* Reparent to init */
-+      REMOVE_LINKS(current);
-+      current->p_pptr = child_reaper;
-+      current->p_opptr = child_reaper;
-+      SET_LINKS(current);
-+
-+      /* Set the exit signal to SIGCHLD so we signal init on exit */
-+      current->exit_signal = SIGCHLD;
-+
-+      current->ptrace = 0;
-+      if ((current->policy == SCHED_OTHER) && (task_nice(current) < 0))
-+              set_user_nice(current, 0);
-+      /* cpus_allowed? */
-+      /* rt_priority? */
-+      /* signals? */
-+      current->cap_effective = CAP_INIT_EFF_SET;
-+      current->cap_inheritable = CAP_INIT_INH_SET;
-+      current->cap_permitted = CAP_FULL_SET;
-+      current->keep_capabilities = 0;
-+      memcpy(current->rlim, init_task.rlim, sizeof(*(current->rlim)));
-+      current->user = INIT_USER;
-+
-+      write_unlock_irq(&tasklist_lock);
-+}
-+
-+/*
-+ *    Put all the gunge required to become a kernel thread without
-+ *    attached user resources in one place where it belongs.
-+ */
-+
-+void daemonize(void)
-+{
-+      struct fs_struct *fs;
-+
-+
-+      /*
-+       * If we were started as result of loading a module, close all of the
-+       * user space pages.  We don't need them, and if we didn't close them
-+       * they would be locked into memory.
-+       */
-+      exit_mm(current);
-+
-+      current->session = 1;
-+      current->pgrp = 1;
-+      current->tty = NULL;
-+
-+      /* Become as one with the init task */
-+
-+      exit_fs(current);       /* current->fs->count--; */
-+      fs = init_task.fs;
-+      current->fs = fs;
-+      atomic_inc(&fs->count);
-+      exit_files(current);
-+      current->files = init_task.files;
-+      atomic_inc(&current->files->count);
-+}
-+
- /*
-  * When we die, we re-parent all our children.
-  * Try to give them to another thread in our thread
-@@ -171,6 +217,7 @@
-                       /* Make sure we're not reparenting to ourselves */
-                       p->p_opptr = child_reaper;
-+                      p->first_time_slice = 0;
-                       if (p->pdeath_signal) send_sig(p->pdeath_signal, p, 0);
-               }
-       }
-diff -urN linux-2.4.24.org/kernel/fork.c linux-2.4.24/kernel/fork.c
---- linux-2.4.24.org/kernel/fork.c     2004-02-04 20:47:26.750960103 +0100
-+++ linux-2.4.24/kernel/fork.c 2004-02-04 20:52:54.987687662 +0100
-@@ -31,7 +31,6 @@
- /* The idle threads do not count.. */
- int nr_threads;
--int nr_running;
- int max_threads;
- unsigned long total_forks;    /* Handle normal Linux uptimes. */
-@@ -39,6 +38,8 @@
- struct task_struct *pidhash[PIDHASH_SZ];
-+rwlock_t tasklist_lock __cacheline_aligned = RW_LOCK_UNLOCKED;  /* outer */
-+ 
- void fastcall add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
- {
-       unsigned long flags;
-@@ -700,9 +701,6 @@
-       if (p->pid == 0 && current->pid != 0)
-               goto bad_fork_cleanup;
--      p->run_list.next = NULL;
--      p->run_list.prev = NULL;
--
-       p->p_cptr = NULL;
-       init_waitqueue_head(&p->wait_chldexit);
-       p->vfork_done = NULL;
-@@ -711,6 +709,7 @@
-               init_completion(&vfork);
-       }
-       spin_lock_init(&p->alloc_lock);
-+      spin_lock_init(&p->switch_lock);
-       p->sigpending = 0;
-       init_sigpending(&p->pending);
-@@ -727,11 +726,11 @@
- #ifdef CONFIG_SMP
-       {
-               int i;
--              p->cpus_runnable = ~0UL;
--              p->processor = current->processor;
-+
-               /* ?? should we just memset this ?? */
-               for(i = 0; i < smp_num_cpus; i++)
--                      p->per_cpu_utime[i] = p->per_cpu_stime[i] = 0;
-+                      p->per_cpu_utime[cpu_logical_map(i)] =
-+                              p->per_cpu_stime[cpu_logical_map(i)] = 0;
-               spin_lock_init(&p->sigmask_lock);
-       }
- #endif
-@@ -769,15 +768,27 @@
-       p->pdeath_signal = 0;
-       /*
--       * "share" dynamic priority between parent and child, thus the
--       * total amount of dynamic priorities in the system doesn't change,
--       * more scheduling fairness. This is only important in the first
--       * timeslice, on the long run the scheduling behaviour is unchanged.
--       */
--      p->counter = (current->counter + 1) >> 1;
--      current->counter >>= 1;
--      if (!current->counter)
--              current->need_resched = 1;
-+       * Share the timeslice between parent and child, thus the
-+       * total amount of pending timeslices in the system doesnt change,
-+       * resulting in more scheduling fairness.
-+       */
-+      __cli();
-+      if (!current->time_slice)
-+              BUG();
-+      p->time_slice = (current->time_slice + 1) >> 1;
-+      current->time_slice >>= 1;
-+      p->first_time_slice = 1;
-+      if (!current->time_slice) {
-+              /*
-+               * This case is rare, it happens when the parent has only
-+               * a single jiffy left from its timeslice. Taking the
-+               * runqueue lock is not a problem.
-+               */
-+              current->time_slice = 1;
-+              scheduler_tick(0,0);
-+      }
-+      p->sleep_timestamp = jiffies;
-+      __sti();
-       /*
-        * Ok, add it to the run-queues and make it
-@@ -813,11 +824,16 @@
-       if (p->ptrace & PT_PTRACED)
-               send_sig(SIGSTOP, p, 1);
--
--      wake_up_process(p);             /* do this last */
-+      wake_up_forked_process(p);      /* do this last */
-       ++total_forks;
-       if (clone_flags & CLONE_VFORK)
-               wait_for_completion(&vfork);
-+      else
-+              /*
-+               * Let the child process run first, to avoid most of the
-+               * COW overhead when the child exec()s afterwards.
-+               */
-+              current->need_resched = 1;
- fork_out:
-       return retval;
-diff -urN linux-2.4.24.org/kernel/ksyms.c linux-2.4.24/kernel/ksyms.c
---- linux-2.4.24.org/kernel/ksyms.c    2004-02-04 20:47:26.747960727 +0100
-+++ linux-2.4.24/kernel/ksyms.c        2004-02-04 20:52:54.992686623 +0100
-@@ -461,7 +461,6 @@
- /* process management */
- EXPORT_SYMBOL(complete_and_exit);
- EXPORT_SYMBOL(__wake_up);
--EXPORT_SYMBOL(__wake_up_sync);
- EXPORT_SYMBOL(wake_up_process);
- EXPORT_SYMBOL(sleep_on);
- EXPORT_SYMBOL(sleep_on_timeout);
-@@ -474,6 +473,8 @@
- #endif
- EXPORT_SYMBOL(yield);
- EXPORT_SYMBOL(__cond_resched);
-+EXPORT_SYMBOL(set_user_nice);
-+EXPORT_SYMBOL(nr_context_switches);
- EXPORT_SYMBOL(jiffies);
- EXPORT_SYMBOL(xtime);
- EXPORT_SYMBOL(do_gettimeofday);
-@@ -484,7 +485,6 @@
- #endif
- EXPORT_SYMBOL(kstat);
--EXPORT_SYMBOL(nr_running);
- /* misc */
- EXPORT_SYMBOL(panic);
-diff -urN linux-2.4.24.org/kernel/printk.c linux-2.4.24/kernel/printk.c
---- linux-2.4.24.org/kernel/printk.c   2004-02-04 20:47:26.744961351 +0100
-+++ linux-2.4.24/kernel/printk.c       2004-02-04 20:52:55.015681840 +0100
-@@ -26,6 +26,7 @@
- #include <linux/module.h>
- #include <linux/interrupt.h>                  /* For in_interrupt() */
- #include <linux/config.h>
-+#include <linux/delay.h>
- #include <asm/uaccess.h>
-diff -urN linux-2.4.24.org/kernel/ptrace.c linux-2.4.24/kernel/ptrace.c
---- linux-2.4.24.org/kernel/ptrace.c   2004-02-04 20:47:26.776954696 +0100
-+++ linux-2.4.24/kernel/ptrace.c       2004-02-04 20:52:55.029678928 +0100
-@@ -32,20 +32,7 @@
-               if (child->state != TASK_STOPPED)
-                       return -ESRCH;
- #ifdef CONFIG_SMP
--              /* Make sure the child gets off its CPU.. */
--              for (;;) {
--                      task_lock(child);
--                      if (!task_has_cpu(child))
--                              break;
--                      task_unlock(child);
--                      do {
--                              if (child->state != TASK_STOPPED)
--                                      return -ESRCH;
--                              barrier();
--                              cpu_relax();
--                      } while (task_has_cpu(child));
--              }
--              task_unlock(child);
-+              wait_task_inactive(child);
- #endif                
-       }
-diff -urN linux-2.4.24.org/kernel/sched.c linux-2.4.24/kernel/sched.c
---- linux-2.4.24.org/kernel/sched.c    2004-02-04 20:47:26.741961975 +0100
-+++ linux-2.4.24/kernel/sched.c        2004-02-04 20:52:55.076669155 +0100
-@@ -3,340 +3,333 @@
-  *
-  *  Kernel scheduler and related syscalls
-  *
-- *  Copyright (C) 1991, 1992  Linus Torvalds
-+ *  Copyright (C) 1991-2002  Linus Torvalds
-  *
-  *  1996-12-23  Modified by Dave Grothe to fix bugs in semaphores and
-  *              make semaphores SMP safe
-  *  1998-11-19        Implemented schedule_timeout() and related stuff
-  *            by Andrea Arcangeli
-- *  1998-12-28  Implemented better SMP scheduling by Ingo Molnar
-+ *  2002-01-04        New ultra-scalable O(1) scheduler by Ingo Molnar:
-+ *            hybrid priority-list and round-robin design with
-+ *            an array-switch method of distributing timeslices
-+ *            and per-CPU runqueues.  Additional code by Davide
-+ *            Libenzi, Robert Love, and Rusty Russell.
-  */
--/*
-- * 'sched.c' is the main kernel file. It contains scheduling primitives
-- * (sleep_on, wakeup, schedule etc) as well as a number of simple system
-- * call functions (type getpid()), which just extract a field from
-- * current-task
-- */
--
--#include <linux/config.h>
- #include <linux/mm.h>
--#include <linux/init.h>
--#include <linux/smp_lock.h>
- #include <linux/nmi.h>
- #include <linux/interrupt.h>
--#include <linux/kernel_stat.h>
--#include <linux/completion.h>
--#include <linux/prefetch.h>
--#include <linux/compiler.h>
--
-+#include <linux/init.h>
- #include <asm/uaccess.h>
-+#include <linux/smp_lock.h>
- #include <asm/mmu_context.h>
--
--extern void timer_bh(void);
--extern void tqueue_bh(void);
--extern void immediate_bh(void);
-+#include <linux/kernel_stat.h>
-+#include <linux/completion.h>
- /*
-- * scheduler variables
-- */
-+ * Convert user-nice values [ -20 ... 0 ... 19 ]
-+ * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
-+ * and back.
-+ */
-+#define NICE_TO_PRIO(nice)    (MAX_RT_PRIO + (nice) + 20)
-+#define PRIO_TO_NICE(prio)    ((prio) - MAX_RT_PRIO - 20)
-+#define TASK_NICE(p)          PRIO_TO_NICE((p)->static_prio)
--unsigned securebits = SECUREBITS_DEFAULT; /* systemwide security settings */
--
--extern void mem_use(void);
-+/*
-+ * 'User priority' is the nice value converted to something we
-+ * can work with better when scaling various scheduler parameters,
-+ * it's a [ 0 ... 39 ] range.
-+ */
-+#define USER_PRIO(p)          ((p)-MAX_RT_PRIO)
-+#define TASK_USER_PRIO(p)     USER_PRIO((p)->static_prio)
-+#define MAX_USER_PRIO         (USER_PRIO(MAX_PRIO))
- /*
-- * Scheduling quanta.
-+ * These are the 'tuning knobs' of the scheduler:
-  *
-- * NOTE! The unix "nice" value influences how long a process
-- * gets. The nice value ranges from -20 to +19, where a -20
-- * is a "high-priority" task, and a "+10" is a low-priority
-- * task.
-- *
-- * We want the time-slice to be around 50ms or so, so this
-- * calculation depends on the value of HZ.
-- */
--#if HZ < 200
--#define TICK_SCALE(x) ((x) >> 2)
--#elif HZ < 400
--#define TICK_SCALE(x) ((x) >> 1)
--#elif HZ < 800
--#define TICK_SCALE(x) (x)
--#elif HZ < 1600
--#define TICK_SCALE(x) ((x) << 1)
--#else
--#define TICK_SCALE(x) ((x) << 2)
--#endif
--
--#define NICE_TO_TICKS(nice)   (TICK_SCALE(20-(nice))+1)
--
-+ * Minimum timeslice is 10 msecs, default timeslice is 150 msecs,
-+ * maximum timeslice is 300 msecs. Timeslices get refilled after
-+ * they expire.
-+ */
-+#define MIN_TIMESLICE         ( 10 * HZ / 1000)
-+#define MAX_TIMESLICE         (300 * HZ / 1000)
-+#define CHILD_PENALTY         50
-+#define PARENT_PENALTY                100
-+#define PRIO_BONUS_RATIO      25
-+#define INTERACTIVE_DELTA     2
-+#define MAX_SLEEP_AVG         (2*HZ)
-+#define STARVATION_LIMIT      (2*HZ)
- /*
-- *    Init task must be ok at boot for the ix86 as we will check its signals
-- *    via the SMP irq return path.
-- */
-- 
--struct task_struct * init_tasks[NR_CPUS] = {&init_task, };
-+ * If a task is 'interactive' then we reinsert it in the active
-+ * array after it has expired its current timeslice. (it will not
-+ * continue to run immediately, it will still roundrobin with
-+ * other interactive tasks.)
-+ *
-+ * This part scales the interactivity limit depending on niceness.
-+ *
-+ * We scale it linearly, offset by the INTERACTIVE_DELTA delta.
-+ * Here are a few examples of different nice levels:
-+ *
-+ *  TASK_INTERACTIVE(-20): [1,1,1,1,1,1,1,1,1,0,0]
-+ *  TASK_INTERACTIVE(-10): [1,1,1,1,1,1,1,0,0,0,0]
-+ *  TASK_INTERACTIVE(  0): [1,1,1,1,0,0,0,0,0,0,0]
-+ *  TASK_INTERACTIVE( 10): [1,1,0,0,0,0,0,0,0,0,0]
-+ *  TASK_INTERACTIVE( 19): [0,0,0,0,0,0,0,0,0,0,0]
-+ *
-+ * (the X axis represents the possible -5 ... 0 ... +5 dynamic
-+ *  priority range a task can explore, a value of '1' means the
-+ *  task is rated interactive.)
-+ *
-+ * Ie. nice +19 tasks can never get 'interactive' enough to be
-+ * reinserted into the active array. And only heavily CPU-hog nice -20
-+ * tasks will be expired. Default nice 0 tasks are somewhere between,
-+ * it takes some effort for them to get interactive, but it's not
-+ * too hard.
-+ */
-+
-+#define SCALE(v1,v1_max,v2_max) \
-+      (v1) * (v2_max) / (v1_max)
-+
-+#define DELTA(p) \
-+      (SCALE(TASK_NICE(p), 40, MAX_USER_PRIO*PRIO_BONUS_RATIO/100) + \
-+              INTERACTIVE_DELTA)
-+
-+#define TASK_INTERACTIVE(p) \
-+      ((p)->prio <= (p)->static_prio - DELTA(p))
- /*
-- * The tasklist_lock protects the linked list of processes.
-- *
-- * The runqueue_lock locks the parts that actually access
-- * and change the run-queues, and have to be interrupt-safe.
-- *
-- * If both locks are to be concurrently held, the runqueue_lock
-- * nests inside the tasklist_lock.
-+ * TASK_TIMESLICE scales user-nice values [ -20 ... 19 ]
-+ * to time slice values.
-  *
-- * task->alloc_lock nests inside tasklist_lock.
-+ * The higher a process's priority, the bigger timeslices
-+ * it gets during one round of execution. But even the lowest
-+ * priority process gets MIN_TIMESLICE worth of execution time.
-  */
--spinlock_t runqueue_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;  /* inner */
--rwlock_t tasklist_lock __cacheline_aligned = RW_LOCK_UNLOCKED;        /* outer */
--static LIST_HEAD(runqueue_head);
-+#define TASK_TIMESLICE(p) (MIN_TIMESLICE + \
-+      ((MAX_TIMESLICE - MIN_TIMESLICE) * (MAX_PRIO-1-(p)->static_prio)/39))
- /*
-- * We align per-CPU scheduling data on cacheline boundaries,
-- * to prevent cacheline ping-pong.
-+ * These are the runqueue data structures:
-  */
--static union {
--      struct schedule_data {
--              struct task_struct * curr;
--              cycles_t last_schedule;
--      } schedule_data;
--      char __pad [SMP_CACHE_BYTES];
--} aligned_data [NR_CPUS] __cacheline_aligned = { {{&init_task,0}}};
--#define cpu_curr(cpu) aligned_data[(cpu)].schedule_data.curr
--#define last_schedule(cpu) aligned_data[(cpu)].schedule_data.last_schedule
-+#define BITMAP_SIZE ((((MAX_PRIO+1+7)/8)+sizeof(long)-1)/sizeof(long))
--struct kernel_stat kstat;
--extern struct task_struct *child_reaper;
-+typedef struct runqueue runqueue_t;
--#ifdef CONFIG_SMP
-+struct prio_array {
-+      int nr_active;
-+      unsigned long bitmap[BITMAP_SIZE];
-+      struct list_head queue[MAX_PRIO];
-+};
--#define idle_task(cpu) (init_tasks[cpu_number_map(cpu)])
--#define can_schedule(p,cpu) \
--      ((p)->cpus_runnable & (p)->cpus_allowed & (1UL << cpu))
-+/*
-+ * This is the main, per-CPU runqueue data structure.
-+ *
-+ * Locking rule: those places that want to lock multiple runqueues
-+ * (such as the load balancing or the process migration code), lock
-+ * acquire operations must be ordered by ascending &runqueue.
-+ */
-+struct runqueue {
-+      spinlock_t lock;
-+      unsigned long nr_running, nr_switches, expired_timestamp;
-+      task_t *curr, *idle;
-+      prio_array_t *active, *expired, arrays[2];
-+      long nr_uninterruptible;
-+#ifdef CONFIG_SMP
-+      long last_jiffy;
-+      int prev_nr_running[NR_CPUS];
-+      task_t *migration_thread;
-+      struct list_head migration_queue;
-+#endif
-+} ____cacheline_aligned;
--#else
-+static struct runqueue runqueues[NR_CPUS] __cacheline_aligned;
--#define idle_task(cpu) (&init_task)
--#define can_schedule(p,cpu) (1)
-+#define cpu_rq(cpu)           (runqueues + (cpu))
-+#define this_rq()             cpu_rq(smp_processor_id())
-+#define task_rq(p)            cpu_rq((p)->cpu)
-+#define cpu_curr(cpu)         (cpu_rq(cpu)->curr)
-+#define rt_task(p)            ((p)->prio < MAX_RT_PRIO)
-+/*
-+ * Default context-switch locking:
-+ */
-+#ifndef prepare_arch_switch
-+# define prepare_arch_switch(rq, next) do { } while(0)
-+# define finish_arch_switch(rq, prev)  spin_unlock_irq(&(rq)->lock)
- #endif
--void scheduling_functions_start_here(void) { }
--
- /*
-- * This is the function that decides how desirable a process is..
-- * You can weigh different processes against each other depending
-- * on what CPU they've run on lately etc to try to handle cache
-- * and TLB miss penalties.
-- *
-- * Return values:
-- *     -1000: never select this
-- *         0: out of time, recalculate counters (but it might still be
-- *            selected)
-- *       +ve: "goodness" value (the larger, the better)
-- *     +1000: realtime process, select this.
-+ * task_rq_lock - lock the runqueue a given task resides on and disable
-+ * interrupts.  Note the ordering: we can safely lookup the task_rq without
-+ * explicitly disabling preemption.
-  */
--
--static inline int goodness(struct task_struct * p, int this_cpu, struct mm_struct *this_mm)
-+static inline runqueue_t *task_rq_lock(task_t *p, unsigned long *flags)
- {
--      int weight;
--
--      /*
--       * select the current process after every other
--       * runnable process, but before the idle thread.
--       * Also, dont trigger a counter recalculation.
--       */
--      weight = -1;
--      if (p->policy & SCHED_YIELD)
--              goto out;
-+      struct runqueue *rq;
--      /*
--       * Non-RT process - normal case first.
--       */
--      if (p->policy == SCHED_OTHER) {
--              /*
--               * Give the process a first-approximation goodness value
--               * according to the number of clock-ticks it has left.
--               *
--               * Don't do any other calculations if the time slice is
--               * over..
--               */
--              weight = p->counter;
--              if (!weight)
--                      goto out;
--                      
--#ifdef CONFIG_SMP
--              /* Give a largish advantage to the same processor...   */
--              /* (this is equivalent to penalizing other processors) */
--              if (p->processor == this_cpu)
--                      weight += PROC_CHANGE_PENALTY;
--#endif
--
--              /* .. and a slight advantage to the current MM */
--              if (p->mm == this_mm || !p->mm)
--                      weight += 1;
--              weight += 20 - p->nice;
--              goto out;
-+repeat_lock_task:
-+      rq = task_rq(p);
-+      spin_lock_irqsave(&rq->lock, *flags);
-+      if (unlikely(rq != task_rq(p))) {
-+              spin_unlock_irqrestore(&rq->lock, *flags);
-+              goto repeat_lock_task;
-       }
-+      return rq;
-+}
--      /*
--       * Realtime process, select the first one on the
--       * runqueue (taking priorities within processes
--       * into account).
--       */
--      weight = 1000 + p->rt_priority;
--out:
--      return weight;
-+static inline void task_rq_unlock(runqueue_t *rq, unsigned long *flags)
-+{
-+      spin_unlock_irqrestore(&rq->lock, *flags);
- }
- /*
-- * the 'goodness value' of replacing a process on a given CPU.
-- * positive value means 'replace', zero or negative means 'dont'.
-+ * Adding/removing a task to/from a priority array:
-  */
--static inline int preemption_goodness(struct task_struct * prev, struct task_struct * p, int cpu)
-+static inline void dequeue_task(struct task_struct *p, prio_array_t *array)
- {
--      return goodness(p, cpu, prev->active_mm) - goodness(prev, cpu, prev->active_mm);
-+      array->nr_active--;
-+      list_del(&p->run_list);
-+      if (list_empty(array->queue + p->prio))
-+              __clear_bit(p->prio, array->bitmap);
- }
--/*
-- * This is ugly, but reschedule_idle() is very timing-critical.
-- * We are called with the runqueue spinlock held and we must
-- * not claim the tasklist_lock.
-- */
--static FASTCALL(void reschedule_idle(struct task_struct * p));
-+#define enqueue_task(p, array) __enqueue_task(p, array, NULL)
-+static inline void __enqueue_task(struct task_struct *p, prio_array_t *array, task_t * parent)
-+{
-+      if (!parent) {
-+              list_add_tail(&p->run_list, array->queue + p->prio);
-+              __set_bit(p->prio, array->bitmap);
-+              p->array = array;
-+      } else {
-+              list_add_tail(&p->run_list, &parent->run_list);
-+              array = p->array = parent->array;
-+      }
-+      array->nr_active++;
-+}
--static void fastcall reschedule_idle(struct task_struct * p)
-+static inline int effective_prio(task_t *p)
- {
--#ifdef CONFIG_SMP
--      int this_cpu = smp_processor_id();
--      struct task_struct *tsk, *target_tsk;
--      int cpu, best_cpu, i, max_prio;
--      cycles_t oldest_idle;
-+      int bonus, prio;
-       /*
--       * shortcut if the woken up task's last CPU is
--       * idle now.
-+       * Here we scale the actual sleep average [0 .... MAX_SLEEP_AVG]
-+       * into the -5 ... 0 ... +5 bonus/penalty range.
-+       *
-+       * We use 25% of the full 0...39 priority range so that:
-+       *
-+       * 1) nice +19 interactive tasks do not preempt nice 0 CPU hogs.
-+       * 2) nice -20 CPU hogs do not get preempted by nice 0 tasks.
-+       *
-+       * Both properties are important to certain workloads.
-        */
--      best_cpu = p->processor;
--      if (can_schedule(p, best_cpu)) {
--              tsk = idle_task(best_cpu);
--              if (cpu_curr(best_cpu) == tsk) {
--                      int need_resched;
--send_now_idle:
--                      /*
--                       * If need_resched == -1 then we can skip sending
--                       * the IPI altogether, tsk->need_resched is
--                       * actively watched by the idle thread.
--                       */
--                      need_resched = tsk->need_resched;
--                      tsk->need_resched = 1;
--                      if ((best_cpu != this_cpu) && !need_resched)
--                              smp_send_reschedule(best_cpu);
--                      return;
--              }
--      }
-+      bonus = MAX_USER_PRIO*PRIO_BONUS_RATIO*p->sleep_avg/MAX_SLEEP_AVG/100 -
-+                      MAX_USER_PRIO*PRIO_BONUS_RATIO/100/2;
--      /*
--       * We know that the preferred CPU has a cache-affine current
--       * process, lets try to find a new idle CPU for the woken-up
--       * process. Select the least recently active idle CPU. (that
--       * one will have the least active cache context.) Also find
--       * the executing process which has the least priority.
--       */
--      oldest_idle = (cycles_t) -1;
--      target_tsk = NULL;
--      max_prio = 0;
-+      prio = p->static_prio - bonus;
-+      if (prio < MAX_RT_PRIO)
-+              prio = MAX_RT_PRIO;
-+      if (prio > MAX_PRIO-1)
-+              prio = MAX_PRIO-1;
-+      return prio;
-+}
--      for (i = 0; i < smp_num_cpus; i++) {
--              cpu = cpu_logical_map(i);
--              if (!can_schedule(p, cpu))
--                      continue;
--              tsk = cpu_curr(cpu);
-+#define activate_task(p, rq) __activate_task(p, rq, NULL)
-+static inline void __activate_task(task_t *p, runqueue_t *rq, task_t * parent)
-+{
-+      unsigned long sleep_time = jiffies - p->sleep_timestamp;
-+      prio_array_t *array = rq->active;
-+
-+      if (!parent && !rt_task(p) && sleep_time) {
-               /*
--               * We use the first available idle CPU. This creates
--               * a priority list between idle CPUs, but this is not
--               * a problem.
-+               * This code gives a bonus to interactive tasks. We update
-+               * an 'average sleep time' value here, based on
-+               * sleep_timestamp. The more time a task spends sleeping,
-+               * the higher the average gets - and the higher the priority
-+               * boost gets as well.
-                */
--              if (tsk == idle_task(cpu)) {
--#if defined(__i386__) && defined(CONFIG_SMP)
--                        /*
--                       * Check if two siblings are idle in the same
--                       * physical package. Use them if found.
--                       */
--                      if (smp_num_siblings == 2) {
--                              if (cpu_curr(cpu_sibling_map[cpu]) == 
--                                  idle_task(cpu_sibling_map[cpu])) {
--                                      oldest_idle = last_schedule(cpu);
--                                      target_tsk = tsk;
--                                      break;
--                              }
--                              
--                        }
--#endif                
--                      if (last_schedule(cpu) < oldest_idle) {
--                              oldest_idle = last_schedule(cpu);
--                              target_tsk = tsk;
--                      }
--              } else {
--                      if (oldest_idle == (cycles_t)-1) {
--                              int prio = preemption_goodness(tsk, p, cpu);
--
--                              if (prio > max_prio) {
--                                      max_prio = prio;
--                                      target_tsk = tsk;
--                              }
--                      }
--              }
--      }
--      tsk = target_tsk;
--      if (tsk) {
--              if (oldest_idle != (cycles_t)-1) {
--                      best_cpu = tsk->processor;
--                      goto send_now_idle;
--              }
--              tsk->need_resched = 1;
--              if (tsk->processor != this_cpu)
--                      smp_send_reschedule(tsk->processor);
-+              p->sleep_timestamp = jiffies;
-+              p->sleep_avg += sleep_time;
-+              if (p->sleep_avg > MAX_SLEEP_AVG)
-+                      p->sleep_avg = MAX_SLEEP_AVG;
-+              p->prio = effective_prio(p);
-       }
--      return;
--              
-+      __enqueue_task(p, array, parent);
-+      rq->nr_running++;
-+}
--#else /* UP */
--      int this_cpu = smp_processor_id();
--      struct task_struct *tsk;
-+static inline void deactivate_task(struct task_struct *p, runqueue_t *rq)
-+{
-+      rq->nr_running--;
-+      if (p->state == TASK_UNINTERRUPTIBLE)
-+              rq->nr_uninterruptible++;
-+      dequeue_task(p, p->array);
-+      p->array = NULL;
-+}
-+
-+static inline void resched_task(task_t *p)
-+{
-+#ifdef CONFIG_SMP
-+      int need_resched;
--      tsk = cpu_curr(this_cpu);
--      if (preemption_goodness(tsk, p, this_cpu) > 0)
--              tsk->need_resched = 1;
-+      need_resched = p->need_resched;
-+      set_tsk_need_resched(p);
-+      if (!need_resched && (p->cpu != smp_processor_id()))
-+              smp_send_reschedule(p->cpu);
-+#else
-+      set_tsk_need_resched(p);
- #endif
- }
-+#ifdef CONFIG_SMP
-+
- /*
-- * Careful!
-- *
-- * This has to add the process to the _end_ of the 
-- * run-queue, not the beginning. The goodness value will
-- * determine whether this process will run next. This is
-- * important to get SCHED_FIFO and SCHED_RR right, where
-- * a process that is either pre-empted or its time slice
-- * has expired, should be moved to the tail of the run 
-- * queue for its priority - Bhavesh Davda
-+ * Wait for a process to unschedule. This is used by the exit() and
-+ * ptrace() code.
-  */
--static inline void add_to_runqueue(struct task_struct * p)
-+void wait_task_inactive(task_t * p)
- {
--      list_add_tail(&p->run_list, &runqueue_head);
--      nr_running++;
-+      unsigned long flags;
-+      runqueue_t *rq;
-+
-+repeat:
-+      rq = task_rq(p);
-+      if (unlikely(rq->curr == p)) {
-+              cpu_relax();
-+              barrier();
-+              goto repeat;
-+      }
-+      rq = task_rq_lock(p, &flags);
-+      if (unlikely(rq->curr == p)) {
-+              task_rq_unlock(rq, &flags);
-+              goto repeat;
-+      }
-+      task_rq_unlock(rq, &flags);
- }
--static inline void move_last_runqueue(struct task_struct * p)
-+/*
-+ * Kick the remote CPU if the task is running currently,
-+ * this code is used by the signal code to signal tasks
-+ * which are in user-mode as quickly as possible.
-+ *
-+ * (Note that we do this lockless - if the task does anything
-+ * while the message is in flight then it will notice the
-+ * sigpending condition anyway.)
-+ */
-+void kick_if_running(task_t * p)
- {
--      list_del(&p->run_list);
--      list_add_tail(&p->run_list, &runqueue_head);
-+      if (p == task_rq(p)->curr && p->cpu != smp_processor_id())
-+              resched_task(p);
- }
-+#endif
-+
-+#ifdef CONFIG_SMP
-+static int FASTCALL(reschedule_idle(task_t * p));
-+static void FASTCALL(load_balance(runqueue_t *this_rq, int idle));
-+#endif
-+
- /*
-  * Wake up a process. Put it on the run-queue if it's not
-@@ -345,429 +338,721 @@
-  * progress), and as such you're allowed to do the simpler
-  * "current->state = TASK_RUNNING" to mark yourself runnable
-  * without the overhead of this.
-+ *
-+ * returns failure only if the task is already active.
-  */
--static inline int try_to_wake_up(struct task_struct * p, int synchronous)
-+static int try_to_wake_up(task_t * p, int sync)
- {
-       unsigned long flags;
-       int success = 0;
-+      long old_state;
-+      runqueue_t *rq;
-+#ifdef CONFIG_SMP
-+      int migrated_to_idle = 0;
-+#endif
-+
-+#ifdef CONFIG_SMP
-+repeat_lock_task:
-+#endif
-+      rq = task_rq_lock(p, &flags);
-+      old_state = p->state;
-+      if (!p->array) {
-+#ifdef CONFIG_SMP
-+              if (likely(rq->curr != p)) {
-+                      /* can migrate */
-+                      if (unlikely(sync)) {
-+                              if (p->cpu != smp_processor_id() &&
-+                                  p->cpus_allowed & (1UL << smp_processor_id())) {
-+                                      p->cpu = smp_processor_id();
-+                                      goto migrated_task;
-+                              }
-+                      } else {
-+                              if (reschedule_idle(p))
-+                                      goto migrated_task;
-+                      }
-+              }
-+#endif
-+              if (old_state == TASK_UNINTERRUPTIBLE)
-+                      rq->nr_uninterruptible--;
-+              activate_task(p, rq);
-+              if (p->prio < rq->curr->prio)
-+                      resched_task(rq->curr);
-+              success = 1;
-+      }
-+      p->state = TASK_RUNNING;
-+#ifdef CONFIG_SMP
-       /*
--       * We want the common case fall through straight, thus the goto.
-+       * Subtle: we can load_balance only here (before unlock)
-+       * because it can internally drop the lock. Claim
-+       * that the cpu is running so it will be a light rebalance,
-+       * if this cpu will go idle soon schedule() will trigger the
-+       * idle rescheduling balancing by itself.
-        */
--      spin_lock_irqsave(&runqueue_lock, flags);
--      p->state = TASK_RUNNING;
--      if (task_on_runqueue(p))
--              goto out;
--      add_to_runqueue(p);
--      if (!synchronous || !(p->cpus_allowed & (1UL << smp_processor_id())))
--              reschedule_idle(p);
--      success = 1;
--out:
--      spin_unlock_irqrestore(&runqueue_lock, flags);
-+      if (success && migrated_to_idle)
-+              load_balance(rq, 0);
-+#endif
-+
-+      task_rq_unlock(rq, &flags);
-+
-       return success;
-+
-+#ifdef CONFIG_SMP
-+ migrated_task:
-+      task_rq_unlock(rq, &flags);
-+      migrated_to_idle = 1;
-+      goto repeat_lock_task;
-+#endif
- }
--inline int fastcall wake_up_process(struct task_struct * p)
-+int wake_up_process(task_t * p)
- {
-       return try_to_wake_up(p, 0);
- }
--static void process_timeout(unsigned long __data)
-+void wake_up_forked_process(task_t * p)
- {
--      struct task_struct * p = (struct task_struct *) __data;
-+      runqueue_t *rq;
-+      task_t * parent = current;
--      wake_up_process(p);
--}
-+      rq = this_rq();
-+      spin_lock_irq(&rq->lock);
--/**
-- * schedule_timeout - sleep until timeout
-- * @timeout: timeout value in jiffies
-- *
-- * Make the current task sleep until @timeout jiffies have
-- * elapsed. The routine will return immediately unless
-- * the current task state has been set (see set_current_state()).
-- *
-- * You can set the task state as follows -
-- *
-- * %TASK_UNINTERRUPTIBLE - at least @timeout jiffies are guaranteed to
-- * pass before the routine returns. The routine will return 0
-- *
-- * %TASK_INTERRUPTIBLE - the routine may return early if a signal is
-- * delivered to the current task. In this case the remaining time
-- * in jiffies will be returned, or 0 if the timer expired in time
-- *
-- * The current task state is guaranteed to be TASK_RUNNING when this 
-- * routine returns.
-- *
-- * Specifying a @timeout value of %MAX_SCHEDULE_TIMEOUT will schedule
-- * the CPU away without a bound on the timeout. In this case the return
-- * value will be %MAX_SCHEDULE_TIMEOUT.
-- *
-- * In all cases the return value is guaranteed to be non-negative.
-- */
--signed long fastcall schedule_timeout(signed long timeout)
--{
--      struct timer_list timer;
--      unsigned long expire;
-+      p->state = TASK_RUNNING;
-+      if (likely(!rt_task(p) && parent->array)) {
-+              /*
-+               * We decrease the sleep average of forked
-+               * children, to keep max-interactive tasks
-+               * from forking tasks that are max-interactive.
-+               * CHILD_PENALTY is set to 50% since we have
-+               * no clue if this is still an interactive
-+               * task like the parent or if this will be a
-+               * cpu bound task. The parent isn't touched
-+               * as we don't make assumption about the parent
-+               * changing behaviour after the child is forked.
-+               */
-+              parent->sleep_avg = parent->sleep_avg * PARENT_PENALTY / 100;
-+              p->sleep_avg = p->sleep_avg * CHILD_PENALTY / 100;
--      switch (timeout)
--      {
--      case MAX_SCHEDULE_TIMEOUT:
-               /*
--               * These two special cases are useful to be comfortable
--               * in the caller. Nothing more. We could take
--               * MAX_SCHEDULE_TIMEOUT from one of the negative value
--               * but I' d like to return a valid offset (>=0) to allow
--               * the caller to do everything it want with the retval.
-+               * For its first schedule keep the child at the same
-+               * priority (i.e. in the same list) of the parent,
-+               * activate_forked_task() will take care to put the
-+               * child in front of the parent (lifo) to guarantee a
-+               * schedule-child-first behaviour after fork.
-                */
--              schedule();
--              goto out;
--      default:
-+              p->prio = parent->prio;
-+      } else {
-               /*
--               * Another bit of PARANOID. Note that the retval will be
--               * 0 since no piece of kernel is supposed to do a check
--               * for a negative retval of schedule_timeout() (since it
--               * should never happens anyway). You just have the printk()
--               * that will tell you if something is gone wrong and where.
-+               * Take the usual wakeup path if it's RT or if
-+               * it's a child of the first idle task (during boot
-+               * only).
-                */
--              if (timeout < 0)
--              {
--                      printk(KERN_ERR "schedule_timeout: wrong timeout "
--                             "value %lx from %p\n", timeout,
--                             __builtin_return_address(0));
--                      current->state = TASK_RUNNING;
--                      goto out;
--              }
-+              p->prio = effective_prio(p);
-+              parent = NULL;
-       }
--      expire = timeout + jiffies;
-+      p->cpu = smp_processor_id();
-+      __activate_task(p, rq, parent);
-+      spin_unlock_irq(&rq->lock);
-+}
--      init_timer(&timer);
--      timer.expires = expire;
--      timer.data = (unsigned long) current;
--      timer.function = process_timeout;
-+/*
-+ * Potentially available exiting-child timeslices are
-+ * retrieved here - this way the parent does not get
-+ * penalized for creating too many processes.
-+ *
-+ * (this cannot be used to 'generate' timeslices
-+ * artificially, because any timeslice recovered here
-+ * was given away by the parent in the first place.)
-+ */
-+void sched_exit(task_t * p)
-+{
-+      __cli();
-+      if (p->first_time_slice) {
-+              current->time_slice += p->time_slice;
-+              if (unlikely(current->time_slice > MAX_TIMESLICE))
-+                      current->time_slice = MAX_TIMESLICE;
-+      }
-+      __sti();
-+}
--      add_timer(&timer);
--      schedule();
--      del_timer_sync(&timer);
-+#if CONFIG_SMP
-+asmlinkage void schedule_tail(task_t *prev)
-+{
-+      finish_arch_switch(this_rq(), prev);
-+}
-+#endif
-+
-+static inline task_t * context_switch(task_t *prev, task_t *next)
-+{
-+      struct mm_struct *mm = next->mm;
-+      struct mm_struct *oldmm = prev->active_mm;
--      timeout = expire - jiffies;
-+      if (unlikely(!mm)) {
-+              next->active_mm = oldmm;
-+              atomic_inc(&oldmm->mm_count);
-+              enter_lazy_tlb(oldmm, next, smp_processor_id());
-+      } else
-+              switch_mm(oldmm, mm, next, smp_processor_id());
-- out:
--      return timeout < 0 ? 0 : timeout;
-+      if (unlikely(!prev->mm)) {
-+              prev->active_mm = NULL;
-+              mmdrop(oldmm);
-+      }
-+
-+      /* Here we just switch the register state and the stack. */
-+      switch_to(prev, next, prev);
-+
-+      return prev;
- }
--/*
-- * schedule_tail() is getting called from the fork return path. This
-- * cleans up all remaining scheduler things, without impacting the
-- * common case.
-- */
--static inline void __schedule_tail(struct task_struct *prev)
-+unsigned long nr_running(void)
- {
--#ifdef CONFIG_SMP
--      int policy;
-+      unsigned long i, sum = 0;
--      /*
--       * prev->policy can be written from here only before `prev'
--       * can be scheduled (before setting prev->cpus_runnable to ~0UL).
--       * Of course it must also be read before allowing prev
--       * to be rescheduled, but since the write depends on the read
--       * to complete, wmb() is enough. (the spin_lock() acquired
--       * before setting cpus_runnable is not enough because the spin_lock()
--       * common code semantics allows code outside the critical section
--       * to enter inside the critical section)
--       */
--      policy = prev->policy;
--      prev->policy = policy & ~SCHED_YIELD;
--      wmb();
-+      for (i = 0; i < smp_num_cpus; i++)
-+              sum += cpu_rq(cpu_logical_map(i))->nr_running;
--      /*
--       * fast path falls through. We have to clear cpus_runnable before
--       * checking prev->state to avoid a wakeup race. Protect against
--       * the task exiting early.
--       */
--      task_lock(prev);
--      task_release_cpu(prev);
--      mb();
--      if (prev->state == TASK_RUNNING)
--              goto needs_resched;
-+      return sum;
-+}
--out_unlock:
--      task_unlock(prev);      /* Synchronise here with release_task() if prev is TASK_ZOMBIE */
--      return;
-+/* Note: the per-cpu information is useful only to get the cumulative result */
-+unsigned long nr_uninterruptible(void)
-+{
-+      unsigned long i, sum = 0;
--      /*
--       * Slow path - we 'push' the previous process and
--       * reschedule_idle() will attempt to find a new
--       * processor for it. (but it might preempt the
--       * current process as well.) We must take the runqueue
--       * lock and re-check prev->state to be correct. It might
--       * still happen that this process has a preemption
--       * 'in progress' already - but this is not a problem and
--       * might happen in other circumstances as well.
--       */
--needs_resched:
--      {
--              unsigned long flags;
-+      for (i = 0; i < smp_num_cpus; i++)
-+              sum += cpu_rq(cpu_logical_map(i))->nr_uninterruptible;
--              /*
--               * Avoid taking the runqueue lock in cases where
--               * no preemption-check is necessery:
--               */
--              if ((prev == idle_task(smp_processor_id())) ||
--                                              (policy & SCHED_YIELD))
--                      goto out_unlock;
-+      return sum;
-+}
--              spin_lock_irqsave(&runqueue_lock, flags);
--              if ((prev->state == TASK_RUNNING) && !task_has_cpu(prev))
--                      reschedule_idle(prev);
--              spin_unlock_irqrestore(&runqueue_lock, flags);
--              goto out_unlock;
--      }
--#else
--      prev->policy &= ~SCHED_YIELD;
--#endif /* CONFIG_SMP */
-+unsigned long nr_context_switches(void)
-+{
-+      unsigned long i, sum = 0;
-+
-+      for (i = 0; i < smp_num_cpus; i++)
-+              sum += cpu_rq(cpu_logical_map(i))->nr_switches;
-+
-+      return sum;
- }
--asmlinkage void schedule_tail(struct task_struct *prev)
-+inline int idle_cpu(int cpu)
- {
--      __schedule_tail(prev);
-+      return cpu_curr(cpu) == cpu_rq(cpu)->idle;
- }
-+#if CONFIG_SMP
- /*
-- *  'schedule()' is the scheduler function. It's a very simple and nice
-- * scheduler: it's not perfect, but certainly works for most things.
-- *
-- * The goto is "interesting".
-- *
-- *   NOTE!!  Task 0 is the 'idle' task, which gets called when no other
-- * tasks can run. It can not be killed, and it cannot sleep. The 'state'
-- * information in task[0] is never used.
-+ * Lock the busiest runqueue as well, this_rq is locked already.
-+ * Recalculate nr_running if we have to drop the runqueue lock.
-  */
--asmlinkage void schedule(void)
-+static inline unsigned int double_lock_balance(runqueue_t *this_rq,
-+      runqueue_t *busiest, int this_cpu, int idle, unsigned int nr_running)
- {
--      struct schedule_data * sched_data;
--      struct task_struct *prev, *next, *p;
--      struct list_head *tmp;
--      int this_cpu, c;
-+      if (unlikely(!spin_trylock(&busiest->lock))) {
-+              if (busiest < this_rq) {
-+                      spin_unlock(&this_rq->lock);
-+                      spin_lock(&busiest->lock);
-+                      spin_lock(&this_rq->lock);
-+                      /* Need to recalculate nr_running */
-+                      if (idle || (this_rq->nr_running > this_rq->prev_nr_running[this_cpu]))
-+                              nr_running = this_rq->nr_running;
-+                      else
-+                              nr_running = this_rq->prev_nr_running[this_cpu];
-+              } else
-+                      spin_lock(&busiest->lock);
-+      }
-+      return nr_running;
-+}
-+/*
-+ * Move a task from a remote runqueue to the local runqueue.
-+ * Both runqueues must be locked.
-+ */
-+static inline int pull_task(runqueue_t *src_rq, prio_array_t *src_array, task_t *p, runqueue_t *this_rq, int this_cpu)
-+{
-+      int resched = 0;
--      spin_lock_prefetch(&runqueue_lock);
-+      dequeue_task(p, src_array);
-+      src_rq->nr_running--;
-+      p->cpu = this_cpu;
-+      this_rq->nr_running++;
-+      enqueue_task(p, this_rq->active);
-+      /*
-+       * Note that idle threads have a prio of MAX_PRIO, for this test
-+       * to be always true for them.
-+       */
-+      if (p->prio < this_rq->curr->prio)
-+              resched = 1;
--      BUG_ON(!current->active_mm);
--need_resched_back:
--      prev = current;
--      this_cpu = prev->processor;
-+      return resched;
-+}
--      if (unlikely(in_interrupt())) {
--              printk("Scheduling in interrupt\n");
--              BUG();
-+static inline int idle_cpu_reschedule(task_t * p, int cpu)
-+{
-+      if (unlikely(!(p->cpus_allowed & (1UL << cpu))))
-+              return 0;
-+      return idle_cpu(cpu);
-+}
-+
-+#include <linux/smp_balance.h>
-+
-+static int reschedule_idle(task_t * p)
-+{
-+      int p_cpu = p->cpu, i;
-+
-+      if (idle_cpu(p_cpu))
-+              return 0;
-+
-+      p_cpu = cpu_number_map(p_cpu);
-+
-+      for (i = (p_cpu + 1) % smp_num_cpus;
-+           i != p_cpu;
-+           i = (i + 1) % smp_num_cpus) {
-+              int physical = cpu_logical_map(i);
-+
-+              if (idle_cpu_reschedule(p, physical)) {
-+                      physical = arch_reschedule_idle_override(p, physical);
-+                      p->cpu = physical;
-+                      return 1;
-+              }
-       }
--      release_kernel_lock(prev, this_cpu);
-+      return 0;
-+}
-+
-+/*
-+ * Current runqueue is empty, or rebalance tick: if there is an
-+ * inbalance (current runqueue is too short) then pull from
-+ * busiest runqueue(s).
-+ *
-+ * We call this with the current runqueue locked,
-+ * irqs disabled.
-+ */
-+static void load_balance(runqueue_t *this_rq, int idle)
-+{
-+      int imbalance, nr_running, load, max_load,
-+              idx, i, this_cpu = this_rq - runqueues;
-+      task_t *tmp;
-+      runqueue_t *busiest, *rq_src;
-+      prio_array_t *array;
-+      struct list_head *head, *curr;
-+      int resched;
-       /*
--       * 'sched_data' is protected by the fact that we can run
--       * only one process per CPU.
-+       * Handle architecture-specific balancing, such as hyperthreading.
-        */
--      sched_data = & aligned_data[this_cpu].schedule_data;
-+      if (arch_load_balance(this_cpu, idle))
-+              return;
--      spin_lock_irq(&runqueue_lock);
-+ retry:
-+      /*
-+       * We search all runqueues to find the most busy one.
-+       * We do this lockless to reduce cache-bouncing overhead,
-+       * we re-check the 'best' source CPU later on again, with
-+       * the lock held.
-+       *
-+       * We fend off statistical fluctuations in runqueue lengths by
-+       * saving the runqueue length during the previous load-balancing
-+       * operation and using the smaller one the current and saved lengths.
-+       * If a runqueue is long enough for a longer amount of time then
-+       * we recognize it and pull tasks from it.
-+       *
-+       * The 'current runqueue length' is a statistical maximum variable,
-+       * for that one we take the longer one - to avoid fluctuations in
-+       * the other direction. So for a load-balance to happen it needs
-+       * stable long runqueue on the target CPU and stable short runqueue
-+       * on the local runqueue.
-+       *
-+       * We make an exception if this CPU is about to become idle - in
-+       * that case we are less picky about moving a task across CPUs and
-+       * take what can be taken.
-+       */
-+      if (idle || (this_rq->nr_running > this_rq->prev_nr_running[this_cpu]))
-+              nr_running = this_rq->nr_running;
-+      else
-+              nr_running = this_rq->prev_nr_running[this_cpu];
--      /* move an exhausted RR process to be last.. */
--      if (unlikely(prev->policy == SCHED_RR))
--              if (!prev->counter) {
--                      prev->counter = NICE_TO_TICKS(prev->nice);
--                      move_last_runqueue(prev);
--              }
-+      busiest = NULL;
-+      max_load = 1;
-+      for (i = 0; i < smp_num_cpus; i++) {
-+              int logical = cpu_logical_map(i);
--      switch (prev->state) {
--              case TASK_INTERRUPTIBLE:
--                      if (signal_pending(prev)) {
--                              prev->state = TASK_RUNNING;
--                              break;
--                      }
--              default:
--                      del_from_runqueue(prev);
--              case TASK_RUNNING:;
-+              rq_src = cpu_rq(logical);
-+              if (idle || (rq_src->nr_running < this_rq->prev_nr_running[logical]))
-+                      load = rq_src->nr_running;
-+              else
-+                      load = this_rq->prev_nr_running[logical];
-+              this_rq->prev_nr_running[logical] = rq_src->nr_running;
-+
-+              if ((load > max_load) && (rq_src != this_rq)) {
-+                      busiest = rq_src;
-+                      max_load = load;
-+              }
-       }
--      prev->need_resched = 0;
-+
-+      if (likely(!busiest))
-+              return;
-+
-+      imbalance = (max_load - nr_running) / 2;
-+
-+      /* It needs an at least ~25% imbalance to trigger balancing. */
-+      if (!idle && (imbalance < (max_load + 3)/4))
-+              return;
-       /*
--       * this is the scheduler proper:
-+       * Make sure nothing significant changed since we checked the
-+       * runqueue length.
-        */
-+      if (double_lock_balance(this_rq, busiest, this_cpu, idle, nr_running) > nr_running ||
-+          busiest->nr_running < max_load)
-+              goto out_unlock_retry;
--repeat_schedule:
-       /*
--       * Default process to select..
-+       * We first consider expired tasks. Those will likely not be
-+       * executed in the near future, and they are most likely to
-+       * be cache-cold, thus switching CPUs has the least effect
-+       * on them.
-        */
--      next = idle_task(this_cpu);
--      c = -1000;
--      list_for_each(tmp, &runqueue_head) {
--              p = list_entry(tmp, struct task_struct, run_list);
--              if (can_schedule(p, this_cpu)) {
--                      int weight = goodness(p, this_cpu, prev->active_mm);
--                      if (weight > c)
--                              c = weight, next = p;
-+      if (busiest->expired->nr_active)
-+              array = busiest->expired;
-+      else
-+              array = busiest->active;
-+
-+      resched = 0;
-+new_array:
-+      /* Start searching at priority 0: */
-+      idx = 0;
-+skip_bitmap:
-+      if (!idx)
-+              idx = sched_find_first_bit(array->bitmap);
-+      else
-+              idx = find_next_bit(array->bitmap, MAX_PRIO, idx);
-+      if (idx == MAX_PRIO) {
-+              if (array == busiest->expired) {
-+                      array = busiest->active;
-+                      goto new_array;
-               }
-+              goto out_unlock;
-       }
--      /* Do we need to re-calculate counters? */
--      if (unlikely(!c)) {
--              struct task_struct *p;
--
--              spin_unlock_irq(&runqueue_lock);
--              read_lock(&tasklist_lock);
--              for_each_task(p)
--                      p->counter = (p->counter >> 1) + NICE_TO_TICKS(p->nice);
--              read_unlock(&tasklist_lock);
--              spin_lock_irq(&runqueue_lock);
--              goto repeat_schedule;
-+      head = array->queue + idx;
-+      curr = head->prev;
-+skip_queue:
-+      tmp = list_entry(curr, task_t, run_list);
-+
-+      /*
-+       * We do not migrate tasks that are:
-+       * 1) running (obviously), or
-+       * 2) cannot be migrated to this CPU due to cpus_allowed, or
-+       * 3) are cache-hot on their current CPU.
-+       */
-+
-+#define CAN_MIGRATE_TASK(p,rq,this_cpu)                                       \
-+      ((jiffies - (p)->sleep_timestamp > cache_decay_ticks) &&        \
-+              ((p) != (rq)->curr) &&                                  \
-+                      ((p)->cpus_allowed & (1UL << (this_cpu))))
-+
-+      curr = curr->prev;
-+
-+      if (!CAN_MIGRATE_TASK(tmp, busiest, this_cpu)) {
-+              if (curr != head)
-+                      goto skip_queue;
-+              idx++;
-+              goto skip_bitmap;
-+      }
-+      resched |= pull_task(busiest, array, tmp, this_rq, this_cpu);
-+      if (--imbalance > 0) {
-+              if (curr != head)
-+                      goto skip_queue;
-+              idx++;
-+              goto skip_bitmap;
-       }
-+out_unlock:
-+      spin_unlock(&busiest->lock);
-+      if (resched)
-+              resched_task(this_rq->curr);
-+      return;
-+out_unlock_retry:
-+      spin_unlock(&busiest->lock);
-+      goto retry;
-+}
--      /*
--       * from this point on nothing can prevent us from
--       * switching to the next task, save this fact in
--       * sched_data.
--       */
--      sched_data->curr = next;
--      task_set_cpu(next, this_cpu);
--      spin_unlock_irq(&runqueue_lock);
--
--      if (unlikely(prev == next)) {
--              /* We won't go through the normal tail, so do this by hand */
--              prev->policy &= ~SCHED_YIELD;
--              goto same_process;
-+/*
-+ * One of the idle_cpu_tick() or the busy_cpu_tick() function will
-+ * gets called every timer tick, on every CPU. Our balancing action
-+ * frequency and balancing agressivity depends on whether the CPU is
-+ * idle or not.
-+ *
-+ * busy-rebalance every 250 msecs. idle-rebalance every 100 msec.
-+ */
-+#define BUSY_REBALANCE_TICK (HZ/4 ?: 1)
-+#define IDLE_REBALANCE_TICK (HZ/10 ?: 1)
-+
-+static inline void idle_tick(void)
-+{
-+      if (unlikely(time_before_eq(this_rq()->last_jiffy + IDLE_REBALANCE_TICK, jiffies))) {
-+              spin_lock(&this_rq()->lock);
-+              load_balance(this_rq(), 1);
-+              spin_unlock(&this_rq()->lock);
-+              this_rq()->last_jiffy = jiffies;
-       }
-+}
--#ifdef CONFIG_SMP
--      /*
--       * maintain the per-process 'last schedule' value.
--       * (this has to be recalculated even if we reschedule to
--       * the same process) Currently this is only used on SMP,
--       * and it's approximate, so we do not have to maintain
--       * it while holding the runqueue spinlock.
--       */
--      sched_data->last_schedule = get_cycles();
-+#endif
--      /*
--       * We drop the scheduler lock early (it's a global spinlock),
--       * thus we have to lock the previous process from getting
--       * rescheduled during switch_to().
--       */
-+/*
-+ * We place interactive tasks back into the active array, if possible.
-+ *
-+ * To guarantee that this does not starve expired tasks we ignore the
-+ * interactivity of a task if the first expired task had to wait more
-+ * than a 'reasonable' amount of time. This deadline timeout is
-+ * load-dependent, as the frequency of array switched decreases with
-+ * increasing number of running tasks:
-+ */
-+#define EXPIRED_STARVING(rq) \
-+              ((rq)->expired_timestamp && \
-+              (jiffies - (rq)->expired_timestamp >= \
-+                      STARVATION_LIMIT * ((rq)->nr_running) + 1))
--#endif /* CONFIG_SMP */
-+/*
-+ * This function gets called by the timer code, with HZ frequency.
-+ * We call it with interrupts disabled.
-+ */
-+void scheduler_tick(int user_tick, int system)
-+{
-+      int cpu = smp_processor_id();
-+      runqueue_t *rq = this_rq();
-+      task_t *p = current;
--      kstat.context_swtch++;
--      /*
--       * there are 3 processes which are affected by a context switch:
--       *
--       * prev == .... ==> (last => next)
--       *
--       * It's the 'much more previous' 'prev' that is on next's stack,
--       * but prev is set to (the just run) 'last' process by switch_to().
--       * This might sound slightly confusing but makes tons of sense.
--       */
--      prepare_to_switch();
--      {
--              struct mm_struct *mm = next->mm;
--              struct mm_struct *oldmm = prev->active_mm;
--              if (!mm) {
--                      BUG_ON(next->active_mm);
--                      next->active_mm = oldmm;
--                      atomic_inc(&oldmm->mm_count);
--                      enter_lazy_tlb(oldmm, next, this_cpu);
--              } else {
--                      BUG_ON(next->active_mm != mm);
--                      switch_mm(oldmm, mm, next, this_cpu);
-+      if (p == rq->idle) {
-+              if (local_bh_count(cpu) || local_irq_count(cpu) > 1)
-+                      kstat.per_cpu_system[cpu] += system;
-+#if CONFIG_SMP
-+              idle_tick();
-+#endif
-+              return;
-+      }
-+      if (TASK_NICE(p) > 0)
-+              kstat.per_cpu_nice[cpu] += user_tick;
-+      else
-+              kstat.per_cpu_user[cpu] += user_tick;
-+      kstat.per_cpu_system[cpu] += system;
-+
-+      /* Task might have expired already, but not scheduled off yet */
-+      if (p->array != rq->active) {
-+              set_tsk_need_resched(p);
-+              return;
-+      }
-+      spin_lock(&rq->lock);
-+      if (unlikely(rt_task(p))) {
-+              /*
-+               * RR tasks need a special form of timeslice management.
-+               * FIFO tasks have no timeslices.
-+               */
-+              if ((p->policy == SCHED_RR) && !--p->time_slice) {
-+                      p->time_slice = TASK_TIMESLICE(p);
-+                      p->first_time_slice = 0;
-+                      set_tsk_need_resched(p);
-+
-+                      /* put it at the end of the queue: */
-+                      dequeue_task(p, rq->active);
-+                      enqueue_task(p, rq->active);
-               }
-+              goto out;
-+      }
-+      /*
-+       * The task was running during this tick - update the
-+       * time slice counter and the sleep average. Note: we
-+       * do not update a process's priority until it either
-+       * goes to sleep or uses up its timeslice. This makes
-+       * it possible for interactive tasks to use up their
-+       * timeslices at their highest priority levels.
-+       */
-+      if (p->sleep_avg)
-+              p->sleep_avg--;
-+      if (!--p->time_slice) {
-+              dequeue_task(p, rq->active);
-+              set_tsk_need_resched(p);
-+              p->prio = effective_prio(p);
-+              p->time_slice = TASK_TIMESLICE(p);
-+              p->first_time_slice = 0;
-+
-+              if (!TASK_INTERACTIVE(p) || EXPIRED_STARVING(rq)) {
-+                      if (!rq->expired_timestamp)
-+                              rq->expired_timestamp = jiffies;
-+                      enqueue_task(p, rq->expired);
-+              } else
-+                      enqueue_task(p, rq->active);
-+      }
-+out:
-+#if CONFIG_SMP
-+      if (unlikely(time_before_eq(this_rq()->last_jiffy + BUSY_REBALANCE_TICK, jiffies))) {
-+              load_balance(rq, 0);
-+              rq->last_jiffy = jiffies;
-+      }
-+#endif
-+      spin_unlock(&rq->lock);
-+}
-+
-+void scheduling_functions_start_here(void) { }
-+
-+/*
-+ * 'schedule()' is the main scheduler function.
-+ */
-+asmlinkage void schedule(void)
-+{
-+      task_t *prev, *next;
-+      runqueue_t *rq;
-+      prio_array_t *array;
-+      struct list_head *queue;
-+      int idx;
-+
-+      if (unlikely(in_interrupt()))
-+              BUG();
--              if (!prev->mm) {
--                      prev->active_mm = NULL;
--                      mmdrop(oldmm);
-+need_resched:
-+      prev = current;
-+      rq = this_rq();
-+
-+      release_kernel_lock(prev, smp_processor_id());
-+      prev->sleep_timestamp = jiffies;
-+      spin_lock_irq(&rq->lock);
-+
-+      switch (prev->state) {
-+      case TASK_INTERRUPTIBLE:
-+              if (unlikely(signal_pending(prev))) {
-+                      prev->state = TASK_RUNNING;
-+                      break;
-               }
-+      default:
-+              deactivate_task(prev, rq);
-+      case TASK_RUNNING:
-+              ;
-+      }
-+#if CONFIG_SMP
-+pick_next_task:
-+#endif
-+      if (unlikely(!rq->nr_running)) {
-+#if CONFIG_SMP
-+              load_balance(rq, 2);
-+              rq->last_jiffy = jiffies;
-+              if (rq->nr_running)
-+                      goto pick_next_task;
-+#endif
-+              next = rq->idle;
-+              rq->expired_timestamp = 0;
-+              goto switch_tasks;
-       }
--      /*
--       * This just switches the register state and the
--       * stack.
--       */
--      switch_to(prev, next, prev);
--      __schedule_tail(prev);
-+      array = rq->active;
-+      if (unlikely(!array->nr_active)) {
-+              /*
-+               * Switch the active and expired arrays.
-+               */
-+              rq->active = rq->expired;
-+              rq->expired = array;
-+              array = rq->active;
-+              rq->expired_timestamp = 0;
-+      }
-+
-+      idx = sched_find_first_bit(array->bitmap);
-+      queue = array->queue + idx;
-+      next = list_entry(queue->next, task_t, run_list);
-+
-+switch_tasks:
-+      prefetch(next);
-+      clear_tsk_need_resched(prev);
-+
-+      if (likely(prev != next)) {
-+              rq->nr_switches++;
-+              rq->curr = next;
-+      
-+              prepare_arch_switch(rq, next);
-+              prev = context_switch(prev, next);
-+              barrier();
-+              rq = this_rq();
-+              finish_arch_switch(rq, prev);
-+      } else
-+              spin_unlock_irq(&rq->lock);
--same_process:
-       reacquire_kernel_lock(current);
--      if (current->need_resched)
--              goto need_resched_back;
--      return;
-+      if (need_resched())
-+              goto need_resched;
- }
- /*
-- * The core wakeup function.  Non-exclusive wakeups (nr_exclusive == 0) just wake everything
-- * up.  If it's an exclusive wakeup (nr_exclusive == small +ve number) then we wake all the
-- * non-exclusive tasks and one exclusive task.
-+ * The core wakeup function.  Non-exclusive wakeups (nr_exclusive == 0) just
-+ * wake everything up.  If it's an exclusive wakeup (nr_exclusive == small +ve
-+ * number) then we wake all the non-exclusive tasks and one exclusive task.
-  *
-  * There are circumstances in which we can try to wake a task which has already
-- * started to run but is not in state TASK_RUNNING.  try_to_wake_up() returns zero
-- * in this (rare) case, and we handle it by contonuing to scan the queue.
-+ * started to run but is not in state TASK_RUNNING.  try_to_wake_up() returns
-+ * zero in this (rare) case, and we handle it by continuing to scan the queue.
-  */
--static inline void __wake_up_common (wait_queue_head_t *q, unsigned int mode,
--                                   int nr_exclusive, const int sync)
-+static inline void __wake_up_common(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, int sync)
- {
-       struct list_head *tmp;
--      struct task_struct *p;
--
--      CHECK_MAGIC_WQHEAD(q);
--      WQ_CHECK_LIST_HEAD(&q->task_list);
--      
--      list_for_each(tmp,&q->task_list) {
--              unsigned int state;
--                wait_queue_t *curr = list_entry(tmp, wait_queue_t, task_list);
-+      unsigned int state;
-+      wait_queue_t *curr;
-+      task_t *p;
--              CHECK_MAGIC(curr->__magic);
-+      list_for_each(tmp, &q->task_list) {
-+              curr = list_entry(tmp, wait_queue_t, task_list);
-               p = curr->task;
-               state = p->state;
--              if (state & mode) {
--                      WQ_NOTE_WAKER(curr);
--                      if (try_to_wake_up(p, sync) && (curr->flags&WQ_FLAG_EXCLUSIVE) && !--nr_exclusive)
-+              if ((state & mode) && try_to_wake_up(p, sync) &&
-+                      ((curr->flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive))
-                               break;
--              }
-       }
- }
--void fastcall __wake_up(wait_queue_head_t *q, unsigned int mode, int nr)
-+void fastcall __wake_up(wait_queue_head_t *q, unsigned int mode, int nr_exclusive)
- {
--      if (q) {
--              unsigned long flags;
--              wq_read_lock_irqsave(&q->lock, flags);
--              __wake_up_common(q, mode, nr, 0);
--              wq_read_unlock_irqrestore(&q->lock, flags);
--      }
-+      unsigned long flags;
-+
-+      if (unlikely(!q))
-+              return;
-+
-+      wq_read_lock_irqsave(&q->lock, flags);
-+      __wake_up_common(q, mode, nr_exclusive, 0);
-+      wq_read_unlock_irqrestore(&q->lock, flags);
- }
--void fastcall __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr)
-+#if CONFIG_SMP
-+
-+void fastcall __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr_exclusive)
- {
--      if (q) {
--              unsigned long flags;
--              wq_read_lock_irqsave(&q->lock, flags);
--              __wake_up_common(q, mode, nr, 1);
--              wq_read_unlock_irqrestore(&q->lock, flags);
--      }
-+      unsigned long flags;
-+
-+      if (unlikely(!q))
-+              return;
-+
-+      wq_read_lock_irqsave(&q->lock, flags);
-+      if (likely(nr_exclusive))
-+              __wake_up_common(q, mode, nr_exclusive, 1);
-+      else
-+              __wake_up_common(q, mode, nr_exclusive, 0);
-+      wq_read_unlock_irqrestore(&q->lock, flags);
- }
-+#endif
-+ 
- void fastcall complete(struct completion *x)
- {
-       unsigned long flags;
--      spin_lock_irqsave(&x->wait.lock, flags);
-+      wq_write_lock_irqsave(&x->wait.lock, flags);
-       x->done++;
-       __wake_up_common(&x->wait, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1, 0);
--      spin_unlock_irqrestore(&x->wait.lock, flags);
-+      wq_write_unlock_irqrestore(&x->wait.lock, flags);
- }
- void fastcall wait_for_completion(struct completion *x)
- {
--      spin_lock_irq(&x->wait.lock);
-+      wq_write_lock_irq(&x->wait.lock);
-       if (!x->done) {
-               DECLARE_WAITQUEUE(wait, current);
-@@ -775,14 +1060,14 @@
-               __add_wait_queue_tail(&x->wait, &wait);
-               do {
-                       __set_current_state(TASK_UNINTERRUPTIBLE);
--                      spin_unlock_irq(&x->wait.lock);
-+                      wq_write_unlock_irq(&x->wait.lock);
-                       schedule();
--                      spin_lock_irq(&x->wait.lock);
-+                      wq_write_lock_irq(&x->wait.lock);
-               } while (!x->done);
-               __remove_wait_queue(&x->wait, &wait);
-       }
-       x->done--;
--      spin_unlock_irq(&x->wait.lock);
-+      wq_write_unlock_irq(&x->wait.lock);
- }
- #define       SLEEP_ON_VAR                            \
-@@ -850,43 +1135,40 @@
- void scheduling_functions_end_here(void) { }
--#if CONFIG_SMP
--/**
-- * set_cpus_allowed() - change a given task's processor affinity
-- * @p: task to bind
-- * @new_mask: bitmask of allowed processors
-- *
-- * Upon return, the task is running on a legal processor.  Note the caller
-- * must have a valid reference to the task: it must not exit() prematurely.
-- * This call can sleep; do not hold locks on call.
-- */
--void set_cpus_allowed(struct task_struct *p, unsigned long new_mask)
-+void set_user_nice(task_t *p, long nice)
- {
--      new_mask &= cpu_online_map;
--      BUG_ON(!new_mask);
--
--      p->cpus_allowed = new_mask;
-+      unsigned long flags;
-+      prio_array_t *array;
-+      runqueue_t *rq;
-+      if (TASK_NICE(p) == nice || nice < -20 || nice > 19)
-+              return;
-       /*
--       * If the task is on a no-longer-allowed processor, we need to move
--       * it.  If the task is not current, then set need_resched and send
--       * its processor an IPI to reschedule.
-+       * We have to be careful, if called from sys_setpriority(),
-+       * the task might be in the middle of scheduling on another CPU.
-        */
--      if (!(p->cpus_runnable & p->cpus_allowed)) {
--              if (p != current) {
--                      p->need_resched = 1;
--                      smp_send_reschedule(p->processor);
--              }
-+      rq = task_rq_lock(p, &flags);
-+      if (rt_task(p)) {
-+              p->static_prio = NICE_TO_PRIO(nice);
-+              goto out_unlock;
-+      }
-+      array = p->array;
-+      if (array)
-+              dequeue_task(p, array);
-+      p->static_prio = NICE_TO_PRIO(nice);
-+      p->prio = NICE_TO_PRIO(nice);
-+      if (array) {
-+              enqueue_task(p, array);
-               /*
--               * Wait until we are on a legal processor.  If the task is
--               * current, then we should be on a legal processor the next
--               * time we reschedule.  Otherwise, we need to wait for the IPI.
-+               * If the task is running and lowered its priority,
-+               * or increased its priority then reschedule its CPU:
-                */
--              while (!(p->cpus_runnable & p->cpus_allowed))
--                      schedule();
-+              if (p == rq->curr)
-+                      resched_task(rq->curr);
-       }
-+out_unlock:
-+      task_rq_unlock(rq, &flags);
- }
--#endif /* CONFIG_SMP */
- #ifndef __alpha__
-@@ -898,7 +1180,7 @@
- asmlinkage long sys_nice(int increment)
- {
--      long newprio;
-+      long nice;
-       /*
-        *      Setpriority might change our priority at the same moment.
-@@ -914,32 +1196,46 @@
-       if (increment > 40)
-               increment = 40;
--      newprio = current->nice + increment;
--      if (newprio < -20)
--              newprio = -20;
--      if (newprio > 19)
--              newprio = 19;
--      current->nice = newprio;
-+      nice = PRIO_TO_NICE(current->static_prio) + increment;
-+      if (nice < -20)
-+              nice = -20;
-+      if (nice > 19)
-+              nice = 19;
-+      set_user_nice(current, nice);
-       return 0;
- }
- #endif
--static inline struct task_struct *find_process_by_pid(pid_t pid)
-+/*
-+ * This is the priority value as seen by users in /proc
-+ *
-+ * RT tasks are offset by -200. Normal tasks are centered
-+ * around 0, value goes from -16 to +15.
-+ */
-+int task_prio(task_t *p)
- {
--      struct task_struct *tsk = current;
-+      return p->prio - MAX_USER_RT_PRIO;
-+}
--      if (pid)
--              tsk = find_task_by_pid(pid);
--      return tsk;
-+int task_nice(task_t *p)
-+{
-+      return TASK_NICE(p);
-+}
-+
-+static inline task_t *find_process_by_pid(pid_t pid)
-+{
-+      return pid ? find_task_by_pid(pid) : current;
- }
--static int setscheduler(pid_t pid, int policy, 
--                      struct sched_param *param)
-+static int setscheduler(pid_t pid, int policy, struct sched_param *param)
- {
-       struct sched_param lp;
--      struct task_struct *p;
-+      prio_array_t *array;
-+      unsigned long flags;
-+      runqueue_t *rq;
-       int retval;
-+      task_t *p;
-       retval = -EINVAL;
-       if (!param || pid < 0)
-@@ -953,14 +1249,19 @@
-        * We play safe to avoid deadlocks.
-        */
-       read_lock_irq(&tasklist_lock);
--      spin_lock(&runqueue_lock);
-       p = find_process_by_pid(pid);
-       retval = -ESRCH;
-       if (!p)
--              goto out_unlock;
--                      
-+              goto out_unlock_tasklist;
-+
-+      /*
-+       * To be able to change p->policy safely, the apropriate
-+       * runqueue lock must be held.
-+       */
-+      rq = task_rq_lock(p, &flags);
-+
-       if (policy < 0)
-               policy = p->policy;
-       else {
-@@ -969,40 +1270,48 @@
-                               policy != SCHED_OTHER)
-                       goto out_unlock;
-       }
--      
-+
-       /*
--       * Valid priorities for SCHED_FIFO and SCHED_RR are 1..99, valid
--       * priority for SCHED_OTHER is 0.
-+       * Valid priorities for SCHED_FIFO and SCHED_RR are
-+       * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_OTHER is 0.
-        */
-       retval = -EINVAL;
--      if (lp.sched_priority < 0 || lp.sched_priority > 99)
-+      if (lp.sched_priority < 0 || lp.sched_priority > MAX_USER_RT_PRIO-1)
-               goto out_unlock;
-       if ((policy == SCHED_OTHER) != (lp.sched_priority == 0))
-               goto out_unlock;
-       retval = -EPERM;
--      if ((policy == SCHED_FIFO || policy == SCHED_RR) && 
-+      if ((policy == SCHED_FIFO || policy == SCHED_RR) &&
-           !capable(CAP_SYS_NICE))
-               goto out_unlock;
-       if ((current->euid != p->euid) && (current->euid != p->uid) &&
-           !capable(CAP_SYS_NICE))
-               goto out_unlock;
-+      array = p->array;
-+      if (array)
-+              deactivate_task(p, task_rq(p));
-       retval = 0;
-       p->policy = policy;
-       p->rt_priority = lp.sched_priority;
--
--      current->need_resched = 1;
-+      if (policy != SCHED_OTHER)
-+              p->prio = MAX_USER_RT_PRIO-1 - p->rt_priority;
-+      else
-+              p->prio = p->static_prio;
-+      if (array)
-+              activate_task(p, task_rq(p));
- out_unlock:
--      spin_unlock(&runqueue_lock);
-+      task_rq_unlock(rq, &flags);
-+out_unlock_tasklist:
-       read_unlock_irq(&tasklist_lock);
- out_nounlock:
-       return retval;
- }
--asmlinkage long sys_sched_setscheduler(pid_t pid, int policy, 
-+asmlinkage long sys_sched_setscheduler(pid_t pid, int policy,
-                                     struct sched_param *param)
- {
-       return setscheduler(pid, policy, param);
-@@ -1015,7 +1324,7 @@
- asmlinkage long sys_sched_getscheduler(pid_t pid)
- {
--      struct task_struct *p;
-+      task_t *p;
-       int retval;
-       retval = -EINVAL;
-@@ -1026,7 +1335,7 @@
-       read_lock(&tasklist_lock);
-       p = find_process_by_pid(pid);
-       if (p)
--              retval = p->policy & ~SCHED_YIELD;
-+              retval = p->policy;
-       read_unlock(&tasklist_lock);
- out_nounlock:
-@@ -1035,7 +1344,7 @@
- asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param *param)
- {
--      struct task_struct *p;
-+      task_t *p;
-       struct sched_param lp;
-       int retval;
-@@ -1066,42 +1375,64 @@
- asmlinkage long sys_sched_yield(void)
- {
--      /*
--       * Trick. sched_yield() first counts the number of truly 
--       * 'pending' runnable processes, then returns if it's
--       * only the current processes. (This test does not have
--       * to be atomic.) In threaded applications this optimization
--       * gets triggered quite often.
--       */
-+      runqueue_t *rq = this_rq();
-+      prio_array_t *array;
-+      int i;
--      int nr_pending = nr_running;
-+      spin_lock_irq(&rq->lock);
-+      
-+      if (unlikely(rq->nr_running == 1)) {
-+              spin_unlock_irq(&rq->lock);
-+              return 0;
-+      }
--#if CONFIG_SMP
--      int i;
-+      array = current->array;
-+      if (unlikely(rt_task(current))) {
-+              list_del(&current->run_list);
-+              list_add_tail(&current->run_list, array->queue + current->prio);
-+              goto out_unlock;
-+      }
--      // Subtract non-idle processes running on other CPUs.
--      for (i = 0; i < smp_num_cpus; i++) {
--              int cpu = cpu_logical_map(i);
--              if (aligned_data[cpu].schedule_data.curr != idle_task(cpu))
--                      nr_pending--;
-+      if (unlikely(array == rq->expired) && rq->active->nr_active)
-+              goto out_unlock;
-+
-+      list_del(&current->run_list);
-+      if (!list_empty(array->queue + current->prio)) {
-+              list_add(&current->run_list, array->queue[current->prio].next);
-+              goto out_unlock;
-       }
--#else
--      // on UP this process is on the runqueue as well
--      nr_pending--;
--#endif
--      if (nr_pending) {
-+
-+      __clear_bit(current->prio, array->bitmap);
-+      if (likely(array == rq->active) && array->nr_active == 1) {
-               /*
--               * This process can only be rescheduled by us,
--               * so this is safe without any locking.
-+               * We're the last task in the active queue so
-+               * we must move ourself to the expired array
-+               * to avoid running again immediatly.
-                */
--              if (current->policy == SCHED_OTHER)
--                      current->policy |= SCHED_YIELD;
--              current->need_resched = 1;
--
--              spin_lock_irq(&runqueue_lock);
--              move_last_runqueue(current);
--              spin_unlock_irq(&runqueue_lock);
-+              array->nr_active--;
-+              array = rq->expired;
-+              array->nr_active++;
-       }
-+
-+      i = sched_find_first_bit(array->bitmap);
-+
-+      BUG_ON(i == MAX_PRIO);
-+      BUG_ON(i == current->prio && array == current->array);
-+
-+      if (array == current->array && i < current->prio)
-+              i = current->prio;
-+      else {
-+              current->array = array;
-+              current->prio = i;
-+      }
-+      list_add(&current->run_list, array->queue[i].next);
-+      __set_bit(i, array->bitmap);
-+
-+out_unlock:
-+      spin_unlock_irq(&rq->lock);
-+
-+      schedule();
-+
-       return 0;
- }
-@@ -1113,14 +1444,13 @@
-  */
- void yield(void)
- {
--      set_current_state(TASK_RUNNING);
-+      __set_current_state(TASK_RUNNING);
-       sys_sched_yield();
--      schedule();
- }
- void __cond_resched(void)
- {
--      set_current_state(TASK_RUNNING);
-+      __set_current_state(TASK_RUNNING);
-       schedule();
- }
-@@ -1131,7 +1461,7 @@
-       switch (policy) {
-       case SCHED_FIFO:
-       case SCHED_RR:
--              ret = 99;
-+              ret = MAX_USER_RT_PRIO-1;
-               break;
-       case SCHED_OTHER:
-               ret = 0;
-@@ -1158,7 +1488,7 @@
- asmlinkage long sys_sched_rr_get_interval(pid_t pid, struct timespec *interval)
- {
-       struct timespec t;
--      struct task_struct *p;
-+      task_t *p;
-       int retval = -EINVAL;
-       if (pid < 0)
-@@ -1168,8 +1498,8 @@
-       read_lock(&tasklist_lock);
-       p = find_process_by_pid(pid);
-       if (p)
--              jiffies_to_timespec(p->policy & SCHED_FIFO ? 0 : NICE_TO_TICKS(p->nice),
--                                  &t);
-+              jiffies_to_timespec(p->policy & SCHED_FIFO ?
-+                                       0 : TASK_TIMESLICE(p), &t);
-       read_unlock(&tasklist_lock);
-       if (p)
-               retval = copy_to_user(interval, &t, sizeof(t)) ? -EFAULT : 0;
-@@ -1177,14 +1507,14 @@
-       return retval;
- }
--static void show_task(struct task_struct * p)
-+static void show_task(task_t * p)
- {
-       unsigned long free = 0;
-       int state;
-       static const char * stat_nam[] = { "R", "S", "D", "Z", "T", "W" };
-       printk("%-13.13s ", p->comm);
--      state = p->state ? ffz(~p->state) + 1 : 0;
-+      state = p->state ? __ffs(p->state) + 1 : 0;
-       if (((unsigned) state) < sizeof(stat_nam)/sizeof(char *))
-               printk(stat_nam[state]);
-       else
-@@ -1225,7 +1555,7 @@
-               printk(" (NOTLB)\n");
-       {
--              extern void show_trace_task(struct task_struct *tsk);
-+              extern void show_trace_task(task_t *tsk);
-               show_trace_task(p);
-       }
- }
-@@ -1247,7 +1577,7 @@
- void show_state(void)
- {
--      struct task_struct *p;
-+      task_t *p;
- #if (BITS_PER_LONG == 32)
-       printk("\n"
-@@ -1270,128 +1600,280 @@
-       read_unlock(&tasklist_lock);
- }
--/**
-- * reparent_to_init() - Reparent the calling kernel thread to the init task.
-- *
-- * If a kernel thread is launched as a result of a system call, or if
-- * it ever exits, it should generally reparent itself to init so that
-- * it is correctly cleaned up on exit.
-+/*
-+ * double_rq_lock - safely lock two runqueues
-  *
-- * The various task state such as scheduling policy and priority may have
-- * been inherited fro a user process, so we reset them to sane values here.
-+ * Note this does not disable interrupts like task_rq_lock,
-+ * you need to do so manually before calling.
-+ */
-+static inline void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)
-+{
-+      if (rq1 == rq2)
-+              spin_lock(&rq1->lock);
-+      else {
-+              if (rq1 < rq2) {
-+                      spin_lock(&rq1->lock);
-+                      spin_lock(&rq2->lock);
-+              } else {
-+                      spin_lock(&rq2->lock);
-+                      spin_lock(&rq1->lock);
-+              }
-+      }
-+}
-+
-+/*
-+ * double_rq_unlock - safely unlock two runqueues
-  *
-- * NOTE that reparent_to_init() gives the caller full capabilities.
-+ * Note this does not restore interrupts like task_rq_unlock,
-+ * you need to do so manually after calling.
-  */
--void reparent_to_init(void)
-+static inline void double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2)
- {
--      struct task_struct *this_task = current;
-+      spin_unlock(&rq1->lock);
-+      if (rq1 != rq2)
-+              spin_unlock(&rq2->lock);
-+}
--      write_lock_irq(&tasklist_lock);
-+void __init init_idle(task_t *idle, int cpu)
-+{
-+      runqueue_t *idle_rq = cpu_rq(cpu), *rq = cpu_rq(idle->cpu);
-+      unsigned long flags;
--      /* Reparent to init */
--      REMOVE_LINKS(this_task);
--      this_task->p_pptr = child_reaper;
--      this_task->p_opptr = child_reaper;
--      SET_LINKS(this_task);
-+      __save_flags(flags);
-+      __cli();
-+      double_rq_lock(idle_rq, rq);
-+
-+      idle_rq->curr = idle_rq->idle = idle;
-+      deactivate_task(idle, rq);
-+      idle->array = NULL;
-+      idle->prio = MAX_PRIO;
-+      idle->state = TASK_RUNNING;
-+      idle->cpu = cpu;
-+      double_rq_unlock(idle_rq, rq);
-+      set_tsk_need_resched(idle);
-+      __restore_flags(flags);
-+}
-+
-+extern void init_timervecs(void);
-+extern void timer_bh(void);
-+extern void tqueue_bh(void);
-+extern void immediate_bh(void);
-+
-+void __init sched_init(void)
-+{
-+      runqueue_t *rq;
-+      int i, j, k;
-+
-+      for (i = 0; i < NR_CPUS; i++) {
-+              prio_array_t *array;
--      /* Set the exit signal to SIGCHLD so we signal init on exit */
--      this_task->exit_signal = SIGCHLD;
-+              rq = cpu_rq(i);
-+              rq->active = rq->arrays;
-+              rq->expired = rq->arrays + 1;
-+              spin_lock_init(&rq->lock);
-+#ifdef CONFIG_SMP
-+              INIT_LIST_HEAD(&rq->migration_queue);
-+#endif
--      /* We also take the runqueue_lock while altering task fields
--       * which affect scheduling decisions */
--      spin_lock(&runqueue_lock);
-+              for (j = 0; j < 2; j++) {
-+                      array = rq->arrays + j;
-+                      for (k = 0; k < MAX_PRIO; k++) {
-+                              INIT_LIST_HEAD(array->queue + k);
-+                              __clear_bit(k, array->bitmap);
-+                      }
-+                      // delimiter for bitsearch
-+                      __set_bit(MAX_PRIO, array->bitmap);
-+              }
-+      }
-+      /*
-+       * We have to do a little magic to get the first
-+       * process right in SMP mode.
-+       */
-+      rq = this_rq();
-+      rq->curr = current;
-+      rq->idle = current;
-+      current->cpu = smp_processor_id();
-+      wake_up_process(current);
--      this_task->ptrace = 0;
--      this_task->nice = DEF_NICE;
--      this_task->policy = SCHED_OTHER;
--      /* cpus_allowed? */
--      /* rt_priority? */
--      /* signals? */
--      this_task->cap_effective = CAP_INIT_EFF_SET;
--      this_task->cap_inheritable = CAP_INIT_INH_SET;
--      this_task->cap_permitted = CAP_FULL_SET;
--      this_task->keep_capabilities = 0;
--      memcpy(this_task->rlim, init_task.rlim, sizeof(*(this_task->rlim)));
--      switch_uid(INIT_USER);
-+      init_timervecs();
-+      init_bh(TIMER_BH, timer_bh);
-+      init_bh(TQUEUE_BH, tqueue_bh);
-+      init_bh(IMMEDIATE_BH, immediate_bh);
--      spin_unlock(&runqueue_lock);
--      write_unlock_irq(&tasklist_lock);
-+      /*
-+       * The boot idle thread does lazy MMU switching as well:
-+       */
-+      atomic_inc(&init_mm.mm_count);
-+      enter_lazy_tlb(&init_mm, current, smp_processor_id());
- }
-+#if CONFIG_SMP
-+
- /*
-- *    Put all the gunge required to become a kernel thread without
-- *    attached user resources in one place where it belongs.
-- */
-+ * This is how migration works:
-+ *
-+ * 1) we queue a migration_req_t structure in the source CPU's
-+ *    runqueue and wake up that CPU's migration thread.
-+ * 2) we down() the locked semaphore => thread blocks.
-+ * 3) migration thread wakes up (implicitly it forces the migrated
-+ *    thread off the CPU)
-+ * 4) it gets the migration request and checks whether the migrated
-+ *    task is still in the wrong runqueue.
-+ * 5) if it's in the wrong runqueue then the migration thread removes
-+ *    it and puts it into the right queue.
-+ * 6) migration thread up()s the semaphore.
-+ * 7) we wake up and the migration is done.
-+ */
-+
-+typedef struct {
-+      struct list_head list;
-+      task_t *task;
-+      struct completion done;
-+} migration_req_t;
--void daemonize(void)
-+/*
-+ * Change a given task's CPU affinity. Migrate the process to a
-+ * proper CPU and schedule it away if the CPU it's executing on
-+ * is removed from the allowed bitmask.
-+ *
-+ * NOTE: the caller must have a valid reference to the task, the
-+ * task must not exit() & deallocate itself prematurely.  The
-+ * call is not atomic; no spinlocks may be held.
-+ */
-+void set_cpus_allowed(task_t *p, unsigned long new_mask)
- {
--      struct fs_struct *fs;
-+      unsigned long flags;
-+      migration_req_t req;
-+      runqueue_t *rq;
-+      new_mask &= cpu_online_map;
-+      if (!new_mask)
-+              BUG();
-+      rq = task_rq_lock(p, &flags);
-+      p->cpus_allowed = new_mask;
-       /*
--       * If we were started as result of loading a module, close all of the
--       * user space pages.  We don't need them, and if we didn't close them
--       * they would be locked into memory.
-+       * Can the task run on the task's current CPU? If not then
-+       * migrate the process off to a proper CPU.
-        */
--      exit_mm(current);
-+      if (new_mask & (1UL << p->cpu)) {
-+              task_rq_unlock(rq, &flags);
-+              return;
-+      }
--      current->session = 1;
--      current->pgrp = 1;
--      current->tty = NULL;
-+      /*
-+       * If the task is not on a runqueue, then it is safe to
-+       * simply update the task's cpu field.
-+       */
-+      if (!p->array && (p != rq->curr)) {
-+              p->cpu = __ffs(p->cpus_allowed);
-+              task_rq_unlock(rq, &flags);
-+              return;
-+      }
--      /* Become as one with the init task */
-+      init_completion(&req.done);
-+      req.task = p;
-+      list_add(&req.list, &rq->migration_queue);
-+      task_rq_unlock(rq, &flags);
-+      wake_up_process(rq->migration_thread);
--      exit_fs(current);       /* current->fs->count--; */
--      fs = init_task.fs;
--      current->fs = fs;
--      atomic_inc(&fs->count);
--      exit_files(current);
--      current->files = init_task.files;
--      atomic_inc(&current->files->count);
-+      wait_for_completion(&req.done);
- }
--extern unsigned long wait_init_idle;
-+static __initdata int master_migration_thread;
--void __init init_idle(void)
-+static int migration_thread(void * bind_cpu)
- {
--      struct schedule_data * sched_data;
--      sched_data = &aligned_data[smp_processor_id()].schedule_data;
-+      int cpu = cpu_logical_map((int) (long) bind_cpu);
-+      struct sched_param param = { sched_priority: MAX_RT_PRIO-1 };
-+      runqueue_t *rq;
-+      int ret;
--      if (current != &init_task && task_on_runqueue(current)) {
--              printk("UGH! (%d:%d) was on the runqueue, removing.\n",
--                      smp_processor_id(), current->pid);
--              del_from_runqueue(current);
-+      daemonize();
-+      sigfillset(&current->blocked);
-+      set_fs(KERNEL_DS);
-+      /*
-+       * The first migration thread is started on the boot CPU, it
-+       * migrates the other migration threads to their destination CPUs.
-+       */
-+      if (cpu != master_migration_thread) {
-+              while (!cpu_rq(master_migration_thread)->migration_thread)
-+                      yield();
-+              set_cpus_allowed(current, 1UL << cpu);
-       }
--      sched_data->curr = current;
--      sched_data->last_schedule = get_cycles();
--      clear_bit(current->processor, &wait_init_idle);
--}
-+      printk("migration_task %d on cpu=%d\n", cpu, smp_processor_id());
-+      ret = setscheduler(0, SCHED_FIFO, &param);
--extern void init_timervecs (void);
-+      rq = this_rq();
-+      rq->migration_thread = current;
--void __init sched_init(void)
--{
--      /*
--       * We have to do a little magic to get the first
--       * process right in SMP mode.
--       */
--      int cpu = smp_processor_id();
--      int nr;
-+      sprintf(current->comm, "migration_CPU%d", smp_processor_id());
--      init_task.processor = cpu;
-+      for (;;) {
-+              runqueue_t *rq_src, *rq_dest;
-+              struct list_head *head;
-+              int cpu_src, cpu_dest;
-+              migration_req_t *req;
-+              unsigned long flags;
-+              task_t *p;
--      for(nr = 0; nr < PIDHASH_SZ; nr++)
--              pidhash[nr] = NULL;
-+              spin_lock_irqsave(&rq->lock, flags);
-+              head = &rq->migration_queue;
-+              current->state = TASK_INTERRUPTIBLE;
-+              if (list_empty(head)) {
-+                      spin_unlock_irqrestore(&rq->lock, flags);
-+                      schedule();
-+                      continue;
-+              }
-+              req = list_entry(head->next, migration_req_t, list);
-+              list_del_init(head->next);
-+              spin_unlock_irqrestore(&rq->lock, flags);
-+
-+              p = req->task;
-+              cpu_dest = __ffs(p->cpus_allowed);
-+              rq_dest = cpu_rq(cpu_dest);
-+repeat:
-+              cpu_src = p->cpu;
-+              rq_src = cpu_rq(cpu_src);
-+
-+              local_irq_save(flags);
-+              double_rq_lock(rq_src, rq_dest);
-+              if (p->cpu != cpu_src) {
-+                      double_rq_unlock(rq_src, rq_dest);
-+                      local_irq_restore(flags);
-+                      goto repeat;
-+              }
-+              if (rq_src == rq) {
-+                      p->cpu = cpu_dest;
-+                      if (p->array) {
-+                              deactivate_task(p, rq_src);
-+                              activate_task(p, rq_dest);
-+                      }
-+              }
-+              double_rq_unlock(rq_src, rq_dest);
-+              local_irq_restore(flags);
--      init_timervecs();
-+              complete(&req->done);
-+      }
-+}
--      init_bh(TIMER_BH, timer_bh);
--      init_bh(TQUEUE_BH, tqueue_bh);
--      init_bh(IMMEDIATE_BH, immediate_bh);
-+void __init migration_init(void)
-+{
-+      int cpu;
--      /*
--       * The boot idle thread does lazy MMU switching as well:
--       */
--      atomic_inc(&init_mm.mm_count);
--      enter_lazy_tlb(&init_mm, current, cpu);
-+      master_migration_thread = smp_processor_id();
-+      current->cpus_allowed = 1UL << master_migration_thread;
-+
-+      for (cpu = 0; cpu < smp_num_cpus; cpu++) {
-+              if (kernel_thread(migration_thread, (void *) (long) cpu,
-+                              CLONE_FS | CLONE_FILES | CLONE_SIGNAL) < 0)
-+                      BUG();
-+      }
-+      current->cpus_allowed = -1L;
-+
-+      for (cpu = 0; cpu < smp_num_cpus; cpu++)
-+              while (!cpu_rq(cpu_logical_map(cpu))->migration_thread)
-+                      schedule_timeout(2);
- }
-+
-+#endif /* CONFIG_SMP */
-diff -urN linux-2.4.24.org/kernel/signal.c linux-2.4.24/kernel/signal.c
---- linux-2.4.24.org/kernel/signal.c   2004-02-04 20:47:26.821945338 +0100
-+++ linux-2.4.24/kernel/signal.c       2004-02-04 20:52:55.082667907 +0100
-@@ -507,12 +507,9 @@
-        * process of changing - but no harm is done by that
-        * other than doing an extra (lightweight) IPI interrupt.
-        */
--      spin_lock(&runqueue_lock);
--      if (task_has_cpu(t) && t->processor != smp_processor_id())
--              smp_send_reschedule(t->processor);
--      spin_unlock(&runqueue_lock);
--#endif /* CONFIG_SMP */
--
-+      if ((t->state == TASK_RUNNING) && (t->cpu != cpu()))
-+              kick_if_running(t);
-+#endif
-       if (t->state & TASK_INTERRUPTIBLE) {
-               wake_up_process(t);
-               return;
-diff -urN linux-2.4.24.org/kernel/softirq.c linux-2.4.24/kernel/softirq.c
---- linux-2.4.24.org/kernel/softirq.c  2004-02-04 20:47:27.211864234 +0100
-+++ linux-2.4.24/kernel/softirq.c      2004-02-04 20:52:55.110662084 +0100
-@@ -364,13 +364,13 @@
-       int cpu = cpu_logical_map(bind_cpu);
-       daemonize();
--      current->nice = 19;
-+      set_user_nice(current, 19);
-       sigfillset(&current->blocked);
-       /* Migrate to the right CPU */
--      current->cpus_allowed = 1UL << cpu;
--      while (smp_processor_id() != cpu)
--              schedule();
-+      set_cpus_allowed(current, 1UL << cpu);
-+      if (cpu() != cpu)
-+              BUG();
-       sprintf(current->comm, "ksoftirqd_CPU%d", bind_cpu);
-@@ -395,7 +395,7 @@
-       }
- }
--static __init int spawn_ksoftirqd(void)
-+__init int spawn_ksoftirqd(void)
- {
-       int cpu;
-diff -urN linux-2.4.24.org/kernel/sys.c linux-2.4.24/kernel/sys.c
---- linux-2.4.24.org/kernel/sys.c      2004-02-04 20:47:26.739962391 +0100
-+++ linux-2.4.24/kernel/sys.c  2004-02-04 20:52:55.139656054 +0100
-@@ -239,10 +239,10 @@
-               }
-               if (error == -ESRCH)
-                       error = 0;
--              if (niceval < p->nice && !capable(CAP_SYS_NICE))
-+              if (niceval < task_nice(p) && !capable(CAP_SYS_NICE))
-                       error = -EACCES;
-               else
--                      p->nice = niceval;
-+                      set_user_nice(p, niceval);
-       }
-       read_unlock(&tasklist_lock);
-@@ -268,7 +268,7 @@
-               long niceval;
-               if (!proc_sel(p, which, who))
-                       continue;
--              niceval = 20 - p->nice;
-+              niceval = 20 - task_nice(p);
-               if (niceval > retval)
-                       retval = niceval;
-       }
-diff -urN linux-2.4.24.org/kernel/timer.c linux-2.4.24/kernel/timer.c
---- linux-2.4.24.org/kernel/timer.c    2004-02-04 20:47:27.115884198 +0100
-+++ linux-2.4.24/kernel/timer.c        2004-02-04 20:52:55.155652727 +0100
-@@ -25,6 +25,8 @@
- #include <asm/uaccess.h>
-+struct kernel_stat kstat;
-+
- /*
-  * Timekeeping variables
-  */
-@@ -598,25 +600,7 @@
-       int cpu = smp_processor_id(), system = user_tick ^ 1;
-       update_one_process(p, user_tick, system, cpu);
--      if (p->pid) {
--              if (--p->counter <= 0) {
--                      p->counter = 0;
--                      /*
--                       * SCHED_FIFO is priority preemption, so this is 
--                       * not the place to decide whether to reschedule a
--                       * SCHED_FIFO task or not - Bhavesh Davda
--                       */
--                      if (p->policy != SCHED_FIFO) {
--                              p->need_resched = 1;
--                      }
--              }
--              if (p->nice > 0)
--                      kstat.per_cpu_nice[cpu] += user_tick;
--              else
--                      kstat.per_cpu_user[cpu] += user_tick;
--              kstat.per_cpu_system[cpu] += system;
--      } else if (local_bh_count(cpu) || local_irq_count(cpu) > 1)
--              kstat.per_cpu_system[cpu] += system;
-+      scheduler_tick(user_tick, system);
- }
- /*
-@@ -624,17 +608,7 @@
-  */
- static unsigned long count_active_tasks(void)
- {
--      struct task_struct *p;
--      unsigned long nr = 0;
--
--      read_lock(&tasklist_lock);
--      for_each_task(p) {
--              if ((p->state == TASK_RUNNING ||
--                   (p->state & TASK_UNINTERRUPTIBLE)))
--                      nr += FIXED_1;
--      }
--      read_unlock(&tasklist_lock);
--      return nr;
-+      return (nr_running() + nr_uninterruptible()) * FIXED_1;
- }
- /*
-@@ -827,6 +801,89 @@
- #endif
-+static void process_timeout(unsigned long __data)
-+{
-+      wake_up_process((task_t *)__data);
-+}
-+
-+/**
-+ * schedule_timeout - sleep until timeout
-+ * @timeout: timeout value in jiffies
-+ *
-+ * Make the current task sleep until @timeout jiffies have
-+ * elapsed. The routine will return immediately unless
-+ * the current task state has been set (see set_current_state()).
-+ *
-+ * You can set the task state as follows -
-+ *
-+ * %TASK_UNINTERRUPTIBLE - at least @timeout jiffies are guaranteed to
-+ * pass before the routine returns. The routine will return 0
-+ *
-+ * %TASK_INTERRUPTIBLE - the routine may return early if a signal is
-+ * delivered to the current task. In this case the remaining time
-+ * in jiffies will be returned, or 0 if the timer expired in time
-+ *
-+ * The current task state is guaranteed to be TASK_RUNNING when this 
-+ * routine returns.
-+ *
-+ * Specifying a @timeout value of %MAX_SCHEDULE_TIMEOUT will schedule
-+ * the CPU away without a bound on the timeout. In this case the return
-+ * value will be %MAX_SCHEDULE_TIMEOUT.
-+ *
-+ * In all cases the return value is guaranteed to be non-negative.
-+ */
-+signed long schedule_timeout(signed long timeout)
-+{
-+      struct timer_list timer;
-+      unsigned long expire;
-+
-+      switch (timeout)
-+      {
-+      case MAX_SCHEDULE_TIMEOUT:
-+              /*
-+               * These two special cases are useful to be comfortable
-+               * in the caller. Nothing more. We could take
-+               * MAX_SCHEDULE_TIMEOUT from one of the negative value
-+               * but I' d like to return a valid offset (>=0) to allow
-+               * the caller to do everything it want with the retval.
-+               */
-+              schedule();
-+              goto out;
-+      default:
-+              /*
-+               * Another bit of PARANOID. Note that the retval will be
-+               * 0 since no piece of kernel is supposed to do a check
-+               * for a negative retval of schedule_timeout() (since it
-+               * should never happens anyway). You just have the printk()
-+               * that will tell you if something is gone wrong and where.
-+               */
-+              if (timeout < 0)
-+              {
-+                      printk(KERN_ERR "schedule_timeout: wrong timeout "
-+                             "value %lx from %p\n", timeout,
-+                             __builtin_return_address(0));
-+                      current->state = TASK_RUNNING;
-+                      goto out;
-+              }
-+      }
-+
-+      expire = timeout + jiffies;
-+
-+      init_timer(&timer);
-+      timer.expires = expire;
-+      timer.data = (unsigned long) current;
-+      timer.function = process_timeout;
-+
-+      add_timer(&timer);
-+      schedule();
-+      del_timer_sync(&timer);
-+
-+      timeout = expire - jiffies;
-+
-+ out:
-+      return timeout < 0 ? 0 : timeout;
-+}
-+
- /* Thread ID - the internal kernel "pid" */
- asmlinkage long sys_gettid(void)
- {
-@@ -873,4 +930,3 @@
-       }
-       return 0;
- }
--
-diff -urN linux-2.4.24.org/mm/oom_kill.c linux-2.4.24/mm/oom_kill.c
---- linux-2.4.24.org/mm/oom_kill.c     2004-02-04 20:47:28.626569974 +0100
-+++ linux-2.4.24/mm/oom_kill.c 2004-02-04 20:57:30.567369583 +0100
-@@ -86,7 +86,7 @@
-        * Niced processes are most likely less important, so double
-        * their badness points.
-        */
--      if (p->nice > 0)
-+      if (task_nice(p) > 0)
-               points *= 2;
-       /*
-@@ -150,7 +150,7 @@
-        * all the memory it needs. That way it should be able to
-        * exit() and clear out its resources quickly...
-        */
--      p->counter = 5 * HZ;
-+      p->time_slice = HZ;
-       p->flags |= PF_MEMALLOC | PF_MEMDIE;
-       /* This process has hardware access, be more careful. */
-diff -urN linux-2.4.24.org/net/bluetooth/bnep/core.c linux-2.4.24/net/bluetooth/bnep/core.c
---- linux-2.4.24.org/net/bluetooth/bnep/core.c 2004-02-04 20:48:41.535404904 +0100
-+++ linux-2.4.24/net/bluetooth/bnep/core.c     2004-02-04 20:52:55.199643577 +0100
-@@ -460,7 +460,7 @@
-         sigfillset(&current->blocked);
-       flush_signals(current);
--      current->nice = -15;
-+      set_user_nice(current, -15);
-         set_fs(KERNEL_DS);
-diff -urN linux-2.4.24.org/net/bluetooth/cmtp/core.c linux-2.4.24/net/bluetooth/cmtp/core.c
---- linux-2.4.24.org/net/bluetooth/cmtp/core.c 2004-02-04 20:48:41.311451486 +0100
-+++ linux-2.4.24/net/bluetooth/cmtp/core.c     2004-02-04 20:52:55.224638378 +0100
-@@ -298,7 +298,7 @@
-       sigfillset(&current->blocked);
-       flush_signals(current);
--      current->nice = -15;
-+      set_user_nice(current, -15);
-       set_fs(KERNEL_DS);
---- linux-2.4.33/arch/i386/kernel/i387.c.orig  2006-08-11 06:18:20.000000000 +0200
-+++ linux-2.4.33/arch/i386/kernel/i387.c       2006-08-16 16:03:30.925971000 +0200
-@@ -68,15 +68,18 @@
-  * FPU lazy state save handling.
-  */
-+unsigned long nr_context_switches(void);
-+
- static inline void __save_init_fpu( struct task_struct *tsk )
- {
-       if ( cpu_has_fxsr ) {
-+              unsigned int cswtch = nr_context_switches();
-               asm volatile( "fxsave %0"
-                             : "=m" (tsk->thread.i387.fxsave) );
-               if (tsk->thread.i387.fxsave.swd & (1<<7))
-                       asm volatile("fnclex");
-               /* AMD CPUs leak F?P. Clear it here */
--              asm volatile("ffree %%st(7) ; fildl %0" :: "m" (kstat.context_swtch));
-+              asm volatile("ffree %%st(7) ; fildl %0" :: "m" (cswtch));
-       } else {
-               asm volatile( "fnsave %0 ; fwait"
-                             : "=m" (tsk->thread.i387.fsave) );
diff --git a/linux-2.4.3-pcipenalty.patch b/linux-2.4.3-pcipenalty.patch
deleted file mode 100644 (file)
index 3d72900..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urNp linux-1090/arch/i386/kernel/pci-irq.c linux-1100/arch/i386/kernel/pci-irq.c
---- linux-1090/arch/i386/kernel/pci-irq.c      
-+++ linux-1100/arch/i386/kernel/pci-irq.c      
-@@ -36,7 +36,7 @@ unsigned int pcibios_irq_mask = 0xfff8;
- static int pirq_penalty[16] = {
-       1000000, 1000000, 1000000, 1000, 1000, 0, 1000, 1000,
--      0, 0, 0, 0, 1000, 100000, 100000, 100000
-+      0, 0, 0, 0, 2500, 100000, 100000, 100000
- };
- struct irq_router {
diff --git a/linux-2.4.7-suspend.patch b/linux-2.4.7-suspend.patch
deleted file mode 100644 (file)
index eb1641f..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-diff -urNp linux-1391/arch/i386/kernel/dmi_scan.c linux-1420/arch/i386/kernel/dmi_scan.c
---- linux-1391/arch/i386/kernel/dmi_scan.c     
-+++ linux-1420/arch/i386/kernel/dmi_scan.c     
-@@ -546,6 +546,22 @@ static __init int print_if_true(struct d
- }
- /*
-+ * Dell Inspiron 8000 APM BIOS fails to correctly save and restore the
-+ * config space of some PCI devices.
-+ */
-+
-+static __init int broken_apm_pci_restore(struct dmi_blacklist *d)
-+{
-+#ifdef CONFIG_PCI
-+      extern int pci_bridge_force_restore;
-+
-+      printk(KERN_WARNING "%s detected. Forcing restore of PCI configuration space on APM resume.\n", d->ident);
-+      pci_bridge_force_restore = 1;
-+#endif
-+      return 0;
-+}
-+
-+/*
-  *    Process the DMI blacklists
-  */
-  
-@@ -871,6 +887,16 @@ static __initdata struct dmi_blacklist d
-                       MATCH(DMI_SYS_VENDOR, "IBM"),
-                       NO_MATCH, NO_MATCH, NO_MATCH
-                       } },
-+      { broken_apm_pci_restore, "Dell Inspiron 8000", {       /* Work around broken Dell BIOS */
-+                      MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-+                      MATCH(DMI_PRODUCT_NAME, "Inspiron 8000"),
-+                      NO_MATCH, NO_MATCH
-+                      } },
-+      { broken_apm_pci_restore, "Dell Inspiron 8100", {       /* Work around broken Dell BIOS */
-+                      MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-+                      MATCH(DMI_PRODUCT_NAME, "Inspiron 8100"),
-+                      NO_MATCH, NO_MATCH
-+                      } },
-       { NULL, }
- };
-diff -urNp linux-1391/drivers/pci/bridge.c linux-1420/drivers/pci/bridge.c
---- linux-1391/drivers/pci/bridge.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux-1420/drivers/pci/bridge.c    
-@@ -0,0 +1,149 @@
-+
-+/*
-+ *    Copyright (c) 2001 Red Hat, Inc. All rights reserved.
-+ *
-+ *    This software may be freely redistributed under the terms
-+ *    of the GNU public license.
-+ * 
-+ *    You should have received a copy of the GNU General Public License
-+ *    along with this program; if not, write to the Free Software
-+ *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ *
-+ *    Author: Arjan van de Ven <arjanv@redhat.com>
-+ *
-+ */
-+
-+
-+/*
-+ * Generic PCI driver for PCI bridges for powermanagement purposes
-+ *
-+ */
-+
-+#include <linux/config.h> 
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/pci.h>
-+#include <linux/init.h>
-+
-+static struct pci_device_id bridge_pci_table[] __devinitdata = {
-+        {/* handle all PCI bridges */
-+      class:          ((PCI_CLASS_BRIDGE_PCI << 8) | 0x00),
-+      class_mask:     ~0,
-+      vendor:         PCI_ANY_ID,
-+      device:         PCI_ANY_ID,
-+      subvendor:      PCI_ANY_ID,
-+      subdevice:      PCI_ANY_ID,
-+      },
-+        {0,},
-+};
-+
-+static int bridge_probe(struct pci_dev *pdev, const struct pci_device_id *id);
-+static int pci_bridge_save_state_bus(struct pci_bus *bus, int force);
-+int pci_generic_resume_compare(struct pci_dev *pdev);
-+
-+int pci_bridge_force_restore = 0;
-+
-+
-+
-+
-+static int __init bridge_setup(char *str)
-+{
-+      if (!strcmp(str,"force"))
-+              pci_bridge_force_restore = 1;
-+      else if (!strcmp(str,"noforce"))
-+              pci_bridge_force_restore = 0;
-+      return 0;
-+}
-+
-+__setup("resume=",bridge_setup);
-+
-+
-+static int pci_bridge_save_state_bus(struct pci_bus *bus, int force)
-+{
-+      struct list_head *list;
-+      int error = 0;
-+
-+      list_for_each(list, &bus->children) {
-+              error = pci_bridge_save_state_bus(pci_bus_b(list),force);
-+              if (error) return error;
-+      }
-+      list_for_each(list, &bus->devices) {
-+              pci_generic_suspend_save(pci_dev_b(list),0);
-+      }
-+      return 0;
-+}
-+
-+
-+static int pci_bridge_restore_state_bus(struct pci_bus *bus, int force)
-+{
-+      struct list_head *list;
-+      int error = 0;
-+      static int printed_warning=0;
-+
-+      list_for_each(list, &bus->children) {
-+              error = pci_bridge_restore_state_bus(pci_bus_b(list),force);
-+              if (error) return error;
-+      }
-+      list_for_each(list, &bus->devices) {
-+              if (force)
-+                      pci_generic_resume_restore(pci_dev_b(list));
-+              else {
-+                      error = pci_generic_resume_compare(pci_dev_b(list));
-+                      if (error && !printed_warning++) { 
-+                              printk(KERN_WARNING "resume warning: bios doesn't restore PCI state properly\n");
-+                              printk(KERN_WARNING "resume warning: if resume failed, try booting with resume=force\n");
-+                      }
-+                      if (error)
-+                              return error;
-+              }
-+      }
-+      return 0;
-+}
-+
-+static int bridge_suspend(struct pci_dev *dev, u32 force)
-+{
-+      pci_generic_suspend_save(dev,force);
-+      if (dev->subordinate)
-+              pci_bridge_save_state_bus(dev->subordinate,force);
-+      return 0;
-+}
-+
-+static int bridge_resume(struct pci_dev *dev)
-+{
-+
-+      pci_generic_resume_restore(dev);
-+      if (dev->subordinate)
-+              pci_bridge_restore_state_bus(dev->subordinate,pci_bridge_force_restore);
-+      return 0;
-+}
-+
-+
-+MODULE_DEVICE_TABLE(pci, bridge_pci_table);
-+static struct pci_driver bridge_ops = {
-+        name:           "PCI Bridge",   
-+        id_table:       bridge_pci_table,
-+        probe:          bridge_probe,    
-+        suspend:      bridge_suspend,
-+        resume:       bridge_resume
-+};
-+
-+static int __devinit bridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
-+{
-+      return 0;
-+}
-+
-+static int __init bridge_init(void) 
-+{
-+        pci_register_driver(&bridge_ops);
-+        return 0;
-+}
-+
-+static void __exit bridge_exit(void)
-+{
-+        pci_unregister_driver(&bridge_ops);
-+} 
-+
-+
-+module_init(bridge_init)
-+module_exit(bridge_exit)
-+
-diff -urNp linux-1391/drivers/pci/Makefile linux-1420/drivers/pci/Makefile
---- linux-1391/drivers/pci/Makefile    
-+++ linux-1420/drivers/pci/Makefile    
-@@ -13,7 +13,7 @@ O_TARGET := driver.o
- export-objs := pci.o
--obj-$(CONFIG_PCI) += pci.o quirks.o compat.o names.o
-+obj-$(CONFIG_PCI) += pci.o quirks.o compat.o names.o bridge.o 
- obj-$(CONFIG_PROC_FS) += proc.o
- ifndef CONFIG_SPARC64
-diff -urNp linux-1391/drivers/pci/pci.c linux-1420/drivers/pci/pci.c
---- linux-1391/drivers/pci/pci.c       
-+++ linux-1420/drivers/pci/pci.c       
-@@ -380,6 +380,48 @@ pci_enable_device_bars(struct pci_dev *d
-       return 0;
- }
-+int 
-+pci_compare_state(struct pci_dev *dev, u32 *buffer)
-+{
-+      int i;
-+      unsigned int temp;
-+
-+      if (buffer) {
-+              for (i = 0; i < 16; i++) {
-+                      pci_read_config_dword(dev,i*4,&temp);
-+                      if (temp!=buffer[i])
-+                              return 1;
-+              }
-+      }
-+      return 0;
-+}
-+
-+int pci_generic_suspend_save(struct pci_dev *pdev, u32 state)
-+{
-+      if (pdev)
-+              pci_save_state(pdev,pdev->saved_state);
-+      return 0;
-+}
-+
-+int pci_generic_resume_restore(struct pci_dev *pdev)
-+{
-+      if (pdev)
-+              pci_restore_state(pdev,pdev->saved_state);
-+      return 0;               
-+}
-+
-+int pci_generic_resume_compare(struct pci_dev *pdev)
-+{
-+      int retval=0;
-+      if (pdev)
-+              retval = pci_compare_state(pdev,pdev->saved_state);
-+      return retval;          
-+}
-+
-+EXPORT_SYMBOL_GPL(pci_generic_suspend_save);
-+EXPORT_SYMBOL_GPL(pci_generic_resume_restore);
-+EXPORT_SYMBOL_GPL(pci_generic_resume_compare);
-+
- /**
-  * pci_enable_device - Initialize device before it's used by a driver.
-  * @dev: PCI device to be initialized
-diff -urNp linux-1391/include/linux/pci.h linux-1420/include/linux/pci.h
---- linux-1391/include/linux/pci.h     
-+++ linux-1420/include/linux/pci.h     
-@@ -410,6 +410,7 @@ struct pci_dev {
-       char            name[90];       /* device name */
-       char            slot_name[8];   /* slot name */
-+      u32             saved_state[16]; /* for saving the config space before suspend */
-       int             active;         /* ISAPnP: device is active */
-       int             ro;             /* ISAPnP: read only */
-       unsigned short  regs;           /* ISAPnP: supported registers */
-@@ -612,6 +613,8 @@ int pci_save_state(struct pci_dev *dev, 
- int pci_restore_state(struct pci_dev *dev, u32 *buffer);
- int pci_set_power_state(struct pci_dev *dev, int state);
- int pci_enable_wake(struct pci_dev *dev, u32 state, int enable);
-+int pci_generic_suspend_save(struct pci_dev *pdev, u32 state);
-+int pci_generic_resume_restore(struct pci_dev *pdev);
- /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
-@@ -707,6 +710,7 @@ static inline int pci_restore_state(stru
- static inline int pci_set_power_state(struct pci_dev *dev, int state) { return 0; }
- static inline int pci_enable_wake(struct pci_dev *dev, u32 state, int enable) { return 0; }
-+
- #define pci_for_each_dev(dev) \
-       for(dev = NULL; 0; )
diff --git a/linux-53c7,8xx-build.fix b/linux-53c7,8xx-build.fix
deleted file mode 100644 (file)
index c9ca22f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -Nur linux/drivers/scsi.org/M linux/drivers/scsi/M
---- linux/drivers/scsi.org/M   Thu Jan  1 01:00:00 1970
-+++ linux/drivers/scsi/M       Wed Nov 14 11:24:56 2001
-@@ -0,0 +1,33 @@
-+
-+all_targets: 53c8xx_d.h 53c7xx_d.h sim710_d.h 53c700_d.h
-+
-+include ../../Rules.make
-+
-+PERL=/usr/bin/perl
-+
-+53c8xx_d.h: 53c7,8xx.scr script_asm.pl
-+      ln -sf 53c7,8xx.scr fake8.c
-+      $(CPP) $(CPPFLAGS) -traditional -DCHIP=810 fake8.c | grep -v '^#' | $(PERL) script_asm.pl 
-+      mv script.h 53c8xx_d.h
-+      mv scriptu.h 53c8xx_u.h
-+      rm fake8.c
-+
-+53c7xx_d.h: 53c7xx.scr script_asm.pl
-+      ln -sf 53c7xx.scr fake7.c
-+      $(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family
-+      mv script.h 53c7xx_d.h
-+      mv scriptu.h 53c7xx_u.h
-+      rm fake7.c
-+
-+sim710_d.h: sim710.scr script_asm.pl
-+      ln -sf sim710.scr fake7.c
-+      $(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family
-+      mv script.h sim710_d.h
-+      mv scriptu.h sim710_u.h
-+      rm fake7.c
-+
-+53c700_d.h: 53c700.scr script_asm.pl
-+      $(PERL) -s script_asm.pl -ncr7x0_family < 53c700.scr
-+      rm -f scriptu.h
-+      mv script.h 53c700_d.h
-+
diff --git a/linux-PPC-SMP.patch b/linux-PPC-SMP.patch
deleted file mode 100644 (file)
index dabc6ed..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- include/asm-ppc/smp.h.org  Sat Apr 20 15:44:45 2002
-+++ include/asm-ppc/smp.h      Sat Apr 20 16:12:54 2002
-@@ -15,6 +15,7 @@
- #include <linux/config.h>
- #include <linux/kernel.h>
-+#include <linux/threads.h>
- #ifdef CONFIG_SMP
diff --git a/linux-mtd-missing-include-fix-2.4.7-pre6.patch b/linux-mtd-missing-include-fix-2.4.7-pre6.patch
deleted file mode 100644 (file)
index f57f425..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/linux/mtd/mtd.h.org        Sun Jul 15 10:52:26 2001
-+++ include/linux/mtd/mtd.h    Sun Jul 15 10:49:12 2001
-@@ -13,6 +13,8 @@
- #include <linux/module.h>
- #include <linux/uio.h>
-+#include <linux/interrupt.h>
-+
- #endif /* __KERNEL__ */
- struct erase_info_user {
diff --git a/linux-proc_net_dev-counter-fix.patch b/linux-proc_net_dev-counter-fix.patch
deleted file mode 100644 (file)
index d32a98f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- linux-2.5.0or/net/core/dev.c       Thu Nov  8 00:39:36 2001
-+++ linux/net/core/dev.c       Tue Dec 11 21:30:49 2001
-@@ -1688,7 +1688,7 @@
-       int size;
-
-       if (stats)
--              size = sprintf(buffer, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu %8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
-+              size = sprintf(buffer, "%6s:%14llu %7lu %4lu %4lu %4lu %5lu %10lu %9lu %14llu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
-                  dev->name,
-                  stats->rx_bytes,
-                  stats->rx_packets, stats->rx_errors,
---- linux-2.5.0or/include/linux/netdevice.h    Thu Nov 22 21:47:09 2001
-+++ linux/include/linux/netdevice.h    Tue Dec 11 21:24:54 2001
-@@ -97,8 +97,9 @@
- {
-       unsigned long   rx_packets;             /* total packets received       */
-       unsigned long   tx_packets;             /* total packets transmitted    */
--      unsigned long   rx_bytes;               /* total bytes received         */
--      unsigned long   tx_bytes;               /* total bytes transmitted      */
-+        /* rx and tx counters fixed up to 64-bit */
-+        long long       rx_bytes;               /* total bytes received         */
-+        long long       tx_bytes;               /* total bytes transmitted      */
-       unsigned long   rx_errors;              /* bad packets received         */
-       unsigned long   tx_errors;              /* packet transmit problems     */
-       unsigned long   rx_dropped;             /* no space in linux buffers    */
-
diff --git a/linux-raid5-spare-counting.patch b/linux-raid5-spare-counting.patch
deleted file mode 100644 (file)
index 9721894..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urN linux-2.4.21.org/drivers/md/raid5.c linux-2.4.21/drivers/md/raid5.c
---- linux-2.4.21.org/drivers/md/raid5.c        Tue Aug 12 22:22:46 2003
-+++ linux-2.4.21/drivers/md/raid5.c    Tue Aug 12 22:54:34 2003
-@@ -1365,6 +1365,7 @@
-       struct disk_info *disk;
-       struct md_list_head *tmp;
-       int start_recovery = 0;
-+      int spares = 0;
-       MOD_INC_USE_COUNT;
-@@ -1462,6 +1463,7 @@
-                       disk->write_only = 0;
-                       disk->spare = 1;
-                       disk->used_slot = 1;
-+                      spares ++;
-               }
-       }
-@@ -1554,6 +1556,7 @@
-               }
-       }
-       sb->active_disks = conf->working_disks;
-+      sb->spare_disks = spares;
-       if (sb->active_disks == sb->raid_disks)
-               printk("raid5: raid level %d set md%d active with %d out of %d devices, algorithm %d\n", conf->level, mdidx(mddev), sb->active_disks, sb->raid_disks, conf->algorithm);
diff --git a/linux-scsi-debug-bug.patch b/linux-scsi-debug-bug.patch
deleted file mode 100644 (file)
index 1384c43..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- drivers/scsi/scsi_merge.c  Fri Feb  9 11:30:23 2001
-+++ drivers/scsi/scsi_merge.c  Wed Feb 28 11:55:48 2001
-@@ -90,7 +90,7 @@
-       printk("nr_segments is %x\n", req->nr_segments);
-       printk("counted segments is %x\n", segments);
-       printk("Flags %d %d\n", use_clustering, dma_host);
--      for (bh = req->bh; bh->b_reqnext != NULL; bh = bh->b_reqnext) 
-+      for (bh = req->bh; bh != NULL; bh = bh->b_reqnext)
-       {
-               printk("Segment 0x%p, blocks %d, addr 0x%lx\n",
-                      bh,
-
-
diff --git a/linux-sound_core.patch b/linux-sound_core.patch
deleted file mode 100644 (file)
index 56c3c1a..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
---- linux-2.4.10/drivers/sound/sound_core.c    Mon Oct  8 16:33:19 2001
-+++ linux-2.4.10.SuSE+LL/drivers/sound/sound_core.c    Mon Oct  8 17:17:49 2001
-@@ -231,23 +231,28 @@
-  
- int register_sound_special(struct file_operations *fops, int unit)
- {
--      char *name;
-+      char *name, name_ext[32];
-+      int suffix = 0;
--      switch (unit) {
-+      switch (unit & 15) {
-           case 0:
-               name = "mixer";
-+              suffix = 1;
-               break;
-           case 1:
-               name = "sequencer";
-               break;
-           case 2:
--              name = "midi00";
-+              sprintf(name_ext, "midi0%d", unit / SOUND_STEP);
-+              name = name_ext;
-               break;
-           case 3:
-               name = "dsp";
-+              suffix = 1;
-               break;
-           case 4:
-               name = "audio";
-+              suffix = 1;
-               break;
-           case 5:
-               name = "unknown5";
-@@ -263,25 +268,34 @@
-               break;
-           case 9:
-               name = "dmmidi";
-+              suffix = 1;
-               break;
-           case 10:
-               name = "dmfm";
-+              suffix = 1;
-               break;
-           case 11:
-               name = "unknown11";
-               break;
-           case 12:
-               name = "adsp";
-+              suffix = 1;
-               break;
-           case 13:
-               name = "amidi";
-+              suffix = 1;
-               break;
-           case 14:
-               name = "admmidi";
-+              suffix = 1;
-               break;
-           default:
-               name = "unknown";
-               break;
-+      }
-+      if (suffix && unit >= SOUND_STEP) {
-+          sprintf(name_ext, "%s%d", name, unit / SOUND_STEP);
-+          name = name_ext;
-       }
-       return sound_insert_unit(&chains[unit&15], fops, -1, unit, unit+1,
-                                name, S_IRUSR | S_IWUSR);
diff --git a/nwd-2.4.21.patch b/nwd-2.4.21.patch
deleted file mode 100644 (file)
index 7abe97c..0000000
+++ /dev/null
@@ -1,1885 +0,0 @@
-diff -Nur linux-2.4.20.org/Documentation/Configure.help linux-2.4.20/Documentation/Configure.help
---- linux-2.4.20.org/Documentation/Configure.help      Thu Mar 13 09:16:32 2003
-+++ linux-2.4.20/Documentation/Configure.help  Thu Mar 13 09:20:23 2003
-@@ -583,6 +583,35 @@
-   if you want to do performance tuning, by tweaking the elevator, e.g.
-   If unsure, say N.
-+  
-+Network disk device support
-+CONFIG_BLK_DEV_NWD 
-+  If you say Y here, your kernel will be able to act as network disk 
-+  client and provide you with network disk block devices. This is 
-+  similar to NBD in that the driver forwards block device requests 
-+  over network to server, which performs the operations on files on 
-+  its local filesystem and returns results back to the client. The 
-+  driver will enlarge your kernel by about 8 KiB.
-+  
-+  Unlike NBD though, NWD it uses RPC to transfer block device requests 
-+  to the server. The network disk devices can be also used for root 
-+  filesystems, making it easy to setup diskless environment -- all you 
-+  need is kernel image with network drivers. The RPC transport protocol
-+  can be either TCP/IP or UDP/IP, the latter being the default one and 
-+  probably the one more suitable for reliable, local area networks. The
-+  driver utilizes built-in kernel SunRPC infrastructure, thus saying Y 
-+  here will force SunRPC into your kernel, which will enlarge it by 
-+  about 65 KiB.
-+  
-+  Consult <file:Documentation/nwd.txt> for more information concerning 
-+  the kernel client driver and user space server.
-+  
-+  If you want to compile this driver as a module (i.e. code which can be
-+  inserted in and removed from the running kernel whenever you want),
-+  say M here and read <file:Documentation/modules.txt>. The module will be
-+  called nwd.o.
-+
-+  If unsure, say N.
- ATA/IDE/MFM/RLL support
- CONFIG_IDE
-diff -Nur linux-2.4.20.org/Makefile linux-2.4.20/Makefile
---- linux-2.4.20.org/Makefile  Thu Mar 13 09:16:33 2003
-+++ linux-2.4.20/Makefile      Thu Mar 13 09:20:23 2003
-@@ -187,6 +187,7 @@
- DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a
- DRIVERS-$(CONFIG_VT) += drivers/video/video.o
- DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
-+DRIVERS-$(CONFIG_BLK_DEV_NWD) += drivers/block/nwd/nwd.o
- DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
- DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
- DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
-diff -Nur linux-2.4.20.org/drivers/block/Config.in linux-2.4.20/drivers/block/Config.in
---- linux-2.4.20.org/drivers/block/Config.in   Thu Mar 13 09:16:27 2003
-+++ linux-2.4.20/drivers/block/Config.in       Thu Mar 13 09:20:23 2003
-@@ -46,6 +46,7 @@
-    
- tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
- dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
-+dep_tristate 'Network disk device support' CONFIG_BLK_DEV_NWD $CONFIG_NET
- tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
- if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
-diff -Nur linux-2.4.20.org/drivers/block/Makefile linux-2.4.20/drivers/block/Makefile
---- linux-2.4.20.org/drivers/block/Makefile    Thu Mar 13 09:16:27 2003
-+++ linux-2.4.20/drivers/block/Makefile        Thu Mar 13 09:20:23 2003
-@@ -34,5 +34,6 @@
- obj-$(CONFIG_CDROM_PKTCDVD)   += pktcdvd.o
- subdir-$(CONFIG_PARIDE) += paride
-+subdir-$(CONFIG_BLK_DEV_NWD)  += nwd
- include $(TOPDIR)/Rules.make
-diff -Nur linux-2.4.20.org/fs/Config.in linux-2.4.20/fs/Config.in
---- linux-2.4.20.org/fs/Config.in      Thu Mar 13 09:16:25 2003
-+++ linux-2.4.20/fs/Config.in  Thu Mar 13 09:20:23 2003
-@@ -150,17 +150,25 @@
-    dep_mbool '  Provide NFS server over TCP support (EXPERIMENTAL)' CONFIG_NFSD_TCP $CONFIG_NFSD $CONFIG_EXPERIMENTAL
-    if [ "$CONFIG_NFS_FS" = "y" -o "$CONFIG_NFSD" = "y" ]; then
--      define_tristate CONFIG_SUNRPC y
-       define_tristate CONFIG_LOCKD y
-    else
-       if [ "$CONFIG_NFS_FS" = "m" -o "$CONFIG_NFSD" = "m" ]; then
--       define_tristate CONFIG_SUNRPC m
-        define_tristate CONFIG_LOCKD m
--   else
--       define_tristate CONFIG_SUNRPC n
--       define_tristate CONFIG_LOCKD n
-+      else
-+         define_tristate CONFIG_LOCKD n
-       fi
-    fi
-+   
-+   if [ "$CONFIG_NFS_FS" = "y" -o "$CONFIG_NFSD" = "y" -o "$CONFIG_BLK_DEV_NWD" = "y" ]; then
-+     define_tristate CONFIG_SUNRPC y
-+   else
-+     if [ "$CONFIG_NFS_FS" = "m" -o "$CONFIG_NFSD" = "m" -o "$CONFIG_BLK_DEV_NWD" = "m" ]; then
-+       define_tristate CONFIG_SUNRPC m
-+     else
-+       define_tristate CONFIG_SUNRPC n
-+     fi
-+   fi
-+   
-    if [ "$CONFIG_NFSD_V3" = "y" -o "$CONFIG_NFS_V3" = "y" ]; then
-      define_bool CONFIG_LOCKD_V4 y
-    fi
-diff -Nur linux-2.4.20.org/include/linux/blk.h linux-2.4.20/include/linux/blk.h
---- linux-2.4.20.org/include/linux/blk.h       Sat Aug  3 02:39:45 2002
-+++ linux-2.4.20/include/linux/blk.h   Thu Mar 13 09:20:23 2003
-@@ -295,6 +295,12 @@
- #define DEVICE_REQUEST do_nbd_request
- #define DEVICE_NR(device) (MINOR(device))
-+#elif (MAJOR_NR == NWD_MAJOR)
-+
-+#define DEVICE_NAME "nwd"
-+#define DEVICE_REQUEST nwd_request
-+#define DEVICE_NR(device) (MINOR(device))
-+
- #elif (MAJOR_NR == MDISK_MAJOR)
- #define DEVICE_NAME "mdisk"
-diff -Nur linux-2.4.20.org/include/linux/major.h linux-2.4.20/include/linux/major.h
---- linux-2.4.20.org/include/linux/major.h     Thu Mar 13 09:16:27 2003
-+++ linux-2.4.20/include/linux/major.h Thu Mar 13 09:20:23 2003
-@@ -87,6 +87,8 @@
- #define LVM_BLK_MAJOR 58      /* Logical Volume Manager */
-+#define NWD_MAJOR     62      /* Network disk driver  */
-+
- #define SCSI_DISK1_MAJOR      65
- #define SCSI_DISK2_MAJOR      66
- #define SCSI_DISK3_MAJOR      67
-diff -Nur linux-2.4.20.org/init/do_mounts.c linux-2.4.20/init/do_mounts.c
---- linux-2.4.20.org/init/do_mounts.c  Thu Mar 13 09:16:31 2003
-+++ linux-2.4.20/init/do_mounts.c      Thu Mar 13 09:20:23 2003
-@@ -240,6 +240,9 @@
-       { "ftld", 0x2c18 },
-       { "mtdblock", 0x1f00 },
-       { "nb", 0x2b00 },
-+#ifdef CONFIG_BLK_DEV_NWD
-+        { "nwd", 0x3E00 },
-+#endif
-       { NULL, 0 }
- };
-diff -Nur linux-2.4.20.org/init/main.c linux-2.4.20/init/main.c
---- linux-2.4.20.org/init/main.c       Thu Mar 13 09:16:32 2003
-+++ linux-2.4.20/init/main.c   Thu Mar 13 09:20:23 2003
-@@ -103,6 +103,7 @@
- #endif
- extern void ecard_init(void);
-+extern int nwd_boot_init(void);
- #if defined(CONFIG_SYSVIPC)
- extern void ipc_init(void);
-@@ -536,6 +537,12 @@
-       start_context_thread();
-       do_initcalls();
-+#ifdef CONFIG_BLK_DEV_NWD
-+      /* Must be done after NET/RPC initialization */
-+      if (nwd_boot_init())
-+              panic ("Unable to setup network disk root device.");
-+#endif
-+
- #ifdef CONFIG_IRDA
-       irda_proto_init();
-       irda_device_init(); /* Must be done after protocol initialization */
-diff -Nur linux-2.4.20.org/drivers/block/nwd/Makefile linux-2.4.20/drivers/block/nwd/Makefile
---- linux-2.4.20.org/drivers/block/nwd/Makefile        Thu Jan  1 01:00:00 1970
-+++ linux-2.4.20/drivers/block/nwd/Makefile    Mon Sep  3 21:04:07 2001
-@@ -0,0 +1,17 @@
-+#
-+# Makefile for the Network disk client driver (NWD)
-+#
-+# Note 1! Dependencies are done automagically by 'make dep', which also
-+# removes any old dependencies. DON'T put your own dependencies here
-+# unless it's something special (ie not a .c file).
-+#
-+# Note 2! The CFLAGS definitions are now in the main makefile...
-+#
-+#
-+
-+O_TARGET := nwd.o
-+
-+obj-y                         += nwd_clt.o nwd_xdr.o
-+obj-$(CONFIG_BLK_DEV_NWD)     += $(O_TARGET)
-+
-+include $(TOPDIR)/Rules.make
-diff -Nur linux-2.4.20.org/drivers/block/nwd/nwd_clt.c linux-2.4.20/drivers/block/nwd/nwd_clt.c
---- linux-2.4.20.org/drivers/block/nwd/nwd_clt.c       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.20/drivers/block/nwd/nwd_clt.c   Fri Sep 14 10:51:32 2001
-@@ -0,0 +1,1034 @@
-+/*
-+ * Network disk client
-+ * Kernel block device driver
-+ *
-+ * Copyright (c) 1996 Petr Salinger
-+ * Copyright (c) 1999 Libor Bus <l.bus@sh.cvut.cz>
-+ * Copyright (c) 2001 Lubomir Bulej <pallas@kadan.cz>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ */
-+
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/errno.h>
-+
-+#include <linux/net.h>                        /* struct net_proto for inet.h  */
-+#include <linux/inet.h>                       /* in_aton, in_ntoa             */
-+
-+#include <linux/init.h>                       /* __init, __exit and stuff     */
-+#include <linux/slab.h>                       /* kmalloc, kfree               */
-+#include <linux/reboot.h>             /* register_reboot_notifier     */
-+#include <linux/devfs_fs_kernel.h>    /* devfs_register/unregister    */
-+
-+#include <linux/sunrpc/clnt.h>                /* rpc_call, xprt stuff, etc.   */
-+
-+#include <asm/uaccess.h>              /* verify_area, get/put_user    */
-+
-+#define MAJOR_NR NWD_MAJOR            /* required for blk.h           */
-+#include <linux/blk.h>                        /* block device macros          */
-+#include <linux/blkpg.h>              /* blk_ioctl                    */
-+
-+#include <linux/nwd.h>
-+#include "nwd_xdr.h"
-+#include "nwd_dbg.h"
-+
-+
-+/*****************************************************************************\
-+| PRIVATE GLOBALS                                                             |
-+\*****************************************************************************/
-+
-+static int *          nwd_sizes;                      /* block device sizes in KiB    */
-+static int *          nwd_blksizes;                   /* device block/sector sizes    */
-+
-+static int            nwd_maxdevs = NWD_MAX_DEVICES;  /* max number of devices        */
-+static nwd_device_t * nwd_devices;                    /* device structures            */
-+static struct semaphore       nwd_mxdev;                      /* whole device structure mutex */
-+
-+static devfs_handle_t devfs_handle;                   /* devfs directory handle       */
-+
-+
-+/*****************************************************************************\
-+| DEVICE OPERATIONS                                                           |
-+\*****************************************************************************/
-+   
-+static 
-+int nwd_disconnect (nwd_device_t * device)
-+{     
-+      if (device->client == NULL)
-+              return 0;
-+      if (rpc_shutdown_client (device->client) != 0)
-+              eprintk ("unable to shutdown RPC client for device %d\n", device->devnum);
-+                      
-+      /* disconnected device must have device->client == NULL */
-+      nwd_sizes [device->devnum] = 0;
-+      device->client = NULL;
-+      return 0;
-+} /* nwd_disconnect */
-+
-+
-+static 
-+int nwd_connect_opt (nwd_device_t * device, int ver, int proto)
-+{
-+      int                     error;
-+      char *                  pname;
-+      struct rpc_xprt *       p_xprt;
-+      nwd_lookupres           lookup_res;
-+
-+      /* refuse to connect on already connected device */
-+      if (device->client != NULL)
-+              return -EISCONN;
-+
-+                      
-+      /* make string with server name */
-+      memset (device->sname, 0, NWD_MAX_SNLEN);
-+      strncpy (device->sname, in_ntoa (device->server.saddr.sin_addr.s_addr), NWD_MAX_SNLEN);
-+      pname = (proto == IPPROTO_TCP) ? "TCP" : "UDP";
-+
-+
-+      /* create protocol */
-+      p_xprt = xprt_create_proto (proto, & device->server.saddr, NULL);
-+      if (p_xprt == NULL) {
-+              eprintk ("could not create RPC/%s transport\n", pname);
-+              return -EACCES;
-+      }
-+
-+      
-+      /* create client & set options */
-+      device->client = rpc_create_client (p_xprt, device->sname, & nwd_program, ver, RPC_AUTH_NULL);
-+      if (device->client == NULL) {
-+              xprt_destroy (p_xprt);
-+              eprintk ("could not create RPC client\n");
-+              return -EACCES;
-+      }
-+
-+      device->client->cl_intr     = 1;
-+      device->client->cl_chatty   = 0;
-+      device->client->cl_autobind = 1;
-+      device->client->cl_softrtry = 1;
-+      
-+
-+      /* lookup file id on server & fill in device size in blocks */
-+      error = rpc_call (device->client, NWDPROC_LOOKUP, & device->server.devid, & lookup_res, 0);
-+      if (error < 0) {
-+              nwd_disconnect (device);
-+              eprintk ("lookup failed on device %d: version %d, proto %s, devid %d, error %d\n", 
-+                      device->devnum, ver, pname, device->server.devid, abs (error));
-+              return error;
-+      }
-+
-+      nwd_sizes [device->devnum] = lookup_res.size >> BLOCK_SIZE_BITS;
-+      device->remid = lookup_res.file;
-+      
-+      iprintk ("lookup successful on device %d: version %d, proto %s, remid %d, blocks %d\n",
-+              device->devnum, ver, pname, device->remid, nwd_sizes [device->devnum]);
-+      return 0;
-+} /* nwd_connect_opt */
-+
-+
-+static
-+int nwd_connect (nwd_device_t * device)
-+{
-+      int error;
-+      int proto = IPPROTO_UDP;
-+      
-+      /*
-+       * Try to connect using NWD protocol version 2 first.
-+       * If that fails, fall back to version 1.
-+       */
-+      proto = (device->options & NWD_OPT_PROTO_TCP) ? IPPROTO_TCP : IPPROTO_UDP;
-+      error = nwd_connect_opt (device, NWD_VERSION_2, proto);
-+      if (error == 0)
-+              return 0;
-+              
-+      return nwd_connect_opt (device, NWD_VERSION_1, proto);
-+} /* nwd_connect */
-+
-+
-+static
-+int nwd_dispose (nwd_device_t * device)
-+{
-+      nwd_res result;
-+      if (device->client == NULL)
-+              return -ENOTCONN;
-+              
-+      return rpc_call (device->client, NWDPROC_DISPOSE, & device->remid, & result, 0);
-+} /* nwd_dispose */
-+
-+
-+static
-+int nwd_sync (nwd_device_t * device)
-+{
-+      nwd_res result;
-+      if (device->client == NULL)
-+              return -ENOTCONN;
-+      if (device->client->cl_vers < 2)
-+              return 0;
-+              
-+      return rpc_call (device->client, NWDPROC_SYNC, & device->remid, & result, 0);
-+} /* nwd_sync */
-+
-+
-+/*****************************************************************************\
-+| REQUEST PROCESSING                                                          |
-+\*****************************************************************************/
-+
-+static inline
-+int nwd_devnum (kdev_t kdev)
-+{
-+      int devnum = DEVICE_NR (kdev);
-+      if (devnum >= nwd_maxdevs) {
-+              static int limit = 0;
-+              if (limit++ < 5)
-+                      wprintk ("invalid device number (%d)", devnum);
-+              
-+              return -1;
-+      }
-+      
-+      return devnum;
-+} /* nwd_devnum */
-+
-+
-+static
-+request_queue_t * nwd_find_queue (kdev_t kdev)
-+{
-+      int devnum = nwd_devnum (kdev);
-+      if (devnum == -1)
-+              return NULL;
-+              
-+      return & nwd_devices [devnum].queue;
-+} /* nwd_find_queue */
-+
-+
-+static inline
-+nwd_device_t * nwd_find_device (kdev_t kdev)
-+{
-+      int devnum = nwd_devnum (kdev);
-+      if (devnum == -1)
-+              return NULL;
-+
-+      return nwd_devices + devnum;
-+} /* nwd_find_device */
-+      
-+
-+static inline
-+int nwd_transfer (nwd_device_t * device, const struct request * req)
-+{
-+      u32             dgmlen;         /* datagram length in bytes     */
-+      u32             reqlen;         /* request length in bytes      */
-+      u64             offset;         /* request offset in bytes      */
-+      char *          buffer;
-+      
-+      /* request attributes */
-+      reqlen = req->current_nr_sectors << NWD_SEC_BITS;
-+      offset = (u64) req->sector << NWD_SEC_BITS;
-+      buffer = req->buffer;
-+
-+
-+      /* 
-+       * Split the request into chunks/datagrams handled by individual 
-+       * calls. For the request to be successful, all remote calls must
-+       * return without errors.
-+       */
-+      dgmlen = NWD_MAX_DGLEN;
-+      while (reqlen > 0) {
-+              int             result;         /* remote call result   */
-+              int             retries;        /* call retry counter   */
-+              nwd_res         res;            /* write result         */
-+              nwd_rwargs      args;           /* R/W arguments        */
-+              nwd_readres     rdres;          /* read result          */
-+
-+              if (reqlen < dgmlen)
-+                      dgmlen = reqlen;
-+                              
-+              /* remote call arguments */
-+              args.file   = device->remid;
-+              args.offset = offset;
-+              args.count  = dgmlen;
-+              args.buffer = buffer;
-+                      
-+              retries = 0;
-+retry_call:   switch (req->cmd) {
-+                      case READ:
-+                              result = rpc_call (device->client, NWDPROC_READ, & args, & rdres, 0);
-+                              break;
-+                                      
-+                      case WRITE:
-+                              result = rpc_call (device->client, NWDPROC_WRITE, & args, & res, 0);
-+                              break;
-+
-+                      default:
-+                              /* should not really happen */
-+                              eprintk ("invalid request command: %d\n", req->cmd);
-+                              return 0;
-+              } /* command switch */
-+
-+              
-+              /* 
-+               * Repeat the call in case of timeout. Prolong the timeout
-+               * for initial retries & bail out with error when the number
-+               * of retries reached its limit.
-+               */
-+              if (result == -ETIMEDOUT) {
-+                      if (retries == 0)
-+                              device->client->cl_timeout.to_initval <<= 1;
-+
-+                      if (retries++ < NWD_MAX_RETRIES) {
-+                              wprintk ("server not responding, retrying (%d)\n", retries);
-+                              goto retry_call;
-+                      }
-+              }
-+                      
-+              /* fail if errors persist (including too many timeouts) */
-+              if (result < 0) {
-+                      eprintk ("request for %ld sectors at %ld failed, error %d\n",
-+                              req->current_nr_sectors, req->sector, abs (result));
-+                      return 0;
-+              }
-+                      
-+                      
-+              /* next chunk */
-+              offset += dgmlen;
-+              buffer += dgmlen;
-+              reqlen -= dgmlen;
-+      } /* request loop */
-+
-+      return 1;
-+} /* nwd_transfer */
-+
-+
-+static 
-+void nwd_request (request_queue_t * rq)
-+{
-+      /* lookup device, io_request_lock held */
-+      struct request * req = blkdev_entry_next_request (& rq->queue_head);
-+      nwd_device_t * device = nwd_find_device (req->rq_dev);
-+      if (device == NULL)
-+              goto fail_request;
-+      if (device->client == NULL)
-+              goto fail_request;      
-+      
-+      /* 
-+       * Process the request(s). The assumption behind this code is
-+       * that the rpc_call will sleep while waiting for RPC response 
-+       * (correct me if I'm wrong, please), therefore we drop the 
-+       * io_request_lock to allow processing of other requests and
-+       * also (if rpc_call sleeps) because we must not hold it.
-+       */
-+      while (! list_empty (& rq->queue_head)) {
-+              int status;
-+              
-+              /* pull request from queue & release io_request_lock */
-+              req = blkdev_entry_next_request (& rq->queue_head);
-+              blkdev_dequeue_request (req);
-+              spin_unlock_irq (& io_request_lock);
-+              
-+              /* process buffers in the request */
-+              do {
-+                      status = nwd_transfer (device, req);
-+              } while (end_that_request_first (req, status, DEVICE_NAME));
-+              
-+              /* grab io_request_lock & finish the request */
-+              spin_lock_irq (& io_request_lock);
-+              end_that_request_last (req);
-+      } /* request loop */
-+      return;
-+
-+      
-+      /* 
-+       * Make the request fail if the device was not found
-+       * or the device was not connected.
-+       */
-+fail_request:
-+      while (end_that_request_first (req, 0, DEVICE_NAME));
-+      blkdev_dequeue_request (req);
-+      end_that_request_last (req);
-+} /* nwd_request */
-+                                      
-+      
-+/*****************************************************************************\
-+| BLOCK DEVICE OPERATIONS                                                     |
-+\*****************************************************************************/
-+
-+static 
-+int nwd_open (struct inode * inode, struct file * filp)
-+{
-+      int error;
-+      nwd_device_t * device = nwd_find_device (inode->i_rdev);
-+      if (device == NULL)
-+              return -ENODEV;
-+
-+      MOD_INC_USE_COUNT;
-+
-+
-+      /* 
-+       * The code for several ioctls requires that the ioctl issuer be the 
-+       * only one having the device opened. The code checks device->users 
-+       * so we must not change it behind its back.
-+       */
-+      error = down_interruptible (& device->mxctl);
-+      if (error) {
-+              MOD_DEC_USE_COUNT;
-+              return error;
-+      }
-+      
-+      device->users++;
-+      up (& device->mxctl);
-+      return 0;
-+} /* nwd_open */
-+
-+
-+static 
-+int nwd_release (struct inode * inode, struct file * filp)
-+{
-+      int             error;
-+      nwd_device_t *  device;
-+      
-+      device = nwd_find_device (inode->i_rdev);
-+      if (device == NULL)
-+              return -ENODEV;
-+
-+
-+      /*
-+       * Process NWD client options when last user releases the device. As 
-+       * in the case of nwd_open, we grab the device->mxctl mutex before 
-+       * updating device->users because we can sleep while issuing remote
-+       * calls, and don't want anybody opening the device at that time.
-+       *
-+       * We also don't want anyone changing the options under us.
-+       */
-+      error = down_interruptible (& device->mxctl);
-+      if (error)
-+              return error;
-+      
-+      device->users--;        
-+      if (device->users == 0 && device->client != NULL) {
-+              if (device->options & (NWD_OPT_DISPOSE | NWD_OPT_DISCONNECT))
-+                      invalidate_device (inode->i_rdev, 1);
-+                      
-+              /* get rid of changes made on device */
-+              if (device->options & NWD_OPT_DISPOSE) {
-+                      if (nwd_dispose (device))
-+                              wprintk ("failed to dispose changes on device %d\n", device->devnum);
-+              }
-+
-+              /* disconnect from server */    
-+              if (device->options & NWD_OPT_DISCONNECT)
-+                      nwd_disconnect (device);
-+      } /* release actions */
-+
-+      up (& device->mxctl);   
-+      MOD_DEC_USE_COUNT;
-+      return 0;
-+} /* nwd_release */
-+
-+
-+static
-+int nwd_check_server (nwd_peer_t * server, nwd_device_t * device)
-+{
-+      int devnum;
-+      
-+      /* skip INADDR_ANY servers telling us to disconnect only*/
-+      if (server->saddr.sin_addr.s_addr == INADDR_ANY)
-+              return 0;
-+      
-+      /* check other devices except the one we are setting peer on */
-+      for (devnum = 0; devnum < nwd_maxdevs; devnum++) {
-+              if (devnum == device->devnum)
-+                      continue;
-+              if (memcmp (server, & nwd_devices [devnum].server, sizeof (nwd_peer_t)) == 0)
-+                      return -EADDRINUSE;
-+      }
-+      
-+      return 0;
-+} /* nwd_check_server */
-+
-+
-+static
-+int nwd_ioctl (struct inode * inode, struct file * filp,
-+                    unsigned int cmd, unsigned long arg)
-+{
-+      int             error;
-+      long            longv;
-+      long *          longp;
-+      nwd_peer_t      server;
-+      nwd_device_t *  device;
-+      
-+      device = nwd_find_device (inode->i_rdev);
-+      if (device == NULL)
-+              return -ENODEV;
-+
-+
-+      longp = (long *) arg;
-+      switch (cmd) {
-+              case NWD_CTL_SETPEER:
-+              case NWD_CTL_DISPOSE:
-+                      /*
-+                       * First, the user must have sufficient privileges to
-+                       * set/change peer or dispose changes on the device.
-+                       */
-+                      if (! capable (CAP_SYS_ADMIN))
-+                              return -EPERM;
-+                              
-+                      error = verify_area (VERIFY_READ, longp, sizeof (nwd_peer_t));
-+                      if (error)
-+                              return error;
-+
-+                      /*
-+                       * Second, make sure nobody is going to open the device
-+                       * while we are doing this. We also make sure to be the
-+                       * only ones having the device opened -- we don't want 
-+                       * to do this under active users.
-+                       */
-+                      error = down_interruptible (& device->mxctl);
-+                      if (error)
-+                              return error;
-+                              
-+                      error = -EBUSY;
-+                      if (device->users > 1)
-+                              goto setpeer_exit_mxctl;
-+
-+                              
-+                      /*
-+                       * Third, make sure we are the only ones doing this 
-+                       * kind of ioctl, because we want to check that we are 
-+                       * not setting server:devid pair used on other devices.
-+                       */
-+                      if (cmd == NWD_CTL_SETPEER) {
-+                              __copy_from_user (& server, longp, sizeof (nwd_peer_t));
-+                              
-+                              error = down_interruptible (& nwd_mxdev);
-+                              if (error)
-+                                      goto setpeer_exit_mxctl;
-+                                      
-+                              error = nwd_check_server (& server, device);
-+                              if (error)
-+                                      goto setpeer_exit_mxdev;
-+                      }
-+
-+
-+                      /*
-+                       * Fourth, invalidate the device. After that, no new
-+                       * requests should arrive because it's only us having
-+                       * the device opened. Then we can safely disconnect
-+                       * from server and connect to new one or dispose of
-+                       * changes made on the device.
-+                       */
-+                      invalidate_device (inode->i_rdev, 1);
-+                      
-+                      if (cmd == NWD_CTL_SETPEER) {
-+                              error = nwd_disconnect (device);
-+                              if (server.saddr.sin_addr.s_addr != INADDR_ANY) {
-+                                      device->server = server;
-+                                      error = nwd_connect (device);
-+                              }
-+                      } else
-+                              error = nwd_dispose (device);
-+                              
-+                              
-+              setpeer_exit_mxdev:
-+                      if (cmd == NWD_CTL_SETPEER)
-+                              up (& nwd_mxdev);
-+              setpeer_exit_mxctl:
-+                      up (& device->mxctl);
-+                      return error;
-+                      
-+                      
-+              case NWD_CTL_GETPEER:
-+                      error = verify_area (VERIFY_WRITE, longp, sizeof (nwd_peer_t));
-+                      if (error)
-+                              return error;
-+                              
-+                      /*
-+                       * Make sure the peer is not being changed.
-+                       */
-+                      error = down_interruptible (& device->mxctl);
-+                      if (error)
-+                              return error;
-+                       
-+                      /* report disconnected device to have peer 0.0.0.0 */
-+                      server = device->server;
-+                      if (device->client == NULL)
-+                              server.saddr.sin_addr.s_addr = INADDR_ANY;
-+
-+                      /* store peer structure to user space */
-+                      __copy_to_user (longp, & server, sizeof (nwd_peer_t));
-+                      up (& device->mxctl);
-+                      return 0;
-+                      
-+                      
-+              case NWD_CTL_SETOPTS:
-+                      /* must have sufficient privileges first */
-+                      if (! capable (CAP_SYS_ADMIN))
-+                              return -EPERM;
-+                              
-+                      /*
-+                       * Make sure we are not changing the options
-+                       * under anybody reading them.
-+                       */
-+                      error = down_interruptible (& device->mxctl);
-+                      if (error)
-+                              return error;
-+                              
-+                      device->options = arg;
-+                      up (& device->mxctl);
-+                      return error;
-+                      
-+                      
-+              case NWD_CTL_GETOPTS:
-+                      /*
-+                       * Make sure the options are not being changed.
-+                       */
-+                      error = down_interruptible (& device->mxctl);
-+                      if (error)
-+                              return error;
-+                      
-+                      error = put_user (device->options, longp);
-+                      up (& device->mxctl);
-+                      return error;
-+                      
-+              
-+              case BLKGETSIZE:
-+                      /*
-+                       * Make sure the size is not being changed.
-+                       */
-+                      error = down_interruptible (& device->mxctl);
-+                      if (error)
-+                              return error;
-+                              
-+                      /* return device size in sectors */
-+                      longv = nwd_sizes [device->devnum] << abs (NWD_B2S_SHIFT);
-+                      if (NWD_B2S_SHIFT < 0)
-+                              longv = nwd_sizes [device->devnum] >> abs (NWD_B2S_SHIFT);
-+                              
-+                      error = put_user (longv, longp);
-+                      up (& device->mxctl);
-+                      return error;
-+                      
-+                      
-+              case BLKRRPART:
-+                      /* partition re-reading is not supported */
-+                      return -ENOTTY;
-+                      
-+                      
-+              case BLKFLSBUF:
-+                      /* flush device locally */
-+                      error = blk_ioctl (inode->i_rdev, cmd, arg);
-+                      if (error)
-+                              return error;
-+                              
-+                      /* fsync remote file */
-+                      return nwd_sync (device);
-+                      
-+                      
-+              default:
-+                      /* let block layer handle other ioctls */
-+                      return blk_ioctl (inode->i_rdev, cmd, arg);
-+      } /* command switch */
-+      
-+      return -ENOTTY;
-+} /* nwd_ioctl */
-+
-+
-+static struct block_device_operations nwd_bdops = {
-+      open:           nwd_open,
-+      release:        nwd_release,
-+      ioctl:          nwd_ioctl,
-+}; /* nwd_bdops */
-+
-+
-+/*****************************************************************************\
-+| INITIALIZATION & FINALIZATION                                               |
-+\*****************************************************************************/
-+  
-+void nwd_cleanup (void)
-+{
-+      /* devfs cleanup */
-+      if (devfs_handle != NULL)
-+              devfs_unregister (devfs_handle);
-+              
-+      /* memory cleanup */
-+      if (nwd_blksizes != NULL)
-+              kfree (nwd_blksizes);           
-+      if (nwd_sizes != NULL)
-+              kfree (nwd_sizes);
-+      if (nwd_devices != NULL)
-+              kfree (nwd_devices);
-+              
-+      /* stop RPC I/O daemon */
-+      rpciod_down ();
-+} /* nwd_cleanup */
-+
-+
-+int __init nwd_init (void)
-+{
-+      int error;
-+      int devnum;
-+
-+      /* start RPC I/O daemon */
-+      error = rpciod_up ();
-+      if (error) {
-+              eprintk ("failed to start RPC I/O daemon\n");
-+              return error;
-+      }
-+      
-+      
-+      /* register block device and create devfs entries */
-+      error = devfs_register_blkdev (MAJOR_NR, DEVICE_NAME, & nwd_bdops);
-+      if (error) {
-+              eprintk ("unable to register as major %d block device\n", MAJOR_NR);
-+              nwd_cleanup ();
-+              return error;
-+      }
-+      
-+      devfs_handle = devfs_mk_dir (NULL, "nwd", NULL);
-+      devfs_register_series (devfs_handle, "%u", nwd_maxdevs, DEVFS_FL_DEFAULT,
-+              MAJOR_NR, 0, S_IFBLK | S_IRUSR | S_IWUSR, & nwd_bdops, NULL); 
-+      
-+
-+      /* alloc memory for device structures */
-+      if (nwd_maxdevs < 1 || nwd_maxdevs > 255) {
-+              wprintk ("invalid nwd_maxdevs (%d), using default (%d)\n", nwd_maxdevs, NWD_MAX_DEVICES);
-+              nwd_maxdevs = NWD_MAX_DEVICES;
-+      }
-+      
-+      nwd_devices  = kmalloc (nwd_maxdevs * sizeof (nwd_device_t), GFP_KERNEL);
-+      nwd_sizes    = kmalloc (nwd_maxdevs * sizeof (int), GFP_KERNEL);
-+      nwd_blksizes = kmalloc (nwd_maxdevs * sizeof (int), GFP_KERNEL);
-+      if (!nwd_devices || !nwd_sizes || !nwd_blksizes) {
-+              /* unregister device */
-+              if (devfs_unregister_blkdev (MAJOR_NR, DEVICE_NAME) != 0)
-+                      wprintk ("failed to unregister block device\n");
-+                      
-+              eprintk ("unable to allocate memory for device structures\n");
-+              nwd_cleanup ();
-+              return -ENOMEM;
-+      }
-+      
-+      
-+      /* 
-+       * Initialize device structures & queues. The assumption behind
-+       * multiple queues is that rpc_call sleeps while waiting for the
-+       * remote call to return (correct me if I'm wrong). Therefore with
-+       * per-device queues we can process requests to different devices 
-+       * (which might possibly send remote calls through different network 
-+       * interfaces) independently.
-+       */
-+      init_MUTEX (& nwd_mxdev);
-+      memset (nwd_sizes, 0, nwd_maxdevs * sizeof (nwd_sizes));
-+      memset (nwd_devices, 0, nwd_maxdevs * sizeof (nwd_device_t));
-+      for (devnum = 0; devnum < nwd_maxdevs; devnum++) {
-+              nwd_devices [devnum].devnum = devnum;
-+              nwd_devices [devnum].options = NWD_DFL_OPTIONS;
-+              
-+              nwd_blksizes [devnum] = NWD_SEC_SIZE;
-+              
-+              init_MUTEX (& nwd_devices [devnum].mxctl);
-+              
-+              blk_init_queue (& nwd_devices [devnum].queue, DEVICE_REQUEST);
-+              blk_queue_headactive (& nwd_devices [devnum].queue, 0);
-+      }
-+      
-+      blk_dev [MAJOR_NR].queue = & nwd_find_queue;
-+      blksize_size [MAJOR_NR] = nwd_blksizes;
-+      blk_size [MAJOR_NR] = nwd_sizes;
-+
-+
-+      /* register disks */                    
-+      for (devnum = 0; devnum < nwd_maxdevs; devnum++)
-+              register_disk (NULL, MKDEV (MAJOR_NR, devnum), 1, & nwd_bdops, 0);
-+
-+      iprintk ("version 1.4, block major %d, devices %d\n", MAJOR_NR, nwd_maxdevs);
-+      return 0;
-+} /* nwd_init */
-+
-+
-+void __exit nwd_exit (void)
-+{
-+      int devnum;
-+      
-+      /* must-have-been-initialized stuff */
-+      for (devnum = 0; devnum < nwd_maxdevs; devnum++)
-+              invalidate_device (MKDEV (MAJOR_NR, devnum), 1);
-+              
-+      if (devfs_unregister_blkdev (MAJOR_NR, DEVICE_NAME) != 0)
-+              wprintk ("failed to unregister block device\n");
-+      
-+      for (devnum = 0; devnum < nwd_maxdevs; devnum++)
-+              blk_cleanup_queue (& nwd_devices [devnum].queue);
-+
-+      blk_dev [MAJOR_NR].queue = NULL;
-+      blksize_size [MAJOR_NR] = NULL;
-+      blk_size [MAJOR_NR] = NULL;
-+      
-+      /* might-have-been-initialized stuff */
-+      nwd_cleanup ();
-+      iprintk ("driver module removed\n");
-+} /* nwd_exit */
-+
-+
-+
-+#ifdef MODULE
-+
-+/*****************************************************************************\
-+| BUILT-AS-MODULE INTERFACE                                                   |
-+\*****************************************************************************/
-+
-+MODULE_AUTHOR ("Petr Salinger, Libor Bus, Lubomir Bulej");
-+MODULE_DESCRIPTION ("Network Disk driver v1.4");
-+MODULE_SUPPORTED_DEVICE ("nwd");
-+
-+MODULE_PARM (nwd_maxdevs, "i");
-+MODULE_PARM_DESC (nwd_maxdevs, "Maximum number of NWD devices (1-255).");
-+
-+module_init (nwd_init);
-+module_exit (nwd_exit);
-+
-+#else /* not a module */
-+
-+/*****************************************************************************\
-+| BUILT-IN-KERNEL INTERFACE                                                   |
-+\*****************************************************************************/
-+
-+static int                    nwd_ini_port    __initdata = 0;
-+static int                    nwd_ini_dispose __initdata = NWD_DFL_INIDISPOSE;
-+static int                    nwd_ini_devid   __initdata = NWD_DFL_DEVID;
-+static int                    nwd_ini_options __initdata = NWD_DFL_OPTIONS;
-+static struct in_addr         nwd_ini_server  __initdata = { INADDR_ANY };
-+static struct notifier_block  nwd_notifier;
-+
-+
-+static 
-+int nwd_reboot (struct notifier_block * nb, unsigned long event, void * buf)
-+{
-+      struct inode    inode;
-+      nwd_device_t *  device;
-+
-+      /* ignore other devices & uninteresting events */
-+      if (MAJOR (ROOT_DEV) != NWD_MAJOR)
-+              return NOTIFY_DONE;
-+              
-+      if (event != SYS_RESTART && event != SYS_HALT && event != SYS_POWER_OFF)
-+              return NOTIFY_DONE;
-+              
-+      device = nwd_find_device (ROOT_DEV);
-+      if (device == NULL)
-+              return NOTIFY_BAD;
-+
-+              
-+      /* release the device before reboot */
-+      iprintk ("releasing root filesystem at %s (devid=%d)\n",
-+              in_ntoa (device->server.saddr.sin_addr.s_addr), 
-+              device->server.devid);
-+              
-+      inode.i_rdev = ROOT_DEV;
-+      nwd_release (& inode, NULL);
-+
-+
-+      /* unlink from notifier chain */
-+      unregister_reboot_notifier (& nwd_notifier);
-+      return NOTIFY_OK;
-+} /* nwd_reboot */
-+
-+
-+static struct notifier_block nwd_notifier = { 
-+      notifier_call:  nwd_reboot, 
-+      next:           NULL,
-+      priority:       0,
-+}; /* nwd_notifier */
-+
-+
-+int __init nwd_boot_init (void)
-+{
-+      int             error;
-+      nwd_res         result;
-+      nwd_device_t *  device;
-+      
-+      error = nwd_init ();
-+      if (error)
-+              return error;
-+              
-+      /* ignore other devices */
-+      if (MAJOR (ROOT_DEV) != NWD_MAJOR)
-+              return 0;
-+
-+      device = nwd_find_device (ROOT_DEV);
-+      if (device == NULL)
-+              return -ENODEV;
-+
-+
-+      /* fill the device structure with init info */
-+      device->options                 = nwd_ini_options;
-+      device->server.devid            = nwd_ini_devid;
-+      device->server.saddr.sin_family = AF_INET;
-+      device->server.saddr.sin_addr   = nwd_ini_server;
-+      device->server.saddr.sin_port   = htons (nwd_ini_port);
-+      
-+      if (nwd_ini_server.s_addr == INADDR_ANY) {
-+              wprintk ("server address not specified, cannot connect\n");
-+              return -EDESTADDRREQ;
-+      }
-+
-+
-+      /* connect to the server */
-+      iprintk ("connecting to server at %s:%d (devid=%d)\n", 
-+              in_ntoa (nwd_ini_server.s_addr), nwd_ini_port, nwd_ini_devid);
-+              
-+      error = nwd_connect (device);
-+      if (error)
-+              return error;
-+
-+      
-+      /* initial dispose requested? */                
-+      if (nwd_ini_dispose)
-+              nwd_dispose (device);
-+                      
-+      register_reboot_notifier (& nwd_notifier);
-+      return error;
-+} /* nwd_boot_init */
-+
-+
-+/*****************************************************************************\
-+| KERNEL BOOT COMMAND-LINE                                                    |
-+\*****************************************************************************/
-+
-+static
-+void __init nwd_adjust_bit (int mask, char * str, int * where)
-+{
-+      if ((*str == 'Y') || (*str == 'y') || (*str == '1'))
-+              * where |= mask;
-+      if ((*str == 'N') || (*str == 'n') || (*str == '0'))
-+              * where &= ~mask;
-+} /* nwd_adjust_bit */                
-+
-+
-+static 
-+int __init nwd_devid_setup (char * str)
-+{
-+      nwd_ini_devid = simple_strtol (str, NULL, 0);
-+      return 1;
-+} /* nwd_devid_setup */
-+
-+
-+static 
-+int __init nwd_server_setup (char * str)
-+{
-+      char * pstr;
-+      nwd_ini_server.s_addr = in_aton (str);
-+      if ((pstr = strchr (str, ':')))
-+              nwd_ini_port = simple_strtol (pstr + 1, NULL, 0);
-+
-+      return 1;
-+} /* nwd_server_setup */
-+
-+
-+static 
-+int __init nwd_maxdevs_setup (char * str)
-+{
-+      nwd_maxdevs = simple_strtol (str, NULL, 0);
-+      return 1;
-+} /* nwd_maxdevs_setup */
-+
-+
-+static 
-+int __init nwd_ini_dispose_setup (char * str)
-+{
-+      nwd_adjust_bit (1, str, & nwd_ini_dispose);
-+      return 1;               
-+} /* nwd_ini_dispose_setup */
-+
-+
-+static 
-+int __init nwd_opt_dispose_setup (char * str)
-+{
-+      nwd_adjust_bit (NWD_OPT_DISPOSE, str, & nwd_ini_options);
-+      return 1;
-+} /* nwd_opt_dispose_setup */
-+
-+
-+static 
-+int __init nwd_opt_disconnect_setup (char * str)
-+{
-+      nwd_adjust_bit (NWD_OPT_DISCONNECT, str, & nwd_ini_options);
-+      return 1;               
-+} /* nwd_opt_disconnect_setup */
-+
-+
-+static
-+int __init nwd_opt_proto_tcp_setup (char * str)
-+{
-+      nwd_adjust_bit (NWD_OPT_PROTO_TCP, str, & nwd_ini_options);
-+      return 1;
-+} /* nwd_opt_proto_tcp_setup */       
-+
-+
-+static struct nwd_option {
-+      char *  str;
-+      int     (* parse) (char *);
-+} nwd_options [] __initdata = {
-+      { "disconnect=",  nwd_opt_disconnect_setup },
-+      { "inidispose=", nwd_ini_dispose_setup },
-+      { "dispose=", nwd_opt_dispose_setup },
-+      { "maxdevs=", nwd_maxdevs_setup },
-+      { "server=", nwd_server_setup },
-+      { "devid=", nwd_devid_setup },
-+      { "tcp=", nwd_opt_proto_tcp_setup },
-+}; /* nwd_options */
-+
-+      
-+static
-+int __init nwd_parse_options (char * options)
-+{
-+      char * optstr;
-+      
-+      optstr = strsep (& options, ",");
-+      while (optstr != NULL) {
-+              int                     num;
-+              int                     len;
-+              struct nwd_option *     opt;
-+              
-+              for (num = 0; num < ARRAY_SIZE (nwd_options); num++) {
-+                      opt = nwd_options + num;
-+                      len = strlen (opt->str);
-+                      if (strncmp (optstr, opt->str, len) == 0)
-+                              break;
-+              }
-+              
-+              if (num < ARRAY_SIZE (nwd_options))
-+                      opt->parse (optstr + len);
-+                      
-+              optstr = strsep (& options, ",");
-+      }
-+      
-+      return 1;
-+} /* nwd_parse_options */
-+              
-+
-+/*****************************************************************************\
-+| COMMAND-LINE PARAMETER HOOKS                                                |
-+\*****************************************************************************/
-+
-+/* new style options */
-+__setup ("nwd:", nwd_parse_options);
-+
-+/* backward compatible options */
-+__setup ("nwddispose=", nwd_ini_dispose_setup);
-+__setup ("nwdserver=", nwd_server_setup);
-+__setup ("nwddevid=", nwd_devid_setup);
-+
-+#endif /* not a module */
-diff -Nur linux-2.4.20.org/drivers/block/nwd/nwd_dbg.h linux-2.4.20/drivers/block/nwd/nwd_dbg.h
---- linux-2.4.20.org/drivers/block/nwd/nwd_dbg.h       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.20/drivers/block/nwd/nwd_dbg.h   Fri Sep 14 11:01:53 2001
-@@ -0,0 +1,45 @@
-+/*
-+ * Network disk client
-+ * Debugging support
-+ *
-+ * Copyright (c) 1996 Petr Salinger
-+ * Copyright (c) 1999 Libor Bus <l.bus@sh.cvut.cz>
-+ * Copyright (c) 2001 Lubomir Bulej <pallas@kadan.cz>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ */
-+
-+#ifndef _NWD_DEBUG_H
-+#define _NWD_DEBUG_H
-+
-+#include <linux/kernel.h>
-+
-+#if 0
-+#define dprintk(args...)      printk (KERN_DEBUG "nwd: " args)
-+#define denterfn(args...)     printk (KERN_DEBUG "nwd: enter " __FUNCTION__ args)
-+#define       dleavefn(args...)       printk (KERN_DEBUG "nwd: leave " __FUNCTION__ args)
-+#else
-+#define dprintk(args...)
-+#define denterfn(args...)
-+#define dleavefn(args...)
-+#endif
-+
-+#define iprintk(args...)      printk (KERN_INFO "nwd: " args)
-+#define eprintk(args...)      printk (KERN_ERR "nwd: error: " args)
-+#define wprintk(args...)      printk (KERN_WARNING "nwd: warning: " args)
-+
-+#endif /* _NWD_DEBUG_H */
-diff -Nur linux-2.4.20.org/drivers/block/nwd/nwd_xdr.c linux-2.4.20/drivers/block/nwd/nwd_xdr.c
---- linux-2.4.20.org/drivers/block/nwd/nwd_xdr.c       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.20/drivers/block/nwd/nwd_xdr.c   Thu Mar 13 09:46:35 2003
-@@ -0,0 +1,370 @@
-+/*
-+ * Network disk client
-+ * Server RPC info, XDR routines
-+ *
-+ * Copyright (c) 1996 Petr Salinger
-+ * Copyright (c) 2001 Lubomir Bulej <pallas@kadan.cz>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/sunrpc/clnt.h>
-+
-+#include "nwd_xdr.h"
-+#include "nwd_dbg.h"
-+
-+
-+/* 
-+ * Space requirements for procedure arguments and 
-+ * return types, all sizes are in 32-bit words
-+ */
-+
-+#define NWD_null_sz           0
-+#define NWD_res_sz            1
-+#define NWD_handle_sz         1
-+#define NWD_readargs1_sz      3
-+#define NWD_readargs2_sz      4
-+#define NWD_readres_sz                2
-+#define NWD_writeargs1_sz     3
-+#define NWD_writeargs2_sz     4
-+#define NWD_lookupres1_sz     3
-+#define NWD_lookupres2_sz     4
-+
-+
-+/*****************************************************************************\
-+| XDR HELPER FUNCTIONS                                                        |
-+\*****************************************************************************/
-+
-+static inline
-+u32 * xdr_encode_int (u32 * p, __u32 val)
-+{
-+      * p++ = htonl (val);
-+      return p;
-+} /* xdr_encode_int */
-+
-+
-+static inline
-+u32 * xdr_decode_int (u32 * p, __u32 * val)
-+{
-+      * val = ntohl (* p++);
-+      return p;
-+} /* xdr_decode_int */
-+
-+
-+static inline
-+u32 * xdr_encode_h2int (u32 * p, __u64 val)
-+{
-+      * p++ = htonl (val & 0xFFFFFFFF);
-+      return p;
-+} /* xdr_encode_h2int */
-+
-+
-+static inline
-+u32 * xdr_decode_int2h (u32 * p, __u64 * val)
-+{
-+      * val = (__u64) ntohl (* p++);
-+      return p;
-+} /* xdr_decode_int2h */
-+
-+
-+/*****************************************************************************\
-+| NWD XDR FUNCTIONS                                                           |
-+\*****************************************************************************/
-+
-+static
-+int nwd_xdr_null (struct rpc_rqst * req, u32 * p, void * dummy)
-+{
-+      return -EIO;
-+} /* nwd_xdr_null */
-+
-+
-+/*
-+ * Decode result status
-+ */
-+ 
-+static
-+int nwd_xdr_res (struct rpc_rqst * req, u32 * p, nwd_res * res)
-+{
-+      p = xdr_decode_int (p, res);
-+      if (* res != NWD_OK)
-+              return -(* res);
-+      return 0;
-+} /* nwd_xdr_res */
-+
-+
-+/*
-+ * Encode remote file handle
-+ */
-+
-+static
-+int nwd_xdr_handle (struct rpc_rqst * req, u32 * p, nwd_handle * hnd)
-+{
-+      p = xdr_encode_int (p, * hnd);
-+      req->rq_slen = xdr_adjust_iovec (req->rq_svec, p);
-+      return 0;
-+} /* nwd_xdr_handle */
-+
-+
-+/*
-+ * Encode READ arguments
-+ *
-+ * We read data directly into request buffer so we setup the
-+ * recv iovec [1] buffer base to point at the request buffer.
-+ *
-+ * Note: auth->au_rslack contains estimate of the size of verf part of RPC
-+ * reply. Together with RPC reply header size and the size of (non file-data) 
-+ * fields of procedure result it determines the "offset" of file data in the
-+ * reply. Knowing that we can align the receive iovecs so that the file-data 
-+ * part of the reply ends up in the request buffer.
-+ */
-+ 
-+static inline
-+int nwd_xdr_readargs (struct rpc_rqst * req, u32 * p, nwd_rwargs * args, const int ver)
-+{
-+      struct rpc_auth * auth = req->rq_task->tk_auth;
-+      int replen = (RPC_REPHDRSIZE + auth->au_rslack + NWD_readres_sz) << 2;
-+      
-+      p = xdr_encode_int (p, args->file);
-+      if (ver == NWD_VERSION_1)
-+              p = xdr_encode_h2int (p, args->offset);
-+      else if (ver == NWD_VERSION_2)
-+              p = xdr_encode_hyper (p, args->offset);
-+      else {
-+              eprintk ("cannot encode readargs for version %d\n", ver);
-+              return -EINVAL;
-+      }
-+              
-+      p = xdr_encode_int (p, args->count);
-+      req->rq_slen = xdr_adjust_iovec (req->rq_svec, p);
-+
-+
-+      /* set up reply iovec */
-+      req->rq_rvec [0].iov_len = replen;
-+      req->rq_rvec [1].iov_len = args->count;
-+      req->rq_rvec [1].iov_base = args->buffer;
-+      req->rq_rlen = replen + args->count;
-+//    req->rq_rnr = 2;
-+      return 0;
-+} /* nwd_xdr_readargs */
-+
-+
-+static
-+int nwd_xdr_readargs1 (struct rpc_rqst * req, u32 * p, nwd_rwargs * args)
-+{
-+      return nwd_xdr_readargs (req, p, args, NWD_VERSION_1);
-+} /* nwd_xdr_readargs1 */
-+
-+
-+static
-+int nwd_xdr_readargs2 (struct rpc_rqst * req, u32 * p, nwd_rwargs * args)
-+{
-+      return nwd_xdr_readargs (req, p, args, NWD_VERSION_2);
-+} /* nwd_xdr_readargs2 */
-+
-+
-+/* 
-+ * Decode READ result 
-+ *
-+ * Note: The file data are optional and valid only if the operation 
-+ * result status was NWD_OK. In that case, the file data were written
-+ * directly into request buffer, for which recv iovec [1] was configured.
-+ */
-+
-+static
-+int nwd_xdr_readres (struct rpc_rqst * req, u32 * p, nwd_readres * res)
-+{
-+      int hdlen, recvd;
-+      
-+      p = xdr_decode_int (p, & res->status);
-+      if (res->status != NWD_OK)
-+              return -res->status;
-+              
-+      p = xdr_decode_int (p, & res->count);
-+      
-+      /* check length of returned data */
-+      hdlen = (u8 *) p - (u8 *) req->rq_rvec [0].iov_base;
-+      recvd = req->rq_rlen - hdlen;
-+      if (res->count > recvd) {
-+              wprintk ("server cheating in read reply: count (%d) > recvd (%d)\n", res->count, recvd);
-+              res->count = recvd;
-+      }
-+      
-+      return res->count;
-+} /* nwd_xdr_readres */
-+
-+
-+/* 
-+ * Encode WRITE arguments
-+ *
-+ * We send the data directly from request buffer, so we setup the
-+ * send iovec [1] buffer base to point at the request buffer.
-+ */
-+ 
-+static inline
-+int nwd_xdr_writeargs (struct rpc_rqst * req, u32 * p, nwd_rwargs * args, const int ver)
-+{
-+      p = xdr_encode_int (p, args->file);
-+      if (ver == NWD_VERSION_1)
-+              p = xdr_encode_h2int (p, args->offset);
-+      else if (ver == NWD_VERSION_2)
-+              p = xdr_encode_hyper (p, args->offset);
-+      else {
-+              eprintk ("cannot encode writeargs for version %d\n", ver);
-+              return -EINVAL;
-+      }
-+      
-+      p = xdr_encode_int (p, args->count);
-+      req->rq_slen = xdr_adjust_iovec (req->rq_svec, p);
-+      
-+      req->rq_svec [1].iov_base = args->buffer;
-+      req->rq_svec [1].iov_len = args->count;
-+      req->rq_slen += args->count;
-+//    req->rq_snr = 2;
-+      return 0;
-+} /* nwd_xdr_writeargs */
-+
-+
-+static
-+int nwd_xdr_writeargs1 (struct rpc_rqst * req, u32 * p, nwd_rwargs * args)
-+{
-+      return nwd_xdr_writeargs (req, p, args, NWD_VERSION_1);
-+} /* nwd_xdr_writeargs1 */
-+
-+
-+static
-+int nwd_xdr_writeargs2 (struct rpc_rqst * req, u32 * p, nwd_rwargs * args)
-+{
-+      return nwd_xdr_writeargs (req, p, args, NWD_VERSION_2);
-+} /* nwd_xdr_writeargs2 */
-+
-+
-+/* 
-+ * Decode LOOKUP result 
-+ *
-+ * Note: The file lookup info is optional and valid only if the 
-+ * operation result status was NWD_OK.
-+ */
-+
-+static inline
-+int nwd_xdr_lookupres (struct rpc_rqst * req, u32 * p, nwd_lookupres * res, const int ver)
-+{
-+      p = xdr_decode_int (p, & res->status);
-+      if (res->status != NWD_OK)
-+              return -res->status;
-+      
-+      p = xdr_decode_int (p, & res->file);
-+      if (ver == NWD_VERSION_1)
-+              p = xdr_decode_int2h (p, & res->size);
-+      else if (ver == NWD_VERSION_2)
-+              p = xdr_decode_hyper (p, & res->size);
-+      else {
-+              eprintk ("cannot decode lookupres for version %d\n", ver);
-+              return -EINVAL;
-+      }
-+      
-+      return 0;
-+} /* nwd_xdr_lookupres */
-+
-+
-+static
-+int nwd_xdr_lookupres1 (struct rpc_rqst * req, u32 * p, nwd_lookupres * res)
-+{
-+      return nwd_xdr_lookupres (req, p, res, NWD_VERSION_1);
-+} /* nwd_xdr_lookupres1 */
-+
-+
-+static
-+int nwd_xdr_lookupres2 (struct rpc_rqst * req, u32 * p, nwd_lookupres * res)
-+{
-+      return nwd_xdr_lookupres (req, p, res, NWD_VERSION_2);
-+} /* nwd_xdr_lookupres2 */
-+
-+
-+/*****************************************************************************\
-+| XDR ENCODE/DECODE STRUCTURES                                                |
-+\*****************************************************************************/
-+
-+#ifndef MAX
-+# define MAX(a, b)            (((a) > (b)) ? (a) : (b))
-+#endif
-+
-+/* 
-+ * Template for RPC procinfo structure
-+ */
-+
-+#define PROC(proc, atype, rtype)                                              \
-+{                                                                     \
-+      p_procname:     "nwdproc_" #proc,                               \
-+      p_encode:       (kxdrproc_t) nwd_xdr_##atype,                   \
-+      p_decode:       (kxdrproc_t) nwd_xdr_##rtype,                   \
-+      p_bufsiz:       MAX (NWD_##atype##_sz, NWD_##rtype##_sz) << 2,  \
-+      p_count:        0                                               \
-+}
-+
-+
-+static struct rpc_procinfo nwd_procedures_1 [] = {
-+      PROC (null,     null,           null),
-+      PROC (dispose,  handle,         res),
-+      PROC (read,     readargs1,      readres),
-+      PROC (write,    writeargs1,     res),
-+      PROC (lookup,   handle,         lookupres1)
-+}; /* nwd_procedures_1 */
-+
-+
-+static struct rpc_procinfo nwd_procedures_2 [] = {
-+      PROC (null,     null,           null),
-+      PROC (dispose,  handle,         res),
-+      PROC (read,     readargs2,      readres),
-+      PROC (write,    writeargs2,     res),
-+      PROC (lookup,   handle,         lookupres2),
-+      PROC (sync,     handle,         res)
-+}; /* nwd_procedures_2 */
-+
-+
-+static struct rpc_version nwd_version_1 = {
-+      number:         NWD_VERSION_1,
-+      nrprocs:        ARRAY_SIZE (nwd_procedures_1),
-+      procs:          nwd_procedures_1
-+}; /* nwd_version_1 */
-+
-+
-+static struct rpc_version nwd_version_2 = {
-+      number:         NWD_VERSION_2,
-+      nrprocs:        ARRAY_SIZE (nwd_procedures_2),
-+      procs:          nwd_procedures_2
-+}; /* nwd_version_2 */
-+
-+
-+
-+static struct rpc_version * nwd_versions [] = {
-+      NULL,
-+      & nwd_version_1,
-+      & nwd_version_2
-+}; /* nwd_versions */
-+
-+
-+static struct rpc_stat nwd_rpcstat;
-+
-+
-+struct rpc_program nwd_program = {
-+      name:           "nwd",
-+      number:         NWD_PROGRAM,
-+      nrvers:         ARRAY_SIZE (nwd_versions),
-+      version:        nwd_versions,
-+      stats:          & nwd_rpcstat
-+}; /* nwd_program */
-diff -Nur linux-2.4.20.org/drivers/block/nwd/nwd_xdr.h linux-2.4.20/drivers/block/nwd/nwd_xdr.h
---- linux-2.4.20.org/drivers/block/nwd/nwd_xdr.h       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.20/drivers/block/nwd/nwd_xdr.h   Sun Sep  9 23:22:15 2001
-@@ -0,0 +1,78 @@
-+/*
-+ * Network disk client
-+ * Server RPC info, XDR routines
-+ *
-+ * Copyright (c) 1996 Petr Salinger
-+ * Copyright (c) 1999 Libor Bus <l.bus@sh.cvut.cz>
-+ * Copyright (c) 2001 Lubomir Bulej <pallas@kadan.cz>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ */
-+
-+#ifndef _NWD_XDR_H
-+#define _NWD_XDR_H
-+
-+#include <linux/errno.h>
-+#include <linux/types.h>
-+
-+
-+#define NWD_PROGRAM           0x21050003
-+#define NWD_VERSION_1                 1
-+#define NWD_VERSION_2         2
-+
-+#define       NWD_OK                  0
-+#define NWD_ENOENT            ENOENT
-+#define NWD_EIO                       EIO
-+#define       NWD_EINVAL              EINVAL
-+#define NWD_ENOSPC            ENOSPC
-+
-+#define NWDPROC_NULL          0
-+#define NWDPROC_DISPOSE               1
-+#define NWDPROC_READ          2
-+#define NWDPROC_WRITE         3
-+#define NWDPROC_LOOKUP                4
-+#define NWDPROC_SYNC          5
-+
-+
-+typedef __s32  nwd_res;
-+typedef __s32  nwd_handle;
-+
-+
-+typedef struct nwd_rwargs {
-+      nwd_handle      file;
-+      __u64           offset;
-+      __u32           count;
-+      void *          buffer;
-+} nwd_rwargs;
-+
-+
-+typedef struct nwd_readres {
-+      nwd_res         status;
-+      __u32           count;
-+} nwd_readres;
-+
-+
-+typedef struct nwd_lookupres {
-+      nwd_res         status;
-+      nwd_handle      file;
-+      __u64           size;
-+} nwd_lookupres;
-+
-+
-+extern struct rpc_stat                nwd_rpcstat;
-+extern struct rpc_program     nwd_program;
-+
-+#endif /* _NWD_XDR_H */
-diff -Nur linux-2.4.20.org/include/linux/nwd.h linux-2.4.20/include/linux/nwd.h
---- linux-2.4.20.org/include/linux/nwd.h       Thu Jan  1 01:00:00 1970
-+++ linux-2.4.20/include/linux/nwd.h   Fri Sep 14 01:26:34 2001
-@@ -0,0 +1,102 @@
-+/*
-+ * Network disk client
-+ * Kernel block device driver
-+ *
-+ * Copyright (c) 1996 Petr Salinger
-+ * Copyright (c) 1999 Libor Bus <l.bus@sh.cvut.cz>
-+ * Copyright (c) 2001 Lubomir Bulej <pallas@kadan.cz>
-+ *
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ *
-+ */
-+
-+#ifndef _LINUX_NWD_H
-+#define _LINUX_NWD_H
-+
-+#include <linux/ioctl.h>
-+
-+
-+/*****************************************************************************\
-+| KERNEL & USER SPACE                                                         |
-+\*****************************************************************************/
-+
-+#define NWD_IOCTL_CHAR                'N'
-+#define NWD_CTL_SETPEER               _IOW (NWD_IOCTL_CHAR, 0, nwd_peer_t)
-+#define NWD_CTL_GETPEER               _IOR (NWD_IOCTL_CHAR, 1, nwd_peer_t)
-+#define NWD_CTL_SETOPTS               _IO (NWD_IOCTL_CHAR, 3)
-+#define NWD_CTL_GETOPTS               _IO (NWD_IOCTL_CHAR, 4)
-+#define NWD_CTL_DISPOSE               _IO (NWD_IOCTL_CHAR, 5)
-+
-+#define       NWD_OPT_DISPOSE         0x1                             /* dispose changes on release           */
-+#define       NWD_OPT_DISCONNECT      0x2                             /* disconnect from server on release    */
-+#define NWD_OPT_PROTO_TCP     0x4                             /* use TCP for RPC transport            */
-+
-+typedef struct nwd_peer {
-+      struct sockaddr_in      saddr;                          /* socket address of the server         */
-+      int                     devid;                          /* requested identification for lookup  */
-+} nwd_peer_t;
-+
-+
-+/*****************************************************************************\
-+| KERNEL ONLY                                                                 |
-+\*****************************************************************************/
-+
-+#ifdef __KERNEL__
-+
-+#include <linux/fs.h>
-+#include <asm/semaphore.h>
-+#include <linux/sunrpc/clnt.h>
-+
-+#define NWD_MAJOR             62
-+
-+#define NWD_DFL_DEVID         1
-+#define NWD_DFL_OPTIONS               (NWD_OPT_DISPOSE)
-+#define NWD_DFL_INIDISPOSE    1
-+
-+#define NWD_SEC_BITS          9                               /* device sector size in bits           */
-+#define NWD_SEC_SIZE          (1U << NWD_SEC_BITS)            /* sector size (must be power of 2)     */
-+#define NWD_B2S_SHIFT         (BLOCK_SIZE_BITS-NWD_SEC_BITS)  /* shift to convert blocks to sectors   */
-+
-+
-+/*
-+ * NWD_MAX_DGLEN determines the number of fragments per datagram
-+ *    1024 - one fragment is enough; this is usually used for ext2
-+ *    4096 - more fragments; useful for paging
-+ */
-+ 
-+#define NWD_MAX_DGLEN         (4 * NWD_SEC_SIZE)              /* must be multiple of NWD_SEC_SIZE     */
-+#define NWD_MAX_SNLEN         20                              /* max. length of server name           */
-+#define NWD_MAX_DEVICES               8                               /* default number of nwd devices        */
-+#define NWD_MAX_RETRIES               10                              /* how many times we retry the request  */
-+
-+
-+typedef struct nwd_device {
-+      int                     remid;                          /* id of remote file disk operations    */
-+      int                     devnum;                         /* NWD device number                    */
-+      int                     options;                        /* NWD device options                   */
-+      nwd_peer_t              server;                         /* server address & lookup id           */
-+      struct rpc_clnt *       client;                         /* RPC client                           */
-+      char                    sname [NWD_MAX_SNLEN];          /* server name for debug messages       */
-+
-+      int                     users;                          /* reference counter                    */
-+      struct semaphore        mxctl;                          /* device control mutex                 */
-+      
-+      request_queue_t         queue;                          /* device request queue                 */
-+} nwd_device_t;
-+
-+#endif /* __KERNEL__ */
-+
-+#endif /* _LINUX_NWD_H */
---- linux-2.4.20/include/linux/inet.h.org      Sat Aug  3 02:39:45 2002
-+++ linux-2.4.20/include/linux/inet.h  Fri Mar 21 13:34:17 2003
-@@ -46,6 +46,7 @@
- extern void           inet_proto_init(struct net_proto *pro);
- extern __u32          in_aton(const char *str);
-+extern char           *in_ntoa(__u32 in);
- #endif
- #endif        /* _LINUX_INET_H */
---- linux-2.4.20/net/netsyms.c.org     Fri Mar 21 10:07:21 2003
-+++ linux-2.4.20/net/netsyms.c Fri Mar 21 13:34:52 2003
-@@ -262,6 +262,7 @@
- EXPORT_SYMBOL(ip_fragment);
- EXPORT_SYMBOL(inet_family_ops);
- EXPORT_SYMBOL(in_aton);
-+EXPORT_SYMBOL(in_ntoa);
- EXPORT_SYMBOL(ip_mc_inc_group);
- EXPORT_SYMBOL(ip_mc_dec_group);
- EXPORT_SYMBOL(ip_mc_join_group);
---- linux-2.4.20/net/ipv4/utils.c.org  Sat Aug  3 02:39:46 2002
-+++ linux-2.4.20/net/ipv4/utils.c      Fri Mar 21 14:35:14 2003
-@@ -43,6 +43,22 @@
- /*
-+ *    Display an IP address in readable format. 
-+ */
-+ 
-+char *in_ntoa(__u32 in)
-+{
-+      static char buff[18];
-+      char *p;
-+
-+      p = (char *) &in;
-+      sprintf(buff, "%d.%d.%d.%d",
-+              (p[0] & 255), (p[1] & 255), (p[2] & 255), (p[3] & 255));
-+      return(buff);
-+}
-+
-+
-+/*
-  *    Convert an ASCII string to binary IP. 
-  */
-  
diff --git a/patch-cryptoloop-jari-2.4.22-rc2.0 b/patch-cryptoloop-jari-2.4.22-rc2.0
deleted file mode 100644 (file)
index 54d4a68..0000000
+++ /dev/null
@@ -1,1545 +0,0 @@
-diff -ruN linux-2.4/crypto/Config.in linux-2.4-cl/crypto/Config.in
---- linux-2.4/crypto/Config.in 2003-08-16 19:11:38.783804504 +0200
-+++ linux-2.4-cl/crypto/Config.in      2003-08-16 17:45:20.596330070 +0200
-@@ -4,7 +4,9 @@
- mainmenu_option next_comment
- comment 'Cryptographic options'
--if [ "$CONFIG_INET_AH" = "y" -o \
-+if [ "$CONFIG_BLK_DEV_CRYPTOLOOP" = "y" -o \
-+     "$CONFIG_BLK_DEV_CRYPTOLOOP" = "m" -o \
-+     "$CONFIG_INET_AH" = "y" -o \
-      "$CONFIG_INET_AH" = "m" -o \
-      "$CONFIG_INET_ESP" = "y" -o \
-      "$CONFIG_INET_ESP" = "m" -o \
-diff -ruN linux-2.4/drivers/block/Config.in linux-2.4-cl/drivers/block/Config.in
---- linux-2.4/drivers/block/Config.in  2003-08-16 19:08:10.836128909 +0200
-+++ linux-2.4-cl/drivers/block/Config.in       2003-08-16 19:28:45.732770341 +0200
-@@ -40,6 +40,7 @@
- dep_tristate 'Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)' CONFIG_BLK_DEV_UMEM $CONFIG_PCI $CONFIG_EXPERIMENTAL
- tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
-+dep_tristate '  Cryptoloop support' CONFIG_BLK_DEV_CRYPTOLOOP $CONFIG_BLK_DEV_LOOP
- dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
- tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
-diff -ruN linux-2.4/drivers/block/cryptoloop.c linux-2.4-cl/drivers/block/cryptoloop.c
---- linux-2.4/drivers/block/cryptoloop.c       1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.4-cl/drivers/block/cryptoloop.c    2003-08-16 18:30:05.268601777 +0200
-@@ -0,0 +1,179 @@
-+/*
-+   Linux loop encryption enabling module
-+
-+   Copyright (C)  2002 Herbert Valerio Riedel <hvr@gnu.org>
-+   Copyright (C)  2003 Fruhwirth Clemens <clemens@endorphin.org>
-+
-+   This module is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by
-+   the Free Software Foundation; either version 2 of the License, or
-+   (at your option) any later version.
-+
-+   This module is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+   GNU General Public License for more details.
-+
-+   You should have received a copy of the GNU General Public License
-+   along with this module; if not, write to the Free Software
-+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-+ */
-+
-+#include <linux/module.h>
-+
-+#include <linux/init.h>
-+#include <linux/string.h>
-+#include <linux/crypto.h>
-+#include <linux/blkdev.h>
-+#include <linux/loop.h>
-+#include <asm/semaphore.h>
-+#include <asm/uaccess.h>
-+#include <asm/scatterlist.h>
-+
-+MODULE_LICENSE("GPL");
-+MODULE_DESCRIPTION("loop blockdevice transferfunction adaptor / CryptoAPI");
-+MODULE_AUTHOR("Herbert Valerio Riedel <hvr@gnu.org>");
-+
-+static int
-+cryptoloop_init(struct loop_device *lo, /* const */ struct loop_info *info)
-+{
-+      int err = -EINVAL;
-+      char cms[LO_NAME_SIZE];                 /* cipher-mode string */
-+      char *cipher;
-+      char *mode;
-+      char *cmsp = cms;                       /* c-m string pointer */
-+      struct crypto_tfm *tfm = NULL;
-+
-+      /* encryption breaks for non sector aligned offsets */
-+
-+      if (info->lo_offset % LOOP_IV_SECTOR_SIZE)
-+              goto out;
-+
-+      strncpy(cms, info->lo_name, LO_NAME_SIZE);
-+      cms[LO_NAME_SIZE - 1] = 0;
-+      cipher = strsep(&cmsp, "-");
-+      mode = strsep(&cmsp, "-");
-+
-+      if (mode == NULL || strcmp(mode, "cbc") == 0)
-+              tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_CBC);
-+      else if (strcmp(mode, "ecb") == 0)
-+              tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_ECB);
-+      if (tfm == NULL)
-+              return -EINVAL;
-+
-+      err = tfm->crt_u.cipher.cit_setkey(tfm, info->lo_encrypt_key,
-+                                         info->lo_encrypt_key_size);
-+      
-+      if (err != 0)
-+              goto out_free_tfm;
-+
-+      lo->key_data = tfm;
-+      return 0;
-+
-+ out_free_tfm:
-+      crypto_free_tfm(tfm);
-+
-+ out:
-+      return err;
-+}
-+
-+typedef int (*encdec_t)(struct crypto_tfm *tfm,
-+                      struct scatterlist *sg_out,
-+                      struct scatterlist *sg_in,
-+                      unsigned int nsg, u8 *iv);
-+
-+static int
-+cryptoloop_transfer(struct loop_device *lo, int cmd, char *raw_buf,
-+                   char *loop_buf, int size, sector_t IV)
-+{
-+      struct crypto_tfm *tfm = (struct crypto_tfm *) lo->key_data;
-+      struct scatterlist sg_out = { 0, };
-+      struct scatterlist sg_in = { 0, };
-+
-+      encdec_t encdecfunc;
-+      char const *in;
-+      char *out;
-+
-+      if (cmd == READ) {
-+              in = raw_buf;
-+              out = loop_buf;
-+              encdecfunc = tfm->crt_u.cipher.cit_decrypt_iv;
-+      } else {
-+              in = loop_buf;
-+              out = raw_buf;
-+              encdecfunc = tfm->crt_u.cipher.cit_encrypt_iv;
-+      }
-+
-+      while (size > 0) {
-+              const int sz = min(size, LOOP_IV_SECTOR_SIZE);
-+              u32 iv[4] = { 0, };
-+              iv[0] = cpu_to_le32(IV & 0xffffffff);
-+
-+              sg_in.page = virt_to_page(in);
-+              sg_in.offset = (unsigned long)in & ~PAGE_MASK;
-+              sg_in.length = sz;
-+
-+              sg_out.page = virt_to_page(out);
-+              sg_out.offset = (unsigned long)out & ~PAGE_MASK;
-+              sg_out.length = sz;
-+
-+              encdecfunc(tfm, &sg_out, &sg_in, sz, (u8 *)iv);
-+
-+              IV++;
-+              size -= sz;
-+              in += sz;
-+              out += sz;
-+      }
-+
-+      return 0;
-+}
-+
-+
-+static int
-+cryptoloop_ioctl(struct loop_device *lo, int cmd, unsigned long arg)
-+{
-+      return -EINVAL;
-+}
-+
-+static int
-+cryptoloop_release(struct loop_device *lo)
-+{
-+      struct crypto_tfm *tfm = (struct crypto_tfm *) lo->key_data;
-+      if (tfm != NULL) {
-+              crypto_free_tfm(tfm);
-+              lo->key_data = NULL;
-+              return 0;
-+      }
-+      printk(KERN_ERR "cryptoloop_release(): tfm == NULL?\n");
-+      return -EINVAL;
-+}
-+
-+static struct loop_func_table cryptoloop_funcs = {
-+      .number = LO_CRYPT_CRYPTOAPI,
-+      .init = cryptoloop_init,
-+      .ioctl = cryptoloop_ioctl,
-+      .transfer = cryptoloop_transfer,
-+      .release = cryptoloop_release,
-+      /* .owner = THIS_MODULE */
-+};
-+
-+static int __init
-+init_cryptoloop(void)
-+{
-+      int rc = loop_register_transfer(&cryptoloop_funcs);
-+
-+      if (rc)
-+              printk(KERN_ERR "cryptoloop: loop_register_transfer failed\n");
-+      return rc;
-+}
-+
-+static void __exit
-+cleanup_cryptoloop(void)
-+{
-+      if (loop_unregister_transfer(LO_CRYPT_CRYPTOAPI))
-+              printk(KERN_ERR
-+                      "cryptoloop: loop_unregister_transfer failed\n");
-+}
-+
-+module_init(init_cryptoloop);
-+module_exit(cleanup_cryptoloop);
---- linux-2.4.33.4/drivers/block/loop.c.orig   2006-11-23 09:50:27.259505000 +0100
-+++ linux-2.4.33.4/drivers/block/loop.c        2006-11-23 09:59:35.719505000 +0100
-@@ -52,6 +52,18 @@
-  *   problem above. Encryption modules that used to rely on the old scheme
-  *   should just call ->i_mapping->bmap() to calculate the physical block
-  *   number.
-+ *
-+ * IV is now passed as (512 byte) sector number.
-+ * Jari Ruusu <jari.ruusu@pp.inet.fi>, May 18 2001
-+ *
-+ * External encryption module locking bug fixed.
-+ * Ingo Rohloff <rohloff@in.tum.de>, June 21 2001
-+ *
-+ * Make device backed loop work with swap (pre-allocated buffers + queue rewrite).
-+ * Jari Ruusu <jari.ruusu@pp.inet.fi>, September 2 2001
-+ *
-+ * File backed code now uses file->f_op->read/write. Based on Andrew Morton's idea.
-+ * Jari Ruusu <jari.ruusu@pp.inet.fi>, May 23 2002
-  */ 
- #include <linux/config.h>
-@@ -82,26 +94,25 @@
- static struct loop_device *loop_dev;
- static int *loop_sizes;
- static int *loop_blksizes;
-+static int *loop_hardsizes;
- static devfs_handle_t devfs_handle;      /*  For the directory */
- /*
-  * Transfer functions
-  */
- static int transfer_none(struct loop_device *lo, int cmd, char *raw_buf,
--                       char *loop_buf, int size, int real_block)
-+                       char *loop_buf, int size, sector_t real_block)
- {
--      if (raw_buf != loop_buf) {
--              if (cmd == READ)
--                      memcpy(loop_buf, raw_buf, size);
--              else
--                      memcpy(raw_buf, loop_buf, size);
--      }
-+      /* this code is only called from file backed loop  */
-+      /* and that code expects this function to be no-op */
-+      if (current->need_resched)
-+              schedule();
-       return 0;
- }
- static int transfer_xor(struct loop_device *lo, int cmd, char *raw_buf,
--                      char *loop_buf, int size, int real_block)
-+                      char *loop_buf, int size, sector_t real_block)
- {
-       char    *in, *out, *key;
-       int     i, keysize;
-@@ -118,12 +129,13 @@
-       keysize = lo->lo_encrypt_key_size;
-       for (i = 0; i < size; i++)
-               *out++ = *in++ ^ key[(i & 511) % keysize];
-+      if (current->need_resched)
-+              schedule();
-       return 0;
- }
- static int none_status(struct loop_device *lo, struct loop_info *info)
- {
--      lo->lo_flags |= LO_FLAGS_BH_REMAP;
-       return 0;
- }
-@@ -149,321 +161,367 @@
- /* xfer_funcs[0] is special - its release function is never called */ 
- struct loop_func_table *xfer_funcs[MAX_LO_CRYPT] = {
-       &none_funcs,
--      &xor_funcs  
-+      &xor_funcs,
- };
--#define MAX_DISK_SIZE 1024*1024*1024
--
--static int compute_loop_size(struct loop_device *lo, struct dentry * lo_dentry, kdev_t lodev)
--{
--      if (S_ISREG(lo_dentry->d_inode->i_mode))
--              return (lo_dentry->d_inode->i_size - lo->lo_offset) >> BLOCK_SIZE_BITS;
--      if (blk_size[MAJOR(lodev)])
--              return blk_size[MAJOR(lodev)][MINOR(lodev)] -
--                                (lo->lo_offset >> BLOCK_SIZE_BITS);
--      return MAX_DISK_SIZE;
-+/*
-+ *  First number of 'lo_prealloc' is the default number of RAM pages
-+ *  to pre-allocate for each device backed loop. Every (configured)
-+ *  device backed loop pre-allocates this amount of RAM pages unless
-+ *  later 'lo_prealloc' numbers provide an override. 'lo_prealloc'
-+ *  overrides are defined in pairs: loop_index,number_of_pages
-+ */
-+static int lo_prealloc[9] = { 125, 999, 0, 999, 0, 999, 0, 999, 0 };
-+#define LO_PREALLOC_MIN 4    /* minimum user defined pre-allocated RAM pages */
-+#define LO_PREALLOC_MAX 512  /* maximum user defined pre-allocated RAM pages */
-+
-+#ifdef MODULE
-+MODULE_PARM(lo_prealloc, "1-9i");
-+MODULE_PARM_DESC(lo_prealloc, "Number of pre-allocated pages [,index,pages]...");
-+#else
-+static int __init lo_prealloc_setup(char *str)
-+{
-+      int x, y, z;
-+
-+      for (x = 0; x < (sizeof(lo_prealloc) / sizeof(int)); x++) {
-+              z = get_option(&str, &y);
-+              if (z > 0)
-+                      lo_prealloc[x] = y;
-+              if (z < 2)
-+                      break;
-+      }
-+      return 1;
- }
-+__setup("lo_prealloc=", lo_prealloc_setup);
-+#endif
--static void figure_loop_size(struct loop_device *lo)
--{
--      loop_sizes[lo->lo_number] = compute_loop_size(lo,
--                                      lo->lo_backing_file->f_dentry,
--                                      lo->lo_device);
--}
-+/*
-+ * This is loop helper thread nice value in range
-+ * from 0 (low priority) to -20 (high priority).
-+ */
-+#if defined(DEF_NICE) && defined(DEF_COUNTER)
-+static int lo_nice = -20;   /* old scheduler default */
-+#else
-+static int lo_nice = -1;    /* O(1) scheduler default */
-+#endif
--static int lo_send(struct loop_device *lo, struct buffer_head *bh, int bsize,
--                 loff_t pos)
-+#ifdef MODULE
-+MODULE_PARM(lo_nice, "1i");
-+MODULE_PARM_DESC(lo_nice, "Loop thread scheduler nice (0 ... -20)");
-+#else
-+static int __init lo_nice_setup(char *str)
- {
--      struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
--      struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
--      struct address_space_operations *aops = mapping->a_ops;
--      struct page *page;
--      char *kaddr, *data;
--      unsigned long index;
--      unsigned size, offset;
--      int len;
--
--      down(&mapping->host->i_sem);
--      index = pos >> PAGE_CACHE_SHIFT;
--      offset = pos & (PAGE_CACHE_SIZE - 1);
--      len = bh->b_size;
--      data = bh->b_data;
--      while (len > 0) {
--              int IV = index * (PAGE_CACHE_SIZE/bsize) + offset/bsize;
--              int transfer_result;
-+      int y;
--              size = PAGE_CACHE_SIZE - offset;
--              if (size > len)
--                      size = len;
--
--              page = grab_cache_page(mapping, index);
--              if (!page)
--                      goto fail;
--              kaddr = kmap(page);
--              if (aops->prepare_write(file, page, offset, offset+size))
--                      goto unlock;
--              flush_dcache_page(page);
--              transfer_result = lo_do_transfer(lo, WRITE, kaddr + offset, data, size, IV);
--              if (transfer_result) {
--                      /*
--                       * The transfer failed, but we still write the data to
--                       * keep prepare/commit calls balanced.
--                       */
--                      printk(KERN_ERR "loop: transfer error block %ld\n", index);
--                      memset(kaddr + offset, 0, size);
--              }
--              if (aops->commit_write(file, page, offset, offset+size))
--                      goto unlock;
--              if (transfer_result)
--                      goto unlock;
--              kunmap(page);
--              data += size;
--              len -= size;
--              offset = 0;
--              index++;
--              pos += size;
--              UnlockPage(page);
--              page_cache_release(page);
--      }
--      up(&mapping->host->i_sem);
--      return 0;
--
--unlock:
--      kunmap(page);
--      UnlockPage(page);
--      page_cache_release(page);
--fail:
--      up(&mapping->host->i_sem);
--      return -1;
-+      if (get_option(&str, &y) == 1)
-+              lo_nice = y;
-+      return 1;
- }
-+__setup("lo_nice=", lo_nice_setup);
-+#endif
--struct lo_read_data {
--      struct loop_device *lo;
--      char *data;
--      int bsize;
--};
-+typedef struct {
-+      struct buffer_head      **q0;
-+      struct buffer_head      **q1;
-+      struct buffer_head      **q2;
-+      int                     x0;
-+      int                     x1;
-+      int                     x2;
-+} que_look_up_table;
--static int lo_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
-+static void loop_prealloc_cleanup(struct loop_device *lo)
- {
--      char *kaddr;
--      unsigned long count = desc->count;
--      struct lo_read_data *p = (struct lo_read_data*)desc->buf;
--      struct loop_device *lo = p->lo;
--      int IV = page->index * (PAGE_CACHE_SIZE/p->bsize) + offset/p->bsize;
--
--      if (size > count)
--              size = count;
--
--      kaddr = kmap(page);
--      if (lo_do_transfer(lo, READ, kaddr + offset, p->data, size, IV)) {
--              size = 0;
--              printk(KERN_ERR "loop: transfer error block %ld\n",page->index);
--              desc->error = -EINVAL;
--      }
--      kunmap(page);
--      
--      desc->count = count - size;
--      desc->written += size;
--      p->data += size;
--      return size;
--}
--
--static int lo_receive(struct loop_device *lo, struct buffer_head *bh, int bsize,
--                    loff_t pos)
--{
--      struct lo_read_data cookie;
--      read_descriptor_t desc;
--      struct file *file;
--
--      cookie.lo = lo;
--      cookie.data = bh->b_data;
--      cookie.bsize = bsize;
--      desc.written = 0;
--      desc.count = bh->b_size;
--      desc.buf = (char*)&cookie;
--      desc.error = 0;
--      spin_lock_irq(&lo->lo_lock);
--      file = lo->lo_backing_file;
--      spin_unlock_irq(&lo->lo_lock);
--      do_generic_file_read(file, &pos, &desc, lo_read_actor);
--      return desc.error;
-+      struct buffer_head *bh;
-+
-+      while ((bh = lo->lo_bh_free)) {
-+              __free_page(bh->b_page);
-+              lo->lo_bh_free = bh->b_reqnext;
-+              bh->b_reqnext = NULL;
-+              kmem_cache_free(bh_cachep, bh);
-+      }
- }
--static inline int loop_get_bs(struct loop_device *lo)
-+static int loop_prealloc_init(struct loop_device *lo, int y)
- {
--      int bs = 0;
-+      struct buffer_head *bh;
-+      int x;
--      if (blksize_size[MAJOR(lo->lo_device)])
--              bs = blksize_size[MAJOR(lo->lo_device)][MINOR(lo->lo_device)];
--      if (!bs)
--              bs = BLOCK_SIZE;        
-+      if(!y) {
-+              y = lo_prealloc[0];
-+              for (x = 1; x < (sizeof(lo_prealloc) / sizeof(int)); x += 2) {
-+                      if (lo_prealloc[x + 1] && (lo->lo_number == lo_prealloc[x])) {
-+                              y = lo_prealloc[x + 1];
-+                              break;
-+                      }
-+              }
-+      }
-+      lo->lo_bh_flsh = (y * 3) / 4;
--      return bs;
-+      for (x = 0; x < y; x++) {
-+              bh = kmem_cache_alloc(bh_cachep, SLAB_KERNEL);
-+              if (!bh) {
-+                      loop_prealloc_cleanup(lo);
-+                      return 1;
-+              }
-+              bh->b_page = alloc_page(GFP_KERNEL);
-+              if (!bh->b_page) {
-+                      bh->b_reqnext = NULL;
-+                      kmem_cache_free(bh_cachep, bh);
-+                      loop_prealloc_cleanup(lo);
-+                      return 1;
-+              }
-+              bh->b_reqnext = lo->lo_bh_free;
-+              lo->lo_bh_free = bh;
-+      }
-+      return 0;
- }
--static inline unsigned long loop_get_iv(struct loop_device *lo,
--                                      unsigned long sector)
-+static void loop_add_queue_last(struct loop_device *lo, struct buffer_head *bh, struct buffer_head **q)
- {
--      int bs = loop_get_bs(lo);
--      unsigned long offset, IV;
-+      unsigned long flags;
--      IV = sector / (bs >> 9) + lo->lo_offset / bs;
--      offset = ((sector % (bs >> 9)) << 9) + lo->lo_offset % bs;
--      if (offset >= bs)
--              IV++;
-+      spin_lock_irqsave(&lo->lo_lock, flags);
-+      if (*q) {
-+              bh->b_reqnext = (*q)->b_reqnext;
-+              (*q)->b_reqnext = bh;
-+      } else {
-+              bh->b_reqnext = bh;
-+      }
-+      *q = bh;
-+      spin_unlock_irqrestore(&lo->lo_lock, flags);
--      return IV;
-+      if (waitqueue_active(&lo->lo_bh_wait))
-+              wake_up_interruptible(&lo->lo_bh_wait);
- }
--static int do_bh_filebacked(struct loop_device *lo, struct buffer_head *bh, int rw)
-+static void loop_add_queue_first(struct loop_device *lo, struct buffer_head *bh, struct buffer_head **q)
- {
--      loff_t pos;
--      int ret;
--
--      pos = ((loff_t) bh->b_rsector << 9) + lo->lo_offset;
--
--      if (rw == WRITE)
--              ret = lo_send(lo, bh, loop_get_bs(lo), pos);
--      else
--              ret = lo_receive(lo, bh, loop_get_bs(lo), pos);
--
--      return ret;
-+      spin_lock_irq(&lo->lo_lock);
-+      if (*q) {
-+              bh->b_reqnext = (*q)->b_reqnext;
-+              (*q)->b_reqnext = bh;
-+      } else {
-+              bh->b_reqnext = bh;
-+              *q = bh;
-+      }
-+      spin_unlock_irq(&lo->lo_lock);
- }
--static void loop_end_io_transfer(struct buffer_head *bh, int uptodate);
--static void loop_put_buffer(struct buffer_head *bh)
-+static struct buffer_head *loop_get_bh(struct loop_device *lo, int *list_nr,
-+                                      que_look_up_table *qt)
- {
--      /*
--       * check b_end_io, may just be a remapped bh and not an allocated one
--       */
--      if (bh && bh->b_end_io == loop_end_io_transfer) {
--              __free_page(bh->b_page);
--              kmem_cache_free(bh_cachep, bh);
-+      struct buffer_head *bh = NULL, *last;
-+
-+      spin_lock_irq(&lo->lo_lock);
-+      if ((last = *qt->q0)) {
-+              bh = last->b_reqnext;
-+              if (bh == last)
-+                      *qt->q0 = NULL;
-+              else
-+                      last->b_reqnext = bh->b_reqnext;
-+              bh->b_reqnext = NULL;
-+              *list_nr = qt->x0;
-+      } else if ((last = *qt->q1)) {
-+              bh = last->b_reqnext;
-+              if (bh == last)
-+                      *qt->q1 = NULL;
-+              else
-+                      last->b_reqnext = bh->b_reqnext;
-+              bh->b_reqnext = NULL;
-+              *list_nr = qt->x1;
-+      } else if ((last = *qt->q2)) {
-+              bh = last->b_reqnext;
-+              if (bh == last)
-+                      *qt->q2 = NULL;
-+              else
-+                      last->b_reqnext = bh->b_reqnext;
-+              bh->b_reqnext = NULL;
-+              *list_nr = qt->x2;
-       }
-+      spin_unlock_irq(&lo->lo_lock);
-+      return bh;
- }
--/*
-- * Add buffer_head to back of pending list
-- */
--static void loop_add_bh(struct loop_device *lo, struct buffer_head *bh)
-+static void loop_put_buffer(struct loop_device *lo, struct buffer_head *b)
- {
-       unsigned long flags;
-+      int wk;
-       spin_lock_irqsave(&lo->lo_lock, flags);
--      if (lo->lo_bhtail) {
--              lo->lo_bhtail->b_reqnext = bh;
--              lo->lo_bhtail = bh;
--      } else
--              lo->lo_bh = lo->lo_bhtail = bh;
-+      b->b_reqnext = lo->lo_bh_free;
-+      lo->lo_bh_free = b;
-+      wk = lo->lo_bh_need;
-       spin_unlock_irqrestore(&lo->lo_lock, flags);
--      up(&lo->lo_bh_mutex);
-+      if (wk && waitqueue_active(&lo->lo_bh_wait))
-+              wake_up_interruptible(&lo->lo_bh_wait);
- }
--/*
-- * Grab first pending buffer
-- */
--static struct buffer_head *loop_get_bh(struct loop_device *lo)
-+static void loop_end_io_transfer_wr(struct buffer_head *bh, int uptodate)
- {
--      struct buffer_head *bh;
--
--      spin_lock_irq(&lo->lo_lock);
--      if ((bh = lo->lo_bh)) {
--              if (bh == lo->lo_bhtail)
--                      lo->lo_bhtail = NULL;
--              lo->lo_bh = bh->b_reqnext;
--              bh->b_reqnext = NULL;
--      }
--      spin_unlock_irq(&lo->lo_lock);
-+      struct loop_device *lo = &loop_dev[MINOR(bh->b_dev)];
-+      struct buffer_head *rbh = bh->b_private;
--      return bh;
-+      rbh->b_reqnext = NULL;
-+      rbh->b_end_io(rbh, uptodate);
-+      loop_put_buffer(lo, bh);
-+      if (atomic_dec_and_test(&lo->lo_pending))
-+              wake_up_interruptible(&lo->lo_bh_wait);
- }
--/*
-- * when buffer i/o has completed. if BH_Dirty is set, this was a WRITE
-- * and lo->transfer stuff has already been done. if not, it was a READ
-- * so queue it for the loop thread and let it do the transfer out of
-- * b_end_io context (we don't want to do decrypt of a page with irqs
-- * disabled)
-- */
--static void loop_end_io_transfer(struct buffer_head *bh, int uptodate)
-+static void loop_end_io_transfer_rd(struct buffer_head *bh, int uptodate)
- {
-       struct loop_device *lo = &loop_dev[MINOR(bh->b_dev)];
--      if (!uptodate || test_bit(BH_Dirty, &bh->b_state)) {
--              struct buffer_head *rbh = bh->b_private;
--
--              rbh->b_end_io(rbh, uptodate);
--              if (atomic_dec_and_test(&lo->lo_pending))
--                      up(&lo->lo_bh_mutex);
--              loop_put_buffer(bh);
--      } else
--              loop_add_bh(lo, bh);
-+      if (!uptodate)
-+              loop_end_io_transfer_wr(bh, uptodate);
-+      else
-+              loop_add_queue_last(lo, bh, &lo->lo_bhQue0);
- }
- static struct buffer_head *loop_get_buffer(struct loop_device *lo,
--                                         struct buffer_head *rbh)
-+              struct buffer_head *rbh, int from_thread, int rw)
- {
-       struct buffer_head *bh;
-+      struct page *p;
-+      unsigned long flags;
--      /*
--       * for xfer_funcs that can operate on the same bh, do that
--       */
--      if (lo->lo_flags & LO_FLAGS_BH_REMAP) {
--              bh = rbh;
--              goto out_bh;
-+      spin_lock_irqsave(&lo->lo_lock, flags);
-+      bh = lo->lo_bh_free;
-+      if (bh) {
-+              lo->lo_bh_free = bh->b_reqnext;
-+              if (from_thread)
-+                      lo->lo_bh_need = 0;
-+      } else {
-+              if (from_thread)
-+                      lo->lo_bh_need = 1;
-       }
-+      spin_unlock_irqrestore(&lo->lo_lock, flags);
-+      if (!bh)
-+              return (struct buffer_head *)0;
--      do {
--              bh = kmem_cache_alloc(bh_cachep, SLAB_NOIO);
--              if (bh)
--                      break;
--
--              run_task_queue(&tq_disk);
--              set_current_state(TASK_INTERRUPTIBLE);
--              schedule_timeout(HZ);
--      } while (1);
--      memset(bh, 0, sizeof(*bh));
-+      p = bh->b_page;
-+      memset(bh, 0, sizeof(struct buffer_head));
-+      bh->b_page = p;
-+      bh->b_private = rbh;
-       bh->b_size = rbh->b_size;
-       bh->b_dev = rbh->b_rdev;
-+      bh->b_rdev = lo->lo_device;
-       bh->b_state = (1 << BH_Req) | (1 << BH_Mapped) | (1 << BH_Lock);
-+      bh->b_data = page_address(bh->b_page);
-+      bh->b_end_io = (rw == WRITE) ? loop_end_io_transfer_wr : loop_end_io_transfer_rd;
-+      bh->b_rsector = rbh->b_rsector + (lo->lo_offset >> 9);
-+      init_waitqueue_head(&bh->b_wait);
--      /*
--       * easy way out, although it does waste some memory for < PAGE_SIZE
--       * blocks... if highmem bounce buffering can get away with it,
--       * so can we :-)
--       */
--      do {
--              bh->b_page = alloc_page(GFP_NOIO);
--              if (bh->b_page)
--                      break;
-+      return bh;
-+}
--              run_task_queue(&tq_disk);
--              set_current_state(TASK_INTERRUPTIBLE);
--              schedule_timeout(HZ);
--      } while (1);
-+#define MAX_DISK_SIZE 1024*1024*1024
--      bh->b_data = page_address(bh->b_page);
--      bh->b_end_io = loop_end_io_transfer;
--      bh->b_private = rbh;
--      init_waitqueue_head(&bh->b_wait);
-+static int compute_loop_size(struct loop_device *lo, struct dentry * lo_dentry, kdev_t lodev)
-+{
-+      if (S_ISREG(lo_dentry->d_inode->i_mode))
-+              return (lo_dentry->d_inode->i_size - lo->lo_offset) >> BLOCK_SIZE_BITS;
-+      if (blk_size[MAJOR(lodev)])
-+              return blk_size[MAJOR(lodev)][MINOR(lodev)] -
-+                                (lo->lo_offset >> BLOCK_SIZE_BITS);
-+      return MAX_DISK_SIZE;
-+}
--out_bh:
--      bh->b_rsector = rbh->b_rsector + (lo->lo_offset >> 9);
--      spin_lock_irq(&lo->lo_lock);
--      bh->b_rdev = lo->lo_device;
--      spin_unlock_irq(&lo->lo_lock);
-+static void figure_loop_size(struct loop_device *lo)
-+{
-+      loop_sizes[lo->lo_number] = compute_loop_size(lo,
-+                                      lo->lo_backing_file->f_dentry,
-+                                      lo->lo_device);
-+}
--      return bh;
-+static int loop_file_io(struct file *file, char *buf, int size, loff_t *ppos, int w)
-+{
-+      mm_segment_t fs;
-+      int x, y, z;
-+
-+      y = 0;
-+      do {
-+              z = size - y;
-+              fs = get_fs();  
-+              set_fs(get_ds());
-+              if (w) {
-+                      x = file->f_op->write(file, buf + y, z, ppos);
-+                      set_fs(fs);
-+              } else {
-+                      x = file->f_op->read(file, buf + y, z, ppos);
-+                      set_fs(fs);
-+                      if (!x)
-+                              return 1;
-+              }
-+              if (x < 0) {
-+                      if ((x == -EAGAIN) || (x == -ENOMEM) || (x == -ERESTART) || (x == -EINTR)) {
-+                              run_task_queue(&tq_disk);
-+                              set_current_state(TASK_INTERRUPTIBLE);
-+                              schedule_timeout(HZ / 2);
-+                              continue;
-+                      }
-+                      return 1;
-+              }
-+              y += x;
-+      } while (y < size);
-+      return 0;
-+}
-+
-+static int do_bh_filebacked(struct loop_device *lo, struct buffer_head *bh, int rw)
-+{
-+      loff_t pos;
-+      struct file *file = lo->lo_backing_file;
-+      char *data, *buf;
-+      unsigned int size, len;
-+      unsigned long IV;
-+
-+      pos = ((loff_t) bh->b_rsector << 9) + lo->lo_offset;
-+      buf = page_address(lo->lo_bh_free->b_page);
-+      len = bh->b_size;
-+      data = bh->b_data;
-+      IV = bh->b_rsector + (lo->lo_offset >> 9);
-+      while (len > 0) {
-+              if (lo->lo_encrypt_type == LO_CRYPT_NONE) {
-+                      /* this code relies that NONE transfer is a no-op */
-+                      buf = data;
-+              }
-+              size = PAGE_SIZE;
-+              if (size > len)
-+                      size = len;
-+              if (rw == WRITE) {
-+                      if (lo_do_transfer(lo, WRITE, buf, data, size, IV)) {
-+                              printk(KERN_ERR "loop%d: write transfer error, sector %lu\n", lo->lo_number, IV);
-+                              return 1;
-+                      }
-+                      if (loop_file_io(file, buf, size, &pos, 1)) {
-+                              printk(KERN_ERR "loop%d: write i/o error, sector %lu\n", lo->lo_number, IV);
-+                              return 1;
-+                      }
-+              } else {
-+                      if (loop_file_io(file, buf, size, &pos, 0)) {
-+                              printk(KERN_ERR "loop%d: read i/o error, sector %lu\n", lo->lo_number, IV);
-+                              return 1;
-+                      }
-+                      if (lo_do_transfer(lo, READ, buf, data, size, IV)) {
-+                              printk(KERN_ERR "loop%d: read transfer error, sector %lu\n", lo->lo_number, IV);
-+                              return 1;
-+                      }
-+              }
-+              data += size;
-+              len -= size;
-+              IV += size >> 9;
-+      }
-+      return 0;
- }
- static int loop_make_request(request_queue_t *q, int rw, struct buffer_head *rbh)
- {
--      struct buffer_head *bh = NULL;
-+      struct buffer_head *bh;
-       struct loop_device *lo;
--      unsigned long IV;
-+      set_current_state(TASK_RUNNING);
-       if (!buffer_locked(rbh))
-               BUG();
-@@ -483,7 +541,7 @@
-       } else if (rw == READA) {
-               rw = READ;
-       } else if (rw != READ) {
--              printk(KERN_ERR "loop: unknown command (%d)\n", rw);
-+              printk(KERN_ERR "loop%d: unknown command (%d)\n", lo->lo_number, rw);
-               goto err;
-       }
-@@ -493,35 +551,43 @@
-        * file backed, queue for loop_thread to handle
-        */
-       if (lo->lo_flags & LO_FLAGS_DO_BMAP) {
--              /*
--               * rbh locked at this point, noone else should clear
--               * the dirty flag
--               */
--              if (rw == WRITE)
--                      set_bit(BH_Dirty, &rbh->b_state);
--              loop_add_bh(lo, rbh);
-+              loop_add_queue_last(lo, rbh, (rw == WRITE) ? &lo->lo_bhQue1 : &lo->lo_bhQue0);
-+              return 0;
-+      }
-+
-+      /*
-+       * device backed, just remap rdev & rsector for NONE transfer
-+       */
-+      if (lo->lo_encrypt_type == LO_CRYPT_NONE) {
-+              rbh->b_rsector += lo->lo_offset >> 9;
-+              rbh->b_rdev = lo->lo_device;
-+              generic_make_request(rw, rbh);
-+              if (atomic_dec_and_test(&lo->lo_pending))
-+                      wake_up_interruptible(&lo->lo_bh_wait);
-               return 0;
-       }
-       /*
--       * piggy old buffer on original, and submit for I/O
-+       * device backed, start reads and writes now if buffer available
-        */
--      bh = loop_get_buffer(lo, rbh);
--      IV = loop_get_iv(lo, rbh->b_rsector);
-+      bh = loop_get_buffer(lo, rbh, 0, rw);
-+      if (!bh) {
-+              /* just queue request and let thread handle alloc later */
-+              loop_add_queue_last(lo, rbh, (rw == WRITE) ? &lo->lo_bhQue1 : &lo->lo_bhQue2);
-+              return 0;
-+      }
-       if (rw == WRITE) {
--              set_bit(BH_Dirty, &bh->b_state);
--              if (lo_do_transfer(lo, WRITE, bh->b_data, rbh->b_data,
--                                 bh->b_size, IV))
-+              if (lo_do_transfer(lo, WRITE, bh->b_data, rbh->b_data, bh->b_size, bh->b_rsector)) {
-+                      loop_put_buffer(lo, bh);
-                       goto err;
-+              }
-       }
--
-       generic_make_request(rw, bh);
-       return 0;
- err:
-       if (atomic_dec_and_test(&lo->lo_pending))
--              up(&lo->lo_bh_mutex);
--      loop_put_buffer(bh);
-+              wake_up_interruptible(&lo->lo_bh_wait);
- out:
-       buffer_IO_error(rbh);
-       return 0;
-@@ -530,30 +596,6 @@
-       goto out;
- }
--static inline void loop_handle_bh(struct loop_device *lo,struct buffer_head *bh)
--{
--      int ret;
--
--      /*
--       * For block backed loop, we know this is a READ
--       */
--      if (lo->lo_flags & LO_FLAGS_DO_BMAP) {
--              int rw = !!test_and_clear_bit(BH_Dirty, &bh->b_state);
--
--              ret = do_bh_filebacked(lo, bh, rw);
--              bh->b_end_io(bh, !ret);
--      } else {
--              struct buffer_head *rbh = bh->b_private;
--              unsigned long IV = loop_get_iv(lo, rbh->b_rsector);
--
--              ret = lo_do_transfer(lo, READ, bh->b_data, rbh->b_data,
--                                   bh->b_size, IV);
--
--              rbh->b_end_io(rbh, !ret);
--              loop_put_buffer(bh);
--      }
--}
--
- /*
-  * worker thread that handles reads/writes to file backed loop devices,
-  * to avoid blocking in our make_request_fn. it also does loop decrypting
-@@ -563,8 +605,19 @@
- static int loop_thread(void *data)
- {
-       struct loop_device *lo = data;
--      struct buffer_head *bh;
-+      struct buffer_head *bh, *xbh;
-+      int x, rw, qi = 0, flushcnt = 0;
-+      wait_queue_t waitq;
-+      que_look_up_table qt[4] = {
-+              { &lo->lo_bhQue0, &lo->lo_bhQue1, &lo->lo_bhQue2, 0, 1, 2 },
-+              { &lo->lo_bhQue2, &lo->lo_bhQue0, &lo->lo_bhQue1, 2, 0, 1 },
-+              { &lo->lo_bhQue0, &lo->lo_bhQue2, &lo->lo_bhQue1, 0, 2, 1 },
-+              { &lo->lo_bhQue1, &lo->lo_bhQue0, &lo->lo_bhQue2, 1, 0, 2 }
-+      };
-+      static const struct rlimit loop_rlim_defaults[RLIM_NLIMITS] = INIT_RLIMITS;
-+      init_waitqueue_entry(&waitq, current);
-+      memcpy(&current->rlim[0], &loop_rlim_defaults[0], sizeof(current->rlim));
-       daemonize();
-       exit_files(current);
-       reparent_to_init();
-@@ -576,6 +629,19 @@
-       flush_signals(current);
-       spin_unlock_irq(&current->sigmask_lock);
-+      if (lo_nice > 0)
-+              lo_nice = 0;
-+      if (lo_nice < -20)
-+              lo_nice = -20;
-+#if defined(DEF_NICE) && defined(DEF_COUNTER)
-+      /* old scheduler syntax */
-+      current->policy = SCHED_OTHER;
-+      current->nice = lo_nice;
-+#else
-+      /* O(1) scheduler syntax */
-+      set_user_nice(current, lo_nice);
-+#endif
-+
-       spin_lock_irq(&lo->lo_lock);
-       lo->lo_state = Lo_bound;
-       atomic_inc(&lo->lo_pending);
-@@ -589,23 +655,104 @@
-       up(&lo->lo_sem);
-       for (;;) {
--              down_interruptible(&lo->lo_bh_mutex);
-+              add_wait_queue(&lo->lo_bh_wait, &waitq);
-+              for (;;) {
-+                      set_current_state(TASK_INTERRUPTIBLE);
-+                      if (!atomic_read(&lo->lo_pending))
-+                              break;
-+
-+                      x = 0;
-+                      spin_lock_irq(&lo->lo_lock);
-+                      if (lo->lo_bhQue0) {
-+                              x = 1;
-+                      } else if (lo->lo_bhQue1 || lo->lo_bhQue2) {
-+                              /* file backed works too because lo->lo_bh_need == 0 */
-+                              if (lo->lo_bh_free || !lo->lo_bh_need)
-+                                      x = 1;
-+                      }
-+                      spin_unlock_irq(&lo->lo_lock);
-+                      if (x)
-+                              break;
-+
-+                      schedule();
-+              }
-+              set_current_state(TASK_RUNNING);
-+              remove_wait_queue(&lo->lo_bh_wait, &waitq);
-+
-               /*
--               * could be upped because of tear-down, not because of
-+               * could be woken because of tear-down, not because of
-                * pending work
-                */
-               if (!atomic_read(&lo->lo_pending))
-                       break;
--              bh = loop_get_bh(lo);
--              if (!bh) {
--                      printk("loop: missing bh\n");
-+              /*
-+               * read queues using alternating order to prevent starvation
-+               */
-+              bh = loop_get_bh(lo, &x, &qt[++qi & 3]);
-+              if (!bh)
-                       continue;
-+
-+              /*
-+               *  x  list tag       usage(buffer-allocated)
-+               * --- -------------  -----------------------
-+               *  0  lo->lo_bhQue0  dev-read(y) / file-read
-+               *  1  lo->lo_bhQue1  dev-write(n) / file-write
-+               *  2  lo->lo_bhQue2  dev-read(n)
-+               */
-+              rw = (x == 1) ? WRITE : READ;
-+              if ((x >= 1) && !(lo->lo_flags & LO_FLAGS_DO_BMAP)) {
-+                      /* loop_make_request didn't allocate a buffer, do that now */
-+                      xbh = loop_get_buffer(lo, bh, 1, rw);
-+                      if (!xbh) {
-+                              run_task_queue(&tq_disk);
-+                              flushcnt = 0;
-+                              loop_add_queue_first(lo, bh, (rw == WRITE) ? &lo->lo_bhQue1 : &lo->lo_bhQue2);
-+                              /* lo->lo_bh_need should be 1 now, go back to sleep */
-+                              continue;
-+                      }
-+                      if (rw == WRITE) {
-+                              if (lo_do_transfer(lo, WRITE, xbh->b_data, bh->b_data, xbh->b_size, xbh->b_rsector)) {
-+                                      loop_put_buffer(lo, xbh);
-+                                      buffer_IO_error(bh);
-+                                      atomic_dec(&lo->lo_pending);
-+                                      continue;
-+                              }
-+                      }
-+                      generic_make_request(rw, xbh);
-+
-+                      /* start I/O if there are no more requests lacking buffers */
-+                      x = 0;
-+                      spin_lock_irq(&lo->lo_lock);
-+                      if (!lo->lo_bhQue1 && !lo->lo_bhQue2)
-+                              x = 1;
-+                      spin_unlock_irq(&lo->lo_lock);
-+                      if (x || (++flushcnt >= lo->lo_bh_flsh)) {
-+                              run_task_queue(&tq_disk);
-+                              flushcnt = 0;
-+                      }
-+
-+                      /* request not completely processed yet */
-+                      continue;
-+              }
-+              if (lo->lo_flags & LO_FLAGS_DO_BMAP) {
-+                      /* request is for file backed device */
-+                      x = do_bh_filebacked(lo, bh, rw);
-+                      bh->b_reqnext = NULL;
-+                      bh->b_end_io(bh, !x);
-+              } else {
-+                      /* device backed read has completed, do decrypt now */
-+                      xbh = bh->b_private;
-+                      /* must not use bh->b_rsector as IV, as it may be modified by LVM at this point */
-+                      /* instead, recompute IV from original request */
-+                      x = lo_do_transfer(lo, READ, bh->b_data, xbh->b_data, bh->b_size, xbh->b_rsector + (lo->lo_offset >> 9));
-+                      xbh->b_reqnext = NULL;
-+                      xbh->b_end_io(xbh, !x);
-+                      loop_put_buffer(lo, bh);
-               }
--              loop_handle_bh(lo, bh);
-               /*
--               * upped both for pending work and tear-down, lo_pending
-+               * woken both for pending work and tear-down, lo_pending
-                * will hit zero then
-                */
-               if (atomic_dec_and_test(&lo->lo_pending))
-@@ -616,15 +763,34 @@
-       return 0;
- }
-+static void loop_set_softblksz(struct loop_device *lo, kdev_t dev)
-+{
-+      int bs = 0, x;
-+
-+      if (blksize_size[MAJOR(lo->lo_device)])
-+              bs = blksize_size[MAJOR(lo->lo_device)][MINOR(lo->lo_device)];
-+      if (!bs)
-+              bs = BLOCK_SIZE;
-+      if (lo->lo_flags & LO_FLAGS_DO_BMAP) {
-+              x = loop_sizes[lo->lo_number];
-+              if ((bs == 8192) && (x & 7))
-+                      bs = 4096;
-+              if ((bs == 4096) && (x & 3))
-+                      bs = 2048;
-+              if ((bs == 2048) && (x & 1))
-+                      bs = 1024;
-+      }
-+      set_blocksize(dev, bs);
-+}
-+
- static int loop_set_fd(struct loop_device *lo, struct file *lo_file, kdev_t dev,
-                      unsigned int arg)
- {
-       struct file     *file;
-       struct inode    *inode;
-       kdev_t          lo_device;
--      int             lo_flags = 0;
-+      int             lo_flags = 0, hardsz = 512;
-       int             error;
--      int             bs;
-       MOD_INC_USE_COUNT;
-@@ -643,33 +809,44 @@
-       if (!(file->f_mode & FMODE_WRITE))
-               lo_flags |= LO_FLAGS_READ_ONLY;
-+      lo->lo_bh_free = lo->lo_bhQue2 = lo->lo_bhQue1 = lo->lo_bhQue0 = NULL;
-+      lo->lo_bh_need = lo->lo_bh_flsh = 0;
-+      init_waitqueue_head(&lo->lo_bh_wait);
-       if (S_ISBLK(inode->i_mode)) {
-               lo_device = inode->i_rdev;
-               if (lo_device == dev) {
-                       error = -EBUSY;
-                       goto out_putf;
-               }
-+              if (loop_prealloc_init(lo, 0)) {
-+                      error = -ENOMEM;
-+                      goto out_putf;
-+              }
-+              hardsz = get_hardsect_size(lo_device);
-       } else if (S_ISREG(inode->i_mode)) {
--              struct address_space_operations *aops = inode->i_mapping->a_ops;
-               /*
-                * If we can't read - sorry. If we only can't write - well,
-                * it's going to be read-only.
-                */
--              if (!aops->readpage)
-+              if (!file->f_op || !file->f_op->read)
-                       goto out_putf;
--              if (!aops->prepare_write || !aops->commit_write)
-+              if (!file->f_op->write)
-                       lo_flags |= LO_FLAGS_READ_ONLY;
-               lo_device = inode->i_dev;
-               lo_flags |= LO_FLAGS_DO_BMAP;
-+              if (loop_prealloc_init(lo, 1)) {
-+                      error = -ENOMEM;
-+                      goto out_putf;
-+              }
-               error = 0;
-       } else
-               goto out_putf;
-       get_file(file);
--      if (IS_RDONLY (inode) || is_read_only(lo_device)
-+      if ((S_ISREG(inode->i_mode) && IS_RDONLY(inode)) || is_read_only(lo_device)
-           || !(lo_file->f_mode & FMODE_WRITE))
-               lo_flags |= LO_FLAGS_READ_ONLY;
-@@ -681,18 +858,17 @@
-       lo->transfer = NULL;
-       lo->ioctl = NULL;
-       figure_loop_size(lo);
--      lo->old_gfp_mask = inode->i_mapping->gfp_mask;
--      inode->i_mapping->gfp_mask &= ~(__GFP_IO|__GFP_FS);
--      bs = 0;
--      if (blksize_size[MAJOR(lo_device)])
--              bs = blksize_size[MAJOR(lo_device)][MINOR(lo_device)];
--      if (!bs)
--              bs = BLOCK_SIZE;
-+      if (lo_flags & LO_FLAGS_DO_BMAP) {
-+              lo->old_gfp_mask = inode->i_mapping->gfp_mask;
-+              inode->i_mapping->gfp_mask = GFP_NOIO | __GFP_HIGH;
-+      } else {
-+              lo->old_gfp_mask = -1;
-+      }
--      set_blocksize(dev, bs);
-+      loop_hardsizes[MINOR(dev)] = hardsz;
-+      loop_set_softblksz(lo, dev);
--      lo->lo_bh = lo->lo_bhtail = NULL;
-       error = kernel_thread(loop_thread, lo,
-           CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
-       if (error < 0)
-@@ -762,11 +938,12 @@
-       spin_lock_irq(&lo->lo_lock);
-       lo->lo_state = Lo_rundown;
-       if (atomic_dec_and_test(&lo->lo_pending))
--              up(&lo->lo_bh_mutex);
-+              wake_up_interruptible(&lo->lo_bh_wait);
-       spin_unlock_irq(&lo->lo_lock);
-       down(&lo->lo_sem);
-+      loop_prealloc_cleanup(lo);
-       lo->lo_backing_file = NULL;
-       loop_release_xfer(lo);
-@@ -781,14 +958,15 @@
-       memset(lo->lo_name, 0, LO_NAME_SIZE);
-       loop_sizes[lo->lo_number] = 0;
-       invalidate_bdev(bdev, 0);
--      filp->f_dentry->d_inode->i_mapping->gfp_mask = gfp;
-+      if (gfp != -1)
-+              filp->f_dentry->d_inode->i_mapping->gfp_mask = gfp;
-       lo->lo_state = Lo_unbound;
-       fput(filp);
-       MOD_DEC_USE_COUNT;
-       return 0;
- }
--static int loop_set_status(struct loop_device *lo, struct loop_info *arg)
-+static int loop_set_status(struct loop_device *lo, kdev_t dev, struct loop_info *arg)
- {
-       struct loop_info info; 
-       int err;
-@@ -828,6 +1006,7 @@
-               lo->lo_key_owner = current->uid; 
-       }       
-       figure_loop_size(lo);
-+      loop_set_softblksz(lo, dev);
-       return 0;
- }
-@@ -883,7 +1062,7 @@
-               err = loop_clr_fd(lo, inode->i_bdev);
-               break;
-       case LOOP_SET_STATUS:
--              err = loop_set_status(lo, (struct loop_info *) arg);
-+              err = loop_set_status(lo, inode->i_rdev, (struct loop_info *) arg);
-               break;
-       case LOOP_GET_STATUS:
-               err = loop_get_status(lo, (struct loop_info *) arg);
-@@ -917,7 +1096,7 @@
- static int lo_open(struct inode *inode, struct file *file)
- {
-       struct loop_device *lo;
--      int     dev, type;
-+      int     dev;
-       if (!inode)
-               return -EINVAL;
-@@ -932,10 +1111,6 @@
-       lo = &loop_dev[dev];
-       MOD_INC_USE_COUNT;
-       down(&lo->lo_ctl_mutex);
--
--      type = lo->lo_encrypt_type; 
--      if (type && xfer_funcs[type] && xfer_funcs[type]->lock)
--              xfer_funcs[type]->lock(lo);
-       lo->lo_refcnt++;
-       up(&lo->lo_ctl_mutex);
-       return 0;
-@@ -944,7 +1119,7 @@
- static int lo_release(struct inode *inode, struct file *file)
- {
-       struct loop_device *lo;
--      int     dev, type;
-+      int     dev;
-       if (!inode)
-               return 0;
-@@ -959,11 +1134,7 @@
-       lo = &loop_dev[dev];
-       down(&lo->lo_ctl_mutex);
--      type = lo->lo_encrypt_type;
-       --lo->lo_refcnt;
--      if (xfer_funcs[type] && xfer_funcs[type]->unlock)
--              xfer_funcs[type]->unlock(lo);
--
-       up(&lo->lo_ctl_mutex);
-       MOD_DEC_USE_COUNT;
-       return 0;
-@@ -1028,10 +1199,9 @@
-               return -EIO;
-       }
--
-       loop_dev = kmalloc(max_loop * sizeof(struct loop_device), GFP_KERNEL);
-       if (!loop_dev)
--              return -ENOMEM;
-+              goto out_dev;
-       loop_sizes = kmalloc(max_loop * sizeof(int), GFP_KERNEL);
-       if (!loop_sizes)
-@@ -1041,6 +1211,10 @@
-       if (!loop_blksizes)
-               goto out_blksizes;
-+      loop_hardsizes = kmalloc(max_loop * sizeof(int), GFP_KERNEL);
-+      if (!loop_hardsizes)
-+              goto out_hardsizes;
-+
-       blk_queue_make_request(BLK_DEFAULT_QUEUE(MAJOR_NR), loop_make_request);
-       for (i = 0; i < max_loop; i++) {
-@@ -1048,18 +1222,28 @@
-               memset(lo, 0, sizeof(struct loop_device));
-               init_MUTEX(&lo->lo_ctl_mutex);
-               init_MUTEX_LOCKED(&lo->lo_sem);
--              init_MUTEX_LOCKED(&lo->lo_bh_mutex);
-               lo->lo_number = i;
-               spin_lock_init(&lo->lo_lock);
-       }
-       memset(loop_sizes, 0, max_loop * sizeof(int));
-       memset(loop_blksizes, 0, max_loop * sizeof(int));
-+      memset(loop_hardsizes, 0, max_loop * sizeof(int));
-       blk_size[MAJOR_NR] = loop_sizes;
-       blksize_size[MAJOR_NR] = loop_blksizes;
-+      hardsect_size[MAJOR_NR] = loop_hardsizes;
-       for (i = 0; i < max_loop; i++)
-               register_disk(NULL, MKDEV(MAJOR_NR, i), 1, &lo_fops, 0);
-+      for (i = 0; i < (sizeof(lo_prealloc) / sizeof(int)); i += 2) {
-+              if (!lo_prealloc[i])
-+                      continue;
-+              if (lo_prealloc[i] < LO_PREALLOC_MIN)
-+                      lo_prealloc[i] = LO_PREALLOC_MIN;
-+              if (lo_prealloc[i] > LO_PREALLOC_MAX)
-+                      lo_prealloc[i] = LO_PREALLOC_MAX;
-+      }
-+
-       devfs_handle = devfs_mk_dir(NULL, "loop", NULL);
-       devfs_register_series(devfs_handle, "%u", max_loop, DEVFS_FL_DEFAULT,
-                             MAJOR_NR, 0,
-@@ -1069,10 +1253,13 @@
-       printk(KERN_INFO "loop: loaded (max %d devices)\n", max_loop);
-       return 0;
-+out_hardsizes:
-+      kfree(loop_blksizes);
- out_blksizes:
-       kfree(loop_sizes);
- out_sizes:
-       kfree(loop_dev);
-+out_dev:
-       if (devfs_unregister_blkdev(MAJOR_NR, "loop"))
-               printk(KERN_WARNING "loop: cannot unregister blkdev\n");
-       printk(KERN_ERR "loop: ran out of memory\n");
-@@ -1084,9 +1271,14 @@
-       devfs_unregister(devfs_handle);
-       if (devfs_unregister_blkdev(MAJOR_NR, "loop"))
-               printk(KERN_WARNING "loop: cannot unregister blkdev\n");
-+
-+      blk_size[MAJOR_NR] = 0;
-+      blksize_size[MAJOR_NR] = 0;
-+      hardsect_size[MAJOR_NR] = 0;
-       kfree(loop_dev);
-       kfree(loop_sizes);
-       kfree(loop_blksizes);
-+      kfree(loop_hardsizes);
- }
- module_init(loop_init);
-diff -ruN linux-2.4/drivers/block/Makefile linux-2.4-cl/drivers/block/Makefile
---- linux-2.4/drivers/block/Makefile   2003-08-16 19:09:58.793156044 +0200
-+++ linux-2.4-cl/drivers/block/Makefile        2003-08-16 17:37:12.622670377 +0200
-@@ -31,6 +31,7 @@
- obj-$(CONFIG_BLK_DEV_UMEM)    += umem.o
- obj-$(CONFIG_BLK_DEV_NBD)     += nbd.o
- obj-$(CONFIG_BLK_DEV_SX8)     += sx8.o
-+obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
- subdir-$(CONFIG_PARIDE) += paride
-diff -ruN linux-2.4/include/linux/loop.h linux-2.4-cl/include/linux/loop.h
---- linux-2.4/include/linux/loop.h     2001-09-17 22:16:30.000000000 +0200
-+++ linux-2.4-cl/include/linux/loop.h  2003-08-16 19:31:26.733997046 +0200
-@@ -16,6 +16,14 @@
- #define LO_KEY_SIZE   32
- #ifdef __KERNEL__
-+typedef u32 sector_t; /* for 2.6 this is defined in <asm/types.h> and
-+                       most likely an u64; but since cryptoloop uses
-+                       only the lower 32 bits of the block number
-+                       passed, let's just use an u32 for now */
-+
-+/* definitions for IV metric */
-+#define LOOP_IV_SECTOR_BITS 9
-+#define LOOP_IV_SECTOR_SIZE (1 << LOOP_IV_SECTOR_BITS)
- /* Possible states of device */
- enum {
-@@ -24,6 +32,12 @@
-       Lo_rundown,
- };
-+struct loop_device;
-+
-+typedef       int (* transfer_proc_t)(struct loop_device *, int cmd,
-+                              char *raw_buf, char *loop_buf, int size,
-+                              sector_t real_block);
-+
- struct loop_device {
-       int             lo_number;
-       int             lo_refcnt;
-@@ -32,9 +46,7 @@
-       int             lo_encrypt_type;
-       int             lo_encrypt_key_size;
-       int             lo_flags;
--      int             (*transfer)(struct loop_device *, int cmd,
--                                  char *raw_buf, char *loop_buf, int size,
--                                  int real_block);
-+      transfer_proc_t transfer;
-       char            lo_name[LO_NAME_SIZE];
-       char            lo_encrypt_key[LO_KEY_SIZE];
-       __u32           lo_init[2];
-@@ -49,26 +61,26 @@
-       int             old_gfp_mask;
-       spinlock_t              lo_lock;
--      struct buffer_head      *lo_bh;
--      struct buffer_head      *lo_bhtail;
-+      struct buffer_head      *lo_bhQue0;
-+      struct buffer_head      *lo_bhQue1;
-       int                     lo_state;
-       struct semaphore        lo_sem;
-       struct semaphore        lo_ctl_mutex;
--      struct semaphore        lo_bh_mutex;
-       atomic_t                lo_pending;
-+      struct buffer_head      *lo_bhQue2;
-+      struct buffer_head      *lo_bh_free;
-+      int                     lo_bh_flsh;
-+      int                     lo_bh_need;
-+      wait_queue_head_t       lo_bh_wait;
- };
--typedef       int (* transfer_proc_t)(struct loop_device *, int cmd,
--                              char *raw_buf, char *loop_buf, int size,
--                              int real_block);
--
- static inline int lo_do_transfer(struct loop_device *lo, int cmd, char *rbuf,
--                               char *lbuf, int size, int rblock)
-+                               char *lbuf, int size, sector_t real_block)
- {
-       if (!lo->transfer)
-               return 0;
--      return lo->transfer(lo, cmd, rbuf, lbuf, size, rblock);
-+      return lo->transfer(lo, cmd, rbuf, lbuf, size, real_block);
- }
- #endif /* __KERNEL__ */
-@@ -77,7 +89,6 @@
-  */
- #define LO_FLAGS_DO_BMAP      1
- #define LO_FLAGS_READ_ONLY    2
--#define LO_FLAGS_BH_REMAP     4
- /* 
-  * Note that this structure gets the wrong offsets when directly used
-@@ -122,6 +133,7 @@
- #define LO_CRYPT_IDEA     6
- #define LO_CRYPT_DUMMY    9
- #define LO_CRYPT_SKIPJACK 10
-+#define LO_CRYPT_CRYPTOAPI 18
- #define MAX_LO_CRYPT  20
- #ifdef __KERNEL__
-@@ -129,7 +141,7 @@
- struct loop_func_table {
-       int number;     /* filter type */ 
-       int (*transfer)(struct loop_device *lo, int cmd, char *raw_buf,
--                      char *loop_buf, int size, int real_block);
-+                      char *loop_buf, int size, sector_t real_block);
-       int (*init)(struct loop_device *, struct loop_info *); 
-       /* release is called from loop_unregister_transfer or clr_fd */
-       int (*release)(struct loop_device *); 
diff --git a/vbr-kernel-diffs b/vbr-kernel-diffs
deleted file mode 100644 (file)
index 01df413..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-Index: linux/include/linux/atm.h
-===================================================================
-RCS file: /afs/cmf/project/cvsroot/linux/include/linux/atm.h,v
-retrieving revision 1.2
-diff -u -r1.2 atm.h
---- linux/include/linux/atm.h  12 Feb 2003 20:56:33 -0000      1.2
-+++ linux/include/linux/atm.h  9 Apr 2003 12:08:38 -0000
-@@ -72,7 +72,7 @@
-                           /* connection identifier range; socket must be
-                              bound or connected */
- #define SO_ATMQOS     __SO_ENCODE(SOL_ATM,2,struct atm_qos)
--                          /* Quality of Service setting */
-+                          /* Quality of Service setting (with vbr support) */
- #define SO_ATMSAP     __SO_ENCODE(SOL_ATM,3,struct atm_sap)
-                           /* Service Access Point */
- #define SO_ATMPVC     __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
-@@ -127,9 +127,11 @@
- #define ATM_NONE      0               /* no traffic */
- #define ATM_UBR               1
- #define ATM_CBR               2
--#define ATM_VBR               3
-+#define ATM_VBR_NRT   3
-+#define ATM_VBR               ATM_VBR_NRT     /* for backward compatibility */
- #define ATM_ABR               4
- #define ATM_ANYCLASS  5               /* compatible with everything */
-+#define ATM_VBR_RT    6
- #define ATM_MAX_PCR   -1              /* maximum available PCR */
-@@ -140,6 +142,11 @@
-       int             min_pcr;        /* minimum PCR in cells per second */
-       int             max_cdv;        /* maximum CDV in microseconds */
-       int             max_sdu;        /* maximum SDU in bytes */
-+
-+      /* extra params for VBR */
-+      int             scr;            /* sustained rate in cells per second */
-+      int             mbs;            /* maximum burst size (MBS) in cells */
-+
-         /* extra params for ABR */
-         unsigned int  icr;            /* Initial Cell Rate (24-bit) */
-         unsigned int  tbe;            /* Transient Buffer Exposure (24-bit) */ 
-@@ -164,6 +171,7 @@
-       unsigned char aal __ATM_API_ALIGN;
- };
-+
- /* PVC addressing */
- #define ATM_ITF_ANY   -1              /* "magic" PVC address values */
-@@ -243,6 +251,39 @@
- #include <linux/net.h>        /* struct net_proto */
-+struct atm_trafprm_compat {
-+      unsigned char   traffic_class;  /* traffic class (ATM_UBR, ...) */
-+      int             max_pcr;        /* maximum PCR in cells per second */
-+      int             pcr;            /* desired PCR in cells per second */
-+      int             min_pcr;        /* minimum PCR in cells per second */
-+      int             max_cdv;        /* maximum CDV in microseconds */
-+      int             max_sdu;        /* maximum SDU in bytes */
-+        /* extra params for ABR */
-+        unsigned int  icr;            /* Initial Cell Rate (24-bit) */
-+        unsigned int  tbe;            /* Transient Buffer Exposure (24-bit) */ 
-+        unsigned int  frtt : 24;      /* Fixed Round Trip Time (24-bit) */
-+        unsigned int  rif  : 4;       /* Rate Increment Factor (4-bit) */
-+        unsigned int  rdf  : 4;       /* Rate Decrease Factor (4-bit) */
-+        unsigned int nrm_pres  :1;      /* nrm present bit */
-+        unsigned int trm_pres  :1;            /* rm present bit */
-+        unsigned int adtf_pres :1;            /* adtf present bit */
-+        unsigned int cdf_pres  :1;            /* cdf present bit*/
-+        unsigned int nrm       :3;            /* Max # of Cells for each forward RM cell (3-bit) */
-+        unsigned int trm       :3;            /* Time between forward RM cells (3-bit) */    
-+      unsigned int adtf      :10;     /* ACR Decrease Time Factor (10-bit) */
-+      unsigned int cdf       :3;      /* Cutoff Decrease Factor (3-bit) */
-+        unsigned int spare     :9;      /* spare bits */ 
-+};
-+
-+struct atm_qos_compat {
-+      struct atm_trafprm_compat txtp; /* parameters in TX direction */
-+      struct atm_trafprm_compat rxtp __ATM_API_ALIGN;
-+                                      /* parameters in RX direction */
-+      unsigned char aal __ATM_API_ALIGN;
-+};
-+
-+#define SO_ATMQOS_COMPAT __SO_ENCODE(SOL_ATM,2,struct atm_qos_compat)
-+                          /* Quality of Service setting (no vbr support) */
- void atmpvc_proto_init(struct net_proto *pro);
- void atmsvc_proto_init(struct net_proto *pro);
-Index: linux/net/atm/common.c
-===================================================================
-RCS file: /afs/cmf/project/cvsroot/linux/net/atm/common.c,v
-retrieving revision 1.13
-diff -u -r1.13 common.c
---- linux/net/atm/common.c     17 Mar 2003 16:13:12 -0000      1.13
-+++ linux/net/atm/common.c     9 Apr 2003 12:10:28 -0000
-@@ -1085,6 +1085,43 @@
-       vcc = ATM_SD(sock);
-       switch (optname) {
-+              case SO_ATMQOS_COMPAT:
-+                      {
-+                              struct atm_qos_compat qos_compat;
-+                              struct atm_qos qos;
-+
-+                              if (copy_from_user(&qos_compat,optval,sizeof(qos_compat)))
-+                                      return -EFAULT;
-+
-+                              /* convert old atm_qos to new atm_qos */
-+                              qos.aal = qos_compat.aal;
-+                              qos.rxtp.traffic_class = qos_compat.rxtp.traffic_class;
-+                              qos.rxtp.max_pcr = qos_compat.rxtp.max_pcr;
-+                              qos.rxtp.pcr = qos_compat.rxtp.pcr;
-+                              qos.rxtp.min_pcr = qos_compat.rxtp.min_pcr;
-+                              qos.rxtp.max_cdv = qos_compat.rxtp.max_cdv;
-+                              qos.rxtp.max_sdu = qos_compat.rxtp.max_sdu;
-+                              qos.rxtp.scr = 0;
-+                              qos.rxtp.mbs = 0;
-+                              qos.txtp.traffic_class = qos_compat.txtp.traffic_class;
-+                              qos.txtp.max_pcr = qos_compat.txtp.max_pcr;
-+                              qos.txtp.pcr = qos_compat.txtp.pcr;
-+                              qos.txtp.min_pcr = qos_compat.txtp.min_pcr;
-+                              qos.txtp.max_cdv = qos_compat.txtp.max_cdv;
-+                              qos.txtp.max_sdu = qos_compat.txtp.max_sdu;
-+                              qos.txtp.scr = 0;
-+                              qos.txtp.mbs = 0;
-+
-+                              error = check_qos(&qos);
-+                              if (error) return error;
-+                              if (sock->state == SS_CONNECTED)
-+                                      return atm_change_qos(vcc,&qos);
-+                              if (sock->state != SS_UNCONNECTED)
-+                                      return -EBADFD;
-+                              vcc->qos = qos;
-+                              set_bit(ATM_VF_HASQOS,&vcc->flags);
-+                              return 0;
-+                      }
-               case SO_ATMQOS:
-                       {
-                               struct atm_qos qos;
-@@ -1132,6 +1169,31 @@
-       vcc = ATM_SD(sock);
-       switch (optname) {
-+              case SO_ATMQOS_COMPAT:
-+                      {
-+                              struct atm_qos_compat qos_compat;
-+
-+                              if (!test_bit(ATM_VF_HASQOS,&vcc->flags))
-+                                      return -EINVAL;
-+
-+                              /* convert new atm_qos to old atm_qos */
-+                              qos_compat.aal = vcc->qos.aal;
-+                              qos_compat.rxtp.traffic_class = vcc->qos.rxtp.traffic_class;
-+                              qos_compat.rxtp.max_pcr = vcc->qos.rxtp.max_pcr;
-+                              qos_compat.rxtp.pcr = vcc->qos.rxtp.pcr;
-+                              qos_compat.rxtp.min_pcr = vcc->qos.rxtp.min_pcr;
-+                              qos_compat.rxtp.max_cdv = vcc->qos.rxtp.max_cdv;
-+                              qos_compat.rxtp.max_sdu = vcc->qos.rxtp.max_sdu;
-+                              qos_compat.txtp.traffic_class = vcc->qos.txtp.traffic_class;
-+                              qos_compat.txtp.max_pcr = vcc->qos.txtp.max_pcr;
-+                              qos_compat.txtp.pcr = vcc->qos.txtp.pcr;
-+                              qos_compat.txtp.min_pcr = vcc->qos.txtp.min_pcr;
-+                              qos_compat.txtp.max_cdv = vcc->qos.txtp.max_cdv;
-+                              qos_compat.txtp.max_sdu = vcc->qos.txtp.max_sdu;
-+
-+                              return copy_to_user(optval,&qos_compat,sizeof(qos_compat)) ?
-+                                  -EFAULT : 0;
-+                      }
-               case SO_ATMQOS:
-                       if (!test_bit(ATM_VF_HASQOS,&vcc->flags))
-                               return -EINVAL;
diff --git a/wrr-linux-2.4.9.patch b/wrr-linux-2.4.9.patch
deleted file mode 100644 (file)
index 7eb75d6..0000000
+++ /dev/null
@@ -1,1733 +0,0 @@
-diff -uNrbB v24-org/include/linux/pkt_sched.h v24-new/include/linux/pkt_sched.h
---- v24-org/include/linux/pkt_sched.h  Tue Apr 28 20:10:10 1998
-+++ v24-new/include/linux/pkt_sched.h  Sun Sep  9 14:34:14 2001
-@@ -274,4 +274,116 @@
- #define TCA_CBQ_MAX   TCA_CBQ_POLICE
-+/* WRR section */
-+
-+/* Other includes */
-+#include <linux/if_ether.h>
-+
-+// A sub weight and of a class
-+// All numbers are represented as parts of (2^64-1).
-+struct tc_wrr_class_weight {
-+  __u64 val;  // Current value                        (0 is not valid)
-+  __u64 decr; // Value pr bytes                       (2^64-1 is not valid)
-+  __u64 incr; // Value pr seconds                     (2^64-1 is not valid)
-+  __u64 min;  // Minimal value                        (0 is not valid)
-+  __u64 max;  // Minimal value                        (0 is not valid)
-+
-+  // The time where the above information was correct:
-+  time_t tim;
-+};
-+
-+// Pakcet send when modifying a class:
-+struct tc_wrr_class_modf {
-+  // Not-valid values are ignored.
-+  struct tc_wrr_class_weight weight1;
-+  struct tc_wrr_class_weight weight2;
-+};
-+
-+// Packet returned when quering a class:
-+struct tc_wrr_class_stats {
-+  char used; // If this is false the information below is invalid
-+
-+  struct tc_wrr_class_modf class_modf;
-+
-+  unsigned char addr[ETH_ALEN];
-+  char usemac;    // True if addr is a MAC address, else it is an IP address
-+                  // (this value is only for convience, it is always the same
-+                //  value as in the qdisc)
-+  int heappos;    // Current heap position or 0 if not in heap  
-+  __u64 penal_ls; // Penalty value in heap (ls)
-+  __u64 penal_ms; // Penalty value in heap (ms)
-+};
-+
-+// Qdisc-wide penalty information (boolean values - 2 not valid)
-+struct tc_wrr_qdisc_weight {
-+  char weight_mode; // 0=No automatic change to weight
-+                    // 1=Decrease normally
-+                  // 2=Also multiply with number of machines
-+                  // 3=Instead multiply with priority divided
-+                  //   with priority of the other.
-+                  // -1=no change
-+};
-+
-+// Packet send when modifing a qdisc:
-+struct tc_wrr_qdisc_modf {
-+  // Not-valid values are ignored:
-+  struct tc_wrr_qdisc_weight weight1;
-+  struct tc_wrr_qdisc_weight weight2;
-+};
-+
-+// Packet send when creating a qdisc:
-+struct tc_wrr_qdisc_crt {
-+  struct tc_wrr_qdisc_modf qdisc_modf;
-+  
-+  char srcaddr;      // 1=lookup source, 0=lookup destination
-+  char usemac;       // 1=Classify on MAC addresses, 0=classify on IP
-+  char usemasq;      // 1=Classify based on masqgrading - only valid
-+                     //   if usemac is zero
-+  int bands_max;     // Maximal number of bands (i.e.: classes)  
-+  int proxy_maxconn; // If differnt from 0 then we support proxy remapping
-+                     // of packets. And this is the number of maximal
-+                   // concurrent proxy connections.
-+};
-+
-+// Packet returned when quering a qdisc:
-+struct tc_wrr_qdisc_stats {
-+  struct tc_wrr_qdisc_crt qdisc_crt;
-+  int proxy_curconn;               
-+  int nodes_in_heap;  // Current number of bands wanting to send something
-+  int bands_cur;      // Current number of bands used (i.e.: MAC/IP addresses seen)
-+  int bands_reused;   // Number of times this band has been reused.
-+  int packets_requed; // Number of times packets have been requeued.
-+  __u64 priosum;      // Sum of priorities in heap where 1 is 2^32
-+};
-+
-+struct tc_wrr_qdisc_modf_std {
-+  // This indicates which of the tc_wrr_qdisc_modf structers this is:
-+  char proxy; // 0=This struct
-+
-+  // Should we also change a class?
-+  char change_class;
-+
-+  // Only valid if change_class is false
-+  struct tc_wrr_qdisc_modf qdisc_modf;
-+    
-+  // Only valid if change_class is true:
-+  unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0)
-+  struct tc_wrr_class_modf class_modf; // The change    
-+};
-+
-+// Used for proxyrempping:
-+struct tc_wrr_qdisc_modf_proxy {
-+  // This indicates which of the tc_wrr_qdisc_modf structers this is:
-+  char proxy; // 1=This struct
-+  
-+  // This is 1 if the proxyremap information should be reset
-+  char reset;
-+  
-+  // changec is the number of elements in changes.
-+  int changec; 
-+  
-+  // This is an array of type ProxyRemapBlock:
-+  long changes[0];  
-+};
-+
- #endif
-diff -uNrbB v24-org/net/sched/Config.in v24-new/net/sched/Config.in
---- v24-org/net/sched/Config.in        Sat Jan 15 04:18:53 2000
-+++ v24-new/net/sched/Config.in        Wed Jan  2 09:39:30 2002
-@@ -11,6 +11,7 @@
-    bool '  ATM pseudo-scheduler' CONFIG_NET_SCH_ATM
- fi
- tristate '  The simplest PRIO pseudoscheduler' CONFIG_NET_SCH_PRIO
-+tristate '  WRR packet scheduler' CONFIG_NET_SCH_WRR
- tristate '  RED queue' CONFIG_NET_SCH_RED
- tristate '  SFQ queue' CONFIG_NET_SCH_SFQ
- tristate '  TEQL queue' CONFIG_NET_SCH_TEQL
-diff -uNrbB v24-org/net/sched/Makefile v24-new/net/sched/Makefile
---- v24-org/net/sched/Makefile Wed Mar  7 07:44:15 2001
-+++ v24-new/net/sched/Makefile Wed May 30 13:28:41 2001
-@@ -13,6 +13,7 @@
- obj-$(CONFIG_NET_CLS_POLICE)  += police.o
- obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o 
- obj-$(CONFIG_NET_SCH_CBQ)     += sch_cbq.o
-+obj-$(CONFIG_NET_SCH_WRR)     += sch_wrr.o
- obj-$(CONFIG_NET_SCH_CSZ)     += sch_csz.o
- obj-$(CONFIG_NET_SCH_HPFQ)    += sch_hpfq.o
- obj-$(CONFIG_NET_SCH_HFSC)    += sch_hfsc.o
-diff -uNrbB v24-org/net/sched/proxydict.c v24-new/net/sched/proxydict.c
---- v24-org/net/sched/proxydict.c      Thu Jan  1 01:00:00 1970
-+++ v24-new/net/sched/proxydict.c      Thu Mar  1 20:33:02 2001
-@@ -0,0 +1,153 @@
-+#ifndef __KERNEL__
-+#include <string.h>
-+#include <netinet/in.h>
-+#endif
-+
-+#include "proxyremap.h"
-+#include "proxydict.h"
-+
-+
-+/*--------------------------------------------------------------------------
-+Implementation.
-+*/
-+
-+// Hash function
-+#define hash_fnc(m,server,port,proto) \
-+ (((proto)*7+(server)*13+(port)*5)%m->hash_size)
-+
-+// Size of hash table given maximal number of connections:
-+#define hash_size_max_con(max_con) (2*(max_con))
-+
-+// The memory area we maintain:
-+typedef struct {
-+  int hash_size;
-+  int max_con;
-+  int cur_con;
-+  
-+  int free_first;
-+  
-+  // Then we have:
-+  //   int hash_table[hash_size];
-+  //   int next[max_con];
-+  //   ProxyRemapBlock info[max_con];
-+  //
-+  // The idea is the following:
-+  //   Given a connection we map it by hash_fnc into hash_table. This gives an 
-+  //   index in next which contains a -1 terminated linked list of connections 
-+  //   mapping to that hash value.
-+  //
-+  //   The entries in next not allocated is also in linked list where 
-+  //   the first free index is free_first.
-+} memory;  
-+
-+#define Memory(m)     ((memory*)m)
-+#define Hash_table(m) ((int*)(((char*)m)+sizeof(memory)))
-+#define Next(m)       ((int*)(((char*)m)+sizeof(memory)+     \
-+                       sizeof(int)*((memory*)m)->hash_size))
-+#define Info(m)       ((ProxyRemapBlock*)(((char*)m)+                          \
-+                                           sizeof(memory)+                     \
-+                                           sizeof(int)*((memory*)m)->hash_size+\
-+                                         sizeof(int)*((memory*)m)->max_con   \
-+                                        ))
-+
-+int proxyGetMemSize(int max_con) {
-+  return sizeof(memory)+
-+         sizeof(int)*hash_size_max_con(max_con)+
-+       sizeof(int)*max_con+
-+       sizeof(ProxyRemapBlock)*max_con;
-+}
-+
-+void proxyInitMem(void* data, int max_con) {
-+  // Init m:
-+  memory* m=Memory(data);
-+  m->max_con=max_con;
-+  m->cur_con=0;
-+  m->hash_size=hash_size_max_con(max_con);
-+
-+  {
-+    // Get pointers:
-+    int* hash_table=Hash_table(data);
-+    int* next=Next(data);
-+    int i;
-+  
-+    // Init the hash table:
-+    for(i=0; i<m->hash_size; i++) hash_table[i]=-1;
-+  
-+    // Init the free-list
-+    for(i=0; i<m->max_con; i++) next[i]=i+1;
-+    m->free_first=0;
-+  }
-+}  
-+  
-+int proxyGetCurConn(void* data) {
-+  return Memory(data)->cur_con;
-+}
-+
-+int proxyGetMaxConn(void* data) {
-+  return Memory(data)->max_con;
-+}
-+
-+ProxyRemapBlock* proxyLookup(void* data, unsigned ipaddr, unsigned short port, char proto) {    
-+  memory* m=Memory(data);
-+  int* hash_table=Hash_table(m);
-+  int* next=Next(m);
-+  ProxyRemapBlock* info=Info(m);
-+  int i;
-+  
-+  for(i=hash_table[hash_fnc(m,ipaddr,port,proto)]; i!=-1; i=next[i]) {
-+    if(info[i].proto==proto &&
-+       info[i].sport==port &&
-+       info[i].saddr==ipaddr) return &info[i];
-+  }
-+       
-+  return 0;
-+}    
-+
-+int proxyConsumeBlock(void* data, ProxyRemapBlock* blk) {
-+  memory* m=Memory(data);
-+  int* hash_table=Hash_table(m);
-+  int* next=Next(m);
-+  ProxyRemapBlock* info=Info(m);
-+  int hash=hash_fnc(m,blk->saddr,blk->sport,blk->proto);
-+  int foo;
-+  
-+  if(blk->open) {
-+    if(m->cur_con == m->max_con) return -1;
-+    
-+    // Insert the block at a free entry:
-+    info[m->free_first]=*blk;
-+    m->cur_con++;
-+
-+    foo=next[m->free_first];
-+    
-+    // And insert it in the hash tabel:
-+    next[m->free_first]=hash_table[hash];
-+    hash_table[hash]=m->free_first;
-+    m->free_first=foo;
-+  } else {
-+    int* toupdate;
-+    
-+    // Find the block
-+    for(toupdate=&hash_table[hash]; 
-+        *toupdate!=-1; 
-+      toupdate=&next[*toupdate]) {
-+      if(info[*toupdate].proto==blk->proto &&
-+         info[*toupdate].sport==blk->sport &&
-+         info[*toupdate].saddr==blk->saddr) break;
-+    }
-+    if(*toupdate==-1) return -1;
-+
-+    foo=*toupdate;
-+    
-+    // Delete it from the hashing list:    
-+    *toupdate=next[*toupdate];
-+    
-+    // And put it on the free list:
-+    next[foo]=m->free_first;
-+    m->free_first=foo;
-+
-+    m->cur_con--;
-+  }
-+  
-+  return 0;
-+}
-diff -uNrbB v24-org/net/sched/proxydict.h v24-new/net/sched/proxydict.h
---- v24-org/net/sched/proxydict.h      Thu Jan  1 01:00:00 1970
-+++ v24-new/net/sched/proxydict.h      Tue Feb 13 22:47:00 2001
-@@ -0,0 +1,32 @@
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/*--------------------------------------------------------------------------
-+This is common code for for handling the tabels containing information about 
-+which proxyserver connections are associated with which machines..
-+*/
-+
-+// Returns the number of bytes that should be available in the area
-+// maintained by this module given the maximal number of concurrent 
-+// connections.
-+int proxyGetMemSize(int max_connections);
-+
-+// Initializes a memory area to use. There must be as many bytes
-+// available as returned by getMemSize.
-+void proxyInitMem(void* data, int max_connections);
-+
-+// Queries:
-+int proxyGetCurConn(void* data); // Returns current number of connections
-+int proxyMaxCurConn(void* data); // Returns maximal number of connections
-+
-+// This is called to open and close conenctions. Returns -1 if
-+// a protocol error occores (i.e.: If it is discovered)
-+int proxyConsumeBlock(void* data, ProxyRemapBlock*);
-+
-+// Returns the RemapBlock associated with this connection or 0:
-+ProxyRemapBlock* proxyLookup(void* data, unsigned ipaddr, unsigned short port, char proto);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-diff -uNrbB v24-org/net/sched/proxyremap.h v24-new/net/sched/proxyremap.h
---- v24-org/net/sched/proxyremap.h     Thu Jan  1 01:00:00 1970
-+++ v24-new/net/sched/proxyremap.h     Thu May 17 10:54:11 2001
-@@ -0,0 +1,33 @@
-+#ifndef PROXYREMAP_H
-+#define PROXYREMAP_H
-+
-+// This describes the information that is written in proxyremap.log and which
-+// are used in the communication between proxyremapserver and proxyremapclient.
-+// Everything is in network order.
-+
-+// First this header is send:
-+#define PROXY_WELCOME_LINE "ProxyRemap 1.02. This is a binary protocol.\r\n"
-+
-+// Then this block is send every time a connection is opened or closed.
-+// Note how it is alligned to use small space usage - arrays of this
-+// structure are saved in many places.
-+typedef struct {   
-+  // Server endpoint of connection:
-+  unsigned saddr;
-+  unsigned short sport;
-+
-+  // IP protocol for this connection (typically udp or tcp):
-+  unsigned char proto;
-+  
-+  // Is the connection opened or closed?
-+  unsigned char open;
-+  
-+  // Client the packets should be accounted to:
-+  unsigned caddr;
-+  unsigned char macaddr[6]; // Might be 0.
-+  
-+  // An informal two-charecter code from the proxyserver. Used for debugging.
-+  char proxyinfo[2];
-+} ProxyRemapBlock;
-+
-+#endif
-diff -uNrbB v24-org/net/sched/sch_wrr.c v24-new/net/sched/sch_wrr.c
---- v24-org/net/sched/sch_wrr.c        Thu Jan  1 01:00:00 1970
-+++ v24-new/net/sched/sch_wrr.c        Mon Apr  1 17:07:51 2002
-@@ -0,0 +1,1357 @@
-+/*-----------------------------------------------------------------------------
-+Weighted Round Robin scheduler.
-+  
-+Written by Christian Worm Mortensen, cworm@it-c.dk.
-+
-+Introduction
-+============
-+This module implements a weighted round robin queue with build-in classifier.
-+The classifier currently map each MAC or IP address (configurable either MAC
-+or IP and either source or destination) to different classes. Each such class 
-+is called a band. Whan using MAC addresses only bridged packets can be 
-+classified other packets go to a default MAC address.
-+
-+Each band has a weight value, where 0<weight<=1. The bandwidth each band
-+get is proportional to the weight as can be deduced from the next section.
-+
-+
-+The queue
-+=========
-+Each band has a penalty value. Bands having something to sent are kept in
-+a heap according to this value. The band with the lowest penalty value
-+is in the root of the heap. The penalty value is a 128 bit number. Initially 
-+no bands are in the heap.
-+
-+Two global 64 bit values counter_low_penal and couter_high_penal are initialized
-+to 0 and to 2^63 respectively.
-+
-+Enqueing:
-+  The packet is inserted in the queue for the band it belongs to. If the band 
-+  is not in the heap it is inserted into it. In this case, the upper 64 bits 
-+  of its penalty value is set to the same as for the root-band of the heap. 
-+  If the heap is empty 0 is used. The lower 64 bit is set to couter_low_penal
-+  and couter_low_penal is incremented by 1.
-+  
-+Dequing:
-+  If the heap is empty we have nothing to send. 
-+  
-+  If the root band has a non-empty queue a packet is dequeued from that.
-+  The upper 64 bit of the penalty value of the band is incremented by the 
-+  packet size divided with the weight of the band. The lower 64 bit is set to 
-+  couter_high_penal and couter_high_penal is incremented by 1.
-+
-+  If the root element for some reason has an  empty queue it is removed from 
-+  the heap and we try to dequeue again.
-+
-+The effect of the heap and the upper 64 bit of the penalty values is to 
-+implement a weighted round robin queue. The effect of counter_low_penal,
-+counter_high_penal and the lower 64 bit of the penalty value is primarily to
-+stabilize the queue and to give better quality of service to machines only 
-+sending a packet now and then. For example machines which have a single 
-+interactive connection such as telnet or simple text chatting.
-+
-+
-+Setting weight
-+==============
-+The weight value can be changed dynamically by the queue itself. The weight 
-+value and how it is changed is described by the two members weight1 and 
-+weight2 which has type tc_wrr_class_weight and which are in each class. And 
-+by the two integer value members of the qdisc called penalfact1 and penalfact2.
-+The structure is defined as:
-+
-+  struct tc_wrr_class_weight {
-+    // All are represented as parts of (2^64-1).
-+    __u64 val;  // Current value                        (0 is not valid)
-+    __u64 decr; // Value pr bytes                       (2^64-1 is not valid)
-+    __u64 incr; // Value pr seconds                     (2^64-1 is not valid)
-+    __u64 min;  // Minimal value                        (0 is not valid)
-+    __u64 max;  // Minimal value                        (0 is not valid)
-+
-+    // The time where the above information was correct:
-+    time_t tim;
-+  };
-+    
-+The weight value used by the dequeue operations is calculated as 
-+weight1.val*weight2.val. weight1 and weight2 and handled independently and in the 
-+same way as will be described now.
-+
-+Every second, the val parameter is incremented by incr.
-+
-+Every time a packet is transmitted the value is increment by decr times
-+the packet size. Depending on the value of the weight_mode parameter it
-+is also mulitplied with other numbers. This makes it possible to give 
-+penalty to machines transferring much data.
-+
-+-----------------------------------------------------------------------------*/
-+
-+#include <linux/config.h>
-+#include <linux/module.h>
-+#include <asm/uaccess.h>
-+#include <asm/system.h>
-+#include <asm/bitops.h>
-+#include <linux/types.h>
-+#include <linux/kernel.h>
-+#include <linux/sched.h>
-+#include <linux/string.h>
-+#include <linux/mm.h>
-+#include <linux/socket.h>
-+#include <linux/sockios.h>
-+#include <linux/in.h>
-+#include <linux/errno.h>
-+#include <linux/interrupt.h>
-+#include <linux/if_ether.h>
-+#include <linux/inet.h>
-+#include <linux/netdevice.h>
-+#include <linux/etherdevice.h>
-+#include <linux/notifier.h>
-+#include <net/ip.h>
-+#include <net/route.h>
-+#include <linux/skbuff.h>
-+#include <net/sock.h>
-+#include <net/pkt_sched.h>
-+
-+#include <linux/if_arp.h>
-+#include <linux/version.h>
-+
-+// Kernel depend stuff:
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
-+  #define KERNEL22
-+#endif
-+
-+#ifdef KERNEL22  
-+  #define LOCK_START start_bh_atomic();
-+  #define LOCK_END   end_bh_atomic();
-+  #define ENQUEUE_SUCCESS 1
-+  #define ENQUEUE_FAIL    0
-+  #ifdef CONFIG_IP_MASQUERADE      
-+    #include <net/ip_masq.h>
-+    #define MASQ_SUPPORT
-+  #endif
-+#else
-+  #define LOCK_START sch_tree_lock(sch);
-+  #define LOCK_END   sch_tree_unlock(sch);
-+  #define ENQUEUE_SUCCESS 0
-+  #define ENQUEUE_FAIL    NET_XMIT_DROP
-+  #ifdef CONFIG_NETFILTER
-+    #include <linux/netfilter_ipv4/ip_conntrack.h>
-+    #define MASQ_SUPPORT
-+  #endif
-+#endif  
-+
-+#include "proxydict.c"
-+
-+// The penalty (priority) type:
-+typedef u64 penalty_base_t;
-+#define penalty_base_t_max ((penalty_base_t)-1)
-+typedef struct penalty_t {
-+  penalty_base_t ms;
-+  penalty_base_t ls;
-+} penalty_t;
-+#define penalty_leq(a,b) (a.ms<b.ms || (a.ms==b.ms && a.ls<=b.ls))
-+#define penalty_le(a,b)  (a.ms<b.ms || (a.ms==b.ms && a.ls<b.ls))
-+static penalty_t penalty_max={penalty_base_t_max,penalty_base_t_max};
-+
-+//-----------------------------------------------------------------------------
-+// A generel heap.
-+
-+struct heap;
-+struct heap_element;
-+
-+// Initializes an empty heap:
-+//   he:   A pointer to an unintialized heap structure identifying the heap
-+//   size: Maximal number of elements the heap can contain
-+//   poll: An array of size "size" used by the heap.     
-+static void heap_init(struct heap* he,int size, struct heap_element* poll);
-+
-+// Each element in the heap is identified by a user-assigned id which
-+// should be a non negative integer less than the size argument
-+// given to heap_init.
-+static void heap_insert(struct heap*, int id, penalty_t);
-+static void heap_remove(struct heap*, int id);
-+static void heap_set_penalty(struct heap*, int id, penalty_t);
-+
-+// Retreviewing information:
-+static char      heap_empty(struct heap*); // Heap empty?
-+static char      heap_contains(struct heap*, int id); // Does heap contain 
-+                                                      // the given id?
-+static int       heap_root(struct heap*);  // Returns the id of the root
-+static penalty_t heap_get_penalty(struct heap*, int id); // Returns penaly
-+                                                         // of root node
-+
-+//--------------------
-+// Heap implementation
-+
-+struct heap_element {
-+  penalty_t penalty;
-+  int id;             // The user-assigned id of this element
-+  int id2idx;         // Maps from user-assigned ids to indices in root_1
-+};
-+
-+struct heap {
-+  struct heap_element* root_1;
-+  int elements;
-+};
-+
-+// Heap implementation:
-+static void heap_init(struct heap* h, int size, struct heap_element* poll) {
-+  int i;
-+  
-+  h->elements=0;
-+  h->root_1=poll-1;
-+  
-+  for(i=0; i<size; i++) poll[i].id2idx=0;
-+};
-+
-+static char heap_empty(struct heap* h) {
-+  return h->elements==0;
-+}
-+
-+static char heap_contains(struct heap* h, int id) {
-+  return h->root_1[id+1].id2idx!=0;
-+}
-+
-+static int heap_root(struct heap* h) {
-+  return h->root_1[1].id;
-+}
-+
-+static penalty_t heap_get_penalty(struct heap* h, int id) {
-+  return h->root_1[ h->root_1[id+1].id2idx ].penalty;
-+}
-+
-+static void heap_penalty_changed_internal(struct heap* h,int idx);
-+
-+static void heap_set_penalty(struct heap* h, int id, penalty_t p) {
-+  int idx=h->root_1[id+1].id2idx;
-+  h->root_1[idx].penalty=p;
-+  heap_penalty_changed_internal(h,idx);
-+}
-+
-+static void heap_insert(struct heap* h, int id, penalty_t p) {
-+  // Insert at the end of the heap:
-+  h->elements++;
-+  h->root_1[h->elements].id=id;
-+  h->root_1[h->elements].penalty=p;
-+  h->root_1[id+1].id2idx=h->elements;
-+  
-+  // And put it in the right position:
-+  heap_penalty_changed_internal(h,h->elements);
-+}
-+
-+static void heap_remove(struct heap* h, int id) {
-+  int idx=h->root_1[id+1].id2idx;
-+  int mvid;
-+  h->root_1[id+1].id2idx=0;
-+  
-+  if(h->elements==idx)  { h->elements--; return; }
-+  
-+  mvid=h->root_1[h->elements].id;
-+  h->root_1[idx].id=mvid;
-+  h->root_1[idx].penalty=h->root_1[h->elements].penalty;
-+  h->root_1[mvid+1].id2idx=idx;
-+  
-+  h->elements--;
-+  heap_penalty_changed_internal(h,idx);
-+}  
-+
-+static void heap_swap(struct heap* h, int idx0, int idx1) {
-+  penalty_t tmp_p;
-+  int       tmp_id;
-+  int       id0,id1;
-+  
-+  // Simple content:
-+  tmp_p=h->root_1[idx0].penalty;
-+  tmp_id=h->root_1[idx0].id;
-+  h->root_1[idx0].penalty=h->root_1[idx1].penalty;
-+  h->root_1[idx0].id=h->root_1[idx1].id;
-+  h->root_1[idx1].penalty=tmp_p;
-+  h->root_1[idx1].id=tmp_id;
-+  
-+  // Update reverse pointers:
-+  id0=h->root_1[idx0].id;
-+  id1=h->root_1[idx1].id;
-+  h->root_1[id0+1].id2idx=idx0;
-+  h->root_1[id1+1].id2idx=idx1;
-+}
-+
-+static void heap_penalty_changed_internal(struct heap* h,int cur) {
-+  if(cur==1 || penalty_leq(h->root_1[cur>>1].penalty,h->root_1[cur].penalty)) {
-+    // We are in heap order upwards - so we should move the element down
-+    for(;;) {
-+      int nxt0=cur<<1;
-+      int nxt1=nxt0+1;
-+      penalty_t pen_c=h->root_1[cur].penalty;
-+      penalty_t pen_0=nxt0<=h->elements ? h->root_1[nxt0].penalty : penalty_max;
-+      penalty_t pen_1=nxt1<=h->elements ? h->root_1[nxt1].penalty : penalty_max;
-+    
-+      if(penalty_le(pen_0,pen_c) && penalty_leq(pen_0,pen_1)) {
-+        // Swap with child 0:
-+      heap_swap(h,cur,nxt0);
-+        cur=nxt0;
-+      } else if(penalty_le(pen_1,pen_c)) {
-+        // Swap with child 1:
-+      heap_swap(h,cur,nxt1);
-+      cur=nxt1;
-+      } else {
-+        // Heap in heap order:
-+        return;
-+      }
-+    }
-+  } else {
-+    // We are not in heap order upwards (and thus we must be it downwards).
-+    // We move up:
-+    while(cur!=1) { // While not root
-+      int nxt=cur>>1;
-+      if(penalty_leq(h->root_1[nxt].penalty,h->root_1[cur].penalty)) return;
-+      heap_swap(h,cur,nxt);
-+      cur=nxt;
-+    }
-+  }
-+};
-+
-+//-----------------------------------------------------------------------------
-+// Classification based on MAC or IP adresses. Note that of historical reason
-+// these are prefixed with mac_ since originally only MAC bases classification
-+// was supported.
-+//
-+// This code should be in a separate filter module - but it isn't.
-+
-+// Interface:
-+
-+struct mac_head;
-+
-+// Initialices/destroys the structure we maintain.
-+// Returns -1 on error
-+static int  mac_init(struct mac_head*, int max_macs, char srcaddr, 
-+                     char usemac, char usemasq, void* proxyremap);
-+static void mac_done(struct mac_head*);
-+static void mac_reset(struct mac_head*);
-+
-+// Classify a packet. Returns a number n where 0<=n<max_macs. Or -1 if
-+// the packet should be dropped.
-+static int mac_classify(struct mac_head*, struct sk_buff *skb);
-+
-+//-------------
-+// Implementation:
-+
-+struct mac_addr {
-+  unsigned char addr[ETH_ALEN]; // Address of this band (last two are 0 on IP)
-+  unsigned long lastused;       // Last time a packet was encountered
-+  int class;                    // Classid of this band (0<=classid<max_macs)
-+};
-+
-+static int mac_compare(const void* a, const void* b) {
-+  return memcmp(a,b,ETH_ALEN);
-+}
-+
-+struct mac_head {
-+  int mac_max;    // Maximal number of MAC addresses/classes allowed
-+  int mac_cur;    // Current number of MAC addresses/classes
-+  int mac_reused; // Number of times we have reused a class with a new 
-+                  // address.
-+  u64 incr_time;
-+  char srcaddr;   // True if we classify on the source address of packets,
-+                  // else we use destination address.
-+  char usemac;    // If true we use mac, else we use IP
-+  char usemasq;   // If true we try to demasqgrade
-+  struct mac_addr* macs; // Allocated mac_max elements, used max_cur
-+  char* cls2mac;         // Mapping from classnumbers to addresses -
-+                         // there is 6 bytes in each entry
-+                          
-+  void* proxyremap; // Information on proxy remapping of data or 0
-+};
-+
-+// This is as the standard C library function with the same name:
-+static const void* bsearch(const void* key, const void* base, int nmemb, 
-+                           size_t size, 
-+                         int (*compare)(const void*, const void*)) {  
-+  int m_idx;
-+  const void* m_ptr;
-+  int i;
-+  
-+  if(nmemb<=0) return 0;
-+  
-+  m_idx=nmemb>>1;
-+  m_ptr=((const char*)base)+m_idx*size;
-+  
-+  i=compare(key,m_ptr);
-+  if(i<0) // key is less
-+    return bsearch(key,base,m_idx,size,compare);
-+  else if(i>0)
-+    return bsearch(key,((const char*)m_ptr)+size,nmemb-m_idx-1,size,compare);
-+    
-+  return m_ptr;
-+}
-+
-+static int mac_init(struct mac_head* h, int max_macs, char srcaddr, 
-+                    char usemac, char usemasq,void* proxyremap) {
-+  h->mac_cur=0;
-+  h->mac_reused=0;
-+  h->incr_time=0;
-+  h->srcaddr=srcaddr;
-+  h->usemac=usemac;
-+  h->usemasq=usemasq;
-+  h->mac_max=max_macs;
-+  h->proxyremap=proxyremap;
-+
-+  h->macs=(struct mac_addr*)
-+    kmalloc( sizeof(struct mac_addr)*max_macs, GFP_KERNEL);
-+  h->cls2mac=(char*)kmalloc( 6*max_macs, GFP_KERNEL);
-+  if(!h->macs || !h->cls2mac) {
-+    if(h->macs) kfree(h->macs);
-+    if(h->cls2mac) kfree(h->cls2mac);
-+    return -1;
-+  }
-+  return 0;
-+}
-+
-+static void mac_done(struct mac_head* h) {
-+  kfree(h->macs);
-+  kfree(h->cls2mac);
-+}
-+
-+static void mac_reset(struct mac_head* h) {
-+  h->mac_cur=0;
-+  h->mac_reused=0;
-+  h->incr_time=0;
-+}
-+
-+static int lookup_mac(struct mac_head* h, unsigned char* addr) {
-+  int i;
-+  int class;
-+  
-+  // First try to find the address in the table:  
-+  struct mac_addr* m=(struct mac_addr*)
-+    bsearch(addr,h->macs,h->mac_cur,sizeof(struct mac_addr),mac_compare);
-+  if(m) {
-+    // Found:
-+    m->lastused=h->incr_time++;
-+    return m->class;
-+  }
-+  
-+  // Okay - the MAC adress was not in table
-+  if(h->mac_cur==h->mac_max) {
-+    // And the table is full - delete the oldest entry:
-+
-+    // Find the oldest entry:
-+    int lowidx=0;
-+    int i;
-+    for(i=1; i<h->mac_cur; i++) 
-+      if(h->macs[i].lastused < h->macs[lowidx].lastused) lowidx=i;
-+    
-+    class=h->macs[lowidx].class;
-+    
-+    // And delete it:
-+    memmove(&h->macs[lowidx],&h->macs[lowidx+1],
-+            (h->mac_cur-lowidx-1)*sizeof(struct mac_addr));
-+    h->mac_reused++;
-+    h->mac_cur--;
-+  } else {
-+    class=h->mac_cur;
-+  }
-+  
-+  // The table is now not full - find the position we should put the address in:
-+  for(i=0; i<h->mac_cur; i++) if(mac_compare(addr,&h->macs[i])<0) break;
-+  
-+  // We should insert at position i:
-+  memmove(&h->macs[i+1],&h->macs[i],(h->mac_cur-i)*sizeof(struct mac_addr));
-+  m=&h->macs[i];
-+  memcpy(m->addr,addr,ETH_ALEN);
-+  m->lastused=h->incr_time++;
-+  m->class=class;
-+  h->mac_cur++;
-+  
-+  // Finally update the cls2mac variabel:
-+  memcpy(h->cls2mac+ETH_ALEN*class,addr,ETH_ALEN);
-+  
-+  return m->class;
-+}
-+
-+int valid_ip_checksum(struct iphdr* ip, int size) {
-+  __u16 header_len=ip->ihl<<2;
-+  __u16 c=0;
-+  __u16* ipu=(u16*)ip;
-+  int a;
-+  
-+  // We require 4 bytes in the packet since we access the port numbers:  
-+  if((size<header_len) || size<sizeof(struct iphdr)+4) return 0;
-+  
-+  for(a=0; a<(header_len>>1); a++, ipu++) {
-+    if(a!=5) { // If not the checksum field
-+      __u16 oldc=c;   
-+      c+=(*ipu); 
-+      if(c<oldc) c++;   
-+    }
-+  }
-+  
-+  return ip->check==(__u16)~c;
-+}   
-+ 
-+static int mac_classify(struct mac_head* head, struct sk_buff *skb)
-+{
-+  // We set this to the address we map to. In case we map to an IP
-+  // address the last two entries are set to 0.
-+  unsigned char addr[ETH_ALEN];
-+  
-+  
-+  // This is the size of the network part of the packet, I think:
-+  int size=((char*)skb->data+skb->len)-((char*)skb->nh.iph);
-+
-+  // Set a default value for the address:
-+  memset(addr,0,ETH_ALEN);
-+  
-+  // Accept IP-ARP traffic with big-enough packets:
-+  if(ntohs(skb->protocol)==ETH_P_ARP && 
-+           ntohs(skb->nh.arph->ar_pro)==ETH_P_IP) {
-+    // Map all ARP trafic to a default adress to make sure
-+    // it goes through
-+  } else if ((ntohs(skb->protocol)==ETH_P_IP) && 
-+          valid_ip_checksum(skb->nh.iph,size)) {
-+    // Accept IP packets which have correct checksum.
-+           
-+    // This is the IP header:
-+    struct iphdr* iph=skb->nh.iph;
-+    
-+    // And this is the port numbers:
-+    const __u16 *portp = (__u16 *)&(((char *)iph)[iph->ihl*4]);
-+    __u16 sport=portp[0];
-+    __u16 dport=portp[1];
-+    
-+    // We will set this to the IP address of the packet that should be
-+    // accounted to:
-+    unsigned ipaddr;
-+    
-+    // Used below:    
-+    ProxyRemapBlock* prm;
-+    
-+    // Set ipaddr:
-+    if(head->srcaddr) 
-+      ipaddr=iph->saddr;
-+    else
-+      ipaddr=iph->daddr;
-+      
-+#ifdef MASQ_SUPPORT
-+    // Update ipaddr if packet is masqgraded:
-+    if(head->usemasq) {
-+      #ifdef KERNEL22
-+        struct ip_masq* src;
-+
-+        // HACK!:
-+        //   ip_masq_in_get must be called for packets comming from the outside
-+        //   to the firewall. We have a a packet which is comming from the 
-+      //   firewall to the outside - so we switch the parameters:
-+        if((src=ip_masq_in_get(
-+             iph->protocol,
-+             iph->daddr,dport,
-+             iph->saddr,sport))) {
-+          // Use masqgraded address:
-+        ipaddr=src->saddr;
-+      
-+        // It seems like we must put it back:
-+        ip_masq_put(src);
-+        }
-+      #else
-+        // Thanks to Rusty Russell for help with the following code:
-+        enum ip_conntrack_info ctinfo;
-+        struct ip_conntrack *ct;
-+        ct = ip_conntrack_get(skb, &ctinfo);
-+        if (ct) {
-+          if(head->srcaddr)
-+            ipaddr=ct->tuplehash[CTINFO2DIR(ctinfo)].tuple.src.ip;
-+        else
-+            ipaddr=ct->tuplehash[CTINFO2DIR(ctinfo)].tuple.dst.ip;
-+        }
-+      #endif
-+    }
-+#endif    
-+
-+    // Set prm based on ipaddr:
-+    prm=0;
-+    if(head->proxyremap) {
-+      if(head->srcaddr) {
-+        prm=proxyLookup(head->proxyremap,ipaddr,sport,skb->nh.iph->protocol);
-+      } else {
-+        prm=proxyLookup(head->proxyremap,ipaddr,dport,skb->nh.iph->protocol);
-+      }
-+    }
-+    
-+    // And finally set addr to the address:
-+    memset(addr,0,ETH_ALEN);
-+    if(prm) {
-+      // This package should be remapped:
-+      if(head->usemac) 
-+        memcpy(addr,prm->macaddr,ETH_ALEN);
-+      else {
-+        memcpy(addr,&prm->caddr,sizeof(unsigned));
-+      }
-+    } else {
-+      // This packet should not be remapped:
-+      if(head->usemac) {      
-+        // We should find MAC address of packet.
-+      // Unfortunatly, this is not always available.
-+      // On bridged packets it always is, however..
-+      #ifdef KERNEL22
-+          if(skb->pkt_bridged) {
-+            if(head->srcaddr) {
-+              memcpy(addr,skb->mac.ethernet->h_source,ETH_ALEN);
-+            } else {
-+              memcpy(addr,skb->mac.ethernet->h_dest,ETH_ALEN);
-+          }
-+        }
-+      #endif  
-+      } else {
-+        memcpy(addr,&ipaddr,4);              
-+      } 
-+    }
-+  } else {
-+    // All other traffic is dropped - this ensures that packets
-+    // we consider probably have valid addresses so we don't
-+    // get to many strange addresses into our table. And that we
-+    // don't use bandwidth on strange packets..
-+    return -1;
-+  }
-+  
-+  return lookup_mac(head,addr);
-+}
-+
-+//-----------------------------------------------------------------------------
-+// The qdisc itself
-+
-+// Pr-class information.
-+struct wrrc_sched_data {
-+  struct Qdisc* que;                   // The queue for this class
-+  struct tc_wrr_class_modf class_modf; // Information about the class.
-+  
-+  // For classes in the heap this is the priority value priosum
-+  // was updated with for this class:
-+  u64 priosum_val;
-+};  
-+
-+// Pr-qdisc information:
-+struct wrr_sched_data
-+{
-+  // A heap containing all the bands that will send something
-+  struct heap h;
-+  struct heap_element* poll; // bandc elements
-+  
-+  // The sum of the prioities of the elements in the heap where
-+  // a priority of 1 is saved as 2^32
-+  u64 priosum;
-+  
-+  // A class for each band
-+  struct wrrc_sched_data* bands; // bandc elements
-+  
-+  // Information maintained by the proxydict module of 0 if we
-+  // have no proxy remapping
-+  void* proxydict;
-+  
-+  // Always incrementning counters, we always have that any value of
-+  // counter_low_penal < any value of counter_high_penal.
-+  penalty_base_t counter_low_penal;
-+  penalty_base_t counter_high_penal;
-+  
-+  // Penalty updating:
-+  struct tc_wrr_qdisc_modf qdisc_modf;
-+  
-+  // Statistics:
-+  int packets_requed;
-+  
-+  // The filter:
-+  struct mac_head filter;  
-+  int bandc; // Number of bands
-+};
-+
-+// Priority handling.
-+//   weight is in interval [0..2^32]
-+//   priosum has whole numbers in the upper and fragments in the lower 32 bits. 
-+static void weight_transmit(struct tc_wrr_class_weight* p, 
-+                            struct tc_wrr_qdisc_weight q,
-+                          unsigned heapsize,
-+                          u64 priosum, u64 weight,
-+                          unsigned size) {
-+
-+  unsigned long now=jiffies/HZ;
-+  
-+  // Penalty for transmitting:
-+  u64 change,old;
-+  u32 divisor;
-+  
-+  change=0;
-+  switch(q.weight_mode) {
-+    case 1: change=p->decr*size; break;
-+    case 2: change=p->decr*size*heapsize; break;
-+    case 3: // Note: 64 bit division is not always available..
-+      divisor=(u32)(weight>>16);
-+      if(divisor<=0) divisor=1;
-+      change=p->decr*size*(((u32)(priosum>>16))/divisor); break;
-+  }
-+  old=p->val;
-+  p->val-=change;
-+  if(p->val>old || p->val<p->min) p->val=p->min;
-+  
-+  // Credit for time went:
-+  change=(now-p->tim)*p->incr;
-+  p->tim=now;
-+  old=p->val;
-+  p->val+=change;
-+  if(p->val<old || p->val>p->max) p->val=p->max;
-+}  
-+
-+static void weight_setdefault(struct tc_wrr_class_weight* p) {
-+  p->val=(u64)-1;
-+  p->decr=0;
-+  p->incr=0;
-+  p->min=(u64)-1;
-+  p->max=(u64)-1;
-+  p->tim=jiffies/HZ;  
-+}
-+
-+static void weight_setvalue(struct tc_wrr_class_weight* dst, 
-+                            struct tc_wrr_class_weight* src) {
-+  if(src->val!=0) {
-+    dst->val=src->val;
-+    dst->tim=jiffies/HZ;
-+  }
-+  if(src->min!=0) dst->min=src->min;
-+  if(src->max!=0) dst->max=src->max;
-+  if(src->decr!=((u64)-1)) dst->decr=src->decr;
-+  if(src->incr!=((u64)-1)) dst->incr=src->incr;
-+  if(dst->val<dst->min) dst->val=dst->min;
-+  if(dst->val>dst->max) dst->val=dst->max;
-+}
-+
-+static void wrr_destroy(struct Qdisc *sch)
-+{
-+  struct wrr_sched_data *q=(struct wrr_sched_data *)sch->data;
-+  int i;
-+  
-+  // Destroy our filter:
-+  mac_done(&q->filter);
-+
-+  // Destroy all our childre ques:
-+  for(i=0; i<q->bandc; i++) 
-+    qdisc_destroy(q->bands[i].que);
-+    
-+  // And free memory:
-+  kfree(q->bands);
-+  kfree(q->poll);  
-+  if(q->proxydict) kfree(q->proxydict);
-+  
-+  MOD_DEC_USE_COUNT;
-+}
-+
-+static int wrr_init(struct Qdisc *sch, struct rtattr *opt)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  int i,maciniterr;
-+  char crterr;
-+  struct tc_wrr_qdisc_crt *qopt;
-+  
-+  // Parse options:
-+  if (!opt) return -EINVAL; // Options must be specified
-+  if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) return -EINVAL;
-+  qopt = RTA_DATA(opt);
-+
-+  if(qopt->bands_max>2048|| qopt->bands_max<2) {
-+    // More than 2048 queues or less than 2? That cannot be true - it must be 
-+    // an error...
-+    return -EINVAL;
-+  }
-+  
-+  if(qopt->proxy_maxconn<0 || qopt->proxy_maxconn>20000) {
-+    // More than this number of maximal concurrent connections is unrealistic
-+    return -EINVAL;
-+  }
-+
-+#ifndef MASQ_SUPPORT
-+  if(qopt->usemasq) { 
-+    return -ENOSYS;
-+  }
-+#endif  
-+
-+#ifndef KERNEL22
-+  if(qopt->usemac) { // Not supported - please fix this!
-+    return -ENOSYS;
-+  }
-+#endif      
-+
-+  q->bandc=qopt->bands_max;
-+  q->qdisc_modf=qopt->qdisc_modf;
-+  
-+  // Create structures:
-+  q->poll=(struct heap_element*)
-+           kmalloc( sizeof(struct heap_element)*q->bandc, GFP_KERNEL);
-+  q->bands=(struct wrrc_sched_data*)
-+           kmalloc( sizeof(struct wrrc_sched_data)*q->bandc, GFP_KERNEL);
-+  
-+  if(qopt->proxy_maxconn>0) {
-+    q->proxydict=kmalloc(proxyGetMemSize(qopt->proxy_maxconn),GFP_KERNEL);
-+  } else {
-+    q->proxydict=0;
-+  }
-+  
-+  // Init mac module:
-+  maciniterr=mac_init(&q->filter,qopt->bands_max,qopt->srcaddr,
-+                      qopt->usemac,qopt->usemasq,q->proxydict);
-+
-+  // See if we got the memory we wanted:
-+  if(!q->poll || !q->bands || 
-+    (qopt->proxy_maxconn>0 && !q->proxydict) || maciniterr<0) {
-+    if(q->poll) kfree(q->poll);
-+    if(q->bands) kfree(q->bands);
-+    if(q->proxydict) kfree(q->proxydict);
-+    if(maciniterr>=0) mac_done(&q->filter);
-+    return -ENOSPC;
-+  }
-+  
-+  // Initialize proxy:
-+  if(q->proxydict) {
-+    proxyInitMem(q->proxydict,qopt->proxy_maxconn);
-+  }
-+    
-+  // Initialize values:    
-+  q->counter_low_penal=0;
-+  q->counter_high_penal=penalty_base_t_max>>1;
-+  q->packets_requed=0;
-+  
-+  // Initialize empty heap:
-+  heap_init(&q->h,q->bandc,q->poll);
-+  q->priosum=0;
-+  
-+  // Initialize each band:
-+  crterr=0;
-+  for (i=0; i<q->bandc; i++) {
-+    weight_setdefault(&q->bands[i].class_modf.weight1);
-+    weight_setdefault(&q->bands[i].class_modf.weight2);
-+    if(!crterr) {
-+      struct Qdisc *child=qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops);
-+      if(child)
-+        q->bands[i].que = child;
-+      else {
-+        // Queue couldn't be created :-(
-+        crterr=1;
-+      }
-+    }
-+    if(crterr) q->bands[i].que = &noop_qdisc;
-+  }
-+      
-+  MOD_INC_USE_COUNT;
-+  
-+  if(crterr) {
-+    // Destroy again:
-+    wrr_destroy(sch);
-+    return -ENOMEM;
-+  }
-+  
-+  return 0;
-+}
-+
-+static void wrr_reset(struct Qdisc* sch)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  int i;
-+  
-+  // Reset own values:
-+  q->counter_low_penal=0;
-+  q->counter_high_penal=penalty_base_t_max>>1;
-+  q->packets_requed=0;
-+  
-+  // Reset filter:
-+  mac_reset(&q->filter);
-+  
-+  // Reinitialize heap:
-+  heap_init(&q->h,q->bandc,q->poll);
-+  q->priosum=0;
-+  
-+  // Reset all bands:
-+  for (i=0; i<q->bandc; i++) {
-+    weight_setdefault(&q->bands[i].class_modf.weight1);
-+    weight_setdefault(&q->bands[i].class_modf.weight2);
-+    qdisc_reset(q->bands[i].que);
-+  }
-+  
-+  // Reset proxy remapping information:
-+  if(q->proxydict)
-+    proxyInitMem(q->proxydict,proxyGetMaxConn(q->proxydict));
-+}
-+
-+static int wrr_enqueue(struct sk_buff *skb, struct Qdisc* sch)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  int retvalue=ENQUEUE_FAIL;
-+  
-+  // The packet is in skb.
-+  int band=mac_classify(&q->filter,skb);
-+
-+  if(band>=0) {
-+    // Enque packet for this band:
-+    struct Qdisc* qdisc = q->bands[band].que;
-+
-+    if ((retvalue=qdisc->enqueue(skb, qdisc)) == ENQUEUE_SUCCESS) {
-+      // Successfull
-+      sch->stats.bytes += skb->len;
-+      sch->stats.packets++;
-+      sch->q.qlen++;
-+        
-+      // Insert band into heap if not already there:
-+      if(!heap_contains(&q->h,band)) {        
-+        penalty_t p;
-+      if(!heap_empty(&q->h)) 
-+        p.ms=heap_get_penalty(&q->h,heap_root(&q->h)).ms;
-+      else
-+        p.ms=0;
-+      p.ls=q->counter_low_penal++;
-+        heap_insert(&q->h,band,p);
-+      q->bands[band].priosum_val=
-+        ((q->bands[band].class_modf.weight1.val>>48)+1)*
-+          ((q->bands[band].class_modf.weight2.val>>48)+1);
-+      q->priosum+=q->bands[band].priosum_val;
-+      }
-+    }
-+  } else {
-+    // If we decide not to enque it seems like we also need to free the packet:
-+    kfree_skb(skb);
-+  }
-+  
-+  if(retvalue!=ENQUEUE_SUCCESS) {
-+    // Packet not enqued:
-+    sch->stats.drops++;
-+  }
-+  
-+  return retvalue;
-+}
-+
-+static struct sk_buff *wrr_dequeue(struct Qdisc* sch)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  struct sk_buff* skb;
-+  int band;
-+  u64 weight,priosum;
-+  struct wrrc_sched_data* b;
-+  
-+  // Return if heap is empty:
-+  if(heap_empty(&q->h)) return 0;
-+  
-+  // Find root element:
-+  band=heap_root(&q->h);
-+  
-+  // Find priority of this element in interval [1;2^32]
-+  b=&q->bands[band];
-+  weight=((b->class_modf.weight1.val>>48)+1)*
-+         ((b->class_modf.weight2.val>>48)+1); //weight is in interval [1;2^32]
-+  priosum=q->priosum;
-+  q->priosum-=q->bands[band].priosum_val;
-+  
-+  // Deque the packet from the root:
-+  skb=q->bands[band].que->dequeue(q->bands[band].que);  
-+  
-+  if(skb) {
-+    // There was a packet in this que.
-+    unsigned adjlen;
-+    penalty_t p;
-+    
-+    // Find length of packet adjusted with priority:
-+    adjlen=(u32)(weight>>(32-16));
-+    if(adjlen==0) adjlen=1;
-+    adjlen=(skb->len<<16)/adjlen;
-+         
-+    // Update penalty information for this class:
-+    weight_transmit(&b->class_modf.weight1,q->qdisc_modf.weight1,q->h.elements,priosum,weight,skb->len);
-+    weight_transmit(&b->class_modf.weight2,q->qdisc_modf.weight2,q->h.elements,priosum,weight,skb->len);
-+    q->bands[band].priosum_val=((b->class_modf.weight1.val>>48)+1)*
-+                               ((b->class_modf.weight2.val>>48)+1);    
-+    q->priosum+=q->bands[band].priosum_val;          
-+        
-+    // And update the class in the heap
-+    p=heap_get_penalty(&q->h,band);    
-+    p.ms+=adjlen;  
-+    p.ls=q->counter_high_penal++; 
-+    heap_set_penalty(&q->h,band,p);
-+    
-+    // Return packet:
-+    sch->q.qlen--;
-+    return skb;
-+  }
-+  
-+  // No packet - so machine should be removed from heap:
-+  heap_remove(&q->h,band);
-+  
-+  // And try again:
-+  return wrr_dequeue(sch);
-+}
-+
-+static int wrr_requeue(struct sk_buff *skb, struct Qdisc* sch)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  struct Qdisc* qdisc;
-+  int ret;
-+  
-+  // Find band we took it from:
-+  int band=mac_classify(&q->filter,skb);
-+  if(band<0) { 
-+    // Who should now free the pakcet?
-+    printk(KERN_DEBUG "sch_wrr: Oops - packet requed could never have been queued.\n");
-+    sch->stats.drops++; 
-+    return ENQUEUE_FAIL; 
-+  }
-+
-+  q->packets_requed++;
-+  
-+  // Try to requeue it on that machine:
-+  qdisc=q->bands[band].que;
-+
-+  if((ret=qdisc->ops->requeue(skb,qdisc))==ENQUEUE_SUCCESS) {
-+    // On success:
-+    sch->q.qlen++;
-+    
-+    // We should restore priority information - but we don't
-+    //
-+    // p=heap_get_penalty(&q->h,band);
-+    // ...
-+    // heap_set_penalty(&q->h,band,p);
-+    
-+    return ENQUEUE_SUCCESS;
-+  } else {
-+    sch->stats.drops++;
-+    return ret;
-+  }
-+}    
-+
-+static int wrr_drop(struct Qdisc* sch)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+
-+  // Ugly... Drop button up in heap:
-+  int i;
-+
-+  for(i=q->h.elements; i>=1; i--) {
-+    int band=q->h.root_1[i].id;
-+    if(q->bands[band].que->ops->drop(q->bands[band].que)) {
-+      // On success
-+      sch->q.qlen--;
-+      return 1;
-+    }
-+  }
-+
-+  return 0;
-+}
-+
-+#ifdef CONFIG_RTNETLINK
-+static int wrr_dump(struct Qdisc *sch, struct sk_buff *skb)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  unsigned char       *b = skb->tail;
-+  struct tc_wrr_qdisc_stats opt;
-+
-+  opt.qdisc_crt.qdisc_modf=q->qdisc_modf;
-+  opt.qdisc_crt.srcaddr=q->filter.srcaddr;
-+  opt.qdisc_crt.usemac=q->filter.usemac;
-+  opt.qdisc_crt.usemasq=q->filter.usemasq;
-+  opt.qdisc_crt.bands_max=q->filter.mac_max;  
-+  opt.nodes_in_heap=q->h.elements;
-+  opt.bands_cur=q->filter.mac_cur;
-+  opt.bands_reused=q->filter.mac_reused;
-+  opt.packets_requed=q->packets_requed;
-+  opt.priosum=q->priosum;
-+
-+  if(q->proxydict) {
-+    opt.qdisc_crt.proxy_maxconn=proxyGetMaxConn(q->proxydict);
-+    opt.proxy_curconn=proxyGetCurConn(q->proxydict);
-+  } else {
-+    opt.qdisc_crt.proxy_maxconn=0;
-+    opt.proxy_curconn=0;
-+  }
-+  
-+  RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
-+  return skb->len;
-+  
-+rtattr_failure: // seems like RTA_PUT jump to this label..
-+  skb_trim(skb, b - skb->data);
-+  return -1;  
-+}
-+#endif
-+
-+static int wrr_tune_std(struct Qdisc *sch, struct rtattr *opt) 
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  struct tc_wrr_qdisc_modf_std *qopt = RTA_DATA(opt);
-+  
-+  if(opt->rta_len < RTA_LENGTH(sizeof(*qopt))) return -EINVAL;  
-+
-+  LOCK_START
-+  
-+  if(qopt->change_class) {
-+    int idx=lookup_mac(&q->filter,qopt->addr);
-+    weight_setvalue
-+      (&q->bands[idx].class_modf.weight1,&qopt->class_modf.weight1);
-+    weight_setvalue
-+      (&q->bands[idx].class_modf.weight2,&qopt->class_modf.weight2);
-+  } else {
-+    if(qopt->qdisc_modf.weight1.weight_mode!=-1)
-+       q->qdisc_modf.weight1.weight_mode=qopt->qdisc_modf.weight1.weight_mode;
-+    if(qopt->qdisc_modf.weight2.weight_mode!=-1)
-+       q->qdisc_modf.weight2.weight_mode=qopt->qdisc_modf.weight2.weight_mode;
-+  }
-+  
-+  LOCK_END
-+  
-+  return 0;
-+}
-+
-+static int wrr_tune_proxy(struct Qdisc *sch, struct rtattr *opt) 
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  struct tc_wrr_qdisc_modf_proxy *qopt = RTA_DATA(opt);
-+  int i;
-+
-+  // Return if we are not configured with proxy support:
-+  if(!q->proxydict) return -ENOSYS;
-+
-+  // Return if not enough data given:
-+  if(opt->rta_len<RTA_LENGTH(sizeof(*qopt)) ||
-+     opt->rta_len<
-+       RTA_LENGTH(sizeof(*qopt)+sizeof(ProxyRemapBlock)*qopt->changec))
-+       return -EINVAL;
-+
-+  LOCK_START;
-+  
-+  if(qopt->reset) {
-+    proxyInitMem(q->proxydict,proxyGetMaxConn(q->proxydict));
-+  }
-+  
-+  // Do all the changes:
-+  for(i=0; i<qopt->changec; i++) {
-+    proxyConsumeBlock(q->proxydict,&((ProxyRemapBlock*)&qopt->changes)[i]);
-+  }
-+  
-+  LOCK_END;
-+  
-+  return 0;
-+}
-+
-+static int wrr_tune(struct Qdisc *sch, struct rtattr *opt) {
-+  if(((struct tc_wrr_qdisc_modf_std*)RTA_DATA(opt))->proxy) {
-+    return wrr_tune_proxy(sch,opt);
-+  } else {
-+    return wrr_tune_std(sch,opt);
-+  }    
-+}
-+
-+//-----------------------------------------------------------------------------
-+// Classes.
-+//  External and internal IDs are equal. They are the band number plus 1.
-+
-+// Replace a class with another:
-+static int wrr_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
-+                   struct Qdisc **old)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  if(arg>q->bandc || arg==0)  return -EINVAL;
-+  arg--;
-+  
-+  if (new == NULL)
-+    new = &noop_qdisc;
-+
-+#ifdef KERNEL22
-+  *old = xchg(&q->bands[arg].que, new);
-+#else
-+  LOCK_START
-+  *old = q->bands[arg].que;
-+  q->bands[arg].que = new;
-+  qdisc_reset(*old);
-+  LOCK_END    
-+#endif
-+
-+  return 0;
-+}
-+
-+// Returns the qdisc for a class:
-+static struct Qdisc * wrr_leaf(struct Qdisc *sch, unsigned long arg)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  if(arg>q->bandc || arg==0)  return NULL;
-+  arg--;
-+  return q->bands[arg].que;
-+}
-+
-+static unsigned long wrr_get(struct Qdisc *sch, u32 classid)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  unsigned long band = TC_H_MIN(classid);
-+  if(band>q->bandc || band==0) return 0;
-+  return band;
-+}
-+
-+static void wrr_put(struct Qdisc *q, unsigned long cl)
-+{
-+  return;
-+}
-+
-+static int wrr_delete(struct Qdisc *sch, unsigned long cl)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  if(cl==0 || cl>q->bandc) return -ENOENT;
-+  cl--;
-+  return 0;
-+}
-+
-+
-+#ifdef CONFIG_RTNETLINK
-+static int wrr_dump_class(struct Qdisc *sch, unsigned long cl, 
-+                          struct sk_buff *skb, struct tcmsg *tcm)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  unsigned char *b = skb->tail;
-+  struct tc_wrr_class_stats opt;
-+
-+  // Handle of this class:
-+  tcm->tcm_handle = sch->handle|cl;
-+  
-+  if(cl==0 || cl>q->bandc)
-+    goto rtattr_failure;
-+  cl--;  
-+  
-+  if(cl>=q->filter.mac_cur) {
-+    // Band is unused:
-+    memset(&opt,0,sizeof(opt));
-+    opt.used=0;
-+  } else {
-+    opt.used=1;
-+    opt.class_modf.weight1=q->bands[cl].class_modf.weight1;
-+    opt.class_modf.weight2=q->bands[cl].class_modf.weight2;
-+    weight_transmit(&opt.class_modf.weight1,q->qdisc_modf.weight1,0,0,0,0);
-+    weight_transmit(&opt.class_modf.weight2,q->qdisc_modf.weight2,0,0,0,0);
-+    memcpy(opt.addr,q->filter.cls2mac+cl*ETH_ALEN,ETH_ALEN);
-+    opt.usemac=q->filter.usemac;
-+    opt.heappos=q->h.root_1[cl+1].id2idx;
-+    if(opt.heappos!=0) { // Is in heap
-+      opt.penal_ls=heap_get_penalty(&q->h,cl).ls;  
-+      opt.penal_ms=heap_get_penalty(&q->h,cl).ms;
-+    } else {
-+      opt.penal_ls=0;
-+      opt.penal_ms=0;
-+    }
-+  }
-+    
-+  // Put quing information:
-+  RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
-+  return skb->len;
-+
-+rtattr_failure:
-+  skb_trim(skb, b - skb->data);
-+  return -1;
-+}
-+#endif
-+
-+static int wrr_change(struct Qdisc *sch, u32 handle, u32 parent, 
-+                      struct rtattr **tca, unsigned long *arg)
-+{
-+  unsigned long cl = *arg;
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  struct rtattr *opt = tca[TCA_OPTIONS-1];
-+  struct tc_wrr_class_modf *copt = RTA_DATA(opt);
-+  
-+  if(cl==0 || cl>q->bandc) return -EINVAL;
-+  cl--;  
-+  
-+  if (opt->rta_len < RTA_LENGTH(sizeof(*copt))) return -EINVAL;
-+
-+  LOCK_START;
-+  
-+  weight_setvalue(&q->bands[cl].class_modf.weight1,&copt->weight1);
-+  weight_setvalue(&q->bands[cl].class_modf.weight2,&copt->weight2);
-+  
-+  LOCK_END;
-+
-+  return 0;
-+}
-+
-+static void wrr_walk(struct Qdisc *sch, struct qdisc_walker *arg)
-+{
-+  struct wrr_sched_data *q = (struct wrr_sched_data *)sch->data;
-+  int prio;
-+
-+  if (arg->stop) return;
-+
-+  for (prio = 1; prio <= q->bandc; prio++) {
-+    if (arg->count < arg->skip) {
-+      arg->count++;
-+      continue;
-+    }
-+    if (arg->fn(sch, prio, arg) < 0) {
-+      arg->stop = 1;
-+      break;
-+    }
-+    arg->count++;
-+  }
-+}
-+
-+static struct tcf_proto ** wrr_find_tcf(struct Qdisc *sch, unsigned long cl)
-+{
-+  return NULL;
-+}
-+
-+static unsigned long wrr_bind(struct Qdisc *sch, 
-+                              unsigned long parent, u32 classid)
-+{
-+  return wrr_get(sch, classid);
-+}
-+
-+//-----------------------------------------------------------------------------
-+// Generel
-+
-+static struct Qdisc_class_ops wrr_class_ops =
-+{
-+      wrr_graft,
-+      wrr_leaf,
-+
-+      wrr_get,
-+      wrr_put,
-+      wrr_change,
-+      wrr_delete,
-+      wrr_walk,
-+
-+      wrr_find_tcf,
-+      wrr_bind,
-+      wrr_put,
-+
-+#ifdef CONFIG_RTNETLINK
-+      wrr_dump_class,
-+#endif
-+};
-+
-+struct Qdisc_ops wrr_qdisc_ops =
-+{
-+      NULL,
-+      &wrr_class_ops,
-+      "wrr",
-+      sizeof(struct wrr_sched_data),
-+
-+      wrr_enqueue,
-+      wrr_dequeue,
-+      wrr_requeue,
-+      wrr_drop,
-+
-+      wrr_init,
-+      wrr_reset,
-+      wrr_destroy,
-+      wrr_tune,
-+
-+#ifdef CONFIG_RTNETLINK
-+      wrr_dump,
-+#endif
-+};
-+
-+#ifdef MODULE
-+
-+int init_module(void)
-+{
-+      return register_qdisc(&wrr_qdisc_ops);
-+}
-+
-+void cleanup_module(void) 
-+{
-+      unregister_qdisc(&wrr_qdisc_ops);
-+}
-+
-+#endif
-+
This page took 5.272422 seconds and 4 git commands to generate.