]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/mm_types.h
mm: define USE_SPLIT_PTLOCKS rather than repeating expression
[linux-2.6-omap-h63xx.git] / include / linux / mm_types.h
index bf334138c7c148da4c9ec7b409254045de0d327b..9d49fa36bbeff3237e2e0f4925a0ed3ac1ec1b29 100644 (file)
 
 struct address_space;
 
-#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
+#define USE_SPLIT_PTLOCKS      (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
+
+#if USE_SPLIT_PTLOCKS
 typedef atomic_long_t mm_counter_t;
-#else  /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
+#else  /* !USE_SPLIT_PTLOCKS */
 typedef unsigned long mm_counter_t;
-#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
+#endif /* !USE_SPLIT_PTLOCKS */
 
 /*
  * Each physical page in the system has a struct page associated with
@@ -65,7 +67,7 @@ struct page {
                                                 * see PAGE_MAPPING_ANON below.
                                                 */
            };
-#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
+#if USE_SPLIT_PTLOCKS
            spinlock_t ptl;
 #endif
            struct kmem_cache *slab;    /* SLUB: Pointer to slab */