Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp334354yba; Mon, 20 May 2019 09:29:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTFcn8sUqFgGf8St94M6jK5pHcbJ7wY498uYM8opBgraDXgI6vxJedE+CyNEHVD2bLgqui X-Received: by 2002:a17:902:1126:: with SMTP id d35mr41322970pla.82.1558369780475; Mon, 20 May 2019 09:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558369780; cv=none; d=google.com; s=arc-20160816; b=Wc1g3o137QJl0HZKzVeO6FEuCisjLA6iso+OZ47BJlP3JgUKZ3eS66ChmkS2Vz9YE4 zHXAOqrQryJl2FpMjSz7DzEDaPA8UYw54S9zGXtNew30boQicbXiLiDz8sL+gwv0Tomb zmNPS/7uz6SRfdkC2tyg45XuwKPNg5ocK0liBV0SnZLro7uIYCUN+hTKMPrIQ0bLTBso 3f/b4zTDUU4ZfpSBifNy1C2cM3OHOUm/xys7jwLdWbqc2zg+BWuhUDjNEg9BbeNOMzfW tqb716Y8If7afF6wuNxrojoxCPXKplYg/XqMqQAgJDApZlDYpbNWeXfYVVrHS352gzhf nDvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/iBb9SUrnwx3eVzan0ErlcSD284uTwh066yyOx3Ce58=; b=QJMSnYQ4h4nP9qki/KHdDIGXp8ARThRn0JfsbgZSEw6uDtmaqHXuidva2dvY4FUrgX X80lMRAr7fPyuOR2YUB2oXlpXo+a/KK7eTy3eirA6opabXvs5hTbZ/qFKFco0cnkhneY H8XnGJoGyJUYsMdTCw7LGbyEOnuBfSd/QMIsHgGxEjxmc6ufBevGyUclPYOxDxI60a2l Apq6EjPj1YPFNwntkv25pbS4IIdzBPqkKF5wRcEaDsGELQkQ7+3FLX5WarvJRnVrseQt Iwq1iPWD504pilM0xUje5lSA4Ow9zj76Uo5VELDHRcz8nGk2BDrdhVoKeOOCELLXdj3V MgBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I1IAWiEd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si17597904pll.403.2019.05.20.09.29.25; Mon, 20 May 2019 09:29:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I1IAWiEd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389298AbfETM2P (ORCPT + 99 others); Mon, 20 May 2019 08:28:15 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 */