From patchwork Thu Apr 14 00:04:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8829861 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8F5E4C0554 for ; Thu, 14 Apr 2016 00:06:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C14852035D for ; Thu, 14 Apr 2016 00:06:56 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id CAFD8203A4 for ; Thu, 14 Apr 2016 00:06:55 +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 1aqUmX-0007Sj-M8; Thu, 14 Apr 2016 00:05:13 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqUmW-0007Rr-8K for xen-devel@lists.xensource.com; Thu, 14 Apr 2016 00:05:12 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id 9B/18-13115-7BEDE075; Thu, 14 Apr 2016 00:05:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVybKJsh+72e3z hBv97GC3uTXnP7sDosb1vF3sAYxRrZl5SfkUCa8bc10eYC05zVixceZ6tgXEiRxcjF4eQwFRG iYvXX7BDODOYJHad+sbYxcjBwSagK3HztkQXIyeHiECCxN2n35hBapgFjrFKzFs1lxUkISxgJ 7Hr80mwehYBVYmfbU4gYV4Be4kjn9rZQWwJATmJlh+7wco5BRwkFuxcAWYLAdX03z7ACFGTIT GvZw4rhO0lsejGJShbTeLquU3MExj5FjAyrGJUL04tKkst0jXWSyrKTM8oyU3MzNE1NDTRy00 tLk5MT81JTCrWS87P3cQIDBIGINjBeLfP+RCjJAeTkiivySq+cCG+pPyUyozE4oz4otKc1OJD jDIcHEoSvOF3gXKCRanpqRVpmTnAcIVJS3DwKInwbgdJ8xYXJOYWZ6ZDpE4xKkqJ88qAJARAE hmleXBtsBi5xCgrJczLCHSIEE9BalFuZgmq/CtGcQ5GJWHeEJApPJl5JXDTXwEtZgJaXPaOF2 RxSSJCSqqB0etRx+oZ2ZvFXmcbhM257HR/zut1oa2yjS8+CtffWb2uUfVnxiE9vcbk349CnYu z1878a5AadHPDljtZ1yYz/1aTmBzdckljfuBHGyaltzmGgnO1Oy10Umt5W4vF3Zq0S4JrXbdZ HpwnV2rdU52zg6vvkTnft+krzf/pvllzVd1gj795Ai+jEktxRqKhFnNRcSIAQF4gjowCAAA= X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-11.tower-27.messagelabs.com!1460592309!26874030!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 56110 invoked from network); 14 Apr 2016 00:05:10 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-11.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Apr 2016 00:05:10 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C631D2027D; Thu, 14 Apr 2016 00:05:08 +0000 (UTC) Received: from garbanzo.do-not-panic.com (c-73-15-241-2.hsd1.ca.comcast.net [73.15.241.2]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1330B2037E; Thu, 14 Apr 2016 00:05:07 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Wed, 13 Apr 2016 17:04:38 -0700 Message-Id: <1460592286-300-9-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460592286-300-1-git-send-email-mcgrof@kernel.org> References: <1460592286-300-1-git-send-email-mcgrof@kernel.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: kozerkov@parallels.com, matt@codeblueprint.co.uk, bigeasy@linutronix.de, lv.zheng@intel.com, ffainelli@freebox.fr, mbizon@freebox.fr, xen-devel@lists.xensource.com, x86@kernel.org, robert.moore@intel.com, linux-acpi@vger.kernel.org, glin@suse.com, lenb@kernel.org, julien.grall@linaro.org, josh@joshtriplett.org, george.dunlap@citrix.com, jlee@suse.com, lguest@lists.ozlabs.org, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com, jgross@suse.com, toshi.kani@hp.com, andrew.cooper3@citrix.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, luto@amacapital.net, "Luis R. Rodriguez" , david.vrabel@citrix.com, tiwai@suse.de Subject: [Xen-devel] [PATCH v6 08/16] apm32: remove paravirt_enabled() use 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 There is already a check for apm_info.bios == 0, the apm_info.bios is set from the boot_params.apm_bios_info. Both Xen and lguest, which are also the only ones that set paravirt_enabled to true, never set the apm_bios.info. The Xen folks are sure force disable to 0 is not needed because apm_info lives in .bss, we recently forced disabled this on lguest, and on the Xen side just to be sure Boris zeroed out the .bss for PV guests through commit 04b6b4a56884327c1648 ("xen/x86: Zero out .bss for PV guests"). With this care taken into consideration the paravirt_enabled() check is simply not needed anymore. Signed-off-by: Luis R. Rodriguez --- arch/x86/kernel/apm_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 9307f182fe30..c7364bd633e1 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c @@ -2267,7 +2267,7 @@ static int __init apm_init(void) dmi_check_system(apm_dmi_table); - if (apm_info.bios.version == 0 || paravirt_enabled() || machine_is_olpc()) { + if (apm_info.bios.version == 0 || machine_is_olpc()) { printk(KERN_INFO "apm: BIOS not found.\n"); return -ENODEV; }