1. 07 Oct, 2014 2 commits
  2. 06 Oct, 2014 1 commit
  3. 04 Oct, 2014 5 commits
    • Grant Likely's avatar
      of/selftest: Use the resolver to fixup phandles · 2eb46da2
      Grant Likely authored
      The selftest data ends up causing duplicate phandles in the live tree
      for the time that the testcase data is inserted into the live tree. This
      is obviously a bad situation because anything attempting to read the
      tree while the selftests are running make resolve phandles to one of the
      testcase data nodes. Fix the problem by using the of_resolve_phandles()
      function to eliminate duplicates.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      2eb46da2
    • Pantelis Antoniou's avatar
      of: Introduce Device Tree resolve support. · 7941b27b
      Pantelis Antoniou authored
      Introduce support for dynamic device tree resolution.
      Using it, it is possible to prepare a device tree that's
      been loaded on runtime to be modified and inserted at the kernel
      live tree.
      
      Export of of_resolve and bug fix of double free by
      	Guenter Roeck <groeck@juniper.net>
      Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [grant.likely: Don't need to select CONFIG_OF_DYNAMIC and CONFIG_OF_DEVICE]
      [grant.likely: Don't need to depend on OF or !SPARC]
      [grant.likely: Factor out duplicate code blocks into single function]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      7941b27b
    • Grant Likely's avatar
      of/selftest: Add a test for duplicate phandles · 841ec213
      Grant Likely authored
      All phandles in the tree should be unique. Add a testcase to make sure
      that this is so.
      
      Note: this testcase fails on the current kernel because the selftest
      code itself ends up adding duplicate phandles. Before this testcase is
      merged the selftest code needs to be modified to resolve phandles before
      adding them.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      841ec213
    • Grant Likely's avatar
      of: Don't try to search when phandle == 0 · fc59b447
      Grant Likely authored
      A value of '0' isn't a valid phandle, so searching for a node with that
      phandle is pointless. It will result in nothing but false positives.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      fc59b447
    • Grant Likely's avatar
      of/selftest: Test structure of device tree · f2051d6a
      Grant Likely authored
      Add a testcase to verify that the device tree is properly constructed
      and the lists are in a correct order. The new testcase gets run twice;
      once after adding the testcase data, and once after removing it again.
      It is run twice to make sure adding and removing the testcase data
      doesn't corrupt the data structure.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      f2051d6a
  4. 01 Oct, 2014 1 commit
    • Grant Likely's avatar
      of: Fix NULL dereference in selftest removal code · e66c98c7
      Grant Likely authored
      The selftest code removes its testcase data from the live tree when
      exiting, but if the testcases data tree contains an empty child of the
      root, then it causes an oops due to a NULL dereference. The reason is
      that the code tries to directly dereference the child pointer without
      checking first if a child is actually there.
      
      The solution is to pass the parent node into detach_node_and_children()
      instead of trying to pass the child. This required removing the code
      that attempts to remove all of the sibling nodes in
      detach_node_and_children(), which was never sensible in the first place.
      
      At the same time add a check to make sure the bounds of the nodes list
      are not exceeded by the testdata tree. If they are then abort.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      e66c98c7
  5. 28 Sep, 2014 3 commits
  6. 27 Sep, 2014 15 commits
  7. 26 Sep, 2014 13 commits