From: Linus Torvalds Date: Sat, 23 Oct 2010 00:31:36 +0000 (-0700) Subject: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0fc0531e0a2174377a86fd6953ecaa00287d8f70;p=linux-beck.git Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: update comments to reflect that percpu allocations are always zero-filled percpu: Optimize __get_cpu_var() x86, percpu: Optimize this_cpu_ptr percpu: clear memory allocated with the km allocator percpu: fix build breakage on s390 and cleanup build configuration tests percpu: use percpu allocator on UP too percpu: reduce PCPU_MIN_UNIT_SIZE to 32k vmalloc: pcpu_get/free_vm_areas() aren't needed on UP Fixed up trivial conflicts in include/linux/percpu.h --- 0fc0531e0a2174377a86fd6953ecaa00287d8f70 diff --cc include/linux/percpu.h index 0eb50832aa00,aeeeef1093cd..5095b834a6fb --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@@ -39,19 -39,8 +39,17 @@@ preempt_enable(); \ } while (0) +#define get_cpu_ptr(var) ({ \ + preempt_disable(); \ + this_cpu_ptr(var); }) + +#define put_cpu_ptr(var) do { \ + (void)(var); \ + preempt_enable(); \ +} while (0) + - #ifdef CONFIG_SMP - /* minimum unit size, also is the maximum supported allocation size */ - #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10) + #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) /* * Percpu allocator can serve percpu allocations before slab is