From patchwork Fri Sep 6 11:01:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez via B4 Relay X-Patchwork-Id: 13793967 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 B6A8ACD5BDD for ; Fri, 6 Sep 2024 11:08: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:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A7ttT1Cd1XDmP1bJzjYa0sHr8J3anQVnOcPo3CintkE=; b=BUstLbIVcy6KEggC9g14OM2uai iWhZKsCPKLilFQ1ydLXcJZFt6HzZsn9oPGluMVYj+EgieGNOt6W6YfpYBA70pZMLnuvDlL2HImwre F8T6M2uJPnr/GLQoLlrLBDyGREqliBjW7vCx/iAulZOJFZso4UOEB7UUCnaN8oefSE8fxmp3MpXki JeVvveMjLn81flbAgEkG8rOHRcboqr7OH9RisvT+unEiUx7srYGMg0iQ560p9RGuzm8o0+1YR+gTt sWlXtpX9DDHuYgs7Bq6yFrrykPgFGwMrMJC6mmhUoyFeVhksB9rnPoS+uxjhukuLArvwA7E76mCgb eD+YQA5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smWpV-0000000BtzG-0B9A; Fri, 06 Sep 2024 11:08:41 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smWik-0000000BsKd-3P2H for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 11:01:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A59E15C5AE9; Fri, 6 Sep 2024 11:01:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 56DCCC4CEDA; Fri, 6 Sep 2024 11:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725620500; bh=vOiGFucJK70rIWW7jwgBqnvMavVEpTpGsxAOe6Ix7ug=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=AeYQsJSDslgwwy0twNQXWpDjaGTpp6dSXTbqc4PSS8oEMXhZUwyuU5P1thrfALpvg /gpHxMFRIydlOV0a/Id9XRuKtStDguG0qznRiF88vdEwec+Dov+06urJWJCvRoLPgJ fAqJzNr4oAnCc5ytHPPn5/V15Wetmoj5KGiolSoOULFG54ENSuFKFu6Cxxj76EYp3N 1x0kiMwA0Ueq3kFBZBdtaqGc25x5gJq7JyEn7apsLh8fSF+5hhl94NYfBwTFMtYKZw 7dWo4ZHNTYJQ++Xhd9em8x9RczO5wetumMBvHu+fv6opHE0Rlk/ZYuRn9QL/qZ7/EK nwonYs6t8SPFw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 478A0CD5BDD; Fri, 6 Sep 2024 11:01:40 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Fri, 06 Sep 2024 13:01:31 +0200 Subject: [PATCH v2 4/8] arm64: nvhe: add bee-headers support MIME-Version: 1.0 Message-Id: <20240906-macos-build-support-v2-4-06beff418848@samsung.com> References: <20240906-macos-build-support-v2-0-06beff418848@samsung.com> In-Reply-To: <20240906-macos-build-support-v2-0-06beff418848@samsung.com> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , William Hubbs , Chris Brannon , Kirk Reiser , Samuel Thibault , Paul Moore , Stephen Smalley , Ondrej Mosnacek , Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Greg Kroah-Hartman , Jiri Slaby , Nick Desaulniers , Bill Wendling , Justin Stitt , Simona Vetter Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, speakup@linux-speakup.org, selinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-serial@vger.kernel.org, llvm@lists.linux.dev, Finn Behrens , "Daniel Gomez (Samsung)" , gost.dev@samsung.com, Daniel Gomez X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1725620498; l=2402; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=GBZv2DjLBaUWb0PDIN6CGSbBXyjcjj4bMncdBaf72Bg=; b=yNvjUITe4cvXufxVrbYIve+SAb1jzGrq0iUGR/YAun7lLTKIwhk8EC7uDEMgN45dqdtRk38Jy pDk3TLY/uhoBnN1Zcnbu2S82L1cVlw0uRFYjv554A/iIpET4qlSs/in X-Developer-Key: i=da.gomez@samsung.com; a=ed25519; pk=BqYk31UHkmv0WZShES6pIZcdmPPGay5LbzifAdZ2Ia4= X-Endpoint-Received: by B4 Relay for da.gomez@samsung.com/20240621 with auth_id=175 X-Original-From: Daniel Gomez X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_040143_533100_AAAE444F X-CRM114-Status: GOOD ( 11.26 ) 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: , Reply-To: da.gomez@samsung.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Daniel Gomez endian.h header is not provided by default in macOS. Use pkg-config with the new development package 'bee-headers' [1] to find the path where the headers are installed. [1] Bee Headers Project links: https://github.com/bee-headers/headers https://github.com/bee-headers/homebrew-bee-headers It requires to install bee-headers Homebrew Tap: brew tap bee-headers/bee-headers brew install bee-headers/bee-headers/bee-headers Signed-off-by: Daniel Gomez --- arch/arm64/kernel/pi/Makefile | 1 + arch/arm64/kernel/vdso32/Makefile | 1 + arch/arm64/kvm/hyp/nvhe/Makefile | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/pi/Makefile b/arch/arm64/kernel/pi/Makefile index 4d11a8c29181..259c9a45fba0 100644 --- a/arch/arm64/kernel/pi/Makefile +++ b/arch/arm64/kernel/pi/Makefile @@ -20,6 +20,7 @@ KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) hostprogs := relacheck +HOSTCFLAGS_relacheck.o = $(shell $(HOSTPKG_CONFIG) --cflags bee-headers 2> /dev/null) quiet_cmd_piobjcopy = $(quiet_cmd_objcopy) cmd_piobjcopy = $(cmd_objcopy) && $(obj)/relacheck $(@) $(<) diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 25a2cb6317f3..6cb8a04bd829 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -107,6 +107,7 @@ VDSO_LDFLAGS += --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL) # $(hostprogs) with $(obj) munge := ../../../arm/vdso/vdsomunge hostprogs := $(munge) +HOSTCFLAGS_$(munge).o = $(shell $(HOSTPKG_CONFIG) --cflags bee-headers 2> /dev/null) c-obj-vdso := note.o c-obj-vdso-gettimeofday := vgettimeofday.o diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index b43426a493df..d20a440b6964 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -15,7 +15,8 @@ ccflags-y += -fno-stack-protector \ $(DISABLE_STACKLEAK_PLUGIN) hostprogs := gen-hyprel -HOST_EXTRACFLAGS += -I$(objtree)/include +HOST_EXTRACFLAGS += -I$(objtree)/include \ + $(shell $(HOSTPKG_CONFIG) --cflags bee-headers 2> /dev/null) lib-objs := clear_page.o copy_page.o memcpy.o memset.o lib-objs := $(addprefix ../../../lib/, $(lib-objs))