linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rémi Hérilier" <rherilier@yahoo.fr>
To: Dmitry Torokhov <dtor@mail.ru>
Cc: linux-kernel@vger.kernel.org
Subject: PATCH] adding wistron_btns support for X86_64 systems.
Date: Thu, 06 Dec 2007 21:16:27 +0100	[thread overview]
Message-ID: <4758589B.7090303@yahoo.fr> (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.

Signed-off-by: Remi Herilier <rherilier@yahoo.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

             reply	other threads:[~2007-12-06 22:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-06 20:16 Rémi Hérilier [this message]
2007-12-22 20:40 PATCH] adding wistron_btns support for X86_64 systems Carlos Corbacho
2008-01-02 22:31 ` Rémi Hérilier
2008-01-03 16:21   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4758589B.7090303@yahoo.fr \
    --to=rherilier@yahoo.fr \
    --cc=dtor@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).