Commit ce5e5540 authored by Markus Metzger's avatar Markus Metzger Committed by Ingo Molnar

x86, ds, bts: cleanup DS configuration

Cleanup the cpuid check for DS configuration.
Signed-off-by: default avatarMarkus Metzger <markus.t.metzger@intel.com>
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e2ea5399
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
* - buffer allocation (memory accounting) * - buffer allocation (memory accounting)
* *
* *
* Copyright (C) 2007-2008 Intel Corporation. * Copyright (C) 2007-2009 Intel Corporation.
* Markus Metzger <markus.t.metzger@intel.com>, 2007-2008 * Markus Metzger <markus.t.metzger@intel.com>, 2007-2009
*/ */
...@@ -890,7 +890,7 @@ int ds_set_pebs_reset(struct pebs_tracer *tracer, u64 value) ...@@ -890,7 +890,7 @@ int ds_set_pebs_reset(struct pebs_tracer *tracer, u64 value)
} }
static const struct ds_configuration ds_cfg_netburst = { static const struct ds_configuration ds_cfg_netburst = {
.name = "netburst", .name = "Netburst",
.ctl[dsf_bts] = (1 << 2) | (1 << 3), .ctl[dsf_bts] = (1 << 2) | (1 << 3),
.ctl[dsf_bts_kernel] = (1 << 5), .ctl[dsf_bts_kernel] = (1 << 5),
.ctl[dsf_bts_user] = (1 << 6), .ctl[dsf_bts_user] = (1 << 6),
...@@ -904,7 +904,7 @@ static const struct ds_configuration ds_cfg_netburst = { ...@@ -904,7 +904,7 @@ static const struct ds_configuration ds_cfg_netburst = {
#endif #endif
}; };
static const struct ds_configuration ds_cfg_pentium_m = { static const struct ds_configuration ds_cfg_pentium_m = {
.name = "pentium m", .name = "Pentium M",
.ctl[dsf_bts] = (1 << 6) | (1 << 7), .ctl[dsf_bts] = (1 << 6) | (1 << 7),
.sizeof_field = sizeof(long), .sizeof_field = sizeof(long),
...@@ -915,8 +915,8 @@ static const struct ds_configuration ds_cfg_pentium_m = { ...@@ -915,8 +915,8 @@ static const struct ds_configuration ds_cfg_pentium_m = {
.sizeof_rec[ds_pebs] = sizeof(long) * 18, .sizeof_rec[ds_pebs] = sizeof(long) * 18,
#endif #endif
}; };
static const struct ds_configuration ds_cfg_core2 = { static const struct ds_configuration ds_cfg_core2_atom = {
.name = "core 2", .name = "Core 2/Atom",
.ctl[dsf_bts] = (1 << 6) | (1 << 7), .ctl[dsf_bts] = (1 << 6) | (1 << 7),
.ctl[dsf_bts_kernel] = (1 << 9), .ctl[dsf_bts_kernel] = (1 << 9),
.ctl[dsf_bts_user] = (1 << 10), .ctl[dsf_bts_user] = (1 << 10),
...@@ -949,19 +949,22 @@ void __cpuinit ds_init_intel(struct cpuinfo_x86 *c) ...@@ -949,19 +949,22 @@ void __cpuinit ds_init_intel(struct cpuinfo_x86 *c)
switch (c->x86) { switch (c->x86) {
case 0x6: case 0x6:
switch (c->x86_model) { switch (c->x86_model) {
case 0 ... 0xC: case 0x9:
/* sorry, don't know about them */ case 0xd: /* Pentium M */
break;
case 0xD:
case 0xE: /* Pentium M */
ds_configure(&ds_cfg_pentium_m); ds_configure(&ds_cfg_pentium_m);
break; break;
default: /* Core2, Atom, ... */ case 0xf:
ds_configure(&ds_cfg_core2); case 0x17: /* Core2 */
case 0x1c: /* Atom */
ds_configure(&ds_cfg_core2_atom);
break;
case 0x1a: /* i7 */
default:
/* sorry, don't know about them */
break; break;
} }
break; break;
case 0xF: case 0xf:
switch (c->x86_model) { switch (c->x86_model) {
case 0x0: case 0x0:
case 0x1: case 0x1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment