aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-03-30 16:21:17 -0400
committerChris Metcalf <cmetcalf@tilera.com>2012-05-25 12:48:28 -0400
commit8703d6e0fcfdcc9323d5316a443882e790efc1a6 (patch)
tree922eba4110aa5a0ce5f4d571a8fd29ac8c7e54ae /arch/tile
parentb8ace0833feb308b1cb69d8b33ab08e0602dd2d2 (diff)
arch/tile: allow querying cpu module information from the hypervisor
This just adds a few more attributes to the information Linux can query from the hypervisor for the /sys/hypervisor/board/ directory, providing part, serial#, revision#, and description for cpu modules (as opposed to the board itself, or any mezzanine boards). Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/include/hv/hypervisor.h14
-rw-r--r--arch/tile/kernel/sysfs.c8
2 files changed, 21 insertions, 1 deletions
diff --git a/arch/tile/include/hv/hypervisor.h b/arch/tile/include/hv/hypervisor.h
index 85e5cab4c2f0..ccd847e2347f 100644
--- a/arch/tile/include/hv/hypervisor.h
+++ b/arch/tile/include/hv/hypervisor.h
@@ -508,7 +508,19 @@ typedef enum {
508 HV_CONFSTR_SWITCH_CONTROL = 14, 508 HV_CONFSTR_SWITCH_CONTROL = 14,
509 509
510 /** Chip revision level. */ 510 /** Chip revision level. */
511 HV_CONFSTR_CHIP_REV = 15 511 HV_CONFSTR_CHIP_REV = 15,
512
513 /** CPU module part number. */
514 HV_CONFSTR_CPUMOD_PART_NUM = 16,
515
516 /** CPU module serial number. */
517 HV_CONFSTR_CPUMOD_SERIAL_NUM = 17,
518
519 /** CPU module revision level. */
520 HV_CONFSTR_CPUMOD_REV = 18,
521
522 /** Human-readable CPU module description. */
523 HV_CONFSTR_CPUMOD_DESC = 19
512 524
513} HV_ConfstrQuery; 525} HV_ConfstrQuery;
514 526
diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c
index 71ae728e9d0b..e25b0a89c18f 100644
--- a/arch/tile/kernel/sysfs.c
+++ b/arch/tile/kernel/sysfs.c
@@ -93,6 +93,10 @@ HV_CONF_ATTR(mezz_part, HV_CONFSTR_MEZZ_PART_NUM)
93HV_CONF_ATTR(mezz_serial, HV_CONFSTR_MEZZ_SERIAL_NUM) 93HV_CONF_ATTR(mezz_serial, HV_CONFSTR_MEZZ_SERIAL_NUM)
94HV_CONF_ATTR(mezz_revision, HV_CONFSTR_MEZZ_REV) 94HV_CONF_ATTR(mezz_revision, HV_CONFSTR_MEZZ_REV)
95HV_CONF_ATTR(mezz_description, HV_CONFSTR_MEZZ_DESC) 95HV_CONF_ATTR(mezz_description, HV_CONFSTR_MEZZ_DESC)
96HV_CONF_ATTR(cpumod_part, HV_CONFSTR_CPUMOD_PART_NUM)
97HV_CONF_ATTR(cpumod_serial, HV_CONFSTR_CPUMOD_SERIAL_NUM)
98HV_CONF_ATTR(cpumod_revision, HV_CONFSTR_CPUMOD_REV)
99HV_CONF_ATTR(cpumod_description,HV_CONFSTR_CPUMOD_DESC)
96HV_CONF_ATTR(switch_control, HV_CONFSTR_SWITCH_CONTROL) 100HV_CONF_ATTR(switch_control, HV_CONFSTR_SWITCH_CONTROL)
97 101
98static struct attribute *board_attrs[] = { 102static struct attribute *board_attrs[] = {
@@ -104,6 +108,10 @@ static struct attribute *board_attrs[] = {
104 &dev_attr_mezz_serial.attr, 108 &dev_attr_mezz_serial.attr,
105 &dev_attr_mezz_revision.attr, 109 &dev_attr_mezz_revision.attr,
106 &dev_attr_mezz_description.attr, 110 &dev_attr_mezz_description.attr,
111 &dev_attr_cpumod_part.attr,
112 &dev_attr_cpumod_serial.attr,
113 &dev_attr_cpumod_revision.attr,
114 &dev_attr_cpumod_description.attr,
107 &dev_attr_switch_control.attr, 115 &dev_attr_switch_control.attr,
108 NULL 116 NULL
109}; 117};