lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4758589B.7090303@yahoo.fr>
Date:	Thu, 06 Dec 2007 21:16:27 +0100
From:	Rémi Hérilier <rherilier@...oo.fr>
To:	Dmitry Torokhov <dtor@...l.ru>
CC:	linux-kernel@...r.kernel.org
Subject: PATCH] adding wistron_btns support for X86_64 systems.


Hello again.

To use my previous patch (wistron_btns support for fujitsu-siemens amilo pro edition v3505)
with my laptop, I need to make the wistron module compile for x86_64. It is based on Linux
2.4.24-rc4 too.

So, here it is:


Wistron button support for X86_64 systems.

Signed-off-by: Remi Herilier <rherilier@...oo.fr>


diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 8f5c7b9..5bc8ce6 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -64,7 +64,7 @@ config INPUT_COBALT_BTNS
 
 config INPUT_WISTRON_BTNS
 	tristate "x86 Wistron laptop button interface"
-	depends on X86 && !X86_64
+	depends on X86
 	select INPUT_POLLDEV
 	select NEW_LEDS
 	select LEDS_CLASS
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
index b438d99..9d8069b 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -74,10 +74,18 @@ static void call_bios(struct regs *regs)
 
 	preempt_disable();
 	local_irq_save(flags);
+#ifdef CONFIG_X86_64
+	asm volatile ("pushq %%rbp;"
+#else
 	asm volatile ("pushl %%ebp;"
+#endif
 		      "movl %7, %%ebp;"
 		      "call *%6;"
+#ifdef CONFIG_X86_64
+		      "popq %%rbp"
+#else
 		      "popl %%ebp"
+#endif 
 		      : "=a" (regs->eax), "=b" (regs->ebx), "=c" (regs->ecx)
 		      : "0" (regs->eax), "1" (regs->ebx), "2" (regs->ecx),
 			"m" (bios_entry_point), "m" (bios_data_map_base)

--
Best regards

Rémi Hérilier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ