29 Apr, 2020

1 commit

  • gcc 10 will default to -fno-common, which causes this error at link
    time:

    (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here

    This is because both dtc-lexer as well as dtc-parser define the same
    global symbol yyloc. Before with -fcommon those were merged into one
    defintion. The proper solution would be to to mark this as "extern",
    however that leads to:

    dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
    26 | extern YYLTYPE yylloc;
    | ^~~~~~
    In file included from dtc-lexer.l:24:
    dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
    127 | extern YYLTYPE yylloc;
    | ^~~~~~
    cc1: all warnings being treated as errors

    which means the declaration is completely redundant and can just be
    dropped.

    Signed-off-by: Dirk Mueller
    Signed-off-by: David Gibson
    [robh: cherry-pick from upstream]
    Cc: stable@vger.kernel.org
    Signed-off-by: Rob Herring
    (cherry picked from commit e33a814e772cdc36436c8c188d8c42d019fda639)

    Dirk Mueller
     

05 Jan, 2020

1 commit

  • [ Upstream commit 067c650c456e758f933aaf87a202f841d34be269 ]

    Using Makefile's wildcard with absolute path to detect
    the presence of libyaml results in false-positive
    detection when cross-compiling e.g. in yocto environment.
    The latter results in build error:
    | scripts/dtc/yamltree.o: In function `yaml_propval_int':
    | yamltree.c: undefined reference to `yaml_sequence_start_event_initialize'
    | yamltree.c: undefined reference to `yaml_emitter_emit'
    | yamltree.c: undefined reference to `yaml_scalar_event_initialize'
    ...
    Use pkg-config to locate libyaml to address this scenario.

    Signed-off-by: Pavel Modilaynen
    [robh: silence stderr]
    Signed-off-by: Rob Herring
    Signed-off-by: Sasha Levin

    Pavel Modilaynen
     

12 Jul, 2019

1 commit

  • Pull Devicetree updates from Rob Herring:

    - DT binding schema examples are now validated against the schemas.
    Various examples are fixed due to that.

    - Sync dtc with upstream version v1.5.0-30-g702c1b6c0e73

    - Initial schemas for networking bindings. This includes ethernet, phy
    and mdio common bindings with several Allwinner and stmmac converted
    to the schema.

    - Conversion of more Arm top-level SoC/board bindings to DT schema

    - Conversion of PSCI binding to DT schema

    - Rework Arm CPU schema to coexist with other CPU schemas

    - Add a bunch of missing vendor prefixes and new ones for SoChip,
    Sipeed, Kontron, B&R Industrial Automation GmbH, and Espressif

    - Add Mediatek UART RX wakeup support to binding

    - Add reset to ST UART binding

    - Remove some Linuxisms from the endianness common-properties.txt
    binding

    - Make the flattened DT read-only after init

    - Ignore disabled reserved memory nodes

    - Clean-up some dead code in FDT functions

    * tag 'devicetree-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (56 commits)
    dt-bindings: vendor-prefixes: add Sipeed
    dt-bindings: vendor-prefixes: add SoChip
    dt-bindings: 83xx-512x-pci: Drop cell-index property
    dt-bindings: serial: add documentation for Rx in-band wakeup support
    dt-bindings: arm: Convert RDA Micro board/soc bindings to json-schema
    of: unittest: simplify getting the adapter of a client
    of/fdt: pass early_init_dt_reserve_memory_arch() with bool type nomap
    of/platform: Drop superfluous cast in of_device_make_bus_id()
    dt-bindings: usb: ehci: Fix example warnings
    dt-bindings: net: Use phy-mode instead of phy-connection-type
    dt-bindings: simple-framebuffer: Add requirement for pipelines
    dt-bindings: display: Fix simple-framebuffer example
    dt-bindings: net: mdio: Add child nodes
    dt-bindings: net: mdio: Add address and size cells
    dt-bindings: net: mdio: Add a nodename pattern
    dt-bindings: mtd: sunxi-nand: Drop 'maxItems' from child 'reg' property
    dt-bindings: arm: Limit cpus schema to only check Arm 'cpu' nodes
    dt-bindings: backlight: lm3630a: correct schema validation
    dt-bindings: net: dwmac: Deprecate the PHY reset properties
    dt-bindings: net: sun8i-emac: Convert the binding to a schemas
    ...

    Linus Torvalds
     

22 Jun, 2019

1 commit

  • Pull in SPDX tag conversion from upstream dtc. This will replace the
    conversion done in the kernel tree copy in v5.2-rc2.

    This adds the following commits from upstream:

    702c1b6c0e73 README.license: Update to reflect SPDX tag usage
    4097bbffcf1d dtc: Add GPLv2 SPDX tags to files missing license text
    94f87cd5b7c5 libfdt: Add dual GPL/BSD SPDX tags to files missing license text
    c4ffc05574b1 tests: Replace license boilerplate with SPDX tags
    a5ac29baacd2 pylibfdt: Replace dual GPLv2/BSD license boilerplate with SPDX tags
    7fb0f4db2eb7 libfdt: Replace GPL/BSD boilerplate/reference with SPDX tags
    acfe84f2c47e dtc: Replace GPLv2 boilerplate/reference with SPDX tags

    Reviewed-by: Greg Kroah-Hartman
    Signed-off-by: Rob Herring

    Rob Herring
     

19 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this file is subject to the terms and conditions of the gnu general
    public license v2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

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

    Thomas Gleixner
     

12 Jun, 2019

1 commit

  • This adds the following commits from upstream:

    87963ee20693 livetree: add missing type markers in generated overlay properties
    825146d13dc0 Fix typos in various documentation and source files
    25bb080c18d1 Update the GPL2 text to the latest revision
    243176c4ce84 Fix bogus error on rebuild
    ce01b21098a4 libfdt: Add FDT_CREATE_FLAG_NO_NAME_DEDUP flag that trades size for speed
    fbb62754ce45 libfdt: Introduce fdt_create_with_flags()
    228a44cce857 libfdt: Ensure fdt_add_property frees allocated name string on failure
    8f695676227b Avoid assertion in check_interrupts_property()
    5c3513f68921 Link tools and tests against libfdt shared library
    00f9febf9c16 tests: Rename tests.sh to testutils.sh
    c5d45188f923 Clean up LDLIBS handling
    6ef8fcd05b74 Rebuild libfdt shared object if versioning linker script changes
    26ee65a16c38 Use Python3 by default
    cca6546244cb libfdt: Make fdt_get_max_phandle() an inline
    730875016a6a libfdt: Add phandle generation helper
    7dfb61ba96b1 libfdt: Use fdt_find_max_phandle()
    2bc5b66d7f6c libfdt: Add new maximum phandle lookup function
    7fcf8208b8a9 libfdt: add fdt_append_addrrange()
    ae795b2db7a4 checks: Do not omit nodes with labels if symbol generation is requested
    eac2ad495b29 Update version.lds again
    f67b47135523 Revert "libfdt: Add phandle generation helper"
    54ea41c22415 libfdt: Add phandle generation helper
    4762ad051ee0 checks: Fix spelling in check_graph_endpoint
    d37f6b20107e Bump version to v1.5.0
    a4b1a307ff3a pylibfdt:tests: Extend the way how to find a Python module
    625dd8aaf20f pylibfdt: Change how passing tests are recognized
    364631626bb7 pylibfdt: Test fdt.setprop take bytes on Python 3, add error handling
    cb0f454f73cc pylibfdt: check_err accepts only integer as a first argument.
    4b68c6b3605a pylibfdt: Proper handling of bytes/unicode strings and octal literals
    78e113e81c9d Use PRIxPTR for printing uintptr_t values
    ea7a8f6dad67 libfdt: Fix FDT_ERR_NOTFOUND typos in documentation
    5aafd7ca43e0 libfdt: Fix fdt_getprop_by_offset() parameter name in documentation
    7cbc550f903b checks: Add unit address check if node is enabled

    Signed-off-by: Rob Herring

    Rob Herring
     

05 Jun, 2019

1 commit

  • Based on 1 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 as published by
    the free software foundation version 2 of the license

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Armijn Hemel
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

1 commit

  • Based on 1 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 as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit


18 May, 2019

1 commit

  • Currently, the Kbuild core manipulates header search paths in a crazy
    way [1].

    To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
    the search paths in the srctree. Some Makefiles are already written in
    that way, but not all. The goal of this work is to make the notation
    consistent, and finally get rid of the gross hacks.

    Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
    ("kbuild: do not drop -I without parameter").

    [1]: https://patchwork.kernel.org/patch/9632347/

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

01 Mar, 2019

1 commit


14 Dec, 2018

1 commit


13 Dec, 2018

1 commit

  • This adds the build infrastructure for checking DT binding schema
    documents and validating dts files using the binding schema.

    Check DT binding schema documents:
    make dt_binding_check

    Build dts files and check using DT binding schema:
    make dtbs_check

    Optionally, DT_SCHEMA_FILES can be passed in with a schema file(s) to
    use for validation. This makes it easier to find and fix errors
    generated by a specific schema.

    Currently, the validation targets are separate from a normal build to
    avoid a hard dependency on the external DT schema project and because
    there are lots of warnings generated.

    Cc: Jonathan Corbet
    Cc: Mark Rutland
    Acked-by: Masahiro Yamada
    Cc: Michal Marek
    Cc: linux-doc@vger.kernel.org
    Cc: devicetree@vger.kernel.org
    Cc: linux-kbuild@vger.kernel.org
    Signed-off-by: Rob Herring

    Rob Herring
     

29 Nov, 2018

1 commit

  • This adds the following commits from upstream:

    f267e674d145 checks: Fix crash with multiple source annotations
    3616b9a811b6 checks: Use source position information for check failures
    2bdbd07a1223 checks: Make each message output atomic
    a1eff70c02cf util: Add xa{v}sprintf_append functions
    82a52ce4573b libfdt: Add a test for fdt_getprop_by_offset()
    607b8586b383 PEP8 / Flake8 cleanups for setup.py
    f9c0a425b648 Remove broken objdir / srcdir support
    5182b5e6f28c pylibfdt: Use common PREFIX variable
    d45bf1f5f2a6 Refine make tests_clean target
    99284c4db9cb Refine pylibfdt_clean target
    a4629cfaedfb Refine libfdt_clean target
    08380fc43aa2 tests: Use modern octal literals for Python
    8113c00b99d3 pylibfdt: Allow switch to Python 3 via environment variable PYTHON
    11738cf01f15 libfdt: Don't use memcpy to handle unaligned reads on ARM
    86a288a73670 checks: Restructure check_msg to decrease indentation
    5667e7ef9a9a annotations: add the annotation functionality
    8e20ccf52f90 annotations: add positions
    ca930e20bb54 tests: Don't lose errors from make checkm
    43366bb4eeee tests: Property count valgrind errors in wrapped tests
    5062516fb8cb srcpos: Remove srcpos_empty
    a3143fafbf83 Revert "annotations: add positions"
    403cc79f06a1 checks: Update SPI bus check for 'spi-slave'
    baa1d2cf7894 annotations: add positions
    ff2ad38f6a5a Merge remote-tracking branch 'origin/pr/18'
    aa7254d9cb17 libfdt: return correct value if #size-cells property is not present
    49903aed7783 use ptrdiff_t modifier for printing pointer differences
    da2b691ccf68 treesource: Fix dts output for phandles in middle of a sequence of ints
    8f8b77a0d62d tests: Wrap check_align() calls with base_run_test()
    522d81d572f2 Fix dts output with a REF_PATH marker
    e45198c98359 Added test cases for target references
    0fcffda15e9f Merge nodes with local target label references
    1e4a0928f3b3 pylibfdt: Don't have setup.py depend on where it's invoked from
    ca399b14956f pylibfdt: Eliminate run_setup make function
    98972f1b3e33 pylibfdt: Improved version extraction
    7ba2be6cda5f pylibfdt: Don't silence setup.py when V=1
    7691f9d39301 pylibfdt: Make SETUP make variable
    855b9963def9 pylibfdt: Simpler CFLAGS handling
    47cafbeeb977 pylibfdt: Link extension module with libfdt rather than rebuilding
    dd695d6afb19 pylibfdt: Correctly set build output directory
    59327523d0d8 pylibfdt: We don't need include files from the base directory
    e84742aa7b93 checks: fix simple-bus compatible matching
    8c59a97ce096 Fix missing labels when emitting dts format
    d448f9a5fd94 Revert dts output formatting changes of spaces around brackets

    Signed-off-by: Rob Herring

    Rob Herring
     

05 Oct, 2018

1 commit


02 Oct, 2018

1 commit

  • There is nothing arch specific about building dtb files other than their
    location under /arch/*/boot/dts/. Keeping each arch aligned is a pain.
    The dependencies and supported targets are all slightly different.
    Also, a cross-compiler for each arch is needed, but really the host
    compiler preprocessor is perfectly fine for building dtbs. Move the
    build rules to a common location and remove the arch specific ones. This
    is done in a single step to avoid warnings about overriding rules.

    The build dependencies had been a mixture of 'scripts' and/or 'prepare'.
    These pull in several dependencies some of which need a target compiler
    (specifically devicetable-offsets.h) and aren't needed to build dtbs.
    All that is really needed is dtc, so adjust the dependencies to only be
    dtc.

    This change enables support 'dtbs_install' on some arches which were
    missing the target.

    Acked-by: Will Deacon
    Acked-by: Paul Burton
    Acked-by: Ley Foon Tan
    Acked-by: Masahiro Yamada
    Cc: Michal Marek
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Yoshinori Sato
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: linux-kbuild@vger.kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Cc: linux-mips@linux-mips.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-xtensa@linux-xtensa.org
    Signed-off-by: Rob Herring

    Rob Herring
     

21 Sep, 2018

1 commit

  • Major changes are I2C and SPI bus checks, YAML output format (for
    future validation), some new libfdt functions, and more libfdt
    validation of dtbs.

    The YAML addition adds an optional dependency on libyaml. pkg-config is
    used to test for it and pkg-config became a kconfig dependency in 4.18.

    This adds the following commits from upstream:

    c86da84d30e4 Add support for YAML encoded output
    361b5e7d8067 Make type_marker_length helper public
    bfbfab047e45 pylibfdt: Add a means to add and delete notes
    9005f4108e7c pylibfdt: Allow delprop() to return errors
    b94c056b137e Make valgrind optional
    fd06c54d4711 tests: Better testing of dtc -I fs mode
    c3f50c9a86d9 tests: Allow dtbs_equal_unordered to ignore mem reserves
    0ac9fdee37c7 dtc: trivial '-I fs -O dts' test
    0fd1c8c783f3 pylibfdt: fdt_get_mem_rsv returns 2 uint64_t values
    04853cad18f4 pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap
    9619c8619c37 Kill bogus TYPE_BLOB marker type
    ac68ff92ae20 parser: add TYPE_STRING marker to path references
    90a190eb04d9 checks: add SPI bus checks
    53a1bd546905 checks: add I2C bus checks
    88f18909db73 dtc: Bump version to v1.4.7
    85bce8b2f06d tests: Correction to vg_prepare_blob()
    57f7f9e7bc7c tests: Don't call memcmp() with NULL arguments
    c12b2b0c20eb libfdt: fdt_address_cells() and fdt_size_cells()
    3fe0eeda0b7f livetree: Set phandle properties type to uint32
    853649acceba pylibfdt: Support the sequential-write interface
    9b0e4fe26093 tests: Improve fdt_resize() tests
    1087504bb3e8 libfdt: Add necessary header padding in fdt_create()
    c72fa777e613 libfdt: Copy the struct region in fdt_resize()
    32b9c6130762 Preserve datatype markers when emitting dts format
    6dcb8ba408ec libfdt: Add helpers for accessing unaligned words
    42607f21d43e tests: Fix incorrect check name 'prop_name_chars'
    9d78c33bf8a1 tests: fix grep for checks error messages
    b770f3d1c13f pylibfdt: Support setting the name of a node
    2f0d07e678e0 pylibfdt: Add functions to set and get properties as strings
    354d3dc55939 pylibfdt: Update the bytearray size with pack()
    3c374d46acce pylibfdt: Allow reading integer values from properties
    49d32ce40bb4 pylibfdt: Use an unsigned type for fdt32_t
    481246a0c13a pylibfdt: Avoid accessing the internal _fdt member in tests
    9aafa33d99ed pylibfdt: Add functions to update properties
    5a598671fdbf pylibfdt: Support device-tree creation/expansion
    483e170625e1 pylibfdt: Add support for reading the memory reserve map
    29bb05aa4200 pylibfdt: Add support for the rest of the header functions
    582a7159a5d0 pylibfdt: Add support for fdt_next_node()
    f0f8c9169819 pylibfdt: Reorder functions to match libfdt.h
    64a69d123935 pylibfdt: Return string instead of bytearray from getprop()
    4d09a83420df fdtput: Add documentation
    e617cbe1bd67 fdtget: Add documentation
    180a93924014 Use format specifiers in a bunch of places we should
    b9af3b396576 scripts/dtc: Fixed format mismatch in fprintf
    4b8fcc3d015c libfdt: Add fdt_check_full() function
    c14223fb2292 tests: Use valgrind client requests for better checking
    5b67d2b955a3 tests: Better handling of valgrind errors saving blobs
    e2556aaeb506 tests: Remove unused #define
    fb9c6abddaa8 Use size_t for blob lengths in utilfdt_read*
    0112fda03bf6 libfdt: Add fdt_header_size()
    6473a21d8bfe Consolidate utilfdt_read_len() variants
    d5db5382c5e5 libfdt: Safer access to memory reservations
    719d582e98ec libfdt: Propagate name errors in fdt_getprop_by_offset()
    70166d62a27f libfdt: Safer access to strings section
    eb890c0f77dc libfdt: Make fdt_check_header() more thorough
    899d6fad93f3 libfdt: Improve sequential write state checking
    04b5b4062ccd libfdt: Clean up header checking functions
    44d3efedc816 Preserve datatype information when parsing dts
    f0be81bd8de0 Make Property a subclass of bytearray
    24b1f3f064d4 pylibfdt: Add a method to access the device tree directly

    Signed-off-by: Rob Herring

    Rob Herring
     

20 Sep, 2018

1 commit


22 Aug, 2018

1 commit

  • It is tedious to specify extra compiler options for every file.
    HOST_EXTRACFLAGS is useful to add options to all files in a
    directory.

    -I$(src)/libfdt is needed for all the files in this directory
    to include libfdt_env.h etc. from scripts/dtc/libfdt/.

    On the other hand, -I$(src) is used to include check-in headers
    from generated C files. Thus, I added it only to dtc-lexer.lex.o
    and dtc-parser.tab.o .

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Rob Herring

    Masahiro Yamada
     

15 May, 2018

1 commit

  • This adds the following commits from upstream:

    84e414b0b5bc tests: Add a test case for the omit-if-no-ref keyword
    4038fd90056e dtc: add ability to make nodes conditional on them being referenced
    e1f139ea4900 checks: drop warning for missing PCI bridge bus-range
    f4eba68d89ee checks: Print duplicate node name instead of parent name
    46df1fb1b211 .travis.yml: Run valgrind checks via Travis
    14a3002a1aee tests: Update valgrind suppressions for sw_tree1
    02c5fe9debc0 tests: Remove valgrind error from tests/get_path
    df536831d02c checks: add graph binding checks
    2347c96edcbe checks: add a check for duplicate unit-addresses of child nodes
    8f1b35f88395 Correct overlay syntactic sugar for generating target-path fragments
    afbddcd418fb Suppress warnings on overlay fragments
    119e27300359 Improve tests for dtc overlay generation

    Signed-off-by: Rob Herring

    Rob Herring
     

24 Apr, 2018

1 commit

  • Cherry-picked from dtc upstream commit e1f139ea4900fd0324c646822b4061fec6e08321.

    Having a 'bus-range' property for PCI bridges should not be required,
    so remove the warning when missing. There was some confusion with the
    Linux kernel printing a message that no property is present and the OS
    assigned the bus number. This message was intended to be informational
    rather than a warning.

    When the firmware doesn't enumerate the PCI bus and leaves it up to the
    OS to do, then it is perfectly fine for the OS to assign bus numbers
    and bus-range is not necessary.

    There are a few cases where bus-range is needed or useful as Arnd
    Bergmann summarized:

    - Traditionally Linux avoided using multiple PCI domains, but instead
    configured separate PCI host bridges to have non-overlapping
    bus ranges so we can present them to user space as a single
    domain, and run the kernel without CONFIG_PCI_DOMAINS.
    Specifying the bus ranges this way would and give stable bus
    numbers across boots when the probe order is not fixed.

    - On certain ARM64 systems, we must only use the first
    128 bus numbers based on the way the IOMMU identifies
    the device with truncated bus/dev/fn number. There are probably
    others like this, with various limitations.

    - To leave some room for hotplugged devices, each slot on
    a host bridge can in theory get a range of bus numbers
    that are available when assigning bus numbers at boot time

    Cc: Arnd Bergmann
    Signed-off-by: Rob Herring
    Signed-off-by: David Gibson

    Rob Herring
     

16 Apr, 2018

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - pass HOSTLDFLAGS when compiling single .c host programs

    - build genksyms lexer and parser files instead of using shipped
    versions

    - rename *-asn1.[ch] to *.asn1.[ch] for suffix consistency

    - let the top .gitignore globally ignore artifacts generated by flex,
    bison, and asn1_compiler

    - let the top Makefile globally clean artifacts generated by flex,
    bison, and asn1_compiler

    - use safer .SECONDARY marker instead of .PRECIOUS to prevent
    intermediate files from being removed

    - support -fmacro-prefix-map option to make __FILE__ a relative path

    - fix # escaping to prepare for the future GNU Make release

    - clean up deb-pkg by using debian tools instead of handrolled
    source/changes generation

    - improve rpm-pkg portability by supporting kernel-install as a
    fallback of new-kernel-pkg

    - extend Kconfig listnewconfig target to provide more information

    * tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: extend output of 'listnewconfig'
    kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg
    Kbuild: fix # escaping in .cmd files for future Make
    kbuild: deb-pkg: split generating packaging and build
    kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
    kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers
    kbuild: rename *-asn1.[ch] to *.asn1.[ch]
    kbuild: clean up *-asn1.[ch] patterns from top-level Makefile
    .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore
    kbuild: add %.dtb.S and %.dtb to 'targets' automatically
    kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically
    genksyms: generate lexer and parser during build instead of shipping
    kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile
    .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore
    kbuild: use HOSTLDFLAGS for single .c executables

    Linus Torvalds
     

13 Apr, 2018

1 commit

  • Pull asm-generic fixes from Arnd Bergmann:
    "I have one regression fix for a minor build problem after the
    architecture removal series, plus a rework of the barriers in the
    readl/writel functions, thanks to work by Sinan Kaya:

    This started from a discussion on the linuxpcc and rdma mailing
    lists[1]. To summarize, we decided that architectures are responsible
    to serialize readl() and writel() accesses on a device MMIO space
    relative to DMA performed by that device.

    This series provides a pessimistic implementation of that behavior for
    asm-generic/io.h, which is in turn used by a number of architectures
    (h8300, microblaze, nios2, openrisc, s390, sparc, um, unicore32, and
    xtensa). Some of those presumably need no extra barriers, or something
    weaker than rmb()/wmb(), and they are advised to override the new
    default for better performance.

    For inb()/outb(), the same barriers are used, but architectures might
    want to add another barrier to outb() here if that can guarantee
    non-posted behavior (some architectures can, others cannot do that).

    The readl_relaxed()/writel_relaxed() family of functions retains the
    existing behavior with no extra barriers"

    [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-March/170481.html

    * tag 'asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    io: change writeX_relaxed() to remove barriers
    io: change readX_relaxed() to remove barriers
    dts: remove cris & metag dts hard link file
    io: change inX() to have their own IO barrier overrides
    io: change outX() to have their own IO barrier overrides
    io: define stronger ordering for the default writeX() implementation
    io: define stronger ordering for the default readX() implementation
    io: define several IO & PIO barrier types for the asm-generic version

    Linus Torvalds
     

07 Apr, 2018

3 commits


06 Apr, 2018

1 commit

  • arch cris & metag have been removed from supported archs.
    The dts hard link files should also be removed, or the ctags
    tool will give warning.

    execute"ctags -R", output:
    ctags: Warning: cannot open source file
    "scripts/dtc/include-prefixes/cris" : No such file or directory
    ctags: Warning: cannot open source file
    "scripts/dtc/include-prefixes/metag" : No such file or directory

    Signed-off-by: Liu Changcheng
    Signed-off-by: Arnd Bergmann

    Liu, Changcheng
     

06 Mar, 2018

2 commits

  • This adds the following commits from upstream:

    aadd0b65c987 checks: centralize printing of property names in failure messages
    88960e398907 checks: centralize printing of node path in check_msg
    f1879e1a50eb Add limited read-only support for older (V2 and V3) device tree to libfdt.
    37dea76e9700 srcpos: drop special handling of tab
    65893da4aee0 libfdt: overlay: Add missing license
    962a45ca034d Avoid installing pylibfdt when dependencies are missing
    cd6ea1b2bea6 Makefile: Split INSTALL out into INSTALL_{PROGRAM,LIB,DATA,SCRIPT}
    51b3a16338df Makefile.tests: Add LIBDL make(1) variable for portability sake
    333d533a8f4d Attempt to auto-detect stat(1) being used if not given proper invocation
    e54388015af1 dtc: Bump version to v1.4.6
    a1fe86f380cb fdtoverlay: Switch from using alloca to malloc
    c8d5472de3ff tests: Improve compatibility with other platforms
    c81d389a10cc checks: add chosen node checks
    e671852042a7 checks: add aliases node checks
    d0c44ebe3f42 checks: check for #{size,address}-cells without child nodes
    18a3d84bb802 checks: add string list check for *-names properties
    8fe94fd6f19f checks: add string list check
    6c5730819604 checks: add a string check for 'label' property
    a384191eba09 checks: fix sound-dai phandle with arg property check
    b260c4f610c0 Fix ambiguous grammar for devicetree rule
    fe667e382bac tests: Add some basic tests for the pci_bridge checks
    7975f6422260 Fix widespread incorrect use of strneq(), replace with new strprefixeq()
    fca296445eab Add strstarts() helper function
    cc392f089007 tests: Check non-matching cases for fdt_node_check_compatible()
    bba26a5291c8 livetree: avoid assertion of orphan phandles with overlays
    c8f8194d76cc implement strnlen for systems that need it
    c8b38f65fdec libfdt: Remove leading underscores from identifiers
    3b62fdaebfe5 Remove leading underscores from identifiers
    2d45d1c5c65e Replace FDT_VERSION() with stringify()
    2e6fe5a107b5 Fix some errors in comments
    b0ae9e4b0ceb tests: Correct warning in sw_tree1.c

    Commit c8b38f65fdec upstream ("libfdt: Remove leading underscores from
    identifiers") changed the multiple inclusion define protection, so the
    kernel's libfdt_env.h needs the corresponding update.

    Signed-off-by: Rob Herring

    Rob Herring
     
  • Now that the kernel build supports flex and bison, remove the _shipped
    files and generate them during the build instead.

    Based on Masahiro's original patch.

    Reviewed-by: Masahiro Yamada
    Signed-off-by: Rob Herring

    Rob Herring
     

15 Nov, 2017

1 commit

  • Pull DeviceTree updates from Rob Herring:
    "A bigger diffstat than usual with the kbuild changes and a tree wide
    fix in the binding documentation.

    Summary:

    - kbuild cleanups and improvements for dtbs

    - Code clean-up of overlay code and fixing for some long standing
    memory leak and race condition in applying overlays

    - Improvements to DT memory usage making sysfs/kobjects optional and
    skipping unflattening of disabled nodes. This is part of kernel
    tinification efforts.

    - Final piece of removing storing the full path for every DT node.
    The prerequisite conversion of printk's to use device_node format
    specifier happened in 4.14.

    - Sync with current upstream dtc. This brings additional checks to
    dtb compiling.

    - Binding doc tree wide removal of leading 0s from examples

    - RTC binding documentation adding missing devices and some
    consolidation of duplicated bindings

    - Vendor prefix documentation for nutsboard, Silicon Storage
    Technology, shimafuji, Tecon Microprocessor Technologies, DH
    electronics GmbH, Opal Kelly, and Next Thing"

    * tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits)
    dt-bindings: usb: add #phy-cells to usb-nop-xceiv
    dt-bindings: Remove leading zeros from bindings notation
    kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib
    MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry
    kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile
    .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore
    .gitignore: sort normal pattern rules alphabetically
    dt-bindings: add vendor prefix for Next Thing Co.
    scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9
    of: dynamic: fix memory leak related to properties of __of_node_dup
    of: overlay: make pr_err() string unique
    of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove
    of: overlay: remove unneeded check for NULL kbasename()
    of: overlay: remove a dependency on device node full_name
    of: overlay: simplify applying symbols from an overlay
    of: overlay: avoid race condition between applying multiple overlays
    of: overlay: loosen overly strict phandle clash check
    of: overlay: expand check of whether overlay changeset can be removed
    of: overlay: detect cases where device tree may become corrupt
    of: overlay: minor restructuring
    ...

    Linus Torvalds
     

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
     

25 Oct, 2017

1 commit

  • Pickup the fix for handling unresolved phandles in overlays.

    This adds the following commits from upstream:

    c1e55a5513e9 checks: fix handling of unresolved phandles for dts plugins
    f8872e29ce06 tests: Avoid 64-bit arithmetic in assembler
    48c91c08bcfa libfdt: add stringlist functions to linker script

    Signed-off-by: Rob Herring

    Rob Herring
     

04 Oct, 2017

2 commits

  • This adds the following commits from upstream:

    b1a60033c110 tests: Add a test for overlays syntactic sugar
    737b2df39cc8 overlay: Add syntactic sugar version of overlays
    497432fd2131 checks: Use proper format modifier for size_t
    22a65c5331c2 dtc: Bump version to v1.4.5
    c575d8059fff Add fdtoverlay to .gitignore
    b6a6f9490d19 fdtoverlay: Sanity check blob size
    8c1eb1526d2d pylibfdt: Use Python2 explicitly
    ee3d26f6960b checks: add interrupts property check
    c1e7738988f5 checks: add gpio binding properties check
    b3bbac02d5e3 checks: add phandle with arg property checks
    fe50bd1ecc1d fdtget: Split out cell list display into a new function
    62d812308d11 README: Add a note about test_tree1.dts
    5bed86aee9e8 pylibfdt: Add support for fdt_subnode_offset()
    46f31b65b3b3 pylibfdt: Add support for fdt_node_offset_by_phandle()
    a3ae43723687 pylibfdt: Add support for fdt_parent_offset()
    a198af80344c pylibfdt: Add support for fdt_get_phandle()
    b9eba92ea50f tests: Return a failure code when any tests fail
    155faf6cc209 pylibfdt: Use local pylibfdt module
    50e5cd07f325 pylibfdt: Add a test for use of uint32_t
    ab78860f09f5 pylibfdt: Add stdint include to fix uint32_t
    36f511fb1113 tests: Add stacked overlay tests on fdtoverlay
    1bb00655d3e5 fdt: Allow stacked overlays phandle references
    a33c2247ac8d Introduce fdt_setprop_placeholder() method
    0016f8c2aa32 dtc: change default phandles to ePAPR style instead of both
    e3b9a9588a35 tests: fdtoverlay unit test
    42409146f2db fdtoverlay: A tool that applies overlays
    aae22722fc8d manual: Document missing options
    13ce6e1c2fc4 dtc: fix sprintf() format string error, again
    d990b8013889 Makefile: Fix build on MSYS2 and Cygwin
    51f56dedf8ea Clean up shared library compile/link options
    21a2bc896e3d Suppress expected error message in fdtdump test
    2a42b14d0d03 dtc: check.c fix compile error
    a10cb3c818d3 Fix get_node_by_path string equality check
    548aea2c436a fdtdump: Discourage use of fdtdump
    c2258841a785 fdtdump: Fix over-zealous version check
    9067ee4be0e6 Fix a few whitespace and style nits
    e56f2b07be38 pylibfdt: Use setup.py to build the swig file
    896f1c133265 pylibfdt: Use Makefile constructs to implement NO_PYTHON
    90db6d9989ca pylibfdt: Allow setup.py to operate stand-alone
    e20d9658cd8f Add Coverity Scan support
    b04a2cf08862 pylibfdt: Fix code style in setup.py
    1c5170d3a466 pylibfdt: Rename libfdt.swig to libfdt.i
    580a9f6c2880 Add a libfdt function to write a property placeholder
    ab15256d8d02 pylibfdt: Use the call function to simplify the Makefile
    9f2e3a3a1f19 pylibfdt: Use the correct libfdt version in the module
    e91c652af215 pylibfdt: Enable installation of Python module
    8a892fd85d94 pylibfdt: Allow building to be disabled
    741cdff85d3e .travis.yml: Add builds with and without Python library prerequisites
    14c4171f4f9a pylibfdt: Use package_dir to set the package directory
    89a5062ab231 pylibfdt: Use environment to pass C flags and files
    4e0e0d049757 pylibfdt: Allow pkg-config to be supplied in the environment
    6afd7d9688f5 Correct typo: s/pylibgfdt/pylibfdt/

    Signed-off-by: Rob Herring

    Rob Herring
     
  • libfdt has gained some new files. We need to include them in the
    kernel's copy.

    Reported-by: Kyle Yan
    Signed-off-by: Rob Herring

    Rob Herring
     

20 Sep, 2017

1 commit

  • Update dtx_diff include paths in the same manner as:
    commit b12869a8d519 ("of: remove drivers/of/testcase-data from
    include search path for CPP"), commit 5ffa2aed389c ("of: remove
    arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
    commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path
    for both CPP and DTC").

    Remove proposed include path kernel/dts/, which was never implemented
    for the dtb build.

    For the diff case, each source file is compiled separately. For
    each of those compiles, provide the location of the source file
    as an include path, not the location of both source files.

    Signed-off-by: Frank Rowand
    Signed-off-by: Rob Herring

    Frank Rowand
     

01 Sep, 2017

1 commit

  • dtc uses an incorrect format specifier for printing a uint64_t value.
    uint64_t may be either 'unsigned long' or 'unsigned long long' depending
    on the host architecture.

    Fix this by using %llx and casting to unsigned long long, which ensures
    that we always have a wide enough variable to print 64 bits of hex.

    HOSTCC scripts/dtc/checks.o
    scripts/dtc/checks.c: In function 'check_simple_bus_reg':
    scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]
    snprintf(unit_addr, sizeof(unit_addr), "%zx", reg);
    ^
    scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]

    Link: http://lkml.kernel.org/r/20170829222034.GJ20805@n2100.armlinux.org.uk
    Fixes: 828d4cdd012c ("dtc: check.c fix compile error")
    Signed-off-by: Russell King
    Cc: Rob Herring
    Cc: Frank Rowand
    Cc: Shuah Khan
    Cc: David Gibson
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russell King
     

20 Jul, 2017

1 commit


08 Jul, 2017

2 commits

  • …asahiroy/linux-kbuild

    Pull misc Kbuild updates from Masahiro Yamada:

    - Use more portable shebang for Perl scripts

    - Remove trailing spaces from GCC version in kernel log

    - Make initramfs generation deterministic

    * tag 'kbuild-misc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: create deterministic initramfs directory listings
    scripts/mkcompile_h: Remove trailing spaces from compiler version
    scripts: Switch to more portable Perl shebang

    Linus Torvalds
     
  • Pull DeviceTree updates from Rob Herring:

    - vsprintf format specifier %pOF for device_node's. This will enable us
    to stop storing the full node names. Conversion of users will happen
    next cycle.

    - Update documentation to point to DT specification instead of ePAPR.

    - Split out graph and property functions to a separate file.

    - New of-graph functions for ALSA

    - Add vendor prefixes for RISC-V, Linksys, iWave Systems, Roofull,
    Itead, and BananaPi.

    - Improve dtx_diff utility filename printing.

    * tag 'devicetree-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (32 commits)
    of: document /sys/firmware/fdt
    dt-bindings: Add RISC-V vendor prefix
    vsprintf: Add %p extension "%pOF" for device tree
    of: find_node_by_full_name rewrite to compare each level
    of: use kbasename instead of open coding
    dt-bindings: thermal: add file extension to brcm,ns-thermal
    of: update ePAPR references to point to Devicetree Specification
    scripts/dtc: dtx_diff - Show real file names in diff header
    of: detect invalid phandle in overlay
    of: be consistent in form of file mode
    of: make __of_attach_node() static
    of: address.c header comment typo
    of: fdt.c header comment typo
    of: make of_fdt_is_compatible() static
    dt-bindings: display-timing.txt convert non-ascii characters to ascii
    Documentation: remove overlay-notes reference to non-existent file
    dt-bindings: usb: exynos-usb: Add missing required VDD properties
    dt-bindings: Add vendor prefix for Linksys
    MAINTAINERS: add device tree ABI documentation file
    of: Add vendor prefix for iWave Systems Technologies Pvt. Ltd
    ...

    Linus Torvalds
     

23 Jun, 2017

1 commit

  • As the comparison uses process substitution to pass files after
    conversion to DTS format, the diff header doesn't show the real
    filenames, but the names of the file descriptors used:

    --- /dev/fd/63 2017-06-22 11:21:47.531637188 +0200
    +++ /dev/fd/62 2017-06-22 11:21:47.531637188 +0200

    This is especially annoying when comparing a bunch of DT files in a
    loop, as the output doesn't show a clue about which files it refers to.

    Fix this by explicitly passing the original file names to the diff
    command using the --label option, giving e.g.:

    --- arch/arm/boot/dts/r8a7791-koelsch.dtb
    +++ arch/arm/boot/dts/r8a7791-porter.dtb

    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Frank Rowand
    Signed-off-by: Rob Herring

    Geert Uytterhoeven