diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-12 14:39:22 -0400 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-09-03 14:51:36 -0400 |
| commit | 80f184108e364ba1d08dd77339966034c9a9243e (patch) | |
| tree | 5ec0337b5f0184e886d12392704289deeb6acd5b /arch/tile/include/hv | |
| parent | 8157107b13099d6eb2e8ccd00b9aba009c698c38 (diff) | |
tile: support reporting Tilera hypervisor statistics
Newer hypervisors have an API for reporting per-cpu statistics
information. This change allows seeing that information via
/sys/devices/system/cpu/cpuN/hv_stats file for each core.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/include/hv')
| -rw-r--r-- | arch/tile/include/hv/hypervisor.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/tile/include/hv/hypervisor.h b/arch/tile/include/hv/hypervisor.h index 0971ebbde1b7..dfcdeb61ba34 100644 --- a/arch/tile/include/hv/hypervisor.h +++ b/arch/tile/include/hv/hypervisor.h | |||
| @@ -544,14 +544,24 @@ typedef enum { | |||
| 544 | HV_CONFSTR_CPUMOD_REV = 18, | 544 | HV_CONFSTR_CPUMOD_REV = 18, |
| 545 | 545 | ||
| 546 | /** Human-readable CPU module description. */ | 546 | /** Human-readable CPU module description. */ |
| 547 | HV_CONFSTR_CPUMOD_DESC = 19 | 547 | HV_CONFSTR_CPUMOD_DESC = 19, |
| 548 | |||
| 549 | /** Per-tile hypervisor statistics. When this identifier is specified, | ||
| 550 | * the hv_confstr call takes two extra arguments. The first is the | ||
| 551 | * HV_XY_TO_LOTAR of the target tile's coordinates. The second is | ||
| 552 | * a flag word. The only current flag is the lowest bit, which means | ||
| 553 | * "zero out the stats instead of retrieving them"; in this case the | ||
| 554 | * buffer and buffer length are ignored. */ | ||
| 555 | HV_CONFSTR_HV_STATS = 20 | ||
| 548 | 556 | ||
| 549 | } HV_ConfstrQuery; | 557 | } HV_ConfstrQuery; |
| 550 | 558 | ||
| 551 | /** Query a configuration string from the hypervisor. | 559 | /** Query a configuration string from the hypervisor. |
| 552 | * | 560 | * |
| 553 | * @param query Identifier for the specific string to be retrieved | 561 | * @param query Identifier for the specific string to be retrieved |
| 554 | * (HV_CONFSTR_xxx). | 562 | * (HV_CONFSTR_xxx). Some strings may require or permit extra |
| 563 | * arguments to be appended which select specific objects to be | ||
| 564 | * described; see the string descriptions above. | ||
| 555 | * @param buf Buffer in which to place the string. | 565 | * @param buf Buffer in which to place the string. |
| 556 | * @param len Length of the buffer. | 566 | * @param len Length of the buffer. |
| 557 | * @return If query is valid, then the length of the corresponding string, | 567 | * @return If query is valid, then the length of the corresponding string, |
| @@ -559,7 +569,7 @@ typedef enum { | |||
| 559 | * was truncated. If query is invalid, HV_EINVAL. If the specified | 569 | * was truncated. If query is invalid, HV_EINVAL. If the specified |
| 560 | * buffer is not writable by the client, HV_EFAULT. | 570 | * buffer is not writable by the client, HV_EFAULT. |
| 561 | */ | 571 | */ |
| 562 | int hv_confstr(HV_ConfstrQuery query, HV_VirtAddr buf, int len); | 572 | int hv_confstr(HV_ConfstrQuery query, HV_VirtAddr buf, int len, ...); |
| 563 | 573 | ||
| 564 | /** Tile coordinate */ | 574 | /** Tile coordinate */ |
| 565 | typedef struct | 575 | typedef struct |
