1. 04 3月, 2016 3 次提交
    • D
      of: add 'const' for of_property_*_string*() parameter '*np' · fe99c707
      David Rivshin 提交于
      The of_property_{read,count,match}_string* family of functions never
      modify the struct device_node pointer that is passed in, so there is no
      reason for it to be non-const. Equivalent functions for all other types
      already take a 'const struct device_node *np'.
      Signed-off-by: NDavid Rivshin <drivshin@allworx.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      fe99c707
    • 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
    • V
      of: alloc anywhere from memblock if range not specified · e53b50c0
      Vinayak Menon 提交于
      early_init_dt_alloc_reserved_memory_arch passes end as 0 to
      __memblock_alloc_base, when limits are not specified. But
      __memblock_alloc_base takes end value of 0 as MEMBLOCK_ALLOC_ACCESSIBLE
      and limits the end to memblock.current_limit. This results in regions
      never being placed in HIGHMEM area, for e.g. CMA.
      Let __memblock_alloc_base allocate from anywhere in memory if limits are
      not specified.
      Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NVinayak Menon <vinmenon@codeaurora.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRob Herring <robh@kernel.org>
      e53b50c0
  2. 14 2月, 2016 1 次提交
    • A
      of: resolver: Add missing of_node_get and of_node_put · 82f68756
      Amitoj Kaur Chawla 提交于
      In __of_find_node_by_full_name, add an of_node_get when detecting the
      desired element, to ensure that it ends up with a reference count that is
      one greater than on entering the function.
      
      Also in __of_find_node_by_full_name, add an of_node_put on breaking
      out of the for_each_child_of_node loop, to ensure that the reference
      count of the returned value is not double incremented. This change
      was made using Coccinelle.
      
      The semantic patch used for this is as follows:
      
      // <smpl>
      @@
      expression e;
      local idexpression n;
      @@
      
       for_each_child_of_node(..., n) {
         ... when != of_node_put(n)
             when != e = n
      (
         return n;
      |
      +  of_node_put(n);
      ?  return ...;
      )
         ...
       }
      // </smpl
      
      Finally, add an of_node_put in for_each_child_of_node in the function
      __of_adjust_phandle_ref after the value returned by
      __of_find_node_by_full_name is no longer useful.
      Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      82f68756
  3. 25 1月, 2016 2 次提交
  4. 24 1月, 2016 3 次提交
  5. 23 1月, 2016 3 次提交
  6. 22 1月, 2016 19 次提交
  7. 21 1月, 2016 9 次提交