patch-2.2.16 linux/arch/alpha/kernel/sys_mikasa.c

Next file: linux/arch/alpha/kernel/sys_nautilus.c
Previous file: linux/arch/alpha/kernel/sys_dp264.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/arch/alpha/kernel/sys_mikasa.c linux/arch/alpha/kernel/sys_mikasa.c
@@ -155,13 +155,14 @@
 mikasa_machine_check(unsigned long vector, unsigned long la_ptr,
 		     struct pt_regs * regs)
 {
-#define MCHK_NO_DEVSEL 0x205L
-#define MCHK_NO_TABT 0x204L
+#define MCHK_NO_DEVSEL 0x205U
+#define MCHK_NO_TABT 0x204U
 
 	struct el_common *mchk_header;
 	struct el_apecs_procdata *mchk_procdata;
 	struct el_apecs_mikasa_sysdata_mcheck *mchk_sysdata;
 	unsigned long *ptr;
+	unsigned int code; /* workaround EGCS problem */
 	int i;
 
 	mchk_header = (struct el_common *)la_ptr;
@@ -193,9 +194,11 @@
 	 * ignore the machine check.
 	 */
 
-	if (apecs_mcheck_expected
-	    && ((unsigned int)mchk_header->code == MCHK_NO_DEVSEL
-		|| (unsigned int)mchk_header->code == MCHK_NO_TABT)) {
+	code = mchk_header->code; /* workaround EGCS problem */
+
+	if (apecs_mcheck_expected &&
+	    (code == MCHK_NO_DEVSEL || code == MCHK_NO_TABT))
+	{
 		apecs_mcheck_expected = 0;
 		apecs_mcheck_taken = 1;
 		mb();
@@ -214,9 +217,9 @@
 		       vector);
 	}
 	else {
-		printk(KERN_CRIT "APECS machine check:\n");
-		printk(KERN_CRIT "  vector=0x%lx la_ptr=0x%lx\n",
-		       vector, la_ptr);
+		printk(KERN_CRIT "MIKASA APECS machine check:\n");
+		printk(KERN_CRIT "  vector=0x%lx la_ptr=0x%lx code=0x%x\n",
+		       vector, la_ptr, code);
 		printk(KERN_CRIT
 		       "  pc=0x%lx size=0x%x procoffset=0x%x sysoffset 0x%x\n",
 		       regs->pc, mchk_header->size, mchk_header->proc_offset,
@@ -274,7 +277,7 @@
 	DO_DEFAULT_RTC,
 	DO_CIA_IO,
 	DO_CIA_BUS,
-	machine_check:		mikasa_machine_check,
+	machine_check:		cia_machine_check,
 	max_dma_address:	ALPHA_MAX_DMA_ADDRESS,
 
 	nr_irqs:		32,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)