1. 02 3月, 2016 1 次提交
  2. 12 2月, 2016 1 次提交
  3. 09 2月, 2016 1 次提交
  4. 29 1月, 2016 2 次提交
  5. 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
  6. 14 1月, 2016 1 次提交
  7. 13 1月, 2016 1 次提交
  8. 08 1月, 2016 5 次提交
  9. 05 1月, 2016 2 次提交
  10. 10 12月, 2015 2 次提交
  11. 09 12月, 2015 1 次提交
  12. 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
  13. 01 12月, 2015 3 次提交
  14. 11 11月, 2015 2 次提交
    • J
      drivers: of: of_reserved_mem: fixup the alignment with CMA setup · 1cc8e345
      Jason Liu 提交于
      There is an alignment mismatch issue between the of_reserved_mem and
      the CMA setup requirement. The of_reserved_mem will try to get the
      alignment value from the DTS and pass it to __memblock_alloc_base to
      do the memory block base allocation, but the alignment value specified
      in the DTS may not satisfy the CAM setup requirement since CMA setup
      required the alignment as the following in the code:
      
      align = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
      
      The sanity check in the function of rmem_cma_setup will fail if the
      alignment does not setup correctly and thus CMA will fail to setup.
      
      This patch is to fixup the alignment to meet the CMA setup required.
      
      Mailing-list-thread: https://lkml.org/lkml/2015/11/9/138Signed-off-by: NJason Liu <r64343@freescale.com>
      Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRob Herring <robh@kernel.org>
      1cc8e345
    • M
      of: Print rather than WARN'ing when overlap check fails · 85a1c77f
      Michael Ellerman 提交于
      __rmem_check_for_overlap() is called very early in boot, and on some
      powerpc systems it's not safe to call WARN that early in boot.
      
      If the overlap check fails the system will oops instead of printing a
      warning. Furthermore because it's so early in boot the console is not up
      and the user doesn't see the oops, they just get a dead system.
      
      Fix it by printing an error instead of calling WARN.
      
      Fixes: ae1add24 ("of: Check for overlap in reserved memory regions")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NRob Herring <robh@kernel.org>
      85a1c77f
  15. 07 11月, 2015 2 次提交
  16. 31 10月, 2015 2 次提交
  17. 28 10月, 2015 2 次提交
    • R
      of: add config option to enable building of all dtbs · 1b7c501b
      Rob Herring 提交于
      Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
      are not really dependent on a platform being enabled or any other kernel
      config, so for testing coverage it is convenient to build all of the dtbs.
      
      In order to only build dtbs, this option can be used by creating an
      allno.config file containing:
      CONFIG_COMPILE_TEST=y
      CONFIG_OF=y
      CONFIG_OF_ALL_DTBS=y
      
      And then running:
      make KCONFIG_ALLCONFIG=1 allnoconfig
      make dtbs
      
      While building the dtbs themselves don't need a cross compiler, the
      scripts dependency does need one. This can be hacked around by
      commenting out "subdir-y += mod" in scripts/Makefile.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      1b7c501b
    • M
      of/fdt: fix error checking for earlycon address · 3f5ceec9
      Masahiro Yamada 提交于
      fdt_translate_address() returns OF_BAD_ADDR on error.  It is defined as
      a u64 value, so the variable "addr" should be defined as u64 as well.
      
      Fixes: fb11ffe7 ("of/fdt: add FDT serial scanning for earlycon")
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      3f5ceec9
  18. 22 10月, 2015 4 次提交
    • J
      of/overlay: add missing of_node_put · 001cf504
      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>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NRob Herring <robh@kernel.org>
      001cf504
    • J
      of/platform: add missing of_node_put · 7fad948a
      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>
      @@
      local idexpression n;
      expression root,e;
      @@
      
       for_each_child_of_node(root,n) {
         ...
      (
         of_node_put(n);
      |
         e = n
      |
      +  of_node_put(n);
      ?  break;
      )
         ...
       }
      ... when != n
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NRob Herring <robh@kernel.org>
      7fad948a
    • J
      of/irq: add missing of_node_put · 8363ccb9
      Julia Lawall 提交于
      for_each_matching_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>
      @@
      local idexpression n;
      expression e;
      identifier l;
      @@
      
       for_each_matching_node(n,...) {
         ...
      (
         of_node_put(n);
      |
         e = n
      |
      +  of_node_put(n);
      ?  goto l;
      )
         ...
       }
      ...
      l: ... when != n
      // </smpl>
      
      Besides the issue found by the semantic patch, this code also stores the
      device_node value in a list, which requires an of_node_get, and then cleans
      up the list on exit from the function, which requires an of_node_put.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NRob Herring <robh@kernel.org>
      8363ccb9
    • 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
  19. 18 10月, 2015 1 次提交
  20. 16 10月, 2015 5 次提交