Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp801919ybe; Wed, 11 Sep 2019 05:04:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTm6FIsWA17z6AZH8RabypSkZpQavI/6j50qM70QTgz9BN7bjJ7QpWJsNogwS7DL1W3SJ6 X-Received: by 2002:a17:906:44b:: with SMTP id e11mr25806161eja.26.1568203484535; Wed, 11 Sep 2019 05:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568203484; cv=none; d=google.com; s=arc-20160816; b=MIwy+MyX1CBn9M9ThYGpDidE1+KwpbCNxPjuM27UJqP0E4w2MpJPJVNlNkdBnDaGG/ ufOsu5KO6o1yGfw6GoFe3zaHhnbzrAygFBXqLokS6kXMInTEX9zDqKGvtGWz64AfDnrs 8c9gngDzB2dLVvqQaZi4JyTcaIm/ZsHV4PrbQ/w6/wAzdVwIdFkC+yllTy9riB1ev9mL 4BLN63FpBFyEun2TgWhkCy+xF4BaaamV87Vt5EYwaplqzpZgafsMTbQTMixX71vj6wUN 0fYewGSMs5ZQSL26/1Ox4XSpM+PE46+LrX+2DOMflKAAdTlesn8Mb0vkMYN1d/0WPym4 Utmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=TaKVTNiSszJ7aMJXrwoaWM+5MfsuMFeaYvPbKheD9hw=; b=LucuBFQZyH6pXL7H78HjaNKlSU2KLk7HQNa4ZZ7jLKOwbSmaWkmFK5ixG/xMaWGOSm rMiFFncJMVwyAWjMX3FcNZqOWhHqSigDbhkcUO5R5W1iF2mVYJtLdfYH3433gpD8sv3X ZRqeRvxGPm4M0U25bsc6sBs7WK5i2R1zDWrrNq2UAGQdnCrcWMDb/ONE90dQYdPi28CQ Fzz9MRw30z0S6SAjTmiHUz+bCrBe9mMlDg0oBNhwhS84NyuU2FnqFTdfxbDJvBNFQDh3 02AJwSt6OOp0z+TG3e8QbZcCD7Wz9hwasBImC6biT2ginNk2Kj7uU929D4WYeI8NfVZN +w6w== ARC-Authentication-Results: i=1; mx.google.com; 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 h2si13177713edb.346.2019.09.11.05.04.20; Wed, 11 Sep 2019 05:04:44 -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; 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 S1727838AbfIKMCA convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Sep 2019 08:02:00 -0400 Received: from ZXSHCAS1.zhaoxin.com ([203.148.12.81]:63476 "EHLO ZXSHCAS1.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726702AbfIKMCA (ORCPT ); Wed, 11 Sep 2019 08:02:00 -0400 Received: from zxbjmbx2.zhaoxin.com (10.29.252.164) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Wed, 11 Sep 2019 20:01:58 +0800 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by zxbjmbx2.zhaoxin.com (10.29.252.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Wed, 11 Sep 2019 20:01:57 +0800 Received: from zxbjmbx1.zhaoxin.com ([fe80::b41a:737:a784:b70d]) by zxbjmbx1.zhaoxin.com ([fe80::b41a:737:a784:b70d%16]) with mapi id 15.01.1261.035; Wed, 11 Sep 2019 20:01:57 +0800 From: Tony W Wang-oc To: "tony.luck@intel.com" , "Borislav Petkov (bp@alien8.de)" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "yazen.ghannam@amd.com" , "vishal.l.verma@intel.com" , "qiuxu.zhuo@intel.com" CC: David Wang , "Cooper Yan(BJ-RD)" , "Qiyuan Wang(BJ-RD)" , "Herry Yang(BJ-RD)" Subject: [PATCH v3 2/4] x86/mce: Make 3 functions non-static Thread-Topic: [PATCH v3 2/4] x86/mce: Make 3 functions non-static Thread-Index: AdVojGnAZkhIxKi7Su+JNwehltYJmw== Date: Wed, 11 Sep 2019 12:01:57 +0000 Message-ID: Accept-Language: en-US, zh-CN Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.32.64.75] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These functions are declared static and cannot be used in others .c source file. this commit removes the static attribute and adds the declaration to the header for these functions. Signed-off-by: Tony W Wang-oc --- v2->v3: - Revert 1 unused function arch/x86/kernel/cpu/mce/intel.c | 6 +++--- arch/x86/kernel/cpu/mce/internal.h | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c index 88cd959..70799a5 100644 --- a/arch/x86/kernel/cpu/mce/intel.c +++ b/arch/x86/kernel/cpu/mce/intel.c @@ -423,7 +423,7 @@ void cmci_disable_bank(int bank) raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); } -static void intel_init_cmci(void) +void intel_init_cmci(void) { int banks; @@ -442,7 +442,7 @@ static void intel_init_cmci(void) cmci_recheck(); } -static void intel_init_lmce(void) +void intel_init_lmce(void) { u64 val; @@ -455,7 +455,7 @@ static void intel_init_lmce(void) wrmsrl(MSR_IA32_MCG_EXT_CTL, val | MCG_EXT_CTL_LMCE_EN); } -static void intel_clear_lmce(void) +void intel_clear_lmce(void) { u64 val; diff --git a/arch/x86/kernel/cpu/mce/internal.h b/arch/x86/kernel/cpu/mce/internal.h index 43031db..842b273 100644 --- a/arch/x86/kernel/cpu/mce/internal.h +++ b/arch/x86/kernel/cpu/mce/internal.h @@ -45,11 +45,17 @@ unsigned long cmci_intel_adjust_timer(unsigned long interval); bool mce_intel_cmci_poll(void); void mce_intel_hcpu_update(unsigned long cpu); void cmci_disable_bank(int bank); +void intel_init_cmci(void); +void intel_init_lmce(void); +void intel_clear_lmce(void); #else # define cmci_intel_adjust_timer mce_adjust_timer_default static inline bool mce_intel_cmci_poll(void) { return false; } static inline void mce_intel_hcpu_update(unsigned long cpu) { } static inline void cmci_disable_bank(int bank) { } +static inline void intel_init_cmci(void) { } +static inline void intel_init_lmce(void) { } +static inline void intel_clear_lmce(void) { } #endif void mce_timer_kick(unsigned long interval); -- 2.7.4