From patchwork Mon Aug 14 07:08:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 9898239 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 ECFFF603FB for ; Mon, 14 Aug 2017 07:12:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFF962858C for ; Mon, 14 Aug 2017 07:12:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4BAA2832D; Mon, 14 Aug 2017 07:12:18 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B5436285C8 for ; Mon, 14 Aug 2017 07:12:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh9Vo-0006Jb-Rf; Mon, 14 Aug 2017 07:10:08 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh9Vn-0006CR-AT for xen-devel@lists.xenproject.org; Mon, 14 Aug 2017 07:10:07 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 05/5F-01724-ECC41995; Mon, 14 Aug 2017 07:10:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRWlGSWpSXmKPExsVyuP0Ov+45n4m RBjtncVl83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkTPu5mKVjJWXF4QjNLA+N99i5GTg4JASOJ txP/MXUxcnEICSxklLjXvQAswSagKrHh+ilWEFtEQEni3qrJTCA2s0ChxMnuPrC4sECiROv7o 2BxFqD6X2ufs4DYvAKmErtfHGeCWCAv0XFgMlicEyh+ad9SMFtIwESib2sXywRG7gWMDKsYNY pTi8pSi3SNDPWSijLTM0pyEzNzdA0NjPVyU4uLE9NTcxKTivWS83M3MQL9W8/AwLiDsWev3yF GSQ4mJVHeBJ/eSCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvDO8J0YKCRalpqdWpGXmAAMNJi3B waMkwqsADDYh3uKCxNzizHSI1ClGXY5XE/5/YxJiycvPS5US530KMkMApCijNA9uBCzoLzHKS gnzMjIwMAjxFKQW5WaWoMq/YhTnYFQS5v0MMoUnM68EbtMroCOYgI7oA7mft7gkESEl1cDom7 Xf1VRhje+bLqt3fVLm6gdr7vpmtZhwSYg2+AdPnDxt+m8zru1XhH+x3mLT0HHdcPyX0J6YY8d X9cZ/XmWRMGVxTsmHrevmvXt6LFlhPvfbDQo/uDfcyXhZyuT9y3lL8eaDN/68s69lrFkjbBxT rJS5o7B+y6F7MU3Sx5J1ty056Vm9J69diaU4I9FQi7moOBEAzNWzp3UCAAA= X-Env-Sender: jgross@suse.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1502694606!109701514!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27588 invoked from network); 14 Aug 2017 07:10:06 -0000 Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by server-14.tower-31.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 14 Aug 2017 07:10:06 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D3E40ACFF; Mon, 14 Aug 2017 07:09:05 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Mon, 14 Aug 2017 09:08:18 +0200 Message-Id: <20170814070849.20986-22-jgross@suse.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170814070849.20986-1-jgross@suse.com> References: <20170814070849.20986-1-jgross@suse.com> Cc: Juergen Gross , Andrew Cooper , Jan Beulich Subject: [Xen-devel] [PATCH v2 21/52] xen/arch/x86/time.c: let custom parameter parsing routines return errno X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Modify the custom parameter parsing routines in: xen/arch/x86/time.c to indicate whether the parameter value was parsed successfully. Cc: Jan Beulich Cc: Andrew Cooper Signed-off-by: Juergen Gross Acked-by: Wei Liu --- xen/arch/x86/time.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index b988b94d2e..eba7aed72d 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1870,7 +1870,7 @@ int hwdom_pit_access(struct ioreq *ioreq) * tsc=skewed: Assume TSCs are individually reliable, but skewed across CPUs. * tsc=stable:socket: Assume TSCs are reliable across sockets. */ -static void __init tsc_parse(const char *s) +static int __init tsc_parse(const char *s) { if ( !strcmp(s, "unstable") ) { @@ -1882,6 +1882,10 @@ static void __init tsc_parse(const char *s) setup_clear_cpu_cap(X86_FEATURE_TSC_RELIABLE); else if ( !strcmp(s, "stable:socket") ) tsc_flags |= TSC_RELIABLE_SOCKET; + else + return -EINVAL; + + return 0; } custom_param("tsc", tsc_parse);