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

watchdog: hpwdt: Add check for UEFI bits

This patch is being created to use the UEFI bits in the type 219 SMBIOS
record in order to decide whether or not to execute BIOS code. This is a
better solution than to depend on the iCRU bit since not all future servers
will use iCRU.

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
----
drivers/watchdog/hpwdt.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

authored by

Mingarelli, Thomas and committed by
Wim Van Sebroeck
cce78da7 086f3ec1

+7 -4
+7 -4
drivers/watchdog/hpwdt.c
··· 39 39 #endif /* CONFIG_HPWDT_NMI_DECODING */ 40 40 #include <asm/nmi.h> 41 41 42 - #define HPWDT_VERSION "1.3.1" 42 + #define HPWDT_VERSION "1.3.2" 43 43 #define SECS_TO_TICKS(secs) ((secs) * 1000 / 128) 44 44 #define TICKS_TO_SECS(ticks) ((ticks) * 128 / 1000) 45 45 #define HPWDT_MAX_TIMER TICKS_TO_SECS(65535) ··· 148 148 static unsigned int hpwdt_nmi_decoding; 149 149 static unsigned int allow_kdump = 1; 150 150 static unsigned int is_icru; 151 + static unsigned int is_uefi; 151 152 static DEFINE_SPINLOCK(rom_lock); 152 153 static void *cru_rom_addr; 153 154 static struct cmn_registers cmn_regs; ··· 485 484 goto out; 486 485 487 486 spin_lock_irqsave(&rom_lock, rom_pl); 488 - if (!die_nmi_called && !is_icru) 487 + if (!die_nmi_called && !is_icru && !is_uefi) 489 488 asminline_call(&cmn_regs, cru_rom_addr); 490 489 die_nmi_called = 1; 491 490 spin_unlock_irqrestore(&rom_lock, rom_pl); ··· 493 492 if (allow_kdump) 494 493 hpwdt_stop(); 495 494 496 - if (!is_icru) { 495 + if (!is_icru && !is_uefi) { 497 496 if (cmn_regs.u1.ral == 0) { 498 497 panic("An NMI occurred, " 499 498 "but unable to determine source.\n"); ··· 680 679 smbios_proliant_ptr = (struct smbios_proliant_info *) dm; 681 680 if (smbios_proliant_ptr->misc_features & 0x01) 682 681 is_icru = 1; 682 + if (smbios_proliant_ptr->misc_features & 0x408) 683 + is_uefi = 1; 683 684 } 684 685 } 685 686 ··· 700 697 * the old cru detect code. 701 698 */ 702 699 dmi_walk(dmi_find_icru, NULL); 703 - if (!is_icru) { 700 + if (!is_icru && !is_uefi) { 704 701 705 702 /* 706 703 * We need to map the ROM to get the CRU service.