1. 09 Feb, 2017 1 commit
    • Qi Hou's avatar
      of: fix of_node leak caused in of_find_node_opts_by_path · 0549bde0
      Qi Hou authored
      During stepping down the tree, parent node is gotten first and its refcount is
      increased with of_node_get() in __of_get_next_child(). Since it just being used
      as tmp node, its refcount must be decreased with of_node_put() after traversing
      its child nodes.
      
      Or, its refcount will never be descreased to ZERO, then it will never be freed,
      as well as other related memory blocks.
      
      To fix this, decrease refcount of parent with of_node_put() after
      __of_find_node_by_path().
      Signed-off-by: default avatarQi Hou <qi.hou@windriver.com>
      Acked-by: default avatarPeter Rosin <peda@axentia.se>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      0549bde0
  2. 07 Feb, 2017 1 commit
  3. 01 Feb, 2017 4 commits
  4. 23 Jan, 2017 1 commit
  5. 19 Jan, 2017 1 commit
  6. 11 Jan, 2017 2 commits
  7. 09 Jan, 2017 10 commits
  8. 04 Jan, 2017 3 commits
    • Geliang Tang's avatar
      of: drop duplicate headers · 30965eea
      Geliang Tang authored
      Drop duplicate headers string.h and of_platform.h.
      Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      30965eea
    • Smitha T Murthy's avatar
      of: reserved_mem: set dma_ops for devices using reserved mem · a3b398e6
      Smitha T Murthy authored
      For some IPs, there may be virtual child devices created and for them its
      necessary to set the dma_ops if it's using reserved memory else it will call
      the dummy dma_ops during buffer operations for the child devices which will
      lead to memory mapping failure.
      Signed-off-by: default avatarSmitha T Murthy <smitha.t@samsung.com>
      Signed-off-by: default avatarPankaj Dubey <pankaj.dubey@samsung.com>
      Acked-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      a3b398e6
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version 0931cea3ba20 · 6f05afcb
      Rob Herring authored
      Sync to upstream dtc commit 0931cea3ba20 ("dtc: fdtdump: check fdt if
      not in scanning mode"). In particular, this pulls in dtc overlay
      support.
      
      This adds the following commits from upstream:
      
      f88865469b65 dtc: Fix memory leak in character literal parsing
      00fbb8696b66 Rename boot_info
      1ef86ad2c24f dtc: Clean up /dts-v1/ and /plugin/ handling in grammar
      e3c769aa9c16 dtc: Don't always generate __symbols__ for plugins
      c96cb3c0169e tests: Don't use -@ on plugin de/recompile tests
      66381538ce24 tests: Remove "suppression of fixups" tests
      ba765b273f0f tests: Clarify dtc overlay tests
      6ea8cd944fcd tests: More thorough tests of libfdt overlay application without dtc
      7d8ef6e1db97 tests: Correct fdt handling of overlays without fixups and base trees without symbols
      b4dc0ed8b127 tests: Fix double expansion bugs in test code
      3ea879dc0c8f tests: Split overlay tests into those with do/don't exercise dtc plugin generation
      47b4d66a2f11 tests: Test auto-alias generation on base tree, not overlay
      72e1ad811523 tests: Make overlay/plugin tests unconditional
      e7b3c3b5951b tests: Add overlay tests
      9637e3f772a9 tests: Add check_path test
      20f29d8d41f6 dtc: Plugin and fixup support
      a2c92cac53f8 dtc: Document the dynamic plugin internals
      8f70ac39801d checks: Pass boot_info instead of root node
      ea10f953878f libfdt: add missing errors to fdt_strerror()
      daa75e8fa594 libfdt: fix fdt_stringlist_search()
      e28eff5b787a libfdt: fix fdt_stringlist_count()
      ae97c7722840 tests: overlay: Rename the device tree blobs to be more explicit
      96162d2bd9cb tests: overlay: Add test suffix to the compiled blobs
      5ce8634733b7 libfdt: Add fdt_overlay_apply to the exported symbols
      804a9db90ad2 fdt: strerr: Remove spurious BADOVERLAY
      e8c3a1a493fa tests: overlay: Move back the bad fixup tests
      7a72d89d3f81 libfdt: overlay: Fix symbols and fixups nodes condition
      cabbaa972cdd libfdt: overlay: Report a bad overlay for mismatching local fixups
      deb0a5c1aeaa libfdt: Add BADPHANDLE error string
      7b7a6be9ba15 libfdt: Don't use 'index' as a local variable name
      aea8860d831e tests: Add tests cases for the overlay code
      0cdd06c5135b libfdt: Add overlay application function
      39240cc865cf libfdt: Extend the reach of FDT_ERR_BADPHANDLE
      4aa3a6f5e6d9 libfdt: Add new errors for the overlay code
      6d1832c9e64b dtc: Remove "home page" link
      45fd440a9561 Fix some typing errors in libfdt.h and livetree.c
      a59be4939c13 Merge tag 'v1.4.2'
      a34bb721caca dtc: Fix assorted problems in the testcases for the -a option
      874f40588d3e Implement the -a option to pad dtb aligned
      ec02b34c05be dtc: Makefile improvements for release uploading
      1ed45d40a137 dtc: Bump version to 1.4.2
      36fd7331fb11 libfdt: simplify fdt_del_mem_rsv()
      d877364e4a0f libfdt: Add fdt_setprop_inplace_namelen_partial
      3e9037aaad44 libfdt: Add fdt_getprop_namelen_w
      84e0e1346c68 libfdt: Add max phandle retrieval function
      d29126c90acb libfdt: Add iterator over properties
      902d0f0953d0 libfdt: Add a subnodes iterator macro
      c539075ba8ba fdtput.c: Fix memory leak.
      f79ddb83e185 fdtget.c: Fix memory leak
      1074ee54b63f convert-dtsv0-lexer.l: fix memory leak
      e24d39a024e6 fdtdump.c: make sure size_t argument to memchr is always unsigned.
      44a59713cf05 Remove unused srcpos_dump() function
      cb9241ae3453 DTC: Fix memory leak on flatname.
      1ee0ae24ea09 Simplify check field and macro names
      9d97527a8621 Remove property check functions
      2e709d158e11 Remove tree check functions
      c4cb12e193e3 Alter grammar to allow multiple /dts-v1/ tags
      d71d25d76012 Use xasprintf() in srcpos
      9dc404958e9c util: Add xasprintf portable asprintf variant
      beef80b8b55f Correct a missing space in a fdt_header cast
      68d43cec1253 Correct line lengths in libfdt.h
      b0dbceafd49a Correct space-after-tab in libfdt.h
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      6f05afcb
  9. 01 Jan, 2017 2 commits
    • Linus Torvalds's avatar
      Linux 4.10-rc2 · 0c744ea4
      Linus Torvalds authored
      0c744ea4
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 4759d386
      Linus Torvalds authored
      Pull DAX updates from Dan Williams:
       "The completion of Jan's DAX work for 4.10.
      
        As I mentioned in the libnvdimm-for-4.10 pull request, these are some
        final fixes for the DAX dirty-cacheline-tracking invalidation work
        that was merged through the -mm, ext4, and xfs trees in -rc1. These
        patches were prepared prior to the merge window, but we waited for
        4.10-rc1 to have a stable merge base after all the prerequisites were
        merged.
      
        Quoting Jan on the overall changes in these patches:
      
           "So I'd like all these 6 patches to go for rc2. The first three
            patches fix invalidation of exceptional DAX entries (a bug which
            is there for a long time) - without these patches data loss can
            occur on power failure even though user called fsync(2). The other
            three patches change locking of DAX faults so that ->iomap_begin()
            is called in a more relaxed locking context and we are safe to
            start a transaction there for ext4"
      
        These have received a build success notification from the kbuild
        robot, and pass the latest libnvdimm unit tests. There have not been
        any -next releases since -rc1, so they have not appeared there"
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        ext4: Simplify DAX fault path
        dax: Call ->iomap_begin without entry lock during dax fault
        dax: Finish fault completely when loading holes
        dax: Avoid page invalidation races and unnecessary radix tree traversals
        mm: Invalidate DAX radix tree entries only if appropriate
        ext2: Return BH_New buffers for zeroed blocks
      4759d386
  10. 30 Dec, 2016 2 commits
  11. 29 Dec, 2016 2 commits
    • Olof Johansson's avatar
      mm/filemap: fix parameters to test_bit() · 98473f9f
      Olof Johansson authored
       mm/filemap.c: In function 'clear_bit_unlock_is_negative_byte':
        mm/filemap.c:933:9: error: too few arguments to function 'test_bit'
          return test_bit(PG_waiters);
               ^~~~~~~~
      
      Fixes: b91e1302 ('mm: optimize PageWaiters bit use for unlock_page()')
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      Brown-paper-bag-by: default avatarLinus Torvalds <dummy@duh.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      98473f9f
    • Linus Torvalds's avatar
      mm: optimize PageWaiters bit use for unlock_page() · b91e1302
      Linus Torvalds authored
      In commit 62906027 ("mm: add PageWaiters indicating tasks are
      waiting for a page bit") Nick Piggin made our page locking no longer
      unconditionally touch the hashed page waitqueue, which not only helps
      performance in general, but is particularly helpful on NUMA machines
      where the hashed wait queues can bounce around a lot.
      
      However, the "clear lock bit atomically and then test the waiters bit"
      sequence turns out to be much more expensive than it needs to be,
      because you get a nasty stall when trying to access the same word that
      just got updated atomically.
      
      On architectures where locking is done with LL/SC, this would be trivial
      to fix with a new primitive that clears one bit and tests another
      atomically, but that ends up not working on x86, where the only atomic
      operations that return the result end up being cmpxchg and xadd.  The
      atomic bit operations return the old value of the same bit we changed,
      not the value of an unrelated bit.
      
      On x86, we could put the lock bit in the high bit of the byte, and use
      "xadd" with that bit (where the overflow ends up not touching other
      bits), and look at the other bits of the result.  However, an even
      simpler model is to just use a regular atomic "and" to clear the lock
      bit, and then the sign bit in eflags will indicate the resulting state
      of the unrelated bit #7.
      
      So by moving the PageWaiters bit up to bit #7, we can atomically clear
      the lock bit and test the waiters bit on x86 too.  And architectures
      with LL/SC (which is all the usual RISC suspects), the particular bit
      doesn't matter, so they are fine with this approach too.
      
      This avoids the extra access to the same atomic word, and thus avoids
      the costly stall at page unlock time.
      
      The only downside is that the interface ends up being a bit odd and
      specialized: clear a bit in a byte, and test the sign bit.  Nick doesn't
      love the resulting name of the new primitive, but I'd rather make the
      name be descriptive and very clear about the limitation imposed by
      trying to work across all relevant architectures than make it be some
      generic thing that doesn't make the odd semantics explicit.
      
      So this introduces the new architecture primitive
      
          clear_bit_unlock_is_negative_byte();
      
      and adds the trivial implementation for x86.  We have a generic
      non-optimized fallback (that just does a "clear_bit()"+"test_bit(7)"
      combination) which can be overridden by any architecture that can do
      better.  According to Nick, Power has the same hickup x86 has, for
      example, but some other architectures may not even care.
      
      All these optimizations mean that my page locking stress-test (which is
      just executing a lot of small short-lived shell scripts: "make test" in
      the git source tree) no longer makes our page locking look horribly bad.
      Before all these optimizations, just the unlock_page() costs were just
      over 3% of all CPU overhead on "make test".  After this, it's down to
      0.66%, so just a quarter of the cost it used to be.
      
      (The difference on NUMA is bigger, but there this micro-optimization is
      likely less noticeable, since the big issue on NUMA was not the accesses
      to 'struct page', but the waitqueue accesses that were already removed
      by Nick's earlier commit).
      Acked-by: default avatarNick Piggin <npiggin@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Bob Peterson <rpeterso@redhat.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Lutomirski <luto@kernel.org>
      Cc: Andreas Gruenbacher <agruenba@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b91e1302
  12. 28 Dec, 2016 2 commits
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 2d706e79
      Linus Torvalds authored
      Pull crypto fix from Herbert Xu:
       "This fixes a hash corruption bug in the marvell driver"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: marvell - Copy IVDIG before launching partial DMA ahash requests
      2d706e79
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 8f18e4d0
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Various ipvlan fixes from Eric Dumazet and Mahesh Bandewar.
      
          The most important is to not assume the packet is RX just because
          the destination address matches that of the device. Such an
          assumption causes problems when an interface is put into loopback
          mode.
      
       2) If we retry when creating a new tc entry (because we dropped the
          RTNL mutex in order to load a module, for example) we end up with
          -EAGAIN and then loop trying to replay the request. But we didn't
          reset some state when looping back to the top like this, and if
          another thread meanwhile inserted the same tc entry we were trying
          to, we re-link it creating an enless loop in the tc chain. Fix from
          Daniel Borkmann.
      
       3) There are two different WRITE bits in the MDIO address register for
          the stmmac chip, depending upon the chip variant. Due to a bug we
          could set them both, fix from Hock Leong Kweh.
      
       4) Fix mlx4 bug in XDP_TX handling, from Tariq Toukan.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: stmmac: fix incorrect bit set in gmac4 mdio addr register
        r8169: add support for RTL8168 series add-on card.
        net: xdp: remove unused bfp_warn_invalid_xdp_buffer()
        openvswitch: upcall: Fix vlan handling.
        ipv4: Namespaceify tcp_tw_reuse knob
        net: korina: Fix NAPI versus resources freeing
        net, sched: fix soft lockup in tc_classify
        net/mlx4_en: Fix user prio field in XDP forward
        tipc: don't send FIN message from connectionless socket
        ipvlan: fix multicast processing
        ipvlan: fix various issues in ipvlan_process_multicast()
      8f18e4d0
  13. 27 Dec, 2016 9 commits