Whamcloud - gitweb
LU-663 kernel: Some arch do not have NUMA features anymore
[fs/lustre-release.git] / lustre / include / linux / lustre_compat25.h
index 01f5e4f..ecaa8eb 100644 (file)
@@ -692,10 +692,6 @@ static inline int ll_crypto_hmac(struct crypto_tfm *tfm,
 #define cfs_for_each_possible_cpu(cpu) for_each_cpu(cpu)
 #endif
 
-#ifndef cpu_to_node
-#define cpu_to_node(cpu)         0
-#endif
-
 #ifdef HAVE_BIO_ENDIO_2ARG
 #define cfs_bio_io_error(a,b)   bio_io_error((a))
 #define cfs_bio_endio(a,b,c)    bio_endio((a),(c))
@@ -860,5 +856,10 @@ static inline int ll_quota_off(struct super_block *sb, int off, int remount)
 #define ll_pagevec_lru_add_file(pv)     pagevec_lru_add_file(pv)
 #endif
 
+#if !defined(HAVE_NODE_TO_CPUMASK) && defined(HAVE_CPUMASK_OF_NODE)
+#define node_to_cpumask(i)         (*(cpumask_of_node(i)))
+#define HAVE_NODE_TO_CPUMASK
+#endif
+
 #endif /* __KERNEL__ */
 #endif /* _COMPAT25_H */