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

From: Jeremy Fitzhardinge
Date: Thu Mar 05 2009 - 17:58:16 EST


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
--
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/