mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: schwidefsky@de.ibm.com
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, NeilBrown <neilb@suse.de>,
	linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: 2.6.22-rc1-mm1 - s390 vs. md
Date: Wed, 23 May 2007 10:46:39 +0200	[thread overview]
Message-ID: <20070523104639.6bc0650e@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <1179907539.17849.16.camel@localhost>

On Wed, 23 May 2007 10:05:39 +0200,
Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:

> We are trying to get rid of dma-mapping.h, see the last change to the
> file with commit 411f0f3edc141a582190d3605cadd1d993abb6df. I don't think
> we should reintroduce dma related definition but split the async_tx in a
> way that allows to compile it on an architecture with CONFIG_NO_DMA=y
> (yes I know that is harder that to just add the dma stubs).
> You've said that there is a software implementation if there is no dma
> engine present. This software implementation should be independent of
> dma-mapping.h. Without having looked at the code, isn't it possible to
> isolate that software implementation into its own C file? That would be
> the only one that gets compiled for s390.

Taking a quick look at the async_*.c stuff, the functions in question
basically seem to be of the form

check_if_we_can_do_it_async();
if (async_ok) {
	/* do async stuff */
	/* that's where the dma mapping creeps in */
} else {
	/* do it sync */
	/* seems fine for us */
}

So you should be able to factor out (say) async_memset_{sync,async}()
and put it into async_memset_{sync,async}.c. async_memset() would then
be

async_memset()
{
#if CONFIG_HAS_DMA
	if (check_if_we_can_do_at_async())
		async_memset_async();
#endif
	return async_memset_sync();
}

Kconfig could then do

config ASYNC_MEMSET
	default m
	tristate "async_memset support"
	select ASYNC_MEMSET_ASYNC if HAS_DMA

config ASYNC_MEMSET_ASYNC
	depends on HAS_DMA
	tristate "async_memset async via dma support"

Thoughts?

  reply	other threads:[~2007-05-23  8:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17  6:36 Williams, Dan J
2007-05-18  5:39 ` Cornelia Huck
2007-05-18 16:30   ` Williams, Dan J
2007-05-21  7:24     ` Cornelia Huck
2007-05-21  8:52       ` Williams, Dan J
2007-05-23  0:25       ` Williams, Dan J
2007-05-23  8:05         ` Martin Schwidefsky
2007-05-23  8:46           ` Cornelia Huck [this message]
2007-05-23  8:55             ` Martin Schwidefsky
2007-05-24 22:11             ` Williams, Dan J
2007-05-25  6:02               ` Cornelia Huck
  -- strict thread matches above, loose matches on Subject: below --
2007-05-16  3:19 2.6.22-rc1-mm1 Andrew Morton
2007-05-16  7:57 ` 2.6.22-rc1-mm1 - s390 vs. md Cornelia Huck
2007-05-16 17:21   ` Williams, Dan J

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070523104639.6bc0650e@gondolin.boeblingen.de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®