ia64/xen-unstable

changeset 7514:5a4893a537ca

Minor driver code changes/rearrangement to reduce ia64-specific patches
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
author djm@kirby.fc.hp.com
date Fri Nov 04 10:40:29 2005 -0600 (2005-11-04)
parents b4263a0216a9
children dd0db9019177
files linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/console.c.patch linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/devmem.c.patch linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/gnttab.c.patch linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/privcmd.c.patch linux-2.6-xen-sparse/arch/xen/kernel/devmem.c linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/console/console.c linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6-xen-sparse/include/asm-xen/asm-ia64/fixmap.h linux-2.6-xen-sparse/include/asm-xen/asm-ia64/synch_bitops.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/console.c.patch	Thu Nov 03 21:37:29 2005 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/console.c.patch	Fri Nov 04 10:40:29 2005 -0600
     1.3 @@ -1,15 +1,5 @@
     1.4  --- xen/console/console.c	2005-11-02 14:13:07.000000000 +0100
     1.5  +++ xen.patched/console/console.c	2005-11-02 14:21:20.000000000 +0100
     1.6 -@@ -196,6 +196,9 @@
     1.7 - void xen_console_init(void)
     1.8 - #endif
     1.9 - {
    1.10 -+	if (xen_init() < 0)
    1.11 -+		return __RETCODE;
    1.12 -+
    1.13 - 	if (xen_start_info->flags & SIF_INITDOMAIN) {
    1.14 - 		if (xc_mode == XC_DEFAULT)
    1.15 - 			xc_mode = XC_SERIAL;
    1.16  @@ -768,9 +771,15 @@
    1.17   #endif
    1.18   
     2.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/devmem.c.patch	Thu Nov 03 21:37:29 2005 -0600
     2.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/devmem.c.patch	Fri Nov 04 10:40:29 2005 -0600
     2.3 @@ -1,13 +1,3 @@
     2.4  diff -Naur xen/core/devmem.c xen.patched/core/devmem.c
     2.5  --- xen/core/devmem.c	2005-09-23 10:54:50.000000000 -0600
     2.6  +++ xen.patched/core/devmem.c	2005-09-23 10:57:51.000000000 -0600
     2.7 -@@ -93,6 +93,9 @@
     2.8 - 	if (uncached_access(file))
     2.9 - 		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
    2.10 - 
    2.11 -+#ifdef __ia64__
    2.12 -+#define	direct_remap_pfn_range(a,b,c,d,e,f)	remap_pfn_range(a,b,c,d,e)
    2.13 -+#endif
    2.14 - 	if (direct_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
    2.15 - 				   vma->vm_end - vma->vm_start,
    2.16 - 				   vma->vm_page_prot, DOMID_IO))
     3.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/gnttab.c.patch	Thu Nov 03 21:37:29 2005 -0600
     3.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/gnttab.c.patch	Fri Nov 04 10:40:29 2005 -0600
     3.3 @@ -1,17 +1,6 @@
     3.4  diff -Naur xen/core/gnttab.c xen.patched/core/gnttab.c
     3.5  --- xen/core/gnttab.c	2005-09-23 10:54:50.000000000 -0600
     3.6  +++ xen.patched/core/gnttab.c	2005-09-23 10:57:51.000000000 -0600
     3.7 -@@ -19,6 +19,10 @@
     3.8 - #include <asm-xen/gnttab.h>
     3.9 - #include <asm/synch_bitops.h>
    3.10 - 
    3.11 -+#ifdef __ia64__
    3.12 -+#define synch_cmpxchg	ia64_cmpxchg4_acq
    3.13 -+#endif
    3.14 -+
    3.15 - #if 1
    3.16 - #define ASSERT(_p)							      \
    3.17 - 	if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
    3.18  @@ -346,6 +350,10 @@
    3.19   	if ( hypercall.op != __HYPERVISOR_grant_table_op )
    3.20   		return -ENOSYS;
    3.21 @@ -45,17 +34,6 @@ diff -Naur xen/core/gnttab.c xen.patched
    3.22   
    3.23   	return 0;
    3.24   }
    3.25 -@@ -434,8 +448,10 @@
    3.26 - {
    3.27 - 	int i;
    3.28 - 
    3.29 -+#ifndef __ia64__
    3.30 - 	for (i = 0; i < NR_GRANT_FRAMES; i++)
    3.31 - 		clear_fixmap(FIX_GNTTAB_END - i);
    3.32 -+#endif
    3.33 - 
    3.34 - 	return 0;
    3.35 - }
    3.36  @@ -450,7 +466,9 @@
    3.37   
    3.38   	BUG_ON(gnttab_resume());
     4.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/privcmd.c.patch	Thu Nov 03 21:37:29 2005 -0600
     4.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/privcmd.c.patch	Fri Nov 04 10:40:29 2005 -0600
     4.3 @@ -1,16 +1,6 @@
     4.4  diff -Naur xen/privcmd/privcmd.c xen.patched/privcmd/privcmd.c
     4.5  --- xen/privcmd/privcmd.c	2005-09-23 10:54:50.000000000 -0600
     4.6  +++ xen.patched/privcmd/privcmd.c	2005-09-23 10:57:51.000000000 -0600
     4.7 -@@ -134,6 +134,9 @@
     4.8 - 				    > vma->vm_end )
     4.9 - 					return -EINVAL;
    4.10 - 
    4.11 -+#ifdef __ia64__
    4.12 -+#define	direct_remap_pfn_range(a,b,c,d,e,f) remap_pfn_range(a,b,c,d,e)
    4.13 -+#endif
    4.14 - 				if ((rc = direct_remap_pfn_range(
    4.15 - 					vma,
    4.16 - 					msg[j].va&PAGE_MASK, 
    4.17  @@ -180,6 +183,15 @@
    4.18   		for (i = 0; i < m.num; i++, addr += PAGE_SIZE, p++) {
    4.19   			if (get_user(mfn, p))
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c	Thu Nov 03 21:37:29 2005 -0600
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c	Fri Nov 04 10:40:29 2005 -0600
     5.3 @@ -26,6 +26,7 @@
     5.4  #include <asm/pgalloc.h>
     5.5  #include <asm/uaccess.h>
     5.6  #include <asm/io.h>
     5.7 +#include <asm/hypervisor.h>
     5.8  
     5.9  static inline int uncached_access(struct file *file)
    5.10  {
     6.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Thu Nov 03 21:37:29 2005 -0600
     6.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Fri Nov 04 10:40:29 2005 -0600
     6.3 @@ -13,6 +13,7 @@
     6.4  
     6.5  #include <linux/spinlock.h>
     6.6  #include <asm-xen/balloon.h>
     6.7 +#include <asm/hypervisor.h>
     6.8  #include "common.h"
     6.9  
    6.10  /*
    6.11 @@ -494,6 +495,9 @@ static int __init blkif_init(void)
    6.12  	int i;
    6.13  	struct page *page;
    6.14  
    6.15 +	if (xen_init() < 0)
    6.16 +		return -ENODEV;
    6.17 +
    6.18  	blkif_interface_init();
    6.19  
    6.20  	page = balloon_alloc_empty_page_range(MMAP_PAGES);
     7.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Thu Nov 03 21:37:29 2005 -0600
     7.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Fri Nov 04 10:40:29 2005 -0600
     7.3 @@ -49,6 +49,7 @@
     7.4  #include <asm-xen/xenbus.h>
     7.5  #include <asm-xen/xen-public/grant_table.h>
     7.6  #include <asm-xen/gnttab.h>
     7.7 +#include <asm/hypervisor.h>
     7.8  
     7.9  #define BLKIF_STATE_DISCONNECTED 0
    7.10  #define BLKIF_STATE_CONNECTED    1
    7.11 @@ -727,6 +728,9 @@ static struct xenbus_driver blkfront = {
    7.12  
    7.13  static int __init xlblk_init(void)
    7.14  {
    7.15 +	if (xen_init() < 0)
    7.16 +		return -ENODEV;
    7.17 +
    7.18  	xenbus_register_driver(&blkfront);
    7.19  	return 0;
    7.20  }
     8.1 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c	Thu Nov 03 21:37:29 2005 -0600
     8.2 +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c	Fri Nov 04 10:40:29 2005 -0600
     8.3 @@ -196,6 +196,9 @@ static int __init xen_console_init(void)
     8.4  void xen_console_init(void)
     8.5  #endif
     8.6  {
     8.7 +	if (xen_init() < 0)
     8.8 +		return __RETCODE;
     8.9 +
    8.10  	if (xen_start_info->flags & SIF_INITDOMAIN) {
    8.11  		if (xc_mode == XC_DEFAULT)
    8.12  			xc_mode = XC_SERIAL;
     9.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Thu Nov 03 21:37:29 2005 -0600
     9.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Fri Nov 04 10:40:29 2005 -0600
     9.3 @@ -20,6 +20,7 @@
     9.4  #include <linux/pagemap.h>
     9.5  #include <linux/seq_file.h>
     9.6  #include <linux/kthread.h>
     9.7 +#include <asm/hypervisor.h>
     9.8  
     9.9  #include <asm/pgalloc.h>
    9.10  #include <asm/pgtable.h>
    10.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/fixmap.h	Thu Nov 03 21:37:29 2005 -0600
    10.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/fixmap.h	Fri Nov 04 10:40:29 2005 -0600
    10.3 @@ -1,1 +1,2 @@
    10.4 -/* empty */
    10.5 +#define clear_fixmap(x)	do {} while (0)
    10.6 +#define	set_fixmap(x,y)	do {} while (0)
    11.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/synch_bitops.h	Thu Nov 03 21:37:29 2005 -0600
    11.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/synch_bitops.h	Fri Nov 04 10:40:29 2005 -0600
    11.3 @@ -51,6 +51,8 @@ static __inline__ int synch_var_test_bit
    11.4      return test_bit(nr, addr);
    11.5  }
    11.6  
    11.7 +#define synch_cmpxchg	ia64_cmpxchg4_acq
    11.8 +
    11.9  #define synch_test_bit(nr,addr) \
   11.10  (__builtin_constant_p(nr) ? \
   11.11   synch_const_test_bit((nr),(addr)) : \