1. 20 4月, 2016 1 次提交
  2. 15 3月, 2016 3 次提交
  3. 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
  4. 02 3月, 2016 2 次提交
  5. 19 2月, 2016 2 次提交
  6. 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
  7. 12 2月, 2016 1 次提交
  8. 09 2月, 2016 1 次提交
  9. 07 2月, 2016 6 次提交
  10. 06 2月, 2016 1 次提交
  11. 29 1月, 2016 2 次提交
  12. 26 1月, 2016 1 次提交
    • M
      of: MSI: Simplify irqdomain lookup · 14a0db3c
      Marc Zyngier 提交于
      So far, when trying to associate a device with its MSI domain,
      we first lookup the domain using a MSI token, and if this
      doesn't return anything useful, we pick up any domain matching
      the same node.
      
      This logic is broken for two reasons:
      1) Only the generic MSI code (PCI or platform) sets this token
         to PCI/MSI or platform MSI. So we're guaranteed that if there
         is something to be found, we will find it with the first call.
      2) If we have a convoluted situation where:
         - a single node implements both wired and MSI interrupts
         - MSI support for that HW hasn't been compiled in
         we'll end up using the wired domain for MSIs anyway, and things
         break badly.
      
      So let's just remove __of_get_msi_domain, and replace it by a direct
      call to irq_find_matching_host, because that's what we really want.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NRob Herring <robh+dt@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Link: http://lkml.kernel.org/r/1453816347-32720-3-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      14a0db3c
  13. 14 1月, 2016 1 次提交
  14. 13 1月, 2016 1 次提交
  15. 08 1月, 2016 5 次提交
  16. 05 1月, 2016 2 次提交
  17. 10 12月, 2015 2 次提交
  18. 09 12月, 2015 1 次提交
  19. 08 12月, 2015 1 次提交
    • G
      of/fdt: Add mutex protection for calls to __unflatten_device_tree() · f8062386
      Guenter Roeck 提交于
      __unflatten_device_tree() calls unflatten_dt_node(), which declares
      a static variable. It is therefore not reentrant.
      
      One of the callers of __unflatten_device_tree(), unflatten_device_tree(),
      is only called once during early initialization and does not need to be
      protected. The other caller, of_fdt_unflatten_tree(), can be called at
      any time, possibly multiple times in parallel. This can happen, for
      example, if multiple devicetree overlays have to be loaded and installed.
      
      Without this protection, errors such as the following may be seen.
      
      kernel: End of tree marker overwritten: e6a3a458
      kernel: find_target_node:
      	Failed to find target-indirect node at /fragment@0
      kernel: __of_overlay_create: of_build_overlay_info() failed for tree@/
      
      Add a mutex to of_fdt_unflatten_tree() to make the call reentrant.
      
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: stable@vger.kernel.org # v4.1+
      Signed-off-by: NRob Herring <robh@kernel.org>
      f8062386
  20. 01 12月, 2015 3 次提交