Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761239AbYBAVbg (ORCPT ); Fri, 1 Feb 2008 16:31:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758478AbYBAVba (ORCPT ); Fri, 1 Feb 2008 16:31:30 -0500 Received: from an-out-0708.google.com ([209.85.132.250]:18771 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756399AbYBAVb3 (ORCPT ); Fri, 1 Feb 2008 16:31:29 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=dlOdoU2/wLSFpiqywnx4HvW/+3sUKpWolRl6nLCabPxwLquawQa3gPhTAGY4NogngHdK7MGHs7qGKzfnUDmazqqNQGoA/c7f2u0lpkDTbLtdQ7M3D8mJ3PhZrV67VOjuVOf3SJ8HOvnSWoZbSs/0IAAWHHUFlkRODGrlqJNGlsg= Message-ID: Date: Fri, 1 Feb 2008 14:31:28 -0700 From: "Dan Williams" To: "Cornelia Huck" Subject: Re: crypto/async_tx/* doesn't build on s390 Cc: heiko.carstens@de.ibm.com, herbert@gondor.apana.org.au, neilb@suse.de, schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org In-Reply-To: <20080201123738.24988af7@gondolin.boeblingen.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <0C7297FA1D2D244A9C7F6959C0BF1E521D1C6C@azsmsx413.amr.corp.intel.com> <20080201123738.24988af7@gondolin.boeblingen.de.ibm.com> X-Google-Sender-Auth: f667cd398cc58fb8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1924 Lines: 54 On Feb 1, 2008 4:37 AM, Cornelia Huck wrote: > On Thu, 31 Jan 2008 12:49:00 -0700, > "Williams, Dan J" wrote: > > > I am mistaken, the 'depends on ARCH...' precludes HAS_DMA. Perhaps the compiler is emitting a call to async_tx_find_channel when it needs to be inline? On x86 do_async_xor is successfully compiled away when CONFIG_DMA_ENGINE=n. > > Just checked why it compiled for me on one box but not on the other and > found that deactivating CONFIG_SECTION_MISMATCH makes it go away. Hmm... > Here is what I have come up with as a fix. -- Dan --- async_tx: prevent do_async_xor from compiling on !HAS_DMA archs With the addition of -fno-inline in CONFIG_DEBUG_SECTION_MISMATCH do_async_xor is no longer compiled away on !HAS_DMA archs like s390. Other async_tx calls to the dma-api are already open coded inline. Signed-off-by: Dan Williams --- crypto/async_tx/async_xor.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c index 2575f67..393f07d 100644 --- a/crypto/async_tx/async_xor.c +++ b/crypto/async_tx/async_xor.c @@ -41,6 +41,14 @@ do_async_xor(struct dma_async_tx_descriptor *tx, struct dma_device *device, enum dma_data_direction dir; int i; + /* if this function is not inlined we need to prevent + * the rest of the routine from compiling on !HAS_DMA + * archs + */ + #ifndef CONFIG_DMA_ENGINE + return; + #endif + pr_debug("%s: len: %zu\n", __FUNCTION__, len); dir = (flags & ASYNC_TX_ASSUME_COHERENT) ? -- 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/