summaryrefslogtreecommitdiff
path: root/usr/src/cmd/fm
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-06-22 10:30:44 -0700
committerRichard Lowe <richlowe@richlowe.net>2011-06-22 10:30:44 -0700
commit45e662eb8429b38c18931ebeed30f2e5287ae51b (patch)
tree805d29b79d41501d69cb81b92f22f5dd1d3da697 /usr/src/cmd/fm
parentc08b16378bf1d808956fc23b8c8ac30f3172a034 (diff)
downloadillumos-joyent-45e662eb8429b38c18931ebeed30f2e5287ae51b.tar.gz
1759 sun4u floating-point scrubber should be removed
Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Richard Elling <richard.elling@richardelling.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Albert Lee <trisk@nexenta.com> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/cmd/fm')
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h21
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c34
-rw-r--r--usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c1
-rw-r--r--usr/src/cmd/fm/modules/sun4u/Makefile3
-rw-r--r--usr/src/cmd/fm/modules/sun4u/fps-transport/Makefile36
-rw-r--r--usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c178
-rw-r--r--usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.conf25
-rw-r--r--usr/src/cmd/fm/modules/sun4u/fps-transport/fpst-defines.h60
8 files changed, 1 insertions, 357 deletions
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h
index 69702f02e7..80d562ed13 100644
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h
+++ b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpu.h
@@ -26,8 +26,6 @@
#ifndef _CMD_CPU_H
#define _CMD_CPU_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Each CPU of interest has a cmd_cpu_t structure. CPUs become of interest when
* they are the focus of ereports, or when they detect UEs. CPUs may be the
@@ -604,25 +602,6 @@ extern cmd_evdisp_t cmd_fpu(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
const char *, cmd_errcl_t);
-
-/*
- * FPU (FP-Scrubber) errors
- *
- * SERD name
- * Type (if any) Fault
- * ------ --------- -------------------------------
- * FPU - fault.cpu.<cputype>.fpu
- *
- * The expected resolution of FPU faults is the disabling of the CPU
- * indicted in the resource FMRI.
- */
-extern cmd_evdisp_t cmd_fps(fmd_hdl_t *, fmd_event_t *, nvlist_t *,
- const char *, cmd_errcl_t);
-
-
-
-
-
/*
* ireg errors
*
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c
index cfc18df2fa..25ea7bdfb3 100644
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c
+++ b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_cpuerr.c
@@ -171,40 +171,6 @@ CMD_CPU_SIMPLEHANDLER(lfu_ce, lfu, CMD_PTR_CPU_LFU, "", "lfu-f")
CMD_CPU_SIMPLEHANDLER(lfu_pe, lfu, CMD_PTR_CPU_LFU, "", "lfu-p")
-
-/*
- * Fp-scrubber errors
- */
-cmd_evdisp_t
-cmd_fps(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
- const char *class, cmd_errcl_t clcode)
-{
- uint8_t level = clcode & CMD_ERRCL_LEVEL_EXTRACT;
- cmd_cpu_t *cpu;
- nvlist_t *res;
-
- clcode &= CMD_ERRCL_LEVEL_MASK;
-
- /*
- * Ignore the event if resource FMRI is not present. Fp-Scrubber
- * puts the indicted CPU in resource. If resource is not present,
- * we cannot diagnose the ereport. It will simply get logged in
- * errlog for manual analysis, if needed.
- */
- if (nvlist_lookup_nvlist(nvl, "resource", &res))
- return (CMD_EVD_UNUSED);
-
- if ((cpu = cmd_cpu_lookup(hdl, res, class, level)) == NULL ||
- cpu->cpu_faulting)
- return (CMD_EVD_UNUSED);
-
- return (cmd_cpuerr_common(hdl, ep, cpu, &cpu->cpu_fpu,
- CMD_PTR_CPU_FPU, "", "_n", "_t", "fpu", clcode));
-}
-
-
-
-
#ifdef sun4u
/*
* The following macro handles UEs or CPU errors.
diff --git a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c
index 7e1b6855bc..3626650153 100644
--- a/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c
+++ b/usr/src/cmd/fm/modules/sun4/cpumem-diagnosis/cmd_main.c
@@ -237,7 +237,6 @@ static cmd_subscriber_t cmd_subscribers[] = {
{ "ereport.io.oberon.ubc.piorbeue-channel", cmd_nop },
{ "ereport.io.oberon.ubc.piorbeue-cpu", opl_opluecpu_detio },
{ "ereport.io.oberon.ubc.piorbeue-path", cmd_nop },
- { "ereport.cpu.*.fpu.fpscrub", cmd_fps },
#else /* i.e. sun4v */
{ "ereport.cpu.*.irc", cmd_irc },
{ "ereport.cpu.*.iru", cmd_iru },
diff --git a/usr/src/cmd/fm/modules/sun4u/Makefile b/usr/src/cmd/fm/modules/sun4u/Makefile
index 4f6c5d8c3c..4457208b03 100644
--- a/usr/src/cmd/fm/modules/sun4u/Makefile
+++ b/usr/src/cmd/fm/modules/sun4u/Makefile
@@ -22,8 +22,7 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-SUBDIRS = cpumem-diagnosis datapath-retire USII-io-diagnosis fps-transport
+SUBDIRS = cpumem-diagnosis datapath-retire USII-io-diagnosis
include ../../Makefile.subdirs
diff --git a/usr/src/cmd/fm/modules/sun4u/fps-transport/Makefile b/usr/src/cmd/fm/modules/sun4u/fps-transport/Makefile
deleted file mode 100644
index 0082a92a2c..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/fps-transport/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-MODULE = fps-transport
-CLASS = arch
-ARCH = sun4u
-SRCS = fps-transport.c
-
-include ../../Makefile.plugin
-
-CPPFLAGS += -I ../../../fmd/common -I .
-LDLIBS += -lsysevent
diff --git a/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c b/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c
deleted file mode 100644
index e085eb2569..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- */
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <fm/fmd_api.h>
-#include <fmd_module.h>
-#include <fmd_scheme.h>
-#include <fmd.h>
-#include <libnvpair.h>
-#include <libsysevent.h>
-#include <errno.h>
-#include <string.h>
-#include <fpst-defines.h>
-
-static evchan_t *h_event; /* handle for event channel */
-static fmd_xprt_t *h_xprt; /* transport handle */
-static fmd_hdl_t *h_fmd; /* fmd handle */
-
-static const fmd_hdl_ops_t fps_ops = {
- NULL, /* receive */
- NULL, /* timeout */
- NULL, /* close */
- NULL, /* stats */
- NULL /* gc */
-};
-
-static const fmd_hdl_info_t fmd_info = {
- FPS_MOD_DESC,
- FPS_MOD_VER,
- &fps_ops,
- NULL
-};
-
-static struct sysev_stats {
- fmd_stat_t bad_class;
- fmd_stat_t bad_attr;
- fmd_stat_t eagain;
-} sysev_stats = {
- { "bad_class", FMD_TYPE_UINT64,
- "events dropped due to invalid class" },
- { "bad_attr", FMD_TYPE_UINT64,
- "events dropped due to invalid nvlist" },
- { "eagain", FMD_TYPE_UINT64, "events retried due to low memory" },
-};
-
-static sysevent_subattr_t *subattr;
-
-/*
- * event_transfer(sysevent_t *ev, void *arg)
- * takes a sysevent ev, extracts the nvlist of
- * data for an ereport, and posts it to the fmd.
- */
-/* ARGSUSED */
-static int
-event_transfer(sysevent_t *ev, void *arg)
-{
- hrtime_t hrt;
- nvlist_t *retrieved_list;
- uint64_t seq = sysevent_get_seq(ev);
-
- if (strcasecmp(sysevent_get_class_name(ev), CLASS) != 0) {
- fmd_hdl_error(h_fmd, "Discarding event 0x%llx: unexpected"
- " transport class %s\n", seq,
- sysevent_get_class_name(ev));
- sysev_stats.bad_class.fmds_value.ui64++;
-
- return (0);
- }
-
- if (sysevent_get_attr_list(ev, &retrieved_list) == 0) {
- sysevent_get_time(ev, &hrt);
- fmd_xprt_post(h_fmd, h_xprt, retrieved_list, hrt);
- } else {
- if (errno == EAGAIN || errno == ENOMEM) {
- sysev_stats.eagain.fmds_value.ui64++;
- return (EAGAIN);
- }
-
- fmd_hdl_error(h_fmd, "Event: 0x%llx is missing or"
- " has an invalid payload.", seq);
- sysev_stats.bad_attr.fmds_value.ui64++;
-
- }
-
- return (0);
-}
-
-/*
- * _fmd_fini(fmd_hdl_t *handle) is the
- * module exit point. It unsubscribes
- * and unbinds to FPS channel as well
- * as closes fmd transport handle
- */
-/* ARGSUSED */
-void
-_fmd_fini(fmd_hdl_t *handle)
-{
- if (h_event != NULL) {
- (void) sysevent_evc_unsubscribe(h_event, SUBSCRIBE_ID);
- (void) sysevent_evc_unbind(h_event);
- if (subattr != NULL)
- sysevent_subattr_free(subattr);
- }
-
- if (h_fmd != NULL && h_xprt != NULL)
- fmd_xprt_close(h_fmd, h_xprt);
-}
-
-/*
- * _fmd_init(fmd_hdl_t *hdl) is the
- * entry point into the module. It
- * registers the handle hdl and
- * subscribes to the fps sysevent channel.
- */
-void
-_fmd_init(fmd_hdl_t *hdl)
-{
- int ret = 0;
-
- if (fmd_hdl_register(hdl, FMD_API_VERSION, &fmd_info) != 0) {
- return;
- }
-
- (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, sizeof (sysev_stats) /
- sizeof (fmd_stat_t), (fmd_stat_t *)&sysev_stats);
-
- h_xprt = fmd_xprt_open(hdl, FMD_XPRT_RDONLY, NULL, NULL);
- h_fmd = hdl;
-
- if (sysevent_evc_bind(CHANNEL, &h_event, BIND_FLAGS) != 0) {
- fmd_hdl_error(hdl, "Failed to bind to channel %s", CHANNEL);
- fmd_hdl_unregister(hdl);
- }
-
- if ((subattr = sysevent_subattr_alloc()) == NULL)
- fmd_hdl_abort(hdl, "failed to allocate subscription "
- "attributes: %s");
-
- sysevent_subattr_thrcreate(subattr, fmd_doorthr_create, NULL);
- sysevent_subattr_thrsetup(subattr, fmd_doorthr_setup, NULL);
-
- ret = sysevent_evc_xsubscribe(h_event, SUBSCRIBE_ID,
- SUBSCRIBE_FLAGS, event_transfer, NULL, 0, subattr);
- if (ret != 0) {
- if (ret == EEXIST) {
- fmd_hdl_unregister(hdl);
- } else {
- fmd_hdl_error(hdl,
- "Failed to subsrcibe to channel %s", CHANNEL);
- fmd_hdl_unregister(hdl);
- }
- }
-}
diff --git a/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.conf b/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.conf
deleted file mode 100644
index 5ebcc5e08c..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/fps-transport/fps-transport.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#ident "%Z%%M% %I% %E% SMI"
diff --git a/usr/src/cmd/fm/modules/sun4u/fps-transport/fpst-defines.h b/usr/src/cmd/fm/modules/sun4u/fps-transport/fpst-defines.h
deleted file mode 100644
index 40ab51cac3..0000000000
--- a/usr/src/cmd/fm/modules/sun4u/fps-transport/fpst-defines.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _FPST_DEFINES_H
-#define _FPST_DEFINES_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-/*
- * fpst-defines
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BIND_FLAGS EVCH_CREAT | EVCH_HOLD_PEND
-#define CHANNEL "com.sun:sysevent-fpscrubber:channel-fps"
-#define CLASS "FPScrubber"
-#define SUBSCRIBE_FLAGS EC_ALL
-#define SUBSCRIBE_ID "FPS_FMD_MOD"
-#define FPS_MOD_DESC "Solaris FP-Scrubber"
-#define FPS_MOD_VER "1.0"
-#define FAIL_MSG_MAX 100
-
-#define USIII "ultraSPARC-III"
-#define USIIIi "ultraSPARC-IIIi"
-#define USIIIP "ultraSPARC-IIIplus"
-#define USIV "ultraSPARC-IV"
-#define USIVP "ultraSPARC-IVplus"
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _FPST_DEFINES_H */