X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=include%2Flinux%2Fpercpu.h;h=5095b834a6fb52f1f746257805f34cdabf186528;hp=aeeeef1093cd15d5feef4103900a2a9e2ccdb4d8;hb=0fc0531e0a2174377a86fd6953ecaa00287d8f70;hpb=9329ba9704f6bd51a735982e0d4a3eed72c3294f diff --git a/include/linux/percpu.h b/include/linux/percpu.h index aeeeef1093cd..5095b834a6fb 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -39,6 +39,15 @@ 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) + /* minimum unit size, also is the maximum supported allocation size */ #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10)