[PATCH] fix ARCH_HAS_PREFETCH
include/linux/prefetch.h does a strange thing: if the arch doesn't have the prefectch functions, this header defines no-op version of them and then defines ARCH_HAS_PREFETCH. So there's no way for mainline code to know if the architecture *really* has prefetch instructions. This information loss is unfortunate. Examples: for (i = 0; i < N; i++) prefetch(foo[i]); Problem is, if `prefetch' is a no-op, the compiler will still generate an empty busy-wait loop. Which it must do. We need to know the truth about ARCH_HAS_PREFETCH to correctly elide that loop.
Showing
Please register or sign in to comment