Whamcloud - gitweb
land b_smallfix 20040407_1414:
authorjacob <jacob>
Wed, 7 Apr 2004 19:12:05 +0000 (19:12 +0000)
committerjacob <jacob>
Wed, 7 Apr 2004 19:12:05 +0000 (19:12 +0000)
b=3057, 2947, 2925, 3050, 3041, 2849, 1662

305 files changed:
ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch [moved from lustre/kernel_patches/patches/ext3-ea-in-inode-2.6.0.patch with 98% similarity]
ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch [moved from lustre/kernel_patches/patches/ext3-map_inode_page-2.6.0.patch with 100% similarity]
ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch [moved from lustre/kernel_patches/patches/ext3-san-jdike-2.5.73.patch with 100% similarity]
ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch [moved from lustre/kernel_patches/patches/ext3-wantedi-2.6.3.patch with 91% similarity]
ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch [moved from lustre/kernel_patches/patches/iopen-2.6.3-mm4.patch with 76% similarity]
ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series [new file with mode: 0644]
ldiskfs/ldiskfs/Makefile.in [new file with mode: 0644]
ldiskfs/ldiskfs/autoMakefile.am [new file with mode: 0644]
lnet/.cvsignore
lnet/Makefile.am
lnet/Rules.linux [deleted file]
lnet/archdep.m4
lnet/build.m4
lnet/include/linux/portals_compat25.h
lnet/klnds/.cvsignore
lnet/klnds/gmlnd/.cvsignore
lnet/klnds/gmlnd/Makefile.am [deleted file]
lnet/klnds/gmlnd/Makefile.in [new file with mode: 0644]
lnet/klnds/gmlnd/autoMakefile.am [moved from lustre/ost/Makefile.am with 54% similarity]
lnet/klnds/iblnd/.cvsignore
lnet/klnds/iblnd/Makefile.am [deleted file]
lnet/klnds/iblnd/Makefile.in [new file with mode: 0644]
lnet/klnds/iblnd/autoMakefile.am [new file with mode: 0644]
lnet/klnds/qswlnd/.cvsignore
lnet/klnds/qswlnd/Makefile.am [deleted file]
lnet/klnds/qswlnd/Makefile.in [new file with mode: 0644]
lnet/klnds/qswlnd/autoMakefile.am [new file with mode: 0644]
lnet/klnds/scimaclnd/.cvsignore
lnet/klnds/scimaclnd/Makefile.am [deleted file]
lnet/klnds/scimaclnd/Makefile.in [new file with mode: 0644]
lnet/klnds/scimaclnd/autoMakefile.am [new file with mode: 0644]
lnet/klnds/socklnd/.cvsignore
lnet/klnds/socklnd/Makefile.am [deleted file]
lnet/klnds/socklnd/Makefile.in [new file with mode: 0644]
lnet/klnds/socklnd/autoMakefile.am [new file with mode: 0644]
lnet/libcfs/.cvsignore
lnet/libcfs/Makefile.am [deleted file]
lnet/libcfs/Makefile.in [new file with mode: 0644]
lnet/libcfs/autoMakefile.am [new file with mode: 0644]
lnet/libcfs/debug.c
lnet/lnet/.cvsignore
lnet/lnet/Makefile.in [new file with mode: 0644]
lnet/lnet/autoMakefile.am [moved from lustre/portals/portals/Makefile.am with 56% similarity]
lnet/router/.cvsignore
lnet/router/Makefile.am [deleted file]
lnet/router/Makefile.in [new file with mode: 0644]
lnet/router/autoMakefile.am [new file with mode: 0644]
lnet/tests/.cvsignore
lnet/tests/Makefile.am [deleted file]
lnet/tests/Makefile.in [new file with mode: 0644]
lnet/tests/autoMakefile.am [new file with mode: 0644]
lnet/ulnds/Makefile.am
lnet/ulnds/socklnd/Makefile.am
lnet/utils/Makefile.am
lustre/.cvsignore
lustre/ChangeLog
lustre/Makefile.am
lustre/Rules [deleted file]
lustre/Rules.in [new file with mode: 0644]
lustre/autogen.sh
lustre/cobd/.cvsignore
lustre/cobd/Makefile.in [new file with mode: 0644]
lustre/cobd/autoMakefile.am [moved from lustre/cobd/Makefile.am with 51% similarity]
lustre/conf/Makefile.am
lustre/configure.in
lustre/doc/Makefile.am
lustre/include/Makefile.am
lustre/include/config.h.in
lustre/include/liblustre.h
lustre/include/linux/lustre_compat25.h
lustre/include/linux/lustre_dlm.h
lustre/include/linux/lustre_lib.h
lustre/install-sh [deleted file]
lustre/kernel-tests/.cvsignore [new file with mode: 0644]
lustre/kernel-tests/Makefile [new file with mode: 0644]
lustre/kernel_patches/patches/2.6.0-mm2.patch [deleted file]
lustre/kernel_patches/patches/2.6.0-test6-mm4.patch [deleted file]
lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch [moved from lustre/kernel_patches/patches/dev_read_only_2.6.0.patch with 100% similarity]
lustre/kernel_patches/patches/export-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/export-2.6.3.patch [deleted file]
lustre/kernel_patches/patches/export-ext3-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/export-truncate-2.6-suse.patch [moved from lustre/kernel_patches/patches/export-truncate-2.5.63.patch with 100% similarity]
lustre/kernel_patches/patches/export_symbols-2.6-suse.patch [moved from lustre/kernel_patches/patches/export_symbols-2.6.0.patch with 74% similarity]
lustre/kernel_patches/patches/export_symbols-2.6.0-test6.patch [deleted file]
lustre/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.18-chaos.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.20.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.21-chaos.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.21-suse2.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.4.22-rh.patch
lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/ext3-init-generation-2.6-suse.patch [moved from lustre/kernel_patches/patches/ext3-init-generation-2.6.0.patch with 100% similarity]
lustre/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/ext3-mballoc-2.4.21-suse2.patch
lustre/kernel_patches/patches/ext3-mballoc-2.4.24.patch
lustre/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/ext3-wantedi-2.6-suse.patch [moved from lustre/kernel_patches/patches/ext3-wantedi-2.6.patch with 72% similarity]
lustre/kernel_patches/patches/ext3-wantedi-misc-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/header-guards-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/invalidate_show-2.6.0.patch [deleted file]
lustre/kernel_patches/patches/iopen-2.5.73.patch [deleted file]
lustre/kernel_patches/patches/iopen-2.6-suse.patch [moved from lustre/kernel_patches/patches/iopen-2.6.0-test6.patch with 66% similarity]
lustre/kernel_patches/patches/iopen-2.6.0.patch [deleted file]
lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/kernel_text_address-2.6-suse.patch [moved from lustre/kernel_patches/patches/kernel_text_address-2.6.3.patch with 100% similarity]
lustre/kernel_patches/patches/kernel_text_address-2.6.0.patch [deleted file]
lustre/kernel_patches/patches/kexec-2.6.0-full.patch [deleted file]
lustre/kernel_patches/patches/kexec-2.6.0-test6-full.patch [deleted file]
lustre/kernel_patches/patches/linux-2.6.3-CITI_NFS4_ALL.patch [deleted file]
lustre/kernel_patches/patches/linux-2.6.3-nfs-intent.patch [deleted file]
lustre/kernel_patches/patches/lkcd-cvs-2.6.0-test6.patch [deleted file]
lustre/kernel_patches/patches/lkcd-kernel-changes-2.6.0-test6.patch [deleted file]
lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch [moved from lustre/kernel_patches/patches/fs-intent-2.6.3-mm4.patch with 77% similarity]
lustre/kernel_patches/patches/nfs-cifs-intent-2.6.3-suse.patch [deleted file]
lustre/kernel_patches/patches/qla2xxx-v8.00.00b1-2.5.73.patch [deleted file]
lustre/kernel_patches/patches/removepage-2.6-suse.patch [new file with mode: 0644]
lustre/kernel_patches/patches/removepage-2.6.0.patch [deleted file]
lustre/kernel_patches/patches/uml-2.6.0-fix.patch [deleted file]
lustre/kernel_patches/patches/uml-fix-2.6.3.patch [deleted file]
lustre/kernel_patches/patches/uml-patch-2.4.24-1.patch [moved from lustre/kernel_patches/patches/uml-patch-2.4.23-1.patch with 98% similarity]
lustre/kernel_patches/patches/uml-patch-2.6.0-1-fix1.patch [deleted file]
lustre/kernel_patches/patches/uml-patch-2.6.0-1.patch [deleted file]
lustre/kernel_patches/patches/uml-patch-2.6.0-test5.patch [deleted file]
lustre/kernel_patches/patches/uml-patch-2.6.3-rc2-1.patch [deleted file]
lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch [moved from lustre/kernel_patches/patches/vfs_intent-2.6.3-suse.patch with 93% similarity]
lustre/kernel_patches/patches/vfs_intent-2.6.3.patch [deleted file]
lustre/kernel_patches/patches/vfs_intent_2.6.0-test1.patch [deleted file]
lustre/kernel_patches/patches/vfs_intent_2.6.0-test6.patch [deleted file]
lustre/kernel_patches/patches/vfs_intent_2.6.0.patch [deleted file]
lustre/kernel_patches/patches/vfs_mntcwd_2.5.72_rev1.patch [deleted file]
lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch [moved from lustre/kernel_patches/patches/vfs_nointent-2.6.3-mm4.patch with 85% similarity]
lustre/kernel_patches/patches/vfs_nointent_2.6.0-test1.patch [deleted file]
lustre/kernel_patches/patches/vfs_nointent_2.6.0-test6.patch [deleted file]
lustre/kernel_patches/patches/vfs_nointent_2.6.0-uml1.patch [deleted file]
lustre/kernel_patches/patches/vfs_nointent_2.6.3-suse.patch [deleted file]
lustre/kernel_patches/patches/vfs_races-2.6-suse.patch [moved from lustre/kernel_patches/patches/vfs_races_2.5.72_rev1.patch with 100% similarity]
lustre/kernel_patches/series/2.6-suse.series [new file with mode: 0644]
lustre/kernel_patches/series/2.6.3-mm4 [deleted file]
lustre/kernel_patches/series/kgdb_2.6.0 [deleted file]
lustre/kernel_patches/series/kgdb_2.6.0_test1 [deleted file]
lustre/kernel_patches/series/kgdb_2.6.0_test6 [deleted file]
lustre/kernel_patches/series/ldiskfs-2.6-suse.series [new file with mode: 0644]
lustre/kernel_patches/series/suse-2.6.3 [deleted file]
lustre/kernel_patches/series/uml_2.6.0 [deleted file]
lustre/kernel_patches/series/uml_2.6.0_test3 [deleted file]
lustre/kernel_patches/series/vanilla-2.4.24
lustre/kernel_patches/series/vanilla-2.6.3-nfs4 [deleted file]
lustre/kernel_patches/targets/2.6-suse.target [new file with mode: 0644]
lustre/ldiskfs/.cvsignore [new file with mode: 0644]
lustre/ldiskfs/Makefile.in [new file with mode: 0644]
lustre/ldiskfs/autoMakefile.am [new file with mode: 0644]
lustre/ldlm/.cvsignore
lustre/ldlm/Makefile.am
lustre/ldlm/ldlm_extent.c
lustre/ldlm/ldlm_internal.h
lustre/liblustre/Makefile.am
lustre/liblustre/tests/.cvsignore
lustre/liblustre/tests/Makefile.am
lustre/llite/.cvsignore
lustre/llite/Makefile.am [deleted file]
lustre/llite/Makefile.in [new file with mode: 0644]
lustre/llite/autoMakefile.am [new file with mode: 0644]
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/special.c
lustre/lov/.cvsignore
lustre/lov/Makefile.in [new file with mode: 0644]
lustre/lov/autoMakefile.am [moved from lustre/lov/Makefile.am with 56% similarity]
lustre/lov/lov_obd.c
lustre/lov/lov_pack.c
lustre/lvfs/.cvsignore
lustre/lvfs/Makefile.am [deleted file]
lustre/lvfs/Makefile.in [new file with mode: 0644]
lustre/lvfs/autoMakefile.am [new file with mode: 0644]
lustre/lvfs/fsfilt_ext3.c
lustre/mdc/.cvsignore
lustre/mdc/Makefile.in [new file with mode: 0644]
lustre/mdc/autoMakefile.am [moved from lustre/mdc/Makefile.am with 57% similarity]
lustre/mdc/mdc_locks.c
lustre/mdc/mdc_reint.c
lustre/mds/.cvsignore
lustre/mds/Makefile.am [deleted file]
lustre/mds/Makefile.in [new file with mode: 0644]
lustre/mds/autoMakefile.am [new file with mode: 0644]
lustre/mds/mds_open.c
lustre/mds/mds_reint.c
lustre/mgmt/.cvsignore
lustre/mgmt/Makefile.in [new file with mode: 0644]
lustre/mgmt/autoMakefile.am [new file with mode: 0644]
lustre/missing [deleted file]
lustre/mkinstalldirs [deleted file]
lustre/obdclass/.cvsignore
lustre/obdclass/Makefile.am [deleted file]
lustre/obdclass/Makefile.in [new file with mode: 0644]
lustre/obdclass/autoMakefile.am [new file with mode: 0644]
lustre/obdclass/class_obd.c
lustre/obdclass/obd_config.c
lustre/obdecho/.cvsignore
lustre/obdecho/Makefile.in [new file with mode: 0644]
lustre/obdecho/autoMakefile.am [moved from lustre/obdecho/Makefile.am with 54% similarity]
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/obdfilter/.cvsignore
lustre/obdfilter/Makefile.am [deleted file]
lustre/obdfilter/Makefile.in [new file with mode: 0644]
lustre/obdfilter/autoMakefile.am [new file with mode: 0644]
lustre/obdfilter/filter.c
lustre/obdfilter/filter_io.c
lustre/obdfilter/filter_lvb.c
lustre/osc/.cvsignore
lustre/osc/Makefile.in [new file with mode: 0644]
lustre/osc/autoMakefile.am [moved from lustre/osc/Makefile.am with 58% similarity]
lustre/osc/osc_request.c
lustre/ost/.cvsignore
lustre/ost/Makefile.in [new file with mode: 0644]
lustre/ost/autoMakefile.am [moved from lustre/mgmt/Makefile.am with 59% similarity]
lustre/portals/.cvsignore
lustre/portals/Makefile.am
lustre/portals/Rules.linux [deleted file]
lustre/portals/archdep.m4
lustre/portals/build.m4
lustre/portals/include/linux/portals_compat25.h
lustre/portals/knals/.cvsignore
lustre/portals/knals/gmnal/.cvsignore
lustre/portals/knals/gmnal/Makefile.am [deleted file]
lustre/portals/knals/gmnal/Makefile.in [new file with mode: 0644]
lustre/portals/knals/gmnal/autoMakefile.am [new file with mode: 0644]
lustre/portals/knals/ibnal/.cvsignore
lustre/portals/knals/ibnal/Makefile.am [deleted file]
lustre/portals/knals/ibnal/Makefile.in [new file with mode: 0644]
lustre/portals/knals/ibnal/autoMakefile.am [new file with mode: 0644]
lustre/portals/knals/qswnal/.cvsignore
lustre/portals/knals/qswnal/Makefile.am [deleted file]
lustre/portals/knals/qswnal/Makefile.in [new file with mode: 0644]
lustre/portals/knals/qswnal/autoMakefile.am [new file with mode: 0644]
lustre/portals/knals/scimacnal/.cvsignore
lustre/portals/knals/scimacnal/Makefile.am [deleted file]
lustre/portals/knals/scimacnal/Makefile.in [new file with mode: 0644]
lustre/portals/knals/scimacnal/autoMakefile.am [new file with mode: 0644]
lustre/portals/knals/socknal/.cvsignore
lustre/portals/knals/socknal/Makefile.am [deleted file]
lustre/portals/knals/socknal/Makefile.in [new file with mode: 0644]
lustre/portals/knals/socknal/autoMakefile.am [new file with mode: 0644]
lustre/portals/libcfs/.cvsignore
lustre/portals/libcfs/Makefile.am [deleted file]
lustre/portals/libcfs/Makefile.in [new file with mode: 0644]
lustre/portals/libcfs/autoMakefile.am [new file with mode: 0644]
lustre/portals/libcfs/debug.c
lustre/portals/portals/.cvsignore
lustre/portals/portals/Makefile.in [new file with mode: 0644]
lustre/portals/portals/autoMakefile.am [moved from lnet/lnet/Makefile.am with 56% similarity]
lustre/portals/router/.cvsignore
lustre/portals/router/Makefile.am [deleted file]
lustre/portals/router/Makefile.in [new file with mode: 0644]
lustre/portals/router/autoMakefile.am [new file with mode: 0644]
lustre/portals/tests/.cvsignore
lustre/portals/tests/Makefile.am [deleted file]
lustre/portals/tests/Makefile.in [new file with mode: 0644]
lustre/portals/tests/autoMakefile.am [new file with mode: 0644]
lustre/portals/unals/Makefile.am
lustre/portals/utils/Makefile.am
lustre/ptlbd/.cvsignore
lustre/ptlbd/Makefile.in [new file with mode: 0644]
lustre/ptlbd/autoMakefile.am [moved from lustre/ptlbd/Makefile.am with 50% similarity]
lustre/ptlrpc/.cvsignore
lustre/ptlrpc/Makefile.in [new file with mode: 0644]
lustre/ptlrpc/autoMakefile.am [moved from lustre/ptlrpc/Makefile.am with 71% similarity]
lustre/scripts/.cvsignore
lustre/scripts/Makefile.am
lustre/scripts/lustre.spec.in
lustre/scripts/version_tag.pl.in [moved from lustre/scripts/version_tag.pl with 95% similarity]
lustre/smfs/.cvsignore
lustre/smfs/Makefile.am [deleted file]
lustre/smfs/Makefile.in [new file with mode: 0644]
lustre/smfs/autoMakefile.am [new file with mode: 0644]
lustre/snapfs/.cvsignore
lustre/snapfs/Makefile.am [deleted file]
lustre/snapfs/Makefile.in [new file with mode: 0644]
lustre/snapfs/autoMakefile.am [new file with mode: 0644]
lustre/snapfs/utils/Makefile.am
lustre/tests/Makefile.am
lustre/tests/cfg/insanity-adev.sh
lustre/tests/cfg/insanity-local.sh
lustre/tests/cfg/insanity-mdev.sh
lustre/tests/createdestroy.c
lustre/tests/createmany.c
lustre/tests/ll_dirstripe_verify.c
lustre/tests/mkdirmany.c
lustre/tests/multiop.c
lustre/tests/munlink.c
lustre/tests/openfile.c
lustre/tests/recovery-small.sh
lustre/tests/replay-ost-single.sh
lustre/tests/runas.c
lustre/tests/sanity.sh
lustre/tests/socketserver
lustre/tests/statmany.c
lustre/utils/.cvsignore
lustre/utils/Makefile.am
lustre/utils/lconf.in [moved from lustre/utils/lconf with 99% similarity]
lustre/utils/lmc

diff --git a/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch b/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch
new file mode 100644 (file)
index 0000000..638b4bf
--- /dev/null
@@ -0,0 +1,33 @@
+Index: linux-stage/fs/ext3/super.c
+===================================================================
+--- linux-stage.orig/fs/ext3/super.c   2004-04-02 16:40:18.000000000 -0500
++++ linux-stage/fs/ext3/super.c        2004-04-02 16:40:18.000000000 -0500
+@@ -115,6 +115,8 @@
+               handle->h_err = err;
+ }
++EXPORT_SYMBOL(ext3_journal_abort_handle);
++
+ static char error_buf[1024];
+ /* Deal with the reporting of failure conditions on a filesystem such as
+@@ -1774,6 +1776,8 @@
+       return ret;
+ }
++EXPORT_SYMBOL(ext3_force_commit);
++
+ /*
+  * Ext3 always journals updates to the superblock itself, so we don't
+  * have to propagate any other updates to the superblock on disk at this
+@@ -2088,6 +2092,10 @@
+                         unsigned long *blocks, int *created, int create);
+ EXPORT_SYMBOL(ext3_map_inode_page);
++EXPORT_SYMBOL(ext3_xattr_get);
++EXPORT_SYMBOL(ext3_xattr_set_handle);
++EXPORT_SYMBOL(ext3_bread);
++
+ MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
+ MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions");
+ MODULE_LICENSE("GPL");
diff --git a/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch b/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch
new file mode 100644 (file)
index 0000000..2327263
--- /dev/null
@@ -0,0 +1,17 @@
+Index: linux-2.6.0/include/linux/ext3_fs_sb.h
+===================================================================
+--- linux-2.6.0.orig/include/linux/ext3_fs_sb.h        2003-06-24 18:05:26.000000000 +0400
++++ linux-2.6.0/include/linux/ext3_fs_sb.h     2003-12-31 01:09:26.000000000 +0300
+@@ -19,9 +19,12 @@
+ #ifdef __KERNEL__
+ #include <linux/timer.h>
+ #include <linux/wait.h>
++#ifndef EXT_INCLUDE
++#define EXT_INCLUDE
+ #include <linux/blockgroup_lock.h>
+ #include <linux/percpu_counter.h>
+ #endif
++#endif
+ /*
+  * third extended-fs super-block data in memory
@@ -189,7 +189,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      /* try to find attribute in inode body */
 +      err = ext3_xattr_ibody_get(inode, name_index, name,
 +                                      buffer, buffer_size);
-+      if (err < 0) 
++      if (err < 0)
 +              /* search was unsuccessful, try to find EA in dedicated block */
 +              err = ext3_xattr_block_get(inode, name_index, name,
 +                              buffer, buffer_size);
@@ -252,7 +252,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +              return 0;
 +
 +      ret = ext3_get_inode_loc(inode, &iloc);
-+      if (ret) 
++      if (ret)
 +              return ret;
 +      raw_inode = ext3_raw_inode(&iloc);
 +
@@ -334,7 +334,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +      /* get list of attributes stored in inode body */
 +      error = ext3_xattr_ibody_list(inode, buffer, buffer_size);
 +      if (error < 0) {
-+              /* some error occured while collecting 
++              /* some error occured while collecting
 +               * attributes in inode body */
 +              size = 0;
 +              goto cleanup;
@@ -347,12 +347,12 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +              if (buffer_size <= 0) {
 +                      buffer = NULL;
 +                      buffer_size = 0;
-+              } else 
++              } else
 +                      buffer += error;
 +      }
 +
 +      error = ext3_xattr_block_list(inode, buffer, buffer_size);
-+      if (error < 0) 
++      if (error < 0)
 +              /* listing was successful, so we return len */
 +              size = 0;
 +
@@ -374,7 +374,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 + * NOTE: free space includes space our attribute hold
 + */
 +int
-+ext3_xattr_ibody_find(struct inode *inode, int name_index, 
++ext3_xattr_ibody_find(struct inode *inode, int name_index,
 +              const char *name, struct ext3_xattr_entry *rentry, int *free)
 +{
 +      struct ext3_xattr_entry *last;
@@ -389,7 +389,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +              return ret;
 +
 +      err = ext3_get_inode_loc(inode, &iloc);
-+      if (err) 
++      if (err)
 +              return -EIO;
 +      raw_inode = ext3_raw_inode(&iloc);
 +
@@ -498,7 +498,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +
 +/*
 + * ext3_xattr_inode_set()
-+ * 
++ *
 + * this routine add/remove/replace attribute in inode body
 + */
 +int
@@ -558,7 +558,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +              }
 +              if (name_index == last->e_name_index &&
 +                      name_len == last->e_name_len &&
-+                      !memcmp(name, last->e_name, name_len)) 
++                      !memcmp(name, last->e_name, name_len))
 +                      here = last;
 +              else {
 +                      /* we calculate all but our attribute
@@ -595,9 +595,9 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +              e = (struct ext3_xattr_entry *) start;
 +              while (!IS_LAST_ENTRY(e)) {
 +                      struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e);
-+                      int offs = le16_to_cpu(e->e_value_offs); 
-+                      if (offs < border) 
-+                              e->e_value_offs = 
++                      int offs = le16_to_cpu(e->e_value_offs);
++                      if (offs < border)
++                              e->e_value_offs =
 +                                      cpu_to_le16(offs + size);
 +                      e = next;
 +              }
@@ -741,7 +741,7 @@ Index: linux-2.6.0/fs/ext3/xattr.c
 +
 +/*
 + * ext3_xattr_block_set()
-+ * 
++ *
 + * this routine add/remove/replace attribute in EA block
 + */
 +int
@@ -815,7 +815,7 @@ Index: linux-2.6.0/include/linux/ext3_fs_i.h
         */
        loff_t  i_disksize;
  
-+      /* on-disk additional lenght */
++      /* on-disk additional length */
 +      __u16 i_extra_isize;
 +
        /*
diff --git a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch
new file mode 100644 (file)
index 0000000..28e3587
--- /dev/null
@@ -0,0 +1,20 @@
+Index: linux-stage/include/linux/ext3_fs.h
+===================================================================
+--- linux-stage.orig/include/linux/ext3_fs.h   2004-04-02 16:43:37.000000000 -0500
++++ linux-stage/include/linux/ext3_fs.h        2004-04-02 16:43:37.000000000 -0500
+@@ -331,12 +331,13 @@
+ #define EXT3_MOUNT_IOPEN_NOPRIV              0x20000  /* Make iopen world-readable */
+ /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
+-#ifndef _LINUX_EXT2_FS_H
++#ifndef clear_opt
+ #define clear_opt(o, opt)             o &= ~EXT3_MOUNT_##opt
+ #define set_opt(o, opt)                       o |= EXT3_MOUNT_##opt
+ #define test_opt(sb, opt)             (EXT3_SB(sb)->s_mount_opt & \
+                                        EXT3_MOUNT_##opt)
+-#else
++#endif
++#ifndef EXT2_MOUNT_NOLOAD
+ #define EXT2_MOUNT_NOLOAD             EXT3_MOUNT_NOLOAD
+ #define EXT2_MOUNT_ABORT              EXT3_MOUNT_ABORT
+ #define EXT2_MOUNT_DATA_FLAGS         EXT3_MOUNT_DATA_FLAGS
@@ -154,22 +154,6 @@ Index: uml-2.6.3/fs/ext3/namei.c
        err = PTR_ERR(inode);
        if (IS_ERR(inode))
                goto out_stop;
-Index: uml-2.6.3/include/linux/dcache.h
-===================================================================
---- uml-2.6.3.orig/include/linux/dcache.h      2004-02-21 00:19:14.365988600 +0800
-+++ uml-2.6.3/include/linux/dcache.h   2004-02-21 00:21:04.612228624 +0800
-@@ -25,6 +25,11 @@
- #define IS_ROOT(x) ((x) == (x)->d_parent)
-+struct dentry_params {
-+      unsigned long   p_inum;
-+      void            *p_ptr;
-+};
-+
- /*
-  * "quick string" -- eases parameter passing, but more importantly
-  * saves "metadata" about the string (ie length and the hash).
 Index: uml-2.6.3/include/linux/ext3_fs.h
 ===================================================================
 --- uml-2.6.3.orig/include/linux/ext3_fs.h     2004-01-09 14:59:44.000000000 +0800
@@ -7,37 +7,10 @@
  include/linux/ext3_fs.h            |    2 
  7 files changed, 304 insertions(+), 1 deletion(-)
 
-Index: linux-2.6.3-mm4/Documentation/filesystems/ext2.txt
+Index: linux-2.6.4-51.1/fs/ext3/inode.c
 ===================================================================
---- linux-2.6.3-mm4.orig/Documentation/filesystems/ext2.txt    2004-01-09 14:59:18.000000000 +0800
-+++ linux-2.6.3-mm4/Documentation/filesystems/ext2.txt 2004-03-08 14:58:44.431196112 +0800
-@@ -35,6 +35,22 @@
- sb=n                          Use alternate superblock at this location.
-+iopen                         Makes an invisible pseudo-directory called
-+                              __iopen__ available in the root directory
-+                              of the filesystem.  Allows open-by-inode-
-+                              number.  i.e., inode 3145 can be accessed
-+                              via /mntpt/__iopen__/3145
-+
-+iopen_nopriv                  This option makes the iopen directory be
-+                              world-readable.  This may be safer since it
-+                              allows daemons to run as an unprivileged user,
-+                              however it significantly changes the security
-+                              model of a Unix filesystem, since previously
-+                              all files under a mode 700 directory were not
-+                              generally avilable even if the
-+                              permissions on the file itself is
-+                              world-readable.
-+
- grpquota,noquota,quota,usrquota       Quota options are silently ignored by ext2.
-Index: linux-2.6.3-mm4/fs/ext3/inode.c
-===================================================================
---- linux-2.6.3-mm4.orig/fs/ext3/inode.c       2004-03-08 14:57:54.969715400 +0800
-+++ linux-2.6.3-mm4/fs/ext3/inode.c    2004-03-08 14:58:44.504185016 +0800
+--- linux-2.6.4-51.1.orig/fs/ext3/inode.c      2004-04-06 00:31:14.000000000 -0400
++++ linux-2.6.4-51.1/fs/ext3/inode.c   2004-04-06 00:31:24.000000000 -0400
 @@ -37,6 +37,7 @@
  #include <linux/mpage.h>
  #include <linux/uio.h>
@@ -55,11 +28,13 @@ Index: linux-2.6.3-mm4/fs/ext3/inode.c
        if (ext3_get_inode_loc(inode, &iloc, 0))
                goto bad_inode;
        bh = iloc.bh;
-Index: linux-2.6.3-mm4/fs/ext3/iopen.c
+Index: linux-2.6.4-51.1/fs/ext3/iopen.c
 ===================================================================
---- linux-2.6.3-mm4.orig/fs/ext3/iopen.c       2004-03-08 14:58:44.413198848 +0800
-+++ linux-2.6.3-mm4/fs/ext3/iopen.c    2004-03-08 14:58:44.576174072 +0800
-@@ -0,0 +1,218 @@
+--- linux-2.6.4-51.1.orig/fs/ext3/iopen.c      2004-04-06 00:31:24.000000000 -0400
++++ linux-2.6.4-51.1/fs/ext3/iopen.c   2004-04-06 00:31:24.000000000 -0400
+@@ -0,0 +1,223 @@
++
++
 +/*
 + * linux/fs/ext3/iopen.c
 + *
@@ -88,8 +63,7 @@ Index: linux-2.6.3-mm4/fs/ext3/iopen.c
 +/*
 + * This implements looking up an inode by number.
 + */
-+static struct dentry *iopen_lookup(struct inode *dir, struct dentry *dentry,
-+                                 struct nameidata *nd)
++static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd)
 +{
 +      struct inode * inode;
 +      unsigned long ino;
@@ -110,7 +84,10 @@ Index: linux-2.6.3-mm4/fs/ext3/iopen.c
 +      else
 +              ino = simple_strtoul(buf, 0, 0);
 +
-+      if ((ino != EXT3_ROOT_INO && ino < EXT3_FIRST_INO(dir->i_sb)) ||
++      if ((ino != EXT3_ROOT_INO &&
++           //ino != EXT3_ACL_IDX_INO &&
++           //ino != EXT3_ACL_DATA_INO &&
++           ino < EXT3_FIRST_INO(dir->i_sb)) ||
 +          ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count))
 +              return ERR_PTR(-ENOENT);
 +
@@ -177,6 +154,7 @@ Index: linux-2.6.3-mm4/fs/ext3/iopen.c
 +      assert(list_empty(&de->d_subdirs));
 +      assert(list_empty(&de->d_alias));
 +
++
 +      list_for_each(lp, &inode->i_dentry) {
 +              tmp = list_entry(lp, struct dentry, d_alias);
 +              if (tmp->d_flags & DCACHE_DISCONNECTED) {
@@ -278,10 +256,10 @@ Index: linux-2.6.3-mm4/fs/ext3/iopen.c
 +
 +      return 1;
 +}
-Index: linux-2.6.3-mm4/fs/ext3/iopen.h
+Index: linux-2.6.4-51.1/fs/ext3/iopen.h
 ===================================================================
---- linux-2.6.3-mm4.orig/fs/ext3/iopen.h       2004-03-08 14:58:44.413198848 +0800
-+++ linux-2.6.3-mm4/fs/ext3/iopen.h    2004-03-08 14:58:44.577173920 +0800
+--- linux-2.6.4-51.1.orig/fs/ext3/iopen.h      2004-04-06 00:31:24.000000000 -0400
++++ linux-2.6.4-51.1/fs/ext3/iopen.h   2004-04-06 00:31:24.000000000 -0400
 @@ -0,0 +1,15 @@
 +/*
 + * iopen.h
@@ -298,10 +276,10 @@ Index: linux-2.6.3-mm4/fs/ext3/iopen.h
 +extern int ext3_iopen_get_inode(struct inode * inode);
 +
 +
-Index: linux-2.6.3-mm4/fs/ext3/namei.c
+Index: linux-2.6.4-51.1/fs/ext3/namei.c
 ===================================================================
---- linux-2.6.3-mm4.orig/fs/ext3/namei.c       2004-03-08 14:57:52.978018184 +0800
-+++ linux-2.6.3-mm4/fs/ext3/namei.c    2004-03-08 14:58:44.648163128 +0800
+--- linux-2.6.4-51.1.orig/fs/ext3/namei.c      2004-04-06 00:31:11.000000000 -0400
++++ linux-2.6.4-51.1/fs/ext3/namei.c   2004-04-06 00:31:24.000000000 -0400
 @@ -37,6 +37,7 @@
  #include <linux/buffer_head.h>
  #include <linux/smp_lock.h>
@@ -321,7 +299,7 @@ Index: linux-2.6.3-mm4/fs/ext3/namei.c
        struct inode * inode;
        struct ext3_dir_entry_2 * de;
        struct buffer_head * bh;
-+      struct dentry *alternate = NULL;
++      struct dentry *alternate = NULL;
  
        if (dentry->d_name.len > EXT3_NAME_LEN)
                return ERR_PTR(-ENAMETOOLONG);
@@ -347,20 +325,20 @@ Index: linux-2.6.3-mm4/fs/ext3/namei.c
        d_add(dentry, inode);
        return NULL;
  }
-Index: linux-2.6.3-mm4/fs/ext3/super.c
+Index: linux-2.6.4-51.1/fs/ext3/super.c
 ===================================================================
---- linux-2.6.3-mm4.orig/fs/ext3/super.c       2004-03-08 14:57:55.049703240 +0800
-+++ linux-2.6.3-mm4/fs/ext3/super.c    2004-03-08 15:03:18.310560120 +0800
-@@ -575,7 +575,7 @@
+--- linux-2.6.4-51.1.orig/fs/ext3/super.c      2004-04-06 00:31:14.000000000 -0400
++++ linux-2.6.4-51.1/fs/ext3/super.c   2004-04-06 00:31:24.000000000 -0400
+@@ -536,7 +536,7 @@
+       Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, Opt_noload,
+       Opt_commit, Opt_journal_update, Opt_journal_inum,
        Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
-       Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
-       Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0,
 -      Opt_ignore, Opt_err,
 +      Opt_ignore, Opt_err, Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
  };
  
  static match_table_t tokens = {
-@@ -620,6 +620,9 @@
+@@ -575,6 +575,9 @@
        {Opt_ignore, "noquota"},
        {Opt_ignore, "quota"},
        {Opt_ignore, "usrquota"},
@@ -370,7 +348,7 @@ Index: linux-2.6.3-mm4/fs/ext3/super.c
        {Opt_err, NULL}
  };
  
-@@ -869,6 +872,18 @@
+@@ -762,6 +765,18 @@
                case Opt_abort:
                        set_opt(sbi->s_mount_opt, ABORT);
                        break;
@@ -389,23 +367,10 @@ Index: linux-2.6.3-mm4/fs/ext3/super.c
                case Opt_ignore:
                        break;
                default:
-Index: linux-2.6.3-mm4/fs/ext3/Makefile
-===================================================================
---- linux-2.6.3-mm4.orig/fs/ext3/Makefile      2004-01-09 14:59:08.000000000 +0800
-+++ linux-2.6.3-mm4/fs/ext3/Makefile   2004-03-08 14:58:44.794140936 +0800
-@@ -5,7 +5,7 @@
- obj-$(CONFIG_EXT3_FS) += ext3.o
- ext3-y        := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
--         ioctl.o namei.o super.o symlink.o hash.o
-+         ioctl.o namei.o super.o symlink.o hash.o iopen.o
- ext3-$(CONFIG_EXT3_FS_XATTR)   += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-2.6.3-mm4/include/linux/ext3_fs.h
+Index: linux-2.6.4-51.1/include/linux/ext3_fs.h
 ===================================================================
---- linux-2.6.3-mm4.orig/include/linux/ext3_fs.h       2004-03-08 14:57:53.057006176 +0800
-+++ linux-2.6.3-mm4/include/linux/ext3_fs.h    2004-03-08 14:58:44.795140784 +0800
+--- linux-2.6.4-51.1.orig/include/linux/ext3_fs.h      2004-04-06 00:31:11.000000000 -0400
++++ linux-2.6.4-51.1/include/linux/ext3_fs.h   2004-04-06 00:31:24.000000000 -0400
 @@ -325,6 +325,8 @@
  #define EXT3_MOUNT_NO_UID32           0x2000  /* Disable 32-bit UIDs */
  #define EXT3_MOUNT_XATTR_USER         0x4000  /* Extended user attributes */
@@ -415,3 +380,16 @@ Index: linux-2.6.3-mm4/include/linux/ext3_fs.h
  
  /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
  #ifndef _LINUX_EXT2_FS_H
+Index: linux-2.6.4-51.1/fs/ext3/Makefile
+===================================================================
+--- linux-2.6.4-51.1.orig/fs/ext3/Makefile     2004-04-06 00:27:21.000000000 -0400
++++ linux-2.6.4-51.1/fs/ext3/Makefile  2004-04-06 00:31:42.000000000 -0400
+@@ -5,7 +5,7 @@
+ obj-$(CONFIG_EXT3_FS) += ext3.o
+ ext3-y        := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
+-         ioctl.o namei.o super.o symlink.o hash.o
++         ioctl.o namei.o super.o symlink.o hash.o iopen.o
+ ext3-$(CONFIG_EXT3_FS_XATTR)   += xattr.o xattr_user.o xattr_trusted.o
+ ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series
new file mode 100644 (file)
index 0000000..cff99dd
--- /dev/null
@@ -0,0 +1,9 @@
+ext3-wantedi-2.6-suse.patch
+ext3-san-jdike-2.6-suse.patch
+iopen-2.6-suse.patch 
+export_symbols-ext3-2.6-suse.patch
+ext3-map_inode_page-2.6-suse.patch
+ext3-init-generation-2.6-suse.patch
+ext3-ea-in-inode-2.6-suse.patch
+export-ext3-2.6-suse.patch
+ext3-include-fixes-2.6-suse.patch
diff --git a/ldiskfs/ldiskfs/Makefile.in b/ldiskfs/ldiskfs/Makefile.in
new file mode 100644 (file)
index 0000000..8fe1606
--- /dev/null
@@ -0,0 +1,17 @@
+default: all
+
+MODULES := ldiskfs
+
+# copy makefile over to not break patches
+ext3_extra := $(wildcard @LINUX@/fs/ext3/Makefile)
+
+ext3_headers := $(wildcard @LINUX@/fs/ext3/*.h)
+linux_headers := $(wildcard @LINUX@/include/linux/ext3*.h)
+
+ext3_sources := $(filter-out %.mod.c,$(wildcard @LINUX@/fs/ext3/*.c))
+new_sources := iopen.c iopen.h
+ldiskfs_sources := $(notdir $(ext3_sources) $(ext3_headers)) $(new_sources)
+
+ldiskfs-objs := $(filter %.o,$(ldiskfs_sources:.c=.o))
+
+@INCLUDE_RULES@
diff --git a/ldiskfs/ldiskfs/autoMakefile.am b/ldiskfs/ldiskfs/autoMakefile.am
new file mode 100644 (file)
index 0000000..dabfcbc
--- /dev/null
@@ -0,0 +1,64 @@
+modulefs_DATA = ldiskfs$(KMODEXT)
+$(modulefs_DATA): sources
+
+ldiskfs_linux_headers := $(addprefix linux/,$(subst ext3,ldiskfs,$(notdir $(linux_headers))))
+
+$(filter %.c,$(ldiskfs_sources)): sources $(ldiskfs_linux_headers) $(filter %.h,$(ldiskfs_sources))
+
+ldiskfs_sed_flags = \
+       -e "s/dx_hash_info/ext3_dx_hash_info/g" \
+       -e "s/dir_private_info/ext3_dir_private_info/g" \
+       -e "s/DX_HASH/EXT3_DX_HASH/g" \
+       -e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g"
+
+%.c: linux-stage/fs/ext3/%.c
+       sed $(strip $(ldiskfs_sed_flags)) $< > $@
+
+%.h: linux-stage/fs/ext3/%.h
+       sed $(strip $(ldiskfs_sed_flags)) $< > $@
+
+linux/ldiskfs%.h: linux-stage/include/linux/ext3%.h
+       sed $(strip $(ldiskfs_sed_flags)) $< > $@
+
+#
+# FIXME: we need to grab the series in configure somehow
+# (see bug 1679)
+#
+series := @top_srcdir@/kernel_patches/series/ldiskfs-2.6-suse.series
+
+sources: $(ext3_sources) $(ext3_headers) $(linux_headers) $(series)
+       rm -rf linux-stage linux sources $(ldiskfs_SOURCES)
+       mkdir -p linux-stage/fs/ext3 linux-stage/include/linux
+       cd linux-stage && quilt setup -l ../$(series)
+       cp $(ext3_sources) $(ext3_headers) $(ext3_extra) linux-stage/fs/ext3
+       cp $(linux_headers) linux-stage/include/linux
+       cd linux-stage && quilt push -a -q
+       mkdir linux
+       @echo -n "Replacing 'ext3' with 'ldiskfs':"
+       @for i in $(notdir $(ext3_headers) $(ext3_sources)) $(new_sources) ; do \
+               echo -n " $$i" ; \
+               sed $(strip $(ldiskfs_sed_flags)) \
+                       linux-stage/fs/ext3/$$i > $$i ; \
+       done
+       @for i in $(subst ext3,,$(notdir $(linux_headers))) ; do \
+               echo -n " ext3$$i" ; \
+               sed $(strip $(ldiskfs_sed_flags)) \
+                       linux-stage/include/linux/ext3$$i \
+                       > linux/ldiskfs$$i ; \
+       done
+       touch sources
+
+foo-check:
+       @echo "ldiskfs_sources: $(ldiskfs_sources)"
+       @echo "ldiskfs_SOURCES: $(ldiskfs_SOURCES)"
+       @echo "ldiskfs_headers: $(ldiskfs_headers)"
+       @echo "ldiskfs_objects: $(ldiskfs_objects)"
+       @echo "ldiskfs_OBJECTS: $(ldiskfs_OBJECTS)"
+       @echo "ldiskfs_LDADD: $(ldiskfs_LDADD)"
+
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+CLEANFILES = $(ldiskfs_sources) sources ldiskfs-dummy.c ldiskfs.mod.c
+
+clean: clean-am
+       rm -rf linux linux-stage
index c1a9bdf..bd3d9dd 100644 (file)
@@ -6,4 +6,4 @@ autom4te.cache
 config.log
 config.status
 configure
-.*.o.cmd
+.*.cmd
index 0083ac1..083edfe 100644 (file)
@@ -3,17 +3,39 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-EXTRA_DIST = Rules.linux archdep.m4 include 
-DIST_SUBDIRS = libcfs portals knals unals utils tests doc router
+EXTRA_DIST = archdep.m4 build.m4 include 
+
+SUBDIRS = portals
+DIST_SUBDIRS =
 
 if LIBLUSTRE
-SUBDIRS = portals unals utils
+SUBDIRS += unals
 else
+DIST_SUBDIRS += unals
+endif
 
+if MODULES
+SUBDIRS += libcfs
 if CRAY_PORTALS
-SUBDIRS = libcfs tests doc 
-else 
-SUBDIRS = libcfs portals knals unals utils tests doc router
+DIST_SUBDIRS += knals router
+else
+SUBDIRS += knals router
+endif
+SUBDIRS += tests
+else
+DIST_SUBDIRS += libcfs knals router tests
 endif
 
+if DOC
+SUBDIRS += doc
+else
+DIST_SUBDIRS += doc
 endif
+
+if UTILS
+SUBDIRS += utils
+else
+DIST_SUBDIRS += utils
+endif
+
+DIST_SUBDIRS += $(SUBDIRS)
diff --git a/lnet/Rules.linux b/lnet/Rules.linux
deleted file mode 100644 (file)
index 232a248..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# included in Linux kernel directories
-# Rules for module building
-
-if LINUX25
-
-basename=$(shell echo $< | sed -e 's/\.c//g' | sed -e 's/-//g' | sed -e 's/\.o//g' | sed -e 's/^.*\///g')
-AM_CPPFLAGS= -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2  -DKBUILD_MODNAME=$(MODULE) -DKBUILD_BASENAME=$(basename)
-
-$(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
-       $(LD) -m $(MOD_LINK) -r -o $(MODULE)_tmp.o $($(MODULE)_OBJECTS)
-       rm -f $(MODULE)_tmp.c
-       $(LINUX)/scripts/modpost $(LINUX)/vmlinux $(MODULE)_tmp.o
-       $(COMPILE) -UKBUILD_BASENAME -DKBUILD_BASENAME=$(MODULE) -c $(MODULE)_tmp.mod.c
-       $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $(MODULE)_tmp.o $(MODULE)_tmp.mod.o
-
-else
-
-$(MODULE).o: $($(MODULE)_OBJECTS)
-       $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $($(MODULE)_OBJECTS)
-
-endif
-
-tags:
-       rm -f $(top_srcdir)/TAGS
-       rm -f $(top_srcdir)/tags
-       find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs etags -a
-       find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs etags -a
-       find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs ctags -a
-       find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs ctags -a
index aec9e82..62cd441 100644 (file)
@@ -1,25 +1,46 @@
+# -------- we can't build modules unless srcdir = builddir
+if test x$enable_modules != xno ; then
+AC_CHECK_FILE([Makefile.am],[],
+       [AC_ERROR([At this time, Lustre does not support building kernel modules with srcdir != buildir.])])
+fi
 
 # -------- in kernel compilation? (2.5 only) -------------
-AC_ARG_ENABLE(inkernel, [  --enable-inkernel set up 2.5 kernel makefiles])
+AC_MSG_CHECKING([if inkernel build support is requested])
+AC_ARG_ENABLE([inkernel],
+       AC_HELP_STRING([--enable-inkernel],
+                      [set up 2.5 kernel makefiles]),
+       [],[enable_inkernel=no])
+AC_MSG_RESULT([$enable_inkernel])
 AM_CONDITIONAL(INKERNEL, test x$enable_inkernel = xyes)
-echo "Makefile for in kernel build: $INKERNEL"
 
 # -------- are we building against an external portals? -------
-# haha, I wonder how one is really supposed to do this
-# automake seems to have a DEFS variable which looks good
-AC_ARG_WITH(cray-portals, [  --with-cray-portals=[path] path to cray portals],
-       CRAY_PORTALS_INCLUDE="-I$with_cray_portals"
-       CC="$CC -DCRAY_PORTALS=1"
-       )
-AC_SUBST(CRAY_PORTALS_INCLUDE)
-AM_CONDITIONAL(CRAY_PORTALS, test ! "x$with_cray_portals" = x)
-
-# -------- liblustre compilation --------------
-AC_ARG_WITH(lib, [  --with-lib compile lustre library], host_cpu="lib")
+AC_MSG_CHECKING([if Cray portals should be used])
+AC_ARG_WITH([cray-portals],
+       AC_HELP_STRING([--with-cray-portals=path],
+                      [path to cray portals]),
+       [
+               CRAY_PORTALS_INCLUDE="-I$with_cray_portals"
+               AC_DEFINE(CRAY_PORTALS, 1, [Building with Cray Portals])
+       ],[with_cray_portals=no])
+AC_MSG_RESULT([$with_cray_portals])
+AM_CONDITIONAL(CRAY_PORTALS, test x$with_cray_portals != xno)
+if test x$enable_tests = xno ; then
+       AC_MSG_NOTICE([disabling tests])
+       enable_tests=no
+fi
+if test x$enable_utils = xno ; then
+       AC_MSG_NOTICE([disabling utilities])
+       enable_utils=no
+fi
 
 # -------- set linuxdir ------------
-
-AC_ARG_WITH(linux, [  --with-linux=[path] set path to Linux source (default=/usr/src/linux)],LINUX=$with_linux,LINUX=/usr/src/linux)
+AC_MSG_CHECKING([for Linux sources])
+AC_ARG_WITH([linux],
+       AC_HELP_STRING([--with-linux=path],
+                      [set path to Linux source (default=/usr/src/linux)]),
+       [LINUX=$with_linux],
+       [LINUX=/usr/src/linux])
+AC_MSG_RESULT([$LINUX])
 AC_SUBST(LINUX)
 if test x$enable_inkernel = xyes ; then
         echo ln -s `pwd` $LINUX/fs/lustre
@@ -28,202 +49,115 @@ if test x$enable_inkernel = xyes ; then
 fi
 
 #  --------------------
-AC_MSG_CHECKING(if you are running user mode linux for $host_cpu ...)
-if test $host_cpu = "lib" ; then 
-        host_cpu="lib"
-       AC_MSG_RESULT(no building Lustre library)
-else
-  if test -e $LINUX/include/asm-um ; then
-    if test  X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then
-       host_cpu="um";
-       AC_MSG_RESULT(yes)
-    else
-       AC_MSG_RESULT(no (asm doesn't point at asm-um))
-    fi
-
-  else 
-        AC_MSG_RESULT(no (asm-um missing))
-  fi
+ARCH_UM=
+UML_CFLAGS=
+if test x$enable_modules != xno ; then
+       AC_MSG_CHECKING([if you are running user mode linux for $host_cpu])
+       if test -e $LINUX/include/asm-um ; then
+               if test  X`ls -id $LINUX/include/asm/ | awk '{print $1}'` = X`ls -id $LINUX/include/asm-um | awk '{print $1}'` ; then
+                       ARCH_UM='ARCH=um'
+                       # see notes in Rules.in
+                       UML_CFLAGS='-O0'
+                       AC_MSG_RESULT(yes)
+               else
+                       AC_MSG_RESULT([no (asm doesn't point at asm-um)])
+               fi
+       else 
+               AC_MSG_RESULT([no (asm-um missing)])
+       fi
 fi
-
+AC_SUBST(ARCH_UM)
+AC_SUBST(UML_CFLAGS)
 # --------- Linux 25 ------------------
 
-AC_MSG_CHECKING(if you are running linux 2.5)
+AC_MSG_CHECKING([if you are running linux 2.5])
 if test -e $LINUX/include/linux/namei.h ; then
         linux25="yes"
-        AC_MSG_RESULT(yes)
+       KMODEXT=".ko"
 else
+       KMODEXT=".o"
         linux25="no"
-        AC_MSG_RESULT(no)
 fi
+AC_MSG_RESULT([$linux25])
 AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
-echo "Makefiles for in linux 2.5 build: $LINUX25"
+AC_SUBST(KMODEXT)
 
 # -------  Makeflags ------------------
 
-AC_MSG_CHECKING(setting make flags system architecture: )
-case ${host_cpu} in
-       lib )
-       AC_MSG_RESULT($host_cpu)
-       KCFLAGS='-g -Wall '
-       KCPPFLAGS='-D__arch_lib__ '
-       libdir='${exec_prefix}/lib/lustre'
-        MOD_LINK=elf_i386
-;;
-       um )
-       AC_MSG_RESULT($host_cpu)
-       KCFLAGS='-g -Wall -pipe -Wno-trigraphs -Wstrict-prototypes -fno-strict-aliasing -fno-common '
-        case ${linux25} in
-                yes )
-                KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE  -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/include -I$(LINUX)/arch/um/kernel/tt/include -I$(LINUX)/arch/um/kernel/skas/include -O2 -nostdinc -iwithprefix include'
-        ;;
-                * )
-                KCPPFLAGS='-D__KERNEL__ -U__i386__ -Ui386 -DUM_FASTCALL -D__arch_um__ -DSUBARCH="i386" -DNESTING=0 -D_LARGEFILE64_SOURCE  -Derrno=kernel_errno -DPATCHLEVEL=4 -DMODULE -I$(LINUX)/arch/um/kernel/tt/include -I$(LINUX)/arch/um/include '
-        ;;
-        esac
-
-        MOD_LINK=elf_i386
-;;
-       i*86 )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -pipe'
-        case ${linux25} in
-                yes )
-                KCPPFLAGS='-D__KERNEL__ -DMODULE -march=i686 -I$(LINUX)/include/asm-i386/mach-default -nostdinc -iwithprefix include '
-        ;;
-                * )
-                KCPPFLAGS='-D__KERNEL__ -DMODULE '
-        ;;
-        esac
-        MOD_LINK=elf_i386
-;;
-
-       alphaev6 )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-g -O2  -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6'
-        KCPPFLAGS='-D__KERNEL__ -DMODULE '
-        MOD_LINK=elf64alpha
-;;
-
-       alphaev67 )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-g -O2  -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6'
-        KCPPFLAGS='-D__KERNEL__ -DMODULE '
-        MOD_LINK=elf64alpha
-;;
-
-       alpha* )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-g -O2  -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev5'
-        KCPPFLAGS='-D__KERNEL__ -DMODULE '
-        MOD_LINK=elf64alpha
-;;
-
-       ia64 )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32 -mb-step'
-       KCPPFLAGS='-D__KERNEL__ -DMODULE'
-        MOD_LINK=elf64_ia64
-;;
-
-       x86_64 )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-g -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fomit-frame-pointer -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks -finline-limit=2000 -fno-strength-reduce -fno-asynchronous-unwind-tables'
-       KCPPFLAGS='-D__KERNEL__ -DMODULE'
-        MOD_LINK=elf_x86_64
-;;
-
-       sparc64 )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -Wno-unused -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs'
-        KCPPFLAGS='-D__KERNEL__'
-        MOD_LINK=elf64_sparc
-
-;;
-
-       powerpc )
-       AC_MSG_RESULT($host_cpu)
-        KCFLAGS='-O2 -g -Wall -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing -fno-common -D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring'
-        KCPPFLAGS='-D__KERNEL__ -DMODULE'
-        MOD_LINK=elf32ppclinux
-;;
-
-        *)
-       AC_ERROR("Unknown Linux Platform: $host_cpu")
-;;
-esac
+CPPFLAGS="$CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE -I\$(top_srcdir)/include -I\$(top_srcdir)/portals/include"
+
+# liblustre are all the same
+LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1"
+AC_SUBST(LLCPPFLAGS)
+
+LLCFLAGS="-g -Wall -fPIC"
+AC_SUBST(LLCFLAGS)
+
+# everyone builds against portals and lustre
+
+if test x$enable_ldiskfs = xyes ; then
+       AC_DEFINE(CONFIG_LDISKFS_FS_MODULE, 1, [build ldiskfs as a module])
+       AC_DEFINE(CONFIG_LDISKFS_FS_XATTR, 1, [enable extended attributes for ldiskfs])
+       AC_DEFINE(CONFIG_LDISKFS_POSIX_ACL, 1, [enable posix acls])
+       AC_DEFINE(CONFIG_LDISKFS_FS_SECURITY, 1, [enable fs security])
+fi
+
+EXTRA_KCFLAGS="-g -I$PWD/portals/include -I$PWD/include $CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE"
 
 # ----------- make dep run? ------------------
 
-if test $host_cpu != "lib" ; then 
-  AC_MSG_CHECKING(if make dep has been run in kernel source (host $host_cpu) )
-  if test -f $LINUX/include/linux/config.h ; then
-  AC_MSG_RESULT(yes)
- else
-  AC_MSG_ERROR(** cannot find $LINUX/include/linux/config.h. Run make dep in $LINUX.)
-  fi
+if test x$enable_modules != xno ; then
+       AC_MSG_CHECKING([if make dep has been run in kernel source (host $host_cpu)])
+       if test -f $LINUX/include/linux/config.h ; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               AC_MSG_ERROR([** cannot find $LINUX/include/linux/config.h. Run make dep in $LINUX.])
+       fi
 fi
 
 # ------------ include paths ------------------
 
-KINCFLAGS="$CRAY_PORTALS_INCLUDE $CRAY_PORTALS_COMMANDLINE \
-       -I\$(top_srcdir)/include \
-       -I\$(top_srcdir)/portals/include"
-if test $host_cpu != "lib" ; then 
-    KINCFLAGS="$KINCFLAGS -I$LINUX/include -I$LINUX/include"
-else
-    KINCFLAGS="$KINCFLAGS -I\$(top_srcdir)/utils -I\$(top_srcdir)/portals/unals"
-fi
-CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS"
-
-if test $host_cpu != "lib" ; then 
-# ------------ autoconf.h ------------------
-  AC_MSG_CHECKING(if autoconf.h is in kernel source)
-  if test -f $LINUX/include/linux/autoconf.h ; then
-      AC_MSG_RESULT(yes)
-  else
-      AC_MSG_ERROR(** cannot find $LINUX/include/linux/autoconf.h. Run make config in $LINUX.)
-  fi
-
-# ------------ LINUXRELEASE and moduledir ------------------
-  AC_MSG_CHECKING(for Linux release)
-  
-  dnl We need to rid ourselves of the nasty [ ] quotes.
-  changequote(, )
-  dnl Get release from version.h
-  LINUXRELEASE="`sed -ne 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_-]*\).*/\1/p' $LINUX/include/linux/version.h`"
-  changequote([, ])
-  
-  moduledir='$(libdir)/modules/'$LINUXRELEASE/kernel
-  AC_SUBST(moduledir)
-  
-  modulefsdir='$(moduledir)/fs/$(PACKAGE)'
-  AC_SUBST(modulefsdir)
-  
-  AC_MSG_RESULT($LINUXRELEASE)
-  AC_SUBST(LINUXRELEASE)
+if test x$enable_modules != xno ; then
+       # ------------ autoconf.h ------------------
+       AC_MSG_CHECKING([if autoconf.h is in kernel source])
+       if test -f $LINUX/include/linux/autoconf.h ; then
+               AC_MSG_RESULT(yes)
+       else
+               AC_MSG_RESULT(no)
+               AC_MSG_ERROR([** cannot find $LINUX/include/linux/autoconf.h. Run make config in $LINUX.])
+       fi
+
+       # ------------ LINUXRELEASE and moduledir ------------------
+       AC_MSG_CHECKING([for Linux release])
+
+       # this is bogus, as it doesn't work against kernel-source rpms  
+       dnl We need to rid ourselves of the nasty [ ] quotes.
+       changequote(, )
+       dnl Get release from version.h
+       LINUXRELEASE="`sed -ne 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_-]*\).*/\1/p' $LINUX/include/linux/version.h`"
+       changequote([, ])
+
+       moduledir='$(libdir)/modules/'$LINUXRELEASE/kernel
+       AC_SUBST(moduledir)
 
-# ------------ RELEASE --------------------------------
-  AC_MSG_CHECKING(lustre release)
+       modulefsdir='$(moduledir)/fs/$(PACKAGE)'
+       AC_SUBST(modulefsdir)
+
+       AC_MSG_RESULT($LINUXRELEASE)
+       AC_SUBST(LINUXRELEASE)
+
+       # ------------ RELEASE --------------------------------
+       AC_MSG_CHECKING([lustre release])
   
-  dnl We need to rid ourselves of the nasty [ ] quotes.
-  changequote(, )
-  dnl Get release from version.h
-  RELEASE="`sed -ne 's/-/_/g' -e 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_]*\).*/\1/p' $LINUX/include/linux/version.h`_`date +%Y%m%d%H%M`"
-  changequote([, ])
-
-  AC_MSG_RESULT($RELEASE)
-  AC_SUBST(RELEASE)
-
-# ---------- modversions? --------------------
-  AC_MSG_CHECKING(for MODVERSIONS)
-  if egrep -e 'MODVERSIONS.*1' $LINUX/include/linux/autoconf.h >/dev/null 2>&1;
-  then
-       if test $linux25 != "yes"; then
-                MFLAGS="-DMODULE -DMODVERSIONS -include $LINUX/include/linux/modversions.h -DEXPORT_SYMTAB"
-                AC_MSG_RESULT(yes)
-        fi
-  fi
+       dnl We need to rid ourselves of the nasty [ ] quotes.
+       changequote(, )
+       dnl Get release from version.h
+       RELEASE="`sed -ne 's/-/_/g' -e 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z_]*\).*/\1/p' $LINUX/include/linux/version.h`_`date +%Y%m%d%H%M`"
+       changequote([, ])
+
+       AC_MSG_RESULT($RELEASE)
+       AC_SUBST(RELEASE)
 fi
 
 # ---------- Portals flags --------------------
@@ -236,68 +170,91 @@ fi
 #fi
 #AC_SUBST(usrprefix)
 
-AC_MSG_CHECKING(if kernel has CPU affinity support)
-SET_CPUS_ALLOW="`grep -c set_cpus_allowed $LINUX/kernel/softirq.c`"
-if test "$SET_CPUS_ALLOW" != 0 ; then
-  enable_affinity_temp="-DCPU_AFFINITY=1"
-  AC_MSG_RESULT(yes)
+AC_MSG_CHECKING([for zero-copy TCP support])
+AC_ARG_ENABLE([zerocopy],
+       AC_HELP_STRING([--disable-zerocopy],
+                      [disable socknal zerocopy]),
+       [],[enable_zerocopy='yes'])
+if test x$enable_zerocopy = xno ; then
+       AC_MSG_RESULT([no (by request)])
 else
-  enable_affinity_temp=""
-  AC_MSG_RESULT(no)
+       ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
+       if test "$ZCCD" != 0 ; then
+               AC_DEFINE(SOCKNAL_ZC, 1, [use zero-copy TCP])
+               AC_MSG_RESULT(yes)
+       else
+               AC_MSG_RESULT([no (no kernel support)])
+       fi
 fi
 
-AC_MSG_CHECKING(if kernel has zero-copy TCP support)
-ZCCD="`grep -c zccd $LINUX/include/linux/skbuff.h`"
-if test "$ZCCD" != 0 ; then
-  enable_zerocopy_temp="-DSOCKNAL_ZC=1"
-  AC_MSG_RESULT(yes)
+AC_MSG_CHECKING([for CPU affinity support])
+AC_ARG_ENABLE([affinity],
+       AC_HELP_STRING([--disable-affinity],
+                      [disable process/irq affinity]),
+       [],[enable_affinity='yes'])
+if test x$enable_affinity = xno ; then
+       AC_MSG_RESULT([no (by request)])
 else
-  enable_zerocopy_temp=""
-  AC_MSG_RESULT(no)
+       SET_CPUS_ALLOW="`grep -c set_cpus_allowed $LINUX/kernel/softirq.c`"
+       if test "$SET_CPUS_ALLOW" != 0 ; then
+               AC_DEFINE(CPU_AFFINITY, 1, [kernel has cpu affinity support])
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no (no kernel support)])
+       fi
 fi
 
-AC_ARG_ENABLE(zerocopy, [  --disable-zerocopy disable socknal zerocopy],enable_zerocopy="", enable_zerocopy=$enable_zerocopy_temp)
 
-AC_ARG_ENABLE(affinity, [  --disable-affinity disable process/irq affinity],enable_affinity="", enable_affinity=$enable_affinity_temp)
 #####################################
 
-AC_MSG_CHECKING(if quadrics kernel headers are present)
+AC_MSG_CHECKING([if quadrics kernel headers are present])
 if test -d $LINUX/drivers/net/qsnet ; then
-  AC_MSG_RESULT(yes)
-  QSWNAL="qswnal"
-  AC_MSG_CHECKING(for multirail EKC)
-  if test -f $LINUX/include/elan/epcomms.h; then
-       AC_MSG_RESULT(supported)
-       with_quadrics="-DMULTIRAIL_EKC=1"
-  else
-       AC_MSG_RESULT(not supported)
-       with_quadrics="-I$LINUX/drivers/net/qsnet/include"
-  fi
-  :
+       AC_MSG_RESULT([yes])
+       QSWNAL="qswnal"
+       AC_MSG_CHECKING([for multirail EKC])
+       if test -f $LINUX/include/elan/epcomms.h; then
+               AC_MSG_RESULT([supported])
+               QSWCPPFLAGS="-DMULTIRAIL_EKC=1"
+       else
+               AC_MSG_RESULT([not supported])
+               QSWCPPFLAGS="-I$LINUX/drivers/net/qsnet/include"
+       fi
 else
-  AC_MSG_RESULT(no)
-  QSWNAL=""
-  with_quadrics=""
-  :
+       AC_MSG_RESULT([no])
+       QSWNAL=""
+       QSWCPPFLAGS=""
 fi
-AC_SUBST(with_quadrics)
+AC_SUBST(QSWCPPFLAGS)
 AC_SUBST(QSWNAL)
 
-# R. Read 5/02
-GMNAL=""
-echo "checking with-gm=" ${with_gm}
-if test "${with_gm+set}" = set; then
-  if test "${with_gm}" = yes; then
-    with_gm="-I/usr/local/gm/include"
-  else
-    with_gm="-I$with_gm/include -I$with_gm/drivers -I$with_gm/drivers/linux/gm"
-  fi
-  GMNAL="gmnal"
-else
-# default case - no GM
-  with_gm=""
-fi
-AC_SUBST(with_gm)
+AC_MSG_CHECKING([if gm support was requested])
+AC_ARG_WITH([gm],
+       AC_HELP_STRING([--with-gm=path],
+                      [build gmnal against path]),
+       [
+               case $with_gm in 
+                       yes)
+                               AC_MSG_RESULT([yes])
+                               GMCPPFLAGS="-I/usr/local/gm/include"
+                               GMNAL="gmnal"
+                               ;;
+                       no)
+                               AC_MSG_RESULT([no])
+                               GMCPPFLAGS=""
+                               GMNAL=""
+                               ;;
+                       *)
+                               AC_MSG_RESULT([yes])
+                               GMCPPFLAGS="-I$with_gm/include -I$with_gm/drivers -I$with_gm/drivers/linux/gm"
+                               GMNAL="gmnal"
+                               ;;
+               esac
+       ],[
+               AC_MSG_RESULT([no])
+               GMCPPFLAGS=""
+               GMNAL=""
+       ])
+AC_SUBST(GMCPPFLAGS)
 AC_SUBST(GMNAL)
 
 
@@ -305,136 +262,241 @@ AC_SUBST(GMNAL)
 default_ib_include_dir=/usr/local/ib/include
 an_ib_include_file=vapi.h
 
-AC_ARG_WITH(ib, [  --with-ib=[yes/no/path] Path to IB includes], with_ib=$withval, with_ib=$default_ib)
-AC_MSG_CHECKING(if IB headers are present)
-if test "$with_ib" = yes; then
-    with_ib=$default_ib_include_dir
-fi
-if test "$with_ib" != no -a -f ${with_ib}/${an_ib_include_file}; then
-    AC_MSG_RESULT(yes)
-    IBNAL="ibnal"
-    with_ib="-I${with_ib}"
-else
-    AC_MSG_RESULT(no)
-    IBNAL=""
-    with_ib=""
-fi
+AC_MSG_CHECKING([if ib nal support was requested])
+AC_ARG_WITH([ib],
+       AC_HELP_STRING([--with-ib=yes/no/path],
+                      [Path to IB includes]),
+       [
+               case $with_ib in
+                       yes)
+                               AC_MSG_RESULT([yes])
+                               IBCPPFLAGS="-I/usr/local/ib/include"
+                               IBNAL="ibnal"
+                               ;;
+                       no)
+                               AC_MSG_RESULT([no])
+                               IBCPPFLAGS=""
+                               IBNAL=""
+                               ;;
+                       *)
+                               AC_MSG_RESULT([yes])
+                               IBCPPFLAGS="-I$with_ib"
+                               IBNAL=""
+                               ;;
+               esac
+       ],[
+               AC_MSG_RESULT([no])
+               IBFLAGS=""
+               IBNAL=""
+       ])
 AC_SUBST(IBNAL)
-AC_SUBST(with_ib)
+AC_SUBST(IBCPPFLAGS)
 
 
 def_scamac=/opt/scali/include
-AC_ARG_WITH(scamac, [  --with-scamac=[yes/no/path] Path to ScaMAC includes (default=/opt/scali/include)], with_scamac=$withval, with_scamac=$def_scamac)
-AC_MSG_CHECKING(if ScaMAC headers are present)
-if test "$with_scamac" = yes; then
-  with_scamac=$def_scamac
-fi
-if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
-  AC_MSG_RESULT(yes)
-  SCIMACNAL="scimacnal"
-  with_scamac="-I${with_scamac} -I${with_scamac}/icm"
-else
-  AC_MSG_RESULT(no)
-  SCIMACNAL=""
-  with_scamac=""
-fi
-
-AC_SUBST(with_scamac)
+AC_MSG_CHECKING([if ScaMAC support was requested])
+AC_ARG_WITH([scamac],
+       AC_HELP_STRING([--with-scamac=yes/no/path],
+                      [Path to ScaMAC includes (default=/opt/scali/include)]),
+       [
+               case $with_scamac in
+                       yes)
+                               AC_MSG_RESULT([yes])
+                               SCIMACCPPFLAGS="-I/opt/scali/include"
+                               SCIMACNAL="scimacnal"
+                               ;;
+                       no)
+                               AC_MSG_RESULT([no])
+                               SCIMACCPPFLAGS=""
+                               SCIMACNAL=""
+                               ;;
+                       *)
+                               AC_MSG_RESULT([yes])
+                               SCIMACCPPFLAGS="-I$with_scamac -I$with_scamac/icm"
+                               SCIMACNAL="scimacnal"
+                               ;;
+               esac
+       ],[
+               AC_MSG_RESULT([no])
+               SCIMACCPPFLAGS=""
+               SCIMACNAL=""
+       ])
+AC_SUBST(SCIMACCPPFLAGS)
 AC_SUBST(SCIMACNAL)
+# if test "$with_scamac" != no -a -f ${with_scamac}/scamac.h; then
 
-CFLAGS="$KCFLAGS"
-CPPFLAGS="$KINCFLAGS $KCPPFLAGS $MFLAGS $enable_zerocopy $enable_affinity $with_quadrics $with_gm $with_scamac $with_ib"
-if test $host_cpu == "lib" ; then 
-CPPFLAGS="$CPPFLAGS -fPIC -D_LARGEFILE64_SOURCE=1 -g"
-fi
-
-AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
 AC_SUBST(MOD_LINK)
 AC_SUBST(LINUX25)
-AM_CONDITIONAL(LIBLUSTRE, test x$host_cpu = xlib)
+
+# these are like AC_TRY_COMPILE, but try to build modules against the
+# kernel, inside the kernel-tests directory
+
+AC_DEFUN([LUSTRE_MODULE_CONFTEST],
+[cat >conftest.c <<_ACEOF
+$1
+_ACEOF
+])
+
+AC_DEFUN([LUSTRE_MODULE_COMPILE_IFELSE],
+[m4_ifvaln([$1], [LUSTRE_MODULE_CONFTEST([$1])])dnl
+rm -f kernel-tests/conftest.o kernel-tests/conftest.mod.c kernel-tests/conftest.ko
+AS_IF([_AC_EVAL_STDERR([cp conftest.c kernel-tests && make modules -C $LINUX $ARCH_UM SUBDIRS=$PWD/kernel-tests >/dev/null]) &&
+       AC_TRY_COMMAND([test -s kernel-tests/conftest.o])],
+       [$2],
+       [_AC_MSG_LOG_CONFTEST
+m4_ifvaln([$3],[$3])dnl])dnl
+rm -f kernel-tests/conftest.o kernel-tests/conftest.mod.c kernel-tests/conftest.mod.o kernel-tests/conftest.ko m4_ifval([$1], [kernel-tests/conftest.c conftest.c])[]dnl
+])
+
+AC_DEFUN([LUSTRE_MODULE_TRY_COMPILE],
+[LUSTRE_MODULE_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
 
 # ---------- Red Hat 2.4.18 has iobuf->dovary --------------
 # But other kernels don't
 
 AC_MSG_CHECKING([if struct kiobuf has a dovary field])
-AC_TRY_COMPILE([#define __KERNEL__
-               #include <linux/iobuf.h>],
-              [struct kiobuf iobuf;
-               iobuf.dovary = 1;],
-              [AC_MSG_RESULT([yes])
-                CPPFLAGS="$CPPFLAGS -DHAVE_KIOBUF_DOVARY"],
-              [AC_MSG_RESULT([no])])
+LUSTRE_MODULE_TRY_COMPILE(
+       [
+               #include <linux/iobuf.h>
+       ],[
+               struct kiobuf iobuf;
+               iobuf.dovary = 1;
+       ],[
+               AC_MSG_RESULT([yes])
+               AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
+       ],[
+               AC_MSG_RESULT([no])
+       ])
+
+# ----------- 2.6.4 no longer has page->list ---------------
+AC_MSG_CHECKING([if struct page has a list field])
+LUSTRE_MODULE_TRY_COMPILE(
+       [
+               #include <linux/mm.h>
+       ],[
+               struct page page;
+               &page.list;
+       ],[
+               AC_MSG_RESULT([yes])
+               AC_DEFINE(HAVE_PAGE_LIST, 1, [struct page has a list field])
+       ],[
+               AC_MSG_RESULT([no])
+       ])
 
 # ---------- Red Hat 2.4.20 backports some 2.5 bits --------
 # This needs to run after we've defined the KCPPFLAGS
 
-AC_MSG_CHECKING(for kernel version)
-AC_TRY_COMPILE([#define __KERNEL__
-             #include <linux/sched.h>],
-            [struct task_struct p;
-             p.sighand = NULL;],
-            [RH_2_4_20=1],
-            [RH_2_4_20=0])
-
-if test $RH_2_4_20 = 1; then
-       AC_MSG_RESULT(redhat-2.4.20)
-       CPPFLAGS="$CPPFLAGS -DCONFIG_RH_2_4_20"
-else
-       AC_MSG_RESULT($LINUXRELEASE)
-fi 
+AC_MSG_CHECKING([for kernel version])
+LUSTRE_MODULE_TRY_COMPILE(
+       [
+               #include <linux/sched.h>
+       ],[
+               struct task_struct p;
+               p.sighand = NULL;
+       ],[
+               AC_DEFINE(CONFIG_RH_2_4_20, 1, [this kernel contains Red Hat 2.4.20 patches])
+               AC_MSG_RESULT([redhat-2.4.20])
+       ],[
+               AC_MSG_RESULT([$LINUXRELEASE])
+       ])
 
 # ---------- Red Hat 2.4.21 backports some more 2.5 bits --------
 
-AC_MSG_CHECKING(if kernel defines PDE)
+AC_MSG_CHECKING([if kernel defines PDE])
 HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
 if test "$HAVE_PDE" != 0 ; then
-  CPPFLAGS="$CPPFLAGS -DHAVE_PDE"
-  AC_MSG_RESULT(yes)
+       AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE])
+       AC_MSG_RESULT([yes])
 else
-  AC_MSG_RESULT(no)
+       AC_MSG_RESULT([no])
 fi
 
-AC_MSG_CHECKING(if kernel passes struct file to direct_IO)
+AC_MSG_CHECKING([if kernel passes struct file to direct_IO])
 HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
 if test "$HAVE_DIO_FILE" != 0 ; then
-  CPPFLAGS="$CPPFLAGS -DHAVE_DIO_FILE"
-  AC_MSG_RESULT(yes)
+       AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO])
+       AC_MSG_RESULT(yes)
 else
-  AC_MSG_RESULT(no)
+       AC_MSG_RESULT(no)
 fi
 
-# --- Check that ext3 and ext3 xattr are enabled in the kernel
-if test "$host_cpu" != "lib" ; then 
-       AC_MSG_CHECKING([that ext3 is enabled in the kernel])
-       AC_TRY_COMPILE([
-#define __KERNEL__
-#include <linux/config.h>
-               ],
+if test x$enable_modules != xno ; then
+       # ---------- modules? ------------------------
+       AC_MSG_CHECKING([for module support])
+       LUSTRE_MODULE_TRY_COMPILE(
                [
-#ifdef CONFIG_EXT3_FS
-       return 0;
-#else
-#error CONFIG_EXT3_FS not #defined
-#endif
-               ],[AC_MSG_RESULT([yes])],
-               [AC_MSG_RESULT([no])
-               AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel (CONFIG_EXT3_FS)])
+                       #include <linux/config.h>
+               ],[
+                       #ifndef CONFIG_MODULES
+                       #error CONFIG_MODULES not #defined
+                       #endif
+               ],[
+                       AC_MSG_RESULT([yes])
+               ],[
+                       AC_MSG_RESULT([no])
+                       AC_MSG_ERROR([module support is required to build Lustre kernel modules.])
                ])
-# disable this check until our xattr patches define it!
-#      AC_MSG_CHECKING([that extended attributes for ext3 are enabled in the kernel])
-#      AC_TRY_COMPILE([
-##define __KERNEL__
-##include <linux/config.h>
-#              ],
-#              [
-##ifdef CONFIG_EXT3_FS_XATTR
-#      return 0;
-##else
-##error CONFIG_EXT3_FS_XATTR not #defined
-##endif
-#              ],[AC_MSG_RESULT([yes])],
-#              [AC_MSG_RESULT([no])
-#              AC_MSG_ERROR([Lustre requires that extended attributes for ext3 are enabled in the kernel (CONFIG_EXT3_FS_XATTR)])
-#              ])
+
+       # ---------- modversions? --------------------
+       AC_MSG_CHECKING([for MODVERSIONS])
+       LUSTRE_MODULE_TRY_COMPILE(
+               [
+                       #include <linux/config.h>
+               ],[
+                       #ifndef CONFIG_MODVERSIONS
+                       #error CONFIG_MODVERSIONS not #defined
+                       #endif
+               ],[
+                       AC_MSG_RESULT([yes])
+               ],[
+                       AC_MSG_RESULT([no])
+               ])
+
+       if test $BACKINGFS = 'ext3' ; then
+               # --- Check that ext3 and ext3 xattr are enabled in the kernel
+               AC_MSG_CHECKING([that ext3 is enabled in the kernel])
+               LUSTRE_MODULE_TRY_COMPILE(
+                       [
+                               #include <linux/config.h>
+                       ],[
+                               #ifndef CONFIG_EXT3_FS
+                               #ifndef CONFIG_EXT3_FS_MODULE
+                               #error CONFIG_EXT3_FS not #defined
+                               #endif
+                               #endif
+                       ],[
+                               AC_MSG_RESULT([yes])
+                       ],[
+                               AC_MSG_RESULT([no])
+                               AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel (CONFIG_EXT3_FS)])
+                       ])
+
+               AC_MSG_CHECKING([that extended attributes for ext3 are enabled in the kernel])
+               LUSTRE_MODULE_TRY_COMPILE(
+                       [
+                               #include <linux/config.h>
+                       ],[
+                               #ifndef CONFIG_EXT3_FS_XATTR
+                               #error CONFIG_EXT3_FS_XATTR not #defined
+                               #endif
+                       ],[
+                               AC_MSG_RESULT([yes])
+                       ],[
+                               AC_MSG_RESULT([no])
+                               AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel (CONFIG_EXT3_FS_XATTR.)])
+                               AC_MSG_WARN([This build may fail.])
+                       ])
+       fi # BACKINGFS = ext3
 fi
 
+CPPFLAGS="-include \$(top_builddir)/include/config.h $CPPFLAGS"
+EXTRA_KCFLAGS="-include $PWD/include/config.h $EXTRA_KCFLAGS"
+AC_SUBST(EXTRA_KCFLAGS)
+
+#echo "KCPPFLAGS: $KCPPFLAGS"
+#echo "KCFLAGS: $KCFLAGS"
+#echo "LLCPPFLAGS: $LLCPPFLAGS"
+#echo "LLCFLAGS: $LLCFLAGS"
+#echo "MOD_LINK: $MOD_LINK"
+#echo "CFLAGS: $CFLAGS"
+#echo "CPPFLAGS: $CPPFLAGS"
index 8c55b20..8ccb1d3 100644 (file)
@@ -28,6 +28,9 @@ pkgexampledir='${prefix}/usr/lib/$(PACKAGE)/examples'
 AC_SUBST(pkgexampledir)
 pymoddir='${prefix}/usr/lib/${PACKAGE}/python/Lustre'
 AC_SUBST(pymoddir)
+# for substitution in lconf
+PYMOD_DIR="/usr/lib/$PACKAGE/python"
+AC_SUBST(PYMOD_DIR)
 modulenetdir='$(moduledir)/net/$(PACKAGE)'
 AC_SUBST(modulenetdir)
 
@@ -35,14 +38,15 @@ AC_SUBST(modulenetdir)
 # ----------  BAD gcc? ------------
 AC_PROG_RANLIB
 AC_PROG_CC
-AC_MSG_CHECKING(for buggy compiler)
+AC_MSG_CHECKING([for buggy compiler])
 CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
 bad_cc() {
+       AC_MSG_RESULT([buggy compiler found!])
        echo
        echo "   '$CC_VERSION'"
        echo "  has been known to generate bad code, "
        echo "  please get an updated compiler."
-       AC_MSG_ERROR(sorry)
+       AC_MSG_ERROR([sorry])
 }
 TMP_VERSION=`echo $CC_VERSION | cut -c 1-16`
 if test "$TMP_VERSION" = "gcc version 2.95"; then
@@ -61,7 +65,7 @@ case "$CC_VERSION" in
                bad_cc
                ;;
        *)
-               AC_MSG_RESULT(no known problems)
+               AC_MSG_RESULT([no known problems])
                ;;
 esac
 # end ------  BAD gcc? ------------
@@ -70,29 +74,30 @@ esac
 
 # this doesn't seem to work on older autoconf
 # AC_CHECK_LIB(readline, readline,,)
-AC_ARG_ENABLE(readline,        [  --enable-readline  use readline library],,
-                       enable_readline="yes")
-if test "$enable_readline" = "yes" ; then
-   LIBREADLINE="-lreadline -lncurses"
-   HAVE_LIBREADLINE="-DHAVE_LIBREADLINE=1"
+AC_MSG_CHECKING([for readline support])
+AC_ARG_ENABLE(readline,
+       AC_HELP_STRING([--disable-readline],
+                       [do not use readline library]),
+       [],[enable_readline='yes'])
+AC_MSG_RESULT([$enable_readline]) 
+if test x$enable_readline = xyes ; then
+       LIBREADLINE="-lreadline -lncurses"
+       AC_DEFINE(HAVE_LIBREADLINE, 1, [readline library is available])
 else 
-   LIBREADLINE=""
-   HAVE_LIBREADLINE=""
+       LIBREADLINE=""
 fi
 AC_SUBST(LIBREADLINE)
-AC_SUBST(HAVE_LIBREADLINE)
 
-AC_ARG_ENABLE(efence,  [  --enable-efence  use efence library],,
-                       enable_efence="no")
+AC_MSG_CHECKING([if efence debugging support is requested])
+AC_ARG_ENABLE(efence,
+       AC_HELP_STRING([--enable-efence],
+                       [use efence library]),
+       [],[enable_efence='no'])
+AC_MSG_RESULT([$enable_efence])
 if test "$enable_efence" = "yes" ; then
-   LIBEFENCE="-lefence"
-   HAVE_LIBEFENCE="-DHAVE_LIBEFENCE=1"
+       LIBEFENCE="-lefence"
+       AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
 else 
-   LIBEFENCE=""
-   HAVE_LIBEFENCE=""
+       LIBEFENCE=""
 fi
 AC_SUBST(LIBEFENCE)
-AC_SUBST(HAVE_LIBEFENCE)
-
index 4361858..4803a9b 100644 (file)
         sprintf(comm, fmt, ## a)
 #endif
 
+#ifdef HAVE_PAGE_LIST
+/* 2.4 alloc_page users can use page->list */
+#define PAGE_LIST_ENTRY list
+#define PAGE_LIST(page) ((page)->list)
+#else
+/* 2.6 alloc_page users can use page->lru */
+#define PAGE_LIST_ENTRY lru
+#define PAGE_LIST(page) ((page)->lru)
+#endif
+
 #endif /* _PORTALS_COMPAT_H */
index 89a4aa6..06c8fdb 100644 (file)
@@ -1,3 +1,3 @@
 Makefile
 Makefile.in
-.*.o.cmd
+.*.cmd
index e995588..4c4a6ed 100644 (file)
@@ -1,3 +1,9 @@
 .deps
 Makefile
-Makefile.in
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.cmd
+.*.flags
+.tmp_versions
diff --git a/lnet/klnds/gmlnd/Makefile.am b/lnet/klnds/gmlnd/Makefile.am
deleted file mode 100644 (file)
index bac4680..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-include ../../Rules.linux
-
-MODULE = kgmnal
-modulenet_DATA = kgmnal.o
-EXTRA_PROGRAMS = kgmnal
-
-DEFS = -DGM_KERNEL
-kgmnal_SOURCES = gmnal.h gmnal_api.c gmnal_cb.c gmnal_comm.c gmnal_utils.c gmnal_module.c
diff --git a/lnet/klnds/gmlnd/Makefile.in b/lnet/klnds/gmlnd/Makefile.in
new file mode 100644 (file)
index 0000000..3892fb7
--- /dev/null
@@ -0,0 +1,6 @@
+MODULES := kgmnal
+kgmnal-objs := gmnal_api.o gmnal_cb.o gmnal_comm.o gmnal_utils.o gmnal_module.o
+
+EXTRA_CFLAGS := @GMCPPFLAGS@
+
+@INCLUDE_RULES@
similarity index 54%
rename from lustre/ost/Makefile.am
rename to lnet/klnds/gmlnd/autoMakefile.am
index b2e51c3..9e92c69 100644 (file)
@@ -3,11 +3,7 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-DEFS= 
+modulenet_DATA = kgmnal$(KMODEXT)
 
-MODULE = ost
-modulefs_DATA = ost.o
-EXTRA_PROGRAMS = ost
-ost_SOURCES = ost_handler.c lproc_ost.c
-
-include $(top_srcdir)/Rules
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(kgmnal-objs:%.o=%.c) gmnal.h
index e995588..409d56d 100644 (file)
@@ -1,3 +1,9 @@
 .deps
 Makefile
-Makefile.in
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.*.cmd
+.tmp_versions
diff --git a/lnet/klnds/iblnd/Makefile.am b/lnet/klnds/iblnd/Makefile.am
deleted file mode 100644 (file)
index 84818dc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-include ../../Rules.linux
-
-MODULE = kibnal
-modulenet_DATA = kibnal.o
-EXTRA_PROGRAMS = kibnal
-
-
-DEFS =
-CPPFLAGS=@CPPFLAGS@ @with_ib@
-kibnal_SOURCES = ibnal.h ibnal.c ibnal_cb.c
diff --git a/lnet/klnds/iblnd/Makefile.in b/lnet/klnds/iblnd/Makefile.in
new file mode 100644 (file)
index 0000000..2b29307
--- /dev/null
@@ -0,0 +1,6 @@
+MODULES := kibnal
+kibnal-objs := ibnal.o ibnal_cb.o
+
+EXTRA_CFLAGS := @IBCPPFLAGS@
+
+@INCLUDE_RULES@
diff --git a/lnet/klnds/iblnd/autoMakefile.am b/lnet/klnds/iblnd/autoMakefile.am
new file mode 100644 (file)
index 0000000..46bfc0d
--- /dev/null
@@ -0,0 +1,4 @@
+modulenet_DATA = kibnal$(KMODEXT)
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(kibnal-objs:%.o=%.c) ibnal.h
index e995588..409d56d 100644 (file)
@@ -1,3 +1,9 @@
 .deps
 Makefile
-Makefile.in
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.*.cmd
+.tmp_versions
diff --git a/lnet/klnds/qswlnd/Makefile.am b/lnet/klnds/qswlnd/Makefile.am
deleted file mode 100644 (file)
index 3eb4dd5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-include ../../Rules.linux
-
-MODULE = kqswnal
-modulenet_DATA = kqswnal.o
-EXTRA_PROGRAMS = kqswnal
-
-
-#CFLAGS:= @KCFLAGS@ 
-#CPPFLAGS:=@KCPPFLAGS@
-DEFS =
-CPPFLAGS=@CPPFLAGS@ @with_quadrics@
-kqswnal_SOURCES = qswnal.c qswnal_cb.c qswnal.h
diff --git a/lnet/klnds/qswlnd/Makefile.in b/lnet/klnds/qswlnd/Makefile.in
new file mode 100644 (file)
index 0000000..7defd13
--- /dev/null
@@ -0,0 +1,6 @@
+MODULES := kqswnal
+kqswnal-objs := qswnal.o qswnal_cb.o
+
+EXTRA_CFLAGS := @QSWCPPFLAGS@
+
+@INCLUDE_RULES@
diff --git a/lnet/klnds/qswlnd/autoMakefile.am b/lnet/klnds/qswlnd/autoMakefile.am
new file mode 100644 (file)
index 0000000..c601465
--- /dev/null
@@ -0,0 +1,9 @@
+# Copyright (C) 2001  Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
+
+modulenet_DATA = kqswnal$(KMODEXT)
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(kqswnal-objs:%.o=%.c) qswnal.h
index e995588..409d56d 100644 (file)
@@ -1,3 +1,9 @@
 .deps
 Makefile
-Makefile.in
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.*.cmd
+.tmp_versions
diff --git a/lnet/klnds/scimaclnd/Makefile.am b/lnet/klnds/scimaclnd/Makefile.am
deleted file mode 100644 (file)
index 6da31f0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-include ../../Rules.linux
-
-MODULE = kscimacnal
-modulenet_DATA = kscimacnal.o
-EXTRA_PROGRAMS = kscimacnal
-
-DEFS =
-kscimacnal_SOURCES = scimacnal.c scimacnal_cb.c scimacnal.h
diff --git a/lnet/klnds/scimaclnd/Makefile.in b/lnet/klnds/scimaclnd/Makefile.in
new file mode 100644 (file)
index 0000000..19ee350
--- /dev/null
@@ -0,0 +1,6 @@
+MODULES := kscimacnal
+kscimacnal-objs := scimacnal.o scimacnal_cb.o
+
+EXTRA_CFLAGS += @SCIMACCPPFLAGS@
+
+@INCLUDE_RULES@
diff --git a/lnet/klnds/scimaclnd/autoMakefile.am b/lnet/klnds/scimaclnd/autoMakefile.am
new file mode 100644 (file)
index 0000000..4580d2b
--- /dev/null
@@ -0,0 +1,7 @@
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
+
+modulenet_DATA = kscimacnal$(KMODEXT)
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(ksimacnal-objs:%.o=%.c) scimacnal.h
index 95973d6..702fcbe 100644 (file)
@@ -1,4 +1,9 @@
 .deps
 Makefile
-Makefile.in
-.*.o.cmd
+.*.cmd
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.tmp_versions
diff --git a/lnet/klnds/socklnd/Makefile.am b/lnet/klnds/socklnd/Makefile.am
deleted file mode 100644 (file)
index acdba5e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-include ../../Rules.linux
-
-MODULE = ksocknal
-modulenet_DATA = ksocknal.o
-EXTRA_PROGRAMS = ksocknal
-
-# If you don't build with -O2, your modules won't insert, becahse htonl is
-# just special that way.
-AM_CFLAGS = -O2
-
-DEFS =
-ksocknal_SOURCES = socknal.c socknal_cb.c socknal.h
diff --git a/lnet/klnds/socklnd/Makefile.in b/lnet/klnds/socklnd/Makefile.in
new file mode 100644 (file)
index 0000000..9377751
--- /dev/null
@@ -0,0 +1,8 @@
+MODULES := ksocknal
+ksocknal-objs := socknal.o socknal_cb.o
+
+# If you don't build with -O2, your modules won't insert, becahse htonl is
+# just special that way.
+EXTRA_CFLAGS := -O2
+
+@INCLUDE_RULES@
diff --git a/lnet/klnds/socklnd/autoMakefile.am b/lnet/klnds/socklnd/autoMakefile.am
new file mode 100644 (file)
index 0000000..0923459
--- /dev/null
@@ -0,0 +1,9 @@
+# Copyright (C) 2001  Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
+
+modulenet_DATA = ksocknal$(KMODEXT)
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(ksocknal-objs:%.o=%.c) socknal.h
index 7fa686f..3a771f9 100644 (file)
@@ -1,5 +1,10 @@
 .deps
 Makefile
-Makefile.in
 link-stamp
-.*.o.cmd
+.*.cmd
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.tmp_versions
diff --git a/lnet/libcfs/Makefile.am b/lnet/libcfs/Makefile.am
deleted file mode 100644 (file)
index 4f0b303..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (C) 2001, 2002 Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-
-MODULE = libcfs
-modulenet_DATA = libcfs.o
-EXTRA_PROGRAMS = libcfs
-
-DISTCLEANFILES = *.orig *.rej
-
-DEFS =
-libcfs_SOURCES = module.c proc.c debug.c lwt.c
-
-# Don't distribute any patched files.
-dist-hook:
-       list='$(EXT2C)'; for f in $$list; do rm -f $(distdir)/$$f; done
-
-include ../Rules.linux
diff --git a/lnet/libcfs/Makefile.in b/lnet/libcfs/Makefile.in
new file mode 100644 (file)
index 0000000..6f9c981
--- /dev/null
@@ -0,0 +1,4 @@
+MODULES = libcfs
+libcfs-objs := debug.o lwt.o module.o proc.o
+
+@INCLUDE_RULES@
diff --git a/lnet/libcfs/autoMakefile.am b/lnet/libcfs/autoMakefile.am
new file mode 100644 (file)
index 0000000..59576b1
--- /dev/null
@@ -0,0 +1,9 @@
+# Copyright (C) 2001, 2002 Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
+
+modulenet_DATA := libcfs$(KMODEXT)
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(libcfs-objs:%.o=%.c)
index 8043ac4..914b78f 100644 (file)
@@ -686,7 +686,7 @@ __s32 portals_debug_copy_to_user(char *buf, unsigned long len)
                         rc = -ENOMEM;
                         goto cleanup;
                 }
-                list_add(&page->list, &my_pages);
+                list_add(&PAGE_LIST(page), &my_pages);
         }
 
         spin_lock_irqsave(&portals_debug_lock, flags);
@@ -711,7 +711,7 @@ __s32 portals_debug_copy_to_user(char *buf, unsigned long len)
                 unsigned long to_copy;
                 void *addr;
 
-                page = list_entry(pos, struct page, list);
+                page = list_entry(pos, struct page, PAGE_LIST_ENTRY);
                 to_copy = min(total - off, PAGE_SIZE);
                 if (to_copy == 0) {
                         off = 0;
@@ -740,7 +740,7 @@ finish_partial:
         off = 0;
         list_for_each(pos, &my_pages) {
                 unsigned long to_copy;
-                page = list_entry(pos, struct page, list);
+                page = list_entry(pos, struct page, PAGE_LIST_ENTRY);
 
                 to_copy = min(copied - off, PAGE_SIZE);
                 rc = copy_to_user(buf + off, kmap(page), to_copy);
@@ -757,8 +757,8 @@ finish_partial:
 
 cleanup:
         list_for_each_safe(pos, n, &my_pages) {
-                page = list_entry(pos, struct page, list);
-                list_del(&page->list);
+                page = list_entry(pos, struct page, PAGE_LIST_ENTRY);
+                list_del(&PAGE_LIST(page));
                 __free_page(page);
         }
         return rc;
index 95973d6..702fcbe 100644 (file)
@@ -1,4 +1,9 @@
 .deps
 Makefile
-Makefile.in
-.*.o.cmd
+.*.cmd
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.tmp_versions
diff --git a/lnet/lnet/Makefile.in b/lnet/lnet/Makefile.in
new file mode 100644 (file)
index 0000000..6ce334b
--- /dev/null
@@ -0,0 +1,6 @@
+MODULES := portals
+portals-objs := api-eq.o api-init.o api-me.o api-errno.o api-ni.o api-wrap.o
+portals-objs += lib-dispatch.o lib-init.o lib-me.o lib-msg.o lib-eq.o lib-md.o
+portals-objs += lib-move.o lib-ni.o lib-pid.o module.o
+
+@INCLUDE_RULES@
similarity index 56%
rename from lustre/portals/portals/Makefile.am
rename to lnet/lnet/autoMakefile.am
index 59f9dd9..b4743fe 100644 (file)
@@ -3,30 +3,20 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-DEFS =
-
 my_sources = api-eq.c api-init.c api-me.c api-errno.c api-ni.c api-wrap.c \
                lib-dispatch.c lib-init.c lib-me.c lib-msg.c lib-eq.c \
                lib-md.c lib-move.c lib-ni.c lib-pid.c
 
+if LIBLUSTRE
 noinst_LIBRARIES= libportals.a
 libportals_a_SOURCES= $(my_sources)
+libportals_a_CPPFLAGS = $(LLCPPFLAGS)
+libportals_a_CFLAGS = $(LLCFLAGS)
+endif
 
-if LIBLUSTRE
-libportals_a_CFLAGS= -fPIC
-else
-
-MODULE = portals
-modulenet_DATA = portals.o
-EXTRA_PROGRAMS = portals
-
-DISTCLEANFILES = *.orig *.rej
-
-portals_SOURCES= module.c $(my_sources)
-
-# Don't distribute any patched files.
-dist-hook:
-       list='$(EXT2C)'; for f in $$list; do rm -f $(distdir)/$$f; done
-
-include ../Rules.linux
+if MODULES
+modulenet_DATA = portals$(KMODEXT)
 endif
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(portals-objs:%.o=%.c)
index 95973d6..702fcbe 100644 (file)
@@ -1,4 +1,9 @@
 .deps
 Makefile
-Makefile.in
-.*.o.cmd
+.*.cmd
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.tmp_versions
diff --git a/lnet/router/Makefile.am b/lnet/router/Makefile.am
deleted file mode 100644 (file)
index 1c8087b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-include ../Rules.linux
-
-MODULE = kptlrouter
-modulenet_DATA = kptlrouter.o
-EXTRA_PROGRAMS = kptlrouter
-
-
-#CFLAGS:= @KCFLAGS@ 
-#CPPFLAGS:=@KCPPFLAGS@
-DEFS =
-kptlrouter_SOURCES = router.c proc.c router.h
diff --git a/lnet/router/Makefile.in b/lnet/router/Makefile.in
new file mode 100644 (file)
index 0000000..3bb6cf7
--- /dev/null
@@ -0,0 +1,4 @@
+MODULES := kptlrouter
+kptlrouter-objs := router.o proc.o
+
+@INCLUDE_RULES@
diff --git a/lnet/router/autoMakefile.am b/lnet/router/autoMakefile.am
new file mode 100644 (file)
index 0000000..5249659
--- /dev/null
@@ -0,0 +1,9 @@
+# Copyright (C) 2001  Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
+
+modulenet_DATA = kptlrouter$(KMODEXT)
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
+DIST_SOURCES = $(kptlrouter-objs:%.o=%.c) router.h
index d0c4c88..13c1032 100644 (file)
@@ -1,4 +1,9 @@
 Makefile
-Makefile.in
 .deps
-.*.o.cmd
+.*.cmd
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.flags
+.tmp_versions
diff --git a/lnet/tests/Makefile.am b/lnet/tests/Makefile.am
deleted file mode 100644 (file)
index 7b47ae0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-include ../Rules.linux
-
-LDFLAGS = -m "`$(LD) --help | awk '/supported emulations/ {print $$4}'`" -r
-LINK = $(LD) $(LDFLAGS) -o $@
-DEFS =
-LIBS =
-MODULE = $(basename)
-EXTRA_DIST = startserver.sh startclient.sh stopserver.sh stopclient.sh
-
-noinst_PROGRAMS = pingsrv.o pingcli.o spingsrv.o spingcli.o 
-
-pingsrv_o_SOURCES = ping_srv.c ping.h
-
-pingcli_o_SOURCES = ping_cli.c ping.h
-
-spingsrv_o_SOURCES = sping_srv.c ping.h
-
-spingcli_o_SOURCES = sping_cli.c ping.h
diff --git a/lnet/tests/Makefile.in b/lnet/tests/Makefile.in
new file mode 100644 (file)
index 0000000..c309db0
--- /dev/null
@@ -0,0 +1,16 @@
+MODULES := pingsrv pingcli spingsrv spingcli
+pingsrv-objs := ping_srv.o
+
+ifeq ($(PATCHLEVEL),6)
+pingcli-objs := ping_cli.o
+spingsrv-objs := sping_srv.o
+spingcli-objs := sping_cli.o
+else
+ping%.c: ping_%.c
+       ln -sf $< $@
+
+sping%.c: sping_%.c
+       ln -sf $< $@
+endif
+
+@INCLUDE_RULES@
diff --git a/lnet/tests/autoMakefile.am b/lnet/tests/autoMakefile.am
new file mode 100644 (file)
index 0000000..a1ff7e8
--- /dev/null
@@ -0,0 +1,11 @@
+# Copyright (C) 2001  Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
+
+noinst_DATA := pingsrv$(KMODEXT) pingcli$(KMODEXT)
+noinst_DATA += spingsrv$(KMODEXT) spingcli$(KMODEXT)
+
+MOSTLYCLEANFILES = *.o *.ko *.mod.c pingsrv.c pingcli.c spingsrv.c spingcli.c
+DIST_SOURCES = $(pingsrc-objs:%.o=%.c) $(pingcli:%.o=%.c) \
+       $(spingsrv:%.o=%.c) $(spingcli:%.o=%.c) ping.h
index 6035ca1..0c1ec21 100644 (file)
@@ -1,9 +1,5 @@
-CPPFLAGS=
-INCLUDES=-I$(top_srcdir)/portals/include -I$(top_srcdir)/include -I$(srcdir)
 noinst_LIBRARIES = libtcpnal.a
 pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h ipmap.h bridge.h procbridge.h
 libtcpnal_a_SOURCES = debug.c pqtimer.c select.c table.c pqtimer.h dispatch.h table.h timer.h address.c procapi.c proclib.c connection.c tcpnal.c connection.h
-
-if LIBLUSTRE
-libtcpnal_a_CFLAGS = -fPIC
-endif
+libtcpnal_a_CPPFLAGS = $(LLCPPFLAGS)
+libtcpnal_a_CFLAGS = $(LLCFLAGS)
index 6035ca1..0c1ec21 100644 (file)
@@ -1,9 +1,5 @@
-CPPFLAGS=
-INCLUDES=-I$(top_srcdir)/portals/include -I$(top_srcdir)/include -I$(srcdir)
 noinst_LIBRARIES = libtcpnal.a
 pkginclude_HEADERS =  pqtimer.h dispatch.h table.h timer.h connection.h ipmap.h bridge.h procbridge.h
 libtcpnal_a_SOURCES = debug.c pqtimer.c select.c table.c pqtimer.h dispatch.h table.h timer.h address.c procapi.c proclib.c connection.c tcpnal.c connection.h
-
-if LIBLUSTRE
-libtcpnal_a_CFLAGS = -fPIC
-endif
+libtcpnal_a_CPPFLAGS = $(LLCPPFLAGS)
+libtcpnal_a_CFLAGS = $(LLCFLAGS)
index 95b3474..15c1774 100644 (file)
@@ -3,22 +3,21 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-# $(srcdir)/../ for <portals/*.h>, ../../ for generated <config.h>
-COMPILE = $(CC) -Wall -g -I$(srcdir)/../include -I../../include
-LINK = $(CC) -o $@
+## $(srcdir)/../ for <portals/*.h>, ../../ for generated <config.h>
+#COMPILE = $(CC) -Wall -g -I$(srcdir)/../include -I../../include
+#LINK = $(CC) -o $@
 
 if LIBLUSTRE
-
 noinst_LIBRARIES = libuptlctl.a
 libuptlctl_a_SOURCES = portals.c debug.c l_ioctl.c parser.c parser.h
-libuptlctl_a_CFLAGS = -fPIC
-
-else
+libuptlctl_a_CPPFLAGS = $(LLCPPFLAGS)
+libuptlctl_a_CFLAGS = $(LLCFLAGS)
+endif
 
 sbin_PROGRAMS = acceptor ptlctl debugctl routerstat wirecheck gmnalnid
 lib_LIBRARIES = libptlctl.a
 
-acceptor_SOURCES = acceptor.c # -lefence
+acceptor_SOURCES = acceptor.c
 
 wirecheck_SOURCES = wirecheck.c
 
@@ -35,4 +34,3 @@ debugctl_LDADD = -L. -lptlctl $(LIBREADLINE) $(LIBEFENCE)
 debugctl_DEPENDENCIES = libptlctl.a
 
 routerstat_SOURCES = routerstat.c
-endif
index f37e59b..fde4320 100644 (file)
@@ -4,6 +4,8 @@ aclocal.m4
 config.log
 config.status
 config.cache
+config.guess
+config.sub
 configure
 Makefile
 Makefile.in
@@ -15,5 +17,11 @@ cscope.files
 cscope.out
 autom4te-2.53.cache
 autom4te.cache
-.*.o.cmd
+depcomp
+compile
+.*.cmd
 .mergeinfo-*
+Rules
+missing
+mkinstalldirs
+install-sh
index d035587..4470e1e 100644 (file)
@@ -1,7 +1,11 @@
 tbd  Cluster File Systems, Inc. <info@clusterfs.com>
        * version 1.2.x
-       * Bug fixes
-       - clear page cache after eviction  (2766)
+       * bug fixes
+       - clear page cache after eviction (2766)
+
+tbd  Cluster File Systems, Inc. <info@clusterfs.com>
+       * version 1.2.2
+       * bug fixes
        - don't copy lvb into (possibly NULL) reply on error (2983)
        - don't deref dentry after dput, don't free lvb on error (2922)
        - use the kms to determine writeback rpc length (2947)
@@ -9,6 +13,9 @@ tbd  Cluster File Systems, Inc. <info@clusterfs.com>
        - update client's i_blocks count via lvb messages (2543)
        - handle intent open/close of special files properly (1557)
        - mount MDS with errors=remount-ro, like obdfilter (2009)
+       - initialize lock handle to avoid ASSERT on error cleanup (3057)
+       - don't use cancelling-locks' kms values (2947)
+       - use highest lock extent for kms, not last one (2925)
        * miscellania
        - allow default OST striping configuration per directory (1414)
 
index 69d5b51..4410599 100644 (file)
@@ -5,46 +5,93 @@
 
 AUTOMAKE_OPTIONS = foreign
 
+DIST_SUBDIRS = 
+SUBDIRS = include portals conf scripts ldlm
+
+# ldiskfs creates headers that the ldiskfs fsfilt will need
+if MODULES
+if LDISKFS
+SUBDIRS += ldiskfs
+else
+DIST_SUBDIRS += ldiskfs
+endif
+else
+DIST_SUBDIRS += ldiskfs
+endif
+
+# directories shared by the liblustre and modules builds
+CORE_SUBDIRS = lvfs obdclass lov ptlrpc obdecho osc mdc
+if LIBLUSTRE
+SUBDIRS += $(CORE_SUBDIRS)
+else
+if MODULES
+SUBDIRS += $(CORE_SUBDIRS)
+else
+DIST_SUBDIRS += $(CORE_SUBDIRS)
+endif
+endif
+
+# directories only built in the modules build
+MODULES_SUBDIRS = mds obdfilter ost llite cobd
+MODULES_DIST_SUBDIRS =
+
 if LINUX25
-DIRS24 = 
+MODULES_DIST_SUBDIRS += ptlbd
 else
-DIRS24 = ptlbd
+MODULES_SUBDIRS += ptlbd
 endif
 
-# just until things are farther along
-if CRAY_PORTALS
-UTILS_TESTS = 
+if SNAPFS
+MODULES_SUBDIRS += snapfs
 else
-UTILS_TESTS = utils tests
+MODULES_DIST_SUBDIRS += snapfs
+endif
+
+if SMFS
+MODULES_SUBDIRS += smfs
+else
+MODULES_DIST_SUBDIRS += smfs
+endif
+
+if MODULES
+SUBDIRS += $(MODULES_SUBDIRS)
+DIST_SUBDIRS += $(MODULES_DIST_SUBDIRS)
+else
+DIST_SUBDIRS += $(MODULES_SUBDIRS) $(MODULES_DIST_SUBDIRS)
 endif
 
 if LIBLUSTRE
-SUBDIRS = portals obdclass lov ptlrpc obdecho osc utils mdc lvfs liblustre
+SUBDIRS += liblustre
 else
-SUBDIRS = lvfs portals obdclass include $(DIRS24) mds obdfilter mdc osc ost 
-SUBDIRS+= llite obdecho lov cobd doc scripts conf ptlrpc $(UTILS_TESTS)
+DIST_SUBDIRS += liblustre
 endif
 
+if DOC
+SUBDIRS += doc
+else
+DIST_SUBDIRS += doc
+endif
 
-if SNAPFS
-SUBDIRS+= snapfs
+if UTILS
+SUBDIRS += utils
+else
+DIST_SUBDIRS += utils
 endif
 
-if SMFS 
-SUBDIRS += smfs
+if TESTS
+SUBDIRS += tests
+else
+DIST_SUBDIRS += tests
 endif
-DIST_SUBDIRS = $(SUBDIRS) liblustre snapfs smfs
-EXTRA_DIST = BUGS FDL Rules kernel_patches
 
-# We get the version from the spec file.
-CONFIGURE_DEPENDENCIES = scripts/lustre.spec.in
+DIST_SUBDIRS += $(SUBDIRS)
+
+EXTRA_DIST = BUGS FDL Rules.in kernel_patches kernel-tests/Makefile
 
 dist-hook:
        find $(distdir) -name .deps | xargs rm -rf
        find $(distdir) -name CVS | xargs rm -rf
 
-include $(top_srcdir)/Rules
-
 rpms: dist Makefile
        rpmbuild -ta $(distdir).tar.gz
 
diff --git a/lustre/Rules b/lustre/Rules
deleted file mode 100644 (file)
index 8846e3b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-# Build a kernel module, name.o, and install it in $(moduledir) by:
-#  MODULE = name
-#  module_DATA = name.o
-#  EXTRA_PROGRAMS = name
-#  name_SOURCES = my.c files.c
-#  include $(top_srcdir)/Rules
-
-if LINUX25
-
-# FIXME
-# need to be rewritten:
-# - bad hacking in lvfs/Makefile.am obdclass/Makefile.am
-# - .o -> .ko
-#
-basename=$(shell echo $< | sed -e 's/\.c//g' | sed -e 's/-//g' | sed -e 's/\.o//g' | sed -e 's/^.*\///g')
-AM_CPPFLAGS=-I$(top_builddir)/include -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2  -DKBUILD_MODNAME=$(MODULE) -DKBUILD_BASENAME=$(basename)
-
-$(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
-       $(LD) -m $(MOD_LINK) -r -o $(MODULE)_tmp.o $($(MODULE)_OBJECTS)
-       rm -f $(MODULE)_tmp.c
-       $(LINUX)/scripts/modpost $(LINUX)/vmlinux $(MODULE)_tmp.o
-       $(COMPILE) -UKBUILD_BASENAME -DKBUILD_BASENAME=$(MODULE) -c $(MODULE)_tmp.mod.c
-       $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $(MODULE)_tmp.o $(MODULE)_tmp.mod.o
-
-else
-
-AM_CPPFLAGS=-I$(top_builddir)/include
-$(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
-       $(LD) -m "`$(LD) --help | awk '/supported emulations/ {print $$4}'`" -r -o $(MODULE).o $($(MODULE)_OBJECTS)
-
-endif
-
-
-tags:
-       rm -f $(top_srcdir)/TAGS
-       ETAGSF=`etags --version | grep -iq exuberant && \
-               echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
-       find $(top_srcdir) -name '*.[hc]' | xargs etags $$ETAGSF -a
-
-       rm -f $(top_srcdir)/tags
-       CTAGSF=`ctags --version | grep -iq exuberant && \
-               echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
-       find $(top_srcdir) -name '*.[hc]' | xargs ctags $$CTAGSF -a
-
diff --git a/lustre/Rules.in b/lustre/Rules.in
new file mode 100644 (file)
index 0000000..2180940
--- /dev/null
@@ -0,0 +1,52 @@
+# Directories building kernel modules should have two files:
+#
+# Makefile.in:
+#
+# MODULES := <module-name>
+# <module-name>-objs := file1.o file2.o file3.o
+# @INCLUDE_RULES@
+#
+# and autoMakefile.am:
+#
+# if LIBLUSTRE
+# <liblustre rules>
+# endif
+#
+# if MODULES
+# modulefs_DATA = <module-name>$(KMODEXT)
+# endif
+#
+# DIST_SOURCES = $(<module-name>-objs:.o=.c) <other sources>
+# MOSTLYCLEANFILES = *.o *.ko *.mod.c
+
+ifeq ($(KERNELRELEASE),)
+
+include autoMakefile
+
+ifeq (@MODULES_TRUE@,)
+$(foreach MODULE,$(MODULES),$(MODULE)@KMODEXT@): FORCE
+       $(MAKE) @ARCH_UM@ -C $(LINUX) SUBDIRS=$(PWD) modules
+FORCE:
+endif
+
+else
+
+# we want to use -O0 for UML, unless it's already set (ie, in the
+# socknal where we need to build with -O2 so that htonl etc. are
+# linked correctly
+ifeq ($(filter -O%,$(EXTRA_CFLAGS)),)
+EXTRA_CFLAGS += @UML_CFLAGS@
+endif
+EXTRA_CFLAGS += @EXTRA_KCFLAGS@
+
+obj-m := $(patsubst %,%.o,$(MODULES))
+
+ifeq ($(PATCHLEVEL),4)
+# 2.4 rules
+O_TARGET := $(firstword $(obj-m))
+obj-y := $($(firstword $(MODULES))-objs)
+export-objs := $(obj-y) $(filter-out $(O_TARGET),$(obj-m))
+include $(TOPDIR)/Rules.make
+endif # PATCHLEVEL
+
+endif # KERNELRELEASE
index be0d42d..352d42d 100644 (file)
@@ -1,5 +1,64 @@
-#!/bin/sh
+#!/bin/bash
 
-aclocal &&
-${AUTOMAKE:-automake} --add-missing &&
-${AUTOCONF:-autoconf}
+# taken from gnome-common/macros2/autogen.sh
+compare_versions() {
+    ch_min_version=$1
+    ch_actual_version=$2
+    ch_status=0
+    IFS="${IFS=         }"; ch_save_IFS="$IFS"; IFS="."
+    set $ch_actual_version
+    for ch_min in $ch_min_version; do
+        ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
+        if [ -z "$ch_min" ]; then break; fi
+        if [ -z "$ch_cur" ]; then ch_status=1; break; fi
+        if [ $ch_cur -gt $ch_min ]; then break; fi
+        if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
+    done
+    IFS="$ch_save_IFS"
+    return $ch_status
+}
+
+error_msg() {
+       cat >&2 <<EOF
+$cmd is $1.  version $required is required to build Lustre.
+
+You may be able to download a new version from:
+http://ftp.gnu.org/gnu/$cmd/$cmd-$required.tar.gz
+EOF
+       [ "$cmd" = "autoconf" -a "$required" = "2.57" ] && cat >&2 <<EOF
+
+or
+
+ftp://fr2.rpmfind.net/linux/redhat/9/en/os/i386/RedHat/RPMS/autoconf-2.57-3.noarch.rpm
+EOF
+       [ "$cmd" = "automake" -a "$required" = "1.7.8" ] && cat >&2 <<EOF
+
+or
+
+ftp://fr2.rpmfind.net/linux/fedora/core/1/i386/os/Fedora/RPMS/automake-1.7.8-1.noarch.rpm
+EOF
+       exit 1
+}
+
+check_version() {
+    local cmd
+    local required
+    local version
+
+    cmd=$1
+    required=$2
+    echo -n "checking for $cmd $required... "
+    if ! $cmd --version >/dev/null ; then
+       error_msg "missing"
+    fi
+    version=$($cmd --version | awk "BEGIN { IGNORECASE=1 } /$cmd \(GNU $cmd\)/ { print \$4 }")
+    echo "found $version"
+    if ! compare_versions "$required" "$version" ; then
+       error_msg "too old"
+    fi
+}
+
+check_version automake "1.7.8"
+check_version autoconf "2.57"
+echo "Running autoreconf..."
+autoreconf -fi
index e995588..4c4a6ed 100644 (file)
@@ -1,3 +1,9 @@
 .deps
 Makefile
-Makefile.in
+autoMakefile.in
+autoMakefile
+*.ko
+*.mod.c
+.*.cmd
+.*.flags
+.tmp_versions
diff --git a/lustre/cobd/Makefile.in b/lustre/cobd/Makefile.in
new file mode 100644 (file)
index 0000000..4f10283
--- /dev/null
@@ -0,0 +1,4 @@
+MODULES := cobd
+cobd-objs := cache_obd.o lproc_cache.o
+
+@INCLUDE_RULES@
similarity index 51%
rename from lustre/cobd/Makefile.am
rename to lustre/cobd/autoMakefile.am
index 781c6ce..7a7fcdc 100644 (file)
@@ -3,13 +3,8 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-DEFS=
+modulefs_DATA := cobd$(KMODEXT)
 
-MODULE = cobd
-modulefs_DATA = cobd.o
-EXTRA_PROGRAMS = cobd
-LINX=
+DIST_SOURCES = $(cobd-objs:.o=.c)
 
-cobd_SOURCES = cache_obd.c lproc_cache.c $(LINX)
-
-include $(top_srcdir)/Rules
+MOSTLYCLEANFILES = *.o *.ko *.mod.c
index a205d10..6e3666b 100644 (file)
@@ -10,6 +10,3 @@ ldapconf_SCRIPTS = slapd-lustre.conf
 ldapschema_SCRIPTS = lustre.schema
 pkglibdir = '${exec_prefix}/usr/lib/$(PACKAGE)'
 pkglib_DATA = top.ldif lustre2ldif.xsl
-
-include $(top_srcdir)/Rules
-
index aec5d2e..88b11e9 100644 (file)
 
 AC_INIT
 AC_CANONICAL_SYSTEM
+AM_INIT_AUTOMAKE(lustre, HEAD)
+# AM_MAINTAINER_MODE
+
+# Four main targets: lustre kernel modules, utilities, tests, and liblustre
+AC_MSG_CHECKING([whether to build kernel modules])
+AC_ARG_ENABLE([modules],
+       AC_HELP_STRING([--disable-modules],
+                       [disable building of Lustre kernel modules]),
+       [],[enable_modules='yes'])
+AC_MSG_RESULT([$enable_modules])
+AM_CONDITIONAL(MODULES, test x$enable_modules = xyes)
+
+AC_MSG_CHECKING([whether to build utilities])
+AC_ARG_ENABLE([utils],
+       AC_HELP_STRING([--disable-utils],
+                       [disable building of Lustre utility programs]),
+       [],[enable_utils='yes'])
+AC_MSG_RESULT([$enable_utils])
+
+AC_MSG_CHECKING([whether to build Lustre tests])
+AC_ARG_ENABLE([tests],
+       AC_HELP_STRING([--disable-tests],
+                       [disable building of Lustre tests]),
+       [],[enable_tests='yes'])
+AC_MSG_RESULT([$enable_tests])
+
+AC_MSG_CHECKING([whether to build Lustre library])
+AC_ARG_ENABLE([liblustre],
+       AC_HELP_STRING([--disable-liblustre],
+                       [disable building of Lustre library]),
+       [],[enable_liblustre='yes'])
+AC_MSG_RESULT([$enable_liblustre])
+AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
 
-# Automake variables.  Steal the version number from lustre.spec.in.
-AM_INIT_AUTOMAKE(lustre, builtin([esyscmd], [sed -ne '/^%define version /{ s/.*version //; p; q; }' scripts/lustre.spec.in]))
-#AM_MAINTAINER_MODE
+# specify wether to build doc or not
+AC_MSG_CHECKING([whether to build docs])
+AC_ARG_ENABLE(doc,
+       AC_HELP_STRING([--disable-doc],
+                       [skip creation of pdf documentation]),
+       [
+               if test x$enable_doc = xyes ; then
+                   ENABLE_DOC=1           
+               else
+                   ENABLE_DOC=0
+               fi
+       ],[
+               ENABLE_DOC=0
+               enable_doc='no'
+       ])
+AC_MSG_RESULT([$enable_doc])
+AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
+AC_SUBST(ENABLE_DOC)
+
+# default backing fs is ext3
+BACKINGFS='ext3'
 
 # LLNL patches their ext3 and calls it extN
-AC_ARG_ENABLE(extN, [  --enable-extN use extN instead of ext3 for lustre backend])
+AC_MSG_CHECKING([whether to use extN])
+AC_ARG_ENABLE([extN],
+       AC_HELP_STRING([--enable-extN],
+                       [use extN instead of ext3 for lustre backend]),
+       [BACKINGFS='extN'],[enable_extN='no'])
+AC_MSG_RESULT([$enable_extN])
 AM_CONDITIONAL(EXTN, test x$enable_extN = xyes)
 
-# specify wether to build doc or not
-AC_ARG_ENABLE(doc, [  --disable-doc skip creation of pdf documentation],
-                  [
-                       if test x$enable_doc = xyes ; then
-                           ENABLE_DOC=1           
-                       else
-                           ENABLE_DOC=0
-                       fi
-                  ],
-                  [ ENABLE_DOC=0 ])
-AM_CONDITIONAL(DOC, test x$ENABLE_DOC = x1)
-AC_SUBST(ENABLE_DOC)
+# SuSE gets ldiskfs
+AC_MSG_CHECKING([whether to enable ldiskfs])
+AC_ARG_ENABLE([ldiskfs],
+       AC_HELP_STRING([--enable-ldiskfs],
+                       [use ldiskfs for the Lustre backing FS]),
+       [BACKINGFS='ldiskfs'],[enable_ldiskfs='no'])
+AC_MSG_RESULT([$enable_ldiskfs])
+AM_CONDITIONAL(LDISKFS, test x$enable_ldiskfs = xyes)
+
+AC_MSG_CHECKING([which backing filesystem to use])
+AC_MSG_RESULT([$BACKINGFS])
+AC_SUBST(BACKINGFS)
 
 # the pinger is temporary, until we have the recovery node in place
-AC_ARG_ENABLE(pinger, [  --disable-pinger disable recovery pinger support])
+AC_MSG_CHECKING([whether to enable pinger support])
+AC_ARG_ENABLE([pinger],
+       AC_HELP_STRING([--disable-pinger],
+                       [disable recovery pinger support]),
+       [],[enable_pinger='yes'])
+AC_MSG_RESULT([$enable_pinger])
 if test x$enable_pinger != xno ; then
   AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
 fi
 
-AC_ARG_WITH(obd-buffer-size, [  --with-obd-buffer-size=[size] set lctl ioctl maximum bytes (default=8192)],OBD_BUFFER_SIZE=$with_obd_buffer_size,OBD_BUFFER_SIZE=8192)
+AC_MSG_CHECKING([maximum OBD ioctl size])
+AC_ARG_WITH([obd-buffer-size],
+       AC_HELP_STRING([--with-obd-buffer-size=[size]],
+                       [set lctl ioctl maximum bytes (default=8192)]),
+       [
+               OBD_BUFFER_SIZE=$with_obd_buffer_size
+       ],[
+               OBD_BUFFER_SIZE=8192
+       ])
+AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
 AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
 
 # specify location of libsysio tree
-AC_ARG_WITH(sysio, [  --with-sysio=[path] set path to libsysio source (default=../libsysio)], sysiodir=$withval)
-if test x$sysiodir = x; then
-       SYSIO='$(top_srcdir)/../libsysio'
-else
-       SYSIO=$sysiodir
-fi
+AC_MSG_CHECKING([location of libsysio])
+AC_ARG_WITH([sysio],
+       AC_HELP_STRING([--with-sysio=[path]],
+                       [set path to libsysio source (default=../libsysio)]),
+       [
+               SYSIO=$with_sysio
+       ],[
+               SYSIO='$(top_srcdir)/../libsysio'
+       ])
+AC_MSG_RESULT([$SYSIO])
 AC_SUBST(SYSIO)
 
 #build mpi-tests 
-AC_ARG_ENABLE(mpitests, [  --enable-mpitests build liblustre mpi tests])
+AC_MSG_CHECKING([whether to build mpitests])
+AC_ARG_ENABLE([mpitests],
+       AC_HELP_STRING([--enable-mpitests],
+                       [build liblustre mpi tests]),
+       [],[enable_mpitests=no])
+AC_MSG_RESULT([$enable_mpitests])
 AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
 
-# snap compilation 
-AC_ARG_ENABLE(snapfs, [  --enable-snapfs build snapfs])
+# snap compilation
+AC_MSG_CHECKING([whether to enable snapfs support])
+AC_ARG_ENABLE([snapfs],
+       AC_HELP_STRING([--enable-snapfs],
+                       [build snapfs]),
+       [],[enable_snapfs='no'])
+AC_MSG_RESULT([$enable_snapfs])
 AM_CONDITIONAL(SNAPFS, test x$enable_snapfs = xyes)
 
-# smfs compilation 
-AC_ARG_ENABLE(smfs, [  --enable-smfs build smfs])
+# smfs compilation
+AC_MSG_CHECKING([whether to enable smfs support])
+AC_ARG_ENABLE([smfs],
+       AC_HELP_STRING([--enable-smfs],
+                       [build smfs]),
+       [],[enable_smfs='no'])
+AC_MSG_RESULT([$enable_smfs])
 AM_CONDITIONAL(SMFS, test x$enable_smfs = xyes)
 
-
-
 sinclude(portals/build.m4)
 sinclude(portals/archdep.m4)
 
@@ -67,21 +154,96 @@ if test x$enable_inkernel = xyes ; then
                sh -e -x -c '(cp -f $0.mk $0.in)'
 fi
 
+# we need to pass a full path here for kernel makefiles
+INCLUDE_RULES="include $PWD/Rules"
+AC_SUBST(INCLUDE_RULES)
+
+# ptlrpc kernel build requires this
+LUSTRE="$PWD"
+AC_SUBST(LUSTRE)
+
+# cray portals turns these off
+AM_CONDITIONAL(UTILS, test x$enable_utils = xyes)
+AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
+
 AM_CONFIG_HEADER(include/config.h)
 
-AC_OUTPUT([Makefile lvfs/Makefile portals/Makefile portals/Kernelenv \
-          portals/libcfs/Makefile portals/portals/Makefile \
-          portals/unals/Makefile portals/knals/Makefile \
-          portals/router/Makefile portals/knals/socknal/Makefile \
-          portals/knals/gmnal/Makefile portals/knals/qswnal/Makefile \
-         portals/knals/scimacnal/Makefile \
-         portals/knals/ibnal/Makefile \
-          portals/utils/Makefile portals/tests/Makefile portals/doc/Makefile \
-          obdecho/Makefile ptlrpc/Makefile liblustre/Makefile liblustre/tests/Makefile \
-         lov/Makefile osc/Makefile mdc/Makefile mds/Makefile ost/Makefile \
-         cobd/Makefile ptlbd/Makefile conf/Makefile  tests/Makefile \
-         utils/Makefile utils/Lustre/Makefile obdfilter/Makefile \
-          obdclass/Makefile smfs/Makefile snapfs/Makefile snapfs/utils/Makefile \
-         include/Makefile include/linux/Makefile include/lustre/Makefile \
-          llite/Makefile doc/Makefile scripts/Makefile \
-         scripts/lustre.spec])
+# files that are in AC_OUTPUT but need to be executable
+AC_CONFIG_COMMANDS([chmod-lconf],[chmod +x utils/lconf])
+
+AC_OUTPUT([
+Makefile
+Rules
+cobd/Makefile
+cobd/autoMakefile
+conf/Makefile
+doc/Makefile
+include/Makefile
+include/linux/Makefile
+include/lustre/Makefile
+ldiskfs/Makefile
+ldiskfs/autoMakefile
+ldlm/Makefile
+liblustre/Makefile
+liblustre/tests/Makefile
+llite/Makefile
+llite/autoMakefile
+lov/Makefile
+lov/autoMakefile
+lvfs/Makefile
+lvfs/autoMakefile
+mdc/Makefile
+mdc/autoMakefile
+mds/Makefile
+mds/autoMakefile
+obdclass/Makefile
+obdclass/autoMakefile
+obdecho/Makefile
+obdecho/autoMakefile
+obdfilter/Makefile
+obdfilter/autoMakefile
+osc/Makefile
+osc/autoMakefile
+ost/Makefile
+ost/autoMakefile
+portals/Kernelenv
+portals/Makefile
+portals/doc/Makefile
+portals/knals/Makefile
+portals/knals/gmnal/Makefile
+portals/knals/gmnal/autoMakefile
+portals/knals/ibnal/Makefile
+portals/knals/ibnal/autoMakefile
+portals/knals/qswnal/Makefile
+portals/knals/qswnal/autoMakefile
+portals/knals/scimacnal/Makefile
+portals/knals/scimacnal/autoMakefile
+portals/knals/socknal/Makefile
+portals/knals/socknal/autoMakefile
+portals/libcfs/Makefile
+portals/libcfs/autoMakefile
+portals/portals/Makefile
+portals/portals/autoMakefile
+portals/router/Makefile
+portals/router/autoMakefile
+portals/tests/Makefile
+portals/tests/autoMakefile
+portals/unals/Makefile
+portals/utils/Makefile
+ptlbd/Makefile
+ptlbd/autoMakefile
+ptlrpc/Makefile
+ptlrpc/autoMakefile
+scripts/Makefile
+scripts/lustre.spec
+scripts/version_tag.pl
+smfs/Makefile
+smfs/autoMakefile
+snapfs/Makefile
+snapfs/autoMakefile
+snapfs/utils/Makefile
+tests/Makefile
+utils/Lustre/Makefile
+utils/Makefile
+utils/lconf
+])
index dbffef4..a47d5e7 100644 (file)
@@ -122,5 +122,3 @@ doc.old/lustre.lin:
 
 dist-hook:
        rm -rf $(distdir)/figs/CVS
-
-include $(top_srcdir)/Rules
index 7c8201c..2a3f201 100644 (file)
@@ -6,4 +6,4 @@
 
 SUBDIRS = linux lustre
 EXTRA_DIST = config.h.in ioctl.h liblustre.h 
-include $(top_srcdir)/Rules
+
index eca8fdd..98a2011 100644 (file)
@@ -1,14 +1,53 @@
 /* include/config.h.in.  Generated from configure.in by autoheader.  */
 
+/* build ldiskfs as a module */
+#undef CONFIG_LDISKFS_FS_MODULE
+
+/* enable fs security */
+#undef CONFIG_LDISKFS_FS_SECURITY
+
+/* enable extended attributes for ldiskfs */
+#undef CONFIG_LDISKFS_FS_XATTR
+
+/* enable posix acls */
+#undef CONFIG_LDISKFS_POSIX_ACL
+
+/* this kernel contains Red Hat 2.4.20 patches */
+#undef CONFIG_RH_2_4_20
+
+/* kernel has cpu affinity support */
+#undef CPU_AFFINITY
+
+/* Building with Cray Portals */
+#undef CRAY_PORTALS
+
 /* Use the Pinger */
 #undef ENABLE_PINGER
 
+/* the kernel passes struct file to direct_IO */
+#undef HAVE_DIO_FILE
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* struct kiobuf has a dovary field */
+#undef HAVE_KIOBUF_DOVARY
+
+/* libefence support is requested */
+#undef HAVE_LIBEFENCE
+
+/* readline library is available */
+#undef HAVE_LIBREADLINE
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* struct page has a list field */
+#undef HAVE_PAGE_LIST
+
+/* the kernel defines PDE */
+#undef HAVE_PDE
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
@@ -54,6 +93,9 @@
 /* The size of a `unsigned long long', as computed by sizeof. */
 #undef SIZEOF_UNSIGNED_LONG_LONG
 
+/* use zero-copy TCP */
+#undef SOCKNAL_ZC
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
index d859bfc..ef010dc 100644 (file)
@@ -376,6 +376,10 @@ struct page {
 #endif
 };
 
+/* 2.4 defines */
+#define PAGE_LIST_ENTRY list
+#define PAGE_LIST(page) ((page)->list)
+
 #define kmap(page) (page)->addr
 #define kunmap(a) do {} while (0)
 
index 4a4e3a0..120e996 100644 (file)
@@ -52,7 +52,7 @@
 
 #define LTIME_S(time)                   (time.tv_sec)
 #define ll_path_lookup                  path_lookup
-#define ll_permission                   permission
+#define ll_permission(inode,mask,nd)    permission(inode,mask,nd)
 
 #define ll_pgcache_lock(mapping)          spin_lock(&mapping->page_lock)
 #define ll_pgcache_unlock(mapping)        spin_unlock(&mapping->page_lock)
@@ -111,7 +111,7 @@ static inline int cleanup_group_info(void)
 #else /* 2.4.. */
 
 #define ll_vfs_create(a,b,c,d)              vfs_create(a,b,c)
-#define ll_permission(a,b,c)                permission(a,b)
+#define ll_permission(inode,mask,nd)        permission(inode,mask)
 #define ILOOKUP(sb, ino, test, data)        ilookup4(sb, ino, test, data);
 #define DCACHE_DISCONNECTED                 DCACHE_NFSD_DISCONNECTED
 #define ll_dev_t                            int
@@ -144,15 +144,15 @@ static inline void clear_page_dirty(struct page *page)
 #define cpu_online(cpu)                 (cpu_online_map & (1<<cpu))
 #endif
 
-static inline int ll_path_lookup(const char *path, unsigned flags, 
-                              struct nameidata *nd)
+static inline int ll_path_lookup(const char *path, unsigned flags,
+                                 struct nameidata *nd)
 {
         int error = 0;
         if (path_init(path, flags, nd))
                 error = path_walk(path, nd);
         return error;
 }
-#define ll_permission(a,b,c)  permission(a,b)
+#define ll_permission(inode,mask,nd)    permission(inode,mask)
 typedef long sector_t;
 
 #define ll_pgcache_lock(mapping)        spin_lock(&pagecache_lock)
@@ -194,5 +194,42 @@ static inline int cleanup_group_info(void)
 
 #endif /* end of 2.4 compat macros */
 
+#ifdef HAVE_PAGE_LIST
+static inline int mapping_has_pages(struct address_space *mapping)
+{
+        int rc = 1;
+
+        ll_pgcache_lock(mapping);
+        if (list_empty(&mapping->dirty_pages) &&
+            list_empty(&mapping->clean_pages) &&
+            list_empty(&mapping->locked_pages)) {
+                rc = 0;
+        }
+        ll_pgcache_unlock(mapping);
+
+        return rc;
+}
+
+static inline int clear_page_dirty_for_io(struct page *page)
+{
+        struct address_space *mapping = page->mapping;
+
+        if (page->mapping && PageDirty(page)) {
+                ClearPageDirty(page);
+                ll_pgcache_lock(mapping);
+                list_del(&page->list);
+                list_add(&page->list, &mapping->locked_pages);
+                ll_pgcache_unlock(mapping);
+                return 1;
+        }
+        return 0;
+}
+#else
+static inline int mapping_has_pages(struct address_space *mapping)
+{
+        return mapping->nrpages > 0;
+}
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _COMPAT25_H */
index e9be5f5..cbdf3c2 100644 (file)
@@ -90,6 +90,14 @@ typedef enum {
  * pretty high-risk, though, and would need a lot more testing. */
 #define LDLM_FL_CAN_MATCH      0x100000
 
+/* A lock contributes to the kms calculation until it has finished the part
+ * of it's cancelation that performs write back on its dirty pages.  It
+ * can remain on the granted list during this whole time.  Threads racing
+ * to update the kms after performing their writeback need to know to
+ * exclude each others locks from the calculation as they walk the granted
+ * list. */
+#define LDLM_FL_KMS_IGNORE     0x200000
+
 /* The blocking callback is overloaded to perform two functions.  These flags
  * indicate which operation should be performed. */
 #define LDLM_CB_BLOCKING    1
index b0b907c..ebdfdf6 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef _LUSTRE_LIB_H
 #define _LUSTRE_LIB_H
 
-#include <config.h>
-
 #ifndef __KERNEL__
 # include <string.h>
 # include <sys/types.h>
diff --git a/lustre/install-sh b/lustre/install-sh
deleted file mode 100755 (executable)
index e9de238..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
-else
-       true
-fi
-
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-               chmodcmd=""
-       else
-               instcmd=mkdir
-       fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-       if [ -f $src -o -d $src ]
-       then
-               true
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               true
-       fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               true
-       fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='   
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
-
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               true
-       fi
-
-       pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-       if [ x"$transformarg" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename | 
-                       sed $transformarg`$transformbasename
-       fi
-
-# don't allow the sed command to completely eliminate the filename
-
-       if [ x"$dstfile" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               true
-       fi
-
-# Make a temp file name in the proper directory.
-
-       dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-       $doit $instcmd $src $dsttmp &&
-
-       trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/lustre/kernel-tests/.cvsignore b/lustre/kernel-tests/.cvsignore
new file mode 100644 (file)
index 0000000..124a277
--- /dev/null
@@ -0,0 +1,5 @@
+.*.cmd
+.*.flags
+*.ko
+*.c
+.tmp_versions
diff --git a/lustre/kernel-tests/Makefile b/lustre/kernel-tests/Makefile
new file mode 100644 (file)
index 0000000..959a2d5
--- /dev/null
@@ -0,0 +1,5 @@
+obj-m := conftest.o
+
+ifeq ($(PATCHLEVEL),4)
+include $(TOPDIR)/Rules.make
+endif
diff --git a/lustre/kernel_patches/patches/2.6.0-mm2.patch b/lustre/kernel_patches/patches/2.6.0-mm2.patch
deleted file mode 100644 (file)
index d01f3c7..0000000
+++ /dev/null
@@ -1,203869 +0,0 @@
---- linux-2.6.0/arch/alpha/kernel/irq.c        2003-10-08 15:07:08.000000000 -0700
-+++ 25/arch/alpha/kernel/irq.c 2003-12-28 23:22:10.000000000 -0800
-@@ -252,9 +252,11 @@ static int
- irq_affinity_read_proc (char *page, char **start, off_t off,
-                       int count, int *eof, void *data)
- {
--      if (count < HEX_DIGITS+1)
-+      int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
-+      if (count - len < 2)
-               return -EINVAL;
--      return sprintf (page, "%016lx\n", irq_affinity[(long)data]);
-+      len += sprintf(page + len, "\n");
-+      return len;
- }
- static unsigned int
-@@ -331,10 +333,11 @@ static int
- prof_cpu_mask_read_proc(char *page, char **start, off_t off,
-                       int count, int *eof, void *data)
- {
--      unsigned long *mask = (unsigned long *) data;
--      if (count < HEX_DIGITS+1)
-+      int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
-+      if (count - len < 2)
-               return -EINVAL;
--      return sprintf (page, "%016lx\n", *mask);
-+      len += sprintf(page + len, "\n");
-+      return len;
- }
- static int
-@@ -529,19 +532,21 @@ show_interrupts(struct seq_file *p, void
- #ifdef CONFIG_SMP
-       int j;
- #endif
--      int i;
-+      int i = *(loff_t *) v;
-       struct irqaction * action;
-       unsigned long flags;
- #ifdef CONFIG_SMP
--      seq_puts(p, "           ");
--      for (i = 0; i < NR_CPUS; i++)
--              if (cpu_online(i))
--                      seq_printf(p, "CPU%d       ", i);
--      seq_putc(p, '\n');
-+      if (i == 0) {
-+              seq_puts(p, "           ");
-+              for (i = 0; i < NR_CPUS; i++)
-+                      if (cpu_online(i))
-+                              seq_printf(p, "CPU%d       ", i);
-+              seq_putc(p, '\n');
-+      }
- #endif
--      for (i = 0; i < ACTUAL_NR_IRQS; i++) {
-+      if (i < ACTUAL_NR_IRQS) {
-               spin_lock_irqsave(&irq_desc[i].lock, flags);
-               action = irq_desc[i].action;
-               if (!action) 
-@@ -568,15 +573,16 @@ show_interrupts(struct seq_file *p, void
-               seq_putc(p, '\n');
- unlock:
-               spin_unlock_irqrestore(&irq_desc[i].lock, flags);
--      }
-+      } else if (i == ACTUAL_NR_IRQS) {
- #ifdef CONFIG_SMP
--      seq_puts(p, "IPI: ");
--      for (i = 0; i < NR_CPUS; i++)
--              if (cpu_online(i))
--                      seq_printf(p, "%10lu ", cpu_data[i].ipi_count);
--      seq_putc(p, '\n');
-+              seq_puts(p, "IPI: ");
-+              for (i = 0; i < NR_CPUS; i++)
-+                      if (cpu_online(i))
-+                              seq_printf(p, "%10lu ", cpu_data[i].ipi_count);
-+              seq_putc(p, '\n');
- #endif
--      seq_printf(p, "ERR: %10lu\n", irq_err_count);
-+              seq_printf(p, "ERR: %10lu\n", irq_err_count);
-+      }
-       return 0;
- }
---- linux-2.6.0/arch/alpha/kernel/traps.c      2003-10-08 15:07:08.000000000 -0700
-+++ 25/arch/alpha/kernel/traps.c       2003-12-28 23:22:11.000000000 -0800
-@@ -636,6 +636,7 @@ do_entUna(void * va, unsigned long opcod
-       lock_kernel();
-       printk("Bad unaligned kernel access at %016lx: %p %lx %ld\n",
-               pc, va, opcode, reg);
-+      dump_stack();
-       do_exit(SIGSEGV);
- got_exception:
---- linux-2.6.0/arch/arm26/kernel/irq.c        2003-10-08 15:07:08.000000000 -0700
-+++ 25/arch/arm26/kernel/irq.c 2003-12-28 23:22:06.000000000 -0800
-@@ -135,10 +135,10 @@ void enable_irq(unsigned int irq)
- int show_interrupts(struct seq_file *p, void *v)
- {
--      int i;
-+      int i = *(loff_t *) v;
-       struct irqaction * action;
--      for (i = 0 ; i < NR_IRQS ; i++) {
-+      if (i < NR_IRQS) {
-               action = irq_desc[i].action;
-               if (!action)
-                       continue;
-@@ -148,10 +148,10 @@ int show_interrupts(struct seq_file *p, 
-                       seq_printf(p, ", %s", action->name);
-               }
-               seq_putc(p, '\n');
-+      } else if (i == NR_IRQS) {
-+              show_fiq_list(p, v);
-+              seq_printf(p, "Err: %10lu\n", irq_err_count);
-       }
--
--      show_fiq_list(p, v);
--      seq_printf(p, "Err: %10lu\n", irq_err_count);
-       return 0;
- }
---- linux-2.6.0/arch/arm/kernel/irq.c  2003-10-08 15:07:08.000000000 -0700
-+++ 25/arch/arm/kernel/irq.c   2003-12-28 23:22:06.000000000 -0800
-@@ -169,11 +169,11 @@ void disable_irq_wake(unsigned int irq)
- int show_interrupts(struct seq_file *p, void *v)
- {
--      int i;
-+      int i = *(loff_t *) v;
-       struct irqaction * action;
-       unsigned long flags;
--      for (i = 0 ; i < NR_IRQS ; i++) {
-+      if (i < NR_IRQS) {
-               spin_lock_irqsave(&irq_controller_lock, flags);
-               action = irq_desc[i].action;
-               if (!action)
-@@ -187,12 +187,12 @@ int show_interrupts(struct seq_file *p, 
-               seq_putc(p, '\n');
- unlock:
-               spin_unlock_irqrestore(&irq_controller_lock, flags);
--      }
--
-+      } else if (i == NR_IRQS) {
- #ifdef CONFIG_ARCH_ACORN
--      show_fiq_list(p, v);
-+              show_fiq_list(p, v);
- #endif
--      seq_printf(p, "Err: %10lu\n", irq_err_count);
-+              seq_printf(p, "Err: %10lu\n", irq_err_count);
-+      }
-       return 0;
- }
---- linux-2.6.0/arch/arm/mach-sa1100/Kconfig   2003-06-14 12:18:52.000000000 -0700
-+++ 25/arch/arm/mach-sa1100/Kconfig    2003-12-28 23:23:06.000000000 -0800
-@@ -304,7 +304,7 @@ config SA1100_YOPY
-       depends on ARCH_SA1100
-       help
-         Say Y here to support the Yopy PDA.  Product information at
--        <http://www.yopy.com/>.  See Documentation/arm/SA110/Yopy
-+        <http://www.yopy.com/>.  See Documentation/arm/SA1100/Yopy
-         for more.
- config SA1100_STORK
---- linux-2.6.0/arch/arm/Makefile      2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/arm/Makefile       2003-12-28 23:21:55.000000000 -0800
-@@ -14,8 +14,6 @@ OBJCOPYFLAGS :=-O binary -R .note -R .co
- GZFLAGS               :=-9
- #CFLAGS               +=-pipe
--CFLAGS                :=$(CFLAGS:-O2=-Os)
--
- ifeq ($(CONFIG_FRAME_POINTER),y)
- CFLAGS                +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
- endif
---- linux-2.6.0/arch/cris/kernel/irq.c 2003-10-08 15:07:08.000000000 -0700
-+++ 25/arch/cris/kernel/irq.c  2003-12-28 23:22:06.000000000 -0800
-@@ -89,11 +89,11 @@ static struct irqaction *irq_action[NR_I
- int show_interrupts(struct seq_file *p, void *v)
- {
--      int i;
-+      int i = *(loff_t *) v;
-       struct irqaction * action;
-       unsigned long flags;
--      for (i = 0; i < NR_IRQS; i++) {
-+      if (i < NR_IRQS) {
-               local_irq_save(flags);
-               action = irq_action[i];
-               if (!action) 
---- linux-2.6.0/arch/h8300/Kconfig     2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/h8300/Kconfig      2003-12-28 23:21:55.000000000 -0800
-@@ -5,6 +5,10 @@
- mainmenu "uClinux/h8300 (w/o MMU) Kernel Configuration"
-+config H8300
-+      bool
-+      default y
-+
- config MMU
-       bool
-       default n
---- linux-2.6.0/arch/h8300/Makefile    2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/h8300/Makefile     2003-12-28 23:21:55.000000000 -0800
-@@ -34,7 +34,7 @@ cflags-$(CONFIG_CPU_H8S)     := -ms
- ldflags-$(CONFIG_CPU_H8S)     := -mh8300self
- CFLAGS += $(cflags-y)
--CFLAGS += -mint32 -fno-builtin -Os
-+CFLAGS += -mint32 -fno-builtin
- CFLAGS += -g
- CFLAGS += -D__linux__
- CFLAGS += -DUTS_SYSNAME=\"uClinux\"
---- linux-2.6.0/arch/h8300/platform/h8300h/ints.c      2003-10-08 15:07:08.000000000 -0700
-+++ 25/arch/h8300/platform/h8300h/ints.c       2003-12-28 23:22:06.000000000 -0800
-@@ -228,9 +228,9 @@ asmlinkage void process_int(int vec, str
- int show_interrupts(struct seq_file *p, void *v)
- {
--      int i;
-+      int i = *(loff_t *) v;
--      for (i = 0; i < NR_IRQS; i++) {
-+      if (i < NR_IRQS) {
-               if (irq_list[i]) {
-                       seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
-                       seq_printf(p, "%s\n", irq_list[i]->devname);
---- linux-2.6.0/arch/h8300/platform/h8s/ints.c 2003-10-17 15:58:03.000000000 -0700
-+++ 25/arch/h8300/platform/h8s/ints.c  2003-12-28 23:22:06.000000000 -0800
-@@ -280,9 +280,9 @@ asmlinkage void process_int(unsigned lon
- int show_interrupts(struct seq_file *p, void *v)
- {
--      int i;
-+      int i = *(loff_t *) v;
--      for (i = 0; i < NR_IRQS; i++) {
-+      if (i < NR_IRQS) {
-               if (irq_list[i]) {
-                       seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
-                       seq_printf(p, "%s\n", irq_list[i]->devname);
---- linux-2.6.0/arch/i386/boot/setup.S 2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/boot/setup.S  2003-12-28 23:26:36.000000000 -0800
-@@ -162,7 +162,7 @@ cmd_line_ptr:      .long 0                 # (Header versio
-                                       # can be located anywhere in
-                                       # low memory 0x10000 or higher.
--ramdisk_max:  .long MAXMEM-1          # (Header version 0x0203 or later)
-+ramdisk_max:  .long __MAXMEM-1        # (Header version 0x0203 or later)
-                                       # The highest safe address for
-                                       # the contents of an initrd
---- linux-2.6.0/arch/i386/Kconfig      2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/Kconfig       2003-12-28 23:26:36.000000000 -0800
-@@ -115,10 +115,15 @@ config ACPI_SRAT
-       default y
-       depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
-+config X86_SUMMIT_NUMA
-+      bool
-+      default y
-+      depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
-+
- config X86_CYCLONE_TIMER
--       bool 
--       default y
--       depends on X86_SUMMIT || X86_GENERICARCH
-+      bool
-+      default y
-+      depends on X86_SUMMIT || X86_GENERICARCH
- config ES7000_CLUSTERED_APIC
-       bool
-@@ -397,6 +402,54 @@ config X86_OOSTORE
-       depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6
-       default y
-+config X86_4G
-+      bool "4 GB kernel-space and 4 GB user-space virtual memory support"
-+      help
-+          This option is only useful for systems that have more than 1 GB
-+          of RAM.
-+
-+          The default kernel VM layout leaves 1 GB of virtual memory for
-+          kernel-space mappings, and 3 GB of VM for user-space applications.
-+          This option ups both the kernel-space VM and the user-space VM to
-+          4 GB.
-+
-+          The cost of this option is additional TLB flushes done at
-+          system-entry points that transition from user-mode into kernel-mode.
-+          I.e. system calls and page faults, and IRQs that interrupt user-mode
-+          code. There's also additional overhead to kernel operations that copy
-+          memory to/from user-space. The overhead from this is hard to tell and
-+          depends on the workload - it can be anything from no visible overhead
-+          to 20-30% overhead. A good rule of thumb is to count with a runtime
-+          overhead of 20%.
-+
-+          The upside is the much increased kernel-space VM, which more than
-+          quadruples the maximum amount of RAM supported. Kernels compiled with
-+          this option boot on 64GB of RAM and still have more than 3.1 GB of
-+          'lowmem' left. Another bonus is that highmem IO bouncing decreases,
-+          if used with drivers that still use bounce-buffers.
-+
-+          There's also a 33% increase in user-space VM size - database
-+          applications might see a boost from this.
-+
-+          But the cost of the TLB flushes and the runtime overhead has to be
-+          weighed against the bonuses offered by the larger VM spaces. The
-+          dividing line depends on the actual workload - there might be 4 GB
-+          systems that benefit from this option. Systems with less than 4 GB
-+          of RAM will rarely see a benefit from this option - but it's not
-+          out of question, the exact circumstances have to be considered.
-+
-+config X86_SWITCH_PAGETABLES
-+      def_bool X86_4G
-+
-+config X86_4G_VM_LAYOUT
-+      def_bool X86_4G
-+
-+config X86_UACCESS_INDIRECT
-+      def_bool X86_4G
-+
-+config X86_HIGH_ENTRY
-+      def_bool X86_4G
-+
- config HPET_TIMER
-       bool "HPET Timer Support"
-       help
-@@ -784,6 +837,25 @@ config MTRR
-         See <file:Documentation/mtrr.txt> for more information.
-+config EFI
-+      bool "Boot from EFI support (EXPERIMENTAL)"
-+      depends on ACPI
-+      default n
-+      ---help---
-+
-+      This enables the the kernel to boot on EFI platforms using
-+      system configuration information passed to it from the firmware.
-+      This also enables the kernel to use any EFI runtime services that are
-+      available (such as the EFI variable services).
-+
-+      This option is only useful on systems that have EFI firmware
-+      and will result in a kernel image that is ~8k larger.  In addition,
-+      you must use the latest ELILO loader available at
-+      ftp.hpl.hp.com/pub/linux-ia64/ in order to take advantage of kernel
-+      initialization using EFI information (neither GRUB nor LILO know
-+      anything about EFI).  However, even with this option, the resultant
-+      kernel should continue to boot on existing non-EFI platforms.
-+
- config HAVE_DEC_LOCK
-       bool
-       depends on (SMP || PREEMPT) && X86_CMPXCHG
-@@ -793,7 +865,7 @@ config HAVE_DEC_LOCK
- # Summit needs it only when NUMA is on
- config BOOT_IOREMAP
-       bool
--      depends on ((X86_SUMMIT || X86_GENERICARCH) && NUMA)
-+      depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
-       default y
- endmenu
-@@ -1030,6 +1102,25 @@ config PCI_DIRECT
-       depends on PCI && ((PCI_GODIRECT || PCI_GOANY) || X86_VISWS)
-       default y
-+config PCI_USE_VECTOR
-+      bool "Vector-based interrupt indexing"
-+      depends on X86_LOCAL_APIC
-+      default n
-+      help
-+         This replaces the current existing IRQ-based index interrupt scheme
-+         with the vector-base index scheme. The advantages of vector base
-+         over IRQ base are listed below:
-+         1) Support MSI implementation.
-+         2) Support future IOxAPIC hotplug
-+
-+         Note that this enables MSI, Message Signaled Interrupt, on all
-+         MSI capable device functions detected if users also install the
-+         MSI patch. Message Signal Interrupt enables an MSI-capable
-+         hardware device to send an inbound Memory Write on its PCI bus
-+         instead of asserting IRQ signal on device IRQ pin.
-+
-+         If you don't know what to do here, say N.
-+
- source "drivers/pci/Kconfig"
- config ISA
-@@ -1187,6 +1278,15 @@ config DEBUG_PAGEALLOC
-         This results in a large slowdown, but helps to find certain types
-         of memory corruptions.
-+config SPINLINE
-+      bool "Spinlock inlining"
-+      depends on DEBUG_KERNEL
-+      help
-+        This will change spinlocks from out of line to inline, making them
-+        account cost to the callers in readprofile, rather than the lock
-+        itself (as ".text.lock.filename"). This can be helpful for finding
-+        the callers of locks.
-+
- config DEBUG_HIGHMEM
-       bool "Highmem debugging"
-       depends on DEBUG_KERNEL && HIGHMEM
-@@ -1203,20 +1303,208 @@ config DEBUG_INFO
-         Say Y here only if you plan to use gdb to debug the kernel.
-         If you don't debug the kernel, you can say N.
-         
-+config LOCKMETER
-+      bool "Kernel lock metering"
-+      depends on SMP
-+      help
-+        Say Y to enable kernel lock metering, which adds overhead to SMP locks,
-+        but allows you to see various statistics using the lockstat command.
-+
- config DEBUG_SPINLOCK_SLEEP
-       bool "Sleep-inside-spinlock checking"
-       help
-         If you say Y here, various routines which may sleep will become very
-         noisy if they are called with a spinlock held.        
-+config KGDB
-+      bool "Include kgdb kernel debugger"
-+      depends on DEBUG_KERNEL
-+      help
-+        If you say Y here, the system will be compiled with the debug
-+        option (-g) and a debugging stub will be included in the
-+        kernel.  This stub communicates with gdb on another (host)
-+        computer via a serial port.  The host computer should have
-+        access to the kernel binary file (vmlinux) and a serial port
-+        that is connected to the target machine.  Gdb can be made to
-+        configure the serial port or you can use stty and setserial to
-+        do this. See the 'target' command in gdb. This option also
-+        configures in the ability to request a breakpoint early in the
-+        boot process.  To request the breakpoint just include 'kgdb'
-+        as a boot option when booting the target machine.  The system
-+        will then break as soon as it looks at the boot options.  This
-+        option also installs a breakpoint in panic and sends any
-+        kernel faults to the debugger. For more information see the
-+        Documentation/i386/kgdb.txt file.
-+
-+choice
-+      depends on KGDB
-+      prompt "Debug serial port BAUD"
-+      default KGDB_115200BAUD
-+      help
-+        Gdb and the kernel stub need to agree on the baud rate to be
-+        used.  Some systems (x86 family at this writing) allow this to
-+        be configured.
-+
-+config KGDB_9600BAUD
-+      bool "9600"
-+
-+config KGDB_19200BAUD
-+      bool "19200"
-+
-+config KGDB_38400BAUD
-+      bool "38400"
-+
-+config KGDB_57600BAUD
-+      bool "57600"
-+
-+config KGDB_115200BAUD
-+      bool "115200"
-+endchoice
-+
-+config KGDB_PORT
-+      hex "hex I/O port address of the debug serial port"
-+      depends on KGDB
-+      default  3f8
-+      help
-+        Some systems (x86 family at this writing) allow the port
-+        address to be configured.  The number entered is assumed to be
-+        hex, don't put 0x in front of it.  The standard address are:
-+        COM1 3f8 , irq 4 and COM2 2f8 irq 3.  Setserial /dev/ttySx
-+        will tell you what you have.  It is good to test the serial
-+        connection with a live system before trying to debug.
-+
-+config KGDB_IRQ
-+      int "IRQ of the debug serial port"
-+      depends on KGDB
-+      default 4
-+      help
-+        This is the irq for the debug port.  If everything is working
-+        correctly and the kernel has interrupts on a control C to the
-+        port should cause a break into the kernel debug stub.
-+
-+config DEBUG_INFO
-+      bool
-+      depends on KGDB
-+      default y
-+
-+config KGDB_MORE
-+      bool "Add any additional compile options"
-+      depends on KGDB
-+      default n
-+      help
-+        Saying yes here turns on the ability to enter additional
-+        compile options.
-+
-+
-+config KGDB_OPTIONS
-+      depends on KGDB_MORE
-+      string "Additional compile arguments"
-+      default "-O1"
-+      help
-+        This option allows you enter additional compile options for
-+        the whole kernel compile.  Each platform will have a default
-+        that seems right for it.  For example on PPC "-ggdb -O1", and
-+        for i386 "-O1".  Note that by configuring KGDB "-g" is already
-+        turned on.  In addition, on i386 platforms
-+        "-fomit-frame-pointer" is deleted from the standard compile
-+        options.
-+
-+config NO_KGDB_CPUS
-+      int "Number of CPUs"
-+      depends on KGDB && SMP
-+      default NR_CPUS
-+      help
-+
-+        This option sets the number of cpus for kgdb ONLY.  It is used
-+        to prune some internal structures so they look "nice" when
-+        displayed with gdb.  This is to overcome possibly larger
-+        numbers that may have been entered above.  Enter the real
-+        number to get nice clean kgdb_info displays.
-+
-+config KGDB_TS
-+      bool "Enable kgdb time stamp macros?"
-+      depends on KGDB
-+      default n
-+      help
-+        Kgdb event macros allow you to instrument your code with calls
-+        to the kgdb event recording function.  The event log may be
-+        examined with gdb at a break point.  Turning on this
-+        capability also allows you to choose how many events to
-+        keep. Kgdb always keeps the lastest events.
-+
-+choice
-+      depends on KGDB_TS
-+      prompt "Max number of time stamps to save?"
-+      default KGDB_TS_128
-+
-+config KGDB_TS_64
-+      bool "64"
-+
-+config KGDB_TS_128
-+      bool "128"
-+
-+config KGDB_TS_256
-+      bool "256"
-+
-+config KGDB_TS_512
-+      bool "512"
-+
-+config KGDB_TS_1024
-+      bool "1024"
-+
-+endchoice
-+
-+config STACK_OVERFLOW_TEST
-+      bool "Turn on kernel stack overflow testing?"
-+      depends on KGDB
-+      default n
-+      help
-+        This option enables code in the front line interrupt handlers
-+        to check for kernel stack overflow on interrupts and system
-+        calls.  This is part of the kgdb code on x86 systems.
-+
-+config KGDB_CONSOLE
-+      bool "Enable serial console thru kgdb port"
-+      depends on KGDB
-+      default n
-+      help
-+        This option enables the command line "console=kgdb" option.
-+        When the system is booted with this option in the command line
-+        all kernel printk output is sent to gdb (as well as to other
-+        consoles).  For this to work gdb must be connected.  For this
-+        reason, this command line option will generate a breakpoint if
-+        gdb has not yet connected.  After the gdb continue command is
-+        given all pent up console output will be printed by gdb on the
-+        host machine.  Neither this option, nor KGDB require the
-+        serial driver to be configured.
-+
-+config KGDB_SYSRQ
-+      bool "Turn on SysRq 'G' command to do a break?"
-+      depends on KGDB
-+      default y
-+      help
-+        This option includes an option in the SysRq code that allows
-+        you to enter SysRq G which generates a breakpoint to the KGDB
-+        stub.  This will work if the keyboard is alive and can
-+        interrupt the system.  Because of constraints on when the
-+        serial port interrupt can be enabled, this code may allow you
-+        to interrupt the system before the serial port control C is
-+        available.  Just say yes here.
-+
- config FRAME_POINTER
-       bool "Compile the kernel with frame pointers"
-+      default KGDB
-       help
-         If you say Y here the resulting kernel image will be slightly larger
-         and slower, but it will give very useful debugging information.
-         If you don't debug the kernel, you can say N, but we may not be able
-         to solve problems without frame pointers.
-+config MAGIC_SYSRQ
-+      bool
-+      depends on KGDB_SYSRQ
-+      default y
-+
- config X86_EXTRA_IRQS
-       bool
-       depends on X86_LOCAL_APIC || X86_VOYAGER
---- linux-2.6.0/arch/i386/kernel/acpi/boot.c   2003-11-23 19:03:00.000000000 -0800
-+++ 25/arch/i386/kernel/acpi/boot.c    2003-12-28 23:21:57.000000000 -0800
-@@ -26,6 +26,7 @@
- #include <linux/init.h>
- #include <linux/config.h>
- #include <linux/acpi.h>
-+#include <linux/efi.h>
- #include <asm/pgalloc.h>
- #include <asm/io_apic.h>
- #include <asm/apic.h>
-@@ -40,9 +41,8 @@
- #define PREFIX                        "ACPI: "
--extern int acpi_disabled;
--extern int acpi_irq;
--extern int acpi_ht;
-+int acpi_noirq __initdata = 0;        /* skip ACPI IRQ initialization */
-+int acpi_ht __initdata = 1;   /* enable HT */
- int acpi_lapic = 0;
- int acpi_ioapic = 0;
-@@ -249,29 +249,66 @@ acpi_parse_nmi_src (
- #ifdef        CONFIG_ACPI_BUS
- /*
-- * Set specified PIC IRQ to level triggered mode.
-+ * "acpi_pic_sci=level" (current default)
-+ * programs the PIC-mode SCI to Level Trigger.
-+ * (NO-OP if the BIOS set Level Trigger already)
-+ *
-+ * If a PIC-mode SCI is not recogznied or gives spurious IRQ7's
-+ * it may require Edge Trigger -- use "acpi_pic_sci=edge"
-+ * (NO-OP if the BIOS set Edge Trigger already)
-  *
-  * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers
-  * for the 8259 PIC.  bit[n] = 1 means irq[n] is Level, otherwise Edge.
-  * ECLR1 is IRQ's 0-7 (IRQ 0, 1, 2 must be 0)
-  * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0)
-- *
-- * As the BIOS should have done this for us,
-- * print a warning if the IRQ wasn't already set to level.
-  */
--void acpi_pic_set_level_irq(unsigned int irq)
-+static int __initdata acpi_pic_sci_trigger;   /* 0: level, 1: edge */
-+
-+void __init
-+acpi_pic_sci_set_trigger(unsigned int irq)
- {
-       unsigned char mask = 1 << (irq & 7);
-       unsigned int port = 0x4d0 + (irq >> 3);
-       unsigned char val = inb(port);
-+      
-+      printk(PREFIX "IRQ%d SCI:", irq);
-       if (!(val & mask)) {
--              printk(KERN_WARNING PREFIX "IRQ %d was Edge Triggered, "
--                      "setting to Level Triggerd\n", irq);
--              outb(val | mask, port);
-+              printk(" Edge");
-+
-+              if (!acpi_pic_sci_trigger) {
-+                      printk(" set to Level");
-+                      outb(val | mask, port);
-+              }
-+      } else {
-+              printk(" Level");
-+
-+              if (acpi_pic_sci_trigger) {
-+                      printk(" set to Edge");
-+                      outb(val | mask, port);
-+              }
-+      }
-+      printk(" Trigger.\n");
-+}
-+
-+int __init
-+acpi_pic_sci_setup(char *str)
-+{
-+      while (str && *str) {
-+              if (strncmp(str, "level", 5) == 0)
-+                      acpi_pic_sci_trigger = 0;       /* force level trigger */
-+              if (strncmp(str, "edge", 4) == 0)
-+                      acpi_pic_sci_trigger = 1;       /* force edge trigger */
-+              str = strchr(str, ',');
-+              if (str)
-+                      str += strspn(str, ", \t");
-       }
-+      return 1;
- }
-+
-+__setup("acpi_pic_sci=", acpi_pic_sci_setup);
-+
- #endif /* CONFIG_ACPI_BUS */
-@@ -326,11 +363,48 @@ static int __init acpi_parse_hpet(unsign
- }
- #endif
-+/* detect the location of the ACPI PM Timer */
-+#ifdef CONFIG_X86_PM_TIMER
-+extern u32 pmtmr_ioport;
-+
-+static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
-+{
-+      struct fadt_descriptor_rev2 *fadt =0;
-+
-+      fadt = (struct fadt_descriptor_rev2*) __acpi_map_table(phys,size);
-+      if(!fadt) {
-+              printk(KERN_WARNING PREFIX "Unable to map FADT\n");
-+              return 0;
-+      }
-+
-+      if (fadt->revision >= FADT2_REVISION_ID) {
-+              /* FADT rev. 2 */
-+              if (fadt->xpm_tmr_blk.address_space_id != ACPI_ADR_SPACE_SYSTEM_IO)
-+                      return 0;
-+
-+              pmtmr_ioport = fadt->xpm_tmr_blk.address;
-+      } else {
-+              /* FADT rev. 1 */
-+              pmtmr_ioport = fadt->V1_pm_tmr_blk;
-+      }
-+      if (pmtmr_ioport)
-+              printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", pmtmr_ioport);
-+      return 0;
-+}
-+#endif
-+
-+
- unsigned long __init
- acpi_find_rsdp (void)
- {
-       unsigned long           rsdp_phys = 0;
-+      if (efi_enabled) {
-+              if (efi.acpi20)
-+                      return __pa(efi.acpi20);
-+              else if (efi.acpi)
-+                      return __pa(efi.acpi);
-+      }
-       /*
-        * Scan memory looking for the RSDP signature. First search EBDA (low
-        * memory) paragraphs and then search upper memory (E0000-FFFFF).
-@@ -380,8 +454,10 @@ acpi_boot_init (void)
-        * Initialize the ACPI boot-time table parser.
-        */
-       result = acpi_table_init();
--      if (result)
-+      if (result) {
-+              acpi_disabled = 1;
-               return result;
-+      }
-       result = acpi_blacklisted();
-       if (result) {
-@@ -462,7 +538,7 @@ acpi_boot_init (void)
-        * If MPS is present, it will handle them,
-        * otherwise the system will stay in PIC mode
-        */
--      if (acpi_disabled || !acpi_irq) {
-+      if (acpi_disabled || acpi_noirq) {
-               return 1;
-         }
-@@ -504,6 +580,8 @@ acpi_boot_init (void)
-       acpi_irq_model = ACPI_IRQ_MODEL_IOAPIC;
-+      acpi_irq_balance_set(NULL);
-+
-       acpi_ioapic = 1;
- #endif /* CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER */
-@@ -519,5 +597,9 @@ acpi_boot_init (void)
-       acpi_table_parse(ACPI_HPET, acpi_parse_hpet);
- #endif
-+#ifdef CONFIG_X86_PM_TIMER
-+      acpi_table_parse(ACPI_FADT, acpi_parse_fadt);
-+#endif
-+
-       return 0;
- }
---- linux-2.6.0/arch/i386/kernel/asm-offsets.c 2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/asm-offsets.c  2003-12-28 23:26:36.000000000 -0800
-@@ -4,9 +4,11 @@
-  * to extract and format the required data.
-  */
-+#include <linux/sched.h>
- #include <linux/signal.h>
- #include <asm/ucontext.h>
- #include "sigframe.h"
-+#include <asm/fixmap.h>
- #define DEFINE(sym, val) \
-         asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-@@ -28,4 +30,17 @@ void foo(void)
-       DEFINE(RT_SIGFRAME_sigcontext,
-              offsetof (struct rt_sigframe, uc.uc_mcontext));
-+      DEFINE(TI_task, offsetof (struct thread_info, task));
-+      DEFINE(TI_exec_domain, offsetof (struct thread_info, exec_domain));
-+      DEFINE(TI_flags, offsetof (struct thread_info, flags));
-+      DEFINE(TI_preempt_count, offsetof (struct thread_info, preempt_count));
-+      DEFINE(TI_addr_limit, offsetof (struct thread_info, addr_limit));
-+      DEFINE(TI_real_stack, offsetof (struct thread_info, real_stack));
-+      DEFINE(TI_virtual_stack, offsetof (struct thread_info, virtual_stack));
-+      DEFINE(TI_user_pgd, offsetof (struct thread_info, user_pgd));
-+
-+      DEFINE(FIX_ENTRY_TRAMPOLINE_0_addr, __fix_to_virt(FIX_ENTRY_TRAMPOLINE_0));
-+      DEFINE(FIX_VSYSCALL_addr, __fix_to_virt(FIX_VSYSCALL));
-+      DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
-+      DEFINE(task_thread_db7, offsetof (struct task_struct, thread.debugreg[7]));
- }
---- linux-2.6.0/arch/i386/kernel/cpu/common.c  2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/cpu/common.c   2003-12-28 23:26:36.000000000 -0800
-@@ -510,16 +510,20 @@ void __init cpu_init (void)
-               BUG();
-       enter_lazy_tlb(&init_mm, current);
--      load_esp0(t, thread->esp0);
-+      load_esp0(t, thread);
-       set_tss_desc(cpu,t);
-       cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff;
-       load_TR_desc();
--      load_LDT(&init_mm.context);
-+      if (cpu)
-+              load_LDT(&init_mm.context);
-       /* Set up doublefault TSS pointer in the GDT */
-       __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
-       cpu_gdt_table[cpu][GDT_ENTRY_DOUBLEFAULT_TSS].b &= 0xfffffdff;
-+      if (cpu)
-+              trap_init_virtual_GDT();
-+
-       /* Clear %fs and %gs. */
-       asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
---- linux-2.6.0/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c      2003-09-08 13:58:55.000000000 -0700
-+++ 25/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c       2003-12-28 23:22:07.000000000 -0800
-@@ -73,6 +73,16 @@ static struct cpufreq_frequency_table op
-       { .frequency = CPUFREQ_TABLE_END }
- };
-+/* Ultra Low Voltage Intel Pentium M processor 1000MHz */
-+static struct cpufreq_frequency_table op_1000[] =
-+  {
-+    OP(600,  844),
-+    OP(800,  972),
-+    OP(900, 988),
-+    OP(1000, 1004),
-+    { .frequency = CPUFREQ_TABLE_END }
-+  };
-+
- /* Low Voltage Intel Pentium M processor 1.10GHz */
- static struct cpufreq_frequency_table op_1100[] =
- {
-@@ -165,6 +175,7 @@ static struct cpufreq_frequency_table op
- static const struct cpu_model models[] = 
- {
-        _CPU( 900, " 900"),
-+       CPU(1000),
-       CPU(1100),
-       CPU(1200),
-       CPU(1300),
---- linux-2.6.0/arch/i386/kernel/cpu/intel.c   2003-11-23 19:03:00.000000000 -0800
-+++ 25/arch/i386/kernel/cpu/intel.c    2003-12-28 23:26:36.000000000 -0800
-@@ -1,5 +1,7 @@
-+#include <linux/config.h>
- #include <linux/init.h>
- #include <linux/kernel.h>
-+
- #include <linux/string.h>
- #include <linux/bitops.h>
- #include <linux/smp.h>
-@@ -8,10 +10,15 @@
- #include <asm/processor.h>
- #include <asm/msr.h>
- #include <asm/uaccess.h>
-+#include <asm/desc.h>
- #include "cpu.h"
--extern int trap_init_f00f_bug(void);
-+#ifdef CONFIG_X86_LOCAL_APIC
-+#include <asm/mpspec.h>
-+#include <asm/apic.h>
-+#include <mach_apic.h>
-+#endif
- #ifdef CONFIG_X86_INTEL_USERCOPY
- /*
-@@ -157,7 +164,7 @@ static void __init init_intel(struct cpu
-               c->f00f_bug = 1;
-               if ( !f00f_workaround_enabled ) {
--                      trap_init_f00f_bug();
-+                      trap_init_virtual_IDT();
-                       printk(KERN_NOTICE "Intel Pentium with F0 0F bug - workaround enabled.\n");
-                       f00f_workaround_enabled = 1;
-               }
-@@ -240,6 +247,12 @@ static void __init init_intel(struct cpu
-       /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it until model 3 mask 3 */
-       if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) < 0x633)
-               clear_bit(X86_FEATURE_SEP, c->x86_capability);
-+      /*
-+       * FIXME: SEP is disabled for 4G/4G for now:
-+       */
-+#ifdef CONFIG_X86_HIGH_ENTRY
-+      clear_bit(X86_FEATURE_SEP, c->x86_capability);
-+#endif
-       /* Names for the Pentium II/Celeron processors 
-          detectable only by also checking the cache size.
-@@ -277,6 +290,7 @@ static void __init init_intel(struct cpu
-               extern  int phys_proc_id[NR_CPUS];
-               
-               u32     eax, ebx, ecx, edx;
-+              int     index_lsb, index_msb, tmp;
-               int     cpu = smp_processor_id();
-               cpuid(1, &eax, &ebx, &ecx, &edx);
-@@ -285,6 +299,8 @@ static void __init init_intel(struct cpu
-               if (smp_num_siblings == 1) {
-                       printk(KERN_INFO  "CPU: Hyper-Threading is disabled\n");
-               } else if (smp_num_siblings > 1 ) {
-+                      index_lsb = 0;
-+                      index_msb = 31;
-                       /*
-                        * At this point we only support two siblings per
-                        * processor package.
-@@ -295,13 +311,19 @@ static void __init init_intel(struct cpu
-                               smp_num_siblings = 1;
-                               goto too_many_siblings;
-                       }
--                      /* cpuid returns the value latched in the HW at reset,
--                       * not the APIC ID register's value.  For any box
--                       * whose BIOS changes APIC IDs, like clustered APIC
--                       * systems, we must use hard_smp_processor_id.
--                       * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID.
--                       */
--                      phys_proc_id[cpu] = hard_smp_processor_id() & ~(smp_num_siblings - 1);
-+                      tmp = smp_num_siblings;
-+                      while ((tmp & 1) == 0) {
-+                              tmp >>=1 ;
-+                              index_lsb++;
-+                      }
-+                      tmp = smp_num_siblings;
-+                      while ((tmp & 0x80000000 ) == 0) {
-+                              tmp <<=1 ;
-+                              index_msb--;
-+                      }
-+                      if (index_lsb != index_msb )
-+                              index_msb++;
-+                      phys_proc_id[cpu] = phys_pkg_id((ebx >> 24) & 0xFF, index_msb);
-                       printk(KERN_INFO  "CPU: Physical Processor ID: %d\n",
-                                phys_proc_id[cpu]);
---- linux-2.6.0/arch/i386/kernel/dmi_scan.c    2003-10-08 15:07:08.000000000 -0700
-+++ 25/arch/i386/kernel/dmi_scan.c     2003-12-28 23:21:33.000000000 -0800
-@@ -6,6 +6,7 @@
- #include <linux/module.h>
- #include <linux/apm_bios.h>
- #include <linux/slab.h>
-+#include <asm/acpi.h>
- #include <asm/io.h>
- #include <linux/pm.h>
- #include <asm/system.h>
-@@ -16,6 +17,7 @@ EXPORT_SYMBOL(dmi_broken);
- int is_sony_vaio_laptop;
- int is_unsafe_smbus;
-+int es7000_plat = 0;
- struct dmi_header
- {
-@@ -504,6 +506,7 @@ static __init int print_if_true(struct d
- }
-+#ifdef        CONFIG_ACPI_BOOT
- extern int acpi_disabled, acpi_force;
- static __init __attribute__((unused)) int acpi_disable(struct dmi_blacklist *d) 
-@@ -518,8 +521,6 @@ static __init __attribute__((unused)) in
-       return 0;
- } 
--
--#ifdef        CONFIG_ACPI_BOOT
- extern int acpi_ht;
- /*
-@@ -542,10 +543,8 @@ static __init __attribute__((unused)) in
- #ifdef        CONFIG_ACPI_PCI
- static __init int disable_acpi_pci(struct dmi_blacklist *d) 
- { 
--      extern __init void pci_disable_acpi(void) ;
--
-       printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident);         
--      pci_disable_acpi();
-+      acpi_noirq_set();
-       return 0;
- } 
- #endif
-@@ -1011,6 +1010,7 @@ static __init void dmi_check_blacklist(v
-                               printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
-                               printk(KERN_NOTICE "You can enable it with acpi=force\n");
-                               acpi_disabled = 1; 
-+                              acpi_ht = 0;
-                       } 
-               }
-       }
---- linux-2.6.0/arch/i386/kernel/doublefault.c 2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/doublefault.c  2003-12-28 23:26:36.000000000 -0800
-@@ -7,12 +7,13 @@
- #include <asm/uaccess.h>
- #include <asm/pgtable.h>
- #include <asm/desc.h>
-+#include <asm/fixmap.h>
- #define DOUBLEFAULT_STACKSIZE (1024)
- static unsigned long doublefault_stack[DOUBLEFAULT_STACKSIZE];
- #define STACK_START (unsigned long)(doublefault_stack+DOUBLEFAULT_STACKSIZE)
--#define ptr_ok(x) ((x) > 0xc0000000 && (x) < 0xc1000000)
-+#define ptr_ok(x) (((x) > __PAGE_OFFSET && (x) < (__PAGE_OFFSET + 0x01000000)) || ((x) >= FIXADDR_START))
- static void doublefault_fn(void)
- {
-@@ -38,8 +39,8 @@ static void doublefault_fn(void)
-                       printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
-                               t->eax, t->ebx, t->ecx, t->edx);
--                      printk("esi = %08lx, edi = %08lx\n",
--                              t->esi, t->edi);
-+                      printk("esi = %08lx, edi = %08lx, ebp = %08lx\n",
-+                              t->esi, t->edi, t->ebp);
-               }
-       }
---- /dev/null  2002-08-30 16:31:37.000000000 -0700
-+++ 25/arch/i386/kernel/efi.c  2003-12-28 23:21:45.000000000 -0800
-@@ -0,0 +1,645 @@
-+/*
-+ * Extensible Firmware Interface
-+ *
-+ * Based on Extensible Firmware Interface Specification version 1.0
-+ *
-+ * Copyright (C) 1999 VA Linux Systems
-+ * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
-+ * Copyright (C) 1999-2002 Hewlett-Packard Co.
-+ *    David Mosberger-Tang <davidm@hpl.hp.com>
-+ *    Stephane Eranian <eranian@hpl.hp.com>
-+ *
-+ * All EFI Runtime Services are not implemented yet as EFI only
-+ * supports physical mode addressing on SoftSDV. This is to be fixed
-+ * in a future version.  --drummond 1999-07-20
-+ *
-+ * Implemented EFI runtime services and virtual mode calls.  --davidm
-+ *
-+ * Goutham Rao: <goutham.rao@intel.com>
-+ *    Skip non-WB memory and ignore empty memory ranges.
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/kernel.h>
-+#include <linux/init.h>
-+#include <linux/mm.h>
-+#include <linux/types.h>
-+#include <linux/time.h>
-+#include <linux/spinlock.h>
-+#include <linux/bootmem.h>
-+#include <linux/ioport.h>
-+#include <linux/proc_fs.h>
-+#include <linux/efi.h>
-+
-+#include <asm/setup.h>
-+#include <asm/io.h>
-+#include <asm/page.h>
-+#include <asm/pgtable.h>
-+#include <asm/processor.h>
-+#include <asm/desc.h>
-+#include <asm/pgalloc.h>
-+#include <asm/tlbflush.h>
-+
-+#define EFI_DEBUG     0
-+#define PFX           "EFI: "
-+
-+extern efi_status_t asmlinkage efi_call_phys(void *, ...);
-+
-+struct efi efi;
-+struct efi efi_phys __initdata;
-+struct efi_memory_map memmap __initdata;
-+
-+/*
-+ * We require an early boot_ioremap mapping mechanism initially
-+ */
-+extern void * boot_ioremap(unsigned long, unsigned long);
-+
-+/*
-+ * efi_dir is allocated here, but the directory isn't created
-+ * here, as proc_mkdir() doesn't work this early in the bootup
-+ * process.  Therefore, each module, like efivars, must test for
-+ *    if (!efi_dir) efi_dir = proc_mkdir("efi", NULL);
-+ * prior to creating their own entries under /proc/efi.
-+ */
-+#ifdef CONFIG_PROC_FS
-+struct proc_dir_entry *efi_dir;
-+#endif
-+
-+
-+/*
-+ * To make EFI call EFI runtime service in physical addressing mode we need
-+ * prelog/epilog before/after the invocation to disable interrupt, to
-+ * claim EFI runtime service handler exclusively and to duplicate a memory in
-+ * low memory space say 0 - 3G.
-+ */
-+
-+static unsigned long efi_rt_eflags;
-+static spinlock_t efi_rt_lock = SPIN_LOCK_UNLOCKED;
-+static pgd_t efi_bak_pg_dir_pointer[2];
-+
-+static void efi_call_phys_prelog(void)
-+{
-+      unsigned long cr4;
-+      unsigned long temp;
-+
-+      spin_lock(&efi_rt_lock);
-+      local_irq_save(efi_rt_eflags);
-+
-+      /*
-+       * If I don't have PSE, I should just duplicate two entries in page
-+       * directory. If I have PSE, I just need to duplicate one entry in
-+       * page directory.
-+       */
-+      __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4));
-+
-+      if (cr4 & X86_CR4_PSE) {
-+              efi_bak_pg_dir_pointer[0].pgd =
-+                  swapper_pg_dir[pgd_index(0)].pgd;
-+              swapper_pg_dir[0].pgd =
-+                  swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd;
-+      } else {
-+              efi_bak_pg_dir_pointer[0].pgd =
-+                  swapper_pg_dir[pgd_index(0)].pgd;
-+              efi_bak_pg_dir_pointer[1].pgd =
-+                  swapper_pg_dir[pgd_index(0x400000)].pgd;
-+              swapper_pg_dir[pgd_index(0)].pgd =
-+                  swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd;
-+              temp = PAGE_OFFSET + 0x400000;
-+              swapper_pg_dir[pgd_index(0x400000)].pgd =
-+                  swapper_pg_dir[pgd_index(temp)].pgd;
-+      }
-+
-+      /*
-+       * After the lock is released, the original page table is restored.
-+       */
-+      local_flush_tlb();
-+
-+      cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address);
-+      __asm__ __volatile__("lgdt %0":"=m"
-+                          (*(struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0])));
-+}
-+
-+static void efi_call_phys_epilog(void)
-+{
-+      unsigned long cr4;
-+
-+      cpu_gdt_descr[0].address =
-+              (unsigned long) __va(cpu_gdt_descr[0].address);
-+      __asm__ __volatile__("lgdt %0":"=m"(cpu_gdt_descr));
-+      __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4));
-+
-+      if (cr4 & X86_CR4_PSE) {
-+              swapper_pg_dir[pgd_index(0)].pgd =
-+                  efi_bak_pg_dir_pointer[0].pgd;
-+      } else {
-+              swapper_pg_dir[pgd_index(0)].pgd =
-+                  efi_bak_pg_dir_pointer[0].pgd;
-+              swapper_pg_dir[pgd_index(0x400000)].pgd =
-+                  efi_bak_pg_dir_pointer[1].pgd;
-+      }
-+
-+      /*
-+       * After the lock is released, the original page table is restored.
-+       */
-+      local_flush_tlb();
-+
-+      local_irq_restore(efi_rt_eflags);
-+      spin_unlock(&efi_rt_lock);
-+}
-+
-+static efi_status_t
-+phys_efi_set_virtual_address_map(unsigned long memory_map_size,
-+                               unsigned long descriptor_size,
-+                               u32 descriptor_version,
-+                               efi_memory_desc_t *virtual_map)
-+{
-+      efi_status_t status;
-+
-+      efi_call_phys_prelog();
-+      status = efi_call_phys(efi_phys.set_virtual_address_map,
-+                                   memory_map_size, descriptor_size,
-+                                   descriptor_version, virtual_map);
-+      efi_call_phys_epilog();
-+      return status;
-+}
-+
-+efi_status_t
-+phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
-+{
-+      efi_status_t status;
-+
-+      efi_call_phys_prelog();
-+      status = efi_call_phys(efi_phys.get_time, tm, tc);
-+      efi_call_phys_epilog();
-+      return status;
-+}
-+
-+int inline efi_set_rtc_mmss(unsigned long nowtime)
-+{
-+      int real_seconds, real_minutes;
-+      efi_status_t    status;
-+      efi_time_t      eft;
-+      efi_time_cap_t  cap;
-+
-+      spin_lock(&efi_rt_lock);
-+      status = efi.get_time(&eft, &cap);
-+      spin_unlock(&efi_rt_lock);
-+      if (status != EFI_SUCCESS)
-+              panic("Ooops, efitime: can't read time!\n");
-+      real_seconds = nowtime % 60;
-+      real_minutes = nowtime / 60;
-+
-+      if (((abs(real_minutes - eft.minute) + 15)/30) & 1)
-+              real_minutes += 30;
-+      real_minutes %= 60;
-+
-+      eft.minute = real_minutes;
-+      eft.second = real_seconds;
-+
-+      if (status != EFI_SUCCESS) {
-+              printk("Ooops: efitime: can't read time!\n");
-+              return -1;
-+      }
-+      return 0;
-+}
-+/*
-+ * This should only be used during kernel init and before runtime
-+ * services have been remapped, therefore, we'll need to call in physical
-+ * mode.  Note, this call isn't used later, so mark it __init.
-+ */
-+unsigned long inline __init efi_get_time(void)
-+{
-+      efi_status_t status;
-+      efi_time_t eft;
-+      efi_time_cap_t cap;
-+
-+      status = phys_efi_get_time(&eft, &cap);
-+      if (status != EFI_SUCCESS)
-+              printk("Oops: efitime: can't read time status: 0x%lx\n",status);
-+
-+      return mktime(eft.year, eft.month, eft.day, eft.hour,
-+                      eft.minute, eft.second);
-+}
-+
-+int is_available_memory(efi_memory_desc_t * md)
-+{
-+      if (!(md->attribute & EFI_MEMORY_WB))
-+              return 0;
-+
-+      switch (md->type) {
-+              case EFI_LOADER_CODE:
-+              case EFI_LOADER_DATA:
-+              case EFI_BOOT_SERVICES_CODE:
-+              case EFI_BOOT_SERVICES_DATA:
-+              case EFI_CONVENTIONAL_MEMORY:
-+                      return 1;
-+      }
-+      return 0;
-+}
-+
-+/*
-+ * We need to map the EFI memory map again after paging_init().
-+ */
-+void __init efi_map_memmap(void)
-+{
-+      memmap.map = NULL;
-+
-+      memmap.map = (efi_memory_desc_t *)
-+              bt_ioremap((unsigned long) memmap.phys_map,
-+                      (memmap.nr_map * sizeof(efi_memory_desc_t)));
-+
-+      if (memmap.map == NULL)
-+              printk(KERN_ERR PFX "Could not remap the EFI memmap!\n");
-+}
-+
-+void __init print_efi_memmap(void)
-+{
-+      efi_memory_desc_t *md;
-+      int i;
-+
-+      for (i = 0; i < memmap.nr_map; i++) {
-+              md = &memmap.map[i];
-+              printk(KERN_INFO "mem%02u: type=%u, attr=0x%llx, "
-+                      "range=[0x%016llx-0x%016llx) (%lluMB)\n",
-+                      i, md->type, md->attribute, md->phys_addr,
-+                      md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
-+                      (md->num_pages >> (20 - EFI_PAGE_SHIFT)));
-+      }
-+}
-+
-+/*
-+ * Walks the EFI memory map and calls CALLBACK once for each EFI
-+ * memory descriptor that has memory that is available for kernel use.
-+ */
-+void efi_memmap_walk(efi_freemem_callback_t callback, void *arg)
-+{
-+      int prev_valid = 0;
-+      struct range {
-+              unsigned long start;
-+              unsigned long end;
-+      } prev, curr;
-+      efi_memory_desc_t *md;
-+      unsigned long start, end;
-+      int i;
-+
-+      for (i = 0; i < memmap.nr_map; i++) {
-+              md = &memmap.map[i];
-+
-+              if ((md->num_pages == 0) || (!is_available_memory(md)))
-+                      continue;
-+
-+              curr.start = md->phys_addr;
-+              curr.end = curr.start + (md->num_pages << EFI_PAGE_SHIFT);
-+
-+              if (!prev_valid) {
-+                      prev = curr;
-+                      prev_valid = 1;
-+              } else {
-+                      if (curr.start < prev.start)
-+                              printk(KERN_INFO PFX "Unordered memory map\n");
-+                      if (prev.end == curr.start)
-+                              prev.end = curr.end;
-+                      else {
-+                              start =
-+                                  (unsigned long) (PAGE_ALIGN(prev.start));
-+                              end = (unsigned long) (prev.end & PAGE_MASK);
-+                              if ((end > start)
-+                                  && (*callback) (start, end, arg) < 0)
-+                                      return;
-+                              prev = curr;
-+                      }
-+              }
-+      }
-+      if (prev_valid) {
-+              start = (unsigned long) PAGE_ALIGN(prev.start);
-+              end = (unsigned long) (prev.end & PAGE_MASK);
-+              if (end > start)
-+                      (*callback) (start, end, arg);
-+      }
-+}
-+
-+void __init efi_init(void)
-+{
-+      efi_config_table_t *config_tables;
-+      efi_runtime_services_t *runtime;
-+      efi_char16_t *c16;
-+      char vendor[100] = "unknown";
-+      unsigned long num_config_tables;
-+      int i = 0;
-+
-+      memset(&efi, 0, sizeof(efi) );
-+      memset(&efi_phys, 0, sizeof(efi_phys));
-+
-+      efi_phys.systab = EFI_SYSTAB;
-+      memmap.phys_map = EFI_MEMMAP;
-+      memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE;
-+      memmap.desc_version = EFI_MEMDESC_VERSION;
-+
-+      efi.systab = (efi_system_table_t *)
-+              boot_ioremap((unsigned long) efi_phys.systab,
-+                      sizeof(efi_system_table_t));
-+      /*
-+       * Verify the EFI Table
-+       */
-+      if (efi.systab == NULL)
-+              printk(KERN_ERR PFX "Woah! Couldn't map the EFI system table.\n");
-+      if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
-+              printk(KERN_ERR PFX "Woah! EFI system table signature incorrect\n");
-+      if ((efi.systab->hdr.revision ^ EFI_SYSTEM_TABLE_REVISION) >> 16 != 0)
-+              printk(KERN_ERR PFX
-+                     "Warning: EFI system table major version mismatch: "
-+                     "got %d.%02d, expected %d.%02d\n",
-+                     efi.systab->hdr.revision >> 16,
-+                     efi.systab->hdr.revision & 0xffff,
-+                     EFI_SYSTEM_TABLE_REVISION >> 16,
-+                     EFI_SYSTEM_TABLE_REVISION & 0xffff);
-+      /*
-+       * Grab some details from the system table
-+       */
-+      num_config_tables = efi.systab->nr_tables;
-+      config_tables = (efi_config_table_t *)efi.systab->tables;
-+      runtime = efi.systab->runtime;
-+
-+      /*
-+       * Show what we know for posterity
-+       */
-+      c16 = (efi_char16_t *) boot_ioremap(efi.systab->fw_vendor, 2);
-+      if (c16) {
-+              for (i = 0; i < sizeof(vendor) && *c16; ++i)
-+                      vendor[i] = *c16++;
-+              vendor[i] = '\0';
-+      } else
-+              printk(KERN_ERR PFX "Could not map the firmware vendor!\n");
-+
-+      printk(KERN_INFO PFX "EFI v%u.%.02u by %s \n",
-+             efi.systab->hdr.revision >> 16,
-+             efi.systab->hdr.revision & 0xffff, vendor);
-+
-+      /*
-+       * Let's see what config tables the firmware passed to us.
-+       */
-+      config_tables = (efi_config_table_t *)
-+                              boot_ioremap((unsigned long) config_tables,
-+                              num_config_tables * sizeof(efi_config_table_t));
-+
-+      if (config_tables == NULL)
-+              printk(KERN_ERR PFX "Could not map EFI Configuration Table!\n");
-+
-+      for (i = 0; i < num_config_tables; i++) {
-+              if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) {
-+                      efi.mps = (void *)config_tables[i].table;
-+                      printk(KERN_INFO " MPS=0x%lx ", config_tables[i].table);
-+              } else
-+                  if (efi_guidcmp(config_tables[i].guid, ACPI_20_TABLE_GUID) == 0) {
-+                      efi.acpi20 = __va(config_tables[i].table);
-+                      printk(KERN_INFO " ACPI 2.0=0x%lx ", config_tables[i].table);
-+              } else
-+                  if (efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID) == 0) {
-+                      efi.acpi = __va(config_tables[i].table);
-+                      printk(KERN_INFO " ACPI=0x%lx ", config_tables[i].table);
-+              } else
-+                  if (efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID) == 0) {
-+                      efi.smbios = (void *) config_tables[i].table;
-+                      printk(KERN_INFO " SMBIOS=0x%lx ", config_tables[i].table);
-+              } else
-+                  if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) {
-+                      efi.hcdp = (void *)config_tables[i].table;
-+                      printk(KERN_INFO " HCDP=0x%lx ", config_tables[i].table);
-+              } else
-+                  if (efi_guidcmp(config_tables[i].guid, UGA_IO_PROTOCOL_GUID) == 0) {
-+                      efi.uga = (void *)config_tables[i].table;
-+                      printk(KERN_INFO " UGA=0x%lx ", config_tables[i].table);
-+              }
-+      }
-+      printk("\n");
-+
-+      /*
-+       * Check out the runtime services table. We need to map
-+       * the runtime services table so that we can grab the physical
-+       * address of several of the EFI runtime functions, needed to
-+       * set the firmware into virtual mode.
-+       */
-+
-+      runtime = (efi_runtime_services_t *) boot_ioremap((unsigned long)
-+                                              runtime,
-+                                              sizeof(efi_runtime_services_t));
-+      if (runtime != NULL) {
-+              /*
-+               * We will only need *early* access to the following
-+               * two EFI runtime services before set_virtual_address_map
-+               * is invoked.
-+               */
-+              efi_phys.get_time = (efi_get_time_t *) runtime->get_time;
-+              efi_phys.set_virtual_address_map =
-+                      (efi_set_virtual_address_map_t *)
-+                              runtime->set_virtual_address_map;
-+      } else
-+              printk(KERN_ERR PFX "Could not map the runtime service table!\n");
-+
-+      /* Map the EFI memory map for use until paging_init() */
-+
-+      memmap.map = (efi_memory_desc_t *)
-+              boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE);
-+
-+      if (memmap.map == NULL)
-+              printk(KERN_ERR PFX "Could not map the EFI memory map!\n");
-+
-+      if (EFI_MEMDESC_SIZE != sizeof(efi_memory_desc_t)) {
-+              printk(KERN_WARNING PFX "Warning! Kernel-defined memdesc doesn't "
-+                         "match the one from EFI!\n");
-+      }
-+#if EFI_DEBUG
-+      print_efi_memmap();
-+#endif
-+}
-+
-+/*
-+ * This function will switch the EFI runtime services to virtual mode.
-+ * Essentially, look through the EFI memmap and map every region that
-+ * has the runtime attribute bit set in its memory descriptor and update
-+ * that memory descriptor with the virtual address obtained from ioremap().
-+ * This enables the runtime services to be called without having to
-+ * thunk back into physical mode for every invocation.
-+ */
-+
-+void __init efi_enter_virtual_mode(void)
-+{
-+      efi_memory_desc_t *md;
-+      efi_status_t status;
-+      int i;
-+
-+      efi.systab = NULL;
-+
-+      for (i = 0; i < memmap.nr_map; i++) {
-+              md = &memmap.map[i];
-+
-+              if (md->attribute & EFI_MEMORY_RUNTIME) {
-+                      md->virt_addr =
-+                              (unsigned long)ioremap(md->phys_addr,
-+                                      md->num_pages << EFI_PAGE_SHIFT);
-+                      if (!(unsigned long)md->virt_addr) {
-+                              printk(KERN_ERR PFX "ioremap of 0x%lX failed\n",
-+                                      (unsigned long)md->phys_addr);
-+                      }
-+
-+                      if (((unsigned long)md->phys_addr <=
-+                                      (unsigned long)efi_phys.systab) &&
-+                              ((unsigned long)efi_phys.systab <
-+                                      md->phys_addr +
-+                                      ((unsigned long)md->num_pages <<
-+                                              EFI_PAGE_SHIFT))) {
-+                              unsigned long addr;
-+
-+                              addr = md->virt_addr - md->phys_addr +
-+                                              (unsigned long)efi_phys.systab;
-+                              efi.systab = (efi_system_table_t *)addr;
-+                      }
-+              }
-+      }
-+
-+      if (!efi.systab)
-+              BUG();
-+
-+      status = phys_efi_set_virtual_address_map(
-+                      sizeof(efi_memory_desc_t) * memmap.nr_map,
-+                      sizeof(efi_memory_desc_t),
-+                      memmap.desc_version,
-+                      memmap.phys_map);
-+
-+      if (status != EFI_SUCCESS) {
-+              printk (KERN_ALERT "You are screwed! "
-+                      "Unable to switch EFI into virtual mode "
-+                      "(status=%lx)\n", status);
-+              panic("EFI call to SetVirtualAddressMap() failed!");
-+      }
-+
-+      /*
-+       * Now that EFI is in virtual mode, update the function
-+       * pointers in the runtime service table to the new virtual addresses.
-+       */
-+
-+      efi.get_time = (efi_get_time_t *) efi.systab->runtime->get_time;
-+      efi.set_time = (efi_set_time_t *) efi.systab->runtime->set_time;
-+      efi.get_wakeup_time = (efi_get_wakeup_time_t *)
-+                                      efi.systab->runtime->get_wakeup_time;
-+      efi.set_wakeup_time = (efi_set_wakeup_time_t *)
-+                                      efi.systab->runtime->set_wakeup_time;
-+      efi.get_variable = (efi_get_variable_t *)
-+                                      efi.systab->runtime->get_variable;
-+      efi.get_next_variable = (efi_get_next_variable_t *)
-+                                      efi.systab->runtime->get_next_variable;
-+      efi.set_variable = (efi_set_variable_t *)
-+                                      efi.systab->runtime->set_variable;
-+      efi.get_next_high_mono_count = (efi_get_next_high_mono_count_t *)
-+                                      efi.systab->runtime->get_next_high_mono_count;
-+      efi.reset_system = (efi_reset_system_t *)
-+                                      efi.systab->runtime->reset_system;
-+}
-+
-+void __init
-+efi_initialize_iomem_resources(struct resource *code_resource,
-+                             struct resource *data_resource)
-+{
-+      struct resource *res;
-+      efi_memory_desc_t *md;
-+      int i;
-+
-+      for (i = 0; i < memmap.nr_map; i++) {
-+              md = &memmap.map[i];
-+
-+              if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >
-+                  0x100000000ULL)
-+                      continue;
-+              res = alloc_bootmem_low(sizeof(struct resource));
-+              switch (md->type) {
-+              case EFI_RESERVED_TYPE:
-+                      res->name = "Reserved Memory";
-+                      break;
-+              case EFI_LOADER_CODE:
-+                      res->name = "Loader Code";
-+                      break;
-+              case EFI_LOADER_DATA:
-+                      res->name = "Loader Data";
-+                      break;
-+              case EFI_BOOT_SERVICES_DATA:
-+                      res->name = "BootServices Data";
-+                      break;
-+              case EFI_BOOT_SERVICES_CODE:
-+                      res->name = "BootServices Code";
-+                      break;
-+              case EFI_RUNTIME_SERVICES_CODE:
-+                      res->name = "Runtime Service Code";
-+                      break;
-+              case EFI_RUNTIME_SERVICES_DATA:
-+                      res->name = "Runtime Service Data";
-+                      break;
-+              case EFI_CONVENTIONAL_MEMORY:
-+                      res->name = "Conventional Memory";
-+                      break;
-+              case EFI_UNUSABLE_MEMORY:
-+                      res->name = "Unusable Memory";
-+                      break;
-+              case EFI_ACPI_RECLAIM_MEMORY:
-+                      res->name = "ACPI Reclaim";
-+                      break;
-+              case EFI_ACPI_MEMORY_NVS:
-+                      res->name = "ACPI NVS";
-+                      break;
-+              case EFI_MEMORY_MAPPED_IO:
-+                      res->name = "Memory Mapped IO";
-+                      break;
-+              case EFI_MEMORY_MAPPED_IO_PORT_SPACE:
-+                      res->name = "Memory Mapped IO Port Space";
-+                      break;
-+              default:
-+                      res->name = "Reserved";
-+                      break;
-+              }
-+              res->start = md->phys_addr;
-+              res->end = res->start + ((md->num_pages << EFI_PAGE_SHIFT) - 1);
-+              res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
-+              if (request_resource(&iomem_resource, res) < 0)
-+                      printk(KERN_ERR PFX "Failed to allocate res %s : 0x%lx-0x%lx\n",
-+                              res->name, res->start, res->end);
-+              /*
-+               * We don't know which region contains kernel data so we try
-+               * it repeatedly and let the resource manager test it.
-+               */
-+              if (md->type == EFI_CONVENTIONAL_MEMORY) {
-+                      request_resource(res, code_resource);
-+                      request_resource(res, data_resource);
-+              }
-+      }
-+}
-+
-+/*
-+ * Convenience functions to obtain memory types and attributes
-+ */
-+
-+u32 efi_mem_type(unsigned long phys_addr)
-+{
-+      efi_memory_desc_t *md;
-+      int i;
-+
-+      for (i = 0; i < memmap.nr_map; i++) {
-+              md = &memmap.map[i];
-+              if ((md->phys_addr <= phys_addr) && (phys_addr <
-+                      (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) ))
-+                      return md->type;
-+      }
-+      return 0;
-+}
-+
-+u64 efi_mem_attributes(unsigned long phys_addr)
-+{
-+      efi_memory_desc_t *md;
-+      int i;
-+
-+      for (i = 0; i < memmap.nr_map; i++) {
-+              md = &memmap.map[i];
-+              if ((md->phys_addr <= phys_addr) && (phys_addr <
-+                      (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) ))
-+                      return md->attribute;
-+      }
-+      return 0;
-+}
---- /dev/null  2002-08-30 16:31:37.000000000 -0700
-+++ 25/arch/i386/kernel/efi_stub.S     2003-12-28 23:21:45.000000000 -0800
-@@ -0,0 +1,124 @@
-+/*
-+ * EFI call stub for IA32.
-+ *
-+ * This stub allows us to make EFI calls in physical mode with interrupts
-+ * turned off.
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/linkage.h>
-+#include <asm/page.h>
-+#include <asm/pgtable.h>
-+
-+/*
-+ * efi_call_phys(void *, ...) is a function with variable parameters.
-+ * All the callers of this function assure that all the parameters are 4-bytes.
-+ */
-+
-+/*
-+ * In gcc calling convention, EBX, ESP, EBP, ESI and EDI are all callee save.
-+ * So we'd better save all of them at the beginning of this function and restore
-+ * at the end no matter how many we use, because we can not assure EFI runtime
-+ * service functions will comply with gcc calling convention, too.
-+ */
-+
-+.text
-+ENTRY(efi_call_phys)
-+      /*
-+       * 0. The function can only be called in Linux kernel. So CS has been
-+       * set to 0x0010, DS and SS have been set to 0x0018. In EFI, I found
-+       * the values of these registers are the same. And, the corresponding
-+       * GDT entries are identical. So I will do nothing about segment reg
-+       * and GDT, but change GDT base register in prelog and epilog.
-+       */
-+
-+      /*
-+       * 1. Now I am running with EIP = <physical address> + PAGE_OFFSET.
-+       * But to make it smoothly switch from virtual mode to flat mode.
-+       * The mapping of lower virtual memory has been created in prelog and
-+       * epilog.
-+       */
-+      movl    $1f, %edx
-+      subl    $__PAGE_OFFSET, %edx
-+      jmp     *%edx
-+1:
-+
-+      /*
-+       * 2. Now on the top of stack is the return
-+       * address in the caller of efi_call_phys(), then parameter 1,
-+       * parameter 2, ..., param n. To make things easy, we save the return
-+       * address of efi_call_phys in a global variable.
-+       */
-+      popl    %edx
-+      movl    %edx, saved_return_addr
-+      /* get the function pointer into ECX*/
-+      popl    %ecx
-+      movl    %ecx, efi_rt_function_ptr
-+      movl    $2f, %edx
-+      subl    $__PAGE_OFFSET, %edx
-+      pushl   %edx
-+
-+      /*
-+       * 3. Clear PG bit in %CR0.
-+       */
-+      movl    %cr0, %edx
-+      andl    $0x7fffffff, %edx
-+      movl    %edx, %cr0
-+      jmp     1f
-+1:
-+
-+      /*
-+       * 4. Adjust stack pointer.
-+       */
-+      subl    $__PAGE_OFFSET, %esp
-+
-+      /*
-+       * 5. Call the physical function.
-+       */
-+      jmp     *%ecx
-+
-+2:
-+      /*
-+       * 6. After EFI runtime service returns, control will return to
-+       * following instruction. We'd better readjust stack pointer first.
-+       */
-+      addl    $__PAGE_OFFSET, %esp
-+
-+      /*
-+       * 7. Restore PG bit
-+       */
-+      movl    %cr0, %edx
-+      orl     $0x80000000, %edx
-+      movl    %edx, %cr0
-+      jmp     1f
-+1:
-+      /*
-+       * 8. Now restore the virtual mode from flat mode by
-+       * adding EIP with PAGE_OFFSET.
-+       */
-+      movl    $1f, %edx
-+      jmp     *%edx
-+1:
-+
-+      /*
-+       * 9. Balance the stack. And because EAX contain the return value,
-+       * we'd better not clobber it.
-+       */
-+      leal    efi_rt_function_ptr, %edx
-+      movl    (%edx), %ecx
-+      pushl   %ecx
-+
-+      /*
-+       * 10. Push the saved return address onto the stack and return.
-+       */
-+      leal    saved_return_addr, %edx
-+      movl    (%edx), %ecx
-+      pushl   %ecx
-+      ret
-+.previous
-+
-+.data
-+saved_return_addr:
-+      .long 0
-+efi_rt_function_ptr:
-+      .long 0
---- linux-2.6.0/arch/i386/kernel/entry.S       2003-11-23 19:03:00.000000000 -0800
-+++ 25/arch/i386/kernel/entry.S        2003-12-28 23:26:36.000000000 -0800
-@@ -43,11 +43,25 @@
- #include <linux/config.h>
- #include <linux/linkage.h>
- #include <asm/thread_info.h>
-+#include <asm/asm_offsets.h>
- #include <asm/errno.h>
- #include <asm/segment.h>
-+#include <asm/page.h>
- #include <asm/smp.h>
- #include <asm/page.h>
- #include "irq_vectors.h"
-+        /* We do not recover from a stack overflow, but at least
-+         * we know it happened and should be able to track it down.
-+         */
-+#ifdef CONFIG_STACK_OVERFLOW_TEST
-+#define STACK_OVERFLOW_TEST \
-+        testl $7680,%esp;    \
-+        jnz   10f;            \
-+        call  stack_overflow; \
-+10:
-+#else
-+#define STACK_OVERFLOW_TEST
-+#endif
- #define nr_syscalls ((syscall_table_size)/4)
-@@ -87,7 +101,102 @@ TSS_ESP0_OFFSET = (4 - 0x200)
- #define resume_kernel         restore_all
- #endif
--#define SAVE_ALL \
-+#ifdef CONFIG_X86_HIGH_ENTRY
-+
-+#ifdef CONFIG_X86_SWITCH_PAGETABLES
-+
-+#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
-+/*
-+ * If task is preempted in __SWITCH_KERNELSPACE, and moved to another cpu,
-+ * __switch_to repoints %esp to the appropriate virtual stack; but %ebp is
-+ * left stale, so we must check whether to repeat the real stack calculation.
-+ */
-+#define repeat_if_esp_changed                         \
-+      xorl %esp, %ebp;                                \
-+      testl $0xffffe000, %ebp;                        \
-+      jnz 0b
-+#else
-+#define repeat_if_esp_changed
-+#endif
-+
-+/* clobbers ebx, edx and ebp */
-+
-+#define __SWITCH_KERNELSPACE                          \
-+      cmpl $0xff000000, %esp;                         \
-+      jb 1f;                                          \
-+                                                      \
-+      /*                                              \
-+       * switch pagetables and load the real stack,   \
-+       * keep the stack offset:                       \
-+       */                                             \
-+                                                      \
-+      movl $swapper_pg_dir-__PAGE_OFFSET, %edx;       \
-+                                                      \
-+      /* GET_THREAD_INFO(%ebp) intermixed */          \
-+0:                                                    \
-+      movl %esp, %ebp;                                \
-+      movl %esp, %ebx;                                \
-+      andl $0xffffe000, %ebp;                         \
-+      andl $0x00001fff, %ebx;                         \
-+      orl TI_real_stack(%ebp), %ebx;                  \
-+      repeat_if_esp_changed;                          \
-+                                                      \
-+      movl %edx, %cr3;                                \
-+      movl %ebx, %esp;                                \
-+1:
-+
-+#endif
-+
-+
-+#define __SWITCH_USERSPACE \
-+      /* interrupted any of the user return paths? */ \
-+                                                      \
-+      movl EIP(%esp), %eax;                           \
-+                                                      \
-+      cmpl $int80_ret_start_marker, %eax;             \
-+      jb 33f; /* nope - continue with sysexit check */\
-+      cmpl $int80_ret_end_marker, %eax;               \
-+      jb 22f; /* yes - switch to virtual stack */     \
-+33:                                                   \
-+      cmpl $sysexit_ret_start_marker, %eax;           \
-+      jb 44f; /* nope - continue with user check */   \
-+      cmpl $sysexit_ret_end_marker, %eax;             \
-+      jb 22f; /* yes - switch to virtual stack */     \
-+      /* return to userspace? */                      \
-+44:                                                   \
-+      movl EFLAGS(%esp),%ecx;                         \
-+      movb CS(%esp),%cl;                              \
-+      testl $(VM_MASK | 3),%ecx;                      \
-+      jz 2f;                                          \
-+22:                                                   \
-+      /*                                              \
-+       * switch to the virtual stack, then switch to  \
-+       * the userspace pagetables.                    \
-+       */                                             \
-+                                                      \
-+      GET_THREAD_INFO(%ebp);                          \
-+      movl TI_virtual_stack(%ebp), %edx;              \
-+      movl TI_user_pgd(%ebp), %ecx;                   \
-+                                                      \
-+      movl %esp, %ebx;                                \
-+      andl $0x1fff, %ebx;                             \
-+      orl %ebx, %edx;                                 \
-+int80_ret_start_marker:                                       \
-+      movl %edx, %esp;                                \
-+      movl %ecx, %cr3;                                \
-+                                                      \
-+      __RESTORE_ALL;                                  \
-+int80_ret_end_marker:                                 \
-+2:
-+
-+#else /* !CONFIG_X86_HIGH_ENTRY */
-+
-+#define __SWITCH_KERNELSPACE
-+#define __SWITCH_USERSPACE
-+
-+#endif
-+
-+#define __SAVE_ALL \
-       cld; \
-       pushl %es; \
-       pushl %ds; \
-@@ -102,7 +211,7 @@ TSS_ESP0_OFFSET = (4 - 0x200)
-       movl %edx, %ds; \
-       movl %edx, %es;
--#define RESTORE_INT_REGS \
-+#define __RESTORE_INT_REGS \
-       popl %ebx;      \
-       popl %ecx;      \
-       popl %edx;      \
-@@ -111,29 +220,28 @@ TSS_ESP0_OFFSET = (4 - 0x200)
-       popl %ebp;      \
-       popl %eax
--#define RESTORE_REGS  \
--      RESTORE_INT_REGS; \
--1:    popl %ds;       \
--2:    popl %es;       \
-+#define __RESTORE_REGS        \
-+      __RESTORE_INT_REGS; \
-+111:  popl %ds;       \
-+222:  popl %es;       \
- .section .fixup,"ax"; \
--3:    movl $0,(%esp); \
--      jmp 1b;         \
--4:    movl $0,(%esp); \
--      jmp 2b;         \
-+444:  movl $0,(%esp); \
-+      jmp 111b;       \
-+555:  movl $0,(%esp); \
-+      jmp 222b;       \
- .previous;            \
- .section __ex_table,"a";\
-       .align 4;       \
--      .long 1b,3b;    \
--      .long 2b,4b;    \
-+      .long 111b,444b;\
-+      .long 222b,555b;\
- .previous
--
--#define RESTORE_ALL   \
--      RESTORE_REGS    \
-+#define __RESTORE_ALL \
-+      __RESTORE_REGS  \
-       addl $4, %esp;  \
--1:    iret;           \
-+333:  iret;           \
- .section .fixup,"ax";   \
--2:    sti;            \
-+666:  sti;            \
-       movl $(__USER_DS), %edx; \
-       movl %edx, %ds; \
-       movl %edx, %es; \
-@@ -142,10 +250,19 @@ TSS_ESP0_OFFSET = (4 - 0x200)
- .previous;            \
- .section __ex_table,"a";\
-       .align 4;       \
--      .long 1b,2b;    \
-+      .long 333b,666b;\
- .previous
-+#define SAVE_ALL \
-+      __SAVE_ALL;                                     \
-+      __SWITCH_KERNELSPACE;                           \
-+        STACK_OVERFLOW_TEST;
-+
-+#define RESTORE_ALL                                   \
-+      __SWITCH_USERSPACE;                             \
-+      __RESTORE_ALL;
-+.section .entry.text,"ax"
- ENTRY(lcall7)
-       pushfl                  # We get a different stack layout with call
-@@ -163,7 +280,7 @@ do_lcall:
-       movl %edx,EIP(%ebp)     # Now we move them to their "normal" places
-       movl %ecx,CS(%ebp)      #
-       andl $-8192, %ebp       # GET_THREAD_INFO
--      movl TI_EXEC_DOMAIN(%ebp), %edx # Get the execution domain
-+      movl TI_exec_domain(%ebp), %edx # Get the execution domain
-       call *4(%edx)           # Call the lcall7 handler for the domain
-       addl $4, %esp
-       popl %eax
-@@ -208,7 +325,7 @@ ENTRY(resume_userspace)
-       cli                             # make sure we don't miss an interrupt
-                                       # setting need_resched or sigpending
-                                       # between sampling and the iret
--      movl TI_FLAGS(%ebp), %ecx
-+      movl TI_flags(%ebp), %ecx
-       andl $_TIF_WORK_MASK, %ecx      # is there any work to be done on
-                                       # int/exception return?
-       jne work_pending
-@@ -216,18 +333,18 @@ ENTRY(resume_userspace)
- #ifdef CONFIG_PREEMPT
- ENTRY(resume_kernel)
--      cmpl $0,TI_PRE_COUNT(%ebp)      # non-zero preempt_count ?
-+      cmpl $0,TI_preempt_count(%ebp)  # non-zero preempt_count ?
-       jnz restore_all
- need_resched:
--      movl TI_FLAGS(%ebp), %ecx       # need_resched set ?
-+      movl TI_flags(%ebp), %ecx       # need_resched set ?
-       testb $_TIF_NEED_RESCHED, %cl
-       jz restore_all
-       testl $IF_MASK,EFLAGS(%esp)     # interrupts off (exception path) ?
-       jz restore_all
--      movl $PREEMPT_ACTIVE,TI_PRE_COUNT(%ebp)
-+      movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp)
-       sti
-       call schedule
--      movl $0,TI_PRE_COUNT(%ebp)
-+      movl $0,TI_preempt_count(%ebp)
-       cli
-       jmp need_resched
- #endif
-@@ -246,37 +363,50 @@ sysenter_past_esp:
-       pushl $(__USER_CS)
-       pushl $SYSENTER_RETURN
--/*
-- * Load the potential sixth argument from user stack.
-- * Careful about security.
-- */
--      cmpl $__PAGE_OFFSET-3,%ebp
--      jae syscall_fault
--1:    movl (%ebp),%ebp
--.section __ex_table,"a"
--      .align 4
--      .long 1b,syscall_fault
--.previous
--
-       pushl %eax
-       SAVE_ALL
-       GET_THREAD_INFO(%ebp)
-       cmpl $(nr_syscalls), %eax
-       jae syscall_badsys
--      testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp)
-+      testb $_TIF_SYSCALL_TRACE,TI_flags(%ebp)
-       jnz syscall_trace_entry
-       call *sys_call_table(,%eax,4)
-       movl %eax,EAX(%esp)
-       cli
--      movl TI_FLAGS(%ebp), %ecx
-+      movl TI_flags(%ebp), %ecx
-       testw $_TIF_ALLWORK_MASK, %cx
-       jne syscall_exit_work
-+
-+#ifdef CONFIG_X86_SWITCH_PAGETABLES
-+
-+      GET_THREAD_INFO(%ebp)
-+      movl TI_virtual_stack(%ebp), %edx
-+      movl TI_user_pgd(%ebp), %ecx
-+      movl %esp, %ebx
-+      andl $0x1fff, %ebx
-+      orl %ebx, %edx
-+sysexit_ret_start_marker:
-+      movl %edx, %esp
-+      movl %ecx, %cr3
-+#endif
-+      /*
-+       * only ebx is not restored by the userspace sysenter vsyscall
-+       * code, it assumes it to be callee-saved.
-+       */
-+      movl EBX(%esp), %ebx
-+
- /* if something modifies registers it must also disable sysexit */
-+
-       movl EIP(%esp), %edx
-       movl OLDESP(%esp), %ecx
-+
-       sti
-       sysexit
-+#ifdef CONFIG_X86_SWITCH_PAGETABLES
-+sysexit_ret_end_marker:
-+      nop
-+#endif
-       # system call handler stub
-@@ -287,7 +417,7 @@ ENTRY(system_call)
-       cmpl $(nr_syscalls), %eax
-       jae syscall_badsys
-                                       # system call tracing in operation
--      testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp)
-+      testb $_TIF_SYSCALL_TRACE,TI_flags(%ebp)
-       jnz syscall_trace_entry
- syscall_call:
-       call *sys_call_table(,%eax,4)
-@@ -296,10 +426,23 @@ syscall_exit:
-       cli                             # make sure we don't miss an interrupt
-                                       # setting need_resched or sigpending
-                                       # between sampling and the iret
--      movl TI_FLAGS(%ebp), %ecx
-+      movl TI_flags(%ebp), %ecx
-       testw $_TIF_ALLWORK_MASK, %cx   # current->work
-       jne syscall_exit_work
- restore_all:
-+#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS
-+      movl EFLAGS(%esp), %eax         # mix EFLAGS and CS
-+      movb CS(%esp), %al
-+      testl $(VM_MASK | 3), %eax
-+      jz resume_kernelX               # returning to kernel or vm86-space
-+
-+      cmpl $0,TI_preempt_count(%ebp)  # non-zero preempt_count ?
-+      jz resume_kernelX
-+
-+        int $3
-+
-+resume_kernelX:
-+#endif
-       RESTORE_ALL
-       # perform work that needs to be done immediately before resumption
-@@ -312,7 +455,7 @@ work_resched:
-       cli                             # make sure we don't miss an interrupt
-                                       # setting need_resched or sigpending
-                                       # between sampling and the iret
--      movl TI_FLAGS(%ebp), %ecx
-+      movl TI_flags(%ebp), %ecx
-       andl $_TIF_WORK_MASK, %ecx      # is there any work to be done other
-                                       # than syscall tracing?
-       jz restore_all
-@@ -327,6 +470,22 @@ work_notifysig:                           # deal with pending s
-                                       # vm86-space
-       xorl %edx, %edx
-       call do_notify_resume
-+
-+#if CONFIG_X86_HIGH_ENTRY
-+      /*
-+       * Reload db7 if necessary:
-+       */
-+      movl TI_flags(%ebp), %ecx
-+      testb $_TIF_DB7, %cl
-+      jnz work_db7
-+
-+      jmp restore_all
-+
-+work_db7:
-+      movl TI_task(%ebp), %edx;
-+      movl task_thread_db7(%edx), %edx;
-+      movl %edx, %db7;
-+#endif
-       jmp restore_all
-       ALIGN
-@@ -382,7 +541,7 @@ syscall_badsys:
-  */
- .data
- ENTRY(interrupt)
--.text
-+.previous
- vector=0
- ENTRY(irq_entries_start)
-@@ -392,7 +551,7 @@ ENTRY(irq_entries_start)
-       jmp common_interrupt
- .data
-       .long 1b
--.text
-+.previous
- vector=vector+1
- .endr
-@@ -433,12 +592,17 @@ error_code:
-       movl ES(%esp), %edi             # get the function address
-       movl %eax, ORIG_EAX(%esp)
-       movl %ecx, ES(%esp)
--      movl %esp, %edx
-       pushl %esi                      # push the error code
--      pushl %edx                      # push the pt_regs pointer
-       movl $(__USER_DS), %edx
-       movl %edx, %ds
-       movl %edx, %es
-+
-+/* clobbers edx, ebx and ebp */
-+      __SWITCH_KERNELSPACE
-+
-+      leal 4(%esp), %edx              # prepare pt_regs
-+      pushl %edx                      # push pt_regs
-+
-       call *%edi
-       addl $8, %esp
-       jmp ret_from_exception
-@@ -529,7 +693,7 @@ nmi_stack_correct:
-       pushl %edx
-       call do_nmi
-       addl $8, %esp
--      RESTORE_ALL
-+      jmp restore_all
- nmi_stack_fixup:
-       FIX_STACK(12,nmi_stack_correct, 1)
-@@ -606,6 +770,8 @@ ENTRY(spurious_interrupt_bug)
-       pushl $do_spurious_interrupt_bug
-       jmp error_code
-+.previous
-+
- .data
- ENTRY(sys_call_table)
-       .long sys_restart_syscall       /* 0 - old "setup()" system call, used for restarting */
---- /dev/null  2002-08-30 16:31:37.000000000 -0700
-+++ 25/arch/i386/kernel/entry_trampoline.c     2003-12-28 23:26:36.000000000 -0800
-@@ -0,0 +1,75 @@
-+/*
-+ * linux/arch/i386/kernel/entry_trampoline.c
-+ *
-+ * (C) Copyright 2003 Ingo Molnar
-+ *
-+ * This file contains the needed support code for 4GB userspace
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/smp.h>
-+#include <linux/mm.h>
-+#include <linux/sched.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <linux/highmem.h>
-+#include <asm/desc.h>
-+#include <asm/atomic_kmap.h>
-+
-+extern char __entry_tramp_start, __entry_tramp_end, __start___entry_text;
-+
-+void __init init_entry_mappings(void)
-+{
-+#ifdef CONFIG_X86_HIGH_ENTRY
-+      void *tramp;
-+
-+      /*
-+       * We need a high IDT and GDT for the 4G/4G split:
-+       */
-+      trap_init_virtual_IDT();
-+
-+      __set_fixmap(FIX_ENTRY_TRAMPOLINE_0, __pa((unsigned long)&__entry_tramp_start), PAGE_KERNEL);
-+      __set_fixmap(FIX_ENTRY_TRAMPOLINE_1, __pa((unsigned long)&__entry_tramp_start) + PAGE_SIZE, PAGE_KERNEL);
-+      tramp = (void *)fix_to_virt(FIX_ENTRY_TRAMPOLINE_0);
-+
-+      printk("mapped 4G/4G trampoline to %p.\n", tramp);
-+      BUG_ON((void *)&__start___entry_text != tramp);
-+      /*
-+       * Virtual kernel stack:
-+       */
-+      BUG_ON(__kmap_atomic_vaddr(KM_VSTACK0) & 8191);
-+      BUG_ON(sizeof(struct desc_struct)*NR_CPUS*GDT_ENTRIES > 2*PAGE_SIZE);
-+      BUG_ON((unsigned int)&__entry_tramp_end - (unsigned int)&__entry_tramp_start > 2*PAGE_SIZE);
-+
-+      /*
-+       * set up the initial thread's virtual stack related
-+       * fields:
-+       */
-+      current->thread.stack_page0 = virt_to_page((char *)current->thread_info);
-+      current->thread.stack_page1 = virt_to_page((char *)current->thread_info + PAGE_SIZE);
-+      current->thread_info->virtual_stack = (void *)__kmap_atomic_vaddr(KM_VSTACK0);
-+
-+      __kunmap_atomic_type(KM_VSTACK0);
-+      __kunmap_atomic_type(KM_VSTACK1);
-+        __kmap_atomic(current->thread.stack_page0, KM_VSTACK0);
-+        __kmap_atomic(current->thread.stack_page1, KM_VSTACK1);
-+
-+#endif
-+      printk("current: %p\n", current);
-+      printk("current->thread_info: %p\n", current->thread_info);
-+      current->thread_info->real_stack = (void *)current->thread_info;
-+      current->thread_info->user_pgd = NULL;
-+      current->thread.esp0 = (unsigned long)current->thread_info->real_stack + THREAD_SIZE;
-+}
-+
-+
-+
-+void __init entry_trampoline_setup(void)
-+{
-+      /*
-+       * old IRQ entries set up by the boot code will still hang
-+       * around - they are a sign of hw trouble anyway, now they'll
-+       * produce a double fault message.
-+       */
-+      trap_init_virtual_GDT();
-+}
---- linux-2.6.0/arch/i386/kernel/head.S        2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/head.S 2003-12-28 23:26:36.000000000 -0800
-@@ -16,6 +16,7 @@
- #include <asm/pgtable.h>
- #include <asm/desc.h>
- #include <asm/cache.h>
-+#include <asm/asm_offsets.h>
- #define OLD_CL_MAGIC_ADDR     0x90020
- #define OLD_CL_MAGIC          0xA33F
-@@ -330,7 +331,7 @@ ENTRY(stack_start)
- /* This is the default interrupt "handler" :-) */
- int_msg:
--      .asciz "Unknown interrupt\n"
-+      .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
-       ALIGN
- ignore_int:
-       cld
-@@ -342,9 +343,17 @@ ignore_int:
-       movl $(__KERNEL_DS),%eax
-       movl %eax,%ds
-       movl %eax,%es
-+      pushl 16(%esp)
-+      pushl 24(%esp)
-+      pushl 32(%esp)
-+      pushl 40(%esp)
-       pushl $int_msg
-       call printk
-       popl %eax
-+      popl %eax
-+      popl %eax
-+      popl %eax
-+      popl %eax
-       popl %ds
-       popl %es
-       popl %edx
-@@ -377,23 +386,27 @@ cpu_gdt_descr:
-       .fill NR_CPUS-1,8,0             # space for the other GDT descriptors
- /*
-- * This is initialized to create an identity-mapping at 0-8M (for bootup
-- * purposes) and another mapping of the 0-8M area at virtual address
-+ * This is initialized to create an identity-mapping at 0-16M (for bootup
-+ * purposes) and another mapping of the 0-16M area at virtual address
-  * PAGE_OFFSET.
-  */
- .org 0x1000
- ENTRY(swapper_pg_dir)
-       .long 0x00102007
-       .long 0x00103007
--      .fill BOOT_USER_PGD_PTRS-2,4,0
--      /* default: 766 entries */
-+      .long 0x00104007
-+      .long 0x00105007
-+      .fill BOOT_USER_PGD_PTRS-4,4,0
-+      /* default: 764 entries */
-       .long 0x00102007
-       .long 0x00103007
--      /* default: 254 entries */
--      .fill BOOT_KERNEL_PGD_PTRS-2,4,0
-+      .long 0x00104007
-+      .long 0x00105007
-+      /* default: 252 entries */
-+      .fill BOOT_KERNEL_PGD_PTRS-4,4,0
- /*
-- * The page tables are initialized to only 8MB here - the final page
-+ * The page tables are initialized to only 16MB here - the final page
-  * tables are set up later depending on memory size.
-  */
- .org 0x2000
-@@ -402,15 +415,21 @@ ENTRY(pg0)
- .org 0x3000
- ENTRY(pg1)
-+.org 0x4000
-+ENTRY(pg2)
-+
-+.org 0x5000
-+ENTRY(pg3)
-+
- /*
-  * empty_zero_page must immediately follow the page tables ! (The
-  * initialization loop counts until empty_zero_page)
-  */
--.org 0x4000
-+.org 0x6000
- ENTRY(empty_zero_page)
--.org 0x5000
-+.org 0x7000
- /*
-  * Real beginning of normal "text" segment
-@@ -419,12 +438,12 @@ ENTRY(stext)
- ENTRY(_stext)
- /*
-- * This starts the data section. Note that the above is all
-- * in the text section because it has alignment requirements
-- * that we cannot fulfill any other way.
-+ * This starts the data section.
-  */
- .data
-+.align PAGE_SIZE_asm
-+
- /*
-  * The Global Descriptor Table contains 28 quadwords, per-CPU.
-  */
-@@ -439,7 +458,9 @@ ENTRY(boot_gdt_table)
-       .quad 0x00cf9a000000ffff        /* kernel 4GB code at 0x00000000 */
-       .quad 0x00cf92000000ffff        /* kernel 4GB data at 0x00000000 */
- #endif
--      .align L1_CACHE_BYTES
-+
-+.align PAGE_SIZE_asm
-+
- ENTRY(cpu_gdt_table)
-       .quad 0x0000000000000000        /* NULL descriptor */
-       .quad 0x0000000000000000        /* 0x0b reserved */
---- linux-2.6.0/arch/i386/kernel/i386_ksyms.c  2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/i386_ksyms.c   2003-12-28 23:26:36.000000000 -0800
-@@ -98,7 +98,6 @@ EXPORT_SYMBOL_NOVERS(__down_failed_inter
- EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
- EXPORT_SYMBOL_NOVERS(__up_wakeup);
- /* Networking helper routines. */
--EXPORT_SYMBOL(csum_partial_copy_generic);
- /* Delay loops */
- EXPORT_SYMBOL(__ndelay);
- EXPORT_SYMBOL(__udelay);
-@@ -112,13 +111,17 @@ EXPORT_SYMBOL_NOVERS(__get_user_4);
- EXPORT_SYMBOL(strpbrk);
- EXPORT_SYMBOL(strstr);
-+#if !defined(CONFIG_X86_UACCESS_INDIRECT)
- EXPORT_SYMBOL(strncpy_from_user);
--EXPORT_SYMBOL(__strncpy_from_user);
-+EXPORT_SYMBOL(__direct_strncpy_from_user);
- EXPORT_SYMBOL(clear_user);
- EXPORT_SYMBOL(__clear_user);
- EXPORT_SYMBOL(__copy_from_user_ll);
- EXPORT_SYMBOL(__copy_to_user_ll);
- EXPORT_SYMBOL(strnlen_user);
-+#else /* CONFIG_X86_UACCESS_INDIRECT */
-+EXPORT_SYMBOL(direct_csum_partial_copy_generic);
-+#endif
- EXPORT_SYMBOL(dma_alloc_coherent);
- EXPORT_SYMBOL(dma_free_coherent);
---- linux-2.6.0/arch/i386/kernel/i387.c        2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/i387.c 2003-12-28 23:26:36.000000000 -0800
-@@ -218,6 +218,7 @@ void set_fpu_mxcsr( struct task_struct *
- static int convert_fxsr_to_user( struct _fpstate __user *buf,
-                                       struct i387_fxsave_struct *fxsave )
- {
-+      struct _fpreg tmp[8]; /* 80 bytes scratch area */
-       unsigned long env[7];
-       struct _fpreg __user *to;
-       struct _fpxreg *from;
-@@ -234,23 +235,25 @@ static int convert_fxsr_to_user( struct 
-       if ( __copy_to_user( buf, env, 7 * sizeof(unsigned long) ) )
-               return 1;
--      to = &buf->_st[0];
-+      to = tmp;
-       from = (struct _fpxreg *) &fxsave->st_space[0];
-       for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
-               unsigned long *t = (unsigned long *)to;
-               unsigned long *f = (unsigned long *)from;
--              if (__put_user(*f, t) ||
--                              __put_user(*(f + 1), t + 1) ||
--                              __put_user(from->exponent, &to->exponent))
--                      return 1;
-+              *t = *f;
-+              *(t + 1) = *(f+1);
-+              to->exponent = from->exponent;
-       }
-+      if (copy_to_user(buf->_st, tmp, sizeof(struct _fpreg [8])))
-+              return 1;
-       return 0;
- }
- static int convert_fxsr_from_user( struct i387_fxsave_struct *fxsave,
-                                         struct _fpstate __user *buf )
- {
-+      struct _fpreg tmp[8]; /* 80 bytes scratch area */
-       unsigned long env[7];
-       struct _fpxreg *to;
-       struct _fpreg __user *from;
-@@ -258,6 +261,8 @@ static int convert_fxsr_from_user( struc
-       if ( __copy_from_user( env, buf, 7 * sizeof(long) ) )
-               return 1;
-+      if (copy_from_user(tmp, buf->_st, sizeof(struct _fpreg [8])))
-+              return 1;
-       fxsave->cwd = (unsigned short)(env[0] & 0xffff);
-       fxsave->swd = (unsigned short)(env[1] & 0xffff);
-@@ -269,15 +274,14 @@ static int convert_fxsr_from_user( struc
-       fxsave->fos = env[6];
-       to = (struct _fpxreg *) &fxsave->st_space[0];
--      from = &buf->_st[0];
-+      from = tmp;
-       for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
-               unsigned long *t = (unsigned long *)to;
-               unsigned long *f = (unsigned long *)from;
--              if (__get_user(*t, f) ||
--                              __get_user(*(t + 1), f + 1) ||
--                              __get_user(to->exponent, &from->exponent))
--                      return 1;
-+              *t = *f;
-+              *(t + 1) = *(f + 1);
-+              to->exponent = from->exponent;
-       }
-       return 0;
- }
---- linux-2.6.0/arch/i386/kernel/i8259.c       2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/i8259.c        2003-12-28 23:21:44.000000000 -0800
-@@ -419,8 +419,10 @@ void __init init_IRQ(void)
-        * us. (some of these will be overridden and become
-        * 'special' SMP interrupts)
-        */
--      for (i = 0; i < NR_IRQS; i++) {
-+      for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
-               int vector = FIRST_EXTERNAL_VECTOR + i;
-+              if (i >= NR_IRQS)
-+                      break;
-               if (vector != SYSCALL_VECTOR) 
-                       set_intr_gate(vector, interrupt[i]);
-       }
---- linux-2.6.0/arch/i386/kernel/init_task.c   2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/init_task.c    2003-12-28 23:26:36.000000000 -0800
-@@ -26,7 +26,7 @@ EXPORT_SYMBOL(init_mm);
-  */
- union thread_union init_thread_union 
-       __attribute__((__section__(".data.init_task"))) =
--              { INIT_THREAD_INFO(init_task) };
-+              { INIT_THREAD_INFO(init_task, init_thread_union) };
- /*
-  * Initial task structure.
-@@ -44,5 +44,5 @@ EXPORT_SYMBOL(init_task);
-  * section. Since TSS's are completely CPU-local, we want them
-  * on exact cacheline boundaries, to eliminate cacheline ping-pong.
-  */ 
--struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS };
-+struct tss_struct init_tss[NR_CPUS] __attribute__((__section__(".data.tss"))) = { [0 ... NR_CPUS-1] = INIT_TSS };
---- linux-2.6.0/arch/i386/kernel/io_apic.c     2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/io_apic.c      2003-12-28 23:21:44.000000000 -0800
-@@ -76,6 +76,14 @@ static struct irq_pin_list {
-       int apic, pin, next;
- } irq_2_pin[PIN_MAP_SIZE];
-+#ifdef CONFIG_PCI_USE_VECTOR
-+int vector_irq[NR_IRQS] = { [0 ... NR_IRQS -1] = -1};
-+#define vector_to_irq(vector)         \
-+      (platform_legacy_irq(vector) ? vector : vector_irq[vector])
-+#else
-+#define vector_to_irq(vector) (vector)
-+#endif
-+
- /*
-  * The common case is 1:1 IRQ<->pin mappings. Sometimes there are
-  * shared ISA-space IRQs, so we have to support them. We are super
-@@ -249,7 +257,7 @@ static void clear_IO_APIC (void)
-                       clear_IO_APIC_pin(apic, pin);
- }
--static void set_ioapic_affinity(unsigned int irq, cpumask_t cpumask)
-+static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
- {
-       unsigned long flags;
-       int pin;
-@@ -288,7 +296,7 @@ static void set_ioapic_affinity(unsigned
- extern cpumask_t irq_affinity[NR_IRQS];
--static cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS];
-+cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS];
- #define IRQBALANCE_CHECK_ARCH -999
- static int irqbalance_disabled = IRQBALANCE_CHECK_ARCH;
-@@ -670,13 +678,11 @@ static int __init irqbalance_disable(cha
- __setup("noirqbalance", irqbalance_disable);
--static void set_ioapic_affinity(unsigned int irq, cpumask_t mask);
--
- static inline void move_irq(int irq)
- {
-       /* note - we hold the desc->lock */
-       if (unlikely(!cpus_empty(pending_irq_balance_cpumask[irq]))) {
--              set_ioapic_affinity(irq, pending_irq_balance_cpumask[irq]);
-+              set_ioapic_affinity_irq(irq, pending_irq_balance_cpumask[irq]);
-               cpus_clear(pending_irq_balance_cpumask[irq]);
-       }
- }
-@@ -853,7 +859,7 @@ void __init setup_ioapic_dest(cpumask_t 
-                       if (irq_entry == -1)
-                               continue;
-                       irq = pin_2_irq(irq_entry, ioapic, pin);
--                      set_ioapic_affinity(irq, mask);
-+                      set_ioapic_affinity_irq(irq, mask);
-               }
-       }
-@@ -1141,7 +1147,8 @@ static inline int IO_APIC_irq_trigger(in
- /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
- u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
--static int __init assign_irq_vector(int irq)
-+#ifndef CONFIG_PCI_USE_VECTOR
-+int __init assign_irq_vector(int irq)
- {
-       static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
-       BUG_ON(irq >= NR_IRQ_VECTORS);
-@@ -1158,11 +1165,36 @@ next:
-       }
-       IO_APIC_VECTOR(irq) = current_vector;
-+
-       return current_vector;
- }
-+#endif
-+
-+static struct hw_interrupt_type ioapic_level_type;
-+static struct hw_interrupt_type ioapic_edge_type;
--static struct hw_interrupt_type ioapic_level_irq_type;
--static struct hw_interrupt_type ioapic_edge_irq_type;
-+#define IOAPIC_AUTO   -1
-+#define IOAPIC_EDGE   0
-+#define IOAPIC_LEVEL  1
-+
-+static inline void ioapic_register_intr(int irq, int vector, unsigned long trigger)
-+{
-+      if (use_pci_vector() && !platform_legacy_irq(irq)) {
-+              if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
-+                              trigger == IOAPIC_LEVEL)
-+                      irq_desc[vector].handler = &ioapic_level_type;
-+              else
-+                      irq_desc[vector].handler = &ioapic_edge_type;
-+              set_intr_gate(vector, interrupt[vector]);
-+      } else  {
-+              if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
-+                              trigger == IOAPIC_LEVEL)
-+                      irq_desc[irq].handler = &ioapic_level_type;
-+              else
-+                      irq_desc[irq].handler = &ioapic_edge_type;
-+              set_intr_gate(vector, interrupt[irq]);
-+      }
-+}
- void __init setup_IO_APIC_irqs(void)
- {
-@@ -1220,13 +1252,7 @@ void __init setup_IO_APIC_irqs(void)
-               if (IO_APIC_IRQ(irq)) {
-                       vector = assign_irq_vector(irq);
-                       entry.vector = vector;
--
--                      if (IO_APIC_irq_trigger(irq))
--                              irq_desc[irq].handler = &ioapic_level_irq_type;
--                      else
--                              irq_desc[irq].handler = &ioapic_edge_irq_type;
--
--                      set_intr_gate(vector, interrupt[irq]);
-+                      ioapic_register_intr(irq, vector, IOAPIC_AUTO);
-               
-                       if (!apic && (irq < 16))
-                               disable_8259A_irq(irq);
-@@ -1273,7 +1299,7 @@ void __init setup_ExtINT_IRQ0_pin(unsign
-        * The timer IRQ doesn't have to know that behind the
-        * scene we have a 8259A-master in AEOI mode ...
-        */
--      irq_desc[0].handler = &ioapic_edge_irq_type;
-+      irq_desc[0].handler = &ioapic_edge_type;
-       /*
-        * Add it to the IO-APIC irq-routing table:
-@@ -1624,10 +1650,6 @@ static void __init setup_ioapic_ids_from
-       unsigned char old_id;
-       unsigned long flags;
--      if (acpi_ioapic)
--              /* This gets done during IOAPIC enumeration for ACPI. */
--              return;
--
-       /*
-        * This is broken; anything with a real cpu count has to
-        * circumvent this idiocy regardless.
-@@ -1763,9 +1785,6 @@ static int __init timer_irq_works(void)
-  * that was delayed but this is now handled in the device
-  * independent code.
-  */
--#define enable_edge_ioapic_irq unmask_IO_APIC_irq
--
--static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }
- /*
-  * Starting up a edge-triggered IO-APIC interrupt is
-@@ -1776,7 +1795,6 @@ static void disable_edge_ioapic_irq (uns
-  * This is not complete - we should be able to fake
-  * an edge even if it isn't on the 8259A...
-  */
--
- static unsigned int startup_edge_ioapic_irq(unsigned int irq)
- {
-       int was_pending = 0;
-@@ -1794,8 +1812,6 @@ static unsigned int startup_edge_ioapic_
-       return was_pending;
- }
--#define shutdown_edge_ioapic_irq      disable_edge_ioapic_irq
--
- /*
-  * Once we have recorded IRQ_PENDING already, we can mask the
-  * interrupt for real. This prevents IRQ storms from unhandled
-@@ -1810,9 +1826,6 @@ static void ack_edge_ioapic_irq(unsigned
-       ack_APIC_irq();
- }
--static void end_edge_ioapic_irq (unsigned int i) { /* nothing */ }
--
--
- /*
-  * Level triggered interrupts can just be masked,
-  * and shutting down and starting up the interrupt
-@@ -1834,10 +1847,6 @@ static unsigned int startup_level_ioapic
-       return 0; /* don't check for pending */
- }
--#define shutdown_level_ioapic_irq     mask_IO_APIC_irq
--#define enable_level_ioapic_irq               unmask_IO_APIC_irq
--#define disable_level_ioapic_irq      mask_IO_APIC_irq
--
- static void end_level_ioapic_irq (unsigned int irq)
- {
-       unsigned long v;
-@@ -1864,6 +1873,7 @@ static void end_level_ioapic_irq (unsign
-  * The idea is from Manfred Spraul.  --macro
-  */
-       i = IO_APIC_VECTOR(irq);
-+
-       v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
-       ack_APIC_irq();
-@@ -1898,7 +1908,57 @@ static void end_level_ioapic_irq (unsign
-       }
- }
--static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ }
-+#ifdef CONFIG_PCI_USE_VECTOR
-+static unsigned int startup_edge_ioapic_vector(unsigned int vector)
-+{
-+      int irq = vector_to_irq(vector);
-+
-+      return startup_edge_ioapic_irq(irq);
-+}
-+
-+static void ack_edge_ioapic_vector(unsigned int vector)
-+{
-+      int irq = vector_to_irq(vector);
-+
-+      ack_edge_ioapic_irq(irq);
-+}
-+
-+static unsigned int startup_level_ioapic_vector (unsigned int vector)
-+{
-+      int irq = vector_to_irq(vector);
-+
-+      return startup_level_ioapic_irq (irq);
-+}
-+
-+static void end_level_ioapic_vector (unsigned int vector)
-+{
-+      int irq = vector_to_irq(vector);
-+
-+      end_level_ioapic_irq(irq);
-+}
-+
-+static void mask_IO_APIC_vector (unsigned int vector)
-+{
-+      int irq = vector_to_irq(vector);
-+
-+      mask_IO_APIC_irq(irq);
-+}
-+
-+static void unmask_IO_APIC_vector (unsigned int vector)
-+{
-+      int irq = vector_to_irq(vector);
-+
-+      unmask_IO_APIC_irq(irq);
-+}
-+
-+static void set_ioapic_affinity_vector (unsigned int vector,
-+                                      cpumask_t cpu_mask)
-+{
-+      int irq = vector_to_irq(vector);
-+
-+      set_ioapic_affinity_irq(irq, cpu_mask);
-+}
-+#endif
- /*
-  * Level and edge triggered IO-APIC interrupts need different handling,
-@@ -1908,26 +1968,25 @@ static void mask_and_ack_level_ioapic_ir
-  * edge-triggered handler, without risking IRQ storms and other ugly
-  * races.
-  */
--
--static struct hw_interrupt_type ioapic_edge_irq_type = {
-+static struct hw_interrupt_type ioapic_edge_type = {
-       .typename       = "IO-APIC-edge",
--      .startup        = startup_edge_ioapic_irq,
--      .shutdown       = shutdown_edge_ioapic_irq,
--      .enable         = enable_edge_ioapic_irq,
--      .disable        = disable_edge_ioapic_irq,
--      .ack            = ack_edge_ioapic_irq,
--      .end            = end_edge_ioapic_irq,
-+      .startup        = startup_edge_ioapic,
-+      .shutdown       = shutdown_edge_ioapic,
-+      .enable         = enable_edge_ioapic,
-+      .disable        = disable_edge_ioapic,
-+      .ack            = ack_edge_ioapic,
-+      .end            = end_edge_ioapic,
-       .set_affinity   = set_ioapic_affinity,
- };
--static struct hw_interrupt_type ioapic_level_irq_type = {
-+static struct hw_interrupt_type ioapic_level_type = {
-       .typename       = "IO-APIC-level",
--      .startup        = startup_level_ioapic_irq,
--      .shutdown       = shutdown_level_ioapic_irq,
--      .enable         = enable_level_ioapic_irq,
--      .disable        = disable_level_ioapic_irq,
--      .ack            = mask_and_ack_level_ioapic_irq,
--      .end            = end_level_ioapic_irq,
-+      .startup        = startup_level_ioapic,
-+      .shutdown       = shutdown_level_ioapic,
-+      .enable         = enable_level_ioapic,
-+      .disable        = disable_level_ioapic,
-+      .ack            = mask_and_ack_level_ioapic,
-+      .end            = end_level_ioapic,
-       .set_affinity   = set_ioapic_affinity,
- };
-@@ -1947,7 +2006,13 @@ static inline void init_IO_APIC_traps(vo
-        * 0x80, because int 0x80 is hm, kind of importantish. ;)
-        */
-       for (irq = 0; irq < NR_IRQS ; irq++) {
--              if (IO_APIC_IRQ(irq) && !IO_APIC_VECTOR(irq)) {
-+              int tmp = irq;
-+              if (use_pci_vector()) {
-+                      if (!platform_legacy_irq(tmp))
-+                              if ((tmp = vector_to_irq(tmp)) == -1)
-+                                      continue;
-+              }
-+              if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) {
-                       /*
-                        * Hmm.. We don't have an entry for this,
-                        * so default to an old-fashioned 8259
-@@ -2217,12 +2282,14 @@ void __init setup_IO_APIC(void)
-       /*
-        * Set up IO-APIC IRQ routing.
-        */
--      setup_ioapic_ids_from_mpc();
-+      if (!acpi_ioapic)
-+              setup_ioapic_ids_from_mpc();
-       sync_Arb_IDs();
-       setup_IO_APIC_irqs();
-       init_IO_APIC_traps();
-       check_timer();
--      print_IO_APIC();
-+      if (!acpi_ioapic)
-+              print_IO_APIC();
- }
- /*
-@@ -2379,10 +2446,12 @@ int io_apic_set_pci_routing (int ioapic,
-               "IRQ %d Mode:%i Active:%i)\n", ioapic, 
-               mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low);
-+      if (use_pci_vector() && !platform_legacy_irq(irq))
-+              irq = IO_APIC_VECTOR(irq);
-       if (edge_level) {
--      irq_desc[irq].handler = &ioapic_level_irq_type;
-+              irq_desc[irq].handler = &ioapic_level_type;
-       } else {
--              irq_desc[irq].handler = &ioapic_edge_irq_type;
-+              irq_desc[irq].handler = &ioapic_edge_type;
-       }
-       set_intr_gate(entry.vector, interrupt[irq]);
---- linux-2.6.0/arch/i386/kernel/irq.c 2003-11-09 16:45:04.000000000 -0800
-+++ 25/arch/i386/kernel/irq.c  2003-12-28 23:22:10.000000000 -0800
-@@ -138,17 +138,19 @@ atomic_t irq_mis_count;
- int show_interrupts(struct seq_file *p, void *v)
- {
--      int i, j;
-+      int i = *(loff_t *) v, j;
-       struct irqaction * action;
-       unsigned long flags;
--      seq_printf(p, "           ");
--      for (j=0; j<NR_CPUS; j++)
--              if (cpu_online(j))
--                      seq_printf(p, "CPU%d       ",j);
--      seq_putc(p, '\n');
-+      if (i == 0) {
-+              seq_printf(p, "           ");
-+              for (j=0; j<NR_CPUS; j++)
-+                      if (cpu_online(j))
-+                              seq_printf(p, "CPU%d       ",j);
-+              seq_putc(p, '\n');
-+      }
--      for (i = 0 ; i < NR_IRQS ; i++) {
-+      if (i < NR_IRQS) {
-               spin_lock_irqsave(&irq_desc[i].lock, flags);
-               action = irq_desc[i].action;
-               if (!action) 
-@@ -170,28 +172,32 @@ int show_interrupts(struct seq_file *p, 
-               seq_putc(p, '\n');
- skip:
-               spin_unlock_irqrestore(&irq_desc[i].lock, flags);
--      }
--      seq_printf(p, "NMI: ");
--      for (j = 0; j < NR_CPUS; j++)
--              if (cpu_online(j))
--                      seq_printf(p, "%10u ", nmi_count(j));
--      seq_putc(p, '\n');
-+      } else if (i == NR_IRQS) {
-+              seq_printf(p, "NMI: ");
-+              for (j = 0; j < NR_CPUS; j++)
-+                      if (cpu_online(j))
-+                              seq_printf(p, "%10u ", nmi_count(j));
-+              seq_putc(p, '\n');
- #ifdef CONFIG_X86_LOCAL_APIC
--      seq_printf(p, "LOC: ");
--      for (j = 0; j < NR_CPUS; j++)
--              if (cpu_online(j))
--                      seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs);
--      seq_putc(p, '\n');
-+              seq_printf(p, "LOC: ");
-+              for (j = 0; j < NR_CPUS; j++)
-+                      if (cpu_online(j))
-+                              seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs);
-+              seq_putc(p, '\n');
- #endif
--      seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
-+              seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
- #ifdef CONFIG_X86_IO_APIC
- #ifdef APIC_MISMATCH_DEBUG
--      seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
-+              seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
- #endif
- #endif
-+      }
-       return 0;
- }
-+
-+
-+
- #ifdef CONFIG_SMP
- inline void synchronize_irq(unsigned int irq)
- {
-@@ -502,6 +508,8 @@ out:
-       irq_exit();
-+      kgdb_process_breakpoint();
-+
-       return 1;
- }
-@@ -898,48 +906,6 @@ int setup_irq(unsigned int irq, struct i
- static struct proc_dir_entry * root_irq_dir;
- static struct proc_dir_entry * irq_dir [NR_IRQS];
--#define HEX_DIGITS (2*sizeof(cpumask_t))
--
--static unsigned int parse_hex_value(const char __user *buffer,
--              unsigned long count, cpumask_t *ret)
--{
--      unsigned char hexnum[HEX_DIGITS];
--      cpumask_t value = CPU_MASK_NONE;
--      int i;
--
--      if (!count)
--              return -EINVAL;
--      if (count > HEX_DIGITS)
--              count = HEX_DIGITS;
--      if (copy_from_user(hexnum, buffer, count))
--              return -EFAULT;
--
--      /*
--       * Parse the first HEX_DIGITS characters as a hex string, any non-hex char
--       * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
--       */
--
--      for (i = 0; i < count; i++) {
--              unsigned int c = hexnum[i];
--              int k;
--
--              switch (c) {
--                      case '0' ... '9': c -= '0'; break;
--                      case 'a' ... 'f': c -= 'a'-10; break;
--                      case 'A' ... 'F': c -= 'A'-10; break;
--              default:
--                      goto out;
--              }
--              cpus_shift_left(value, value, 4);
--              for (k = 0; k < 4; ++k)
--                      if (test_bit(k, (unsigned long *)&c))
--                              cpu_set(k, value);
--      }
--out:
--      *ret = value;
--      return 0;
--}
--
- #ifdef CONFIG_SMP
- static struct proc_dir_entry *smp_affinity_entry[NR_IRQS];
-@@ -949,20 +915,10 @@ cpumask_t irq_affinity[NR_IRQS] = { [0 .
- static int irq_affinity_read_proc(char *page, char **start, off_t off,
-                       int count, int *eof, void *data)
- {
--      int k, len;
--      cpumask_t tmp = irq_affinity[(long)data];
--
--      if (count < HEX_DIGITS+1)
-+      int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
-+      if (count - len < 2)
-               return -EINVAL;
--
--      len = 0;
--      for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
--              int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
--              len += j;
--              page += j;
--              cpus_shift_right(tmp, tmp, 16);
--      }
--      len += sprintf(page, "\n");
-+      len += sprintf(page + len, "\n");
-       return len;
- }
-@@ -975,7 +931,7 @@ static int irq_affinity_write_proc(struc
-       if (!irq_desc[irq].handler->set_affinity)
-               return -EIO;
--      err = parse_hex_value(buffer, count, &new_value);
-+      err = cpumask_parse(buffer, count, new_value);
-       if (err)
-               return err;
-@@ -1000,10 +956,11 @@ static int irq_affinity_write_proc(struc
- static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
-                       int count, int *eof, void *data)
- {
--      unsigned long *mask = (unsigned long *) data;
--      if (count < HEX_DIGITS+1)
-+      int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
-+      if (count - len < 2)
-               return -EINVAL;
--      return sprintf (page, "%08lx\n", *mask);
-+      len += sprintf(page + len, "\n");
-+      return len;
- }
- static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer,
-@@ -1013,7 +970,7 @@ static int prof_cpu_mask_write_proc (str
-       unsigned long full_count = count, err;
-       cpumask_t new_value;
--      err = parse_hex_value(buffer, count, &new_value);
-+      err = cpumask_parse(buffer, count, new_value);
-       if (err)
-               return err;
---- /dev/null  2002-08-30 16:31:37.000000000 -0700
-+++ 25/arch/i386/kernel/kgdb_stub.c    2003-12-28 23:21:09.000000000 -0800
-@@ -0,0 +1,2457 @@
-+/*
-+ *
-+ * 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, 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.
-+ *
-+ */
-+
-+/*
-+ * Copyright (c) 2000 VERITAS Software Corporation.
-+ *
-+ */
-+/****************************************************************************
-+ *  Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
-+ *
-+ *  Module name: remcom.c $
-+ *  Revision: 1.34 $
-+ *  Date: 91/03/09 12:29:49 $
-+ *  Contributor:     Lake Stevens Instrument Division$
-+ *
-+ *  Description:     low level support for gdb debugger. $
-+ *
-+ *  Considerations:  only works on target hardware $
-+ *
-+ *  Written by:            Glenn Engel $
-+ *  Updated by:            David Grothe <dave@gcom.com>
-+ *  Updated by:            Robert Walsh <rjwalsh@durables.org>
-+ *  Updated by:            wangdi <wangdi@clusterfs.com>
-+ *  ModuleState:     Experimental $
-+ *
-+ *  NOTES:         See Below $
-+ *
-+ *  Modified for 386 by Jim Kingdon, Cygnus Support.
-+ *  Compatibility with 2.1.xx kernel by David Grothe <dave@gcom.com>
-+ *
-+ *  Changes to allow auto initilization.  All that is needed is that it
-+ *  be linked with the kernel and a break point (int 3) be executed.
-+ *  The header file <asm/kgdb.h> defines BREAKPOINT to allow one to do
-+ *  this. It should also be possible, once the interrupt system is up, to
-+ *  call putDebugChar("+").  Once this is done, the remote debugger should
-+ *  get our attention by sending a ^C in a packet. George Anzinger
-+ *  <george@mvista.com>
-+ *  Integrated into 2.2.5 kernel by Tigran Aivazian <tigran@sco.com>
-+ *  Added thread support, support for multiple processors,
-+ *    support for ia-32(x86) hardware debugging.
-+ *    Amit S. Kale ( akale@veritas.com )
-+ *
-+ *  Modified to support debugging over ethernet by Robert Walsh
-+ *  <rjwalsh@durables.org> and wangdi <wangdi@clusterfs.com>, based on
-+ *  code by San Mehat.
-+ *
-+ *
-+ *  To enable debugger support, two things need to happen.  One, a
-+ *  call to set_debug_traps() is necessary in order to allow any breakpoints
-+ *  or error conditions to be properly intercepted and reported to gdb.
-+ *  Two, a breakpoint needs to be generated to begin communication.  This
-+ *  is most easily accomplished by a call to breakpoint().  Breakpoint()
-+ *  simulates a breakpoint by executing an int 3.
-+ *
-+ *************
-+ *
-+ *    The following gdb commands are supported:
-+ *
-+ * command        function                               Return value
-+ *
-+ *    g                   return the value of the CPU registers  hex data or ENN
-+ *    G                   set the value of the CPU registers     OK or ENN
-+ *
-+ *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA    hex data or ENN
-+ *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA    OK or ENN
-+ *
-+ *    c                   Resume at current address              SNN   ( signal NN)
-+ *    cAA..AA     Continue at address AA..AA             SNN
-+ *
-+ *    s                   Step one instruction                   SNN
-+ *    sAA..AA     Step one instruction from AA..AA       SNN
-+ *
-+ *    k                   kill
-+ *
-+ *    ?                   What was the last sigval ?             SNN   (signal NN)
-+ *
-+ * All commands and responses are sent with a packet which includes a
-+ * checksum.  A packet consists of
-+ *
-+ * $<packet info>#<checksum>.
-+ *
-+ * where
-+ * <packet info> :: <characters representing the command or response>
-+ * <checksum>  :: < two hex digits computed as modulo 256 sum of <packetinfo>>
-+ *
-+ * When a packet is received, it is first acknowledged with either '+' or '-'.
-+ * '+' indicates a successful transfer.        '-' indicates a failed transfer.
-+ *
-+ * Example:
-+ *
-+ * Host:                Reply:
-+ * $m0,10#2a             +$00010203040506070809101112131415#42
-+ *
-+ ****************************************************************************/
-+#define KGDB_VERSION "<20030915.1651.33>"
-+#include <linux/config.h>
-+#include <linux/types.h>
-+#include <asm/string.h>               /* for strcpy */
-+#include <linux/kernel.h>
-+#include <linux/sched.h>
-+#include <asm/vm86.h>
-+#include <asm/system.h>
-+#include <asm/ptrace.h>               /* for linux pt_regs struct */
-+#include <asm/kgdb_local.h>
-+#include <linux/list.h>
-+#include <asm/atomic.h>
-+#include <asm/processor.h>
-+#include <linux/irq.h>
-+#include <asm/desc.h>
-+#include <linux/inet.h>
-+#include <linux/netpoll.h>
-+
-+/************************************************************************
-+ *
-+ * external low-level support routines
-+ */
-+typedef void (*Function) (void);      /* pointer to a function */
-+
-+/* Thread reference */
-+typedef unsigned char threadref[8];
-+
-+extern int tty_putDebugChar(int);     /* write a single character      */
-+extern int tty_getDebugChar(void);    /* read and return a single char */
-+extern void tty_flushDebugChar(void); /* flush pending characters      */
-+extern int eth_putDebugChar(int);     /* write a single character      */
-+extern int eth_getDebugChar(void);    /* read and return a single char */
-+extern void eth_flushDebugChar(void); /* flush pending characters      */
-+
-+/************************************************************************/
-+/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
-+/* at least NUMREGBYTES*2 are needed for register packets */
-+/* Longer buffer is needed to list all threads */
-+#define BUFMAX 400
-+
-+char *kgdb_version = KGDB_VERSION;
-+
-+/*  debug >  0 prints ill-formed commands in valid packets & checksum errors */
-+int debug_regs = 0;           /* set to non-zero to print registers */
-+
-+/* filled in by an external module */
-+char *gdb_module_offsets;
-+
-+static const char hexchars[] = "0123456789abcdef";
-+
-+/* Number of bytes of registers.  */
-+#define NUMREGBYTES 64
-+/*
-+ * Note that this register image is in a different order than
-+ * the register image that Linux produces at interrupt time.
-+ *
-+ * Linux's register image is defined by struct pt_regs in ptrace.h.
-+ * Just why GDB uses a different order is a historical mystery.
-+ */
-+enum regnames { _EAX,         /* 0 */
-+      _ECX,                   /* 1 */
-+      _EDX,                   /* 2 */
-+      _EBX,                   /* 3 */
-+      _ESP,                   /* 4 */
-+      _EBP,                   /* 5 */
-+      _ESI,                   /* 6 */
-+      _EDI,                   /* 7 */
-+      _PC /* 8 also known as eip */ ,
-+      _PS /* 9 also known as eflags */ ,
-+      _CS,                    /* 10 */
-+      _SS,                    /* 11 */
-+      _DS,                    /* 12 */
-+      _ES,                    /* 13 */
-+      _FS,                    /* 14 */
-+      _GS                     /* 15 */
-+};
-+
-+/***************************  ASSEMBLY CODE MACROS *************************/
-+/*
-+ * Put the error code here just in case the user cares.
-+ * Likewise, the vector number here (since GDB only gets the signal
-+ * number through the usual means, and that's not very specific).
-+ * The called_from is the return address so he can tell how we entered kgdb.
-+ * This will allow him to seperate out the various possible entries.
-+ */
-+#define REMOTE_DEBUG 0                /* set != to turn on printing (also available in info) */
-+
-+#define PID_MAX PID_MAX_DEFAULT
-+
-+#ifdef CONFIG_SMP
-+void smp_send_nmi_allbutself(void);
-+#define IF_SMP(x) x
-+#undef MAX_NO_CPUS
-+#ifndef CONFIG_NO_KGDB_CPUS
-+#define CONFIG_NO_KGDB_CPUS 2
-+#endif
-+#if CONFIG_NO_KGDB_CPUS > NR_CPUS
-+#define MAX_NO_CPUS NR_CPUS
-+#else
-+#define MAX_NO_CPUS CONFIG_NO_KGDB_CPUS
-+#endif
-+#define hold_init hold_on_sstep: 1,
-+#define MAX_CPU_MASK (unsigned long)((1LL << MAX_NO_CPUS) - 1LL)
-+#define NUM_CPUS num_online_cpus()
-+#else
-+#define IF_SMP(x)
-+#define hold_init
-+#undef MAX_NO_CPUS
-+#define MAX_NO_CPUS 1
-+#define NUM_CPUS 1
-+#endif
-+#define NOCPU (struct task_struct *)0xbad1fbad
-+/* *INDENT-OFF*        */
-+struct kgdb_info {
-+      int used_malloc;
-+      void *called_from;
-+      long long entry_tsc;
-+      int errcode;
-+      int vector;
-+      int print_debug_info;
-+#ifdef CONFIG_SMP
-+      int hold_on_sstep;
-+      struct {
-+              volatile struct task_struct *task;
-+              int pid;
-+              int hold;
-+              struct pt_regs *regs;
-+      } cpus_waiting[MAX_NO_CPUS];
-+#endif
-+} kgdb_info = {hold_init print_debug_info:REMOTE_DEBUG, vector:-1};
-+
-+/* *INDENT-ON*        */
-+
-+#define used_m kgdb_info.used_malloc
-+/*
-+ * This is little area we set aside to contain the stack we
-+ * need to build to allow gdb to call functions.  We use one
-+ * per cpu to avoid locking issues.  We will do all this work
-+ * with interrupts off so that should take care of the protection
-+ * issues.
-+ */
-+#define LOOKASIDE_SIZE 200    /* should be more than enough */
-+#define MALLOC_MAX   200      /* Max malloc size */
-+struct {
-+      unsigned int esp;
-+      int array[LOOKASIDE_SIZE];
-+} fn_call_lookaside[MAX_NO_CPUS];
-+
-+static int trap_cpu;
-+static unsigned int OLD_esp;
-+
-+#define END_OF_LOOKASIDE  &fn_call_lookaside[trap_cpu].array[LOOKASIDE_SIZE]
-+#define IF_BIT 0x200
-+#define TF_BIT 0x100
-+
-+#define MALLOC_ROUND 8-1
-+
-+static char malloc_array[MALLOC_MAX];
-+IF_SMP(static void to_gdb(const char *mess));
-+void *
-+malloc(int size)
-+{
-+
-+      if (size <= (MALLOC_MAX - used_m)) {
-+              int old_used = used_m;
-+              used_m += ((size + MALLOC_ROUND) & (~MALLOC_ROUND));
-+              return &malloc_array[old_used];
-+      } else {
-+              return NULL;
-+      }
-+}
-+
-+/*
-+ * I/O dispatch functions...
-+ * Based upon kgdboe, either call the ethernet
-+ * handler or the serial one..
-+ */
-+void
-+putDebugChar(int c)
-+{
-+      if (!kgdboe) {
-+              tty_putDebugChar(c);
-+      } else {
-+              eth_putDebugChar(c);
-+      }
-+}
-+
-+int
-+getDebugChar(void)
-+{
-+      if (!kgdboe) {
-+              return tty_getDebugChar();
-+      } else {
-+              return eth_getDebugChar();
-+      }
-+}
-+
-+void
-+flushDebugChar(void)
-+{
-+      if (!kgdboe) {
-+              tty_flushDebugChar();
-+      } else {
-+              eth_flushDebugChar();
-+      }
-+}
-+
-+/*