Messages in this thread | | | Date | Wed, 2 Jun 2004 10:39:06 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: Problem with ioremap which returns NULL in 2.6 kernel |
| |
On Wed, 2 Jun 2004, Markus Lidel wrote:
> Hello, > > Jeff Garzik wrote: > >>>>>My preferred approach would be: consider that the hardware does not > >>>>>need the entire 0x8000000-byte area mapped. Plain and simple. > >>>>>This is a "don't do that" situation, and that renders the other > >>>>>questions moot :) You should only be mapping what you need to map. > >>>>Okay, i'll let try it out with only 64MB. > >>>Why do you need 64MB, even? :) > >>I don't know how much space i need :-D But why does the device set the > >>size to 128MB then? > > Devices often export things you don't care about, such as direct access > > to internal chip RAM. > > Look through the driver that figure out the maximum value that the > > driver actually _uses_. There is no need to guess. > > Okay, i've looked at it, but i don't think i could simply use less > space, because (if i understand the I2O spec right :-D) the controller > returns me a address inside this window, where i could write the I2O > message. So i ask the controller, where do you want my request, then he > tells me a address... > > If i only ioremap 64MB, and the controller tells me write at 80MB, i'm > in deep trouble :-D > > >> size = dev->resource[i].end-dev->resource[i].start+1; > > You should be using pci_resource_start() and pci_resource_len() > > to obtain this information. > > Yep, thanks, but a patch for this is already send :-) > > Best regards, >
I2O, as seen from the PCI/Bus, is a bus! Right? You have a PCI/Bus controller that provides for an interface into I2O? Right? Can you do `cat /proc/pci` and show what device you think it is? I think you are attempting to access a bridge or something. I2O is supposed to be intelligent and to grab 64 megabytes of host address space is the anthesis of this.
Cheers, Dick Johnson Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips). Note 96.31% of all statistics are fiction.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |