1. 04 Oct, 2018 4 commits
  2. 02 Oct, 2018 9 commits
    • Rob Herring's avatar
      microblaze: enable building all dtbs · 92f687f4
      Rob Herring authored
      Enable the 'dtbs' target for microblaze. As microblaze only has one dts
      file, always enable it.
      
      Cc: Michal Simek <monstr@monstr.eu>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      92f687f4
    • Rob Herring's avatar
      c6x: enable building all dtbs · 626f92a0
      Rob Herring authored
      Enable the 'dtbs' target for c6x. This allows building all the dts
      files in arch/c6x/boot/dts/ for enabled platforms or when
      COMPILE_TEST and OF_ALL_DTBS are enabled.
      
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
      Cc: linux-c6x-dev@linux-c6x.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      626f92a0
    • Rob Herring's avatar
      powerpc: enable building all dtbs · 27e88af4
      Rob Herring authored
      Enable the 'dtbs' target for powerpc. This allows building all the dts
      files in arch/powerpc/boot/dts/ when COMPILE_TEST and OF_ALL_DTBS are
      enabled.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      27e88af4
    • Rob Herring's avatar
      kbuild: consolidate Devicetree dtb build rules · 37c8a5fa
      Rob Herring authored
      There is nothing arch specific about building dtb files other than their
      location under /arch/*/boot/dts/. Keeping each arch aligned is a pain.
      The dependencies and supported targets are all slightly different.
      Also, a cross-compiler for each arch is needed, but really the host
      compiler preprocessor is perfectly fine for building dtbs. Move the
      build rules to a common location and remove the arch specific ones. This
      is done in a single step to avoid warnings about overriding rules.
      
      The build dependencies had been a mixture of 'scripts' and/or 'prepare'.
      These pull in several dependencies some of which need a target compiler
      (specifically devicetable-offsets.h) and aren't needed to build dtbs.
      All that is really needed is dtc, so adjust the dependencies to only be
      dtc.
      
      This change enables support 'dtbs_install' on some arches which were
      missing the target.
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatarPaul Burton <paul.burton@mips.com>
      Acked-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
      Acked-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: linux-kbuild@vger.kernel.org
      Cc: linux-snps-arc@lists.infradead.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: uclinux-h8-devel@lists.sourceforge.jp
      Cc: linux-mips@linux-mips.org
      Cc: nios2-dev@lists.rocketboards.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-xtensa@linux-xtensa.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      37c8a5fa
    • Rob Herring's avatar
      c6x: use common built-in dtb support · be7cd2df
      Rob Herring authored
      Using the common build support for built-in dtb files just requires
      adding a .dtb.o target to obj-y.
      
      The dtb now needs to be copied when unflattened because an init section
      is used now.
      
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
      Cc: linux-c6x-dev@linux-c6x.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      be7cd2df
    • Rob Herring's avatar
      nios2: fix building all dtbs · a91c6145
      Rob Herring authored
      nios2 has a 'dtbs' target, but nothing is added to 'dtb-*' targets and
      no dtbs were getting built. This enables building all the dts files in
      arch/nios2/boot/dts/ when COMPILE_TEST and OF_ALL_DTBS are enabled.
      
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: nios2-dev@lists.rocketboards.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      a91c6145
    • Rob Herring's avatar
      nios2: use common rules to build built-in dtb · 1b4f9e2b
      Rob Herring authored
      Using the common build support for built-in dtb files just requires
      adding a .dtb.o target to obj-y.
      
      This has the side effect that CONFIG_NIOS2_DTB_SOURCE should now be just
      the dts filename in arch/nios2/boot/dts/ directory. Before any path was
      supported, but if you want to build in your dtb to the kernel, it should
      be in the kernel tree.
      
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: nios2-dev@lists.rocketboards.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      1b4f9e2b
    • Rob Herring's avatar
      nios2: build .dtb files in dts directory · 11886486
      Rob Herring authored
      Align nios2 with other architectures which build the dtb files in the
      same directory as the dts files. This is also in line with most other
      build targets which are located in the same directory as the source.
      This move will help enable the 'dtbs' target which builds all the dtbs
      regardless of kernel config.
      
      This transition could break some scripts if they expect dtb files in
      the old location.
      
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: nios2-dev@lists.rocketboards.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      11886486
    • Rob Herring's avatar
      powerpc: build .dtb files in dts directory · 1acf1cf8
      Rob Herring authored
      Align powerpc with other architectures which build the dtb files in the
      same directory as the dts files. This is also in line with most other
      build targets which are located in the same directory as the source.
      This move will help enable the 'dtbs' target which builds all the dtbs
      regardless of kernel config.
      
      This transition could break some scripts if they expect dtb files in the
      old location.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      1acf1cf8
  3. 28 Sep, 2018 26 commits
  4. 27 Sep, 2018 1 commit
    • Guenter Roeck's avatar
      of: unittest: Disable interrupt node tests for old world MAC systems · da08d8cb
      Guenter Roeck authored
      On systems with OF_IMAP_OLDWORLD_MAC set in of_irq_workarounds, the
      devicetree interrupt parsing code is different, causing unit tests of
      devicetree interrupt nodes to fail. Due to a bug in unittest code, which
      tries to dereference an uninitialized pointer, this results in a crash.
      
      OF: /testcase-data/phandle-tests/consumer-a: arguments longer than property
      Unable to handle kernel paging request for data at address 0x00bc616e
      Faulting instruction address: 0xc08e9468
      Oops: Kernel access of bad area, sig: 11 [#1]
      BE PREEMPT PowerMac
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.72-rc1-yocto-standard+ #1
      task: cf8e0000 task.stack: cf8da000
      NIP:  c08e9468 LR: c08ea5bc CTR: c08ea5ac
      REGS: cf8dbb50 TRAP: 0300   Not tainted  (4.14.72-rc1-yocto-standard+)
      MSR:  00001032 <ME,IR,DR,RI>  CR: 82004044  XER: 00000000
      DAR: 00bc616e DSISR: 40000000
      GPR00: c08ea5bc cf8dbc00 cf8e0000 c13ca517 c13ca517 c13ca8a0 00000066 00000002
      GPR08: 00000063 00bc614e c0b05865 000affff 82004048 00000000 c00047f0 00000000
      GPR16: c0a80000 c0a9cc34 c13ca517 c0ad1134 05ffffff 000affff c0b05860 c0abeef8
      GPR24: cecec278 cecec278 c0a8c4d0 c0a885e0 c13ca8a0 05ffffff c13ca8a0 c13ca517
      
      NIP [c08e9468] device_node_gen_full_name+0x30/0x15c
      LR [c08ea5bc] device_node_string+0x190/0x3c8
      Call Trace:
      [cf8dbc00] [c007f670] trace_hardirqs_on_caller+0x118/0x1fc (unreliable)
      [cf8dbc40] [c08ea5bc] device_node_string+0x190/0x3c8
      [cf8dbcb0] [c08eb794] pointer+0x25c/0x4d0
      [cf8dbd00] [c08ebcbc] vsnprintf+0x2b4/0x5ec
      [cf8dbd60] [c08ec00c] vscnprintf+0x18/0x48
      [cf8dbd70] [c008e268] vprintk_store+0x4c/0x22c
      [cf8dbda0] [c008ecac] vprintk_emit+0x94/0x130
      [cf8dbdd0] [c008ff54] printk+0x5c/0x6c
      [cf8dbe10] [c0b8ddd4] of_unittest+0x2220/0x26f8
      [cf8dbea0] [c0004434] do_one_initcall+0x4c/0x184
      [cf8dbf00] [c0b4534c] kernel_init_freeable+0x13c/0x1d8
      [cf8dbf30] [c0004814] kernel_init+0x24/0x118
      [cf8dbf40] [c0013398] ret_from_kernel_thread+0x5c/0x64
      
      The problem was observed when running a qemu test for the g3beige machine
      with devicetree unittests enabled.
      
      Disable interrupt node tests on affected systems to avoid both false
      unittest failures and the crash.
      
      With this patch in place, unittest on the affected system passes with
      the following message.
      
      	dt-test ### end of unittest - 144 passed, 0 failed
      
      Fixes: 53a42093 ("of: Add device tree selftests")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: default avatarFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      da08d8cb