All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: davem@davemloft.net, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparc: use asm-generic/scatterlist.h
Date: Tue, 02 Mar 2010 12:03:25 +0000	[thread overview]
Message-ID: <201003021303.26064.arnd@arndb.de> (raw)
In-Reply-To: <20100302123326H.fujita.tomonori@lab.ntt.co.jp>

On Tuesday 02 March 2010, FUJITA Tomonori wrote:
> If we go with such approach, then we could use something like the
> following. There are only two kinds of scatterlist definitions (use
> dma_length or not) so we can cover all the architectures.
> 
> diff --git a/include/asm-generic/scatterlist.h b/include/asm-generic/scatterlist.h
> index 8b94544..1bf620d 100644
> --- a/include/asm-generic/scatterlist.h
> +++ b/include/asm-generic/scatterlist.h
> @@ -11,7 +11,9 @@ struct scatterlist {
>         unsigned int    offset;
>         unsigned int    length;
>         dma_addr_t      dma_address;
> +#ifdef CONFIG_NEED_SG_DMA_LENGTH
>         unsigned int    dma_length;
> +#endif
>  };

Yes, that sounds good. If the only reason to need dma_length is virtual merging,
a clearer (from the Kconfig perspective, not from the implementation) name 
might be CONFIG_HAVE_IOMMU_VMERGE, similar to the CONFIG_IOMMU_VMERGE option
on PPC64 that determines the default for the virtual merging runtime option.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: davem@davemloft.net, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sparc: use asm-generic/scatterlist.h
Date: Tue, 2 Mar 2010 13:03:25 +0100	[thread overview]
Message-ID: <201003021303.26064.arnd@arndb.de> (raw)
In-Reply-To: <20100302123326H.fujita.tomonori@lab.ntt.co.jp>

On Tuesday 02 March 2010, FUJITA Tomonori wrote:
> If we go with such approach, then we could use something like the
> following. There are only two kinds of scatterlist definitions (use
> dma_length or not) so we can cover all the architectures.
> 
> diff --git a/include/asm-generic/scatterlist.h b/include/asm-generic/scatterlist.h
> index 8b94544..1bf620d 100644
> --- a/include/asm-generic/scatterlist.h
> +++ b/include/asm-generic/scatterlist.h
> @@ -11,7 +11,9 @@ struct scatterlist {
>         unsigned int    offset;
>         unsigned int    length;
>         dma_addr_t      dma_address;
> +#ifdef CONFIG_NEED_SG_DMA_LENGTH
>         unsigned int    dma_length;
> +#endif
>  };

Yes, that sounds good. If the only reason to need dma_length is virtual merging,
a clearer (from the Kconfig perspective, not from the implementation) name 
might be CONFIG_HAVE_IOMMU_VMERGE, similar to the CONFIG_IOMMU_VMERGE option
on PPC64 that determines the default for the virtual merging runtime option.

	Arnd

  reply	other threads:[~2010-03-02 12:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26  0:43 [PATCH] sparc: use asm-generic/scatterlist.h FUJITA Tomonori
2010-02-26  0:43 ` FUJITA Tomonori
2010-02-26 12:35 ` David Miller
2010-02-26 12:35   ` David Miller
2010-03-01  6:05   ` FUJITA Tomonori
2010-03-01  6:05     ` FUJITA Tomonori
2010-03-01  7:03     ` David Miller
2010-03-01  7:03       ` David Miller
2010-03-01 11:29     ` Arnd Bergmann
2010-03-01 11:29       ` Arnd Bergmann
2010-03-02  3:33       ` FUJITA Tomonori
2010-03-02  3:33         ` FUJITA Tomonori
2010-03-02 12:03         ` Arnd Bergmann [this message]
2010-03-02 12:03           ` Arnd Bergmann
2010-03-02 12:25           ` FUJITA Tomonori
2010-03-02 12:25             ` FUJITA Tomonori
2010-03-02 13:38             ` Arnd Bergmann
2010-03-02 13:38               ` Arnd Bergmann
2010-03-02 13:49               ` FUJITA Tomonori
2010-03-02 13:49                 ` FUJITA Tomonori
2010-03-02 13:54                 ` Arnd Bergmann
2010-03-02 13:54                   ` Arnd Bergmann
2010-03-02 13:55                   ` David Miller
2010-03-02 13:55                     ` David Miller
2010-03-02 14:06                     ` FUJITA Tomonori
2010-03-02 14:06                       ` FUJITA Tomonori

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=201003021303.26064.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.