linux-26-progress-20040412
authorChas Williams <chas@cmf.nrl.navy.mil>
Mon, 12 Apr 2004 20:42:19 +0000 (20:42 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 12 Apr 2004 20:42:19 +0000 (20:42 +0000)
FIXES 4027

if you complain about any of it, you better include a patch, or risk being
severely flamed. very much a work in progress

23 files changed:
acinclude.m4
src/afs/LINUX/osi_alloc.c
src/afs/LINUX/osi_cred.c
src/afs/LINUX/osi_file.c
src/afs/LINUX/osi_groups.c
src/afs/LINUX/osi_machdep.h
src/afs/LINUX/osi_misc.c
src/afs/LINUX/osi_module.c
src/afs/LINUX/osi_vfs.hin
src/afs/LINUX/osi_vfsops.c
src/afs/LINUX/osi_vm.c
src/afs/LINUX/osi_vnodeops.c
src/afs/afs_call.c
src/afs/afs_osi.c
src/afs/afs_vcache.c
src/afs/sysincludes.h
src/afsd/afs.rc.linux
src/cf/linux-test1.m4
src/cf/linux-test2.m4
src/cf/linux-test4.m4
src/config/afs_sysnames.h
src/config/param.i386_linux26.h [new file with mode: 0644]
src/libafs/MakefileProto.LINUX.in

index b097ad9..937657b 100644 (file)
@@ -151,6 +151,8 @@ case $system in
                   AC_MSG_WARN(No usable linux headers found at $LINUX_KERNEL_PATH so disabling kernel module)
                  fi
                 fi
+                 dnl do we need to determine SUBARCH from autoconf.h
+                 SUBARCH=default
                fi
                AC_MSG_RESULT(linux)
                if test "x$enable_kernel_module" = "xyes"; then
index 1c0525f..8a8bc7a 100644 (file)
@@ -194,20 +194,6 @@ hash_verify(size_t index, unsigned key, void *data)
     int memtype;
 
     memtype = MEMTYPE(lmp->chunk);
-#if defined(AFS_SPARC64_LINUX24_ENV) || defined(AFS_I386_UMLINUX20_ENV)
-    if ((memtype == KM_TYPE) && (!VALID_PAGE(virt_to_page(lmp->chunk)))) {
-       printf
-           ("osi_linux_verify_alloced_memory: address 0x%x outside range, index=%d, key=%d\n",
-            lmp->chunk, index, key);
-    }
-#else
-    if ((memtype == KM_TYPE) && (AFS_LINUX_MAP_NR(lmp->chunk) > max_mapnr)) {
-       printf
-           ("osi_linux_verify_alloced_memory: address 0x%x outside range, index=%d, key=%d\n",
-            lmp->chunk, index, key);
-    }
-#endif
-
     if (memtype != KM_TYPE && memtype != VM_TYPE) {
        printf
            ("osi_linux_verify_alloced_memory: unknown type %d at 0x%x, index=%d\n",
index cfa0fac..12a9586 100644 (file)
@@ -101,8 +101,18 @@ crref(void)
     cr->cr_ruid = current->uid;
     cr->cr_gid = current->fsgid;
     cr->cr_rgid = current->gid;
+#if defined(AFS_LINUX26_ENV)
+{
+    int i;
+
+    for(i = 0; i < current->group_info->ngroups && i < NGROUPS; ++i)
+        cr->cr_groups[i] = GROUP_AT(current->group_info, i);
+    cr->cr_ngroups = current->group_info->ngroups;
+}
+#else
     memcpy(cr->cr_groups, current->groups, NGROUPS * sizeof(gid_t));
     cr->cr_ngroups = current->ngroups;
+#endif
     return cr;
 }
 
@@ -115,6 +125,19 @@ crset(cred_t * cr)
     current->uid = cr->cr_ruid;
     current->fsgid = cr->cr_gid;
     current->gid = cr->cr_rgid;
+#if defined(AFS_LINUX26_ENV)
+{
+    struct group_info *new_info;
+    int i;
+
+    new_info = groups_alloc(cr->cr_ngroups);
+    for(i = 0; i < cr->cr_ngroups; ++i)
+       GROUP_AT(new_info, i) = cr->cr_groups[i];
+    set_current_groups(new_info);
+    put_group_info(new_info);
+}
+#else
     memcpy(current->groups, cr->cr_groups, NGROUPS * sizeof(gid_t));
     current->ngroups = cr->cr_ngroups;
+#endif
 }
index 7b7af1d..97302e6 100644 (file)
@@ -17,6 +17,7 @@ RCSID
 #include "afsincludes.h"       /* Afs-based standard headers */
 #include "afs/afs_stats.h"     /* afs statistics */
 #include "h/smp_lock.h"
+#include "h/module.h"
 
 
 int afs_osicred_initialized = 0;
@@ -60,6 +61,9 @@ osi_UFSOpen(afs_int32 ainode)
     FILE_INODE(filp) = tip;
     tip->i_flags |= MS_NOATIME;        /* Disable updating access times. */
     filp->f_flags = O_RDWR;
+#if defined(AFS_LINUX26_ENV)
+    filp->f_mapping = tip->i_mapping;
+#endif
 #if defined(AFS_LINUX24_ENV)
     filp->f_op = fops_get(tip->i_fop);
 #else
@@ -85,8 +89,13 @@ afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
     MObtainWriteLock(&afs_xosi, 320);
     astat->size = FILE_INODE(&afile->file)->i_size;
     astat->blksize = FILE_INODE(&afile->file)->i_blksize;
+#if defined(AFS_LINUX26_ENV)
+    astat->mtime = FILE_INODE(&afile->file)->i_mtime.tv_sec;
+    astat->atime = FILE_INODE(&afile->file)->i_atime.tv_sec;
+#else
     astat->mtime = FILE_INODE(&afile->file)->i_mtime;
     astat->atime = FILE_INODE(&afile->file)->i_atime;
+#endif
     code = 0;
     MReleaseWriteLock(&afs_xosi);
     return code;
index 1ca3057..1d6b679 100644 (file)
@@ -36,19 +36,28 @@ static int afs_setgroups(cred_t ** cr, int ngroups, gid_t * gidset,
 int
 set_pag_in_parent(int pag, int g0, int g1)
 {
-#ifdef STRUCT_TASK_STRUCT_HAS_PARENT
-    gid_t *gp = current->parent->groups;
-#else
-    gid_t *gp = current->p_pptr->groups;
-#endif
-    int ngroups;
     int i;
+#if defined(AFS_LINUX26_ENV)
+    struct group_info *old_info, *new_info;
+
+    old_info = current->parent->group_info;
+    new_info = groups_alloc(old_info->ngroups + 2);
 
+    for(i = 0; i < old_info->ngroups; ++i)
+       GROUP_AT(new_info, i) = GROUP_AT(old_info, i);
 
+    GROUP_AT(new_info, i++) = g0;
+    GROUP_AT(new_info, i++) = g1;
+
+    current->parent->group_info = new_info;
+    put_group_info(old_info);
+#else
 #ifdef STRUCT_TASK_STRUCT_HAS_PARENT
-    ngroups = current->parent->ngroups;
+    gid_t *gp = current->parent->groups;
+    int ngroups = current->parent->ngroups;
 #else
-    ngroups = current->p_pptr->ngroups;
+    gid_t *gp = current->p_pptr->groups;
+    int ngroups = current->p_pptr->ngroups;
 #endif
 
     if ((ngroups < 2) || (afs_get_pag_from_groups(gp[0], gp[1]) == NOPAG)) {
@@ -71,6 +80,7 @@ set_pag_in_parent(int pag, int g0, int g1)
 #else
     current->p_pptr->ngroups = ngroups;
 #endif
+#endif
     return 0;
 }
 
index 5485f3e..e740c5c 100644 (file)
@@ -61,7 +61,7 @@
 #define osi_AllocSmall afs_osi_Alloc
 #define osi_FreeSmall afs_osi_Free
 
-#define afs_suser suser
+#define afs_suser(x) capable(CAP_SYS_ADMIN)
 #define wakeup afs_osi_Wakeup
 
 #undef vType
@@ -105,6 +105,9 @@ extern struct vnodeops afs_file_iops, afs_dir_iops, afs_symlink_iops;
 
 
 #define PAGESIZE PAGE_SIZE
+#ifndef NGROUPS
+#define NGROUPS NGROUPS_MAX
+#endif
 
 /* cred struct */
 typedef struct cred {          /* maps to task field: */
@@ -153,9 +156,7 @@ typedef struct uio {
  */
 extern unsigned long afs_linux_page_offset;
 
-/* some more functions to help with the page offset stuff */
-#define AFS_LINUX_MAP_NR(addr) ((((unsigned long)addr) - afs_linux_page_offset)  >> PAGE_SHIFT)
-
+/* function to help with the page offset stuff */
 #define afs_linux_page_address(page) (afs_linux_page_offset + PAGE_SIZE * (page - mem_map))
 
 #if defined(__KERNEL__) && defined(CONFIG_SMP)
index c6bc84a..91fc0ce 100644 (file)
@@ -23,6 +23,9 @@ RCSID
 #if defined(AFS_LINUX24_ENV)
 #include "h/smp_lock.h"
 #endif
+#if defined(AFS_LINUX26_ENV)
+#include "h/namei.h"
+#endif
 
 #if defined(AFS_LINUX24_ENV)
 /* Lookup name and return vnode for same. */
@@ -40,8 +43,12 @@ osi_lookupname(char *aname, uio_seg_t seg, int followlink,
            followlink ? user_path_walk(aname,
                                        nd) : user_path_walk_link(aname, nd);
     } else {
+#if defined(AFS_LINUX26_ENV)
+       code = path_lookup(aname, followlink ? LOOKUP_FOLLOW : 0, nd);
+#else
        if (path_init(aname, followlink ? LOOKUP_FOLLOW : 0, nd))
            code = path_walk(aname, nd);
+#endif
     }
 
     if (!code) {
@@ -389,30 +396,29 @@ osi_iput(struct inode *ip)
     extern struct vfs *afs_globalVFS;
 
     AFS_GLOCK();
+
+    if (afs_globalVFS && ip->i_sb != afs_globalVFS)
+       osi_Panic("IPUT Not an afs inode\n");
+
 #if defined(AFS_LINUX24_ENV)
-    if (atomic_read(&ip->i_count) == 0
-       || atomic_read(&ip->i_count) & 0xffff0000) {
+    if (atomic_read(&ip->i_count) == 0)
 #else
-    if (ip->i_count == 0 || ip->i_count & 0xffff0000) {
+    if (ip->i_count == 0)
 #endif
        osi_Panic("IPUT Bad refCount %d on inode 0x%x\n",
 #if defined(AFS_LINUX24_ENV)
-                 atomic_read(&ip->i_count), ip);
+                 atomic_read(&ip->i_count),
 #else
-                 ip->i_count, ip);
+                 ip->i_count,
 #endif
-    }
-    if (afs_globalVFS && afs_globalVFS == ip->i_sb) {
+                               ip);
+
 #if defined(AFS_LINUX24_ENV)
-       atomic_dec(&ip->i_count);
-       if (!atomic_read(&ip->i_count))
+    if (atomic_dec_and_test(&ip->i_count))
 #else
-       ip->i_count--;
-       if (!ip->i_count)
+    if (!--ip->i_count)
 #endif
            osi_clear_inode(ip);
-    } else
-       iput(ip);
     AFS_GUNLOCK();
 }
 
index 77abefd..adc0599 100644 (file)
@@ -36,6 +36,14 @@ RCSID
 #include <linux/syscall.h>
 #endif
 
+#if defined(AFS_LINUX26_ENV)
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+#endif
+
 #ifdef AFS_SPARC64_LINUX24_ENV
 #define __NR_setgroups32      82       /* This number is not exported for some bizarre reason. */
 #endif
@@ -57,7 +65,7 @@ static unsigned int *sys_call_table;  /* changed to uint because SPARC64 has sysc
 static void **sys_call_table;  /* safer for other linuces */
 #endif
 #endif
-extern struct file_system_type afs_file_system;
+extern struct file_system_type afs_fs_type;
 
 static long get_page_offset(void);
 
@@ -67,7 +75,9 @@ DECLARE_MUTEX(afs_global_lock);
 struct semaphore afs_global_lock = MUTEX;
 #endif
 int afs_global_owner = 0;
+#if !defined(AFS_LINUX24_ENV)
 unsigned long afs_linux_page_offset = 0;       /* contains the PAGE_OFFSET value */
+#endif
 
 /* Since sys_ni_syscall is not exported, I need to cache it in order to restore
  * it.
@@ -214,6 +224,7 @@ init_module(void)
 
     RWLOCK_INIT(&afs_xosi, "afs_xosi");
 
+#if !defined(AFS_LINUX24_ENV)
     /* obtain PAGE_OFFSET value */
     afs_linux_page_offset = get_page_offset();
 
@@ -224,6 +235,7 @@ init_module(void)
        return -EIO;
     }
 #endif
+#endif
 #ifndef EXPORTED_SYS_CALL_TABLE
     sys_call_table = 0;
 
@@ -433,7 +445,7 @@ init_module(void)
 #endif /* AFS_S390_LINUX22_ENV */
 
     osi_Init();
-    register_filesystem(&afs_file_system);
+    register_filesystem(&afs_fs_type);
 
     /* Intercept setgroups calls */
 #if defined(AFS_IA64_LINUX20_ENV)
@@ -534,7 +546,7 @@ cleanup_module(void)
     set_afs_xsetgroups_syscall(sys_setgroupsp);
     set_afs_xsetgroups_syscall32(sys32_setgroupsp);
 #endif
-    unregister_filesystem(&afs_file_system);
+    unregister_filesystem(&afs_fs_type);
 
     osi_linux_free_inode_pages();      /* Invalidate all pages using AFS inodes. */
     osi_linux_free_afs_memory();
@@ -548,6 +560,7 @@ module_exit(afs_cleanup);
 #endif
 
 
+#if !defined(AFS_LINUX24_ENV)
 static long
 get_page_offset(void)
 {
@@ -580,3 +593,4 @@ get_page_offset(void)
     return 0;
 #endif
 }
+#endif /* !AFS_LINUX24_ENV */
index 2ed66a5..4231a3d 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef OSI_VFS_H_
 #define OSI_VFS_H_
 
+#if !defined(AFS_LINUX26_ENV)
 /* The vnode should match the current implementation of the fs independent
  * part of the Linux inode.
  */
 /* LINUX VNODE INCLUDED BELOW -- DO NOT MODIFY */
 
 typedef struct vnode vnode_t;
+#else
+typedef struct inode vnode_t;
+#define vnode inode
+#endif
 
 /* Map vnode fields to inode fields. */
 #define i_number       i_ino
index cb23a75..046da30 100644 (file)
@@ -21,7 +21,9 @@ RCSID
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
 #include "afs/afs_stats.h"
+#if !defined(AFS_LINUX26_ENV)
 #include "h/locks.h"
+#endif
 #if defined(AFS_LINUX24_ENV)
 #include "h/smp_lock.h"
 #endif
@@ -47,8 +49,9 @@ extern struct dentry_operations afs_dentry_operations;
 static void iattr2vattr(struct vattr *vattrp, struct iattr *iattrp);
 static void update_inode_cache(struct inode *ip, struct vattr *vp);
 static int afs_root(struct super_block *afsp);
-struct super_block *afs_read_super(struct super_block *sb, void *data,
-                                  int silent);
+struct super_block *afs_read_super(struct super_block *sb, void *data, int silent);
+int afs_fill_super(struct super_block *sb, void *data, int silent);
+static struct super_block *afs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data);
 void put_inode_on_dummy_list(struct inode *ip);
 
 /* afs_file_system
@@ -58,10 +61,23 @@ void put_inode_on_dummy_list(struct inode *ip);
  * 2) Mount call comes to us via do_mount -> read_super -> afs_read_super.
  *    We are expected to setup the super_block. See afs_read_super.
  */
-#if defined(AFS_LINUX24_ENV)
-DECLARE_FSTYPE(afs_file_system, "afs", afs_read_super, 0);
+#if defined(AFS_LINUX26_ENV)
+struct backing_dev_info afs_backing_dev_info = {
+       .ra_pages       = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE,
+       .state          = 0,
+};
+
+struct file_system_type afs_fs_type = {
+    .owner = THIS_MODULE,
+    .name = "afs",
+    .get_sb = afs_get_sb,
+    .kill_sb = kill_anon_super,
+    .fs_flags = FS_BINARY_MOUNTDATA,
+};
+#elif defined(AFS_LINUX24_ENV)
+DECLARE_FSTYPE(afs_fs_type, "afs", afs_read_super, 0);
 #else
-struct file_system_type afs_file_system = {
+struct file_system_type afs_fs_type = {
     "afs",                     /* name - used by mount operation. */
     0,                         /* requires_dev - no for network filesystems. mount() will 
                                 * pass us an "unnamed" device. */
@@ -74,8 +90,19 @@ struct file_system_type afs_file_system = {
  * read the "super block" for AFS - roughly eguivalent to struct vfs.
  * dev, covered, s_rd_only, s_dirt, and s_type will be set by read_super.
  */
+#if defined(AFS_LINUX26_ENV)
+static struct super_block *
+afs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
+{
+    return get_sb_nodev(fs_type, flags, data, afs_fill_super);
+}
+
+int
+afs_fill_super(struct super_block *sb, void *data, int silent)
+#else
 struct super_block *
 afs_read_super(struct super_block *sb, void *data, int silent)
+#endif
 {
     int code = 0;
 
@@ -84,7 +111,11 @@ afs_read_super(struct super_block *sb, void *data, int silent)
        printf
            ("You must reload the AFS kernel extensions before remounting AFS.\n");
        AFS_GUNLOCK();
+#if defined(AFS_LINUX26_ENV)
+       return -EINVAL;
+#else
        return NULL;
+#endif
     }
     afs_was_mounted = 1;
 
@@ -92,7 +123,11 @@ afs_read_super(struct super_block *sb, void *data, int silent)
 #if !defined(AFS_LINUX24_ENV)
     lock_super(sb);
 #endif
+#if defined(AFS_LINUX26_ENV)
+   __module_get(THIS_MODULE);
+#else
     MOD_INC_USE_COUNT;
+#endif
 
     afs_globalVFS = sb;
     sb->s_blocksize = 1024;
@@ -104,14 +139,22 @@ afs_read_super(struct super_block *sb, void *data, int silent)
 #endif
     code = afs_root(sb);
     if (code)
+#if defined(AFS_LINUX26_ENV)
+       module_put(THIS_MODULE);
+#else
        MOD_DEC_USE_COUNT;
+#endif
 
 #if !defined(AFS_LINUX24_ENV)
     unlock_super(sb);
 #endif
 
     AFS_GUNLOCK();
+#if defined(AFS_LINUX26_ENV)
+    return code ? -EINVAL : 0;
+#else
     return code ? NULL : sb;
+#endif
 }
 
 
@@ -216,22 +259,38 @@ static LIST_HEAD(dummy_inode_list);
  * has synced some pages of a file to disk.
  */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
-void
+static void
 afs_write_inode(struct inode *ip, int unused)
 #else
-void
+static void
 afs_write_inode(struct inode *ip)
 #endif
 {
-    /* and put it back on our dummy list. */
     list_del(&ip->i_list);
-    list_add(&ip->i_list, &dummy_inode_list);
+    /* and put it back on our dummy list. */
+    put_inode_on_dummy_list(ip);
 
     /* for now we don't actually update the metadata during msync. This
      * is just to keep linux happy.  */
 }
 
 
+#if defined(AFS_LINUX26_ENV)
+static void
+afs_destroy_inode(struct inode *ip)
+{
+    /* afs inodes cannot be destroyed */
+}
+
+static void
+afs_clear_inode(struct inode *ip)
+{
+    AFS_GLOCK();
+    osi_clear_inode(ip);
+    AFS_GUNLOCK();
+}
+#else
+
 /* afs_put_inode
  * called from iput when count goes to zero. Linux version of inactive.
  * For Linux 2.2, this funcionality has moved to the delete inode super op.
@@ -239,20 +298,21 @@ afs_write_inode(struct inode *ip)
  * That will trigger the call to delete routine.
  */
 
-void
+static void
 afs_delete_inode(struct inode *ip)
 {
-    struct vcache *vc = ITOAFS(ip);
+    struct vcache *vp = ITOAFS(ip);
 
     AFS_GLOCK();
     osi_clear_inode(ip);
     AFS_GUNLOCK();
 }
+#endif
 
 
 /* afs_put_super
  * Called from unmount to release super_block. */
-void
+static void
 afs_put_super(struct super_block *sbp)
 {
     extern int afs_afs_cold_shutdown;
@@ -262,10 +322,12 @@ afs_put_super(struct super_block *sbp)
     AFS_GLOCK();
     AFS_STATCNT(afs_unmount);
 
+#if !defined(AFS_LINUX26_ENV)
     if (!suser()) {
        AFS_GUNLOCK();
        return;
     }
+#endif
 
     afs_globalVFS = 0;
     afs_globalVp = 0;
@@ -280,7 +342,11 @@ afs_put_super(struct super_block *sbp)
 
     if (!code) {
        sbp->s_dev = 0;
+#if defined(AFS_LINUX26_ENV)
+       module_put(THIS_MODULE);
+#else
        MOD_DEC_USE_COUNT;
+#endif
     }
 }
 
@@ -289,41 +355,43 @@ afs_put_super(struct super_block *sbp)
  * statp is in user space, so we need to cobble together a statfs, then
  * copy it.
  */
-#if defined(AFS_LINUX24_ENV)
+#if defined(AFS_LINUX26_ENV)
+int
+afs_statfs(struct super_block *sbp, struct kstatfs *statp)
+#elif defined(AFS_LINUX24_ENV)
 int
 afs_statfs(struct super_block *sbp, struct statfs *statp)
 #else
 int
-afs_statfs(struct super_block *sbp, struct statfs *statp, int size)
+afs_statfs(struct super_block *sbp, struct statfs *__statp, int size)
 #endif
 {
+#if !defined(AFS_LINUX24_ENV)
     struct statfs stat;
 
-    AFS_STATCNT(afs_statfs);
-
-#if !defined(AFS_LINUX24_ENV)
     if (size < sizeof(struct statfs))
        return;
 
     memset(&stat, 0, size);
+    statp = &stat;
 #endif
-    stat.f_type = 0;           /* Can we get a real type sometime? */
-    stat.f_bsize = sbp->s_blocksize;
-    stat.f_blocks = stat.f_bfree = stat.f_bavail = stat.f_files =
-       stat.f_ffree = 9000000;
-    stat.f_fsid.val[0] = AFS_VFSMAGIC;
-    stat.f_fsid.val[1] = AFS_VFSFSID;
-    stat.f_namelen = 256;
 
-#if defined(AFS_LINUX24_ENV)
-    *statp = stat;
-#else
-    memcpy_tofs(statp, &stat, size);
+    AFS_STATCNT(afs_statfs);
+
+    statp->f_type = 0;         /* Can we get a real type sometime? */
+    statp->f_bsize = sbp->s_blocksize;
+    statp->f_blocks = statp->f_bfree = statp->f_bavail = statp->f_files =
+       statp->f_ffree = 9000000;
+    statp->f_fsid.val[0] = AFS_VFSMAGIC;
+    statp->f_fsid.val[1] = AFS_VFSFSID;
+    statp->f_namelen = 256;
+
+#if !defined(AFS_LINUX24_ENV)
+    memcpy_tofs(__statp, &stat, size);
 #endif
     return 0;
 }
 
-
 void
 afs_umount_begin(struct super_block *sbp)
 {
@@ -331,13 +399,18 @@ afs_umount_begin(struct super_block *sbp)
 }
 
 struct super_operations afs_sops = {
-  .write_inode =       afs_write_inode,
+#if defined(AFS_LINUX26_ENV)
+  .destroy_inode =     afs_destroy_inode,
+  .clear_inode =       afs_clear_inode,
+#else
   .delete_inode =      afs_delete_inode,
+#endif
+  .write_inode =       afs_write_inode,
   .put_super =         afs_put_super,
   .statfs =            afs_statfs,
   .umount_begin =      afs_umount_begin
 #if !defined(AFS_LINUX24_ENV)
-  .notifY_change =     afs_notify_change,
+  .notify_change =     afs_notify_change,
 #endif
 };
 
@@ -359,15 +432,27 @@ iattr2vattr(struct vattr *vattrp, struct iattr *iattrp)
     if (iattrp->ia_valid & ATTR_SIZE)
        vattrp->va_size = iattrp->ia_size;
     if (iattrp->ia_valid & ATTR_ATIME) {
+#if defined(AFS_LINUX26_ENV)
+       vattrp->va_atime.tv_sec = iattrp->ia_atime.tv_sec;
+#else
        vattrp->va_atime.tv_sec = iattrp->ia_atime;
+#endif
        vattrp->va_atime.tv_usec = 0;
     }
     if (iattrp->ia_valid & ATTR_MTIME) {
+#if defined(AFS_LINUX26_ENV)
+       vattrp->va_mtime.tv_sec = iattrp->ia_mtime.tv_sec;
+#else
        vattrp->va_mtime.tv_sec = iattrp->ia_mtime;
+#endif
        vattrp->va_mtime.tv_usec = 0;
     }
     if (iattrp->ia_valid & ATTR_CTIME) {
+#if defined(AFS_LINUX26_ENV)
+       vattrp->va_ctime.tv_sec = iattrp->ia_ctime.tv_sec;
+#else
        vattrp->va_ctime.tv_sec = iattrp->ia_ctime;
+#endif
        vattrp->va_ctime.tv_usec = 0;
     }
 }
@@ -388,11 +473,23 @@ update_inode_cache(struct inode *ip, struct vattr *vp)
     if (vp->va_mask & ATTR_SIZE)
        ip->i_size = vp->va_size;
     if (vp->va_mask & ATTR_ATIME)
+#if defined(AFS_LINUX26_ENV)
+       ip->i_atime.tv_sec = vp->va_atime.tv_sec;
+#else
        ip->i_atime = vp->va_atime.tv_sec;
+#endif
     if (vp->va_mask & ATTR_MTIME)
+#if defined(AFS_LINUX26_ENV)
+       ip->i_mtime.tv_sec = vp->va_mtime.tv_sec;
+#else
        ip->i_mtime = vp->va_mtime.tv_sec;
+#endif
     if (vp->va_mask & ATTR_CTIME)
+#if defined(AFS_LINUX26_ENV)
+       ip->i_ctime.tv_sec = vp->va_ctime.tv_sec;
+#else
        ip->i_ctime = vp->va_ctime.tv_sec;
+#endif
 }
 
 /* vattr2inode
@@ -410,9 +507,15 @@ vattr2inode(struct inode *ip, struct vattr *vp)
     ip->i_uid = vp->va_uid;
     ip->i_gid = vp->va_gid;
     ip->i_size = vp->va_size;
+#if defined(AFS_LINUX26_ENV)
+    ip->i_atime.tv_sec = vp->va_atime.tv_sec;
+    ip->i_mtime.tv_sec = vp->va_mtime.tv_sec;
+    ip->i_ctime.tv_sec = vp->va_ctime.tv_sec;
+#else
     ip->i_atime = vp->va_atime.tv_sec;
     ip->i_mtime = vp->va_mtime.tv_sec;
     ip->i_ctime = vp->va_ctime.tv_sec;
+#endif
 
     /* we should put our inodes on a dummy inode list to keep linux happy. */
     if (!ip->i_list.prev && !ip->i_list.next) {
index 9d6259f..552697f 100644 (file)
@@ -73,7 +73,13 @@ osi_VM_FlushVCache(struct vcache *avc, int *slept)
 void
 osi_VM_TryToSmush(struct vcache *avc, struct AFS_UCRED *acred, int sync)
 {
-    invalidate_inode_pages(AFSTOI(avc));
+    struct inode *ip = AFSTOI(avc);
+
+#if defined(AFS_LINUX26_ENV)
+    invalidate_inode_pages(ip->i_mapping);
+#else
+    invalidate_inode_pages(ip);
+#endif
 }
 
 /* Flush and invalidate pages, for fsync() with INVAL flag
@@ -100,7 +106,11 @@ osi_VM_StoreAllSegments(struct vcache *avc)
     /* filemap_fdatasync() only exported in 2.4.5 and above */
     ReleaseWriteLock(&avc->lock);
     AFS_GUNLOCK();
+#if defined(AFS_LINUX26_ENV)
+    filemap_fdatawrite(ip->i_mapping);
+#else
     filemap_fdatasync(ip->i_mapping);
+#endif
     filemap_fdatawait(ip->i_mapping);
     AFS_GLOCK();
     ObtainWriteLock(&avc->lock, 121);
index 06de2a9..6e3cb80 100644 (file)
@@ -40,6 +40,10 @@ RCSID
 #define pageoff(pp) pp->offset
 #endif
 
+#if defined(AFS_LINUX26_ENV)
+#define UnlockPage(pp) unlock_page(pp)
+#endif
+
 extern struct vcache *afs_globalVp;
 extern afs_rwlock_t afs_xvcache;
 
@@ -109,6 +113,7 @@ afs_linux_read(struct file *fp, char *buf, size_t count, loff_t * offp)
                *offp += count;
            }
          done:
+               ;
        } else {
 #endif /* AFS_64BIT_CLIENT */
            osi_FlushPages(vcp, credp); /* ensure stale pages are gone */
@@ -216,6 +221,7 @@ afs_linux_write(struct file *fp, const char *buf, size_t count, loff_t * offp)
                ReleaseWriteLock(&vcp->lock);
            }
          done:
+               ;
        } else {
 #endif /* AFS_64BIT_CLIENT */
            AFS_GUNLOCK();
@@ -354,7 +360,7 @@ afs_linux_readdir(struct file *fp, void *dirbuf, filldir_t filldir)
        }
 
        /* filldir returns -EINVAL when the buffer is full. */
-#if (defined(AFS_LINUX24_ENV) || defined(pgoff2loff)) && defined(DECLARE_FSTYPE)
+#if defined(AFS_LINUX26_ENV) || ((defined(AFS_LINUX24_ENV) || defined(pgoff2loff)) && defined(DECLARE_FSTYPE))
        {
            unsigned int type = DT_UNKNOWN;
            struct VenusFid afid;
@@ -757,6 +763,15 @@ struct file_operations afs_file_fops = {
  * AFS Linux dentry operations
  **********************************************************************/
 
+static int
+afs_linux_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+{
+        int err = afs_linux_revalidate(dentry);
+        if (!err)
+                generic_fillattr(dentry->d_inode, stat);
+        return err;
+}
+
 /* afs_linux_revalidate
  * Ensure vcache is stat'd before use. Return 0 if entry is valid.
  */
@@ -1576,7 +1591,11 @@ extern int afs_notify_change(struct dentry *dp, struct iattr *iattrp);
 #endif
 
 struct inode_operations afs_file_iops = {
-#if defined(AFS_LINUX24_ENV)
+#if defined(AFS_LINUX26_ENV)
+  .permission =                afs_linux_permission,
+  .getattr =           afs_linux_getattr,
+  .setattr =           afs_notify_change,
+#elif defined(AFS_LINUX24_ENV)
   .permission =                afs_linux_permission,
   .revalidate =                afs_linux_revalidate,
   .setattr =           afs_notify_change,
@@ -1616,7 +1635,11 @@ struct inode_operations afs_dir_iops = {
   .mkdir =             afs_linux_mkdir,
   .rmdir =             afs_linux_rmdir,
   .rename =            afs_linux_rename,
+#if defined(AFS_LINUX26_ENV)
+  .getattr =           afs_linux_getattr,
+#else
   .revalidate =                afs_linux_revalidate,
+#endif
   .permission =                afs_linux_permission,
 };
 
index 69cfbb1..a2ae355 100644 (file)
@@ -157,10 +157,17 @@ afsd_thread(void *rock)
 #ifdef SYS_SETPRIORITY_EXPORTED
     int (*sys_setpriority) (int, int, int) = sys_call_table[__NR_setpriority];
 #endif
-    daemonize();               /* doesn't do much, since we were forked from keventd, but
+#if defined(AFS_LINUX26_ENV)
+    daemonize("afsd");
+#else
+    daemonize();
+#endif
+                               /* doesn't do much, since we were forked from keventd, but
                                 * does call mm_release, which wakes up our parent (since it
                                 * used CLONE_VFORK) */
+#if !defined(AFS_LINUX26_ENV)
     reparent_to_init();
+#endif
     afs_osi_MaskSignals();
     switch (parm) {
     case AFSOP_START_RXCALLBACK:
@@ -282,7 +289,11 @@ afs_DaemonOp(long parm, long parm2, long parm3, long parm4, long parm5,
 {
     int code;
     DECLARE_COMPLETION(c);
+#if defined(AFS_LINUX26_ENV)
+    struct work_struct tq;
+#else
     struct tq_struct tq;
+#endif
     struct afsd_thread_info info;
     if (parm == AFSOP_START_RXCALLBACK) {
        if (afs_CB_Running)
@@ -306,11 +317,16 @@ afs_DaemonOp(long parm, long parm2, long parm3, long parm4, long parm5,
     }                          /* other functions don't need setup in the parent */
     info.complete = &c;
     info.parm = parm;
+#if defined(AFS_LINUX26_ENV)
+    INIT_WORK(&tq, afsd_launcher, &info);
+    schedule_work(&tq);
+#else
     tq.sync = 0;
     INIT_LIST_HEAD(&tq.list);
     tq.routine = afsd_launcher;
     tq.data = &info;
     schedule_task(&tq);
+#endif
     AFS_GUNLOCK();
     /* we need to wait cause we passed stack pointers around.... */
     wait_for_completion(&c);
index 42dae8f..6400ed7 100644 (file)
@@ -1058,8 +1058,20 @@ afs_osi_proc2cred(AFS_PROC * pr)
        || (pr->state == TASK_STOPPED)) {
        cr.cr_ref = 1;
        cr.cr_uid = pr->uid;
+#if defined(AFS_LINUX26_ENV)
+{
+       int i;
+
+       memset(cr.cr_groups, 0, NGROUPS * sizeof(gid_t));
+
+       cr.cr_ngroups = pr->group_info->ngroups;
+       for(i = 0; i < pr->group_info->ngroups; ++i)
+               cr.cr_groups[i] = GROUP_AT(pr->group_info, i);
+}
+#else
        cr.cr_ngroups = pr->ngroups;
        memcpy(cr.cr_groups, pr->groups, NGROUPS * sizeof(gid_t));
+#endif
        rv = &cr;
     }
 
index 19834ac..9e3a368 100644 (file)
@@ -524,7 +524,7 @@ afs_RemoveVCB(struct VenusFid *afid)
     return 0;
 }
 
-#ifdef AFS_LINUX22_ENV
+#if defined(AFS_LINUX22_ENV) && !defined(AFS_LINUX26_ENV)
 
 static void
 __shrink_dcache_parent(struct dentry *parent)
@@ -674,7 +674,7 @@ afs_TryFlushDcacheChildren(struct vcache *tvc)
     DUNLOCK();
 #endif
 }
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX22_ENV && !AFS_LINUX26_ENV */
 
 /*
  * afs_NewVCache
@@ -802,9 +802,16 @@ afs_NewVCache(struct VenusFid *afid, struct server *serverp)
                }
            }
 #elif defined(AFS_LINUX22_ENV)
-           if (tvc != afs_globalVp && VREFCOUNT(tvc) && tvc->opens == 0)
+           if (tvc != afs_globalVp && VREFCOUNT(tvc) && tvc->opens == 0) {
+#if defined(AFS_LINUX26_ENV)
+               AFS_GUNLOCK();
+               d_prune_aliases(AFSTOI(tvc));
+               AFS_GLOCK();
+#else
                afs_TryFlushDcacheChildren(tvc);
 #endif
+           }
+#endif
 
            if (VREFCOUNT(tvc) == 0 && tvc->opens == 0
                && (tvc->states & CUnlinkedDel) == 0) {
@@ -954,6 +961,71 @@ afs_NewVCache(struct VenusFid *afid, struct server *serverp)
     hzero(tvc->mapDV);
     tvc->truncPos = AFS_NOTRUNC;       /* don't truncate until we need to */
     hzero(tvc->m.DataVersion); /* in case we copy it into flushDV */
+#if defined(AFS_LINUX22_ENV)
+{
+    struct inode *ip = AFSTOI(tvc);
+    struct address_space *mapping = &ip->i_data;
+
+#if defined(AFS_LINUX26_ENV)
+    inode_init_once(ip);
+#else
+    sema_init(&ip->i_sem, 1);
+    INIT_LIST_HEAD(&ip->i_hash);
+    INIT_LIST_HEAD(&ip->i_dentry);
+#if defined(AFS_LINUX24_ENV)
+    sema_init(&ip->i_zombie, 1);
+    init_waitqueue_head(&ip->i_wait);
+    spin_lock_init(&ip->i_data.i_shared_lock);
+#ifdef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+    spin_lock_init(&ip->i_data.page_lock);
+#endif
+    INIT_LIST_HEAD(&ip->i_data.clean_pages);
+    INIT_LIST_HEAD(&ip->i_data.dirty_pages);
+    INIT_LIST_HEAD(&ip->i_data.locked_pages);
+    INIT_LIST_HEAD(&ip->i_dirty_buffers);
+#ifdef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
+    INIT_LIST_HEAD(&ip->i_dirty_data_buffers);
+#endif
+#ifdef STRUCT_INODE_HAS_I_DEVICES
+    INIT_LIST_HEAD(&ip->i_devices);
+#endif
+#ifdef STRUCT_INODE_HAS_I_TRUNCATE_SEM
+    init_rwsem(&ip->i_truncate_sem);
+#endif
+#ifdef STRUCT_INODE_HAS_I_ALLOC_SEM
+    init_rwsem(&ip->i_alloc_sem);
+#endif 
+
+#else /* AFS_LINUX22_ENV */
+    sema_init(&ip->i_atomic_write, 1);
+    init_waitqueue(&ip->i_wait);
+#endif
+#endif
+
+#if defined(AFS_LINUX24_ENV)
+    mapping->host = ip;
+    ip->i_mapping = mapping;
+#ifdef STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
+    ip->i_data.gfp_mask = GFP_HIGHUSER;
+#endif
+#if defined(AFS_LINUX26_ENV)
+    mapping_set_gfp_mask(mapping, GFP_HIGHUSER);
+{
+    extern struct backing_dev_info afs_backing_dev_info;
+
+    mapping->backing_dev_info = &afs_backing_dev_info;
+}
+#endif
+#endif
+
+#if !defined(AFS_LINUX26_ENV)
+    if (afs_globalVFS)
+       ip->i_dev = afs_globalVFS->s_dev;
+#endif
+    ip->i_sb = afs_globalVFS;
+}
+#endif
+
 #ifdef AFS_OSF_ENV
     /* Hold it for the LRU (should make count 2) */
     VN_HOLD(AFSTOV(tvc));
@@ -1090,50 +1162,6 @@ afs_NewVCache(struct VenusFid *afid, struct server *serverp)
     vn_initlist((struct vnlist *)&tvc->v);
     tvc->lastr = 0;
 #endif /* AFS_SGI_ENV */
-#if defined(AFS_LINUX22_ENV)
-    {
-       struct inode *ip = AFSTOI(tvc);
-       sema_init(&ip->i_sem, 1);
-#if defined(AFS_LINUX24_ENV)
-       sema_init(&ip->i_zombie, 1);
-       init_waitqueue_head(&ip->i_wait);
-       spin_lock_init(&ip->i_data.i_shared_lock);
-#ifdef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
-       spin_lock_init(&ip->i_data.page_lock);
-#endif
-       INIT_LIST_HEAD(&ip->i_data.clean_pages);
-       INIT_LIST_HEAD(&ip->i_data.dirty_pages);
-       INIT_LIST_HEAD(&ip->i_data.locked_pages);
-       INIT_LIST_HEAD(&ip->i_dirty_buffers);
-#ifdef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
-       INIT_LIST_HEAD(&ip->i_dirty_data_buffers);
-#endif
-#ifdef STRUCT_INODE_HAS_I_DEVICES
-       INIT_LIST_HEAD(&ip->i_devices);
-#endif
-       ip->i_data.host = (void *)ip;
-#ifdef STRUCT_ADDRESS_SPACE_HAS_GFP_MASK
-       ip->i_data.gfp_mask = GFP_HIGHUSER;
-#endif
-       ip->i_mapping = &ip->i_data;
-#ifdef STRUCT_INODE_HAS_I_TRUNCATE_SEM
-       init_rwsem(&ip->i_truncate_sem);
-#endif
-#ifdef STRUCT_INODE_HAS_I_ALLOC_SEM
-       init_rwsem(&ip->i_alloc_sem);
-#endif
-#else
-       sema_init(&ip->i_atomic_write, 1);
-       init_waitqueue(&ip->i_wait);
-#endif
-       INIT_LIST_HEAD(&ip->i_hash);
-       INIT_LIST_HEAD(&ip->i_dentry);
-       if (afs_globalVFS) {
-           ip->i_dev = afs_globalVFS->s_dev;
-           ip->i_sb = afs_globalVFS;
-       }
-    }
-#endif
     tvc->h1.dchint = 0;
     osi_dnlc_purgedp(tvc);     /* this may be overkill */
     memset((char *)&(tvc->quick), 0, sizeof(struct vtodc));
index 215884e..2146b7e 100644 (file)
 #include <linux/net.h>
 #include <linux/kdev_t.h>
 #include <linux/ioctl.h>
+#if defined(AFS_LINUX26_ENV)
+#include <linux/backing-dev.h>
+#include <linux/pagemap.h>
+#include <linux/namei.h>
+#endif
 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
  * inclusion of uaccess.h.
  */
index ac2cb12..e1534de 100644 (file)
@@ -177,9 +177,13 @@ load_client() {
                exit 1
        fi
 
-       # use the prefix command if required
-       set_prefix
-       /sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+       if [ -f $KSYMS_FILE ]; then
+               # use the prefix command if required
+               set_prefix
+               /sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+       else
+               /sbin/insmod $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+       fi
 }
 
 generate_cacheinfo() {
index e4f365b..ee298b2 100644 (file)
@@ -1,7 +1,7 @@
 AC_DEFUN(LINUX_INODE_SETATTR_RETURN_TYPE,[
 AC_MSG_CHECKING(for inode_setattr return type)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_func_inode_setattr_returns_int,
 [
 AC_TRY_COMPILE(
index 2362dc0..ff54411 100644 (file)
@@ -1,7 +1,7 @@
 AC_DEFUN(LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK, [
 AC_MSG_CHECKING(for gfp_mask in struct address_space)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_gfp_mask, 
 [
 AC_TRY_COMPILE(
@@ -16,7 +16,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_BYTES, [
 AC_MSG_CHECKING(for i_bytes in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_bytes, 
 [
 AC_TRY_COMPILE(
@@ -31,7 +31,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM, [
 AC_MSG_CHECKING(for i_alloc_sem in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_alloc_sem,
 [
 AC_TRY_COMPILE(
@@ -46,7 +46,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM, [
 AC_MSG_CHECKING(for i_truncate_sem in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_truncate_sem,
 [
 AC_TRY_COMPILE(
@@ -61,7 +61,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, [
 AC_MSG_CHECKING(for page_lock in struct address_space)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_page_lock, 
 [
 AC_TRY_COMPILE(
index dd8129a..fb8c796 100644 (file)
@@ -1,7 +1,7 @@
 AC_DEFUN(LINUX_COMPLETION_H_EXISTS, [
 AC_MSG_CHECKING(for linux/completion.h existance)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_completion_h_exists,
 [
 AC_TRY_COMPILE(
@@ -21,7 +21,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_DEFINES_FOR_EACH_PROCESS, [
 AC_MSG_CHECKING(for defined for_each_process)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_defines_for_each_process,
 [
 AC_TRY_COMPILE(
@@ -38,7 +38,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_DEFINES_PREV_TASK, [
 AC_MSG_CHECKING(for defined prev_task)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_defines_prev_task,
 [
 AC_TRY_COMPILE(
@@ -55,7 +55,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_INIT_MM, [
 AC_MSG_CHECKING(for exported init_mm)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_init_mm,
 [
 AC_TRY_COMPILE(
@@ -72,7 +72,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_KALLSYMS_ADDRESS, [
 AC_MSG_CHECKING(for exported kallsyms_address_to_symbol)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_address,
 [
 AC_TRY_COMPILE(
@@ -89,7 +89,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_KALLSYMS_SYMBOL, [
 AC_MSG_CHECKING(for exported kallsyms_symbol_to_address)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_symbol,
 [
 AC_TRY_COMPILE(
@@ -106,7 +106,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_SYS_CALL_TABLE, [
 AC_MSG_CHECKING(for exported sys_call_table)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_call_table,
 [
 AC_TRY_COMPILE(
@@ -123,7 +123,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_IA32_SYS_CALL_TABLE, [
 AC_MSG_CHECKING(for exported ia32_sys_call_table)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_ia32_sys_call_table,
 [
 AC_TRY_COMPILE(
@@ -140,7 +140,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_SYS_CHDIR, [
 AC_MSG_CHECKING(for exported sys_chdir)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_chdir,
 [
 AC_TRY_COMPILE(
@@ -157,7 +157,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_SYS_CLOSE, [
 AC_MSG_CHECKING(for exported sys_close)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_close,
 [
 AC_TRY_COMPILE(
@@ -174,7 +174,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_SYS_WAIT4, [
 AC_MSG_CHECKING(for exported sys_wait4)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_sys_wait4,
 [
 AC_TRY_COMPILE(
@@ -191,7 +191,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_EXPORTS_TASKLIST_LOCK, [
 AC_MSG_CHECKING(for exported tasklist_lock)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_exports_tasklist_lock,
 [
 AC_TRY_COMPILE(
@@ -208,7 +208,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_CDEV, [
 AC_MSG_CHECKING(for i_cdev in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
 [
 AC_TRY_COMPILE(
@@ -224,7 +224,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DEVICES, [
 AC_MSG_CHECKING(for i_devices in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
 [
 AC_TRY_COMPILE(
@@ -240,7 +240,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, [
 AC_MSG_CHECKING(for i_dirty_data_buffers in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers, 
 [
 AC_TRY_COMPILE(
@@ -256,7 +256,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD, [
 AC_MSG_CHECKING(for i_mapping_overload in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mapping_overload, 
 [
 AC_TRY_COMPILE(
@@ -272,7 +272,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED, [
 AC_MSG_CHECKING(for i_mmap_shared in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mmap_shared,
 [
 AC_TRY_COMPILE(
@@ -288,7 +288,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_RECALC_SIGPENDING_ARG_TYPE,[
 AC_MSG_CHECKING(for recalc_sigpending arg type)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_func_recalc_sigpending_takes_void,
 [
 AC_TRY_COMPILE(
@@ -303,7 +303,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT, [
 AC_MSG_CHECKING(for parent in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_parent,
 [
 AC_TRY_COMPILE(
@@ -319,7 +319,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT, [
 AC_MSG_CHECKING(for real_parent in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_real_parent,
 [
 AC_TRY_COMPILE(
@@ -335,7 +335,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG, [
 AC_MSG_CHECKING(for sig in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sig,
 [
 AC_TRY_COMPILE(
@@ -350,7 +350,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK, [
 AC_MSG_CHECKING(for sigmask_lock in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sigmask_lock,
 [
 AC_TRY_COMPILE(
@@ -365,7 +365,7 @@ CPPFLAGS="$save_CPPFLAGS"])
 AC_DEFUN(LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND, [
 AC_MSG_CHECKING(for sighand in struct task_struct)
 save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
 AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sighand,
 [
 AC_TRY_COMPILE(
index 9a343d8..c568352 100644 (file)
 #define SYS_NAME_ID_i386_linux2                1500
 #define SYS_NAME_ID_i386_linux22       1501
 #define SYS_NAME_ID_i386_linux24        1502
+#define SYS_NAME_ID_i386_linux26        1503
 
 #define SYS_NAME_ID_ppc_linux2          1600
 #define SYS_NAME_ID_ppc_linux22         1601
diff --git a/src/config/param.i386_linux26.h b/src/config/param.i386_linux26.h
new file mode 100644 (file)
index 0000000..641dc8d
--- /dev/null
@@ -0,0 +1,153 @@
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV        1
+#define AFS_LINUX22_ENV        1
+#define AFS_LINUX24_ENV        1
+#define AFS_LINUX26_ENV        1
+#define AFS_I386_LINUX20_ENV   1
+#define AFS_I386_LINUX22_ENV   1
+#define AFS_I386_LINUX24_ENV   1
+#define AFS_I386_LINUX26_ENV   1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1    /* User space interface to file system */
+#define AFS_64BIT_ENV          1
+#define AFS_64BIT_CLIENT       1
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/threads.h>
+
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP 1
+#ifndef CONFIG_X86_LOCAL_APIC
+#define CONFIG_X86_LOCAL_APIC 1
+#endif
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+#define MODVERSIONS
+#include <linux/modversions.h>
+#endif
+
+#endif /* __KERNEL__  && !DUMP_KERNEL */
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS       2     /* Set to Userdisabled, allow sysctl to override */
+
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1  /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#ifndef KERNEL
+#define __USE_LARGEFILE64 1
+#if !defined off64_t
+#define off64_t __off64_t
+#endif
+#endif
+
+/* Machine / Operating system information */
+#define SYS_NAME       "i386_linux26"
+#define SYS_NAME_ID    SYS_NAME_ID_i386_linux26
+
+#endif /* AFS_PARAM_H */
+
+
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_USR_LINUX24_ENV    1
+#define AFS_USR_LINUX26_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1    /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "i386_linux26"
+#define SYS_NAME_ID    SYS_NAME_ID_i386_linux26
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1  /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#define        afsio_iov       uio_iov
+#define        afsio_iovcnt    uio_iovcnt
+#define        afsio_offset    uio_offset
+#define        afsio_seg       uio_segflg
+#define        afsio_fmode     uio_fmode
+#define        afsio_resid     uio_resid
+#define        AFS_UIOSYS      1
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        VATTR_NULL      usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
index 10a4e55..efba6f4 100644 (file)
@@ -35,6 +35,10 @@ COMMON_DEFINES=-D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
 LINUX_KERNEL_PATH=@LINUX_KERNEL_PATH@
 
 # System specific build commands and flags
+<i386_linux26>
+CCFLAGS = $(COMMON_KERN_CFLAGS) @P5PLUS_KOPTS@ -I../mach
+DEFINES = $(COMMON_DEFINES) -DCPU=586 -DKBUILD_BASENAME=libafs_$(subst .,_,$(subst -,_,${CLIENT})) -DKBUILD_MODNAME=libafs_$(subst .,_,$(subst -,_,${CLIENT}))
+
 <i386_linux22 i386_linux24>
 CCFLAGS = $(COMMON_KERN_CFLAGS) @P5PLUS_KOPTS@
 DEFINES = $(COMMON_DEFINES) -DCPU=586
@@ -131,7 +135,7 @@ ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-parisc asm
 <alpha_linux_22 alpha_linux_24>
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-alpha asm
-<i386_linux22 i386_linux24>
+<i386_linux22 i386_linux24 i386_linux26>
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-i386 asm
 <i386_umlinux22 i386_umlinux24>
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-um asm
@@ -149,6 +153,8 @@ ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-sparc64 asm
 <ia64_linux24>
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-ia64 asm
+<i386_linux26>
+       ln -fs ${LINUX_KERNEL_PATH}/include/asm-i386/mach-default mach
 <all>
        for m in ${MPS} ; do \
                KDIR=${KOBJ}-${LINUX_VERSION}${LINUX_MODULE_NAME}-$$m ; \