aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-08-14 02:00:49 -0400
committerTejun Heo <tj@kernel.org>2009-08-14 02:00:49 -0400
commit08fc45806103e59a37418e84719b878f9bb32540 (patch)
tree8b39b7769fd42457bdb2950ce02d9893f39c0b7d /include/linux
parent00ae4064b1445524752575dd84df227c0687c99d (diff)
percpu: build first chunk allocators selectively
There's no need to build unused first chunk allocators in. Define CONFIG_NEED_PER_CPU_*_FIRST_CHUNK and let archs enable them selectively. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/percpu.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 7989f61b03f3..e26788e0da4a 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -70,17 +70,21 @@ extern size_t __init pcpu_setup_first_chunk(
70 ssize_t dyn_size, size_t unit_size, 70 ssize_t dyn_size, size_t unit_size,
71 void *base_addr, const int *unit_map); 71 void *base_addr, const int *unit_map);
72 72
73#ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK
73extern ssize_t __init pcpu_embed_first_chunk( 74extern ssize_t __init pcpu_embed_first_chunk(
74 size_t static_size, size_t reserved_size, 75 size_t static_size, size_t reserved_size,
75 ssize_t dyn_size); 76 ssize_t dyn_size);
77#endif
76 78
79#ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK
77extern ssize_t __init pcpu_page_first_chunk( 80extern ssize_t __init pcpu_page_first_chunk(
78 size_t static_size, size_t reserved_size, 81 size_t static_size, size_t reserved_size,
79 pcpu_fc_alloc_fn_t alloc_fn, 82 pcpu_fc_alloc_fn_t alloc_fn,
80 pcpu_fc_free_fn_t free_fn, 83 pcpu_fc_free_fn_t free_fn,
81 pcpu_fc_populate_pte_fn_t populate_pte_fn); 84 pcpu_fc_populate_pte_fn_t populate_pte_fn);
85#endif
82 86
83#ifdef CONFIG_NEED_MULTIPLE_NODES 87#ifdef CONFIG_NEED_PER_CPU_LPAGE_FIRST_CHUNK
84extern int __init pcpu_lpage_build_unit_map( 88extern int __init pcpu_lpage_build_unit_map(
85 size_t static_size, size_t reserved_size, 89 size_t static_size, size_t reserved_size,
86 ssize_t *dyn_sizep, size_t *unit_sizep, 90 ssize_t *dyn_sizep, size_t *unit_sizep,
@@ -98,27 +102,6 @@ extern ssize_t __init pcpu_lpage_first_chunk(
98 102
99extern void *pcpu_lpage_remapped(void *kaddr); 103extern void *pcpu_lpage_remapped(void *kaddr);
100#else 104#else
101static inline int pcpu_lpage_build_unit_map(
102 size_t static_size, size_t reserved_size,
103 ssize_t *dyn_sizep, size_t *unit_sizep,
104 size_t lpage_size, int *unit_map,
105 pcpu_fc_cpu_distance_fn_t cpu_distance_fn)
106{
107 return -EINVAL;
108}
109
110static inline ssize_t __init pcpu_lpage_first_chunk(
111 size_t static_size, size_t reserved_size,
112 size_t dyn_size, size_t unit_size,
113 size_t lpage_size, const int *unit_map,
114 int nr_units,
115 pcpu_fc_alloc_fn_t alloc_fn,
116 pcpu_fc_free_fn_t free_fn,
117 pcpu_fc_map_fn_t map_fn)
118{
119 return -EINVAL;
120}
121
122static inline void *pcpu_lpage_remapped(void *kaddr) 105static inline void *pcpu_lpage_remapped(void *kaddr)
123{ 106{
124 return NULL; 107 return NULL;