Inter-revision diff: patch 5

Comparing v4 (message) to v3 (message)

--- v4
+++ v3
@@ -14,14 +14,14 @@
 Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
 ---
  arch/powerpc/include/asm/rtas.h      |    5 +
- arch/powerpc/platforms/pseries/ras.c |  131 ++++++++++++++++++++++++++++++++++
- 2 files changed, 136 insertions(+)
+ arch/powerpc/platforms/pseries/ras.c |  128 +++++++++++++++++++++++++++++++++-
+ 2 files changed, 131 insertions(+), 2 deletions(-)
 
 diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
-index ceeed2dd489b..26bc3d5c4992 100644
+index 3f2fba7ef23b..8100a95c133a 100644
 --- a/arch/powerpc/include/asm/rtas.h
 +++ b/arch/powerpc/include/asm/rtas.h
-@@ -197,6 +197,11 @@ static inline uint8_t rtas_error_extended(const struct rtas_error_log *elog)
+@@ -190,6 +190,11 @@ static inline uint8_t rtas_error_extended(const struct rtas_error_log *elog)
  	return (elog->byte1 & 0x04) >> 2;
  }
  
@@ -34,25 +34,25 @@
  
  static inline
 diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
-index ae08263daa24..be665eeb97df 100644
+index e56759d92356..cd9446980092 100644
 --- a/arch/powerpc/platforms/pseries/ras.c
 +++ b/arch/powerpc/platforms/pseries/ras.c
-@@ -428,6 +428,135 @@ int pSeries_system_reset_exception(struct pt_regs *regs)
+@@ -422,7 +422,130 @@ int pSeries_system_reset_exception(struct pt_regs *regs)
  	return 0; /* need to perform reset */
  }
  
+-static int mce_handle_error(struct rtas_error_log *errp)
 +#define VAL_TO_STRING(ar, val)	((val < ARRAY_SIZE(ar)) ? ar[val] : "Unknown")
 +
 +static void pseries_print_mce_info(struct pt_regs *regs,
-+						struct rtas_error_log *errp)
++				struct rtas_error_log *errp, int disposition)
 +{
 +	const char *level, *sevstr;
 +	struct pseries_errorlog *pseries_log;
 +	struct pseries_mc_errorlog *mce_log;
 +	uint8_t error_type, err_sub_type;
++	uint8_t initiator = rtas_error_initiator(errp);
 +	uint64_t addr;
-+	uint8_t initiator = rtas_error_initiator(errp);
-+	int disposition = rtas_error_disposition(errp);
 +
 +	static const char * const initiators[] = {
 +		"Unknown",
@@ -93,11 +93,6 @@
 +		"Multihit",
 +		"Indeterminate",
 +	};
-+
-+	if (!rtas_error_extended(errp)) {
-+		pr_err("Machine check interrupt: Missing extended error log\n");
-+		return;
-+	}
 +
 +	pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE);
 +	if (pseries_log == NULL)
@@ -170,15 +165,24 @@
 +		printk("%s    Effective address: %016llx\n", level, addr);
 +}
 +
- static int mce_handle_error(struct rtas_error_log *errp)
++static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp)
  {
  	struct pseries_errorlog *pseries_log;
-@@ -482,6 +611,8 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log *err)
+ 	struct pseries_mc_errorlog *mce_log;
+@@ -442,6 +565,7 @@ static int mce_handle_error(struct rtas_error_log *errp)
+ 		slb_flush_and_rebolt();
+ 		disposition = RTAS_DISP_FULLY_RECOVERED;
+ 	}
++	pseries_print_mce_info(regs, errp, disposition);
+ 
+ out:
+ 	return disposition;
+@@ -461,7 +585,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log *err)
  	int recovered = 0;
- 	int disposition = rtas_error_disposition(err);
+ 	int disposition;
  
-+	pseries_print_mce_info(regs, err);
-+
+-	disposition = mce_handle_error(err);
++	disposition = mce_handle_error(regs, err);
+ 
  	if (!(regs->msr & MSR_RI)) {
  		/* If MSR_RI isn't set, we cannot recover */
- 		recovered = 0;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help