From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Young Subject: Re: [PATCH v5 10/14] efi: only print saved efi runtime maps instead of all memmap ranges for kexec Date: Mon, 16 Dec 2013 10:00:10 +0800 Message-ID: <20131216020010.GC3754@dhcp-16-126.nay.redhat.com> References: <1386582147-9802-1-git-send-email-dyoung@redhat.com> <1386582147-9802-11-git-send-email-dyoung@redhat.com> <20131213160150.GE32329@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20131213160150.GE32329-fF5Pk5pvG8Y@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" Errors-To: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Borislav Petkov Cc: mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, toshi.kani-VXdhtT5mjnY@public.gmane.org, matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org, greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org, horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org, ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org, vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: linux-efi@vger.kernel.org > > - print_efi_memmap(); > > + if (efi_setup) { > > + int s; > > + struct efi_setup_data *data; > > + > > + s = sizeof(*data) + nr_efi_runtime_map * sizeof(data->map[0]); > > + data = early_memremap(efi_setup, s); > > + if (!data) > > + return; > > + print_efi_memmap(data->map, nr_efi_runtime_map, > > + sizeof(data->map[0])); > > + early_memunmap(data, s); > > Well, if you call print_efi_memmap() in parse_efi_setup() you can save > yourself that map/unmaping no? In parse_efi_setup, I need map twice as well: mapping sizeof(struct setup_data) to get the payload len, then mapping the data->map again and call print_efi_memmap.. Another where what I print in this patch is same position what non-kexec kernel does, it looks better that print them only if earlier init is ok. -- Thanks for review Dave