Re: [GIT PULL] x86: clean up use of system_state in virt_addr_valid and co

Jeremy Fitzhardinge
2009-03-05T22:58:16Z

Jiri Slaby wrote:
> On 5.3.2009 03:15, Jeremy Fitzhardinge wrote:
>> x86-32: use specific __vmalloc_start_set flag in __virt_addr_valid
>> x86-64: pre-initialize boot_cpu_data.x86_phys_bits to avoid system_state
>> tests
>
> Looks good, thanks. Just an idea, wouldn't make sense to add the check
> directly into is_vmalloc_addr?

I thought about it, but I think its simply invalid to call
is_vmalloc_addr() until you can meaningfully have vmalloc addresses. It
would be nice to have some way to warn about callers who are using these
predicates in a meaningless way, but there doesn't appear to be any
sensible way to do so (I guess the case I'm concerned about is people
using VMALLOC_START for something before it is meaningful).

J