]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Fix the hmi event version check.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Thu, 20 Nov 2014 04:14:36 +0000 (09:44 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 26 Nov 2014 22:32:52 +0000 (09:32 +1100)
commit564df4a04a743d147a466df0713484e1cf9adb8a
treea734cdafb565678bfa383c249c5884ff03b038ab
parentc90f1e74d71075d579524c0acf27549a5fcffa19
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>
arch/powerpc/platforms/powernv/opal-hmi.c