diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 20 | ||||
-rw-r--r-- | arch/powerpc/oprofile/common.c | 28 |
2 files changed, 24 insertions, 24 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index f55e14cd1762..07c0106fab76 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -825,39 +825,39 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, #endif #ifdef CONFIG_KVM_MPIC case KVM_CAP_IRQ_MPIC: { - struct file *filp; + struct fd f; struct kvm_device *dev; r = -EBADF; - filp = fget(cap->args[0]); - if (!filp) + f = fdget(cap->args[0]); + if (!f.file) break; r = -EPERM; - dev = kvm_device_from_filp(filp); + dev = kvm_device_from_filp(f.file); if (dev) r = kvmppc_mpic_connect_vcpu(dev, vcpu, cap->args[1]); - fput(filp); + fdput(f); break; } #endif #ifdef CONFIG_KVM_XICS case KVM_CAP_IRQ_XICS: { - struct file *filp; + struct fd f; struct kvm_device *dev; r = -EBADF; - filp = fget(cap->args[0]); - if (!filp) + f = fdget(cap->args[0]); + if (!f.file) break; r = -EPERM; - dev = kvm_device_from_filp(filp); + dev = kvm_device_from_filp(f.file); if (dev) r = kvmppc_xics_connect_vcpu(dev, vcpu, cap->args[1]); - fput(filp); + fdput(f); break; } #endif /* CONFIG_KVM_XICS */ diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c index 4f51025f5b00..c77348c5d463 100644 --- a/arch/powerpc/oprofile/common.c +++ b/arch/powerpc/oprofile/common.c @@ -119,7 +119,7 @@ static void op_powerpc_stop(void) model->global_stop(); } -static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) +static int op_powerpc_create_files(struct dentry *root) { int i; @@ -128,9 +128,9 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) * There is one mmcr0, mmcr1 and mmcra for setting the events for * all of the counters. */ - oprofilefs_create_ulong(sb, root, "mmcr0", &sys.mmcr0); - oprofilefs_create_ulong(sb, root, "mmcr1", &sys.mmcr1); - oprofilefs_create_ulong(sb, root, "mmcra", &sys.mmcra); + oprofilefs_create_ulong(root, "mmcr0", &sys.mmcr0); + oprofilefs_create_ulong(root, "mmcr1", &sys.mmcr1); + oprofilefs_create_ulong(root, "mmcra", &sys.mmcra); #ifdef CONFIG_OPROFILE_CELL /* create a file the user tool can check to see what level of profiling * support exits with this kernel. Initialize bit mask to indicate @@ -142,7 +142,7 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) * If the file does not exist, then the kernel only supports SPU * cycle profiling, PPU event and cycle profiling. */ - oprofilefs_create_ulong(sb, root, "cell_support", &sys.cell_support); + oprofilefs_create_ulong(root, "cell_support", &sys.cell_support); sys.cell_support = 0x1; /* Note, the user OProfile tool must check * that this bit is set before attempting to * user SPU event profiling. Older kernels @@ -160,11 +160,11 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) char buf[4]; snprintf(buf, sizeof buf, "%d", i); - dir = oprofilefs_mkdir(sb, root, buf); + dir = oprofilefs_mkdir(root, buf); - oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); - oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); - oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); + oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled); + oprofilefs_create_ulong(dir, "event", &ctr[i].event); + oprofilefs_create_ulong(dir, "count", &ctr[i].count); /* * Classic PowerPC doesn't support per-counter @@ -173,14 +173,14 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) * Book-E style performance monitors, we do * support them. */ - oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); - oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); + oprofilefs_create_ulong(dir, "kernel", &ctr[i].kernel); + oprofilefs_create_ulong(dir, "user", &ctr[i].user); - oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); + oprofilefs_create_ulong(dir, "unit_mask", &ctr[i].unit_mask); } - oprofilefs_create_ulong(sb, root, "enable_kernel", &sys.enable_kernel); - oprofilefs_create_ulong(sb, root, "enable_user", &sys.enable_user); + oprofilefs_create_ulong(root, "enable_kernel", &sys.enable_kernel); + oprofilefs_create_ulong(root, "enable_user", &sys.enable_user); /* Default to tracing both kernel and user */ sys.enable_kernel = 1; |