patch-hw_xfree86_common_compiler_h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. from alpinelinux
  2. --- xorg-server-1.15.0.orig/hw/xfree86/common/compiler.h 2013-12-15 08:48:09.000000000 +0100
  3. +++ xorg-server-1.15.0/hw/xfree86/common/compiler.h 2014-03-21 12:53:48.834417415 +0100
  4. @@ -727,26 +727,26 @@ xf86WriteMmio32LeNB(__volatile__ void *b
  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. @@ -754,21 +754,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. @@ -995,7 +995,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 */