Skip to contentSkip to conversation

Add HW_ERR printk prefix for hardware error logging

PATCH In review Huang Ying 2 participants 3 messages Jun 8, 2010 – Jun 11, 2010

lore
Share & tools
lore

Huang Ying

author
#0 lore raw

PATCH 1/2 Add HW_ERR printk prefix for hardware error logging

This makes hardware error related log in printk log more explicit. So that the users can report it to hardware vendor instead of LKML or software vendor.

---
 include/linux/kernel.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/kernel.h +7 -0
index 8317ec4..3bf740b 100644
@@ -247,6 +247,13 @@ extern struct pid *session_of_pgrp(struct pid *pgrp);
 #define FW_WARN		"[Firmware Warn]: "
 #define FW_INFO		"[Firmware Info]: "
 
+/*
+ * HW_ERR
+ * Add this to a message for hardware errors, so that user can report
+ * it to hardware vendor instead of LKML or software vendor.
+ */
+#define HW_ERR		"[Hardware Error]: "
+
 #ifdef CONFIG_PRINTK
 asmlinkage int vprintk(const char *fmt, va_list args)
 	__attribute__ ((format (printf, 1, 0)));
#1 lore raw
Quoted 4 lines · On Tue, 08 Jun 2010 14:35:38 +0800 Huang Ying <[email protected]> wrote:

This makes hardware error related log in printk log more explicit. So that the users can report it to hardware vendor instead of LKML or software vendor.

Spose so. Some additional words explaining why you think this would result in an improved kernel would help here. Are you seeing misdirected problem reports? Are we missing out on opportunities to fix hardware? What is driving for this change? Will it bring out some improvement in something which you're seeing within Intel or was it just a random hey-lets-try-this thing?

The kernel's whole approach to messaging is pretty haphazard and lame and sad. There have been various proposals to improve the usefulness and to rationally categorise things in way which are more useful to operators, but nothing seems to ever get over the line.

Quoted 9 lines
---
 include/linux/kernel.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
include/linux/kernel.h +0 -0
index 8317ec4..3bf740b 100644

include/linux/kernel.h extern struct pid *session_of_pgrp(struct pid *pgrp); · line 255

Quoted 9 lines
include/linux/kernel.h +6 -0
@@ -247,6 +247,13 @@ extern struct pid *session_of_pgrp(struct pid *pgrp);
 #define FW_WARN		"[Firmware Warn]: "
 #define FW_INFO		"[Firmware Info]: "
 
+/*
+ * HW_ERR
+ * Add this to a message for hardware errors, so that user can report
+ * it to hardware vendor instead of LKML or software vendor.
+ */
+#define HW_ERR		"[Hardware Error]: "

I'm trying to think of a rational reason for capitalising "Error", and failing.

Oh well, that's what the other strings do and the kernel already stands as a punctuation/grammar how-not-to guide. ho hum.

author
#2 lore raw
Quoted 8 lines · Andrew Morton
Quoted 4 lines · On Tue, 08 Jun 2010 14:35:38 +0800 Huang Ying <[email protected]> wrote:

This makes hardware error related log in printk log more explicit. So that the users can report it to hardware vendor instead of LKML or software vendor.

Quoted 6 lines

Spose so. Some additional words explaining why you think this would result in an improved kernel would help here. Are you seeing misdirected problem reports? Are we missing out on opportunities to fix hardware? What is driving for this change? Will it bring out some improvement in something which you're seeing within Intel or was it just a random hey-lets-try-this thing?

It is said by Andi Kleen that many users report Machine Check hardware error message as software error to him or software vendor instead of as hardware error to hardware vendor. This does not help much for the users to resolve their problem. So I think it is better to make the kernel hardware error log more explicit for these users.

Best Regards,
Huang Ying