Summary: | [2.6.24 regression] arcmsr causes dma_free_coherent() warning flood | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joshua Hoblitt <j_gentoo> |
Component: | [OLD] Core system | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
URL: | http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=69e562c234440fb7410877b5b24f4b29ef8521d1 | ||
Whiteboard: | linux-2.6.24-regression | ||
Package list: | Runtime testing required: | --- | |
Attachments: |
.config
dmesg lspci -v patch |
Description
Joshua Hoblitt
2008-02-01 20:37:06 UTC
dmesg, lspci -v and .config please Created attachment 142544 [details]
.config
Created attachment 142545 [details]
dmesg
Created attachment 142546 [details]
lspci -v
The warning was added in 2.6.24 with this commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aa24886e379d2b641c5117e178b15ce1d5d366ba --- a/arch/x86/kernel/pci-dma_64.c +++ b/arch/x86/kernel/pci-dma_64.c @@ -167,6 +167,7 @@ EXPORT_SYMBOL(dma_alloc_coherent); void dma_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t bus) { + WARN_ON(irqs_disabled()); /* for portability */ dma_free_coherent() needs irqs enabled (sigh) On at least ARM (and I'm told MIPS too) dma_free_coherent() has a newish call context requirement: unlike its dma_alloc_coherent() sibling, it may not be called with IRQs disabled. (This was new behavior on ARM as of late 2005, caused by ARM SMP updates.) This little surprise can be annoyingly driver-visible. Since it looks like that restriction won't be removed, this patch changes the definition of the API to include that requirement. Also, to help catch nonportable drivers, it updates the x86 and swiotlb versions to include the relevant warnings. (I already observed that it trips on the bus_reset_tasklet of the new firewire_ohci driver.) @Joshua If you have the time, it would help us if you can do the following: Assuming you have not modified the gentoo-sources-2.6.24 kernel config since you posted your dmesg output (if you have, we need a new one): install gdb cd /usr/src/linux-2.6.24-gentoo rm drivers/scsi/arcmsr/arcmsr_hba.o make CONFIG_DEBUG_INFO=y drivers/scsi/arcmsr/arcmsr_hba.o this will compile the driver in question with debug information, which we can then use in GDB: gdb drivers/scsi/arcmsr/arcmsr_hba.o then at the GDB promt: list *arcmsr_queue_command+0x368 and then post the output here. Hi Kim, The only modification I've made to the sources is pulling down the latest forcedeth.c from netdev-2.6. Here ya go: ipp000 linux # rm drivers/scsi/arcmsr/arcmsr_hba.o ipp000 linux # make CONFIG_DEBUG_INFO=y drivers/scsi/arcmsr/arcmsr_hba.o CHK include/linux/version.h CHK include/linux/utsrelease.h CC arch/x86/kernel/asm-offsets.s GEN include/asm-x86/asm-offsets.h CALL scripts/checksyscalls.sh CC scripts/mod/empty.o MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost CC [M] drivers/scsi/arcmsr/arcmsr_hba.o ipp000 linux # gdb drivers/scsi/arcmsr/arcmsr_hba.o GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) list *arcmsr_queue_command+0x368 0x16e1 is in arcmsr_queue_command (include/asm-generic/pci-dma-compat.h:29). 24 25 static inline void 26 pci_free_consistent(struct pci_dev *hwdev, size_t size, 27 void *vaddr, dma_addr_t dma_handle) 28 { 29 dma_free_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, vaddr, dma_handle); 30 } 31 32 static inline dma_addr_t 33 pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction) (gdb) Created attachment 143585 [details, diff]
patch
Please apply this patch to 2.6.24 and see if the messages go away
I applied the patch to 2.6.24-r2 and the warnings are gone. I would very much like to see this patch go into the gentoo patch set and be submitted for 2.6.24.y inclusion. Thanks! thanks for testing, queued it up Fixed in genpatches-2.6.24-4 (gentoo-sources-2.6.24-r3), thanks for helping us out on this issue |