32bit pointer in 64bit kernel code

Armin Schindler mac at melware.de
Fri Aug 2 19:28:15 EST 2002


Hi,

I'm new in linux ppc64 and it would be great if someone can help on
some questions. I use SuSE SLES7.

I want to port a PCI card driver to be 64bit compatible and my current
problem is how to tell the cross gcc to produce 32bit pointers.
This is necessary for a structure which is used on the PCI cards
shared memory. This structure, somthing like
struct x {
  int number;
  unsigned char * addr;
  unsigned short val;
}
need to be correctly aligned and the pointer is 32bit.

I know, I could use unsigned int here, but is there some
kind of __attribute__ for example to tell the 64bit gcc that
this is 32bit pointer ?

Thanx,
Armin


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list