Commit 6acbc5a1dab30aa8f7be7bf3852f343f89147ac5

Authored by Mahesh Salgaonkar
Committed by Michael Ellerman
1 parent d7ce437749

powerpc/powernv: Fix the hmi event version check.

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)"
doesn't accomodate the fact that the version number may change in
future.

If firmware starts returning an HMI event with version > 1, this check
will fail and no HMI information will be printed on older kernels.

This patch fixes this issue.

Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
[mpe: Reword changelog]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/powerpc/platforms/powernv/opal-hmi.c
... ... @@ -57,7 +57,7 @@
57 57 };
58 58  
59 59 /* Print things out */
60   - if (hmi_evt->version != OpalHMIEvt_V1) {
  60 + if (hmi_evt->version < OpalHMIEvt_V1) {
61 61 pr_err("HMI Interrupt, Unknown event version %d !\n",
62 62 hmi_evt->version);
63 63 return;