From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932314AbbFGRm1 (ORCPT ); Sun, 7 Jun 2015 13:42:27 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57381 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbbFGRmN (ORCPT ); Sun, 7 Jun 2015 13:42:13 -0400 Date: Sun, 7 Jun 2015 10:39:04 -0700 From: tip-bot for Xie XiuQi Message-ID: Cc: xiexiuqi@huawei.com, linux-kernel@vger.kernel.org, dvlasenk@redhat.com, tglx@linutronix.de, peterz@infradead.org, luto@amacapital.net, mingo@kernel.org, hpa@zytor.com, bp@alien8.de, brgerst@gmail.com, tony.luck@intel.com, torvalds@linux-foundation.org, bp@suse.de Reply-To: bp@alien8.de, brgerst@gmail.com, torvalds@linux-foundation.org, tony.luck@intel.com, bp@suse.de, dvlasenk@redhat.com, linux-kernel@vger.kernel.org, xiexiuqi@huawei.com, luto@amacapital.net, tglx@linutronix.de, peterz@infradead.org, hpa@zytor.com, mingo@kernel.org In-Reply-To: <1432628901-18044-19-git-send-email-bp@alien8.de> References: <1432120943-25028-1-git-send-email-xiexiuqi@huawei.com> <1432628901-18044-19-git-send-email-bp@alien8.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/core] x86/mce: Fix monarch timeout setting through the mce= cmdline option Git-Commit-ID: 5c31b2800d8d3e735e5ecac8fc13d1cf862fd330 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5c31b2800d8d3e735e5ecac8fc13d1cf862fd330 Gitweb: http://git.kernel.org/tip/5c31b2800d8d3e735e5ecac8fc13d1cf862fd330 Author: Xie XiuQi AuthorDate: Tue, 26 May 2015 10:28:21 +0200 Committer: Ingo Molnar CommitDate: Wed, 27 May 2015 14:39:14 +0200 x86/mce: Fix monarch timeout setting through the mce= cmdline option Using "mce=1,10000000" on the kernel cmdline to change the monarch timeout does not work. The cause is that get_option() does parse a subsequent comma in the option string and signals that with a return value. So we don't need to check for a second comma ourselves. Signed-off-by: Xie XiuQi Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Link: http://lkml.kernel.org/r/1432120943-25028-1-git-send-email-xiexiuqi@huawei.com Link: http://lkml.kernel.org/r/1432628901-18044-19-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/mcheck/mce.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 521e501..0cbcd31 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -2014,11 +2014,8 @@ static int __init mcheck_enable(char *str) else if (!strcmp(str, "bios_cmci_threshold")) cfg->bios_cmci_threshold = true; else if (isdigit(str[0])) { - get_option(&str, &(cfg->tolerant)); - if (*str == ',') { - ++str; + if (get_option(&str, &cfg->tolerant) == 2) get_option(&str, &(cfg->monarch_timeout)); - } } else { pr_info("mce argument %s ignored. Please use /sys\n", str); return 0;