Thread (25 messages) 25 messages, 7 authors, 2012-03-16

Re: [tip:x86/urgent] x86, efi: Delete efi_ioremap() and fix CONFIG_X86_32 oops

From: Matt Fleming <hidden>
Date: 2012-03-16 18:37:00
Also in: lkml

On Thu, 2012-03-15 at 10:54 -0700, Yinghai Lu wrote:
quoted
               if (end <= max_low_pfn << PAGE_SHIFT)
                       max_low_pfn_mapped = last_pfn_mapped;
why max_low_pfn is used here?
The idea is that we only want to update max_low_pfn_mapped when we've
mapped a region at or below max_low_pfn. This maintains compatibility
with behaviour prior to this patch.
quoted
The max_low_pfn checks are only for CONFIG_X86_32 so that the behaviour
is the same as before this patch, i.e. we don't try to map above
max_low_pfn.
ok, to simplify the code, in setup.c you could move
#ifdef CONFIG_X86_64
        if (max_pfn > max_low_pfn) {
                /* can we preseve max_low_pfn ?*/
                max_low_pfn = max_pfn;
        }
#endif

before calling new init_memory_mapping()...

so you could remove the #idef. in init_memory_mapping.
Hmm.. if we do this then max_low_pfn_mapped will be set to max_pfn on
CONFIG_X86_64 by the time we've finished looping in
init_memory_mapping(). This is not how things work currently. Will that
cause a problem?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help