From patchwork Sat Sep 8 22:06:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Triplett X-Patchwork-Id: 1427291 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EC44ADF2AB for ; Sat, 8 Sep 2012 22:07:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755296Ab2IHWHB (ORCPT ); Sat, 8 Sep 2012 18:07:01 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:47716 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753750Ab2IHWG5 (ORCPT ); Sat, 8 Sep 2012 18:06:57 -0400 X-Originating-IP: 217.70.178.151 Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 663BCA806E; Sun, 9 Sep 2012 00:06:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 5jKEdeTqMnuX; Sun, 9 Sep 2012 00:06:54 +0200 (CEST) X-Originating-IP: 50.43.46.74 Received: from leaf (static-50-43-46-74.bvtn.or.frontiernet.net [50.43.46.74]) (Authenticated sender: josh@joshtriplett.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C95D8A807C; Sun, 9 Sep 2012 00:06:50 +0200 (CEST) Date: Sat, 8 Sep 2012 15:06:49 -0700 From: Josh Triplett To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , Matt Fleming , Olof Johansson , Matthew Garrett , David Howells , Rusty Russell , Jim Cromie , Peter Zijlstra , linux-acpi@vger.kernel.org Subject: [PATCHv3 1/4] efi: Add a stub for efi_enter_virtual_mode on non-x86 Message-ID: <993c7f2ee7d53cc480280653a7df500db0882342.1347141698.git.josh@joshtriplett.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This eliminates an ifdef in init/main.c. Signed-off-by: Josh Triplett --- include/linux/efi.h | 4 ++++ init/main.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/efi.h b/include/linux/efi.h index ec45ccd..52fbedf 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -495,7 +495,11 @@ extern void *efi_get_pal_addr (void); extern void efi_map_pal_code (void); extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); extern void efi_gettimeofday (struct timespec *ts); +#ifdef CONFIG_X86 extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ +#else +static void efi_enter_virtual_mode(void) {} +#endif extern u64 efi_get_iobase (void); extern u32 efi_mem_type (unsigned long phys_addr); extern u64 efi_mem_attributes (unsigned long phys_addr); diff --git a/init/main.c b/init/main.c index b286730..ebb1ba5 100644 --- a/init/main.c +++ b/init/main.c @@ -602,10 +602,8 @@ asmlinkage void __init start_kernel(void) calibrate_delay(); pidmap_init(); anon_vma_init(); -#ifdef CONFIG_X86 if (efi_enabled) efi_enter_virtual_mode(); -#endif thread_info_cache_init(); cred_init(); fork_init(totalram_pages);