ia64/xen-unstable

changeset 4615:acc1ae9083e5

bitkeeper revision 1.1354 (4267978fFQb5kQkxkvTFxgEKkOUzLQ)

Enable the ProcFS part of grant table only when CONFIG_PROC_FS is defined.
This is also necessary for separate driver domains that contain block
device backend driver and operate in kernel-mode only (thus ProcFS turned off).

Signed-off-by: Bin Ren <bin.ren@cl.cam.ac.uk>
author bren@br260.wolfson.cam.ac.uk
date Thu Apr 21 12:07:43 2005 +0000 (2005-04-21)
parents 1de9eed58522
children 6a086854f9a8
files linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c	Thu Apr 21 11:35:36 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c	Thu Apr 21 12:07:43 2005 +0000
     1.3 @@ -53,10 +53,6 @@ static grant_ref_t gnttab_free_head;
     1.4  
     1.5  static grant_entry_t *shared;
     1.6  
     1.7 -/* /proc/xen/grant */
     1.8 -static struct proc_dir_entry *grant_pde;
     1.9 -
    1.10 -
    1.11  /*
    1.12   * Lock-free grant-entry allocator
    1.13   */
    1.14 @@ -243,6 +239,14 @@ gnttab_release_grant_reference( grant_re
    1.15      *private_head = release;
    1.16  }
    1.17  
    1.18 +/*
    1.19 + * ProcFS operations
    1.20 + */
    1.21 +
    1.22 +#ifdef CONFIG_PROC_FS
    1.23 +
    1.24 +static struct proc_dir_entry *grant_pde;
    1.25 +
    1.26  static int grant_ioctl(struct inode *inode, struct file *file,
    1.27                         unsigned int cmd, unsigned long data)
    1.28  {
    1.29 @@ -319,6 +323,7 @@ static int grant_write(struct file *file
    1.30      return -ENOSYS;
    1.31  }
    1.32  
    1.33 +#endif /* CONFIG_PROC_FS */
    1.34  
    1.35  int gnttab_resume(void)
    1.36  {
    1.37 @@ -360,6 +365,7 @@ static int __init gnttab_init(void)
    1.38      for ( i = 0; i < NR_GRANT_ENTRIES; i++ )
    1.39          gnttab_free_list[i] = i + 1;
    1.40      
    1.41 +#ifdef CONFIG_PROC_FS
    1.42      /*
    1.43       *  /proc/xen/grant : used by libxc to access grant tables
    1.44       */
    1.45 @@ -376,6 +382,7 @@ static int __init gnttab_init(void)
    1.46  
    1.47      grant_pde->read_proc  = &grant_read;
    1.48      grant_pde->write_proc = &grant_write;
    1.49 +#endif
    1.50  
    1.51      printk("Grant table initialized\n");
    1.52      return 0;