<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Wed, 2010-06-23 at 14:35 +0800, Huang, FrankR wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Gaetan,
        Is that to say this solve method will let the geode compilation successful, but in un-use status? Only for the whole build success of the X.org tree?
</PRE>
</BLOCKQUOTE>
<BR>
Exactly. <BR>
<BR>
- We (as in X.Org) get bug reports as compilation fails on 64 bit. People don't know so they ask. <BR>
- People other than pure Geode developers make contributions and many have 64 bit systems. It could be in Autotools only, like I do,<BR>
it could be fixing code due to server API changes, like yesterday. Basically anything that is safe to do without the need of loading the driver on the real hardware.<BR>
<BR>
It is a simple matter of making it easy for others to contribute. <BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
Thanks,
Frank
-----Original Message-----
From: <A HREF="mailto:xorg-driver-geode-bounces+frankr.huang=amd.com@lists.x.org">xorg-driver-geode-bounces+frankr.huang=amd.com@lists.x.org</A> [<A HREF="mailto:xorg-driver-geode-bounces+frankr.huang=amd.com@lists.x.org">mailto:xorg-driver-geode-bounces+frankr.huang=amd.com@lists.x.org</A>] On Behalf Of Gaetan Nadon
Sent: 2010?6?23? 7:53
To: <A HREF="mailto:xorg-driver-geode@lists.x.org">xorg-driver-geode@lists.x.org</A>
Subject: [Xorg-driver-geode] [PATCH] Allow compilation under 64 bit systems
Only a few assembler related statements fails to compile
on x86_64. These will be compiled under i386+
Although the driver does not run on 64 bit systems. it prevents
build errors to be reported and it allows non-geode specific
contributions to be made.
Compiled on AMD64
Signed-off-by: Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>>
---
src/cim/cim_defs.h | 5 ++++-
src/durango.c | 4 ++++
src/lx_driver.c | 4 ++++
3 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/cim/cim_defs.h b/src/cim/cim_defs.h
index eea2f49..5d7e257 100644
--- a/src/cim/cim_defs.h
+++ b/src/cim/cim_defs.h
@@ -674,7 +674,9 @@ void cim_outd(unsigned short port, unsigned long data);
void
cim_outd(unsigned short port, unsigned long data)
{
+#ifdef __i386__
__asm__ __volatile__("outl %0,%w1"::"a"(data), "Nd"(port));
+#endif
}
/*-------------------------------------------
@@ -688,8 +690,9 @@ unsigned long
cim_ind(unsigned short port)
{
unsigned long value;
+#ifdef __i386__
__asm__ __volatile__("inl %w1,%0":"=a"(value):"Nd"(port));
-
+#endif
return value;
}
diff --git a/src/durango.c b/src/durango.c
index 9d6970b..20a25a3 100644
--- a/src/durango.c
+++ b/src/durango.c
@@ -200,7 +200,9 @@ gfx_msr_asm_write(unsigned short reg, unsigned long addr,
}
/* This is the fallback VSA method - not preferred */
+#ifdef __i386__
vsa_msr_write(reg, addr, hi, lo);
+#endif
}
void
@@ -218,7 +220,9 @@ gfx_msr_asm_read(unsigned short reg, unsigned long addr,
}
/* This is the fallback VSA method - not preferred */
+#ifdef __i386__
vsa_msr_read(reg, addr, hi, lo);
+#endif
}
#include "gfx_init.c"
diff --git a/src/lx_driver.c b/src/lx_driver.c
index 08d1fdd..71fc958 100644
--- a/src/lx_driver.c
+++ b/src/lx_driver.c
@@ -125,7 +125,9 @@ LXReadMSR(unsigned long addr, unsigned long *lo, unsigned long *hi)
if (GeodeReadMSR(addr, lo, hi) == -1) {
        unsigned int l, h;
+#ifdef __i386__
        LX_MSR_READ(addr, l, h);
+#endif
        *lo = l;
        *hi = h;
}
@@ -134,8 +136,10 @@ LXReadMSR(unsigned long addr, unsigned long *lo, unsigned long *hi)
static void
LXWriteMSR(unsigned long addr, unsigned long lo, unsigned long hi)
{
+#ifdef __i386__
if (GeodeWriteMSR(addr, lo, hi) == -1)
        LX_MSR_WRITE(addr, lo, hi);
+#endif
}
static unsigned int
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>