Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/powernv: Update firmware archaeology around OPAL_HANDLE_HMI

The first machines to ship with OPAL firmware all got firmware updates
that have the new call, but just in case someone is foolish enough to
believe the first 4 months of firmware is the best, we keep this code
around.

Comment is updated to not refer to late 2014 as recent or the future.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Stewart Smith and committed by
Michael Ellerman
1549c42d efa9ace6

+15 -8
+15 -8
arch/powerpc/platforms/powernv/opal.c
··· 206 206 glue = 0x7000; 207 207 208 208 /* 209 - * Check if we are running on newer firmware that exports 210 - * OPAL_HANDLE_HMI token. If yes, then don't ask OPAL to patch 211 - * the HMI interrupt and we catch it directly in Linux. 209 + * Only ancient OPAL firmware requires this. 210 + * Specifically, firmware from FW810.00 (released June 2014) 211 + * through FW810.20 (Released October 2014). 212 212 * 213 - * For older firmware (i.e currently released POWER8 System Firmware 214 - * as of today <= SV810_087), we fallback to old behavior and let OPAL 215 - * patch the HMI vector and handle it inside OPAL firmware. 213 + * Check if we are running on newer (post Oct 2014) firmware that 214 + * exports the OPAL_HANDLE_HMI token. If yes, then don't ask OPAL to 215 + * patch the HMI interrupt and we catch it directly in Linux. 216 216 * 217 - * For newer firmware (in development/yet to be released) we will 218 - * start catching/handling HMI directly in Linux. 217 + * For older firmware (i.e < FW810.20), we fallback to old behavior and 218 + * let OPAL patch the HMI vector and handle it inside OPAL firmware. 219 + * 220 + * For newer firmware we catch/handle the HMI directly in Linux. 219 221 */ 220 222 if (!opal_check_token(OPAL_HANDLE_HMI)) { 221 223 pr_info("Old firmware detected, OPAL handles HMIs.\n"); ··· 227 225 glue += 128; 228 226 } 229 227 228 + /* 229 + * Only applicable to ancient firmware, all modern 230 + * (post March 2015/skiboot 5.0) firmware will just return 231 + * OPAL_UNSUPPORTED. 232 + */ 230 233 opal_register_exception_handler(OPAL_SOFTPATCH_HANDLER, 0, glue); 231 234 #endif 232 235