aboutsummaryrefslogtreecommitdiffstats
path: root/mm/percpu_up.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-04-08 07:36:36 -0400
committerIngo Molnar <mingo@elte.hu>2010-04-08 07:37:18 -0400
commitca7e0c612005937a4a5a75d3fed90459993de65c (patch)
treeb574fc0f0189b52ffc87ba20c418228db556faa1 /mm/percpu_up.c
parent8141d0050d76e5695011b5ab577ec66fb51a998c (diff)
parentf5284e7635787224dda1a2bf82a4c56b1c75671f (diff)
Merge branch 'linus' into perf/core
Semantic conflict: arch/x86/kernel/cpu/perf_event_intel_ds.c Merge reason: pick up latest fixes, fix the conflict Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/percpu_up.c')
-rw-r--r--mm/percpu_up.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/mm/percpu_up.c b/mm/percpu_up.c
new file mode 100644
index 000000000000..c4351c7f57d2
--- /dev/null
+++ b/mm/percpu_up.c
@@ -0,0 +1,30 @@
1/*
2 * mm/percpu_up.c - dummy percpu memory allocator implementation for UP
3 */
4
5#include <linux/module.h>
6#include <linux/percpu.h>
7#include <linux/slab.h>
8
9void __percpu *__alloc_percpu(size_t size, size_t align)
10{
11 /*
12 * Can't easily make larger alignment work with kmalloc. WARN
13 * on it. Larger alignment should only be used for module
14 * percpu sections on SMP for which this path isn't used.
15 */
16 WARN_ON_ONCE(align > SMP_CACHE_BYTES);
17 return kzalloc(size, GFP_KERNEL);
18}
19EXPORT_SYMBOL_GPL(__alloc_percpu);
20
21void free_percpu(void __percpu *p)
22{
23 kfree(p);
24}
25EXPORT_SYMBOL_GPL(free_percpu);
26
27phys_addr_t per_cpu_ptr_to_phys(void *addr)
28{
29 return __pa(addr);
30}