21 Jan, 2020

1 commit

  • quiet_cmd_relocs lacks a whitespace which results in:

    LD vmlinux
    SORTEX vmlinux
    SYSMAP System.map
    RELOCS vmlinux
    Building modules, stage 2.
    MODPOST 64 modules

    After this patch:

    LD vmlinux
    SORTEX vmlinux
    SYSMAP System.map
    RELOCS vmlinux
    Building modules, stage 2.
    MODPOST 64 modules

    Typo is present in kernel tree since the introduction of relocatable
    kernel support in commit e818fac595ab ("MIPS: Generate relocation table
    when CONFIG_RELOCATABLE"), but the relocation scripts were moved to
    Makefile.postlink later with commit 44079d3509ae ("MIPS: Use
    Makefile.postlink to insert relocations into vmlinux").

    Fixes: 44079d3509ae ("MIPS: Use Makefile.postlink to insert relocations into vmlinux")
    Cc: # v4.11+
    Signed-off-by: Alexander Lobakin
    [paulburton@kernel.org: Fixup commit references in commit message.]
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: Masahiro Yamada
    Cc: Rob Herring
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Alexander Lobakin
     

08 Oct, 2019

1 commit

  • When Loongson3 LL/SC errata workarounds are enabled (ie.
    CONFIG_CPU_LOONGSON3_WORKAROUNDS=y) run a tool to scan through the
    compiled kernel & ensure that the workaround is applied correctly. That
    is, ensure that:

    - Every LL or LLD instruction is preceded by a sync instruction.

    - Any branches from within an LL/SC loop to outside of that loop
    target a sync instruction.

    Reasoning for these conditions can be found by reading the comment above
    the definition of __SYNC_loongson3_war in arch/mips/include/asm/sync.h.

    This tool will help ensure that we don't inadvertently introduce code
    paths that miss the required workarounds.

    Signed-off-by: Paul Burton
    Cc: linux-mips@vger.kernel.org
    Cc: Huacai Chen
    Cc: Jiaxun Yang
    Cc: linux-kernel@vger.kernel.org

    Paul Burton
     

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
     

14 Feb, 2017

1 commit

  • The postlink Makefile must include include/config/auto.conf to get the
    kernel configuration variables. But in a clean kernel directory this
    file does not exist, causing make to bail with the error:

    arch/mips/Makefile.postlink:10: include/config/auto.conf: No such file or directory
    make[1]: *** No rule to make target 'include/config/auto.conf'. Stop.
    Makefile:1290: recipe for target 'vmlinuxclean' failed

    Fix this by using "-include" to not cause a Make error when the file
    does not exist.

    Fixes: 44079d3509ae ("MIPS: Use Makefile.postlink to insert relocations into vmlinux")
    Signed-off-by: Matt Redfearn
    Cc: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/15136/
    Signed-off-by: James Hogan

    Matt Redfearn
     

03 Jan, 2017

1 commit

  • When relocatable support for MIPS was merged, there was no support for
    an architecture to add a postlink step for vmlinux. This meant that only
    invoking a target within the boot directory, such as uImage, caused the
    relocations to be inserted into vmlinux. Building just the vmlinux
    target would result in a relocatable kernel with no relocation
    information present.

    Commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile")
    recified this situation, so MIPS can now define a postlink step to add
    relocation information into vmlinux, and remove the additional steps
    tacked onto boot targets.

    Signed-off-by: Matt Redfearn
    Tested-by: Steven J. Hill
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/14554/
    Signed-off-by: Ralf Baechle

    Matt Redfearn