ia64/xen-unstable

changeset 7141:c22741d000a5

Keep up with recent changes in xen-unstable
author djm@kirby.fc.hp.com
date Thu Sep 29 17:29:23 2005 -0600 (2005-09-29)
parents 61b3b357d827
children 98fb7e03a886
files linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/gnttab.c.patch linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c	Thu Sep 29 17:28:44 2005 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c	Thu Sep 29 17:29:23 2005 -0600
     1.3 @@ -7,6 +7,9 @@
     1.4  #include <asm-xen/evtchn.h>
     1.5  
     1.6  #define MAX_EVTCHN 256
     1.7 +
     1.8 +#define VALID_EVTCHN(_chn) ((_chn) >= 0)
     1.9 +
    1.10  static struct {
    1.11  	irqreturn_t (*handler)(int, void *, struct pt_regs *);
    1.12  	void *dev_id;
    1.13 @@ -73,6 +76,14 @@ void unbind_evtchn_from_irq(unsigned int
    1.14  	while(1);
    1.15  }
    1.16  
    1.17 +void notify_remote_via_irq(int irq)
    1.18 +{
    1.19 +	int evtchn = virq_to_evtchn[irq];	// FIXME... is this right??
    1.20 +
    1.21 +	if (VALID_EVTCHN(evtchn))
    1.22 +		notify_remote_via_evtchn(evtchn);
    1.23 +}
    1.24 +
    1.25  irqreturn_t evtchn_interrupt(int irq, void *dev_id, struct pt_regs *regs)
    1.26  {
    1.27      u32            l1, l2;
     2.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/gnttab.c.patch	Thu Sep 29 17:28:44 2005 -0600
     2.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/patches/gnttab.c.patch	Thu Sep 29 17:29:23 2005 -0600
     2.3 @@ -1,7 +1,7 @@
     2.4  diff -Naur xen/core/gnttab.c xen.patched/core/gnttab.c
     2.5  --- xen/core/gnttab.c	2005-09-23 10:54:50.000000000 -0600
     2.6  +++ xen.patched/core/gnttab.c	2005-09-23 10:57:51.000000000 -0600
     2.7 -@@ -22,6 +22,10 @@
     2.8 +@@ -19,6 +19,10 @@
     2.9   #include <asm-xen/gnttab.h>
    2.10   #include <asm/synch_bitops.h>
    2.11   
    2.12 @@ -10,59 +10,59 @@ diff -Naur xen/core/gnttab.c xen.patched
    2.13  +#endif
    2.14  +
    2.15   #if 1
    2.16 - #define ASSERT(_p) \
    2.17 -     if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
    2.18 -@@ -339,6 +343,10 @@
    2.19 -     if ( hypercall.op != __HYPERVISOR_grant_table_op )
    2.20 -         return -ENOSYS;
    2.21 + #define ASSERT(_p)							      \
    2.22 + 	if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
    2.23 +@@ -346,6 +350,10 @@
    2.24 + 	if ( hypercall.op != __HYPERVISOR_grant_table_op )
    2.25 + 		return -ENOSYS;
    2.26   
    2.27  +
    2.28  +#ifdef __ia64__
    2.29 -+    ret = HYPERVISOR_grant_table_op(hypercall.arg[0], (void *)hypercall.arg[1], hypercall.arg[2]);
    2.30 ++	ret = HYPERVISOR_grant_table_op(hypercall.arg[0], (void *)hypercall.arg[1], hypercall.arg[2]);
    2.31  +#else
    2.32 -     /* hypercall-invoking asm taken from privcmd.c */
    2.33 -     __asm__ __volatile__ (
    2.34 -         "pushl %%ebx; pushl %%ecx; pushl %%edx; pushl %%esi; pushl %%edi; "
    2.35 -@@ -351,6 +359,7 @@
    2.36 -         TRAP_INSTR "; "
    2.37 -         "popl %%edi; popl %%esi; popl %%edx; popl %%ecx; popl %%ebx"
    2.38 -         : "=a" (ret) : "0" (&hypercall) : "memory" );
    2.39 + 	/* hypercall-invoking asm taken from privcmd.c */
    2.40 + 	__asm__ __volatile__ (
    2.41 + 		"pushl %%ebx; pushl %%ecx; pushl %%edx; "
    2.42 +@@ -359,6 +367,7 @@
    2.43 + 		TRAP_INSTR "; "
    2.44 + 		"popl %%edi; popl %%esi; popl %%edx; popl %%ecx; popl %%ebx"
    2.45 + 		: "=a" (ret) : "0" (&hypercall) : "memory" );
    2.46  +#endif
    2.47   
    2.48 -     return ret;
    2.49 + 	return ret;
    2.50   }
    2.51 -@@ -414,8 +423,13 @@
    2.52 -     BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1) != 0);
    2.53 -     BUG_ON(setup.status != 0);
    2.54 +@@ -423,8 +432,13 @@
    2.55 + 	BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1));
    2.56 + 	BUG_ON(setup.status != 0);
    2.57   
    2.58  +#ifdef __ia64__
    2.59 -+    shared = __va(frames[0] << PAGE_SHIFT);
    2.60 -+    printk("grant table at %p\n", shared);
    2.61 ++	shared = __va(frames[0] << PAGE_SHIFT);
    2.62 ++	printk("grant table at %p\n", shared);
    2.63  +#else
    2.64 -     for ( i = 0; i < NR_GRANT_FRAMES; i++ )
    2.65 -         set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
    2.66 + 	for (i = 0; i < NR_GRANT_FRAMES; i++)
    2.67 + 		set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
    2.68  +#endif
    2.69   
    2.70 -     return 0;
    2.71 + 	return 0;
    2.72   }
    2.73 -@@ -425,8 +439,10 @@
    2.74 +@@ -434,8 +448,10 @@
    2.75   {
    2.76 -     int i;
    2.77 + 	int i;
    2.78   
    2.79  +#ifndef __ia64__
    2.80 -     for ( i = 0; i < NR_GRANT_FRAMES; i++ )
    2.81 - 	clear_fixmap(FIX_GNTTAB_END - i);
    2.82 + 	for (i = 0; i < NR_GRANT_FRAMES; i++)
    2.83 + 		clear_fixmap(FIX_GNTTAB_END - i);
    2.84  +#endif
    2.85   
    2.86 -     return 0;
    2.87 + 	return 0;
    2.88   }
    2.89 -@@ -441,7 +457,9 @@
    2.90 +@@ -450,7 +466,9 @@
    2.91   
    2.92 -     BUG_ON(gnttab_resume());
    2.93 + 	BUG_ON(gnttab_resume());
    2.94   
    2.95  +#ifndef __ia64__
    2.96 -     shared = (grant_entry_t *)fix_to_virt(FIX_GNTTAB_END);
    2.97 + 	shared = (grant_entry_t *)fix_to_virt(FIX_GNTTAB_END);
    2.98  +#endif
    2.99   
   2.100 -     for ( i = 0; i < NR_GRANT_ENTRIES; i++ )
   2.101 -         gnttab_list[i] = i + 1;
   2.102 + 	for (i = NR_RESERVED_ENTRIES; i < NR_GRANT_ENTRIES; i++)
   2.103 + 		gnttab_list[i] = i + 1;
     3.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c	Thu Sep 29 17:28:44 2005 -0600
     3.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c	Thu Sep 29 17:29:23 2005 -0600
     3.3 @@ -45,4 +45,8 @@ unsigned long alloc_empty_foreign_map_pa
     3.4  
     3.5  	return (unsigned long)vma->addr;
     3.6  }
     3.7 +
     3.8 +/* These should be define'd but some drivers use them without
     3.9 + * a convenient arch include */
    3.10 +unsigned long mfn_to_pfn(unsigned long mfn) { return mfn; }
    3.11  #endif