lkml.org 
[lkml]   [2009]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/7] percpu: clean up percpu variable definitions
    David Miller wrote:
    > From: Tejun Heo <tj@kernel.org>
    > Date: Mon, 1 Jun 2009 17:58:24 +0900
    >
    >> --- a/arch/cris/include/asm/mmu_context.h
    >> +++ b/arch/cris/include/asm/mmu_context.h
    >> @@ -17,7 +17,7 @@ extern void switch_mm(struct mm_struct *prev, struct mm_struct *next,
    >> * registers like cr3 on the i386
    >> */
    >>
    >> -extern volatile DEFINE_PER_CPU(pgd_t *,current_pgd); /* defined in arch/cris/mm/fault.c */
    >> +DECLARE_PER_CPU(pgd_t *,current_pgd); /* defined in arch/cris/mm/fault.c */
    >>
    >> static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
    >> {
    >
    > Yes volatile sucks, but might this break something?
    >
    > Whether the volatile is actually needed or not, it's bad to have this
    > kind of potential behavior changing nugget hidden in this seemingly
    > inocuous change. Especially if you're the poor soul who ends up
    > having to debug it :-/

    Shouldn't the "volatile" go inside the DECLARE_PER_CPU() with the rest
    of the type? [Disclaimer: I haven't actually looked.]

    -hpa

    --
    H. Peter Anvin, Intel Open Source Technology Center
    I work for Intel. I don't speak on their behalf.



    \
     
     \ /
      Last update: 2009-06-10 21:43    [W:0.022 / U:1.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site