From patchwork Tue Oct 18 19:31:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 9382835 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 A984D600CA for ; Tue, 18 Oct 2016 19:35:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98C5029757 for ; Tue, 18 Oct 2016 19:35:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D7A029790; Tue, 18 Oct 2016 19:35:16 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 10B6629757 for ; Tue, 18 Oct 2016 19:35:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwa9E-0000U3-AO; Tue, 18 Oct 2016 19:34:04 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwa99-0008Bw-QZ for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 19:34:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Date:Sender:Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Subject:To:From; bh=JujBeVdyfwwyxMlsohVlLKkxxDDDxmyVESj48enGgXA=; b=XD9z+sdKC9sWuqhdaKblQXGTROufWIk3qqJmXplnZ7zfrDcYbBOuQwUfMCShfss5hoZGUuu5wIh8uNAjxkcIC2kzRRNJODwIdM8JMjPFPe4bPdOY1K/xm7gdLudbv4dhd6p7L3hKtYLXAI+cRS/pHzN4V4NCLYyH/vpMLDj5UbQ=; Received: from e0022681537dd.dyn.armlinux.org.uk ([2002:4e20:1eda:1:222:68ff:fe15:37dd]:44726 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bwa6n-0004db-TM for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 20:31:33 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bwa6m-0004ZS-VJ for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 20:31:33 +0100 From: Russell King To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] ARM: remove indirection of asm/mach-types.h MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 18 Oct 2016 20:31:32 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161018_123400_222977_FBFE4F8F X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Arrange for mach-types.h to be directly generated in the relevant path, so we don't need a one-liner file in arch/arm/include/asm/. Signed-off-by: Russell King --- arch/arm/Makefile | 2 +- arch/arm/include/asm/Kbuild | 2 ++ arch/arm/include/asm/mach-types.h | 1 - arch/arm/tools/Makefile | 16 +++++++++++++++- 4 files changed, 18 insertions(+), 3 deletions(-) delete mode 100644 arch/arm/include/asm/mach-types.h diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 6be9ee148b78..2208a73ba1d4 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -312,7 +312,7 @@ all: $(KBUILD_IMAGE) $(KBUILD_DTBS) boot := arch/arm/boot archprepare: - $(Q)$(MAKE) $(build)=arch/arm/tools include/generated/mach-types.h + $(Q)$(MAKE) $(build)=arch/arm/tools kapi # Convert bzImage to zImage bzImage: zImage diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 0745538b26d3..5b06064946ce 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild @@ -39,3 +39,5 @@ generic-y += termios.h generic-y += timex.h generic-y += trace_clock.h generic-y += unaligned.h + +generated-y += mach-types.h diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h deleted file mode 100644 index 948178cc6ba8..000000000000 --- a/arch/arm/include/asm/mach-types.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 6e4cd1867a9f..bdf48e4949ad 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile @@ -4,10 +4,24 @@ # Copyright (C) 2001 Russell King # +gen := arch/$(ARCH)/include/generated +kapi := $(gen)/asm + +kapi-hdrs-y := $(kapi)/mach-types.h + +targets += $(addprefix ../../../,$(kapi-hdrs-y)) + +PHONY += kapi + +kapi: $(kapi-hdrs-y) + +# Create output directory if not already present +_dummy := $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') + quiet_cmd_gen_mach = GEN $@ cmd_gen_mach = mkdir -p $(dir $@) && \ $(AWK) -f $(filter-out $(PHONY),$^) > $@ || \ { rm -f $@; /bin/false; } -include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE +$(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE $(call if_changed,gen_mach)