1. 09 6月, 2016 1 次提交
  2. 03 6月, 2016 1 次提交
  3. 04 3月, 2016 1 次提交
  4. 01 12月, 2015 1 次提交
    • M
      of: Fix comparison of reserved memory regions · 9eb8cd2b
      Michael Ellerman 提交于
      In order to check for overlapping reserved memory regions, we first need
      to sort the array of memory regions. This is implemented using sort(),
      and a custom comparison function __rmem_cmp().
      
      Unfortunatley __rmem_cmp() doesn't work in all cases. Because the two
      base values are phys_addr_t, they may be u64 on some platforms, in which
      case subtracting one from the other and then (implicitly) casting to int
      does not give us the -ve/0/+ve value we need.
      
      This leads to incorrect reports about overlaps, eg:
      
        ibm,slw-image@1ffe600000 (0x0000001ffe600000--0x0000001ffe700000) overlaps with
        ibm,firmware-allocs-memory@1000000000 (0x0000001000000000--0x0000001000dc0200)
      
      Fix it by just doing the standard double if and return 0 logic.
      
      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>
      9eb8cd2b
  5. 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
  6. 18 9月, 2015 1 次提交
  7. 14 1月, 2015 1 次提交
  8. 30 10月, 2014 1 次提交
  9. 02 8月, 2014 1 次提交
  10. 21 5月, 2014 1 次提交
  11. 30 4月, 2014 1 次提交
  12. 12 3月, 2014 2 次提交
  13. 15 10月, 2013 1 次提交
  14. 10 9月, 2013 1 次提交
  15. 27 8月, 2013 1 次提交