2013-04-16 00:36:23 +00:00
|
|
|
--- linux.orig/include/asm-generic/bug.h
|
|
|
|
+++ linux/include/asm-generic/bug.h
|
2013-04-11 16:17:38 +00:00
|
|
|
@@ -55,6 +55,8 @@ struct bug_entry {
|
|
|
|
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+void print_hardware_dmi_name(void);
|
|
|
|
+
|
|
|
|
/*
|
|
|
|
* WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
|
|
|
|
* significant issues that need prompt attention if they should ever
|
2013-04-16 00:36:23 +00:00
|
|
|
--- linux.orig/kernel/panic.c
|
|
|
|
+++ linux/kernel/panic.c
|
|
|
|
@@ -391,6 +391,15 @@ void oops_exit(void)
|
|
|
|
kmsg_dump(KMSG_DUMP_OOPS);
|
|
|
|
}
|
2013-04-11 16:17:38 +00:00
|
|
|
|
|
|
|
+void print_hardware_dmi_name(void)
|
2013-04-16 00:36:23 +00:00
|
|
|
+{
|
|
|
|
+ const char *board;
|
|
|
|
+
|
|
|
|
+ board = dmi_get_system_info(DMI_PRODUCT_NAME);
|
|
|
|
+ if (board)
|
|
|
|
+ printk(KERN_WARNING "Hardware name: %s\n", board);
|
2013-04-11 16:17:38 +00:00
|
|
|
+}
|
|
|
|
+
|
2013-04-16 00:36:23 +00:00
|
|
|
#ifdef WANT_WARN_ON_SLOWPATH
|
|
|
|
struct slowpath_args {
|
|
|
|
const char *fmt;
|
|
|
|
@@ -400,13 +409,10 @@ struct slowpath_args {
|
|
|
|
static void warn_slowpath_common(const char *file, int line, void *caller,
|
|
|
|
unsigned taint, struct slowpath_args *args)
|
|
|
|
{
|
|
|
|
- const char *board;
|
|
|
|
-
|
|
|
|
printk(KERN_WARNING "------------[ cut here ]------------\n");
|
|
|
|
printk(KERN_WARNING "WARNING: at %s:%d %pS()\n", file, line, caller);
|
|
|
|
- board = dmi_get_system_info(DMI_PRODUCT_NAME);
|
|
|
|
- if (board)
|
|
|
|
- printk(KERN_WARNING "Hardware name: %s\n", board);
|
2013-04-11 16:17:38 +00:00
|
|
|
+
|
|
|
|
+ print_hardware_dmi_name();
|
|
|
|
|
|
|
|
if (args)
|
|
|
|
vprintk(args->fmt, args->args);
|
2013-04-16 00:36:23 +00:00
|
|
|
--- linux.orig/mm/memory.c
|
|
|
|
+++ linux/mm/memory.c
|
|
|
|
@@ -706,6 +706,8 @@ static void print_bad_pte(struct vm_area
|
2013-04-11 16:17:38 +00:00
|
|
|
"BUG: Bad page map in process %s pte:%08llx pmd:%08llx\n",
|
|
|
|
current->comm,
|
|
|
|
(long long)pte_val(pte), (long long)pmd_val(*pmd));
|
|
|
|
+ print_hardware_dmi_name();
|
|
|
|
+
|
|
|
|
if (page)
|
|
|
|
dump_page(page);
|
|
|
|
printk(KERN_ALERT
|
2013-04-16 00:36:23 +00:00
|
|
|
--- linux.orig/mm/page_alloc.c
|
|
|
|
+++ linux/mm/page_alloc.c
|
2013-04-11 16:17:38 +00:00
|
|
|
@@ -321,6 +321,7 @@ static void bad_page(struct page *page)
|
|
|
|
current->comm, page_to_pfn(page));
|
|
|
|
dump_page(page);
|
|
|
|
|
|
|
|
+ print_hardware_dmi_name();
|
|
|
|
print_modules();
|
|
|
|
dump_stack();
|
|
|
|
out:
|