From nobody Fri Apr 10 23:28:56 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9DEEC32773 for ; Thu, 18 Aug 2022 14:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343859AbiHRO5H (ORCPT ); Thu, 18 Aug 2022 10:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343828AbiHRO4q (ORCPT ); Thu, 18 Aug 2022 10:56:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 877E1BD11F for ; Thu, 18 Aug 2022 07:56:44 -0700 (PDT) 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 26227B8218F for ; Thu, 18 Aug 2022 14:56:43 +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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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) +=3D zynq machine-$(CONFIG_PLAT_VERSATILE) +=3D versatile machine-$(CONFIG_PLAT_SPEAR) +=3D spear =20 -# Platform directory name. This list is sorted alphanumerically -# by CONFIG_* macro name. -plat-$(CONFIG_PLAT_ORION) +=3D orion +# legacy platforms provide their own mach/*.h headers globally, +# these three are mutually exclusive +machdirs-$(CONFIG_ARCH_FOOTBRIDGE) +=3D arch/arm/mach-footbridge +machdirs-$(CONFIG_ARCH_RPC) +=3D arch/arm/mach-rpc +machdirs-$(CONFIG_ARCH_SA1100) +=3D arch/arm/mach-sa1100 +KBUILD_CPPFLAGS +=3D $(patsubst %,-I$(srctree)/%/include,$(machdirs-y)) =20 # The byte offset of the kernel image in RAM from the start of RAM. TEXT_OFFSET :=3D $(textofs-y) =20 -# The first directory contains additional information for the boot setup c= ode -ifneq ($(machine-y),) -MACHINE :=3D arch/arm/mach-$(word 1,$(machine-y))/ -else -MACHINE :=3D -endif -ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) -MACHINE :=3D -endif - -machdirs :=3D $(patsubst %,arch/arm/mach-%/,$(machine-y)) -platdirs :=3D $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) - -ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) -ifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) -KBUILD_CPPFLAGS +=3D $(patsubst %,-I$(srctree)/%include,$(machdirs) $(plat= dirs)) -endif -endif - export TEXT_OFFSET GZFLAGS MMUEXT =20 # If we have a machine-specific directory, then include it in the build. -core-y +=3D $(machdirs) $(platdirs) - +core-y +=3D $(patsubst %,arch/arm/mach-%/,$(machine-y)) # For cleaning -core- +=3D $(patsubst %,arch/arm/mach-%/, $(machine-)) -core- +=3D $(patsubst %,arch/arm/plat-%/, $(plat-)) +core- +=3D $(patsubst %,arch/arm/mach-%/,$(machine-)) + +core-$(CONFIG_PLAT_ORION) +=3D arch/arm/plat-orion/ =20 libs-y :=3D arch/arm/lib/ $(libs-y) =20 --=20 2.29.2