void show_regs(struct pt_regs * regs)
{
- long cr0 = 0L, cr2 = 0L, cr3 = 0L;
+ unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
printk("\n");
printk("EIP: %04x:[<%08lx>]",0xffff & regs->xcs,regs->eip);
__asm__("movl %%cr0, %0": "=r" (cr0));
__asm__("movl %%cr2, %0": "=r" (cr2));
__asm__("movl %%cr3, %0": "=r" (cr3));
- printk("CR0: %08lx CR2: %08lx CR3: %08lx\n", cr0, cr2, cr3);
+ /* This could fault if %cr4 does not exist */
+ __asm__("1: movl %%cr4, %0 \n"
+ "2: \n"
+ ".section __ex_table,\"a\" \n"
+ ".long 1b,2b \n"
+ ".previous \n"
+ : "=r" (cr4): "0" (0));
+ printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4);
}
/*
#ifdef MODULE
module_init(rd_init);
-#endif
module_exit(rd_cleanup);
+#endif
/* loadable module support */
MODULE_PARM (rd_size, "1i");
#include <linux/stat.h>
#include <linux/errno.h>
#include <linux/locks.h>
-#include <asm/segment.h>
-#include <asm/uaccess.h>
#include <linux/string.h>
+#include <linux/smp_lock.h>
+
+#include <asm/uaccess.h>
#include <linux/coda.h>
#include <linux/coda_linux.h>
else if (!strcmp (this_char, "resgid")) {
if (!value || !*value) {
printk ("EXT2-fs: the resgid option requires "
- "an argument");
+ "an argument\n");
return 0;
}
*resgid = simple_strtoul (value, &value, 0);
int __init change_root(kdev_t new_root_dev,const char *put_old)
{
- kdev_t old_root_dev = ROOT_DEV;
struct vfsmount *old_rootmnt;
struct nameidata devfs_nd, nd;
int error = 0;
if (path_init("/dev", LOOKUP_FOLLOW|LOOKUP_POSITIVE, &devfs_nd))
error = path_walk("/dev", &devfs_nd);
if (!error) {
- struct super_block *sb = devfs_nd.dentry->d_inode->i_sb;
-
if (devfs_nd.mnt->mnt_sb->s_magic == DEVFS_SUPER_MAGIC &&
devfs_nd.dentry == devfs_nd.mnt->mnt_root) {
dput(devfs_nd.dentry);
printk("okay\n");
return 0;
}
- printk(KERN_ERR "error %ld\n",blivet);
+ printk(KERN_ERR "error %d\n",blivet);
return error;
}
/* FIXME: we should hold i_zombie on nd.dentry */