• Tejun Heo's avatar
    percpu: include/asm-generic/percpu.h should contain only arch-overridable parts · 62fde541
    Tejun Heo authored
    The roles of the various percpu header files has become unclear.
    There are four header files involved.
    
     include/linux/percpu-defs.h
     include/linux/percpu.h
     include/asm-generic/percpu.h
     arch/*/include/asm/percpu.h
    
    The original intention for include/asm-generic/percpu.h is providing
    generic definitions for arch-overridable parts; however, it now hosts
    various stuff which can't be overridden by archs.
    
    Also, include/linux/percpu-defs.h was initially added to contain
    section and percpu variable definition macros so that arch header
    files can make use of them without worrying about introducing cyclic
    inclusion dependency by including include/linux/percpu.h; however,
    arch headers sometimes need to access percpu variables too and this is
    one of the reasons why some accessors were implemented in
    include/linux/asm-generic/percpu.h.
    
    Let's clear up the situation by making include/asm-generic/percpu.h
    contain only arch-overridable parts and moving accessors and
    operations into include/linux/percpu-defs.  Note that this patch only
    moves things from include/asm-generic/percpu.h.
    include/linux/percpu.h will be taken care of by later patches.
    
    This patch moves the followings.
    
    * SHIFT_PERCPU_PTR() / VERIFY_PERCPU_PTR()
    * per_cpu()
    * raw_cpu_ptr()
    * this_cpu_ptr()
    * __get_cpu_var()
    * __raw_get_cpu_var()
    * __this_cpu_ptr()
    * PER_CPU_[SHARED_]ALIGNED_SECTION
    * PER_CPU_[SHARED_]ALIGNED_SECTION
    * PER_CPU_FIRST_SECTION
    
    This patch is pure reorganization.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarChristoph Lameter <cl@linux.com>
    62fde541
percpu.h 1.63 KB