Re: [PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init and init_level4_page

2013-01-10 Thread Borislav Petkov
On Wed, Jan 09, 2013 at 05:26:18PM -0800, Yinghai Lu wrote: > I should say: > > that *is* initialized to false by default. > > please check > > http://stackoverflow.com/questions/10828294/c-and-c-partial-initialization-of-automatic-structure Ok, I didn't know that, thanks for pointing it out.

Re: [PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init and init_level4_page

2013-01-09 Thread Yinghai Lu
On Sat, Jan 5, 2013 at 5:24 AM, Borislav Petkov wrote: > On Fri, Jan 04, 2013 at 02:04:05PM -0800, Yinghai Lu wrote: >> On Fri, Jan 4, 2013 at 1:01 PM, Borislav Petkov wrote: >> > On Thu, Jan 03, 2013 at 04:48:40PM -0800, Yinghai Lu wrote: >> >> static int init_pgtable(struct kimage *image, unsi

Re: [PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init and init_level4_page

2013-01-05 Thread Borislav Petkov
On Fri, Jan 04, 2013 at 02:04:05PM -0800, Yinghai Lu wrote: > On Fri, Jan 4, 2013 at 1:01 PM, Borislav Petkov wrote: > > On Thu, Jan 03, 2013 at 04:48:40PM -0800, Yinghai Lu wrote: > >> static int init_pgtable(struct kimage *image, unsigned long start_pgtable) > >> { > >> + struct x86_mappin

Re: [PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init and init_level4_page

2013-01-04 Thread Yinghai Lu
On Fri, Jan 4, 2013 at 1:01 PM, Borislav Petkov wrote: > On Thu, Jan 03, 2013 at 04:48:40PM -0800, Yinghai Lu wrote: >> static int init_pgtable(struct kimage *image, unsigned long start_pgtable) >> { >> + struct x86_mapping_info info = { >> + .alloc_pgt_page = alloc_pgt_page, >>

Re: [PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init and init_level4_page

2013-01-04 Thread Borislav Petkov
On Thu, Jan 03, 2013 at 04:48:40PM -0800, Yinghai Lu wrote: > static int init_pgtable(struct kimage *image, unsigned long start_pgtable) > { > + struct x86_mapping_info info = { > + .alloc_pgt_page = alloc_pgt_page, > + .context= image, > + .pmd_fla

[PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init and init_level4_page

2013-01-03 Thread Yinghai Lu
Now ident_mapping_init is checking if pgd/pud is present for every 2M, so several 2Ms are in same PUD, it will keep checking if pud is there. init_level4_page does not check existing pgd/pud. We could use generic mapping_init to replace them all. Signed-off-by: Yinghai Lu --- arch/x86/kernel/m