]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2014 23:57:23 +0000 (15:57 -0800)
commit6f3ae88ae662a620bd093c3dd0b50e13322fb7d6
tree9d6368201809b746b9deb31c1ab065d6dfaf0d6c
parentaa87a2a50181339df780f383fab94b5e120c4827
powerpc/powernv: Fix the hmi event version check.

commit 6acbc5a1dab30aa8f7be7bf3852f343f89147ac5 upstream.

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.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
[mpe: Reword changelog]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/powernv/opal-hmi.c