1. 18 3月, 2018 3 次提交
  2. 12 3月, 2018 3 次提交
  3. 08 3月, 2018 4 次提交
    • R
      Merge branch 'dtc-update' into dt/next · c679fa6e
      Rob Herring 提交于
      c679fa6e
    • D
      of: unittest: fix an error test in of_unittest_overlay_8() · bdb7013d
      Dan Carpenter 提交于
      We changed this from of_overlay_apply() to overlay_data_apply().  The
      overlay_data_apply() function returns 1 on success and 0 on error so
      the check for less than zero needs to be updated.
      
      Fixes: 39a751a4 ("of: change overlay apply input data from unflattened to FDT")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NFrank Rowand <frowand.list@gmail.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      bdb7013d
    • F
      of: cache phandle nodes to reduce cost of of_find_node_by_phandle() · 0b3ce78e
      Frank Rowand 提交于
      Create a cache of the nodes that contain a phandle property.  Use this
      cache to find the node for a given phandle value instead of scanning
      the devicetree to find the node.  If the phandle value is not found
      in the cache, of_find_node_by_phandle() will fall back to the tree
      scan algorithm.
      
      The cache is initialized in of_core_init().
      
      The cache is freed via a late_initcall_sync() if modules are not
      enabled.
      
      If the devicetree is created by the dtc compiler, with all phandle
      property values auto generated, then the size required by the cache
      could be 4 * (1 + number of phandles) bytes.  This results in an O(1)
      node lookup cost for a given phandle value.  Due to a concern that the
      phandle property values might not be consistent with what is generated
      by the dtc compiler, a mask has been added to the cache lookup algorithm.
      To maintain the O(1) node lookup cost, the size of the cache has been
      increased by rounding the number of entries up to the next power of
      two.
      
      The overhead of finding the devicetree node containing a given phandle
      value has been noted by several people in the recent past, in some cases
      with a patch to add a hashed index of devicetree nodes, based on the
      phandle value of the node.  One concern with this approach is the extra
      space added to each node.  This patch takes advantage of the phandle
      property values auto generated by the dtc compiler, which begin with
      one and monotonically increase by one, resulting in a range of 1..n
      for n phandle values.  This implementation should also provide a good
      reduction of overhead for any range of phandle values that are mostly
      in a monotonic range.
      
      Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
      of several implementations of patches that are similar to this one
      suggest an expected reduction of boot time by ~400ms for his test
      system.  If the cache size was decreased to 64 entries, the boot
      time was reduced by ~340 ms.  The measurements were on a 4.9.73 kernel
      for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
      814 phandle values.
      Reported-by: NChintan Pandya <cpandya@codeaurora.org>
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      0b3ce78e
    • J
      dt-bindings: rockchip-dw-mshc: use consistent clock names · 6adb1b95
      John Keeping 提交于
      The names of these clocks are "ciu-drive" and "ciu-sample" as described
      for the clock-names property.  Avoid confusion by spelling these
      correctly everywhere they are referenced.
      Signed-off-by: NJohn Keeping <john@metanate.com>
      Reviewed-by: NHeiko Stuebner <heiko@sntech.de>
      Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      6adb1b95
  4. 07 3月, 2018 1 次提交
  5. 06 3月, 2018 8 次提交
    • R
      scripts: turn off some new dtc warnings by default · 4fd98e37
      Rob Herring 提交于
      The latest dtc update adds some new noisy warnings, so turn them off by
      default. Disable 'avoid_unnecessary_addr_size' and 'alias_paths'. They
      can be re-enabled by building with 'W=1'.
      Signed-off-by: NRob Herring <robh@kernel.org>
      4fd98e37
    • R
      scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 · 9130ba88
      Rob Herring 提交于
      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: NRob Herring <robh@kernel.org>
      9130ba88
    • R
      scripts/dtc: generate lexer and parser during build instead of shipping · e039139b
      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: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      e039139b
    • R
      powerpc: boot: add strrchr function · a54b81ea
      Rob Herring 提交于
      libfdt gained a new dependency on strrchr, so copy the implementation
      from lib/string.c. Most of the string functions are in assembly, but
      stdio.c already has strnlen, so add strrchr there.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Acked-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NRob Herring <robh@kernel.org>
      a54b81ea
    • F
      of: overlay: do not include path in full_name of added nodes · b89dae18
      Frank Rowand 提交于
      Struct device_node full_name no longer includes the full path name
      when the devicetree is created from a flattened device tree (FDT).
      The overlay node creation code was not modified to reflect this
      change.  Fix the node full_name generated by overlay code to contain
      only the basename.
      
      Unittests call an overlay internal function to create new nodes.
      Fix up these calls to provide basename only instead of the full
      path.
      
      Fixes: a7e4cfb0 ("of/fdt: only store the device node basename
      in full_name")
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      b89dae18
    • F
      of: unittest: clean up changeset test · a4f91f0d
      Frank Rowand 提交于
      In preparation for fixing __of_node_dup(), clean up the unittest
      function that calls it.
      
      Devicetree nodes created from a flattened device tree have a name
      property.  Follow this convention for nodes added by a changeset.
      
      For node added by changeset, remove incorrect initialization of
      child node pointer.
      
      Add an additional node pointer 'changeset' to more naturally reflect
      where in the tree the changeset is added.
      
      Make changeset add property error messages unique.
      
      Add whitespace to break apart logic blocks.
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      a4f91f0d
    • R
      arm64/efi: Make strrchr() available to the EFI namespace · fdfb69a7
      Rob Herring 提交于
      libfdt gained a new dependency on strrchr, so make it available to the
      EFI namespace before we update libfdt.
      
      Thanks to Ard for providing this fix.
      
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      fdfb69a7
    • R
      Merge tag 'overlay_apply_fdt_v7-for-4.17' of... · b46c7866
      Rob Herring 提交于
      Merge tag 'overlay_apply_fdt_v7-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/frowand/linux into dt/next
      
      DT overlay applying rework from Frank Rowand:
      "Move duplicating and unflattening of an overlay flattened devicetree
      (FDT) into the overlay application code.  To accomplish this,
      of_overlay_apply() is replaced by of_overlay_fdt_apply()."
      b46c7866
  6. 04 3月, 2018 5 次提交
    • F
      of: improve reporting invalid overlay target path · e547c003
      Frank Rowand 提交于
      Errors while developing the patch to create of_overlay_fdt_apply()
      exposed inadequate error messages to debug problems when overlay
      devicetree fragment nodes contain an invalid target path.  Improve
      the messages in find_target_node() to remedy this.
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      e547c003
    • F
      of: convert unittest overlay devicetree source to sugar syntax · db2f3762
      Frank Rowand 提交于
      The unittest-data overlays have been pulled into proper overlay
      devicetree source files without changing their format.  The
      next step is to convert them to use sugar syntax instead of
      hand coding overlay fragments structure.
      
      A few of the overlays can not be converted because they test
      absolute target paths in the overlay fragment.  dtc does not
      generate this type of target:
        overlay_0.dts
        overlay_1.dts
        overlay_12.dts
        overlay_13.dts
      
      Two pre-existing unittest overlay devicetree source files are
      also converted:
        overlay_bad_phandle.dts
        overlay_bad_symbol.dts
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      db2f3762
    • F
    • F
      of: change overlay apply input data from unflattened to FDT · 39a751a4
      Frank Rowand 提交于
      Move duplicating and unflattening of an overlay flattened devicetree
      (FDT) into the overlay application code.  To accomplish this,
      of_overlay_apply() is replaced by of_overlay_fdt_apply().
      
      The copy of the FDT (aka "duplicate FDT") now belongs to devicetree
      code, which is thus responsible for freeing the duplicate FDT.  The
      caller of of_overlay_fdt_apply() remains responsible for freeing the
      original FDT.
      
      The unflattened devicetree now belongs to devicetree code, which is
      thus responsible for freeing the unflattened devicetree.
      
      These ownership changes prevent early freeing of the duplicated FDT
      or the unflattened devicetree, which could result in use after free
      errors.
      
      of_overlay_fdt_apply() is a private function for the anticipated
      overlay loader.
      
      Update unittest.c to use of_overlay_fdt_apply() instead of
      of_overlay_apply().
      
      Move overlay fragments from artificial locations in
      drivers/of/unittest-data/tests-overlay.dtsi into one devicetree
      source file per overlay.  This led to changes in
      drivers/of/unitest-data/Makefile and drivers/of/unitest.c.
      
        - Add overlay directives to the overlay devicetree source files so
          that dtc will compile them as true overlays into one FDT data
          chunk per overlay.
      
        - Set CFLAGS for drivers/of/unittest-data/testcases.dts so that
          symbols will be generated for overlay resolution of overlays
          that are no longer artificially contained in testcases.dts
      
        - Unflatten and apply each unittest overlay FDT using
          of_overlay_fdt_apply().
      
        - Enable the of_resolve_phandles() check for whether the unflattened
          overlay is detached.  This check was previously disabled because the
          overlays from tests-overlay.dtsi were not unflattened into detached
          trees.
      
        - Other changes to unittest.c infrastructure to manage multiple test
          FDTs built into the kernel image (access by name instead of
          arbitrary number).
      
        - of_unittest_overlay_high_level(): previously unused code to add
          properties from the overlay_base devicetree to the live tree
          was triggered by the restructuring of tests-overlay.dtsi and thus
          testcases.dts.  This exposed two bugs: (1) the need to dup a
          property before adding it, and (2) property 'name' is
          auto-generated in the unflatten code and thus will be a duplicate
          in the __symbols__ node - do not treat this duplicate as an error.
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      39a751a4
    • F
      x86: devicetree: fix config option around x86_flattree_get_config() · 581e9290
      Frank Rowand 提交于
      x86_flattree_get_config() is incorrectly protected by
      ifdef CONFIG_OF_FLATTREE.  It uses of_get_flat_dt_size(), which
      only exists if CONFIG_OF_EARLY_FLATTREE.  This issue has not
      been exposed previously because OF_FLATTREE did not occur unless
      it was selected by OF_EARLY_FLATTREE.  A devicetree overlay change
      is selecting OF_FLATTREE directly instead of indirectly enabling
      it by selecting OF_EARLY_FLATTREE.
      
      This problem was exposed by a randconfig generated by the kbuild
      test robot, where Platform OLPC was enabled.  OLPC selects
      OF_PROMTREE instead of OF_EARLY_FLATREE.  The only other x86
      platform that selects OF is X86_INTEL_CE, which does select
      OF_EARLY_FLATTREE.
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      581e9290
  7. 02 3月, 2018 4 次提交
  8. 26 2月, 2018 7 次提交
  9. 25 2月, 2018 1 次提交
    • L
      Merge tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 3664ce2d
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
      
       - Add handling for a missing instruction in our 32-bit BPF JIT so that
         it can be used for seccomp filtering.
      
       - Add a missing NULL pointer check before a function call in new EEH
         code.
      
       - Fix an error path in the new ocxl driver to correctly return EFAULT.
      
       - The support for the new ibm,drc-info device tree property turns out
         to need several fixes, so for now we just stop advertising to
         firmware that we support it until the bugs can be ironed out.
      
       - One fix for the new drmem code which was incorrectly modifying the
         device tree in place.
      
       - Finally two fixes for the RFI flush support, so that firmware can
         advertise to us that it should be disabled entirely so as not to
         affect performance.
      
      Thanks to: Bharata B Rao, Frederic Barrat, Juan J. Alvarez, Mark Lord,
      Michael Bringmann.
      
      * tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/powernv: Support firmware disable of RFI flush
        powerpc/pseries: Support firmware disable of RFI flush
        powerpc/mm/drmem: Fix unexpected flag value in ibm,dynamic-memory-v2
        powerpc/bpf/jit: Fix 32-bit JIT for seccomp_data access
        powerpc/pseries: Revert support for ibm,drc-info devtree property
        powerpc/pseries: Fix duplicate firmware feature for DRC_INFO
        ocxl: Fix potential bad errno on irq allocation
        powerpc/eeh: Fix crashes in eeh_report_resume()
      3664ce2d
  10. 24 2月, 2018 4 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 9cb9c07d
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix TTL offset calculation in mac80211 mesh code, from Peter Oh.
      
       2) Fix races with procfs in ipt_CLUSTERIP, from Cong Wang.
      
       3) Memory leak fix in lpm_trie BPF map code, from Yonghong Song.
      
       4) Need to use GFP_ATOMIC in BPF cpumap allocations, from Jason Wang.
      
       5) Fix potential deadlocks in netfilter getsockopt() code paths, from
          Paolo Abeni.
      
       6) Netfilter stackpointer size checks really are needed to validate
          user input, from Florian Westphal.
      
       7) Missing timer init in x_tables, from Paolo Abeni.
      
       8) Don't use WQ_MEM_RECLAIM in mac80211 hwsim, from Johannes Berg.
      
       9) When an ibmvnic device is brought down then back up again, it can be
          sent queue entries from a previous session, handle this properly
          instead of crashing. From Thomas Falcon.
      
      10) Fix TCP checksum on LRO buffers in mlx5e, from Gal Pressman.
      
      11) When we are dumping filters in cls_api, the output SKB is empty, and
          the filter we are dumping is too large for the space in the SKB, we
          should return -EMSGSIZE like other netlink dump operations do.
          Otherwise userland has no signal that is needs to increase the size
          of its read buffer. From Roman Kapl.
      
      12) Several XDP fixes for virtio_net, from Jesper Dangaard Brouer.
      
      13) Module refcount leak in netlink when a dump start fails, from Jason
          Donenfeld.
      
      14) Handle sub-optimal GSO sizes better in TCP BBR congestion control,
          from Eric Dumazet.
      
      15) Releasing bpf per-cpu arraymaps can take a long time, add a
          condtional scheduling point. From Eric Dumazet.
      
      16) Implement retpolines for tail calls in x64 and arm64 bpf JITs. From
          Daniel Borkmann.
      
      17) Fix page leak in gianfar driver, from Andy Spencer.
      
      18) Missed clearing of estimator scratch buffer, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits)
        net_sched: gen_estimator: fix broken estimators based on percpu stats
        gianfar: simplify FCS handling and fix memory leak
        ipv6 sit: work around bogus gcc-8 -Wrestrict warning
        macvlan: fix use-after-free in macvlan_common_newlink()
        bpf, arm64: fix out of bounds access in tail call
        bpf, x64: implement retpoline for tail call
        rxrpc: Fix send in rxrpc_send_data_packet()
        net: aquantia: Fix error handling in aq_pci_probe()
        bpf: fix rcu lockdep warning for lpm_trie map_free callback
        bpf: add schedule points in percpu arrays management
        regulatory: add NUL to request alpha2
        ibmvnic: Fix early release of login buffer
        net/smc9194: Remove bogus CONFIG_MAC reference
        net: ipv4: Set addr_type in hash_keys for forwarded case
        tcp_bbr: better deal with suboptimal GSO
        smsc75xx: fix smsc75xx_set_features()
        netlink: put module reference if dump start fails
        selftests/bpf/test_maps: exit child process without error in ENOMEM case
        selftests/bpf: update gitignore with test_libbpf_open
        selftests/bpf: tcpbpf_kern: use in6_* macros from glibc
        ..
      9cb9c07d
    • L
      Merge branch 'fixes-v4.16-rc3' of... · 2eb02aa9
      Linus Torvalds 提交于
      Merge branch 'fixes-v4.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
      
      Pull security subsystem fixes from James Morris:
      
       - keys fixes via David Howells:
            "A collection of fixes for Linux keyrings, mostly thanks to Eric
             Biggers:
      
              - Fix some PKCS#7 verification issues.
      
              - Fix handling of unsupported crypto in X.509.
      
              - Fix too-large allocation in big_key"
      
       - Seccomp updates via Kees Cook:
            "These are fixes for the get_metadata interface that landed during
             -rc1. While the new selftest is strictly not a bug fix, I think
             it's in the same spirit of avoiding bugs"
      
       - an IMA build fix from Randy Dunlap
      
      * 'fixes-v4.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        integrity/security: fix digsig.c build error with header file
        KEYS: Use individual pages in big_key for crypto buffers
        X.509: fix NULL dereference when restricting key with unsupported_sig
        X.509: fix BUG_ON() when hash algorithm is unsupported
        PKCS#7: fix direct verification of SignerInfo signature
        PKCS#7: fix certificate blacklisting
        PKCS#7: fix certificate chain verification
        seccomp: add a selftest for get_metadata
        ptrace, seccomp: tweak get_metadata behavior slightly
        seccomp, ptrace: switch get_metadata types to arch independent
      2eb02aa9
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 65738c6b
      Linus Torvalds 提交于
      Pull arm64 fixes from Catalin Marinas:
       "arm64 and perf fixes:
      
         - build error when accessing MPIDR_HWID_BITMASK from .S
      
         - fix CTR_EL0 field definitions
      
         - remove/disable some kernel messages on user faults (unhandled
           signals, unimplemented syscalls)
      
         - fix kernel page fault in unwind_frame() with function graph tracing
      
         - fix perf sleeping while atomic errors when booting with ACPI"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: fix unwind_frame() for filtered out fn for function graph tracing
        arm64: Enforce BBM for huge IO/VMAP mappings
        arm64: perf: correct PMUVer probing
        arm_pmu: acpi: request IRQs up-front
        arm_pmu: note IRQs and PMUs per-cpu
        arm_pmu: explicitly enable/disable SPIs at hotplug
        arm_pmu: acpi: check for mismatched PPIs
        arm_pmu: add armpmu_alloc_atomic()
        arm_pmu: fold platform helpers into platform code
        arm_pmu: kill arm_pmu_platdata
        ARM: ux500: remove PMU IRQ bouncer
        arm64: __show_regs: Only resolve kernel symbols when running at EL1
        arm64: Remove unimplemented syscall log message
        arm64: Disable unhandled signal log messages by default
        arm64: cpufeature: Fix CTR_EL0 field definitions
        arm64: uaccess: Formalise types for access_ok()
        arm64: Fix compilation error while accessing MPIDR_HWID_BITMASK from .S files
      65738c6b
    • L
      Merge tag 'mips_fixes_4.16_3' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips · 2bd06ce7
      Linus Torvalds 提交于
      Pull MIPS fix from James Hogan:
       "A single MIPS fix for mismatching struct compat_flock, resulting in
        bus errors starting Firefox on Debian 8 since 4.13"
      
      * tag 'mips_fixes_4.16_3' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips:
        MIPS: Drop spurious __unused in struct compat_flock
      2bd06ce7