typedef DWORD u32;
typedef unsigned __int64 u64;
#define PCI_U64_FMT_X "I64x"
+#define PCI_U64_FMT_U "I64u"
#elif defined(PCI_HAVE_STDINT_H) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
/* Use standard types in C99 and newer */
typedef uint32_t u32;
typedef uint64_t u64;
#define PCI_U64_FMT_X PRIx64
+#define PCI_U64_FMT_U PRIu64
#else
/* Hope for POSIX types from <sys/types.h> */
#if ULONG_MAX > 0xffffffff
typedef unsigned long u64;
#define PCI_U64_FMT_X "lx"
+#define PCI_U64_FMT_U "lu"
#else
typedef unsigned long long u64;
#define PCI_U64_FMT_X "llx"
+#define PCI_U64_FMT_U "llu"
#endif
#endif
snoop = get_conf_word(d, where + PCI_LTR_MAX_SNOOP);
scale = cap_ltr_scale((snoop >> PCI_LTR_SCALE_SHIFT) & PCI_LTR_SCALE_MASK);
- printf("\t\tMax snoop latency: %lldns\n",
+ printf("\t\tMax snoop latency: %" PCI_U64_FMT_U "ns\n",
((u64)snoop & PCI_LTR_VALUE_MASK) * scale);
nosnoop = get_conf_word(d, where + PCI_LTR_MAX_NOSNOOP);
scale = cap_ltr_scale((nosnoop >> PCI_LTR_SCALE_SHIFT) & PCI_LTR_SCALE_MASK);
- printf("\t\tMax no snoop latency: %lldns\n",
+ printf("\t\tMax no snoop latency: %" PCI_U64_FMT_U "ns\n",
((u64)nosnoop & PCI_LTR_VALUE_MASK) * scale);
}
if (scale > 5)
printf(" LTR1.2_Threshold=<error>");
else
- printf(" LTR1.2_Threshold=%lldns", BITS(val, 16, 10) * (u64) cap_ltr_scale(scale));
+ printf(" LTR1.2_Threshold=%" PCI_U64_FMT_U "ns", BITS(val, 16, 10) * (u64) cap_ltr_scale(scale));
}
printf("\n");
}