Skip to contentSkip to conversation

OS_MCA Recovery from poisoned memory read

PATCH New Hidetoshi Seto 1 participant 1 message Aug 24, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OS_MCA Recovery from poisoned memory read

Hi, Tony and all MCA experts,

This is the latest/Updated OS_MCA handler which try to do recovery from multibit-ECC/poisoned memory-read error on user-land. (Thank you very much for comments, Keith and Grant!)

I'd still appreciate it if anyone having good test environment could apply my patch and could report how it works. (especially reports on non-Tiger/non-Intel platform are welcome.)

Tony, isn't it about time you thought about applying my patch to your linux-ia64-test-2.6.8.1/test-2.6 tree?

Thanks,

-----

arch/ia64/Kconfig +3 -0
diff -Nur linux-2.6.8.1/arch/ia64/Kconfig linux-2.6.8.1-mcadrv/arch/ia64/Kconfig
@@ -270,6 +270,9 @@
  	depends on IA32_SUPPORT
  	default y
 
+config IA64_MCA_RECOVERY
+	tristate "MCA recovery from errors other than TLB."
+
  config PERFMON
  	bool "Performance monitor support"
  	help
arch/ia64/kernel/Makefile +2 -0
diff -Nur linux-2.6.8.1/arch/ia64/kernel/Makefile linux-2.6.8.1-mcadrv/arch/ia64/kernel/Makefile
@@ -17,6 +17,8 @@
  obj-$(CONFIG_SMP)		+= smp.o smpboot.o
  obj-$(CONFIG_PERFMON)		+= perfmon_default_smpl.o
  obj-$(CONFIG_IA64_CYCLONE)	+= cyclone.o
+obj-$(CONFIG_IA64_MCA_RECOVERY)	+= mca_recovery.o
+mca_recovery-y			+= mca_drv.o mca_drv_asm.o
 
  # The gate DSO image is built using a special linker script.
  targets += gate.so gate-syms.o
arch/ia64/kernel/mca.c +16 -6
diff -Nur linux-2.6.8.1/arch/ia64/kernel/mca.c linux-2.6.8.1-mcadrv/arch/ia64/kernel/mca.c
@@ -82,11 +82,6 @@
  # define IA64_MCA_DEBUG(fmt...)
  #endif
 
-typedef struct ia64_fptr {
-	unsigned long fp;
-	unsigned long gp;
-} ia64_fptr_t;
-
  /* Used by mca_asm.S */
  ia64_mca_sal_to_os_state_t	ia64_sal_to_os_handoff_state;
  ia64_mca_os_to_sal_state_t	ia64_os_to_sal_handoff_state;
@@ -831,6 +826,12 @@
 
  }
 
+/* This is a function pointer to other error recovery from MCA */
+int (*ia64_mca_ucmc_other_recover_fp)
+	(void*,ia64_mca_sal_to_os_state_t*,ia64_mca_os_to_sal_state_t*)
+	= NULL;
+EXPORT_SYMBOL(ia64_mca_ucmc_other_recover_fp);
+
  /*
   * ia64_mca_ucmc_handler
   *
@@ -852,11 +853,20 @@
  {
  	pal_processor_state_info_t *psp = (pal_processor_state_info_t *)
  		&ia64_sal_to_os_handoff_state.proc_state_param;
-	int recover = psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc);
+	int recover;
 
  	/* Get the MCA error record and log it */
  	ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA);
 
+	/* Only TLB error is exist in this SAL error record */
+	recover = (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc))
+	/* other error recovery */
+	   || (ia64_mca_ucmc_other_recover_fp
+		&& ia64_mca_ucmc_other_recover_fp(
+			IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_MCA),
+			&ia64_sal_to_os_handoff_state,
+			&ia64_os_to_sal_handoff_state));
+
  	/*
  	 *  Wakeup all the processors which are spinning in the rendezvous
  	 *  loop.
arch/ia64/kernel/mca_drv_asm.S +45 -0

45 lines not on this page · raw message

arch/ia64/kernel/mca_drv.c +635 -0

635 lines not on this page · raw message

arch/ia64/kernel/mca_drv.h +113 -0

113 lines not on this page · raw message

include/asm-ia64/mca.h +6 -0
diff -Nur linux-2.6.8.1/include/asm-ia64/mca.h linux-2.6.8.1-mcadrv/include/asm-ia64/mca.h
@@ -22,6 +22,11 @@
 
  #define IA64_MCA_RENDEZ_TIMEOUT		(20 * 1000)	/* value in milliseconds - 20 seconds */
 
+typedef struct ia64_fptr {
+	unsigned long fp;
+	unsigned long gp;
+} ia64_fptr_t;
+
  typedef union cmcv_reg_u {
  	u64	cmcv_regval;
  	struct	{
@@ -114,6 +119,7 @@
  extern void ia64_monarch_init_handler(void);
  extern void ia64_slave_init_handler(void);
  extern void ia64_mca_cmc_vector_setup(void);
+extern int  (*ia64_mca_ucmc_other_recover_fp)(void *,ia64_mca_sal_to_os_state_t *,ia64_mca_os_to_sal_state_t *);
 
  #endif /* !__ASSEMBLY__ */
  #endif /* _ASM_IA64_MCA_H */