Print this page
patch tsoome-feedback


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #pragma ident   "%Z%%M% %I%     %E% SMI"
  28 
  29 /*
  30  * OPL platform specific functions for
  31  * CPU/Memory error diagnosis engine.
  32  */
  33 #include <cmd.h>
  34 #include <cmd_dimm.h>
  35 #include <cmd_bank.h>
  36 #include <cmd_page.h>
  37 #include <cmd_opl.h>
  38 #include <string.h>
  39 #include <errno.h>
  40 #include <fcntl.h>
  41 #include <unistd.h>
  42 #include <dirent.h>
  43 #include <sys/stat.h>
  44 
  45 #include <sys/fm/protocol.h>
  46 #include <sys/fm/io/opl_mc_fm.h>
  47 #include <sys/async.h>
  48 #include <sys/opl_olympus_regs.h>


 163                     IS_STRAND);
 164 
 165         for (opl_cpu = cmd_list_next(cpu_list); opl_cpu != NULL;
 166             opl_cpu = cmd_list_next(opl_cpu)) {
 167                 if (opl_cpu->oc_cpuid == main_cpuid) {
 168                         sib_cpu = main_cpu;
 169                         opl_cpu->oc_cmd_cpu = main_cpu;
 170                 } else {
 171                         fmri = cmd_cpu_fmri_create(opl_cpu->oc_cpuid, cpumask);
 172                         if (fmri == NULL) {
 173                                 opl_cpu->oc_cmd_cpu = NULL;
 174                                 fmd_hdl_debug(hdl,
 175                                     "missing asru, cpuid %u excluded\n",
 176                                     opl_cpu->oc_cpuid);
 177                                 continue;
 178                         }
 179 
 180                         sib_cpu = cmd_cpu_lookup(hdl, fmri, class,
 181                             CMD_CPU_LEVEL_THREAD);
 182                         if (sib_cpu == NULL || sib_cpu->cpu_faulting) {
 183                                 if (fmri != NULL)
 184                                         nvlist_free(fmri);
 185                                 opl_cpu->oc_cmd_cpu = NULL;
 186                                 fmd_hdl_debug(hdl,
 187                                 "cpu not present, cpuid %u excluded\n",
 188                                     opl_cpu->oc_cpuid);
 189                                 continue;
 190                         }
 191                         opl_cpu->oc_cmd_cpu = sib_cpu;
 192                         if (fmri != NULL)
 193                                 nvlist_free(fmri);
 194                         nsusp++;
 195                 }
 196                 if (cpu->cpu_cpuid == main_cpuid) {
 197                         if (cc->cc_cp != NULL &&
 198                             fmd_case_solved(hdl, cc->cc_cp)) {
 199                                 if (cpu_list != NULL)
 200                                         opl_cpulist_free(hdl, cpu_list);
 201                                 return (CMD_EVD_REDUND);
 202                         }
 203 
 204                         if (cc->cc_cp == NULL)
 205                                 cc->cc_cp = cmd_case_create(hdl,
 206                                     &cpu->cpu_header, ptr, &uuid);
 207 
 208                         if (cc->cc_serdnm != NULL) {
 209                                 fmd_hdl_debug(hdl,
 210                         "destroying existing %s state for class %x\n",
 211                                     cc->cc_serdnm, class);
 212                                 fmd_serd_destroy(hdl, cc->cc_serdnm);




   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 


  27 /*
  28  * OPL platform specific functions for
  29  * CPU/Memory error diagnosis engine.
  30  */
  31 #include <cmd.h>
  32 #include <cmd_dimm.h>
  33 #include <cmd_bank.h>
  34 #include <cmd_page.h>
  35 #include <cmd_opl.h>
  36 #include <string.h>
  37 #include <errno.h>
  38 #include <fcntl.h>
  39 #include <unistd.h>
  40 #include <dirent.h>
  41 #include <sys/stat.h>
  42 
  43 #include <sys/fm/protocol.h>
  44 #include <sys/fm/io/opl_mc_fm.h>
  45 #include <sys/async.h>
  46 #include <sys/opl_olympus_regs.h>


 161                     IS_STRAND);
 162 
 163         for (opl_cpu = cmd_list_next(cpu_list); opl_cpu != NULL;
 164             opl_cpu = cmd_list_next(opl_cpu)) {
 165                 if (opl_cpu->oc_cpuid == main_cpuid) {
 166                         sib_cpu = main_cpu;
 167                         opl_cpu->oc_cmd_cpu = main_cpu;
 168                 } else {
 169                         fmri = cmd_cpu_fmri_create(opl_cpu->oc_cpuid, cpumask);
 170                         if (fmri == NULL) {
 171                                 opl_cpu->oc_cmd_cpu = NULL;
 172                                 fmd_hdl_debug(hdl,
 173                                     "missing asru, cpuid %u excluded\n",
 174                                     opl_cpu->oc_cpuid);
 175                                 continue;
 176                         }
 177 
 178                         sib_cpu = cmd_cpu_lookup(hdl, fmri, class,
 179                             CMD_CPU_LEVEL_THREAD);
 180                         if (sib_cpu == NULL || sib_cpu->cpu_faulting) {

 181                                 nvlist_free(fmri);
 182                                 opl_cpu->oc_cmd_cpu = NULL;
 183                                 fmd_hdl_debug(hdl,
 184                                 "cpu not present, cpuid %u excluded\n",
 185                                     opl_cpu->oc_cpuid);
 186                                 continue;
 187                         }
 188                         opl_cpu->oc_cmd_cpu = sib_cpu;

 189                         nvlist_free(fmri);
 190                         nsusp++;
 191                 }
 192                 if (cpu->cpu_cpuid == main_cpuid) {
 193                         if (cc->cc_cp != NULL &&
 194                             fmd_case_solved(hdl, cc->cc_cp)) {
 195                                 if (cpu_list != NULL)
 196                                         opl_cpulist_free(hdl, cpu_list);
 197                                 return (CMD_EVD_REDUND);
 198                         }
 199 
 200                         if (cc->cc_cp == NULL)
 201                                 cc->cc_cp = cmd_case_create(hdl,
 202                                     &cpu->cpu_header, ptr, &uuid);
 203 
 204                         if (cc->cc_serdnm != NULL) {
 205                                 fmd_hdl_debug(hdl,
 206                         "destroying existing %s state for class %x\n",
 207                                     cc->cc_serdnm, class);
 208                                 fmd_serd_destroy(hdl, cc->cc_serdnm);