From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C91AC5B578 for ; Thu, 4 Jul 2019 00:28:21 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD6EF2187F for ; Thu, 4 Jul 2019 00:28:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD6EF2187F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45fJjY5ZXJzDqYq for ; Thu, 4 Jul 2019 10:28:17 +1000 (AEST) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45fJgs37BjzDqXS for ; Thu, 4 Jul 2019 10:26:49 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45fJgr3SRDz9sNw; Thu, 4 Jul 2019 10:26:48 +1000 (AEST) From: Michael Ellerman To: Masahiro Yamada , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2] powerpc/boot: pass CONFIG options in a simpler and more robust way In-Reply-To: <1557756964-13087-1-git-send-email-yamada.masahiro@socionext.com> References: <1557756964-13087-1-git-send-email-yamada.masahiro@socionext.com> Date: Thu, 04 Jul 2019 10:26:48 +1000 Message-ID: <87v9wibq5z.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , linux-kernel@vger.kernel.org, Nicholas Piggin , Mark Greer , Masahiro Yamada , Oliver O'Halloran , Joel Stanley , Paul Mackerras Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Masahiro Yamada writes: > Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper") > was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures > with -j 1") was also wrong. > > The correct dependency is: > > $(obj)/serial.o: $(obj)/autoconf.h > > However, I do not see the reason why we need to copy autoconf.h to > arch/power/boot/. Nor do I see consistency in the way of passing > CONFIG options. > > decompress.c references CONFIG_KERNEL_GZIP and CONFIG_KERNEL_XZ, which > are passed via the command line. > > serial.c includes autoconf.h to reference a couple of CONFIG options, > but this is fragile because we often forget to include "autoconf.h" > from source files. > > In fact, it is already broken. > > ppc_asm.h references CONFIG_PPC_8xx, but utils.S is not given any way > to access CONFIG options. So, CONFIG_PPC_8xx is never defined here. > > Pass $(LINUXINCLUDE) to make sure CONFIG options are accessible from > all .c and .S files in arch/powerpc/boot/. This breaks our skiroot_defconfig, I don't know why yet: In file included from /kisskb/src/arch/powerpc/boot/../../../lib/decompress_unxz.c:236:0, from /kisskb/src/arch/powerpc/boot/decompress.c:42: /kisskb/src/arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c: In function 'bcj_powerpc': /kisskb/src/arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c:166:11: warning: implicit declaration of function 'get_unaligned_be32' [-Wimplicit-function-declaration] instr = get_unaligned_be32(buf + i); http://kisskb.ellerman.id.au/kisskb/buildresult/13862914/ cheers