diff options
author | vn83148 <none@none> | 2008-05-27 11:31:22 -0700 |
---|---|---|
committer | vn83148 <none@none> | 2008-05-27 11:31:22 -0700 |
commit | 9d2d3daa90dc2bc61e6773e7aa4dc4930f1fb20a (patch) | |
tree | ec6f04d46d25784b65971c26e5c263e0b60acd45 /usr/src | |
parent | 6f0cf5c5190ad670dce7fd4f4e1a5778dfe387d3 (diff) | |
download | illumos-gate-9d2d3daa90dc2bc61e6773e7aa4dc4930f1fb20a.tar.gz |
6701530 Long pauses with "fmadm faulty" with LDOMs enabled
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c b/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c index c5c828baea..bda8d6e787 100644 --- a/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c +++ b/usr/src/lib/fm/topo/modules/sun4v/platform-cpu/cpu.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -162,7 +162,7 @@ cpu_present(topo_mod_t *mod, tnode_t *node, topo_version_t vers, * Otherwise, the cpu is identified by the <cpuid>. */ if ((mcmp = cpu_find_cpumap(chip, cpuid)) != NULL) { - if (nvlist_lookup_uint64(in, FM_FMRI_CPU_SERIAL_ID, &nvlserid) \ + if (nvlist_lookup_uint64(in, FM_FMRI_CPU_SERIAL_ID, &nvlserid) == 0) present = nvlserid == mcmp->cpumap_serialno; else @@ -259,6 +259,10 @@ cpu_unusable(topo_mod_t *mod, tnode_t *node, topo_version_t vers, int status; uint32_t cpuid; ldom_hdl_t *lhp; + uint64_t nvlserid; + uint32_t present = 0; + md_cpumap_t *mcmp; + md_info_t *chip = (md_info_t *)topo_mod_getspecific(mod); if (nvlist_lookup_uint8(in, FM_VERSION, &version) != 0 || version > FM_CPU_SCHEME_VERSION || @@ -266,6 +270,20 @@ cpu_unusable(topo_mod_t *mod, tnode_t *node, topo_version_t vers, return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); } + /* + * Check the cpu presence + */ + if ((mcmp = cpu_find_cpumap(chip, cpuid)) != NULL) { + if (nvlist_lookup_uint64(in, FM_FMRI_CPU_SERIAL_ID, &nvlserid) + == 0) + present = nvlserid == mcmp->cpumap_serialno; + else + present = 1; + } + if (present == 0) { + return (topo_mod_seterrno(mod, EMOD_NVL_INVAL)); + } + lhp = ldom_init(cpu_alloc, cpu_free); if (lhp == NULL) { return (topo_mod_seterrno(mod, EMOD_NOMEM)); |