19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 Sep, 2018

1 commit

  • The table id (second) argument to MODULE_DEVICE_TABLE is often
    referenced otherwise. This is not the case for CPU features. This
    leads to warnings when building the kernel with Clang:
    arch/arm/crypto/aes-ce-glue.c:450:1: warning: variable
    'cpu_feature_match_AES' is not needed and will not be emitted
    [-Wunneeded-internal-declaration]
    module_cpu_feature_match(AES, aes_init);
    ^

    Avoid warnings by using __maybe_unused, similar to commit 1f318a8bafcf
    ("modules: mark __inittest/__exittest as __maybe_unused").

    Fixes: 67bad2fdb754 ("cpu: add generic support for CPU feature based module autoloading")
    Signed-off-by: Stefan Agner
    Acked-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Stefan Agner
     

22 Jul, 2015

1 commit


19 Feb, 2014

1 commit

  • This patch adds support for advertising optional CPU features over udev
    using the modalias, and for declaring compatibility with/dependency upon
    such a feature in a module.

    The mapping between feature numbers and actual features should be provided
    by the architecture in a file called which exports the
    following functions/macros:
    - cpu_feature(FEAT), a preprocessor macro that maps token FEAT to a
    numeric index;
    - bool cpu_have_feature(n), returning whether this CPU has support for
    feature #n;
    - MAX_CPU_FEATURES, an upper bound for 'n' in the previous function.

    The feature can then be enabled by setting CONFIG_GENERIC_CPU_AUTOPROBE
    for the architecture.

    For instance, a module that registers its module init function using

    module_cpu_feature_match(FEAT_X, module_init_function)

    will be probed automatically when the CPU's support for the 'FEAT_X'
    feature is advertised over udev, and will only allow the module to be
    loaded by hand if the 'FEAT_X' feature is supported.

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Greg Kroah-Hartman

    Ard Biesheuvel