All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: xen-devel@lists.xensource.com, xen-ia64-devel@lists.xensource.com
Subject: Re: [PATCH] MAX_DMADOM_PFN
Date: Thu, 26 Jan 2006 14:03:46 -0600	[thread overview]
Message-ID: <20060126200345.GE17021@us.ibm.com> (raw)
In-Reply-To: <20060126011920.GB4354@valinux.co.jp>

On Thu, Jan 26, 2006 at 10:19:20AM +0900, Isaku Yamahata wrote:
> 
> made MAX_DMADOM_PFN page size aware.
> 4K page size was assumed, however it is not true for xen/ia64.
> It should also be possible for arch dependent code to override it.
> 
> # HG changeset patch
> # User yamahata@valinux.co.jp
> # Node ID 0c2b703c79333c01e4cccef1fbac1d01c6c7daa7
> # Parent  5b004f4e76cf90ef6f7155a4822e63b9e33cf7d8
> made MAX_DMADOM_PFN aware of page size.
> 4K page size was assumed. It is not true for xen/ia64 by default.
> It should also be possible for arch dependent code to override it.
> 
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> 
> diff -r 5b004f4e76cf -r 0c2b703c7933 xen/common/page_alloc.c
> --- a/xen/common/page_alloc.c	Wed Jan 25 23:35:22 2006 +0100
> +++ b/xen/common/page_alloc.c	Thu Jan 26 10:09:39 2006 +0900
> @@ -216,7 +216,9 @@
>  #define NR_ZONES    3
>  
>  
> -#define MAX_DMADOM_PFN 0x7FFFFUL /* 31 addressable bits */
> +#ifndef MAX_DMADOM_PFN /* arch-depedent code can override */
> +#define MAX_DMADOM_PFN (0x7FFFFFFFUL >> PAGE_SHIFT) /* 31 addressable bits */
> +#endif
>  #define pfn_dom_zone_type(_pfn)                                 \
>      (((_pfn) <= MAX_DMADOM_PFN) ? MEMZONE_DMADOM : MEMZONE_DOM)

Why only 31bits?

Also, wouldn't it be better to define this in <asm/dma.h>?  x86-64 added
similar #defines to include/asm-x86_64/dma.h relatively recently (see
MAX_DMA32_PFN).  This would be a good model to follow.

Thanks,
Jon

>  
> 
> -- 
> yamahata

> # HG changeset patch
> # User yamahata@valinux.co.jp
> # Node ID 0c2b703c79333c01e4cccef1fbac1d01c6c7daa7
> # Parent  5b004f4e76cf90ef6f7155a4822e63b9e33cf7d8
> made MAX_DMADOM_PFN aware of page size.
> 4K page size was assumed. It is not true for xen/ia64 by default.
> It should also be possible for arch dependent code to override it.
> 
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> 
> diff -r 5b004f4e76cf -r 0c2b703c7933 xen/common/page_alloc.c
> --- a/xen/common/page_alloc.c	Wed Jan 25 23:35:22 2006 +0100
> +++ b/xen/common/page_alloc.c	Thu Jan 26 10:09:39 2006 +0900
> @@ -216,7 +216,9 @@
>  #define NR_ZONES    3
>  
>  
> -#define MAX_DMADOM_PFN 0x7FFFFUL /* 31 addressable bits */
> +#ifndef MAX_DMADOM_PFN /* arch-depedent code can override */
> +#define MAX_DMADOM_PFN (0x7FFFFFFFUL >> PAGE_SHIFT) /* 31 addressable bits */
> +#endif
>  #define pfn_dom_zone_type(_pfn)                                 \
>      (((_pfn) <= MAX_DMADOM_PFN) ? MEMZONE_DMADOM : MEMZONE_DOM)
>  

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2006-01-26 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26  1:19 [PATCH] MAX_DMADOM_PFN Isaku Yamahata
2006-01-26 20:03 ` Jon Mason [this message]
2006-01-30  3:07   ` Isaku Yamahata
2006-01-30 10:27     ` Keir Fraser

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=20060126200345.GE17021@us.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xen-ia64-devel@lists.xensource.com \
    --cc=yamahata@valinux.co.jp \
    /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.