]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/cell/spufs/inode.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / cell / spufs / inode.c
index b3d0dd118dd0ededd97d842e7ab9db1408bda23e..c0e968a4c21116d5ffd4a8bfb8ed7182cc79f15d 100644 (file)
@@ -43,6 +43,7 @@
 
 static struct kmem_cache *spufs_inode_cache;
 char *isolated_loader;
+static int isolated_loader_size;
 
 static struct inode *
 spufs_alloc_inode(struct super_block *sb)
@@ -67,7 +68,7 @@ spufs_destroy_inode(struct inode *inode)
 }
 
 static void
-spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags)
+spufs_init_once(struct kmem_cache *cachep, void *p)
 {
        struct spufs_inode_info *ei = p;
 
@@ -170,6 +171,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir)
 {
        /* remove all entries */
        spufs_prune_dir(dir);
+       d_drop(dir);
 
        return simple_rmdir(parent, dir);
 }
@@ -667,7 +669,8 @@ spufs_parse_options(char *options, struct inode *root)
 
 static void spufs_exit_isolated_loader(void)
 {
-       kfree(isolated_loader);
+       free_pages((unsigned long) isolated_loader,
+                       get_order(isolated_loader_size));
 }
 
 static void
@@ -685,11 +688,12 @@ spufs_init_isolated_loader(void)
        if (!loader)
                return;
 
-       /* kmalloc should align on a 16 byte boundary..* */
-       isolated_loader = kmalloc(size, GFP_KERNEL);
+       /* the loader must be align on a 16 byte boundary */
+       isolated_loader = (char *)__get_free_pages(GFP_KERNEL, get_order(size));
        if (!isolated_loader)
                return;
 
+       isolated_loader_size = size;
        memcpy(isolated_loader, loader, size);
        printk(KERN_INFO "spufs: SPU isolation mode enabled\n");
 }
@@ -787,16 +791,11 @@ static int __init spufs_init(void)
        ret = register_spu_syscalls(&spufs_calls);
        if (ret)
                goto out_fs;
-       ret = register_arch_coredump_calls(&spufs_coredump_calls);
-       if (ret)
-               goto out_syscalls;
 
        spufs_init_isolated_loader();
 
        return 0;
 
-out_syscalls:
-       unregister_spu_syscalls(&spufs_calls);
 out_fs:
        unregister_filesystem(&spufs_type);
 out_sched:
@@ -812,7 +811,6 @@ static void __exit spufs_exit(void)
 {
        spu_sched_exit();
        spufs_exit_isolated_loader();
-       unregister_arch_coredump_calls(&spufs_coredump_calls);
        unregister_spu_syscalls(&spufs_calls);
        unregister_filesystem(&spufs_type);
        kmem_cache_destroy(spufs_inode_cache);