percpu: add __percpu notations to UP allocator
Add __percpu notations to UP percpu allocator. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
18cb2aef91
commit
94cb121c94
|
@ -14,13 +14,13 @@ void __percpu *__alloc_percpu(size_t size, size_t align)
|
||||||
* percpu sections on SMP for which this path isn't used.
|
* percpu sections on SMP for which this path isn't used.
|
||||||
*/
|
*/
|
||||||
WARN_ON_ONCE(align > SMP_CACHE_BYTES);
|
WARN_ON_ONCE(align > SMP_CACHE_BYTES);
|
||||||
return kzalloc(size, GFP_KERNEL);
|
return (void __percpu __force *)kzalloc(size, GFP_KERNEL);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(__alloc_percpu);
|
EXPORT_SYMBOL_GPL(__alloc_percpu);
|
||||||
|
|
||||||
void free_percpu(void __percpu *p)
|
void free_percpu(void __percpu *p)
|
||||||
{
|
{
|
||||||
kfree(p);
|
kfree(this_cpu_ptr(p));
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(free_percpu);
|
EXPORT_SYMBOL_GPL(free_percpu);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue