[PATCH V2 4/4] POWERPC: Merge 32 and 64-bit dma code

Kumar Gala galak at kernel.crashing.org
Tue Oct 14 05:22:24 EST 2008


>>>>>
>>>> While doing a buildall this morning, I notice chrp32_defconfig  
>>>> fails
>>>> to build with:
>>>>
>>>> drivers/built-in.o: In function `hard_dma_setup':
>>>> floppy.c:(.text+0x6e40e): undefined reference to  
>>>> `isa_bridge_pcidev'
>>>> floppy.c:(.text+0x6e412): undefined reference to  
>>>> `isa_bridge_pcidev'
>>>> floppy.c:(.text+0x6e53e): undefined reference to  
>>>> `isa_bridge_pcidev'
>>>> floppy.c:(.text+0x6e546): undefined reference to  
>>>> `isa_bridge_pcidev'
>>>> floppy.c:(.text+0x6e54a): undefined reference to  
>>>> `isa_bridge_pcidev'
>>>> make[1]: *** [.tmp_vmlinux1] Error 1
>>>>
>>>> (the hard_dma_setup thing is in arch/powerpc/include/asm/floppy.h).
>>>>
>>>> I did a git bisect and it pointed at this commit as causing the  
>>>> build
>>>> to fail.  Why, I have no idea.
>>>
>>> Ok, I was annoyed enough to look at why.
>>>
>>> Basically, before this patch pci_map_single on 32-bit PPC seemed to
>>> be compiled down to __dma_sync(ptr, size, direction); and the "dev"
>>> parameter to the function was never actually used.  The compiler
>>> seems to have optimized this out entirely, so we don't get the odd
>>> link reference to isa_bridge_pcidev at all.  (Neither pci_map_single
>>> or isa_bridge_pcidev are present in the vmlinux at all).
>>>
>>> With the patch, the compiler doesn't do this code elimination
>>> because pci_map_single boils down to dma_map_page, which calls
>>> get_dma_direct_offset with the "dev" parameter.  So since it is
>>> still used, the compiler can't eliminate it and hence FAIL.
>>>
>>> I have no patch for this at the moment.  Someone should look at
>>> it more closely, because this is causing the 5 chrp32_defconfig
>>> users to weep.
>>
>> Isn't this the type of regression we should fix post -rc1 :)
>
> I don't think it matters much when it gets fixed, pre or post -rc1.   
> But
> it should probably get fixed.  My hack was to pull isa_bridge_pcidev
> into pci-common.c and export it from there.  The 64-bit PCI code can
> initialized it, and the 32-bit can leave it NULL.  But I have no idea
> if that is sane.  If so, I can probably submit a patch for it.

I was just joking around about our "new" regression policy.. anyways I  
hope ben or maybe anton can comment about the ISA code.

- k



More information about the Linuxppc-dev mailing list