02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

19 May, 2015

1 commit

  • preempt_mask.h defines all the preempt_count semantics and related
    symbols: preempt, softirq, hardirq, nmi, preempt active, need resched,
    etc...

    preempt.h defines the accessors and mutators of preempt_count.

    But there is a messy dependency game around those two header files:

    * preempt_mask.h includes preempt.h in order to access preempt_count()

    * preempt_mask.h defines all preempt_count semantic and symbols
    except PREEMPT_NEED_RESCHED that is needed by asm/preempt.h
    Thus we need to define it from preempt.h, right before including
    asm/preempt.h, instead of defining it to preempt_mask.h with the
    other preempt_count symbols. Therefore the preempt_count semantics
    happen to be spread out.

    * We plan to introduce preempt_active_[enter,exit]() to consolidate
    preempt_schedule*() code. But we'll need to access both preempt_count
    mutators (preempt_count_add()) and preempt_count symbols
    (PREEMPT_ACTIVE, PREEMPT_OFFSET). The usual place to define preempt
    operations is in preempt.h but then we'll need symbols in
    preempt_mask.h which already includes preempt.h. So we end up with
    a ressource circle dependency.

    Lets merge preempt_mask.h into preempt.h to solve these dependency issues.
    This way we gather semantic symbols and operation definition of
    preempt_count in a single file.

    This is a dumb copy-paste merge. Further merge re-arrangments are
    performed in a subsequent patch to ease review.

    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1431441711-29753-2-git-send-email-fweisbec@gmail.com
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

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