From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932739Ab2IDU3f (ORCPT ); Tue, 4 Sep 2012 16:29:35 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:49549 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932673Ab2IDU3e (ORCPT ); Tue, 4 Sep 2012 16:29:34 -0400 X-Originating-IP: 217.70.178.129 X-Originating-IP: 173.246.103.110 Date: Tue, 4 Sep 2012 13:29:26 -0700 From: Josh Triplett To: "H. Peter Anvin" Cc: Matt Fleming , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , x86@kernel.org, Len Brown , Olof Johansson , Matthew Garrett , David Howells , Rusty Russell , Jim Cromie , Peter Zijlstra , Pawel Moll , linux-acpi@vger.kernel.org, linux-efi Subject: Re: [PATCH 0/3] Fix ACPI BGRT support for images located in EFI boot services memory Message-ID: <20120904202925.GA5805@jtriplet-mobl1> References: <1346768840.4244.52.camel@mfleming-mobl1.ger.corp.intel.com> <20120904175952.GA4103@jtriplet-mobl1> <5046442E.7020207@zytor.com> <20120904194523.GA5064@jtriplet-mobl1> <50466363.9010900@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50466363.9010900@zytor.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 04, 2012 at 01:24:03PM -0700, H. Peter Anvin wrote: > On 09/04/2012 12:45 PM, Josh Triplett wrote: > >> > >>There are some platforms which have bugs in this area, so there are > >>other reasons to defer freeing up boot memory until as late in the > >>boot process as we can possibly get away with. > >> > >>free_initmem() is presuambly the place that makes most sense. > > > >You're suggesting a call from free_initmem() to > >efi_free_boot_services()? Or, from init_post() right before the call to > >free_initmem()? > > free_initmem() is arch-specific, so probably the latter. OK, will do. > >>This > >>is EFI-specific but not x86-specific, let's not commingle those > >>concepts, please... > > > >init/main.c already calls the x86-specific efi_enter_virtual_mode > >(defined in arch/x86/platform/efi/efi.c), and I split the call to the > >x86-specific efi_free_boot_services out of that. Neither of those > >functions exists on non-x86 platforms, and thus I mirrored the #ifdef > >currently wrapped around efi_enter_virtual_mode for the new call to > >efi_free_boot_services. While it might make sense for that code to > >exist on non-x86 EFI platforms, it currently doesn't. At best, I could > >add static inline stubs to linux/efi.h for those functions to avoid the > >ifdefs, but as far as I can tell the same issue applies to quite a few > >more functions in efi.h. > > > >Would you like me to add the static inline stubs for the couple of > >functions called from init/main.c, or leave the #ifdefs? > > > > I think that would really help clean things up. Fair enough. I'll send v2 shortly. - Josh Triplett