Removed metric --ecc & --ecc-blocks commands from VM

ecc is not supported on VM
	Added static --ras because ras features are still detectable

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ied4132b863989dfd67897e00904f04d140fd2773


[ROCm/amdsmi commit: 210680b570]
Этот коммит содержится в:
Maisam Arif
2024-08-08 00:34:05 -05:00
родитель b0c05aa04d
Коммит 1eaf218f2f
2 изменённых файлов: 19 добавлений и 11 удалений
+15 -10
Просмотреть файл
@@ -293,6 +293,8 @@ class AMDSMICommands():
args.board = board
if driver:
args.driver = driver
if ras:
args.ras = ras
if vram:
args.vram = vram
if cache:
@@ -301,14 +303,12 @@ class AMDSMICommands():
args.process_isolation = process_isolation
# Store args that are applicable to the current platform
current_platform_args = ["asic", "bus", "vbios", "driver", "vram", "cache",
"board", "process_isolation"]
current_platform_values = [args.asic, args.bus, args.vbios, args.driver, args.vram, args.cache,
args.board, args.process_isolation]
current_platform_args = ["asic", "bus", "vbios", "driver", "ras",
"vram", "cache", "board", "process_isolation"]
current_platform_values = [args.asic, args.bus, args.vbios, args.driver, args.ras,
args.vram, args.cache, args.board, args.process_isolation]
if self.helpers.is_linux() and self.helpers.is_baremetal():
if ras:
args.ras = ras
if partition:
args.partition = partition
if limit:
@@ -1191,14 +1191,19 @@ class AMDSMICommands():
args.clock = clock
if temperature:
args.temperature = temperature
if pcie:
args.pcie = pcie
current_platform_args += ["usage", "power", "clock", "temperature", "pcie"]
current_platform_values += [args.usage, args.power, args.clock, args.temperature, args.pcie]
# Only args that are applicable to Hypervisors and BM Linux
if self.helpers.is_hypervisor() and (self.helpers.is_baremetal() and self.helpers.is_linux()):
if ecc:
args.ecc = ecc
if ecc_blocks:
args.ecc_blocks = ecc_blocks
if pcie:
args.pcie = pcie
current_platform_args += ["usage", "power", "clock", "temperature", "ecc", "ecc_blocks", "pcie"]
current_platform_values += [args.usage, args.power, args.clock, args.temperature, args.ecc, args.ecc_blocks, args.pcie]
current_platform_args += ["ecc", "ecc_blocks"]
current_platform_values += [args.ecc, args.ecc_blocks]
if self.helpers.is_baremetal() and self.helpers.is_linux():
if fan:
+4 -1
Просмотреть файл
@@ -620,10 +620,10 @@ class AMDSMIParser(argparse.ArgumentParser):
static_parser.add_argument('-c', '--cache', action='store_true', required=False, help=cache_help)
static_parser.add_argument('-B', '--board', action='store_true', required=False, help=board_help)
static_parser.add_argument('-R', '--process-isolation', action='store_true', required=False, help=process_isolation_help)
static_parser.add_argument('-r', '--ras', action='store_true', required=False, help=ras_help)
# Options to display on Hypervisors and Baremetal
if self.helpers.is_hypervisor() or self.helpers.is_baremetal():
static_parser.add_argument('-r', '--ras', action='store_true', required=False, help=ras_help)
static_parser.add_argument('-p', '--partition', action='store_true', required=False, help=partition_help)
static_parser.add_argument('-l', '--limit', action='store_true', required=False, help=limit_help)
static_parser.add_argument('-P', '--soc-pstate', action='store_true', required=False, help=soc_pstate_help)
@@ -804,6 +804,9 @@ class AMDSMIParser(argparse.ArgumentParser):
metric_parser.add_argument('-c', '--clock', action='store_true', required=False, help=clock_help)
metric_parser.add_argument('-t', '--temperature', action='store_true', required=False, help=temperature_help)
metric_parser.add_argument('-P', '--pcie', action='store_true', required=False, help=pcie_help)
# Options that only apply to Hypervisors and Baremetal Linux
if self.helpers.is_hypervisor() or (self.helpers.is_baremetal() and self.helpers.is_linux()):
metric_parser.add_argument('-e', '--ecc', action='store_true', required=False, help=ecc_help)
metric_parser.add_argument('-k', '--ecc-blocks', action='store_true', required=False, help=ecc_blocks_help)