patch-hw_xfree86_common_compiler_h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. from alpinelinux
  2. --- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h 2015-10-28 19:15:36.000000000 +0100
  3. +++ xorg-server-1.18.0/hw/xfree86/common/compiler.h 2016-01-08 01:41:49.582326445 +0100
  4. @@ -525,26 +525,26 @@ xf86WriteMmio32Le(__volatile__ void *bas
  5. #define PORT_SIZE short
  6. #endif
  7. -_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
  8. +_X_EXPORT volatile unsigned char *ioBase; /* Memory mapped I/O port area */
  9. static __inline__ void
  10. outb(unsigned PORT_SIZE port, unsigned char val)
  11. {
  12. - *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
  13. + *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + ioBase) =
  14. val;
  15. }
  16. static __inline__ void
  17. outw(unsigned PORT_SIZE port, unsigned short val)
  18. {
  19. - *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
  20. + *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + ioBase) =
  21. val;
  22. }
  23. static __inline__ void
  24. outl(unsigned PORT_SIZE port, unsigned int val)
  25. {
  26. - *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
  27. + *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + ioBase) =
  28. val;
  29. }
  30. @@ -552,21 +552,21 @@ static __inline__ unsigned int
  31. inb(unsigned PORT_SIZE port)
  32. {
  33. return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) +
  34. - IOPortBase);
  35. + ioBase);
  36. }
  37. static __inline__ unsigned int
  38. inw(unsigned PORT_SIZE port)
  39. {
  40. return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) +
  41. - IOPortBase);
  42. + ioBase);
  43. }
  44. static __inline__ unsigned int
  45. inl(unsigned PORT_SIZE port)
  46. {
  47. return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) +
  48. - IOPortBase);
  49. + ioBase);
  50. }
  51. #if defined(__mips__)
  52. @@ -758,7 +758,7 @@ inl(unsigned short port)
  53. return xf86ReadMmio32Le((void *) ioBase, port);
  54. }
  55. -#elif defined(__arm__) && defined(__linux__)
  56. +#elif defined(__arm__) && defined(__GLIBC__)
  57. /* for Linux on ARM, we use the LIBC inx/outx routines */
  58. /* note that the appropriate setup via "ioperm" needs to be done */