diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-09-09 15:43:22 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-10 14:04:59 +0200 |
commit | f7d0b926ac8c8ec0c7a83ee69409bd2e6bb39f81 (patch) | |
tree | c5d6c99368dbe769c5a7ee9a00843d2745191f68 /include/linux/mm_types.h | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) | |
download | kernel_samsung_espresso10-f7d0b926ac8c8ec0c7a83ee69409bd2e6bb39f81.zip kernel_samsung_espresso10-f7d0b926ac8c8ec0c7a83ee69409bd2e6bb39f81.tar.gz kernel_samsung_espresso10-f7d0b926ac8c8ec0c7a83ee69409bd2e6bb39f81.tar.bz2 |
mm: define USE_SPLIT_PTLOCKS rather than repeating expression
Define USE_SPLIT_PTLOCKS as a constant expression rather than repeating
"NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS" all over the place.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/mm_types.h')
-rw-r--r-- | include/linux/mm_types.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index bf33413..9d49fa3 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -21,11 +21,13 @@ 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 */ |