From patchwork Fri Apr 8 23:40:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8787171 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 9EA91C0553 for ; Fri, 8 Apr 2016 23:43:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D474A2024D for ; Fri, 8 Apr 2016 23:43:15 +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 F29862026D for ; Fri, 8 Apr 2016 23:43:14 +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 1aog1Q-00009L-V2; Fri, 08 Apr 2016 23:41:04 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aog1P-0008Us-G2 for xen-devel@lists.xensource.com; Fri, 08 Apr 2016 23:41:03 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 80/EB-09532-F8148075; Fri, 08 Apr 2016 23:41:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsVybKJsh26fI0e 4wdJXwhb3prxnd2D02N63iz2AMYo1My8pvyKBNWPu6yPMBac5KxauPM/WwDiRo4uRi0NIYCqj RNucFewQzgwmiVvT3rN0MXJwsAnoSty8LdHFyMkhIpAgcffpN2aQGmaBcywSGy7NZwNJCAvYS Zxeep8dxGYRUJW41DWJEcTmFXCUePf2L1hcQkBOouXHblYQm1PASeLgvj/MILYQUM3VM29YIG oyJOb1zGGFsL0kFt24BGWrSVw9t4l5AiPfAkaGVYzqxalFZalFukZ6SUWZ6RkluYmZObqGBmZ 6uanFxYnpqTmJScV6yfm5mxiBYcIABDsYl/11OsQoycGkJMq77SF7uBBfUn5KZUZicUZ8UWlO avEhRhkODiUJ3kIHjnAhwaLU9NSKtMwcYMDCpCU4eJREePeDpHmLCxJzizPTIVKnGBWlxHndQ BICIImM0jy4NliUXGKUlRLmZQQ6RIinILUoN7MEVf4VozgHo5Iwry3IFJ7MvBK46a+AFjMBLb 7AzwayuCQRISXVwJjXrG22/aXR6VNp+vubnXWrDr4t/f4sx2Rnno3G9qxXc56HpTx+8v/36Vd 7T38PSS1avcg1syXw8kyRlKKS/0L5t7NkeRg4uzbsu7O1/sB7V/d3YteqFM/1Byy0V5pWl7hB 7UvqdG6jDVZfI73avn5/8NPwlae5hYt95YsTharV897ZXpzKVKLEUpyRaKjFXFScCACyIUhvj QIAAA== X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-8.tower-21.messagelabs.com!1460158859!8316831!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 33826 invoked from network); 8 Apr 2016 23:41:02 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-8.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Apr 2016 23:41:02 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 430212034F; Fri, 8 Apr 2016 23:40:57 +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 A9E222035B; Fri, 8 Apr 2016 23:40:55 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Fri, 8 Apr 2016 16:40:19 -0700 Message-Id: <1460158825-13117-9-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460158825-13117-1-git-send-email-mcgrof@kernel.org> References: <1460158825-13117-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, lv.zheng@intel.com, xen-devel@lists.xensource.com, joro@8bytes.org, x86@kernel.org, robert.moore@intel.com, linux-acpi@vger.kernel.org, glin@suse.com, lenb@kernel.org, josh@joshtriplett.org, jlee@suse.com, lguest@lists.ozlabs.org, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.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 v5 08/14] 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; }