From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: WARN_ON(irqs_disabled()) in dma_free_attrs? Date: Fri, 2 Mar 2018 22:37:11 +0100 Message-ID: <20180302213711.GA30356@lst.de> References: <20180302180704.GA3846@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180302180704.GA3846-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Fredrik Noring Cc: =?iso-8859-1?Q?J=FCrgen?= Urban , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Christoph Hellwig List-Id: iommu@lists.linux-foundation.org On Fri, Mar 02, 2018 at 07:07:06PM +0100, Fredrik Noring wrote: > What is the best way to proceed? Can dma_free_attrs be reworked to handle > disabled IRQs? Why do you want to free coherent dma allocations from irq context? They generally are a long-term resource that as a rule of thumb should be allocated in ->probe and freed in ->remove.