From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754219Ab1AZUMT (ORCPT ); Wed, 26 Jan 2011 15:12:19 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:44211 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754162Ab1AZUMQ (ORCPT ); Wed, 26 Jan 2011 15:12:16 -0500 Date: Wed, 26 Jan 2011 20:10:00 +0000 From: Russell King - ARM Linux To: David Rientjes Cc: Andrew Morton , Ralf Baechle , Kyle McMartin , James Bottomley , Benjamin Herrenschmidt , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , "David S. Miller" , Greg Kroah-Hartman , Randy Dunlap , x86@kernel.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch] kconfig: unify GENERIC_ISA_DMA and ISA_DMA_API Message-ID: <20110126201000.GB7323@n2100.arm.linux.org.uk> References: <20110126112908.GD2562@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2011 at 12:00:08PM -0800, David Rientjes wrote: > On Wed, 26 Jan 2011, Russell King - ARM Linux wrote: > > > On Tue, Jan 25, 2011 at 05:06:28PM -0800, David Rientjes wrote: > > > CONFIG_GENERIC_ISA_DMA and CONFIG_ISA_DMA_API usually have dependencies > > > on one another depending on the architecture and generic kernel code uses > > > either to determine whether an ISA-style DMA API is configured. > > > > Wrong. > > > > GENERIC_ISA_DMA enables support for the standard ISA DMA allocator found > > in kernel/dma.c > > > > ISA_DMA_API says that a platform supports the ISA DMA interfaces. > > > > An architecture can provide the ISA DMA interfaces, but not use the > > standard ISA DMA allocator found in kernel/dma.c. Such as the one in > > arch/arm/kernel/dma.c. > > > > So on ARM, we have platforms where ISA_DMA_API=y but GENERIC_ISA_DMA=n. > > > > Ok, fair enough. Thanks for pointing that out. I'll work to resolve the > existing dependency chain on x86 that cause build failures when one is > disabled and another is not and add Kconfig dependencies on drivers that > require GENERIC_ISA_DMA. Drivers should depend on ISA_DMA_API as that indicates that the ISA DMA API is present - in other words, when the following are available from an architecture/platform: dma_spin_lock claim_dma_lock release_dma_lock enable_dma disable_dma clear_dma_ff set_dma_mode set_dma_page set_dma_addr set_dma_count get_dma_residue request_dma free_dma GENERIC_ISA_DMA should be set by an architecture/platform when ISA_DMA_API has already been set -and- it wants to use kernel/dma.c. No drivers should depend on GENERIC_ISA_DMA.