From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jack Steiner <steiner@sgi.com>,
linux-kernel@vger.kernel.org, Tony Luck <tony.luck@intel.com>
Subject: [PATCH 6/6] ia64 UV: Use blinking LED for heartbeat display
Date: Thu, 07 Aug 2008 17:56:45 -0700 [thread overview]
Message-ID: <20080808005702.704046000@polaris-admin.engr.sgi.com> (raw)
In-Reply-To: <20080808005639.505189000@polaris-admin.engr.sgi.com>
[-- Attachment #1: uv_led_display_hb_ia64 --]
[-- Type: text/plain, Size: 2674 bytes --]
* Add a function to blink the "heartbeat" LED indicating
that the CPU is responding to timer interrupts.
* Introduces a callback for "heartbeat" display in the
clocksource_watchdog function, which in turn requires
CONFIG_CLOCKSOURCE_WATCHDOG to be set.
Note that this is a RAS feature that allows external monitoring of
various cpu state indicators, not just providing "pretty blinking
lights", as the LED state is readable by the system controller.
Based on linux-2.6.tip/master.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Tony Luck <tony.luck@intel.com>
---
arch/ia64/uv/kernel/setup.c | 28 ++++++++++++++++++++++++++++
include/asm-ia64/uv/uv_hub.h | 4 ++++
2 files changed, 32 insertions(+)
--- linux-2.6.tip.orig/arch/ia64/uv/kernel/setup.c
+++ linux-2.6.tip/arch/ia64/uv/kernel/setup.c
@@ -8,6 +8,7 @@
* Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved.
*/
+#include <linux/clocksource.h>
#include <linux/module.h>
#include <linux/percpu.h>
#include <asm/sn/simulator.h>
@@ -65,6 +66,25 @@ static void uv_idle(int state)
uv_set_led_bits(LED_CPU_ACTIVITY, LED_CPU_ACTIVITY);
}
+#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
+static void uv_display_heartbeat(void)
+{
+ int cpu;
+
+ uv_hub_info->uv_heartbeat = nr_cpu_ids;
+
+ for_each_online_cpu(cpu) {
+ struct uv_hub_info_s *hub = uv_cpu_hub_info(cpu);
+
+ if (hub->led_heartbeat_count > 0) {
+ uv_set_led_bits_on(cpu, LED_CPU_BLINK,
+ LED_CPU_HEARTBEAT);
+ --hub->led_heartbeat_count;
+ }
+ }
+}
+#endif
+
void __init uv_setup(char **cmdline_p)
{
union uvh_si_addr_map_config_u m_n_config;
@@ -124,4 +144,12 @@ void __init uv_setup(char **cmdline_p)
/* enable idle callback */
ia64_mark_idle = &uv_idle;
+
+#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
+ /* enable heartbeat display callback */
+ display_heartbeat = uv_display_heartbeat;
+#else
+ printk(KERN_NOTICE "UV: CLOCKSOURCE_WATCHDOG not configured, "
+ "LED Heartbeat NOT enabled\n");
+#endif
}
--- linux-2.6.tip.orig/include/asm-ia64/uv/uv_hub.h
+++ linux-2.6.tip/include/asm-ia64/uv/uv_hub.h
@@ -100,6 +100,7 @@ struct uv_hub_info_s {
unsigned long lowmem_remap_top;
unsigned long lowmem_remap_base;
unsigned long led_offset;
+ unsigned int led_heartbeat_count;
unsigned short pnode;
unsigned short pnode_mask;
unsigned short coherency_domain_number;
@@ -153,6 +154,9 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __
/* idle callback */
extern void (*ia64_mark_idle) (int);
+/* idle callback */
+extern void (*ia64_mark_idle) (int);
+
/*
* Macros for converting between kernel virtual addresses, socket local physical
* addresses, and UV global physical addresses.
--
prev parent reply other threads:[~2008-08-08 0:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 0:56 [PATCH 0/6] SGI UV: Provide a LED driver and some System Activity Indicators Mike Travis
2008-08-08 0:56 ` [PATCH 1/6] x86_64 UV: Provide a LED driver for UV Systems Mike Travis
2008-08-08 0:56 ` [PATCH 2/6] x86_64 UV: Use LED to indicate CPU is active Mike Travis
2008-08-11 15:53 ` Ingo Molnar
2008-08-13 9:56 ` Pavel Machek
2008-08-25 17:53 ` Mike Travis
2008-08-25 17:49 ` Mike Travis
2008-08-08 0:56 ` [PATCH 3/6] x86_64 UV: Use blinking LED for heartbeat display Mike Travis
2008-08-11 16:02 ` Ingo Molnar
2008-08-13 9:57 ` Pavel Machek
2008-08-26 20:53 ` Mike Travis
2008-08-27 21:38 ` Pavel Machek
2008-08-25 17:55 ` Mike Travis
2008-08-08 0:56 ` [PATCH 4/6] ia64 UV: Provide a LED driver for UV Systems Mike Travis
2008-08-08 6:07 ` Andrew Morton
2008-08-08 0:56 ` [PATCH 5/6] ia64 UV: Use LED to indicate CPU is active Mike Travis
2008-08-08 0:56 ` Mike Travis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080808005702.704046000@polaris-admin.engr.sgi.com \
--to=travis@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=steiner@sgi.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®