Subject: Re: Pegasos interrupt mapping and dmamem_alloc
To: Tim Rightnour <firstname.lastname@example.org>
From: Frank Wille <email@example.com>
Date: 11/03/2007 22:26:08
Tim Rightnour wrote:
>> But then a new crash! The _dma_phys_to_bus_mem() function in the
>> pci_bus_dma_tag structure was not initialized! I don't know why you are
>> making a difference between pci_bus_dma_tag for macppc and for the rest?
>> Usng the macppc-version instead, which initializes the two missing
>> function pointers, fixes the problem:
> Because the macppc one isn't correct. They are using thier own internal
> versions of the routines, as opposed to the generic powerpc ones.
I didn't find a difference.
Macppc only adds the two generic phys_to_bus_mem/bus_mem_to_phys functions,
which is exactly what we need. Nothing special here.
> I keep
> forgetting to ask Macallan if they still need this hack or not. I suspect
> they do not.
IMHO both can use the same pci_bus_dma_tag. When macppc uses the generic
one, it just have to define PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS.
> Initializing those is something that needs to be done on a per-port basis
> in include/bus.h. If you take a look at powerpc/include/prep_bus.h you can
> see that we define macros for PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS.
> It looks like macppc uses the generic ones, so we can probably just set
> the PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS macros in ofppc/include/bus.h to
> those two functions, and things will be good to go.
Ok, so I redid my changes in pci_machdep_common.c and added to
#define PHYS_TO_BUS_MEM(t,x) (x)
#define BUS_MEM_TO_PHYS(t,x) (x)
(same should work for macppc)
_ Frank Wille (firstname.lastname@example.org)
_ // http://sun.hasenbraten.de/~frank/
\X/ Phx @ #AmigaGer