From patchwork Fri Jun 9 08:29:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9777493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 461D160393 for ; Fri, 9 Jun 2017 08:31:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32F6C285E7 for ; Fri, 9 Jun 2017 08:31:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27689285EB; Fri, 9 Jun 2017 08:31:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0B07D285E7 for ; Fri, 9 Jun 2017 08:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ci8f/krf8JFfxGYq+bon9R1jXsX6A9YWn6cVmHsTqes=; b=A/g CroDgNgHWGDTaACVYdjuupIi6RXYN+TmuTzPyvv+aIw/e33QziwUnDIFd+xhRWs6Uj/3GVvaeYaq+ ++uLPXyYRKkJ62I5ugVd11eQtaWE6ln791PlBT1GioeIgnVlcQDvFexN5Cxdu9tqAmx5RNJ5hfh79 3dFwTmDogvJoy3QsFBkzNZ3ONNwi1m0zNAd476eHiaCJQE4+gccMpabiKiDW2LJKTmYYL8BYQVJGG Nbbd1mvl09QT/OxmhIsaANar8S2fvyxfukP8ocqNleeUP+Eprqp6PAx7Z9MBxHpuGKd3iiUjru1N4 bzNaIiDnt2OLchXGcMcd4Vf0tQn9Qtw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dJFK0-00006I-Rp; Fri, 09 Jun 2017 08:31:08 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dJFJx-0008WA-EA for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2017 08:31:07 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id v598TtKM009809; Fri, 9 Jun 2017 17:29:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v598TtKM009809 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1496996996; bh=/anD9nu6jrmwsiy64F6t1XQhJ7uHv0RgqD7/Mwax6WU=; h=From:To:Cc:Subject:Date:From; b=B89odiDh5S+mM4+X1jiS1m2HSVmUUa1kddMUTE4IGMmwcZg7Ypagr5jFsbVNnubCJ E74hNL8G2f0JH9vFNVSAGCCZtqDbfkCEURpziZtnv4Q4OMS2NPv0bd1Sdtf4BFukPt RyZzIpFOo35Rz1vqBzn2GCiKdzZDz1g75Ro+DJpiq7ktwautroK2WjSna+mx0lnOUr ygW7pCl3lthl0Mi/9Z0ZQ+1tPjRPdJaOq9ydOBai50Pz2doGu9TveX+NclAB/p3QQ+ i2wracSpTmr4shIb8RnIBojE4DH6RVLnr2vGE3e4a53rX+LmkO0m7dL1qUgosXw5M6 DdIrvR3YGe2Xw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH] kbuild: replace genhdr-y with generated-y, deprecating genhdr-y Date: Fri, 9 Jun 2017 17:29:52 +0900 Message-Id: <1496996992-17857-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170609_013105_876802_08324474 X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "H. Peter Anvin" , Jonathan Corbet , Michael Ellerman , x86@kernel.org, linux-doc@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, Masahiro Yamada , Michal Marek , Daniel Vetter , Nicolas Dichtel , Ingo Molnar , Thomas Gleixner , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Prior to commit fcc8487d477a ("uapi: export all headers under uapi directories"), genhdr-y was meant to specify generated UAPI headers. - generated-y: generated headers (other than asm-generic wrappers) - header-y : headers to be exported - genhdr-y : generated headers to be exported (generated-y + header-y) Now headers under UAPI directories are all exported. So, there is no more difference between generated-y and genhdr-y. We see two users of genhdr-y, arch/{arm,x86}/include/uapi/asm/Kbuild. They generate some headers in arch/{arm,x86}/include/uapi/generated/ directories, which are obviously exported. Replace genhdr-y with generated-y, and deprecate genhdr-y. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Dichtel --- Documentation/kbuild/makefiles.txt | 25 ++++++------------------- arch/arm/include/uapi/asm/Kbuild | 6 +++--- arch/x86/include/uapi/asm/Kbuild | 6 +++--- scripts/Makefile.asm-generic | 2 +- 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index e18daca65ccd..1c49e87cea4f 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -45,10 +45,9 @@ This document describes the Linux kernel Makefiles. === 7 Kbuild syntax for exported headers --- 7.1 no-export-headers - --- 7.2 genhdr-y - --- 7.3 generic-y - --- 7.4 generated-y - --- 7.5 mandatory-y + --- 7.2 generic-y + --- 7.3 generated-y + --- 7.4 mandatory-y === 8 Kbuild Variables === 9 Makefile language @@ -1277,18 +1276,7 @@ See subsequent chapter for the syntax of the Kbuild file. avoid exporting specific headers (e.g. kvm.h) on architectures that do not support it. It should be avoided as much as possible. - --- 7.2 genhdr-y - - genhdr-y specifies asm files to be generated. - - Example: - #arch/x86/include/uapi/asm/Kbuild - genhdr-y += unistd_32.h - genhdr-y += unistd_64.h - genhdr-y += unistd_x32.h - - - --- 7.3 generic-y + --- 7.2 generic-y If an architecture uses a verbatim copy of a header from include/asm-generic then this is listed in the file @@ -1315,11 +1303,10 @@ See subsequent chapter for the syntax of the Kbuild file. Example: termios.h #include - --- 7.4 generated-y + --- 7.3 generated-y If an architecture generates other header files alongside generic-y - wrappers, and not included in genhdr-y, then generated-y specifies - them. + wrappers, generated-y specifies them. This prevents them being treated as stale asm-generic wrappers and removed. diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild index 607f702c2d62..424935e4515d 100644 --- a/arch/arm/include/uapi/asm/Kbuild +++ b/arch/arm/include/uapi/asm/Kbuild @@ -1,6 +1,6 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -genhdr-y += unistd-common.h -genhdr-y += unistd-oabi.h -genhdr-y += unistd-eabi.h +generated-y += unistd-common.h +generated-y += unistd-oabi.h +generated-y += unistd-eabi.h diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild index 83b6e9a0dce4..da1489cb64dc 100644 --- a/arch/x86/include/uapi/asm/Kbuild +++ b/arch/x86/include/uapi/asm/Kbuild @@ -1,6 +1,6 @@ # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm -genhdr-y += unistd_32.h -genhdr-y += unistd_64.h -genhdr-y += unistd_x32.h +generated-y += unistd_32.h +generated-y += unistd_64.h +generated-y += unistd_x32.h diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic index e4d017d53819..95f7d8090152 100644 --- a/scripts/Makefile.asm-generic +++ b/scripts/Makefile.asm-generic @@ -15,7 +15,7 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) # Stale wrappers when the corresponding files are removed from generic-y # need removing. -generated-y := $(generic-y) $(genhdr-y) $(generated-y) +generated-y := $(generic-y) $(generated-y) all-files := $(patsubst %, $(obj)/%, $(generated-y)) old-headers := $(wildcard $(obj)/*.h) unwanted := $(filter-out $(all-files),$(old-headers))