Skip to contentSkip to conversation

PATCH] adding wistron_btns support for X86_64 systems.

PATCH Rémi Hérilier 1 participant 1 message Dec 6, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

drivers/input/misc/Kconfig +1 -1
index 8f5c7b9..5bc8ce6 100644
@@ -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
drivers/input/misc/wistron_btns.c +8 -0
index b438d99..9d8069b 100644
@@ -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