From: Jun Kamada <kama@jp.fujitsu.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: kama@jp.fujitsu.com, xen-devel@lists.xensource.com,
Hollis Blanchard <hollisb@us.ibm.com>
Subject: Re: Re: [Xen-changelog] [linux-2.6.18-xen] Add "#ifdef ARCH_HAS_DEV_MEM" to archtecture specific file_operations.
Date: Wed, 11 Jul 2007 14:44:11 +0900 [thread overview]
Message-ID: <20070711143610.7F6E.KAMA@jp.fujitsu.com> (raw)
In-Reply-To: <C2B514FB.A791%Keir.Fraser@cl.cam.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
Keir-san and Hollis-san,
On Sat, 07 Jul 2007 10:01:31 +0100
Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:
> We define it in asm/mach-xen/asm/io.h.
>
> However, the patch *is* of questionable value. It guards the only non-static
> definition in the file with #ifdef ARCH_HAS_DEV_MEM. Which begs the question
> why you would build the file at all if !ARCH_HAS_DEV_MEM. I'll revert it.
I'm sorry that I had posted the incomplete patch. I will attach a new
one modified. The patch resolves ploblems mentioned above?
Best regards,
-----
Jun Kamada
Linux Technology Development Div.
Server Systems Unit
Fujitsu Ltd.
kama@jp.fujitsu.com
[-- Attachment #2: add_ifdef_arch_has_dev_mem.patch --]
[-- Type: application/octet-stream, Size: 1157 bytes --]
# HG changeset patch
# User Jun Kamada <kama@jp.fujitsu.com>
# Date 1184125315 -32400
# Node ID d427a098231e8aba4c930d9b54fce4be52952a53
# Parent 86ac3059ab675a1c80ab02be513afb57b5e63efa
ARCH_HAS_DEV_MEM for read_mem() and write_mem() in drivers/xen/char/mem.c
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
diff -r 86ac3059ab67 -r d427a098231e drivers/xen/char/mem.c
--- a/drivers/xen/char/mem.c Tue Jul 10 11:18:07 2007 -0600
+++ b/drivers/xen/char/mem.c Wed Jul 11 12:41:55 2007 +0900
@@ -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)
@@ -196,8 +198,10 @@ static int open_mem(struct inode * inode
const struct file_operations mem_fops = {
.llseek = memory_lseek,
+#ifdef ARCH_HAS_DEV_MEM
.read = read_mem,
.write = write_mem,
+#endif
.mmap = xen_mmap_mem,
.open = open_mem,
};
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2007-07-11 5:44 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 ` [Xen-changelog] [linux-2.6.18-xen] Add "#ifdef ARCH_HAS_DEV_MEM" to archtecture specific file_operations Hollis Blanchard
2007-07-07 9:01 ` 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 [this message]
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=20070711143610.7F6E.KAMA@jp.fujitsu.com \
--to=kama@jp.fujitsu.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=hollisb@us.ibm.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.