[openib-general] Re: mmap(/dev/mem) causing sigbus

David S. Miller davem at davemloft.net
Thu Jan 13 15:29:34 PST 2005


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.



More information about the general mailing list