#ifndef __NOUVEAU_OS_H__ #define __NOUVEAU_OS_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static inline int ffsll(u64 mask) { int i; for (i = 0; i < 64; i++) { if (mask & (1ULL << i)) return i + 1; } return 0; } #ifndef ioread32_native #ifdef __BIG_ENDIAN #define ioread16_native ioread16be #define iowrite16_native iowrite16be #define ioread32_native ioread32be #define iowrite32_native iowrite32be #else /* def __BIG_ENDIAN */ #define ioread16_native ioread16 #define iowrite16_native iowrite16 #define ioread32_native ioread32 #define iowrite32_native iowrite32 #endif /* def __BIG_ENDIAN else */ #endif /* !ioread32_native */ #endif