From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89ED7C04AAC for ; Mon, 20 May 2019 12:44:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5D729204FD for ; Mon, 20 May 2019 12:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558356256; bh=yNCRd+eOXOTE0d/MEkfYEESKg8Bn3wudNisrxhdpgho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=t/7mDxlBIkunarlu4D1g/WLTq2ImqngQ2B3do08CeqFPmJOjGSX43qx9WZfgsFDht SNGlnBQBJ9Ap2PWvqV0VlvIRCFJtAqEbOYppGqYSLPXLfBx5VNpNzbP54H3B/o7YKc /+2YF99zFUATrJkvcklOW41kd7YXJBMIkFWjF99k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389637AbfETM2O (ORCPT ); Mon, 20 May 2019 08:28:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:43936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389621AbfETM2N (ORCPT ); Mon, 20 May 2019 08:28:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA88B2171F; Mon, 20 May 2019 12:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558355292; bh=yNCRd+eOXOTE0d/MEkfYEESKg8Bn3wudNisrxhdpgho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I1IAWiEdNypDJ8uEiC24RlaeFqRcMuEQ/7LjBJi6Izx7nfazwoMeDPb1T8jKynURw ZJc8SuVYpKfCrpXBefexO1tkO1nkweXLYsTYMGGUprRezDUFKGZdqx27QOEORulp88 5oN9i9bpf3DvRsVC28Ud3VwJrG83YbpKB5VC2aEo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yazen Ghannam , Borislav Petkov , Arnd Bergmann , "clemej@gmail.com" , "H. Peter Anvin" , Ingo Molnar , Pu Wen , Qiuxu Zhuo , "rafal@milecki.pl" , Thomas Gleixner , Tony Luck , Vishal Verma , x86-ml Subject: [PATCH 5.0 023/123] x86/MCE: Group AMD function prototypes in Date: Mon, 20 May 2019 14:13:23 +0200 Message-Id: <20190520115246.373480039@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115245.439864225@linuxfoundation.org> References: <20190520115245.439864225@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yazen Ghannam commit 9308fd4074551f222f30322d1ee8c5aff18e9747 upstream. There are two groups of "ifdef CONFIG_X86_MCE_AMD" function prototypes in . Merge these two groups. No functional change. [ bp: align vertically. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Arnd Bergmann Cc: "clemej@gmail.com" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Pu Wen Cc: Qiuxu Zhuo Cc: "rafal@milecki.pl" Cc: Thomas Gleixner Cc: Tony Luck Cc: Vishal Verma Cc: x86-ml Link: https://lkml.kernel.org/r/20190322202848.20749-3-Yazen.Ghannam@amd.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/mce.h | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -209,16 +209,6 @@ static inline void cmci_rediscover(void) static inline void cmci_recheck(void) {} #endif -#ifdef CONFIG_X86_MCE_AMD -void mce_amd_feature_init(struct cpuinfo_x86 *c); -int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr); -#else -static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { } -static inline int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr) { return -EINVAL; }; -#endif - -static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c) { return mce_amd_feature_init(c); } - int mce_available(struct cpuinfo_x86 *c); bool mce_is_memory_error(struct mce *m); bool mce_is_correctable(struct mce *m); @@ -338,12 +328,19 @@ extern bool amd_mce_is_memory_error(stru extern int mce_threshold_create_device(unsigned int cpu); extern int mce_threshold_remove_device(unsigned int cpu); -#else +void mce_amd_feature_init(struct cpuinfo_x86 *c); +int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr); -static inline int mce_threshold_create_device(unsigned int cpu) { return 0; }; -static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; }; -static inline bool amd_mce_is_memory_error(struct mce *m) { return false; }; +#else +static inline int mce_threshold_create_device(unsigned int cpu) { return 0; }; +static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; }; +static inline bool amd_mce_is_memory_error(struct mce *m) { return false; }; +static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { } +static inline int +umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr) { return -EINVAL; }; #endif +static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c) { return mce_amd_feature_init(c); } + #endif /* _ASM_X86_MCE_H */