Messages in this thread | | | Date | Fri, 16 Jul 1999 23:56:04 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: New kernel/resource.c |
| |
On Sat, 17 Jul 1999, Rogier Wolff wrote: > > Linus, wasn't it your intention to have the Linux "mm" tree grab > > 0x00000000 - 0x000a0000 & > 0x00100000 - 0x04000000(*)
Yes, the memory init code really should do that.
I can't honestly claim that this was my "intention". It's obviously the right thing to do, but I never even thought about it, so claiming intent would be lying.
But yes, that is definitely how the iomem resource is supposed to be used.
> as the "iomem" (commonly known as main memory) regions that it would > handle, leaving the 640k-1M region free for real IOmem? Wouldn't the > vmalloc be supposed to grab: > > 0x04800000 - 0x08800000 ?
No, ioremap() (which is what I assume you're talking about, rather than vmalloc()) should not actually grab the region. One reason for that is that ioremap() doesn't even know who it grabs it for, another reason is that it's actually not illegal to have multiple mappings to the same object.
It should really be the driver that does the allocation, and after it has allocated the region it should do the remapping to actually get a window into the region.
For example, let's say that you have a subsystem like PCMCIA that allocates a region for itself, but it may not actually do the ioremap() because the PCMCIA code is not necessarily ever going to actually _use_ that resource itself: it only allocated it so that it has something to give to the real cards when they are actually inserted. The actual low-level driver may be the one who really does the ioremap(), so ioremap() clearly cannot do the allocation as that has been done earlier.
Very few drivers actually do the iomem (I'm trying to come to grips with the new name ;) allocation. It didn't use to exist, so it's only been added for a few drivers. If anybody wants to send in driver updates, or the above architecture memory initialization, that would be appreciated.
> and things like that? This would make the name "io memory" even too > specific. But still, iomem is in my opinion a much better name than > something that has "pci".
Note that "real memory" is actually "io memory" when seen by any PCI bus master device. So "real" is in the eyes of the beholder ;)
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/
| |