14 Jan, 2014

1 commit

  • Currently local_bh_disable() is out-of-line for no apparent reason.
    So inline it to save a few cycles on call/return nonsense, the
    function body is a single add on x86 (a few loads and store extra on
    load/store archs).

    Also expose two new local_bh functions:

    __local_bh_{dis,en}able_ip(unsigned long ip, unsigned int cnt);

    Which implement the actual local_bh_{dis,en}able() behaviour.

    The next patch uses the exposed @cnt argument to optimize bh lock
    functions.

    With build fixes from Jacob Pan.

    Cc: rjw@rjwysocki.net
    Cc: rui.zhang@intel.com
    Cc: jacob.jun.pan@linux.intel.com
    Cc: Mike Galbraith
    Cc: hpa@zytor.com
    Cc: Arjan van de Ven
    Cc: lenb@kernel.org
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20131119151338.GF3694@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

28 Nov, 2008

1 commit

  • Impact: remove unused code

    __local_bh_enable has been replaced with _local_bh_enable.
    As comments says "it always nests inside local_bh_enable() sections"
    has not been valid now. Also there is no reason to use __local_bh_enable
    anywhere, so we can remove this useless function.

    Signed-off-by: Liming Wang
    Signed-off-by: Ingo Molnar

    Liming Wang
     

08 Dec, 2006

1 commit

  • With CONFIG_SMP=n:

    drivers/input/ff-memless.c:384: warning: implicit declaration of function 'local_bh_disable'
    drivers/input/ff-memless.c:393: warning: implicit declaration of function 'local_bh_enable'

    Really linux/spinlock.h should include linux/interrupt.h. But interrupt.h
    includes sched.h which will need spinlock.h.

    So the patch breaks the _bh declarations out into a separate header and
    includes it in both interrupt.h and spinlock.h.

    Cc: "Randy.Dunlap"
    Cc: Andi Kleen
    Cc:
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton