[PATCH] powerpc/powernv: Fix the hmi event version check.

Mahesh J Salgaonkar mahesh at linux.vnet.ibm.com
Thu Nov 20 15:14:36 AEDT 2014


From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>

The current HMI event structure is an ABI and carries a version field to
accommodate future changes without affecting/rearranging current structure
members that are valid for previous versions. The current version check
"if (hmi_evt->version != OpalHMIEvt_V1)" seems to consider that version
will always be V1 which may not be true in future. If we start supporting
HMI event > V1, this check would fail without printing anything on older
kernels. This patch fixes this issue.

Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/opal-hmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/opal-hmi.c b/arch/powerpc/platforms/powernv/opal-hmi.c
index 5e1ed15..b322bfb 100644
--- a/arch/powerpc/platforms/powernv/opal-hmi.c
+++ b/arch/powerpc/platforms/powernv/opal-hmi.c
@@ -57,7 +57,7 @@ static void print_hmi_event_info(struct OpalHMIEvent *hmi_evt)
 	};
 
 	/* Print things out */
-	if (hmi_evt->version != OpalHMIEvt_V1) {
+	if (hmi_evt->version < OpalHMIEvt_V1) {
 		pr_err("HMI Interrupt, Unknown event version %d !\n",
 			hmi_evt->version);
 		return;



More information about the Linuxppc-dev mailing list