From patchwork Thu Aug 18 14:56:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12947263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A15CC00140 for ; Thu, 18 Aug 2022 14:59:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LzwY9fJLQoQiV9vZXs9GAPIRoJ2DH0mDqaWsBm1yDOk=; b=k1gFJQMivoYQXz C9jIKWlyFpTAXIflJ25eNVbiLM71PA6zp3YVXaXYt+BpI6ep0aophMFOfkv4Z6R5PGzJJJtgli84X h7GYPQGGcGOolS8d/rFpz56F0pXwOR+AZWlvqBcCSMc/pgm4v/anGo6M1o90+BdI7cpOKAJeUQxQr zgRIo4o1OgqCh6pyZxOkpxSofWUnaaWPZpgY5QI8TUw1m5UdTmZFORO4QZXXzervLmvM1lNwbsvHD 89fU2VDKskvjaiOA/8dtAYxpv7wekJzeResVQRPooolceyfxYCIO0BkA9OwsELWl9RtdULzqraqro QgQ1bj8FIxfIMMX4sy9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOgyk-006Lg0-Hn; Thu, 18 Aug 2022 14:58:39 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOgwv-006Kbw-LF for linux-arm-kernel@lists.infradead.org; Thu, 18 Aug 2022 14:56:47 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2C0F8B821C8; Thu, 18 Aug 2022 14:56:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92F33C433C1; Thu, 18 Aug 2022 14:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660834601; bh=mtTReuzBuhhaSHPjJxbyPhffXjHDxEYyfjlRUGyAxjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cgbc8jG5hSZ/+L6U1fhAkVcOG0njXZcSzWxm9FClB55jk9ro16GAyk5mPoZRtc0b+ iyiiTmdaOF+38CYFuyZ55PdPBkylw+DDbJivQKmDISta/vYDnt0xB6muNUl3Q1/6Kc Jqgzn7IBPIzbRAQ7MTJ0DCEfEFoChhlasZGSND9yxqhJ2YgNJSVD0DBiEEjgRDbAwt sGUm6a1ooH+MqCYrhNcMrK0wTriGDKAkX2aiX9MaZMs/9fWB+n/3P/zN1jpJCn15lF 4dPFz+Id5xcJuVBPP+5WiybLKeUN5bAebSGXSkc3w9DSuhypPgRAFYq8tFZofRQ1G4 STr6PmUCp6ORw== From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Russell King , Linus Walleij , Geert Uytterhoeven , Krzysztof Kozlowski , Ard Biesheuvel , Sekhar Nori , Bartosz Golaszewski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth Subject: [PATCH 2/5] ARM: simplify machdirs/platdirs handling Date: Thu, 18 Aug 2022 16:56:13 +0200 Message-Id: <20220818145616.3156379-3-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220818145616.3156379-1-arnd@kernel.org> References: <20220818145616.3156379-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220818_075646_070485_C63FF6ED X-CRM114-Status: GOOD ( 13.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann There is only one plat-* directory left, and the MACHINE variable is only used for the mach/*.h header path. Simplify this by removing the checks for ARCH_MULTIPLATFORM and ARM_SINGLE_ARMV7M, and just adding the include directories for the remaining three platforms manually. Signed-off-by: Arnd Bergmann --- arch/arm/Makefile | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 369490d5f18a..2623d6e25bdb 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -224,40 +224,24 @@ machine-$(CONFIG_ARCH_ZYNQ) += zynq machine-$(CONFIG_PLAT_VERSATILE) += versatile machine-$(CONFIG_PLAT_SPEAR) += spear -# Platform directory name. This list is sorted alphanumerically -# by CONFIG_* macro name. -plat-$(CONFIG_PLAT_ORION) += orion +# legacy platforms provide their own mach/*.h headers globally, +# these three are mutually exclusive +machdirs-$(CONFIG_ARCH_FOOTBRIDGE) += arch/arm/mach-footbridge +machdirs-$(CONFIG_ARCH_RPC) += arch/arm/mach-rpc +machdirs-$(CONFIG_ARCH_SA1100) += arch/arm/mach-sa1100 +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%/include,$(machdirs-y)) # The byte offset of the kernel image in RAM from the start of RAM. TEXT_OFFSET := $(textofs-y) -# The first directory contains additional information for the boot setup code -ifneq ($(machine-y),) -MACHINE := arch/arm/mach-$(word 1,$(machine-y))/ -else -MACHINE := -endif -ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) -MACHINE := -endif - -machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) -platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) - -ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) -ifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) -KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) -endif -endif - export TEXT_OFFSET GZFLAGS MMUEXT # If we have a machine-specific directory, then include it in the build. -core-y += $(machdirs) $(platdirs) - +core-y += $(patsubst %,arch/arm/mach-%/,$(machine-y)) # For cleaning -core- += $(patsubst %,arch/arm/mach-%/, $(machine-)) -core- += $(patsubst %,arch/arm/plat-%/, $(plat-)) +core- += $(patsubst %,arch/arm/mach-%/,$(machine-)) + +core-$(CONFIG_PLAT_ORION) += arch/arm/plat-orion/ libs-y := arch/arm/lib/ $(libs-y)