From patchwork Wed Aug 23 17:34:15 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: 9918035 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 E3F7D600C5 for ; Wed, 23 Aug 2017 17:37:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDE97289D9 for ; Wed, 23 Aug 2017 17:37:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2FBF289DA; Wed, 23 Aug 2017 17:37:20 +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 7DA222875B for ; Wed, 23 Aug 2017 17:37:20 +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 1dkZYP-0008PC-Rn; Wed, 23 Aug 2017 17:34:57 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkZYO-0008O1-NW for xen-devel@lists.xenproject.org; Wed, 23 Aug 2017 17:34:56 +0000 Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id 76/B3-02176-0CCBD995; Wed, 23 Aug 2017 17:34:56 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRWlGSWpSXmKPExsVyuP0Ov+7+PXM jDbaeV7T4vmUykwOjx+EPV1gCGKNYM/OS8isSWDM+Lq4ruMxZcXbNQbYGxlaOLkZODgkBI4m3 E/8xdTFycQgJLGSU+L7oGiNIgk1AVWLD9VOsILaIgJLEvVWTmUBsZoFCiZPdfWBxYYFEiR+7p jCD2CxA9X0PVwPVcHDwCphKnOvNhpgvL9FxYDILiM0JFL665B2YLSRgInFg1w+WCYzcCxgZVj FqFKcWlaUW6Rqa6yUVZaZnlOQmZuboGhqY6uWmFhcnpqfmJCYV6yXn525iBPqWAQh2MF487Xm IUZKDSUmUd92KuZFCfEn5KZUZicUZ8UWlOanFhxhlODiUJHjv7gbKCRalpqdWpGXmAIMMJi3B waMkwjsTJM1bXJCYW5yZDpE6xagoJc5bCZIQAElklObBtcEC+xKjrJQwLyPQIUI8BalFuZklq PKvGMU5GJWEeatBpvBk5pXATX8FtJgJaPGkE3NAFpckIqSkGhgdDc42H/Vdf4/7946UN3GKUZ zPFspf2b6kzHe3ZWnM6WXtJhGFKqnlTObb2pJXz194sYjnWkzuzLMHmFWVE4veTahYcPSSYMq PnmfpG2fxN/ZMronRMbqd72r6Zr3spgmRpZMOqLiUqAbMWya09urUG3lXDXY+rV+2imnvAuGz Rn9fFW1/8qNQiaU4I9FQi7moOBEACu5xKWcCAAA= X-Env-Sender: jgross@suse.com X-Msg-Ref: server-9.tower-206.messagelabs.com!1503509695!108661642!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 11688 invoked from network); 23 Aug 2017 17:34:55 -0000 Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by server-9.tower-206.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 23 Aug 2017 17:34:55 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 34277AF57; Wed, 23 Aug 2017 17:34:55 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 23 Aug 2017 19:34:15 +0200 Message-Id: <20170823173446.24801-23-jgross@suse.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170823173446.24801-1-jgross@suse.com> References: <20170823173446.24801-1-jgross@suse.com> Cc: Juergen Gross , Andrew Cooper , Jan Beulich Subject: [Xen-devel] [PATCH v4 22/53] 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 Acked-by: Jan Beulich --- 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);