From Jay Estabrook <Jay.Estabrook@compaq.com>.
config VERBOSE_MCHECK
bool "Verbose Machine Checks"
+config VERBOSE_MCHECK_ON
+ int "Verbose Printing Mode (0=off, 1=on, 2=all)"
+ depends on VERBOSE_MCHECK
+ default 1
+ ---help---
+ This option allows the default printing mode to be set, and then
+ possibly overridden by a boot command argument.
+
+ For example, if one wanted the option of printing verbose
+ machine checks, but wanted the default to be as if verbose
+ machine check printing was turned off, then one would choose
+ the printing mode to be 0. Then, upon reboot, one could add
+ the boot command line "verbose_mcheck=1" to get the normal
+ verbose machine check printing, or "verbose_mcheck=2" to get
+ the maximum information available.
+
+ Take the default (1) unless you want more control or more info.
+
source "drivers/pci/Kconfig"
source "drivers/eisa/Kconfig"
printk(KERN_CRIT " Command: %s, Parity bit: %d\n", cmd, par);
printk(KERN_CRIT " Address: %#010lx, Mask: %#lx\n", addr, mask);
}
-#endif
+#endif /* CONFIG_VERBOSE_MCHECK */
+
static int
cia_decode_mchk(unsigned long la_ptr)
return 0;
#ifdef CONFIG_VERBOSE_MCHECK
+ if (!alpha_verbose_mcheck)
+ return 1;
+
switch (ffs(cia->cia_err & 0xfff) - 1) {
case 0: /* CIA_ERR_COR_ERR */
cia_decode_ecc_error(cia, "Corrected ECC error");
if (cia->cia_err & CIA_ERR_LOST_IOA_TIMEOUT)
printk(KERN_CRIT "CIA lost machine check: "
"I/O timeout\n");
-#endif
+#endif /* CONFIG_VERBOSE_MCHECK */
return 1;
}
}
/* Dump the logout area to give all info. */
-#if DEBUG_MCHECK > 1
- {
+#ifdef CONFIG_VERBOSE_MCHECK
+ if (alpha_verbose_mcheck > 1) {
unsigned long * ptr = (unsigned long *) la_ptr;
long i;
for (i = 0; i < el.c->size / sizeof(long); i += 2) {
i*sizeof(long), ptr[i], ptr[i+1]);
}
}
-#endif
+#endif /* CONFIG_VERBOSE_MCHECK */
}
/*
struct pt_regs * regs)
{
int cpu = smp_processor_id();
-#if DEBUG_MCHECK > 0
+#ifdef CONFIG_VERBOSE_MCHECK
struct el_common *mchk_header = (struct el_common *)la_ptr;
-#endif /* DEBUG_MCHECK */
+#endif
/* Clear the error before any reporting. */
mb();
*
* Just dismiss it for now on this CPU...
*/
-#if DEBUG_MCHECK > 0
- printk("t2_machine_check(cpu%d): any_expected 0x%x -"
- " (assumed) spurious -"
- " code 0x%x\n", cpu, t2_mcheck_any_expected,
- (unsigned int)mchk_header->code);
-#endif /* DEBUG_MCHECK */
+#ifdef CONFIG_VERBOSE_MCHECK
+ if (alpha_verbose_mcheck > 1) {
+ printk("t2_machine_check(cpu%d): any_expected 0x%x -"
+ " (assumed) spurious -"
+ " code 0x%x\n", cpu, t2_mcheck_any_expected,
+ (unsigned int)mchk_header->code);
+ }
+#endif
return;
}
if (!mcheck_expected(cpu) && !t2_mcheck_any_expected) {
if (t2_mcheck_last_taken & (1 << cpu)) {
-#if DEBUG_MCHECK > 0
+#ifdef CONFIG_VERBOSE_MCHECK
+ if (alpha_verbose_mcheck > 1) {
printk("t2_machine_check(cpu%d): last_taken 0x%x - "
"unexpected mcheck - code 0x%x\n",
cpu, t2_mcheck_last_taken,
(unsigned int)mchk_header->code);
-#endif /* DEBUG_MCHECK */
- t2_mcheck_last_taken = 0;
- mb();
- return;
+ }
+#endif
+ t2_mcheck_last_taken = 0;
+ mb();
+ return;
} else {
t2_mcheck_last_taken = 0;
mb();
}
}
-#if DEBUG_MCHECK > 0
- printk("%s t2_mcheck(cpu%d): last_taken 0x%x - "
- "any_expected 0x%x - code 0x%x\n",
- (mcheck_expected(cpu) ? "EX" : "UN"), cpu,
- t2_mcheck_last_taken, t2_mcheck_any_expected,
- (unsigned int)mchk_header->code);
-#endif /* DEBUG_MCHECK */
+#ifdef CONFIG_VERBOSE_MCHECK
+ if (alpha_verbose_mcheck > 1) {
+ printk("%s t2_mcheck(cpu%d): last_taken 0x%x - "
+ "any_expected 0x%x - code 0x%x\n",
+ (mcheck_expected(cpu) ? "EX" : "UN"), cpu,
+ t2_mcheck_last_taken, t2_mcheck_any_expected,
+ (unsigned int)mchk_header->code);
+ }
+#endif
process_mcheck_info(vector, la_ptr, regs, "T2", mcheck_expected(cpu));
}
(unsigned int)vector, (int)smp_processor_id());
#ifdef CONFIG_VERBOSE_MCHECK
- titan_process_logout_frame(mchk_header, 1);
- dik_show_regs(regs, NULL);
+ titan_process_logout_frame(mchk_header, alpha_verbose_mcheck);
+ if (alpha_verbose_mcheck)
+ dik_show_regs(regs, NULL);
#endif /* CONFIG_VERBOSE_MCHECK */
err_print_prefix = saved_err_prefix;
* ignore it.
*/
-#if DEBUG_MCHECK > 0
- printk(KERN_CRIT "%s machine check %s\n", machine,
- expected ? "expected." : "NOT expected!!!");
+#ifdef CONFIG_VERBOSE_MCHECK
+ if (alpha_verbose_mcheck > 1) {
+ printk(KERN_CRIT "%s machine check %s\n", machine,
+ expected ? "expected." : "NOT expected!!!");
+ }
#endif
if (expected) {
dik_show_regs(regs, NULL);
-#if DEBUG_MCHECK > 1
- {
+#ifdef CONFIG_VERBOSE_MCHECK
+ if (alpha_verbose_mcheck > 1) {
/* Dump the logout area to give all info. */
unsigned long *ptr = (unsigned long *)la_ptr;
long i;
i*sizeof(long), ptr[i], ptr[i+1]);
}
}
-#endif
+#endif /* CONFIG_VERBOSE_MCHECK */
}
/*
/* setup.c */
extern unsigned long srm_hae;
extern int boot_cpuid;
+#ifdef CONFIG_VERBOSE_MCHECK
+extern unsigned long alpha_verbose_mcheck;
+#endif
/* srmcons.c */
#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
#define mcheck_extra(cpu) ((void)(cpu), __mcheck_info.extra)
#endif
-#define DEBUG_MCHECK 0 /* 0 = minimal, 1 = debug, 2 = debug+dump. */
-
extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr,
struct pt_regs *regs, const char *machine,
int expected);
struct hwrpb_struct *hwrpb;
unsigned long srm_hae;
+#ifdef CONFIG_VERBOSE_MCHECK
+/* 0=minimum, 1=verbose, 2=all */
+/* These can be overridden via the command line, ie "verbose_mcheck=2") */
+unsigned long alpha_verbose_mcheck = CONFIG_VERBOSE_MCHECK_ON;
+#endif
+
/* Which processor we booted from. */
int boot_cpuid;
get_mem_size_limit(p+9) << PAGE_SHIFT;
continue;
}
+#ifdef CONFIG_VERBOSE_MCHECK
+ if (strncmp(p, "verbose_mcheck=", 15) == 0) {
+ alpha_verbose_mcheck = simple_strtol(p+15, NULL, 0);
+ continue;
+ }
+#endif
}
/* Replace the command line, now that we've killed it with strsep. */
var_name, alpha_mv.vector_name,
(alpha_using_srm ? "SRM" : "MILO"));
+ printk("Major Options: "
+#ifdef CONFIG_SMP
+ "SMP "
+#endif
+#ifdef CONFIG_ALPHA_EV56
+ "EV56 "
+#endif
+#ifdef CONFIG_ALPHA_EV67
+ "EV67 "
+#endif
+#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
+ "LEGACY_START "
+#endif
+#ifdef CONFIG_VERBOSE_MCHECK
+ "VERBOSE_MCHECK "
+#endif
+
+#ifdef CONFIG_DISCONTIGMEM
+ "DISCONTIGMEM "
+#ifdef CONFIG_NUMA
+ "NUMA "
+#endif
+#endif
+
+#ifdef CONFIG_DEBUG_SPINLOCK
+ "DEBUG_SPINLOCK "
+#endif
+#ifdef CONFIG_MAGIC_SYSRQ
+ "MAGIC_SYSRQ "
+#endif
+ "\n");
+
printk("Command line: %s\n", command_line);
/*