From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547AbYIEG5B (ORCPT ); Fri, 5 Sep 2008 02:57:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751051AbYIEG4y (ORCPT ); Fri, 5 Sep 2008 02:56:54 -0400 Received: from ns.suse.de ([195.135.220.2]:55848 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750986AbYIEG4x (ORCPT ); Fri, 5 Sep 2008 02:56:53 -0400 Date: Fri, 05 Sep 2008 08:56:52 +0200 Message-ID: From: Takashi Iwai To: Oliver Neukum Cc: Dmitry Baryshkov , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: warning on device removal In-Reply-To: <200809041436.49083.oliver@neukum.org> References: <20080904122022.GA550@doriath.ww600.siemens.net> <200809041436.49083.oliver@neukum.org> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.2 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 4 Sep 2008 14:36:48 +0200, Oliver Neukum wrote: > > Am Donnerstag 04 September 2008 14:20:22 schrieb Dmitry Baryshkov: > > Hi, > > > > I've got the following trace on one of my arm boards when removing > > the usb masstorage device: > > > > ------------[ cut here ]------------ > > WARNING: at /home/lumag/tosa-tree/arch/arm/mm/consistent.c:368 dma_free_coherent+0x34/0x248() > > Modules linked in: > > [] (dump_stack+0x0/0x14) from [] (warn_on_slowpath+0x4c/0x84) > > [] (warn_on_slowpath+0x0/0x84) from [] (dma_free_coherent+0x34/0x248) > > Looks like a principal problem we have with that architecture. > Is arm incapable of supporting buffer freeing in hard irq context > or do we use the wrong API? According to DMA-API.txt, dma_free_coherent() must be called with IRQ enabled: > void > dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, > dma_addr_t dma_handle) ... > Note that unlike their sibling allocation calls, these routines > may only be called with IRQs enabled. Takashi