From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B91A1F6698; Tue, 3 Dec 2024 14:53:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733237606; cv=none; b=URw7UOjtLzXhhP+Yd+4UCFSUlKoqAi4i/XpSS1ju1pB1BUGecWHuMaSUfp1Gqu7RSenQcskhAVFziTe5T7OZD76i84icejxJ4MbJD9t1hxf6BrPWXjDPygWi9yaB1AF8kv2ZrA9QbxIUZLTYbLyFiFMZMUB0kvMC89Vls+H9Z5U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733237606; c=relaxed/simple; bh=wIduMU/K/bR7jH7IS9gjKoSqTPso4Q5MoO8i+ZeQIEo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=meM7heqIoCkW+BfuOMfN6WbEXoIQBroWZFqszC7V8PmA5LItpP3CkhnTOoNmJCTKw47Tc3HypDjFP5YIw+ncnnHbJPjNg9mIgHgT6yMcbA34WMmjRbj5MPijUjhpqbZV6lCOyOf3KZa2e/bYuOjY6339UbSmtt+9wZHxoGEcKDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UENXkNAw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UENXkNAw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D21EC4CECF; Tue, 3 Dec 2024 14:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733237606; bh=wIduMU/K/bR7jH7IS9gjKoSqTPso4Q5MoO8i+ZeQIEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UENXkNAwLRXLX5u/KKlHO3zXMilERsCKApXlf1P4v97V5L3SuF4xlY0AqotFSrxb+ QlNjH80hYrtC1RIch9XexhEFHktaEjNBOA393zRjVhdbjRVZsfDtMTOM5izjO/MdLA 2C9TYvzFXcD6bW/6Nezr35lEXplkjjfd/oGYNP0M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Arnd Bergmann , "Borislav Petkov (AMD)" , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Sasha Levin Subject: [PATCH 6.11 019/817] x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB Date: Tue, 3 Dec 2024 15:33:11 +0100 Message-ID: <20241203143956.392093317@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241203143955.605130076@linuxfoundation.org> References: <20241203143955.605130076@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann [ Upstream commit fce9642c765a18abd1db0339a7d832c29b68456a ] node_to_amd_nb() is defined to NULL in non-AMD configs: drivers/platform/x86/amd/hsmp/plat.c: In function 'init_platform_device': drivers/platform/x86/amd/hsmp/plat.c:165:68: error: dereferencing 'void *' pointer [-Werror] 165 | sock->root = node_to_amd_nb(i)->root; | ^~ drivers/platform/x86/amd/hsmp/plat.c:165:68: error: request for member 'root' in something not a structure or union Users of the interface who also allow COMPILE_TEST will cause the above build error so provide an inline stub to fix that. [ bp: Massage commit message. ] Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20241029092329.3857004-1-arnd@kernel.org Signed-off-by: Sasha Levin --- arch/x86/include/asm/amd_nb.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h index 6f3b6aef47ba9..d0caac26533f2 100644 --- a/arch/x86/include/asm/amd_nb.h +++ b/arch/x86/include/asm/amd_nb.h @@ -116,7 +116,10 @@ static inline bool amd_gart_present(void) #define amd_nb_num(x) 0 #define amd_nb_has_feature(x) false -#define node_to_amd_nb(x) NULL +static inline struct amd_northbridge *node_to_amd_nb(int node) +{ + return NULL; +} #define amd_gart_present(x) false #endif -- 2.43.0