lkml.org 
[lkml]   [2011]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/2] rcu: export rcu_note_context_switch() function
    Date

    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    ---
    include/linux/rcutiny.h | 6 +-----
    kernel/rcutiny.c | 7 +++++++
    kernel/rcutree.c | 1 +
    3 files changed, 9 insertions(+), 5 deletions(-)

    diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
    index 30ebd7c..8e5f7cf 100644
    --- a/include/linux/rcutiny.h
    +++ b/include/linux/rcutiny.h
    @@ -93,11 +93,7 @@ static inline int rcu_needs_cpu(int cpu)

    #endif /* #else #ifdef CONFIG_TINY_RCU */

    -static inline void rcu_note_context_switch(int cpu)
    -{
    - rcu_sched_qs(cpu);
    - rcu_preempt_note_context_switch();
    -}
    +extern void rcu_note_context_switch(int cpu);

    /*
    * Return the number of grace periods.
    diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
    index 0c343b9..3d715a4 100644
    --- a/kernel/rcutiny.c
    +++ b/kernel/rcutiny.c
    @@ -78,6 +78,13 @@ void rcu_exit_nohz(void)

    #endif /* #ifdef CONFIG_NO_HZ */

    +void rcu_note_context_switch(int cpu)
    +{
    + rcu_sched_qs(cpu);
    + rcu_preempt_note_context_switch();
    +}
    +EXPORT_SYMBOL_GPL(rcu_note_context_switch);
    +
    /*
    * Helper function for rcu_qsctr_inc() and rcu_bh_qsctr_inc().
    * Also disable irqs to avoid confusion due to interrupt handlers
    diff --git a/kernel/rcutree.c b/kernel/rcutree.c
    index dd4aea8..0837d63 100644
    --- a/kernel/rcutree.c
    +++ b/kernel/rcutree.c
    @@ -124,6 +124,7 @@ void rcu_note_context_switch(int cpu)
    rcu_sched_qs(cpu);
    rcu_preempt_note_context_switch(cpu);
    }
    +EXPORT_SYMBOL_GPL(rcu_note_context_switch);

    #ifdef CONFIG_NO_HZ
    DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {
    --
    1.7.2.3


    \
     
     \ /
      Last update: 2011-04-28 11:55    [W:0.026 / U:2.728 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site