Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-29 Thread Frank Sorenson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff Garzik wrote:
> Bradley Smith wrote:
>> From: Bradley Smith <[EMAIL PROTECTED]>
>>
>> Adds #if clause and additional inline assembly so that the driver
>> builds on x86_64 systems.
>>
>> Signed-off-by: Bradley Smith <[EMAIL PROTECTED]>
> 
> Is this actually known to be working on a Dell laptop?
> 
> Jeff

Yes, the patch works well on my Dell, and I've got several
follow-up patches to Brad's.  During the last i8k refresh
(http://lkml.org/lkml/2005/2/24/11), not everything made it
into mainline, so i8k is due for another facelift.

Needs the following in order to work correctly on my Inspiron E1705:


Add DMI Product name to i8k for Dell MP061 hardware (Inspiron 9400/E1705)

Signed-off-by: Frank Sorenson <[EMAIL PROTECTED]>
- ---
 drivers/char/i8k.c |7 +++
 1 file changed, 7 insertions(+)

Index: linux-2.6.24-rc1/drivers/char/i8k.c
===
- --- linux-2.6.24-rc1.orig/drivers/char/i8k.c  2007-10-29 00:27:21.0 
-0500
+++ linux-2.6.24-rc1/drivers/char/i8k.c 2007-10-29 00:30:05.0 -0500
@@ -468,6 +468,13 @@
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude"),
},
},
+   {
+   .ident = "Dell Inspiron 3",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+   DMI_MATCH(DMI_PRODUCT_NAME, "MP061"),
+   },
+   },
{ }
 };


Frank
- -- 
Frank Sorenson - KD7TZK
Linux Systems Engineer, DSS Engineering, UBS AG
[EMAIL PROTECTED]

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHJXnUaI0dwg4A47wRApQrAKDKb0Zq+QrG+CUsXrpfoxVxLyM+PQCg5uZc
kvUjuY3a1F7MIx0Z9DSrYbg=
=IcmN
-END PGP SIGNATURE-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-29 Thread Frank Sorenson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff Garzik wrote:
 Bradley Smith wrote:
 From: Bradley Smith [EMAIL PROTECTED]

 Adds #if clause and additional inline assembly so that the driver
 builds on x86_64 systems.

 Signed-off-by: Bradley Smith [EMAIL PROTECTED]
 
 Is this actually known to be working on a Dell laptop?
 
 Jeff

Yes, the patch works well on my Dell, and I've got several
follow-up patches to Brad's.  During the last i8k refresh
(http://lkml.org/lkml/2005/2/24/11), not everything made it
into mainline, so i8k is due for another facelift.

Needs the following in order to work correctly on my Inspiron E1705:


Add DMI Product name to i8k for Dell MP061 hardware (Inspiron 9400/E1705)

Signed-off-by: Frank Sorenson [EMAIL PROTECTED]
- ---
 drivers/char/i8k.c |7 +++
 1 file changed, 7 insertions(+)

Index: linux-2.6.24-rc1/drivers/char/i8k.c
===
- --- linux-2.6.24-rc1.orig/drivers/char/i8k.c  2007-10-29 00:27:21.0 
-0500
+++ linux-2.6.24-rc1/drivers/char/i8k.c 2007-10-29 00:30:05.0 -0500
@@ -468,6 +468,13 @@
DMI_MATCH(DMI_PRODUCT_NAME, Latitude),
},
},
+   {
+   .ident = Dell Inspiron 3,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, Dell Inc.),
+   DMI_MATCH(DMI_PRODUCT_NAME, MP061),
+   },
+   },
{ }
 };


Frank
- -- 
Frank Sorenson - KD7TZK
Linux Systems Engineer, DSS Engineering, UBS AG
[EMAIL PROTECTED]

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHJXnUaI0dwg4A47wRApQrAKDKb0Zq+QrG+CUsXrpfoxVxLyM+PQCg5uZc
kvUjuY3a1F7MIx0Z9DSrYbg=
=IcmN
-END PGP SIGNATURE-
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Bradley Smith
On Sun, 28 Oct 2007 18:37:24 +0100
Adrian Bunk <[EMAIL PROTECTED]> wrote:

> 
> Please use CONFIG_X86_64.
> 
> cu
> Adrian
> 

Now uses CONFIG_X86_64.

Brad.

--- linux-2.6/drivers/char/i8k.c.orig   2007-10-28 12:27:34.0 +
+++ linux-2.6/drivers/char/i8k.c2007-10-28 14:27:56.0 +
@@ -113,6 +113,33 @@ static int i8k_smm(struct smm_regs *regs
int rc;
int eax = regs->eax;
 
+#if defined(CONFIG_X86_64)
+   asm("pushq %%rax\n\t"
+   "movl 0(%%rax),%%edx\n\t"
+   "pushq %%rdx\n\t"
+   "movl 4(%%rax),%%ebx\n\t"
+   "movl 8(%%rax),%%ecx\n\t"
+   "movl 12(%%rax),%%edx\n\t"
+   "movl 16(%%rax),%%esi\n\t"
+   "movl 20(%%rax),%%edi\n\t"
+   "popq %%rax\n\t"
+   "out %%al,$0xb2\n\t"
+   "out %%al,$0x84\n\t"
+   "xchgq %%rax,(%%rsp)\n\t"
+   "movl %%ebx,4(%%rax)\n\t"
+   "movl %%ecx,8(%%rax)\n\t"
+   "movl %%edx,12(%%rax)\n\t"
+   "movl %%esi,16(%%rax)\n\t"
+   "movl %%edi,20(%%rax)\n\t"
+   "popq %%rdx\n\t"
+   "movl %%edx,0(%%rax)\n\t"
+   "lahf\n\t"
+   "shrl $8,%%eax\n\t"
+   "andl $1,%%eax\n"
+   :"=a"(rc)
+   :"a"(regs)
+   :"%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
+#else
asm("pushl %%eax\n\t"
"movl 0(%%eax),%%edx\n\t"
"push %%edx\n\t"
@@ -137,7 +164,7 @@ static int i8k_smm(struct smm_regs *regs
"andl $1,%%eax\n":"=a"(rc)
:"a"(regs)
:"%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
-
+#endif
if (rc != 0 || (regs->eax & 0x) == 0x || regs->eax == eax)
return -EINVAL;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Bradley Smith
On Sun, 28 Oct 2007 13:59:22 -0400
Jeff Garzik <[EMAIL PROTECTED]> wrote:

> Bradley Smith wrote:
> > From: Bradley Smith <[EMAIL PROTECTED]>
> > 
> > Adds #if clause and additional inline assembly so that the driver
> > builds on x86_64 systems.
> > 
> > Signed-off-by: Bradley Smith <[EMAIL PROTECTED]>
> 
> Is this actually known to be working on a Dell laptop?
> 
>   Jeff
> 

Yes, I have a dell laptop, and it works. (I have been using it for quite a 
while).

Brad.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Jeff Garzik

Bradley Smith wrote:

From: Bradley Smith <[EMAIL PROTECTED]>

Adds #if clause and additional inline assembly so that the driver
builds on x86_64 systems.

Signed-off-by: Bradley Smith <[EMAIL PROTECTED]>


Is this actually known to be working on a Dell laptop?

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Adrian Bunk
On Sun, Oct 28, 2007 at 05:25:19PM +, Bradley Smith wrote:
> From: Bradley Smith <[EMAIL PROTECTED]>
> 
> Adds #if clause and additional inline assembly so that the driver
> builds on x86_64 systems.
> 
> Signed-off-by: Bradley Smith <[EMAIL PROTECTED]>
> 
> ---
> 
> --- linux-2.6/drivers/char/i8k.c.orig 2007-10-28 12:27:34.0 +
> +++ linux-2.6/drivers/char/i8k.c  2007-10-28 14:27:56.0 +
> @@ -113,6 +113,33 @@ static int i8k_smm(struct smm_regs *regs
>   int rc;
>   int eax = regs->eax;
>  
> +#if defined(__x86_64__)
>...

Please use CONFIG_X86_64.

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Bradley Smith
From: Bradley Smith <[EMAIL PROTECTED]>

Adds #if clause and additional inline assembly so that the driver
builds on x86_64 systems.

Signed-off-by: Bradley Smith <[EMAIL PROTECTED]>

---

--- linux-2.6/drivers/char/i8k.c.orig   2007-10-28 12:27:34.0 +
+++ linux-2.6/drivers/char/i8k.c2007-10-28 14:27:56.0 +
@@ -113,6 +113,33 @@ static int i8k_smm(struct smm_regs *regs
int rc;
int eax = regs->eax;
 
+#if defined(__x86_64__)
+   asm("pushq %%rax\n\t"
+   "movl 0(%%rax),%%edx\n\t"
+   "pushq %%rdx\n\t"
+   "movl 4(%%rax),%%ebx\n\t"
+   "movl 8(%%rax),%%ecx\n\t"
+   "movl 12(%%rax),%%edx\n\t"
+   "movl 16(%%rax),%%esi\n\t"
+   "movl 20(%%rax),%%edi\n\t"
+   "popq %%rax\n\t"
+   "out %%al,$0xb2\n\t"
+   "out %%al,$0x84\n\t"
+   "xchgq %%rax,(%%rsp)\n\t"
+   "movl %%ebx,4(%%rax)\n\t"
+   "movl %%ecx,8(%%rax)\n\t"
+   "movl %%edx,12(%%rax)\n\t"
+   "movl %%esi,16(%%rax)\n\t"
+   "movl %%edi,20(%%rax)\n\t"
+   "popq %%rdx\n\t"
+   "movl %%edx,0(%%rax)\n\t"
+   "lahf\n\t"
+   "shrl $8,%%eax\n\t"
+   "andl $1,%%eax\n"
+   :"=a"(rc)
+   :"a"(regs)
+   :"%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
+#else
asm("pushl %%eax\n\t"
"movl 0(%%eax),%%edx\n\t"
"push %%edx\n\t"
@@ -137,7 +164,7 @@ static int i8k_smm(struct smm_regs *regs
"andl $1,%%eax\n":"=a"(rc)
:"a"(regs)
:"%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
-
+#endif
if (rc != 0 || (regs->eax & 0x) == 0x || regs->eax == eax)
return -EINVAL;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Bradley Smith
From: Bradley Smith [EMAIL PROTECTED]

Adds #if clause and additional inline assembly so that the driver
builds on x86_64 systems.

Signed-off-by: Bradley Smith [EMAIL PROTECTED]

---

--- linux-2.6/drivers/char/i8k.c.orig   2007-10-28 12:27:34.0 +
+++ linux-2.6/drivers/char/i8k.c2007-10-28 14:27:56.0 +
@@ -113,6 +113,33 @@ static int i8k_smm(struct smm_regs *regs
int rc;
int eax = regs-eax;
 
+#if defined(__x86_64__)
+   asm(pushq %%rax\n\t
+   movl 0(%%rax),%%edx\n\t
+   pushq %%rdx\n\t
+   movl 4(%%rax),%%ebx\n\t
+   movl 8(%%rax),%%ecx\n\t
+   movl 12(%%rax),%%edx\n\t
+   movl 16(%%rax),%%esi\n\t
+   movl 20(%%rax),%%edi\n\t
+   popq %%rax\n\t
+   out %%al,$0xb2\n\t
+   out %%al,$0x84\n\t
+   xchgq %%rax,(%%rsp)\n\t
+   movl %%ebx,4(%%rax)\n\t
+   movl %%ecx,8(%%rax)\n\t
+   movl %%edx,12(%%rax)\n\t
+   movl %%esi,16(%%rax)\n\t
+   movl %%edi,20(%%rax)\n\t
+   popq %%rdx\n\t
+   movl %%edx,0(%%rax)\n\t
+   lahf\n\t
+   shrl $8,%%eax\n\t
+   andl $1,%%eax\n
+   :=a(rc)
+   :a(regs)
+   :%ebx, %ecx, %edx, %esi, %edi, memory);
+#else
asm(pushl %%eax\n\t
movl 0(%%eax),%%edx\n\t
push %%edx\n\t
@@ -137,7 +164,7 @@ static int i8k_smm(struct smm_regs *regs
andl $1,%%eax\n:=a(rc)
:a(regs)
:%ebx, %ecx, %edx, %esi, %edi, memory);
-
+#endif
if (rc != 0 || (regs-eax  0x) == 0x || regs-eax == eax)
return -EINVAL;
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Adrian Bunk
On Sun, Oct 28, 2007 at 05:25:19PM +, Bradley Smith wrote:
 From: Bradley Smith [EMAIL PROTECTED]
 
 Adds #if clause and additional inline assembly so that the driver
 builds on x86_64 systems.
 
 Signed-off-by: Bradley Smith [EMAIL PROTECTED]
 
 ---
 
 --- linux-2.6/drivers/char/i8k.c.orig 2007-10-28 12:27:34.0 +
 +++ linux-2.6/drivers/char/i8k.c  2007-10-28 14:27:56.0 +
 @@ -113,6 +113,33 @@ static int i8k_smm(struct smm_regs *regs
   int rc;
   int eax = regs-eax;
  
 +#if defined(__x86_64__)
...

Please use CONFIG_X86_64.

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Jeff Garzik

Bradley Smith wrote:

From: Bradley Smith [EMAIL PROTECTED]

Adds #if clause and additional inline assembly so that the driver
builds on x86_64 systems.

Signed-off-by: Bradley Smith [EMAIL PROTECTED]


Is this actually known to be working on a Dell laptop?

Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Bradley Smith
On Sun, 28 Oct 2007 13:59:22 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:

 Bradley Smith wrote:
  From: Bradley Smith [EMAIL PROTECTED]
  
  Adds #if clause and additional inline assembly so that the driver
  builds on x86_64 systems.
  
  Signed-off-by: Bradley Smith [EMAIL PROTECTED]
 
 Is this actually known to be working on a Dell laptop?
 
   Jeff
 

Yes, I have a dell laptop, and it works. (I have been using it for quite a 
while).

Brad.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] I8K: Allow i8k driver to be built on x86_64 systems

2007-10-28 Thread Bradley Smith
On Sun, 28 Oct 2007 18:37:24 +0100
Adrian Bunk [EMAIL PROTECTED] wrote:

 
 Please use CONFIG_X86_64.
 
 cu
 Adrian
 

Now uses CONFIG_X86_64.

Brad.

--- linux-2.6/drivers/char/i8k.c.orig   2007-10-28 12:27:34.0 +
+++ linux-2.6/drivers/char/i8k.c2007-10-28 14:27:56.0 +
@@ -113,6 +113,33 @@ static int i8k_smm(struct smm_regs *regs
int rc;
int eax = regs-eax;
 
+#if defined(CONFIG_X86_64)
+   asm(pushq %%rax\n\t
+   movl 0(%%rax),%%edx\n\t
+   pushq %%rdx\n\t
+   movl 4(%%rax),%%ebx\n\t
+   movl 8(%%rax),%%ecx\n\t
+   movl 12(%%rax),%%edx\n\t
+   movl 16(%%rax),%%esi\n\t
+   movl 20(%%rax),%%edi\n\t
+   popq %%rax\n\t
+   out %%al,$0xb2\n\t
+   out %%al,$0x84\n\t
+   xchgq %%rax,(%%rsp)\n\t
+   movl %%ebx,4(%%rax)\n\t
+   movl %%ecx,8(%%rax)\n\t
+   movl %%edx,12(%%rax)\n\t
+   movl %%esi,16(%%rax)\n\t
+   movl %%edi,20(%%rax)\n\t
+   popq %%rdx\n\t
+   movl %%edx,0(%%rax)\n\t
+   lahf\n\t
+   shrl $8,%%eax\n\t
+   andl $1,%%eax\n
+   :=a(rc)
+   :a(regs)
+   :%ebx, %ecx, %edx, %esi, %edi, memory);
+#else
asm(pushl %%eax\n\t
movl 0(%%eax),%%edx\n\t
push %%edx\n\t
@@ -137,7 +164,7 @@ static int i8k_smm(struct smm_regs *regs
andl $1,%%eax\n:=a(rc)
:a(regs)
:%ebx, %ecx, %edx, %esi, %edi, memory);
-
+#endif
if (rc != 0 || (regs-eax  0x) == 0x || regs-eax == eax)
return -EINVAL;
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/