[openib-general] FW: Mstflint - not working on ppc64 andwhendriver is notloaded on AMD
Michael S. Tsirkin
mst at mellanox.co.il
Tue Oct 3 00:28:34 PDT 2006
Quoting r. Tseng-Hui (Frank) Lin <thlin at us.ibm.com>:
> Subject: Re: FW: Mstflint - not working on ppc64 andwhendriver is notloaded on AMD
>
> On Sun, 2006-10-01 at 09:50 +0200, Michael S. Tsirkin wrote:
> > Quoting r. Tseng-Hui (Frank) Lin <thlin at us.ibm.com>:
> > > Subject: RE: FW: Mstflint - not working on ppc64 andwhendriver is notloaded on AMD
> > >
> > > The ppc64 problem is actually in pci_64.c. Here is the patch:
> > >
> > > ============ cut here =============
> > > diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> > > index 4c4449b..490403c 100644
> > > --- a/arch/powerpc/kernel/pci_64.c
> > > +++ b/arch/powerpc/kernel/pci_64.c
> > > @@ -734,9 +734,7 @@ static struct resource *__pci_mmap_make_
> > > if (hose == 0)
> > > return NULL; /* should never happen */
> > >
> > > - /* If memory, add on the PCI bridge address offset */
> > > if (mmap_state == pci_mmap_mem) {
> > > - *offset += hose->pci_mem_offset;
> > > res_bit = IORESOURCE_MEM;
> > > } else {
> > > io_offset = (unsigned long)hose->io_base_virt - pci_io_base;
> > > ============= end cut =============
> > >
> > > The mmap() system call on resource0 does not work on ppc64 without this
> > > patch. PowerMAC G5 got away with this because its hose->pci_mem_offset
> > > was set to 0.
> > >
> > > The fix is made on 8/21. It may be able to make it into 2.6.19. But it
> > > certainly won't get into SLES10, SLES9-SP3, or REHL4-U4 which have
> > > already been released.
> > >
> > > To cover both cases with and without the fix, my patch try to
> > > mmap /sys/bus/pci/..../resource0 first. It it failed it tries
> > > mmap /proc/bus/pci/.... If it failed again, we have no choice but fall
> > > back to use PCI config space.
Yack.
OK, I'll put this in the OFED documentation.
Try to make sure it works on 2.6.19 at least.
Was it posted on lkml already?
Wrt read/write access - we have a problem to resolve before we
can enable it silently: currently two concurrent runs of e.g.
mstflint on the same /proc device will conflict corrupting
each other's output.
--
MST
More information about the general
mailing list