From patchwork Mon Apr 16 14:47:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133470 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3653540ljb; Mon, 16 Apr 2018 07:49:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+bHDPI/rhODjZsnVL7nAXP5O5nKOa7z/KM70KxSFC4JreFsiepTchZP1AytswhgzQU65nI X-Received: by 2002:a17:902:7441:: with SMTP id e1-v6mr15627331plt.169.1523890181583; Mon, 16 Apr 2018 07:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890181; cv=none; d=google.com; s=arc-20160816; b=EK+/+QqOqOi6T63vOlkZVUx4OQnyATt4J8Om45brwGs52/anfCwKMmWWzgta9jjYio HK6DBzGvj8yBqnV9mLeMIbcH1lyBUA00tZ/Cmlx/oJ4zr18eJbkluarcjW0qXtdwoyvy q8k3z0M9aKkMYOoqr9bhbAdmREprftnjkWRpR8IjwpdqV3MFPeevWL8rEd+/E+MjfZrZ 7lOyOj2qeJZV770bSVX/4vIKr8HcVfVMd2QYc3hTI1zVkH8Nok13qkSgg0YWuAor4b67 nJ0G9Tp6NR1EvhN1fpnv7ZcwhTfqsqTFJP+uabTwaBNdWGf5vckkAY0iBT8D+yw//9Op rDWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=F06LX9b18Des9LUgr8HfK4zymALQVUMW+ZLKK7UOatg=; b=gWo5jzerfpynqViwxXH2A+FRbY4J80EOOtw0MZoQhjlK7wRk6P3T2mfCi7X0Qo5SN7 r8kgtXDYZW0U3+gxkCDgZHmpidDN8ifl01NcEccX/TC8qqlKslADyvKtbdSi4h8CTc2P XI9eYSWQMtKTZZSI/fapvHIeZcKEZcYyqqyatqh3zYj0/sN0ZPe0TA5fQdjIovYNUEwl zq/oe9VtWTXbcsMv5fGI2v7BLTFMtIYTxxhsouCjQPEGBxZ4S1iPosVfMjnvQU7S+iVW HzUoh04Tvsbk4xSSvOJqIwWlHQ43rBef4U8lysmvrcr2S0iKNRE7d2fRwVxDLeeuVcRb hdgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=wuE00ELC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si12202692pld.204.2018.04.16.07.49.41; Mon, 16 Apr 2018 07:49:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=wuE00ELC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940AbeDPOtI (ORCPT + 29 others); Mon, 16 Apr 2018 10:49:08 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:62379 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752821AbeDPOtF (ORCPT ); Mon, 16 Apr 2018 10:49:05 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w3GElqtp017749; Mon, 16 Apr 2018 23:47:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w3GElqtp017749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523890074; bh=F06LX9b18Des9LUgr8HfK4zymALQVUMW+ZLKK7UOatg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wuE00ELCJ4Jq9j2pFOCOyxtIFAEtjz8LQYqBN7fesk5oWkgDk276iZPffCgrtouN/ 0uhgHTtLVC/Hsfg07ijiOD+0SgGpU02YM/h0zO1Dlq7dhlIhH9w2/Qs5Q842u4i8g+ iuOqxvf2Y6jgLdCQnKjpYNynhGlmU4Lj+gByCqbcsvpvDXl7B718Dvx5HOqF6yU91k 17KLUnlY37iBF59LiarRkb6w3jGSx1I5n0Sn5PxRRmgsk6w/5QmvHGGvNR/LmrgSwP sromBbh/6QckuHfIyNCW4AFfIsc89IZI8yJ5Y1g5ryDK6p7O6zN99TqOZWyRpofR6L TyokVcnWCG3AA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Ralf Baechle , James Hogan , linux-mips@linux-mips.org Cc: Paul Burton , Masahiro Yamada , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 1/7] Revert "MIPS: boot: Define __ASSEMBLY__ for its.S build" Date: Mon, 16 Apr 2018 23:47:41 +0900 Message-Id: <1523890067-13641-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 0f9da844d87796ac31b04e81ee95e155e9043132. It is true that commit 0f9da844d877 ("MIPS: boot: Define __ASSEMBLY__ for its.S build") fixed the build error, but it should not have defined __ASSEMBLY__ just for textual substitution in arbitrary data. The file is image tree source in this case, but the purpose of using CPP is to replace some macros. I merged a better solution, commit a95b37e20db9 ("kbuild: get out of "). The original fix-up is no longer needed. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 1 - 1 file changed, 1 deletion(-) -- 2.7.4 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index c22da16..1bd5c4f 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -126,7 +126,6 @@ $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS quiet_cmd_cpp_its_S = ITS $@ cmd_cpp_its_S = $(CPP) $(cpp_flags) -P -C -o $@ $< \ - -D__ASSEMBLY__ \ -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \ -DVMLINUX_BINARY="\"$(3)\"" \ -DVMLINUX_COMPRESSION="\"$(2)\"" \ From patchwork Mon Apr 16 14:47:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133467 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3653089ljb; Mon, 16 Apr 2018 07:49:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+lochRvqjCpxk2K11TpPElCoKD6Uagcx7df1686zjI7RLWwmxxK/rSOvSrAnaNHmV54ERA X-Received: by 2002:a17:902:7841:: with SMTP id e1-v6mr15926705pln.197.1523890146721; Mon, 16 Apr 2018 07:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890146; cv=none; d=google.com; s=arc-20160816; b=lCNwaNtfRkJ3YzikZKbV43zVESvTmip0lwwVw5hbZQYu+1EKugcBtz4xHkPWZMO3AM PUcNsJGgE4v1XxFs9j/cMIOUYRyLWJXogHrbL5fC9MaMQ+EORTUL1d+JznUz+S5U0wq7 RnVjmk8xjNxj1Q6xM0ePxmNBFCDMx+okOgBHm5NIisVE+5Dt2Nr3jYHAGUfDGJAwcn7M ZhHTSJjO/aWRhfY7CgFWBd0dsoczEzs6wLjv5nSv3OUb5fti+AcX1quEH3GazC6r7ZtZ CUbG+nWgxLwIaUsGEXbwUQGSp1b8fcKT+/PDzeXDBrNdub5xYB6Bz0jC+uovDI/tETt7 OHoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=oI55uYqr0ZldDMV7KaPiWVBquuUvS9m0s8FRGZ8XxEI=; b=TlERUnT6Q1/NW4seyscts2KTpjh94DVIYdk4/InqJpOcqWBeboTr9+4kiwMo0Zl7bk jN1YN8qvuAGUb+r143xTKLq2iCqGM7PBSvXB3TXmOoPkbEMX54BX3KelNF8Wt86nMBqX rv8w8vko79Nqlu5K1wxuHedtpHuuyTt7HpLpMTA8QTLE7uWiD94P+/N6moyUSxbilw2r BYUUfmzBCpARqdfpt4xKr9lr1LeZVNCPA4IATMvN5hPjsgnGDuimLM4jPqtJfRg/0ki6 bbefqCm3xfE3+pcgn7vZEgNDlPLwbfN5ddGSSXdfA+OKO4DvsAkkFgRQuubF8g8fcg6r dK8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=EyVhZFQL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si2897499pgv.372.2018.04.16.07.49.06; Mon, 16 Apr 2018 07:49:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=EyVhZFQL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752914AbeDPOtD (ORCPT + 29 others); Mon, 16 Apr 2018 10:49:03 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:62199 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbeDPOs5 (ORCPT ); Mon, 16 Apr 2018 10:48:57 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w3GElqtq017749; Mon, 16 Apr 2018 23:47:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w3GElqtq017749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523890075; bh=oI55uYqr0ZldDMV7KaPiWVBquuUvS9m0s8FRGZ8XxEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EyVhZFQLQhRcd8nv4DsNv6J/PJYXgC7zJ5niPh4Cw7btqwwvrshzz6NcgFbzmdQ5L rReyBooEFv+7DM4fT7WfrLqHa/OpdNb3u0UfEyyAj1xa6RW62zIZUOU5bWBQclQ1jG eM8bHXMaKcnrWVZY0ekg4Hn4Q/4FVRqj6/YaBy5JOy9eVs2YRfLi1jl1724eOvjOw5 5gRDnTFyphOhh9PPEBd4DXmAK27OLALSNWKx1gKxkmoAwycOExhtNF2rFsVxEet1X/ DLUC+SziiHeE49pXrP3TbpeKRNn9qmD9CVw7TfWmkeR4EqjiC+MGhRfg3GOpwP9g7D Pi/r5pBqpcpkA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Ralf Baechle , James Hogan , linux-mips@linux-mips.org Cc: Paul Burton , Masahiro Yamada , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 2/7] MIPS: boot: do not include $(cpp_flags) for preprocessing ITS Date: Mon, 16 Apr 2018 23:47:42 +0900 Message-Id: <1523890067-13641-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org $(CPP) is used here to perform macro replacement in ITS. Do not pass $(cpp_flags) because it pulls in more options for dependency file generation etc. but none of which is necessary here. ITS files do not include any header file, so $(call if_change,...) is enough. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 1bd5c4f..981bcf8 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -125,7 +125,7 @@ $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS $(call if_changed,its_cat) quiet_cmd_cpp_its_S = ITS $@ - cmd_cpp_its_S = $(CPP) $(cpp_flags) -P -C -o $@ $< \ + cmd_cpp_its_S = $(CPP) -P -C -o $@ $< \ -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \ -DVMLINUX_BINARY="\"$(3)\"" \ -DVMLINUX_COMPRESSION="\"$(2)\"" \ @@ -135,19 +135,19 @@ quiet_cmd_cpp_its_S = ITS $@ -DADDR_CELLS=$(itb_addr_cells) $(obj)/vmlinux.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE - $(call if_changed_dep,cpp_its_S,none,vmlinux.bin) + $(call if_changed,cpp_its_S,none,vmlinux.bin) $(obj)/vmlinux.gz.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE - $(call if_changed_dep,cpp_its_S,gzip,vmlinux.bin.gz) + $(call if_changed,cpp_its_S,gzip,vmlinux.bin.gz) $(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE - $(call if_changed_dep,cpp_its_S,bzip2,vmlinux.bin.bz2) + $(call if_changed,cpp_its_S,bzip2,vmlinux.bin.bz2) $(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE - $(call if_changed_dep,cpp_its_S,lzma,vmlinux.bin.lzma) + $(call if_changed,cpp_its_S,lzma,vmlinux.bin.lzma) $(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE - $(call if_changed_dep,cpp_its_S,lzo,vmlinux.bin.lzo) + $(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo) quiet_cmd_itb-image = ITB $@ cmd_itb-image = \ From patchwork Mon Apr 16 14:47:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133469 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3653407ljb; Mon, 16 Apr 2018 07:49:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ZtiYC1hW5hyfPCGz5VpVWau0++0fLzEfVD8+nCnmtpup2bfdVjkWINS0lEBsoyGroBKCq X-Received: by 10.99.9.66 with SMTP id 63mr11217531pgj.103.1523890169839; Mon, 16 Apr 2018 07:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890169; cv=none; d=google.com; s=arc-20160816; b=VL0QBPN2hEsVCz+UUN51dK/sFpRZ6sqiJ4KU9/LBUr5vWTngiN7dcSlfRDpqtIVq0T 8sZu2DDCcTlShHY9jH5zCYSf751ofWuKsPHxgYVoar2r3vh8CZHcXAeDMW7+ZC3xXuYd VSIeJR+tGatCaASxRU5W2e7UN+nay7unKQ/KyUIXvK9D7omC59UY2YZ+D3U623W+Ix3b qm5/9nUFr0M1BOZ7XmwqWZbtazgMYepfDfxjZF9tsmETNUtUVi9FDf+5kYhpy4OxyYes RocOPKHZYOy1jBrjGcNZ/MFBb8VZH3Q8Dmc99wkrzWcF2Qs9zfQ9SrGCe4PY/szh0xGP D4Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=A1Gn6EVXs/augMnXta7rJ5tKBPekzAV8iaSCKb3cg08=; b=fh+aX91ODUhdwUGdXh9q7l8+ntTjXr68YHHXzKcB1bl3WQECjbKXXqkHA49NuDgu4X JefQpWgA9qMSppk+k08xIlvhdqya09jZYAehU2DzSjVIqDhE4bRTyBmf7ExoGjdGebvh ZSngD7o4nzTydJfGFIFjWP3z3hUcLg6qsol+xXbHRNexqz/q+6r0TQj8wKR5pBQtKcg2 I1v2/XS+jtSkSH7vuDYWVwRUEkqUizSvsy5IMyIs6gKFE+gAknFibWP+R0JpU4ckaUQv SYyG/sMFIBALFbsp0W6wCeR2c+B7eOCtASsHJgSsoetz7cgRSgLsrPtDG+TfdOa1dwWo Yq/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MdU+HiMl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t73si11034425pfg.114.2018.04.16.07.49.29; Mon, 16 Apr 2018 07:49:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MdU+HiMl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbeDPOtJ (ORCPT + 29 others); Mon, 16 Apr 2018 10:49:09 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:62390 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbeDPOtF (ORCPT ); Mon, 16 Apr 2018 10:49:05 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w3GElqtr017749; Mon, 16 Apr 2018 23:47:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w3GElqtr017749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523890076; bh=A1Gn6EVXs/augMnXta7rJ5tKBPekzAV8iaSCKb3cg08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MdU+HiMlCj6q23aOrwjSN5m83qSRsbVxxa2eTPxmgafncUeyJtsC8vcLtXgN6ro8J GpRrMKZHuPMlngUwBoBkOuVeMwST5lnrUYtz4mltYq24297N6wxyvcHBLVm4mMV/Yn 6Wmn9K3XMcUz6KqXrxcRGM9u+Yvm/MQgvFhm/ulMNeiq53xmtppOZeHILMwZGbmbdD bPijsj76/PhmIrKzWGYTkFnrN5dd6PLZhtiTw5094FFh3zrUjFM9q/wDwvABs6DmGj m6/46Y3hlVFOJUbYNCe2+MG3I8d26iihrTl27wdpSiBvq4FN/eSjCK/xgUYd/OMOl1 saWDU9ah7XL3A== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Ralf Baechle , James Hogan , linux-mips@linux-mips.org Cc: Paul Burton , Masahiro Yamada , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 3/7] MIPS: boot: fix build rule of vmlinux.its.S Date: Mon, 16 Apr 2018 23:47:43 +0900 Message-Id: <1523890067-13641-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As Documentation/kbuild/makefile.txt says, it is a typical mistake to forget the FORCE prerequisite for the rule invoked by if_changed. Add the FORCE to the prerequisite, but it must be filtered-out from the files passed to the 'cat' command. Because this rule generates .vmlinux.its.S.cmd, vmlinux.its.S must be specified as targets so that the .cmd file is included. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 981bcf8..6c7054e 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -118,10 +118,12 @@ ifeq ($(ADDR_BITS),64) itb_addr_cells = 2 endif +targets += vmlinux.its.S + quiet_cmd_its_cat = CAT $@ - cmd_its_cat = cat $^ >$@ + cmd_its_cat = cat $(filter-out $(PHONY), $^) >$@ -$(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) +$(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE $(call if_changed,its_cat) quiet_cmd_cpp_its_S = ITS $@ From patchwork Mon Apr 16 14:47:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133472 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3654718ljb; Mon, 16 Apr 2018 07:50:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/0X0oH36hXDUHibDN4sqCSwXMEh4kc59VUePBNY8FjoNs09W8sZnWpY3spwK/+NA6TkUQI X-Received: by 10.98.138.205 with SMTP id o74mr22084871pfk.114.1523890255416; Mon, 16 Apr 2018 07:50:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890255; cv=none; d=google.com; s=arc-20160816; b=in7iJL5zNr3Yv4D2vQZohqcBU8OdCXVAN71RbYvIfqQ47J5HBkDE24jryTukgyQwB4 3yvNWG4nwYpUcZ2XbFC6d9pu5f8v+ozyxr4H0UT+HEanQ2bsCyaYsCfRxsmdfArvB2nE yvMfLh3W9+uUveO5CtzQ99kZuSjWUm3ca1Z1d21fITx9YJCqvCSzJ+/9Xrm9sRCWjHm1 CGttzryjBFGgzP7CDnRPSjZHK72wSoSTJjG8Z6i9uqtDj7QWfKc0Iv6ak9D6VNu6Iwza x77YxjkPJBpixuNjdjCvjXS6W6yqPERDCeC6S3eVmGrwZYclpPfQhqzhRdwV3Ri522T2 7h7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=pI9UFcmEN1R83QisQeFG7TZ4AKIPXzdBpHWLiqIFT/U=; b=QoOMYWF1ljfIf97VI+mxNTIs0Iyvh7JMMqi23MEQhFWeIKMUly0v8+y7WYY6IU0aaa xRAehvoZjNp88HiRzj5YX3AN3Vnk6TCfNJ9Wtq/4Y+kTzK6U8nxfNyLc5lAa45las8cv E9QIOKUd+gahVEN9FB3t7ezQC81Ym7g/7ZKbWvvyqQzJKDFWS/u883W3I0QGmLNK45xq CuF8iFh00YMe/71tVIK0fCPB3Tl0D0+udWT7nrUUa2G8ijg4BGwi9qVUMAsGMMypy7e+ mqlN8RllaG9N6RID5KYVRZZmOU8XL6uE4Go7H1c+sRvPPucmP6jmLUMRhSw+RCGujA0F IN8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zpwxI8tD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si1565612pgf.293.2018.04.16.07.50.55; Mon, 16 Apr 2018 07:50:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zpwxI8tD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074AbeDPOuw (ORCPT + 29 others); Mon, 16 Apr 2018 10:50:52 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:64268 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbeDPOur (ORCPT ); Mon, 16 Apr 2018 10:50:47 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w3GElqts017749; Mon, 16 Apr 2018 23:47:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w3GElqts017749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523890077; bh=pI9UFcmEN1R83QisQeFG7TZ4AKIPXzdBpHWLiqIFT/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zpwxI8tDLFYG5ihckdZl2aPTqTXlegvMuFh0DNcyRMKMDIPOKtX7S5EkSCwjXNcOU OFn3fFnqqcbmCiE5jCe9/D4piEe3nF1wte8ZAL5uOlg9uxMnvZG+cTNel22A0I3nmw Z3nssVa3mv28pw7hFb4lCzfcUJ2/7bxFN+0QBJ/J+/HVqK1j5oVvdaus3sA1hAZ5+l JXV9vCzW+TArNkVi1Y8D4Ujv/hWMRZZNsRDn2/UfJOW/wmg61FJs5wVbB6f/2VFFiV HYi/mSW1P5hWgY9Zn3+asjPRJFMSlrnqfSbsQTi0y/b4lp2ECVycsYVs/r1WwSQwTa WI3h97lhMz6ng== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Ralf Baechle , James Hogan , linux-mips@linux-mips.org Cc: Paul Burton , Masahiro Yamada , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 4/7] MIPS: boot: correct prerequisite image of vmlinux.*.its Date: Mon, 16 Apr 2018 23:47:44 +0900 Message-Id: <1523890067-13641-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vmlinux.*.its does not directly depend on $(VMLINUX) but vmlinux.bin.* Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 6c7054e..30512ab 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -136,19 +136,19 @@ quiet_cmd_cpp_its_S = ITS $@ -DADDR_BITS=$(ADDR_BITS) \ -DADDR_CELLS=$(itb_addr_cells) -$(obj)/vmlinux.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE +$(obj)/vmlinux.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin FORCE $(call if_changed,cpp_its_S,none,vmlinux.bin) -$(obj)/vmlinux.gz.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE +$(obj)/vmlinux.gz.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.gz FORCE $(call if_changed,cpp_its_S,gzip,vmlinux.bin.gz) -$(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE +$(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.bz2 FORCE $(call if_changed,cpp_its_S,bzip2,vmlinux.bin.bz2) -$(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE +$(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.lzma FORCE $(call if_changed,cpp_its_S,lzma,vmlinux.bin.lzma) -$(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE +$(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.lzo FORCE $(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo) quiet_cmd_itb-image = ITB $@ From patchwork Mon Apr 16 14:47:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133471 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3654014ljb; Mon, 16 Apr 2018 07:50:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx48/UZhvbEyMNKng+ZsJMVBodbpJhp1gkLSL7xKRwep542t1vmy0L7ncY0B3KpOD6gz2HoOU X-Received: by 10.99.109.139 with SMTP id i133mr9865372pgc.268.1523890213036; Mon, 16 Apr 2018 07:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890213; cv=none; d=google.com; s=arc-20160816; b=nhMF7mZv5jEa4Nz1/YYv3iCAq1AKT463fsTSJGvXF8PUYhZPruwBQvq0NbX0VY2bUf sZIQtR7CB1Af8Ey/WarSDFcXPFKCXMoFaQEDK1lSNtzcQhIRHs+2qgMXvS3GAUZt/Wfh n+bp6wJZYOGInnN6lV8FS//cPOXz1sCbSAwN3X/LsAtAwagQZtOQaPi9vSI1dGLSNSeQ GHpM19bGHBtXKC2W8eFRjIyyAsn9FAMxfu4azW48ddl+6kru6dVwnImtQN1XujLFRA05 cdBvKLEN0vVtURMAT4tq3kff74DvrsBFOs/8qB75kKjU/feaqo6TS75IGVierKYoU/Hn NKbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=+LIyBHl6CDpAxuRA2zGVM6UGQysWvPHTC6AVTENRJJs=; b=0toEWUH/GLjcUaJ6ksU2VlSSEX8pD5+E3lM9SCXIxof6RNIOEGkVJz04SczH9VZtv7 uL/yxxYQLMZHBiHlk5i5p3qc6IsCQnQ2T8k3SuxOKGQyeNuYXD5w04lA4/Dy/4mU/HrP Dj85WN8giJHwQi5GnjWPxjH+vysaCB0EEbA73DniLmpSIlbyTuUxaSy5Qho239m9xnNV r25vjZOKrS1gi7vDai+mAUxCG6eEoWQOn5oM/ODcdNxCIbqJLOKbRdCoZwsbdxO8l6oU Is/rNgNxncMLrt0+0b2Mh3N6IPcMIGgocskm7mJkfHeALsO+lq/iOvbJOh90xOEodvln Tx6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=v0+wRhKS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6-v6si1693771plp.18.2018.04.16.07.50.12; Mon, 16 Apr 2018 07:50:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=v0+wRhKS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752829AbeDPOtA (ORCPT + 29 others); Mon, 16 Apr 2018 10:49:00 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:62200 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751169AbeDPOs5 (ORCPT ); Mon, 16 Apr 2018 10:48:57 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w3GElqtt017749; Mon, 16 Apr 2018 23:47:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w3GElqtt017749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523890078; bh=+LIyBHl6CDpAxuRA2zGVM6UGQysWvPHTC6AVTENRJJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v0+wRhKS+OhyYM9HgB0UfOyMVEYxQPupgZ1QcODlN/OMXgPE+NcpJVHCPmFwugLAp tArJIyRzTLp8u7jRgPEZS7hAbBXzxcO+0M78V0QCgr+i00dRm29ln35ccAEI/54mqf U3GGI9ax8QUZHnA0L6urb/l4g7tXHVRUKgFeiV8OMbLjVnb1x4U4EaOcOE5bW68n2R 8kuDg83g1P9uQTMZIyJTl6lqjnXnVv33MS7VmADIn2VNzPH4X3OvKk3yGbZvj4a4iI 1H+H5M9CvHESUmSXI2Zarimw1roLPWjrnj0tldBI0oKOskwLSak6T+0S0WjmbzMAYf mfLR0QMzVMXcw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Ralf Baechle , James Hogan , linux-mips@linux-mips.org Cc: Paul Burton , Masahiro Yamada , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 5/7] MIPS: boot: add missing targets for vmlinux.*.its Date: Mon, 16 Apr 2018 23:47:45 +0900 Message-Id: <1523890067-13641-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The build rule of vmlinux.*.its is invoked by $(call if_changed,...) but it always rebuilds the target needlessly due to missing targets. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.7.4 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 30512ab..91d9fe8 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -126,6 +126,12 @@ quiet_cmd_its_cat = CAT $@ $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE $(call if_changed,its_cat) +targets += vmlinux.its +targets += vmlinux.gz.its +targets += vmlinux.bz2.its +targets += vmlinux.lzmo.its +targets += vmlinux.lzo.its + quiet_cmd_cpp_its_S = ITS $@ cmd_cpp_its_S = $(CPP) -P -C -o $@ $< \ -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \ From patchwork Mon Apr 16 14:47:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133468 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3653158ljb; Mon, 16 Apr 2018 07:49:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx48cPOO40LD8GXHzvHl/uItDR1ZY22EI3RL9HFLn26PhR1F7IpeRGcGXHMZ1PCnKrrEAe9HM X-Received: by 10.98.246.25 with SMTP id x25mr21933894pfh.138.1523890154292; Mon, 16 Apr 2018 07:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890154; cv=none; d=google.com; s=arc-20160816; b=ffguOrHujCx+ut6TPsa8oyCsdRYNBt1stIUo0lLm/BPYLD2rTCGe8vsVpv0PfANNRj XHP4Z2O2cOGeOhRvdNs2zFWntdVxBUZHzbcIXhqs8/8+eg1fGPiAlAMz/QcVjvf5GWm5 d3jvp0/BtxdJlocC2EkgLLs6NdeWkrDV1/ekq465pqGHjzKUXGFQ5gr78BdVzaq7uv6O /pnBMVyaPdql7p8di+ASkLbYHWyUqx2DeMf2SL1BE3VEn88NtaQZ7Ly6KyAPT7p3FMRK ionOEF1CWF1uAbSfzNJWFYytmX7LEqLfd6mfYKpoET05ConAvCEvp9Ukvt5vey5CcyVU rcVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=AL+AYw4+X1BQcUmTpdgvByIJRIFE7yRBsMSNpOqkwEQ=; b=a8b6Gcy52SY5bZi07YR7nof5Dz1W/PLVLEmhLxequ2EBkl+0Ivo4eKwpSBaSfvh32s ewxrOONXC0GHjh6N9uyUEAseArmzqjwFe3bmCIJmPSIieY2FNSfpoDMJ8P5wSJSfJqYN wyG//uiP3YyJaFf/CmEGhcxKx2EGzGjBt72G8zJ0qNOzBdqeCG4woy+kCHQetaNW7Y2L KwSkzYfKWlb7uGvzioC7nmrvQM4cOhg8UZjzKvnGjfinuSG3BZ0vuuijvgaxlRLJJSVo v9Sw6jg2xlkVpYW7lqTz7zcoGDYwBACt27F4m7ZznXf4WvGPL3q2AFhL69VpD//oTgon vJ4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=u5BxkN4k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si2897499pgv.372.2018.04.16.07.49.13; Mon, 16 Apr 2018 07:49:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=u5BxkN4k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753006AbeDPOtL (ORCPT + 29 others); Mon, 16 Apr 2018 10:49:11 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:62357 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752736AbeDPOtF (ORCPT ); Mon, 16 Apr 2018 10:49:05 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w3GElqtu017749; Mon, 16 Apr 2018 23:47:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w3GElqtu017749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523890079; bh=AL+AYw4+X1BQcUmTpdgvByIJRIFE7yRBsMSNpOqkwEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u5BxkN4kzTtJ+DX+AcGYz6ix1UGYTl3pizjODDgPfmJ8BK/zBrYho7kfUHhkJuakf NUfWnzRJIcdVA3sgN7ThdCZVS08hKJwsmihMpIYl15hNi76Uuh8ubfbBL1H7U84065 lndyVZ1rLeyYgMwqLmmkuuDMsR3A62a5/SMF/+9LDFswrzcBfEultjSv8HefbCKByt uOCUtoifR1Yyc3Lhnze8zZbkuY8HlkQe9RMurtHDcGv9vux4PAdwM4jTjLC+EZGVeo tu0cIGaIWL9BNfl2mtnHtC2lUha++d/Odyyuo3tMO4zKnK4QvsMyVlSWv46qkwD9nX yqRQC+DbfaeDw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Ralf Baechle , James Hogan , linux-mips@linux-mips.org Cc: Paul Burton , Masahiro Yamada , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 6/7] MIPS: boot: merge build rules of vmlinux.*.itb by using pattern rule Date: Mon, 16 Apr 2018 23:47:46 +0900 Message-Id: <1523890067-13641-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Merge the build rule of vmlinux.{gz,bz2,lzma,lzo}.itb, and also move 'targets' close to the related code. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) -- 2.7.4 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 91d9fe8..d102d53 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -105,12 +105,6 @@ $(obj)/uImage: $(obj)/uImage.$(suffix-y) # Flattened Image Tree (.itb) images # -targets += vmlinux.itb -targets += vmlinux.gz.itb -targets += vmlinux.bz2.itb -targets += vmlinux.lzma.itb -targets += vmlinux.lzo.itb - ifeq ($(ADDR_BITS),32) itb_addr_cells = 1 endif @@ -157,6 +151,12 @@ $(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.lzma FORCE $(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(obj)/vmlinux.bin.lzo FORCE $(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo) +targets += vmlinux.itb +targets += vmlinux.gz.itb +targets += vmlinux.bz2.itb +targets += vmlinux.lzma.itb +targets += vmlinux.lzo.itb + quiet_cmd_itb-image = ITB $@ cmd_itb-image = \ env PATH="$(objtree)/scripts/dtc:$(PATH)" \ @@ -169,14 +169,5 @@ quiet_cmd_itb-image = ITB $@ $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE $(call if_changed,itb-image,$<) -$(obj)/vmlinux.gz.itb: $(obj)/vmlinux.gz.its $(obj)/vmlinux.bin.gz FORCE - $(call if_changed,itb-image,$<) - -$(obj)/vmlinux.bz2.itb: $(obj)/vmlinux.bz2.its $(obj)/vmlinux.bin.bz2 FORCE - $(call if_changed,itb-image,$<) - -$(obj)/vmlinux.lzma.itb: $(obj)/vmlinux.lzma.its $(obj)/vmlinux.bin.lzma FORCE - $(call if_changed,itb-image,$<) - -$(obj)/vmlinux.lzo.itb: $(obj)/vmlinux.lzo.its $(obj)/vmlinux.bin.lzo FORCE +$(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE $(call if_changed,itb-image,$<) From patchwork Mon Apr 16 14:47:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133473 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3656540ljb; Mon, 16 Apr 2018 07:52:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx49oxEg+PNLaHg60vsVuQ3DVdK1dAWoYhY4/ToplD/lkvsbcc5wBJw9wOJMXklPYqRxnaUbi X-Received: by 2002:a17:902:10c:: with SMTP id 12-v6mr7852189plb.252.1523890365953; Mon, 16 Apr 2018 07:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523890365; cv=none; d=google.com; s=arc-20160816; b=h77Md21llxGSNrNBnJJEVB9drdF98CHzgjxEvHz3Tj70g26YSbeRICZ4P1N23J5sH/ tn9D74MsqP3miqL04WzkaojZMh4piQ3mE9EgeK51eQEx1h8i5bVty+S3OTeRzpO93g7B j92wDEX9PQYipLUyo9hl4Vq3fxQdevjf/3L6PmOQbLVWaucmVAEzGDKfkd9/hWPNPSsz fyQMs+Yu1JI9UPny9SJXMNknaKz5uReRxhkAIYu9ESnoQSJIxmYmC9e05WjIG17Cy8Km JNfpYAVQ6Hp0Qah/+e8HcNUWBXFeEo8r2ggq1coCGc8bRg+6gYkmYBFjLLywgDmB7X0R DUvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=CYPFusBhS8V9N+DmVeG5V++6ZLl4j07EeJcsetbKx8Q=; b=Dgw058T5/RmfOOVcCP32NI+YIsk4/C1x9Du3yA3cEZcVDaYMVRJ2dDNYcVRP+AFXdp xJxPn5TY8IzLM+k/w82gjqvR5bvIuJsrx83HbobK6CynaqSdcGW49mZSD936jM1oIRCw PGt6wE8SH/FXvLz8u+MZMuzsXXi5AuGCxpluMSucaS2M8BL1tJdfq2SZ7oAQ0pLqWNMB t6YCsLy0nrNMsdqjrAUwtLC9fMmV2+Z8m9Hrdz2RgryVnVSpfVKdXOltGs1ZI7vdfZbM GOlSqENLki3ql4alX2YUce6RcEVMoP/93riJ3r20qk+F7ak8p+9A3eBB2AtMqans5xMG Kzrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=lWKM97y9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si9216653pgc.463.2018.04.16.07.52.45; Mon, 16 Apr 2018 07:52:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=lWKM97y9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbeDPOs7 (ORCPT + 29 others); Mon, 16 Apr 2018 10:48:59 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:62201 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbeDPOs5 (ORCPT ); Mon, 16 Apr 2018 10:48:57 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w3GElqtv017749; Mon, 16 Apr 2018 23:47:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w3GElqtv017749 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523890080; bh=CYPFusBhS8V9N+DmVeG5V++6ZLl4j07EeJcsetbKx8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lWKM97y9xEuDDb1MqFSJF3B7dcmRaP0rmx2WKjAWIJb3aRiX+qz6H5TPwbXXICQF8 njpMNCAa6i3VyEbPqbkhfGcQ/TAWz+78i3sJ9RhnhBtdOC7YmUfhF1G+tTsfRFvY6q zocHwbACaVSbuiQMnsvH2L0kfQcAuvc9bXn2v3ozYY+AArdHt4EZLmMxGOloWV9jty 2c5cFOF5TMqNSjbGWgTYDqzSIoNaxrw+EMW4NvDOOD1ecHu073r3X8tLN2ksjRh2Ph 6NmTNX121chIYyFBnLwmwl7fxMulkuyfr/8wGTQsB9nFmzdq4ytZNyDAlkY5X4GzCv Ir6wr2FdpAxnQ== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Ralf Baechle , James Hogan , linux-mips@linux-mips.org Cc: Paul Burton , Masahiro Yamada , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH 7/7] MIPS: boot: rebuild ITB when contained DTB is updated Date: Mon, 16 Apr 2018 23:47:47 +0900 Message-Id: <1523890067-13641-8-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since now, the unnecessary rebuild of ITB has been fixed. Another problem to be taken care of is, missed rebuild of ITB. For example, board-boston.its.S includes boston.dtb by the /incbin/ directive. If boston.dtb is updated, vmlinux.*.dtb must be rebuilt. Currently, the dependency between ITB and contained DTB files is not described anywhere. Previously, this problem was hidden since vmlinux.*.itb was always rebuilt even if nothing is updated. By fixing the spurious rebuild, this is a real problem now. Use the same strategy for automatic generation of the header file dependency. DTC works as a backend of mkimage, and DTC supports -d option. It outputs the dependencies, including binary files pulled by the /incbin/ directive. The implementation is simpler than cmd_dtc in scripts/Makefile.lib since we do not need CPP here. Just pass -d $(depfile) to DTC, and let the resulted $(depfile) processed by fixdep. It might be unclear why "$(obj)/dts/%.dtb: ;" is needed. With this commit, *.cmd files will contain dependency on DTB files. In the next invocation of build, the *.cmd files will be included, then Make will try to find a rule to update *.dtb files. Unfortunately, it is found in scripts/Makefile.lib. The build rule of $(obj)/%.dtb is invoked by if_changed_dep, so it needs to include *.cmd files of DTB, but they are not included because we are in arch/mips/boot, but those *.cmd files reside in arch/mips/boot/dts/*/. Cancel the pattern rule in scripts/Makefile.lib to suppress unneeded rebuilding of DTB. Signed-off-by: Masahiro Yamada --- arch/mips/boot/Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index d102d53..f8dce5b 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -163,11 +163,18 @@ quiet_cmd_itb-image = ITB $@ $(CONFIG_SHELL) $(MKIMAGE) \ -D "-I dts -O dtb -p 500 \ --include $(objtree)/arch/mips \ - --warning no-unit_address_vs_reg" \ + --warning no-unit_address_vs_reg \ + -d $(depfile)" \ -f $(2) $@ $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE - $(call if_changed,itb-image,$<) + $(call if_changed_dep,itb-image,$<) $(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE - $(call if_changed,itb-image,$<) + $(call if_changed_dep,itb-image,$<) + +# The -d option of DTC outputs dependencies of binaries included by the +# /incbin/ directive. When .*.cmd files are included, Kbuild tries to +# update *.dtb because it sees a pattern rule defined in scripts/Makefile.lib. +# The rule must be cancelled by a more specific rule. +$(obj)/dts/%.dtb: ;