From: Hollis Blanchard <hollisb@us.ibm.com>
To: xen-devel@lists.xensource.com
Cc: Jun Kamada <kama@jp.fujitsu.com>
Subject: Re: [Xen-changelog] [linux-2.6.18-xen] Add "#ifdef ARCH_HAS_DEV_MEM" to archtecture specific file_operations.
Date: Fri, 06 Jul 2007 15:25:55 -0500 [thread overview]
Message-ID: <1183753555.3008.24.camel@basalt> (raw)
In-Reply-To: <200707061715.l66HF2Ns030133@xenbits.xensource.com>
This is producing warnings for me on PowerPC, which does not define
ARCH_HAS_DEV_MEM:
/home/hollisb/source/linux-2.6.18-xen-ppc.hg/drivers/xen/char/mem.c:151:
warning: 'xen_mmap_mem' defined but not used
/home/hollisb/source/linux-2.6.18-xen-ppc.hg/drivers/xen/char/mem.c:172:
warning: 'memory_lseek' defined but not used
/home/hollisb/source/linux-2.6.18-xen-ppc.hg/drivers/xen/char/mem.c:195:
warning: 'open_mem' defined but not used
As far as I can see, x86 does not define ARCH_HAS_DEV_MEM either, so
should see the same problem?
On Fri, 2007-07-06 at 10:15 -0700, Xen patchbot-linux-2.6.18-xen wrote:
> # HG changeset patch
> # User kfraser@localhost.localdomain
> # Date 1183728779 -3600
> # Node ID 4a08141e62ca189577041d8854bb478e5fbe502f
> # Parent 9e66b8728bd3a5d857500117c421051ae7dd0d61
> Add "#ifdef ARCH_HAS_DEV_MEM" to archtecture specific file_operations.
> Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
> ---
> drivers/xen/Kconfig | 4 ++++
> drivers/xen/char/Makefile | 3 +--
> drivers/xen/char/mem.c | 4 ++++
> 3 files changed, 9 insertions(+), 2 deletions(-)
>
> diff -r 9e66b8728bd3 -r 4a08141e62ca drivers/xen/Kconfig
> --- a/drivers/xen/Kconfig Fri Jul 06 14:01:27 2007 +0100
> +++ b/drivers/xen/Kconfig Fri Jul 06 14:32:59 2007 +0100
> @@ -281,4 +281,8 @@ config XEN_XENCOMM
> config XEN_XENCOMM
> bool
>
> +config XEN_DEVMEM
> + bool
> + default y
> +
> endif
> diff -r 9e66b8728bd3 -r 4a08141e62ca drivers/xen/char/Makefile
> --- a/drivers/xen/char/Makefile Fri Jul 06 14:01:27 2007 +0100
> +++ b/drivers/xen/char/Makefile Fri Jul 06 14:32:59 2007 +0100
> @@ -1,2 +1,1 @@
> -
> -obj-y := mem.o
> +obj-$(CONFIG_XEN_DEVMEM) := mem.o
> diff -r 9e66b8728bd3 -r 4a08141e62ca drivers/xen/char/mem.c
> --- a/drivers/xen/char/mem.c Fri Jul 06 14:01:27 2007 +0100
> +++ b/drivers/xen/char/mem.c Fri Jul 06 14:32:59 2007 +0100
> @@ -33,6 +33,7 @@ static inline int valid_phys_addr_range(
> }
> #endif
>
> +#ifdef ARCH_HAS_DEV_MEM
> /*
> * This funcion reads the *physical* memory. The f_pos points directly to the
> * memory location.
> @@ -135,6 +136,7 @@ static ssize_t write_mem(struct file * f
> *ppos += written;
> return written;
> }
> +#endif
>
> #ifndef ARCH_HAS_DEV_MEM_MMAP_MEM
> static inline int uncached_access(struct file *file)
> @@ -194,6 +196,7 @@ static int open_mem(struct inode * inode
> return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
> }
>
> +#ifdef ARCH_HAS_DEV_MEM
> const struct file_operations mem_fops = {
> .llseek = memory_lseek,
> .read = read_mem,
> @@ -201,3 +204,4 @@ const struct file_operations mem_fops =
> .mmap = xen_mmap_mem,
> .open = open_mem,
> };
> +#endif
>
> _______________________________________________
> Xen-changelog mailing list
> Xen-changelog@lists.xensource.com
> http://lists.xensource.com/xen-changelog
--
Hollis Blanchard
IBM Linux Technology Center
next parent reply other threads:[~2007-07-06 20:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707061715.l66HF2Ns030133@xenbits.xensource.com>
2007-07-06 20:25 ` Hollis Blanchard [this message]
2007-07-07 9:01 ` Re: [Xen-changelog] [linux-2.6.18-xen] Add "#ifdef ARCH_HAS_DEV_MEM" to archtecture specific file_operations Keir Fraser
2007-07-09 19:20 ` Hollis Blanchard
2007-07-09 19:26 ` Keir Fraser
2007-07-09 19:41 ` Hollis Blanchard
2007-07-09 20:23 ` [XenPPC] " Jimi Xenidis
2007-07-09 21:20 ` Jimi Xenidis
2007-07-11 5:44 ` Jun Kamada
2007-07-11 10:00 ` Keir Fraser
2007-07-12 11:05 ` Jun Kamada
2007-07-13 2:42 ` [Xen-devel] Re: [Xen-changelog] [linux-2.6.18-xen] Add "#ifdefARCH_HAS_DEV_MEM" " Akio Takebe
2007-07-13 12:54 ` Keir Fraser
2007-07-13 14:54 ` Isaku Yamahata
2007-07-13 15:09 ` 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=1183753555.3008.24.camel@basalt \
--to=hollisb@us.ibm.com \
--cc=kama@jp.fujitsu.com \
--cc=xen-devel@lists.xensource.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 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.