lkml.org 
[lkml]   [2023]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 11/86] Revert "sched/preempt: Simplify irqentry_exit_cond_resched() callers"
    Date
    This reverts commit 4624a14f4daa8ab4578d274555fd8847254ce339.

    Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
    ---
    include/linux/entry-common.h | 9 +++------
    kernel/entry/common.c | 12 ++++++++----
    2 files changed, 11 insertions(+), 10 deletions(-)

    diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
    index a382716ea7b2..6567e99e079e 100644
    --- a/include/linux/entry-common.h
    +++ b/include/linux/entry-common.h
    @@ -414,14 +414,11 @@ irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs);
    *
    * Conditional reschedule with additional sanity checks.
    */
    -void raw_irqentry_exit_cond_resched(void);
    +void irqentry_exit_cond_resched(void);
    #ifdef CONFIG_PREEMPT_DYNAMIC
    -#define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched
    +#define irqentry_exit_cond_resched_dynamic_enabled irqentry_exit_cond_resched
    #define irqentry_exit_cond_resched_dynamic_disabled NULL
    -DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched);
    -#define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)()
    -#else
    -#define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched()
    +DECLARE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched);
    #endif

    /**
    diff --git a/kernel/entry/common.c b/kernel/entry/common.c
    index 38593049c40c..b0b7be0705e0 100644
    --- a/kernel/entry/common.c
    +++ b/kernel/entry/common.c
    @@ -377,7 +377,7 @@ noinstr irqentry_state_t irqentry_enter(struct pt_regs *regs)
    return ret;
    }

    -void raw_irqentry_exit_cond_resched(void)
    +void irqentry_exit_cond_resched(void)
    {
    if (!preempt_count()) {
    /* Sanity check RCU and thread stack */
    @@ -389,7 +389,7 @@ void raw_irqentry_exit_cond_resched(void)
    }
    }
    #ifdef CONFIG_PREEMPT_DYNAMIC
    -DEFINE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched);
    +DEFINE_STATIC_CALL(irqentry_exit_cond_resched, irqentry_exit_cond_resched);
    #endif

    noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state)
    @@ -417,9 +417,13 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state)
    }

    instrumentation_begin();
    - if (IS_ENABLED(CONFIG_PREEMPTION))
    + if (IS_ENABLED(CONFIG_PREEMPTION)) {
    +#ifdef CONFIG_PREEMPT_DYNAMIC
    + static_call(irqentry_exit_cond_resched)();
    +#else
    irqentry_exit_cond_resched();
    -
    +#endif
    + }
    /* Covers both tracing and lockdep */
    trace_hardirqs_on();
    instrumentation_end();
    --
    2.31.1
    \
     
     \ /
      Last update: 2023-11-20 13:52    [W:4.415 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site