Re: [PATCH 3/3] x86/mm: Separate paging setup from memory mapping

From: Pekka Enberg
Date: Sun Jul 15 2012 - 07:03:44 EST


On Sat, Jul 14, 2012 at 6:41 AM, Pekka Enberg <penberg@xxxxxxxxxx> wrote:
>> Move PSE and PGE bit twiddling from init_memory_mapping() to a new
>> setup_paging() function to simplify the former function. The
>> init_memory_mapping() function is called later in the boot process by
>> gart_iommu_init(), efi_ioremap(), and arch_add_memory() which have no
>> business whatsover updating the CR4 register.

On Sat, Jul 14, 2012 at 11:47 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> I have one local patch that will only set that one time too. also do
> other page size probe one time.
>
> please check attached one.

Your patch still keeps the same sort of code flow. That is,
init_memory_mapping() does all sorts of things upon first call. I
personally prefer the more explicit approach in this patch. In fact,
you could do the page_size_mask setup in the setup_paging() function.

Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/