[openib-general] Re: mmap(/dev/mem) causing sigbus
Michael S. Tsirkin
mst at mellanox.co.il
Fri Jan 14 06:46:10 PST 2005
Hello!
Quoting r. Michael S. Tsirkin (mst at mellanox.co.il) "[openib-general] Re: mmap(/dev/mem) causing sigbus":
> Hello!
> Quoting r. David S. Miller (davem at davemloft.net) "Re: mmap(/dev/mem) causing sigbus":
> > On Thu, 13 Jan 2005 15:12:14 -0800
> > Tom Duffy <tomduffy at dslextreme.com> wrote:
> >
> > > It seems that there is an issue with either mmap or mmap'ing /dev/mem on
> > > sparc64. A tool (mstflint) for flashing firmware for Mellanox
> > > Infiniband HCA's is crashing on sparc64. It mmap's /dev/mem and when it
> > > accesses it, a bus error is generated.
> > >
> > > Should this work?
> >
> > It's not meant to be used at all. We have abstracted out a way
> > to portably mmap() pci devices by opening /proc/bus/pci/* nodes,
> > running the appropriate ioctl() to choose I/O or MEM space,
> > then mmap()'ing on the fd to mmap the PCI device resources.
> >
> > At the very least, i386 and ppc support this interface as well.
>
> OK. I added an option for mmapping /proc/bus/pci, although
> I dont have the time to test it today, but I checked in
> disabled at compile time all the same.
> Tom, please clear CONFIG_USE_DEV_MEM at the top of
> mtcr.h and test, and let me know, this way I'll be
> able to work on it on sunday.
>
>
> mst
I now tested it on x86 and it works. Still, I wont
change the default until I test it some more.
Tom, pls try with latest svn , changing CONFIG_USE_DEV_MEM
from 1 to 0 in mtcr.h. If there are problems I'll
work on it on Sunday, same goes for your error handling
patch.
mst
More information about the general
mailing list