From patchwork Mon Aug 14 07:08:01 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: 9898215 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 9C256603B5 for ; Mon, 14 Aug 2017 07:12:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B0482858C for ; Mon, 14 Aug 2017 07:12:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D23028614; Mon, 14 Aug 2017 07:12:17 +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 73061285AB 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 1dh9Uj-0003cC-M6; Mon, 14 Aug 2017 07:09:01 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dh9Uh-0003at-Kq for xen-devel@lists.xenproject.org; Mon, 14 Aug 2017 07:08:59 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 69/2B-01862-A8C41995; Mon, 14 Aug 2017 07:08:58 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVyuP0Ov26Xz8R Igx8npCy+b5nM5MDocfjDFZYAxijWzLyk/IoE1owHmw+zFKzhrvi76jB7A+NSzi5GTg4JASOJ txP/MXUxcnEICSxklNg8vYUFJMEmoCqx4fopVhBbREBJ4t6qyUwgNrNAocTJ7j6wuLBAosT6i 8vZuhg5OFiA6rf2l4GEeQVMJH4dncIIMV9eouPAZLCRnAKmEpf2LQWzhYBq+rZ2sUxg5F7AyL CKUaM4tagstUjX0FwvqSgzPaMkNzEzR9fQwFgvN7W4ODE9NScxqVgvOT93EyPQuwxAsIPx5Wn PQ4ySHExKorwJPr2RQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR4Z3hPjBQSLEpNT61Iy8wBhhlM WoKDR0mENw8kzVtckJhbnJkOkTrFqMvxasL/b0xCLHn5ealS4rwxIEUCIEUZpXlwI2Ahf4lRV kqYlxHoKCGegtSi3MwSVPlXjOIcjErCvDUgU3gy80rgNr0COoIJ6Ig+kPt5i0sSEVJSDYwJ0w KDhOP8Ph9S0F9zltHzYZD+sdkcj94zTPSUXXF5P/tB+RfL9i8/0ye3gU9XYF/h7R/N21d9uxF esZGTW+OQ3tl3fswneK4Fr07JuTrfs0rgqOAa5lchb++XXfbdsHoKK7PA3NLZprcFX8c3KYj9 OfHh8N+tjha7RQWl+jrZhDfFlFW/S/BRYinOSDTUYi4qTgQAiKsXf3QCAAA= X-Env-Sender: jgross@suse.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1502694538!109701325!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 20088 invoked from network); 14 Aug 2017 07:08:58 -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:08:58 -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 2DDF5ABBC; Mon, 14 Aug 2017 07:08:58 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Mon, 14 Aug 2017 09:08:01 +0200 Message-Id: <20170814070849.20986-5-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 04/52] xen/arch/x86/apic.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/apic.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/apic.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 851a6cc6cb..fdb0a99927 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -785,23 +785,28 @@ int lapic_resume(void) * Original code written by Keir Fraser. */ -static void __init lapic_disable(char *str) +static int __init lapic_disable(char *str) { enable_local_apic = -1; setup_clear_cpu_cap(X86_FEATURE_APIC); + return 0; } custom_param("nolapic", lapic_disable); boolean_param("lapic", enable_local_apic); -static void __init apic_set_verbosity(char *str) +static int __init apic_set_verbosity(char *str) { if (strcmp("debug", str) == 0) apic_verbosity = APIC_DEBUG; else if (strcmp("verbose", str) == 0) apic_verbosity = APIC_VERBOSE; - else + else { printk(KERN_WARNING "APIC Verbosity level %s not recognised" " use apic_verbosity=verbose or apic_verbosity=debug", str); + return -EINVAL; + } + + return 0; } custom_param("apic_verbosity", apic_set_verbosity);