Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756563Ab0DNSgx (ORCPT ); Wed, 14 Apr 2010 14:36:53 -0400 Received: from casper.infradead.org ([85.118.1.10]:45458 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756270Ab0DNSgv (ORCPT ); Wed, 14 Apr 2010 14:36:51 -0400 Subject: Re: USB transfer_buffer allocations on 64bit systems From: David Woodhouse To: Alan Stern Cc: Daniel Mack , Pedro Ribeiro , USB list , Andi Kleen , Kernel development list , Andrew Morton , Greg KH , iommu@lists.linux-foundation.org In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Wed, 14 Apr 2010 19:36:37 +0100 Message-ID: <1271270197.31006.2133.camel@macbook.infradead.org> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1541 Lines: 34 On Wed, 2010-04-14 at 14:15 -0400, Alan Stern wrote: > > Since using mem=4096M or GFP_DMA stopped the symptoms, it seems very > likely that a buffer is getting allocated above the 4 GB line and not > bounced or IOMMU-mapped correctly. > > David, do you have anything to suggest? Any ways to check for IOMMU > or related errors? > > The problem, in short, is that USB audio doesn't work properly when > Pedro boots a 64-bit kernel on his 4-GB machine. With a 32-bit kernel > it works okay, and it also works if we use dma_alloc_coherent(). The > host controller is limited to 32-bit DMA, and the DMA addresses > generated by dma_map_single() appear to be normal. > > At the moment we don't even know if this is caused by a bug in the > kernel or a bug in Pedro's hardware. But he has observed the same > problem on two different machines, both using the ICH9 chipset. Pedro's dmesg suggests that his machine has an IOMMU, but his kernel isn't built to support it. So he'll be using swiotlb. Would be interesting to enable CONFIG_DMAR and check whether the problem goes away. If so, we can start looking harder at the swiotlb code. -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/