1. 03 5月, 2017 1 次提交
  2. 28 4月, 2017 1 次提交
  3. 24 1月, 2017 1 次提交
  4. 05 1月, 2017 1 次提交
  5. 24 6月, 2016 1 次提交
  6. 19 5月, 2016 1 次提交
  7. 16 5月, 2016 1 次提交
  8. 22 4月, 2016 1 次提交
  9. 04 3月, 2016 1 次提交
    • S
      of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays() · 815d74b3
      Sergey Senozhatsky 提交于
      of_overlay_destroy() can return `-ENODEV' error code once it
      failed to find the requested overlay in `ov_idr'. However,
      of_unittest_destroy_tracked_overlays() does not handle this
      error code correctly and continues to call of_overlay_destroy()
      on the 'missing' overlay over and over again. This results in
      a printk flood
      
      [..]
      [   33.497583] of_overlay_destroy: Could not find overlay #6
      [   33.497583] of_overlay_destroy: Could not find overlay #6
      [   33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [   33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [   33.497586] of_overlay_destroy: Could not find overlay #6
      [   33.497586] of_overlay_destroy: Could not find overlay #6
      [   33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [   33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [..]
      
      which is not really good due to printk design, and can lead to soft
      lockups, hard lockups, etc. (depending on the context console_unlock()
      is being called from). The problem has bee observed in real life
      and reported by Ying Huang.
      
      This patch does not address the root cause of missing overlay in
      `ov_idr', it fixes the endless loop only.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Reported-by: Nkernel test robot <ying.huang@linux.intel.com>
      Link: lkml.kernel.org/r/87fuwk1c0o.fsf@yhuang-dev.intel.com
      Signed-off-by: NRob Herring <robh@kernel.org>
      815d74b3
  10. 14 1月, 2016 1 次提交
  11. 05 1月, 2016 1 次提交
    • G
      of/unittest: Show broken behaviour in the platform bus · d2329fb5
      Grant Likely 提交于
      Add a single resource to the test bus device to exercise the platform
      bus code a little more. This isn't strictly a devicetree test, but it is
      a corner case that the devicetree runs into. Until we've got platform
      device unittests, it can live here. It doesn't need to be an explicit
      text because the kernel will oops when it is wrong.
      
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      [wsa: added the comment provided by Grant, rebased, and tested]
      Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      d2329fb5
  12. 22 10月, 2015 1 次提交
    • J
      of/unittest: add missing of_node_put · 855ff287
      Julia Lawall 提交于
      for_each_child_of_node performs an of_node_get on each iteration, so
      a break out of the loop requires an of_node_put.
      
      A simplified version of the semantic patch that fixes this problem is as
      follows (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      expression root,e;
      local idexpression child;
      @@
      
       for_each_child_of_node(root, child) {
         ... when != of_node_put(child)
             when != e = child
      (
         return child;
      |
      +  of_node_put(child);
      ?  return ...;
      )
         ...
       }
      // </smpl>
      
      Combine the puts into code at the end of the function, for conciseness.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NRob Herring <robh@kernel.org>
      855ff287
  13. 27 7月, 2015 1 次提交
  14. 15 4月, 2015 1 次提交
  15. 29 3月, 2015 6 次提交
  16. 25 3月, 2015 1 次提交
  17. 19 3月, 2015 1 次提交
  18. 10 3月, 2015 4 次提交
  19. 05 2月, 2015 1 次提交
  20. 23 1月, 2015 2 次提交
  21. 14 1月, 2015 1 次提交
  22. 04 12月, 2014 2 次提交
  23. 28 11月, 2014 1 次提交
  24. 25 11月, 2014 3 次提交
    • P
      of/overlay: Add overlay unittests · 177d271c
      Pantelis Antoniou 提交于
      Add unittests for OF overlays.
      
      It tests overlay device addition/removal and whether
      the apply revert sequence is correct.
      
      Changes since V1:
      * Added local fixups entries.
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      177d271c
    • G
      of: Refactor __of_node_alloc() into __of_node_dup() · e5179581
      Grant Likely 提交于
      Add a node argument to __of_node_alloc() and rename it to
      __of_node_dup() so that it can also be used to duplicate a node with
      its properties. This is important for the overlay code so that it can
      create new nodes without using separate changeset items for every single
      property.
      
      At the same time rework the overlay code to use the new function and
      drop the extra changeset items.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      e5179581
    • G
      of: Use vargs in __of_node_alloc · ef8bbd73
      Grant Likely 提交于
      The overlay code needs to construct a new full_name from the parent name
      and the node name, but the current method has to allocate and then free
      an temporary string which is wasteful. Fix this problem by using vargs
      to pass in a format and arguments into __of_node_alloc().
      
      At the same time remove the allocflags argument to __of_node_alloc().
      The only users all use GFP_KERNEL, so there is no need to provide it as
      an option. If there is ever a need later it can be added back.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      ef8bbd73
  25. 05 11月, 2014 2 次提交
  26. 04 11月, 2014 2 次提交
    • G
      of: Eliminate of_allnodes list · 5063e25a
      Grant Likely 提交于
      The device tree structure is composed of two lists; the 'allnodes' list
      which is a singly linked list containing every node in the tree, and the
      child->parent structure where each parent node has a singly linked list
      of children. All of the data in the allnodes list can be easily
      reproduced with the parent-child lists, so of_allnodes is actually
      unnecessary. Remove it entirely which saves a bit of memory and
      simplifies the data structure quite a lot.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      Cc: Pantelis Antoniou <pantelis@pantelis.antoniou@konsulko.com>
      5063e25a
    • G
      of: Fix overflow bug in string property parsing functions · a87fa1d8
      Grant Likely 提交于
      The string property read helpers will run off the end of the buffer if
      it is handed a malformed string property. Rework the parsers to make
      sure that doesn't happen. At the same time add new test cases to make
      sure the functions behave themselves.
      
      The original implementations of of_property_read_string_index() and
      of_property_count_strings() both open-coded the same block of parsing
      code, each with it's own subtly different bugs. The fix here merges
      functions into a single helper and makes the original functions static
      inline wrappers around the helper.
      
      One non-bugfix aspect of this patch is the addition of a new wrapper,
      of_property_read_string_array(). The new wrapper is needed by the
      device_properties feature that Rafael is working on and planning to
      merge for v3.19. The implementation is identical both with and without
      the new static inline wrapper, so it just got left in to reduce the
      churn on the header file.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Darren Hart <darren.hart@intel.com>
      Cc: <stable@vger.kernel.org>  # v3.3+: Drop selftest hunks that don't apply
      a87fa1d8