[Xorg-driver-geode] [PATCH] Allow compilation under 64 bit systems

Gaetan Nadon memsize at videotron.ca
Wed Jun 23 07:57:27 PDT 2010


On Wed, 2010-06-23 at 14:35 +0800, Huang, FrankR wrote:

> 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?


Exactly. 

- We (as in X.Org) get bug reports as compilation fails on 64 bit.
People don't know so they ask. 
- People other than pure Geode developers make contributions and many
have 64 bit systems. It could be in Autotools only, like I do,
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.

It is a simple matter of making it easy for others to contribute. 


> 
> Thanks,
> Frank
> 
> -----Original Message-----
> From: xorg-driver-geode-bounces+frankr.huang=amd.com at lists.x.org [mailto:xorg-driver-geode-bounces+frankr.huang=amd.com at lists.x.org] On Behalf Of Gaetan Nadon
> Sent: 2010?6?23? 7:53
> To: xorg-driver-geode at lists.x.org
> 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 <memsize at videotron.ca>
> ---
>  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100623/170d7daf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100623/170d7daf/attachment.pgp>


More information about the Xorg-driver-geode mailing list