All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun Kamada <kama@jp.fujitsu.com>
To: Jan Beulich <jbeulich@novell.com>
Cc: kama@jp.fujitsu.com, xen-devel@lists.xensource.com,
	xen-ia64-devel@lists.xensource.com
Subject: Re: [Patch] ARCH_HAS_DEV_MEM patch for Xwindow on IA64machine
Date: Fri, 06 Jul 2007 18:46:56 +0900	[thread overview]
Message-ID: <20070706184433.BDC0.KAMA@jp.fujitsu.com> (raw)
In-Reply-To: <468BA902.76E4.0078.0@novell.com>

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

Hi, Jan-san,

On Wed, 04 Jul 2007 13:04:50 +0100
"Jan Beulich" <jbeulich@novell.com> wrote:
> >--- a/drivers/xen/Makefile	Thu Jun 21 15:12:20 2007 +0900
> >+++ b/drivers/xen/Makefile	Thu Jun 21 15:13:21 2007 +0900
> >@@ -5,9 +5,9 @@ obj-y	+= xenbus/
> > obj-y	+= xenbus/
> > obj-y	+= gntdev/
> > obj-y	+= balloon/
> >-obj-y	+= char/
> > 
> > obj-y	+= util.o
> >+obj-$(CONFIG_XEN_DEVMEM)		+= char/
> > obj-$(CONFIG_XEN_BLKDEV_BACKEND)	+= blkback/
> > obj-$(CONFIG_XEN_BLKDEV_TAP)		+= blktap/
> > obj-$(CONFIG_XEN_NETDEV_BACKEND)	+= netback/
> 
> This is certainly wrong. Even if driver/xen/char/ currently only has a
> single file, you should descend into that directory. The conditional
> (if needed at all) should then be in driver/xen/char/Makefile.

I modified the patch acording to your comment.

Thanks,

-----
Jun Kamada
Linux Technology Development Div.
Server Systems Unit
Fujitsu Ltd.
kama@jp.fujitsu.com

[-- Attachment #2: ifdef_arch_has_dev_mem.patch --]
[-- Type: application/octet-stream, Size: 1786 bytes --]

# HG changeset patch
# User Jun Kamada <kama@jp.fujitsu.com>
# Date 1183747330 -32400
# Node ID 2ddfe7a08970b5580ef5b53fa1abe0126b9fdf9e
# Parent  e9426682eb0c31a8a4d25363eb2d180f493d01d5
Add "#ifdef ARCH_HAS_DEV_MEM" to archtecture specific file_operations.

Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>

diff -r e9426682eb0c -r 2ddfe7a08970 drivers/xen/Kconfig
--- a/drivers/xen/Kconfig	Thu Jul 05 14:36:59 2007 -0600
+++ b/drivers/xen/Kconfig	Sat Jul 07 03:42:10 2007 +0900
@@ -274,4 +274,8 @@ config XEN_SMPBOOT
 	default y
 	depends on SMP
 
+config XEN_DEVMEM
+	bool
+	default y
+
 endif
diff -r e9426682eb0c -r 2ddfe7a08970 drivers/xen/char/Makefile
--- a/drivers/xen/char/Makefile	Thu Jul 05 14:36:59 2007 -0600
+++ b/drivers/xen/char/Makefile	Sat Jul 07 03:42:10 2007 +0900
@@ -1,2 +1,1 @@
-
-obj-y	:= mem.o
+obj-$(CONFIG_XEN_DEVMEM)	:= mem.o
diff -r e9426682eb0c -r 2ddfe7a08970 drivers/xen/char/mem.c
--- a/drivers/xen/char/mem.c	Thu Jul 05 14:36:59 2007 -0600
+++ b/drivers/xen/char/mem.c	Sat Jul 07 03:42:10 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)
@@ -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

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

      parent reply	other threads:[~2007-07-06  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04 11:43 [Patch] ARCH_HAS_DEV_MEM patch for Xwindow on IA64 machine Jun Kamada
2007-07-04 12:04 ` [Patch] ARCH_HAS_DEV_MEM patch for Xwindow on IA64machine Jan Beulich
2007-07-04 12:24   ` [Xen-devel] [Patch] ARCH_HAS_DEV_MEM patch for Xwindow onIA64machine Akio Takebe
2007-07-06  9:46   ` Jun Kamada [this message]

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=20070706184433.BDC0.KAMA@jp.fujitsu.com \
    --to=kama@jp.fujitsu.com \
    --cc=jbeulich@novell.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xen-ia64-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.