aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/include/hv
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-08-12 14:39:22 -0400
committerChris Metcalf <cmetcalf@tilera.com>2013-09-03 14:51:36 -0400
commit80f184108e364ba1d08dd77339966034c9a9243e (patch)
tree5ec0337b5f0184e886d12392704289deeb6acd5b /arch/tile/include/hv
parenttilegx: support KGDB (diff)
downloadlinux-dev-80f184108e364ba1d08dd77339966034c9a9243e.tar.xz
linux-dev-80f184108e364ba1d08dd77339966034c9a9243e.zip
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.h16
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 {
HV_CONFSTR_CPUMOD_REV = 18,
/** Human-readable CPU module description. */
- HV_CONFSTR_CPUMOD_DESC = 19
+ HV_CONFSTR_CPUMOD_DESC = 19,
+
+ /** Per-tile hypervisor statistics. When this identifier is specified,
+ * the hv_confstr call takes two extra arguments. The first is the
+ * HV_XY_TO_LOTAR of the target tile's coordinates. The second is
+ * a flag word. The only current flag is the lowest bit, which means
+ * "zero out the stats instead of retrieving them"; in this case the
+ * buffer and buffer length are ignored. */
+ HV_CONFSTR_HV_STATS = 20
} HV_ConfstrQuery;
/** Query a configuration string from the hypervisor.
*
* @param query Identifier for the specific string to be retrieved
- * (HV_CONFSTR_xxx).
+ * (HV_CONFSTR_xxx). Some strings may require or permit extra
+ * arguments to be appended which select specific objects to be
+ * described; see the string descriptions above.
* @param buf Buffer in which to place the string.
* @param len Length of the buffer.
* @return If query is valid, then the length of the corresponding string,
@@ -559,7 +569,7 @@ typedef enum {
* was truncated. If query is invalid, HV_EINVAL. If the specified
* buffer is not writable by the client, HV_EFAULT.
*/
-int hv_confstr(HV_ConfstrQuery query, HV_VirtAddr buf, int len);
+int hv_confstr(HV_ConfstrQuery query, HV_VirtAddr buf, int len, ...);
/** Tile coordinate */
typedef struct