Messages in this thread | | | From | (Linus Torvalds) | Subject | Re: virt_to_bus and >1G of memory (was MAX_DMA_ADDRESS ...) | Date | 12 Nov 1998 09:07:38 GMT |
| |
In article <199811111858.TAA03864@gloin.fi.muni.cz>, Jan Kasprzak <kas@informatics.muni.cz> wrote: > > Can anybody explain this to me? Is (x)-PAGE_OFFSET at any chance >slower or less efficient than (x)&~PAGE_OFFSET?
No.
But the one using logical operations is safer in the presense of old drivers that don't do the right thing. There are some historical drivers that may mix physical and virtual addresses, and just masking off (or turning on) the high bits makes them work even though they shouldn't.
For 2.3.x we definitely want to use the +-PAGE_OFFSET version.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |