1. 19 5月, 2016 2 次提交
    • G
      drivers/of: Fix build warning in populate_node() · dddc33e5
      Gavin Shan 提交于
      Function populate_node() is used to unflatten FDT blob to device
      tree. It supports maximal 64 level of device nodes. There is one
      array @fpsizes[64] tracking the full name length of last unflattened
      device node in the corresponding level (index of element in the
      array - 1). Build warning is seen with CONFIG_FRAME_WARN=1024 like
      below on ARM64 as Geert reported. The issue can be reproduced on
      PPC64 as well.
      
        $ make drivers/of/fdt.o
        drivers/of/fdt.c:443:1: warning: the frame size of 1136 bytes is \
        larger than 1024 bytes [-Wframe-larger-than=]
      
      This changes the data type of @fpsizes[i] from "unsigned long" to
      "unsigned int" to avoid the build warning. The return value type
      of populate_node() and its @fpsize argument is adjusted accordingly.
      With this applied, 256 bytes saved from the stack frame on ARM64 and
      PPC64 platforms and the above warning isn't seen.
      
      Fixes: 50800082 ("drivers/of: Avoid recursively calling unflatten_dt_node()")
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      dddc33e5
    • R
      drivers/of: Fix depth when unflattening devicetree · 78c44d91
      Rhyland Klein 提交于
      When the implementation for unflatten_dt_node() changed from being
      recursive to being non-recursive, it had a side effect of increasing the
      depth passed to fdt_next_node() by 1. This is fine most of the time, but
      it seems that when the end of the dtb is being parsed, it will cause the
      FDT_END condition in fdt_next_node() to return a different value
      (returning nextoffset instead of -FDT_ERR_NOTFOUND). This ends up passing
      an FDT_ERR_TRUNCATED error back to the unflatten_dt_node() which then
      sees that and complains "Error -8 processing FDT" causing boot to fail.
      
      This patch simply avoids incrementing depth and uses modified accesses
      for local array indices so that the depth is the same as it was before
      the change as far as fdt_next_node() is concerned.
      
      This problem was discovered trying to boot Tegra210-Smaug platforms.
      
      Fixes: 50800082 ("drivers/of: Avoid recursively calling unflatten_dt_node()")
      Signed-off-by: NRhyland Klein <rklein@nvidia.com>
      [robh: squashed in KASAN fix from Rhyland]
      Signed-off-by: NRob Herring <robh@kernel.org>
      78c44d91
  2. 16 5月, 2016 7 次提交
  3. 02 5月, 2016 1 次提交
    • A
      of: include errno.h in of_graph.h · 011d6f5c
      Arnd Bergmann 提交于
      When CONFIG_OF is disabled, we have to include linux/errno.h before
      including of_graph.h, or get build errors like in the newly added
      sun4i drm driver:
      
      In file included from ../drivers/gpu/drm/sun4i/sun4i_drv.c:14:0:
      include/linux/of_graph.h: In function 'of_graph_parse_endpoint':
      include/linux/of_graph.h:58:10: error: 'ENOSYS' undeclared (first use in this function)
      
      A better solution is to ensure that the header can be included
      by itself, so let's include linux/errno.h here to fix the error
      we just got, and any similar future error.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 9026e0d1 ("drm: Add Allwinner A10 Display Engine support")
      Signed-off-by: NRob Herring <robh@kernel.org>
      011d6f5c
  4. 25 4月, 2016 21 次提交
  5. 20 4月, 2016 9 次提交
新手
引导
客服 返回
顶部