diff options
-rw-r--r-- | arch/powerpc/kernel/lparcfg.c | 20 | ||||
-rw-r--r-- | include/asm-powerpc/lppaca.h | 5 |
2 files changed, 24 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index d82e1fa5ce2a..848c3e5a6370 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -409,6 +409,25 @@ static int lparcfg_count_active_processors(void) | |||
409 | return count; | 409 | return count; |
410 | } | 410 | } |
411 | 411 | ||
412 | static void pseries_cmo_data(struct seq_file *m) | ||
413 | { | ||
414 | int cpu; | ||
415 | unsigned long cmo_faults = 0; | ||
416 | unsigned long cmo_fault_time = 0; | ||
417 | |||
418 | if (!firmware_has_feature(FW_FEATURE_CMO)) | ||
419 | return; | ||
420 | |||
421 | for_each_possible_cpu(cpu) { | ||
422 | cmo_faults += lppaca[cpu].cmo_faults; | ||
423 | cmo_fault_time += lppaca[cpu].cmo_fault_time; | ||
424 | } | ||
425 | |||
426 | seq_printf(m, "cmo_faults=%lu\n", cmo_faults); | ||
427 | seq_printf(m, "cmo_fault_time_usec=%lu\n", | ||
428 | cmo_fault_time / tb_ticks_per_usec); | ||
429 | } | ||
430 | |||
412 | static int pseries_lparcfg_data(struct seq_file *m, void *v) | 431 | static int pseries_lparcfg_data(struct seq_file *m, void *v) |
413 | { | 432 | { |
414 | int partition_potential_processors; | 433 | int partition_potential_processors; |
@@ -434,6 +453,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) | |||
434 | parse_system_parameter_string(m); | 453 | parse_system_parameter_string(m); |
435 | parse_ppp_data(m); | 454 | parse_ppp_data(m); |
436 | parse_mpp_data(m); | 455 | parse_mpp_data(m); |
456 | pseries_cmo_data(m); | ||
437 | 457 | ||
438 | seq_printf(m, "purr=%ld\n", get_purr()); | 458 | seq_printf(m, "purr=%ld\n", get_purr()); |
439 | } else { /* non SPLPAR case */ | 459 | } else { /* non SPLPAR case */ |
diff --git a/include/asm-powerpc/lppaca.h b/include/asm-powerpc/lppaca.h index 567ed92cd91f..2fe268b10333 100644 --- a/include/asm-powerpc/lppaca.h +++ b/include/asm-powerpc/lppaca.h | |||
@@ -125,7 +125,10 @@ struct lppaca { | |||
125 | // NOTE: This value will ALWAYS be zero for dedicated processors and | 125 | // NOTE: This value will ALWAYS be zero for dedicated processors and |
126 | // will NEVER be zero for shared processors (ie, initialized to a 1). | 126 | // will NEVER be zero for shared processors (ie, initialized to a 1). |
127 | volatile u32 yield_count; // PLIC increments each dispatchx00-x03 | 127 | volatile u32 yield_count; // PLIC increments each dispatchx00-x03 |
128 | u8 reserved6[124]; // Reserved x04-x7F | 128 | u32 reserved6; |
129 | volatile u64 cmo_faults; // CMO page fault count x08-x0F | ||
130 | volatile u64 cmo_fault_time; // CMO page fault time x10-x17 | ||
131 | u8 reserved7[104]; // Reserved x18-x7F | ||
129 | 132 | ||
130 | //============================================================================= | 133 | //============================================================================= |
131 | // CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data | 134 | // CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data |