diff options
author | Robert Richter <robert.richter@amd.com> | 2010-10-01 08:54:17 +0200 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-10-01 08:54:17 +0200 |
commit | ef70fcc0cd5d98f5e2df82c9e598b47f351d4f66 (patch) | |
tree | b801ba4d7ebb1155df68d530df49444ffa6252cc /arch/x86/oprofile | |
parent | 4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb (diff) | |
parent | 98d943b02f6f1b57787ff1aa6f34d019a407e3ee (diff) | |
download | op-kernel-dev-ef70fcc0cd5d98f5e2df82c9e598b47f351d4f66.zip op-kernel-dev-ef70fcc0cd5d98f5e2df82c9e598b47f351d4f66.tar.gz |
Merge branch 'oprofile/urgent' into oprofile/core
Conflicts:
arch/arm/oprofile/common.c
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index f6b48f6..f1575c9 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@ -568,8 +568,13 @@ static int __init init_sysfs(void) int error; error = sysdev_class_register(&oprofile_sysclass); - if (!error) - error = sysdev_register(&device_oprofile); + if (error) + return error; + + error = sysdev_register(&device_oprofile); + if (error) + sysdev_class_unregister(&oprofile_sysclass); + return error; } @@ -580,8 +585,10 @@ static void exit_sysfs(void) } #else -#define init_sysfs() do { } while (0) -#define exit_sysfs() do { } while (0) + +static inline int init_sysfs(void) { return 0; } +static inline void exit_sysfs(void) { } + #endif /* CONFIG_PM */ static int __init p4_init(char **cpu_type) @@ -664,7 +671,10 @@ static int __init ppro_init(char **cpu_type) case 14: *cpu_type = "i386/core"; break; - case 15: case 23: + case 0x0f: + case 0x16: + case 0x17: + case 0x1d: *cpu_type = "i386/core_2"; break; case 0x1a: @@ -695,6 +705,8 @@ int __init op_nmi_init(struct oprofile_operations *ops) char *cpu_type = NULL; int ret = 0; + using_nmi = 0; + if (!cpu_has_apic) return -ENODEV; @@ -774,7 +786,10 @@ int __init op_nmi_init(struct oprofile_operations *ops) mux_init(ops); - init_sysfs(); + ret = init_sysfs(); + if (ret) + return ret; + using_nmi = 1; printk(KERN_INFO "oprofile: using NMI interrupt.\n"); return 0; |