04 Jun, 2019

1 commit

  • It appears that kernel-doc does not understand the return type *__ref,

    drivers/acpi/osl.c:306: warning: cannot understand function prototype:
    'void __iomem *__ref acpi_os_map_iomem(acpi_physical_address phys,
    acpi_size size)

    Signed-off-by: Qian Cai
    [ rjw: Subject ]
    Signed-off-by: Rafael J. Wysocki

    Qian Cai
     

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
     

21 Dec, 2016

1 commit


03 Aug, 2016

1 commit

  • There was only one use of __initdata_refok and __exit_refok

    __init_refok was used 46 times against 82 for __ref.

    Those definitions are obsolete since commit 312b1485fb50 ("Introduce new
    section reference annotations tags: __ref, __refdata, __refconst")

    This patch removes the following compatibility definitions and replaces
    them treewide.

    /* compatibility defines */
    #define __init_refok __ref
    #define __initdata_refok __refdata
    #define __exit_refok __ref

    I can also provide separate patches if necessary.
    (One patch per tree and check in 1 month or 2 to remove old definitions)

    [akpm@linux-foundation.org: coding-style fixes]
    Link: http://lkml.kernel.org/r/1466796271-3043-1-git-send-email-fabf@skynet.be
    Signed-off-by: Fabian Frederick
    Cc: Ingo Molnar
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     

25 Mar, 2015

1 commit

  • The acpi_os_ioremap() function may be used to map normal RAM or IO
    regions. The current implementation simply uses ioremap_cache(). This
    will work for some architectures, but arm64 ioremap_cache() cannot be
    used to map IO regions which don't support caching. So for arm64, use
    ioremap() for non-RAM regions.

    CC: Rafael J Wysocki
    CC: Catalin Marinas
    Tested-by: Robert Richter
    Tested-by: Timur Tabi
    Acked-by: Robert Richter
    Acked-by: Rafael J. Wysocki
    Reviewed-by: Grant Likely
    Signed-off-by: Mark Salter
    Signed-off-by: Hanjun Guo
    Signed-off-by: Will Deacon

    Mark Salter
     

28 May, 2014

1 commit

  • ACPICA doesn't include protections around address space checking, Linux
    build tests always complain increased sparse warnings around ACPICA
    internal acpi_os_map/unmap_memory() invocations. This patch tries to fix
    this issue permanently.

    There are 2 choices left for us to solve this issue:
    1. Add __iomem address space awareness into ACPICA.
    2. Remove sparse checker of __iomem from ACPICA source code.

    This patch chooses solution 2, because:
    1. Most of the acpi_os_map/unmap_memory() invocations are used for ACPICA.
    table mappings, which in fact are not IO addresses.
    2. The only IO addresses usage is for "system memory space" mapping code in:
    drivers/acpi/acpica/exregion.c
    drivers/acpi/acpica/evrgnini.c
    drivers/acpi/acpica/exregion.c
    The mapped address is accessed in the handler of "system memory space"
    - acpi_ex_system_memory_space_handler(). This function in fact can be
    changed to invoke acpi_os_read/write_memory() so that __iomem can
    always be type-casted in the OSL layer.

    According to the above investigation, we drew the following conclusion:
    It is not a good idea to introduce __iomem address space awareness into
    ACPICA mostly in order to protect non-IO addresses.

    We can simply remove __iomem for acpi_os_map/unmap_memory() to remove
    __iomem checker for ACPICA code. Then we need to enforce external usages
    to invoke other APIs that are aware of __iomem address space.
    The external usages are:
    drivers/acpi/apei/einj.c
    drivers/acpi/acpi_extlog.c
    drivers/char/tpm/tpm_acpi.c
    drivers/acpi/nvs.c

    This patch thus performs cleanups in this way:
    1. Add acpi_os_map/unmap_iomem() to be invoked by non-ACPICA code.
    2. Remove __iomem from acpi_os_map/unmap_memory().

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

07 Dec, 2013

1 commit

  • To avoid build problems and breaking dependencies between ACPI header
    files, should not be included directly by code outside
    of the ACPI core subsystem. However, that is possible if
    is included, because that file contains
    a direct inclusion of .

    For this reason, remove the direct inclusion from
    , move that file from include/linux/ to include/acpi/
    and make include it for CONFIG_ACPI set along with the
    other ACPI header files. Accordingly, Remove the inclusions of
    from everywhere.

    Of course, that causes the contents of the new file
    to be available for CONFIG_ACPI set only, so intel_opregion.o that
    depends on it should also depend on CONFIG_ACPI (and it really should
    not be compiled for CONFIG_ACPI unset anyway).

    References: https://01.org/linuxgraphics/sites/default/files/documentation/acpi_igd_opregion_spec.pdf
    Cc: Matthew Garrett
    Signed-off-by: Lv Zheng
    Acked-by: Daniel Vetter
    [rjw: Subject and changelog]
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng