]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
watchdog: hpwdt: Changes to handle NX secure bit in 32bit path
authorMingarelli, Thomas <Thomas.Mingarelli@hp.com>
Mon, 7 Nov 2011 09:59:00 +0000 (10:59 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:14:00 +0000 (14:14 -0800)
commit e67d668e147c3b4fec638c9e0ace04319f5ceccd upstream.

This patch makes use of the set_memory_x() kernel API in order
to make necessary BIOS calls to source NMIs.

This is needed for SLES11 SP2 and the latest upstream kernel as it appears
the NX Execute Disable has grown in its control.

Signed-off by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/watchdog/hpwdt.c

index 8cb26855bfede30eeb6782f693a29add442cdaa1..9cb60dfbb59eb0fc6dbab3386af30698bfd87219 100644 (file)
@@ -216,6 +216,7 @@ static int __devinit cru_detect(unsigned long map_entry,
 
        cmn_regs.u1.reax = CRU_BIOS_SIGNATURE_VALUE;
 
+       set_memory_x((unsigned long)bios32_entrypoint, (2 * PAGE_SIZE));
        asminline_call(&cmn_regs, bios32_entrypoint);
 
        if (cmn_regs.u1.ral != 0) {
@@ -233,8 +234,10 @@ static int __devinit cru_detect(unsigned long map_entry,
                if ((physical_bios_base + physical_bios_offset)) {
                        cru_rom_addr =
                                ioremap(cru_physical_address, cru_length);
-                       if (cru_rom_addr)
+                       if (cru_rom_addr) {
+                               set_memory_x((unsigned long)cru_rom_addr, cru_length);
                                retval = 0;
+                       }
                }
 
                printk(KERN_DEBUG "hpwdt: CRU Base Address:   0x%lx\n",