Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751795AbbHMCpm (ORCPT ); Wed, 12 Aug 2015 22:45:42 -0400 Received: from mga14.intel.com ([192.55.52.115]:6277 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751255AbbHMCpl (ORCPT ); Wed, 12 Aug 2015 22:45:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,666,1432623600"; d="scan'208";a="540873336" From: "Chen, Yu C" To: "joeyli.kernel@gmail.com" CC: "matthew.garrett@nebula.com" , "linux-kernel@vger.kernel.org" , "jlee@suse.com" , "vojtech@suse.cz" , "linux-pm@vger.kernel.org" , "pavel@ucw.cz" , "rjw@rjwysocki.net" , "jkosina@suse.cz" , "mingo@redhat.com" , "hpa@zytor.com" , "linux-efi@vger.kernel.org" , "Brown, Len" , "jwboyer@redhat.com" , "Fleming, Matt" Subject: Re: [PATCH v2 09/16] PM / hibernate: Reserve hibernation key and erase footprints Thread-Topic: [PATCH v2 09/16] PM / hibernate: Reserve hibernation key and erase footprints Thread-Index: AQHQ0/41XouHD8j9uUawPaaSFcYE/54ItyGA Date: Thu, 13 Aug 2015 02:45:32 +0000 Message-ID: <1439434143.15722.12.camel@localhost> References: <1439273796-25359-1-git-send-email-jlee@suse.com> <1439273796-25359-10-git-send-email-jlee@suse.com> In-Reply-To: <1439273796-25359-10-git-send-email-jlee@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.160.87] Content-Type: text/plain; charset="utf-8" Content-ID: <9E38EE9FA473F54EBDB6EF850601DF2F@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t7D2k7q8022285 Content-Length: 893 Lines: 26 Hi Chun-yi, On Tue, 2015-08-11 at 14:16 +0800, Lee, Chun-Yi wrote: > +/* A page used to keep hibernation keys */ > +static struct hibernation_keys *hibernation_keys; > + > +void __init parse_hibernation_keys(u64 phys_addr, u32 data_len) > +{ > + struct setup_data *hibernation_setup_data; > + > + /* Reserve keys memory, will copy and erase in init_hibernation_keys() */ > + keys_phys_addr = phys_addr + sizeof(struct setup_data); > + memblock_reserve(keys_phys_addr, sizeof(struct hibernation_keys)); > + > + /* clear hibernation_data */ > + hibernation_setup_data = early_memremap(phys_addr, data_len); > + if (!hibernation_setup_data) > + return; > + should we invoke memblock_free if early_memremap failed? Best Regards, Yu ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?