diff options
| author | Tejun Heo <tj@kernel.org> | 2009-08-14 02:00:50 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2009-08-14 02:00:50 -0400 |
| commit | f58dc01ba2ca9fe3ab2ba4ca43d9c8a735cf62d8 (patch) | |
| tree | 9eb76a0d6aa34e56f8650fe98a5ce26891a522ab /include/linux | |
| parent | 08fc45806103e59a37418e84719b878f9bb32540 (diff) | |
percpu: generalize first chunk allocator selection
Now that all first chunk allocators are in mm/percpu.c, it makes sense
to make generalize percpu_alloc kernel parameter. Define PCPU_FC_*
and set pcpu_chosen_fc using early_param() in mm/percpu.c. Arch code
can use the set value to determine which first chunk allocator to use.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/percpu.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index e26788e0da4a..9be05cbe5ee0 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -59,6 +59,18 @@ | |||
| 59 | extern void *pcpu_base_addr; | 59 | extern void *pcpu_base_addr; |
| 60 | extern const int *pcpu_unit_map; | 60 | extern const int *pcpu_unit_map; |
| 61 | 61 | ||
| 62 | enum pcpu_fc { | ||
| 63 | PCPU_FC_AUTO, | ||
| 64 | PCPU_FC_EMBED, | ||
| 65 | PCPU_FC_PAGE, | ||
| 66 | PCPU_FC_LPAGE, | ||
| 67 | |||
| 68 | PCPU_FC_NR, | ||
| 69 | }; | ||
| 70 | extern const char *pcpu_fc_names[PCPU_FC_NR]; | ||
| 71 | |||
| 72 | extern enum pcpu_fc pcpu_chosen_fc; | ||
| 73 | |||
| 62 | typedef void * (*pcpu_fc_alloc_fn_t)(unsigned int cpu, size_t size); | 74 | typedef void * (*pcpu_fc_alloc_fn_t)(unsigned int cpu, size_t size); |
| 63 | typedef void (*pcpu_fc_free_fn_t)(void *ptr, size_t size); | 75 | typedef void (*pcpu_fc_free_fn_t)(void *ptr, size_t size); |
| 64 | typedef void (*pcpu_fc_populate_pte_fn_t)(unsigned long addr); | 76 | typedef void (*pcpu_fc_populate_pte_fn_t)(unsigned long addr); |
