staging: lustre: libcfs: move NUM_CACHEPAGES to libcfs_prim.h
authorJames Simmons <jsimmons@infradead.org>
Thu, 31 Mar 2016 14:18:39 +0000 (10:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Mar 2016 20:04:45 +0000 (13:04 -0700)
We don't really need linux specific headers anymore so move
NUM_CACHEPAGES macro to libcfs_prim.h.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/13841
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h

index d97060b..6f7a276 100644 (file)
 /*
  * Memory
  */
+#if BITS_PER_LONG == 32
+/* limit to lowmem on 32-bit systems */
+#define NUM_CACHEPAGES \
+       min(totalram_pages, 1UL << (30 - PAGE_CACHE_SHIFT) * 3 / 4)
+#else
+#define NUM_CACHEPAGES totalram_pages
+#endif
+
 static inline unsigned int memory_pressure_get(void)
 {
        return current->flags & PF_MEMALLOC;
index c4b4284..9285fef 100644 (file)
 #include "../libcfs_cpu.h"
 #endif
 
-#if BITS_PER_LONG == 32
-/* limit to lowmem on 32-bit systems */
-#define NUM_CACHEPAGES \
-       min(totalram_pages, 1UL << (30 - PAGE_CACHE_SHIFT) * 3 / 4)
-#else
-#define NUM_CACHEPAGES totalram_pages
-#endif
-
 #endif /* __LINUX_CFS_MEM_H__ */