From patchwork Mon Apr 24 11:37:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9696043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4ABAC601E9 for ; Mon, 24 Apr 2017 11:37:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B9272522B for ; Mon, 24 Apr 2017 11:37:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 306B32807B; Mon, 24 Apr 2017 11:37:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8DC82522B for ; Mon, 24 Apr 2017 11:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1168582AbdDXLhW (ORCPT ); Mon, 24 Apr 2017 07:37:22 -0400 Received: from mail.skyhub.de ([5.9.137.197]:40138 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1168575AbdDXLhV (ORCPT ); Mon, 24 Apr 2017 07:37:21 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id RqnkUQElfaaw; Mon, 24 Apr 2017 13:37:20 +0200 (CEST) Received: from pd.tnic (p2003008C2F1E620058F2D742B4F5AA30.dip0.t-ipconnect.de [IPv6:2003:8c:2f1e:6200:58f2:d742:b4f5:aa30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 00D551EC0234; Mon, 24 Apr 2017 13:37:19 +0200 (CEST) Date: Mon, 24 Apr 2017 13:37:18 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: Dan Williams , "Verma, Vishal L" , "linux-nvdimm@lists.01.org" , "stable@vger.kernel.org" , "linux-acpi@vger.kernel.org" Subject: [PATCH 2/2] x86/ras/mce_amd_inj: Preset MCE injection struct Message-ID: <20170424113718.hhycno5my6fbjebv@pd.tnic> References: <20170420221818.23522-1-vishal.l.verma@intel.com> <1492804517.2738.25.camel@intel.com> <3908561D78D1C84285E8C5FCA982C28F6127653B@ORSMSX114.amr.corp.intel.com> <20170421202741.GA16423@intel.com> <20170421210704.c5pvpn6zivvruzx3@pd.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170421210704.c5pvpn6zivvruzx3@pd.tnic> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Borislav Petkov Date: Mon, 24 Apr 2017 13:19:34 +0200 Subject: [PATCH 2/2] x86/ras/mce_amd_inj: Preset MCE injection struct Populate the MCE injection struct before doing initial injection so that values which don't change already have proper values. Signed-off-by: Borislav Petkov --- arch/x86/ras/mce_amd_inj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/ras/mce_amd_inj.c b/arch/x86/ras/mce_amd_inj.c index 8730c2882fff..e3b5d7e7e9ee 100644 --- a/arch/x86/ras/mce_amd_inj.c +++ b/arch/x86/ras/mce_amd_inj.c @@ -463,6 +463,8 @@ static int __init init_mce_inject(void) goto err_dfs_add; } + mce_setup(&i_mce); + return 0; err_dfs_add: