ia64/xen-unstable

changeset 4813:754aa05abf61

bitkeeper revision 1.1389.1.37 (42808b02PdBXhcV9G9RaxS4KBHi_3g)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
author cl349@firebug.cl.cam.ac.uk[cl349]
date Tue May 10 10:20:50 2005 +0000 (2005-05-10)
parents 487de0451d2b 78c364215cd6
children 036c7e34fdd8
files .rootkeys linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig xen/arch/x86/Makefile xen/arch/x86/acpi/boot.c xen/arch/x86/mm.c xen/arch/x86/mpparse.c xen/arch/x86/shadow.c xen/common/sched_sedf.c xen/include/asm-x86/bitops.h xen/include/asm-x86/x86_32/domain_page.h xen/include/asm-x86/x86_64/domain_page.h xen/include/xen/inttypes.h xen/include/xen/lib.h
line diff
     1.1 --- a/.rootkeys	Tue May 10 08:49:59 2005 +0000
     1.2 +++ b/.rootkeys	Tue May 10 10:20:50 2005 +0000
     1.3 @@ -1452,6 +1452,7 @@ 3ddb79c0HIghfBF8zFUdmXhOU8i6hA xen/inclu
     1.4  3ddb79c1W0lQca8gRV7sN6j3iY4Luw xen/include/xen/event.h
     1.5  41262590CyJy4vd42dnqzsn8-eeGvw xen/include/xen/grant_table.h
     1.6  3ddb79c0GurNF9tDWqQbAwJFH8ugfA xen/include/xen/init.h
     1.7 +428084e41zemtCAtYLcD9bUzwE35SA xen/include/xen/inttypes.h
     1.8  3ddb79c1nzaWu8NoF4xCCMSFJR4MlA xen/include/xen/ioport.h
     1.9  3ddb79c2qAxCOABlkKtD8Txohe-qEw xen/include/xen/irq.h
    1.10  3ddb79c2b3qe-6Ann09FqZBF4IrJaQ xen/include/xen/irq_cpustat.h
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig	Tue May 10 08:49:59 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig	Tue May 10 10:20:50 2005 +0000
     2.3 @@ -636,7 +636,7 @@ config MTRR
     2.4  
     2.5  config IRQBALANCE
     2.6   	bool "Enable kernel irq balancing"
     2.7 -	depends on SMP && X86_IO_APIC
     2.8 +	depends on SMP && X86_IO_APIC && !XEN
     2.9  	default y
    2.10  	help
    2.11   	  The default yes will allow the kernel to do irq load balancing.
     3.1 --- a/xen/arch/x86/Makefile	Tue May 10 08:49:59 2005 +0000
     3.2 +++ b/xen/arch/x86/Makefile	Tue May 10 10:20:50 2005 +0000
     3.3 @@ -35,6 +35,7 @@ clean:
     3.4  	rm -f x86_32/*.o x86_32/*~ x86_32/core
     3.5  	rm -f x86_64/*.o x86_64/*~ x86_64/core
     3.6  	rm -f mtrr/*.o mtrr/*~ mtrr/core
     3.7 +	rm -f acpi/*.o acpi/*~ acpi/core
     3.8  
     3.9  delete-unfresh-files:
    3.10  	# nothing
     4.1 --- a/xen/arch/x86/acpi/boot.c	Tue May 10 08:49:59 2005 +0000
     4.2 +++ b/xen/arch/x86/acpi/boot.c	Tue May 10 10:20:50 2005 +0000
     4.3 @@ -44,7 +44,6 @@ int sbf_port; /* XXX XEN */
     4.4  static inline void  acpi_madt_oem_check(char *oem_id, char *oem_table_id) { }
     4.5  extern void __init clustered_apic_check(void);
     4.6  static inline int ioapic_setup_disabled(void) { return 0; }
     4.7 -#include <asm/proto.h>
     4.8  
     4.9  #else	/* X86 */
    4.10  
    4.11 @@ -110,7 +109,7 @@ char *__acpi_map_table(unsigned long phy
    4.12  	if (!phys_addr || !size)
    4.13  	return NULL;
    4.14  
    4.15 -	if (phys_addr < (end_pfn_map << PAGE_SHIFT))
    4.16 +	if (phys_addr < (max_page << PAGE_SHIFT))
    4.17  		return __va(phys_addr);
    4.18  
    4.19  	return NULL;
    4.20 @@ -155,7 +154,7 @@ char *__acpi_map_table(unsigned long phy
    4.21  		mapped_size += PAGE_SIZE;
    4.22  	}
    4.23  
    4.24 -	return ((unsigned char *) base + offset);
    4.25 +	return ((char *) base + offset);
    4.26  }
    4.27  #endif
    4.28  
     5.1 --- a/xen/arch/x86/mm.c	Tue May 10 08:49:59 2005 +0000
     5.2 +++ b/xen/arch/x86/mm.c	Tue May 10 10:20:50 2005 +0000
     5.3 @@ -1813,8 +1813,7 @@ int do_mmu_update(
     5.4      struct exec_domain *ed = current;
     5.5      struct domain *d = ed->domain;
     5.6      u32 type_info;
     5.7 -    struct map_dom_mem_cache mapcache = MAP_DOM_MEM_CACHE_INIT;
     5.8 -    struct map_dom_mem_cache sh_mapcache = MAP_DOM_MEM_CACHE_INIT;
     5.9 +    struct map_dom_mem_cache mapcache, sh_mapcache;
    5.10  
    5.11      LOCK_BIGLOCK(d);
    5.12  
    5.13 @@ -1830,6 +1829,9 @@ int do_mmu_update(
    5.14              (void)get_user(done, pdone);
    5.15      }
    5.16  
    5.17 +    init_map_domain_mem_cache(&mapcache);
    5.18 +    init_map_domain_mem_cache(&sh_mapcache);
    5.19 +
    5.20      if ( !set_foreigndom(cpu, foreigndom) )
    5.21      {
    5.22          rc = -EINVAL;
    5.23 @@ -2037,8 +2039,8 @@ int do_mmu_update(
    5.24      }
    5.25  
    5.26   out:
    5.27 -    unmap_domain_mem_cache(&mapcache);
    5.28 -    unmap_domain_mem_cache(&sh_mapcache);
    5.29 +    destroy_map_domain_mem_cache(&mapcache);
    5.30 +    destroy_map_domain_mem_cache(&sh_mapcache);
    5.31  
    5.32      process_deferred_ops(cpu);
    5.33  
     6.1 --- a/xen/arch/x86/mpparse.c	Tue May 10 08:49:59 2005 +0000
     6.2 +++ b/xen/arch/x86/mpparse.c	Tue May 10 10:20:50 2005 +0000
     6.3 @@ -690,7 +690,7 @@ void __init get_smp_config (void)
     6.4  		 * Read the physical hardware table.  Anything here will
     6.5  		 * override the defaults.
     6.6  		 */
     6.7 -		if (!smp_read_mpc((void *)mpf->mpf_physptr)) {
     6.8 +		if (!smp_read_mpc((void *)(unsigned long)mpf->mpf_physptr)) {
     6.9  			smp_found_config = 0;
    6.10  			printk(KERN_ERR "BIOS bug, MP table errors detected!...\n");
    6.11  			printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n");
     7.1 --- a/xen/arch/x86/shadow.c	Tue May 10 08:49:59 2005 +0000
     7.2 +++ b/xen/arch/x86/shadow.c	Tue May 10 10:20:50 2005 +0000
     7.3 @@ -808,12 +808,15 @@ alloc_p2m_table(struct domain *d)
     7.4      struct pfn_info *page, *l2page;
     7.5      l2_pgentry_t *l2;
     7.6      unsigned long mfn, pfn;
     7.7 -    struct map_dom_mem_cache l2cache = MAP_DOM_MEM_CACHE_INIT;
     7.8 -    struct map_dom_mem_cache l1cache = MAP_DOM_MEM_CACHE_INIT;
     7.9 +    struct map_dom_mem_cache l1cache, l2cache;
    7.10  
    7.11      l2page = alloc_domheap_page(NULL);
    7.12 -    if ( !l2page )
    7.13 +    if ( l2page == NULL )
    7.14          return 0;
    7.15 +
    7.16 +    init_map_domain_mem_cache(&l1cache);
    7.17 +    init_map_domain_mem_cache(&l2cache);
    7.18 +
    7.19      d->arch.phys_table = mk_pagetable(page_to_phys(l2page));
    7.20      l2 = map_domain_mem_with_cache(page_to_phys(l2page), &l2cache);
    7.21      memset(l2, 0, PAGE_SIZE);
    7.22 @@ -848,8 +851,8 @@ alloc_p2m_table(struct domain *d)
    7.23          list_ent = page->list.next;
    7.24      }
    7.25  
    7.26 -    unmap_domain_mem_cache(&l2cache);
    7.27 -    unmap_domain_mem_cache(&l1cache);
    7.28 +    destroy_map_domain_mem_cache(&l2cache);
    7.29 +    destroy_map_domain_mem_cache(&l1cache);
    7.30  
    7.31      return 1;
    7.32  }
     8.1 --- a/xen/common/sched_sedf.c	Tue May 10 08:49:59 2005 +0000
     8.2 +++ b/xen/common/sched_sedf.c	Tue May 10 10:20:50 2005 +0000
     8.3 @@ -1,4 +1,4 @@
     8.4 -/*******************************************************************************
     8.5 +/******************************************************************************
     8.6   * Simple EDF scheduler for xen
     8.7   *
     8.8   * by Stephan Diestelhorst (C)  2004 Cambridge University
     8.9 @@ -180,9 +180,10 @@ static inline void extraq_add_sort_updat
    8.10  	struct sedf_edom_info *curinf;
    8.11  	
    8.12  	ASSERT(!extraq_on(d,i));
    8.13 -	PRINT(3, "Adding domain %i.%i (score= %i, short_pen= %lli) to L%i "\
    8.14 -	         "extraq\n", d->domain->id, d->id, EDOM_INFO(d)->score[i],
    8.15 -	         EDOM_INFO(d)->short_block_lost_tot, i);	
    8.16 +	PRINT(3, "Adding domain %i.%i (score= %i, short_pen= %"PRIi64")"
    8.17 +              " to L%i extraq\n",
    8.18 +              d->domain->id, d->id, EDOM_INFO(d)->score[i],
    8.19 +              EDOM_INFO(d)->short_block_lost_tot, i);	
    8.20  	/*iterate through all elements to find our "hole" and on our way
    8.21  	  update all the other scores*/
    8.22  	list_for_each(cur,EXTRAQ(d->processor,i)){
    8.23 @@ -266,8 +267,8 @@ static inline void __del_from_queue(stru
    8.24  {
    8.25      struct list_head *list = LIST(d);
    8.26      ASSERT(__task_on_queue(d));
    8.27 -    PRINT(3,"Removing domain %i.%i (bop= %llu) from runq/waitq\n", d->domain->id,
    8.28 -          d->id, PERIOD_BEGIN(EDOM_INFO(d)));
    8.29 +    PRINT(3,"Removing domain %i.%i (bop= %"PRIu64") from runq/waitq\n",
    8.30 +          d->domain->id, d->id, PERIOD_BEGIN(EDOM_INFO(d)));
    8.31      list_del(list);
    8.32      list->next = NULL;
    8.33      ASSERT(!__task_on_queue(d));
    8.34 @@ -307,8 +308,8 @@ int name##_comp(struct list_head* el1, s
    8.35  DOMAIN_COMPARER(waitq, list, PERIOD_BEGIN(d1), PERIOD_BEGIN(d2))
    8.36  static inline void __add_to_waitqueue_sort(struct exec_domain *d) {
    8.37  	ASSERT(!__task_on_queue(d));
    8.38 -	PRINT(3,"Adding domain %i.%i (bop= %llu) to waitq\n", d->domain->id,
    8.39 -	      d->id, PERIOD_BEGIN(EDOM_INFO(d)));
    8.40 +	PRINT(3,"Adding domain %i.%i (bop= %"PRIu64") to waitq\n",
    8.41 +              d->domain->id, d->id, PERIOD_BEGIN(EDOM_INFO(d)));
    8.42  	list_insert_sort(WAITQ(d->processor), LIST(d), waitq_comp);
    8.43  	ASSERT(__task_on_queue(d));
    8.44  }
    8.45 @@ -320,8 +321,8 @@ static inline void __add_to_waitqueue_so
    8.46   */ 
    8.47  DOMAIN_COMPARER(runq, list, d1->deadl_abs, d2->deadl_abs)
    8.48  static inline void __add_to_runqueue_sort(struct exec_domain *d) {
    8.49 -	PRINT(3,"Adding domain %i.%i (deadl= %llu) to runq\n", d->domain->id,
    8.50 -	      d->id, EDOM_INFO(d)->deadl_abs);
    8.51 +	PRINT(3,"Adding domain %i.%i (deadl= %"PRIu64") to runq\n",
    8.52 +              d->domain->id, d->id, EDOM_INFO(d)->deadl_abs);
    8.53  	list_insert_sort(RUNQ(d->processor), LIST(d), runq_comp);
    8.54  }
    8.55  
    8.56 @@ -530,9 +531,9 @@ struct list_head* waitq) {
    8.57  			/*we missed the deadline or the slice was
    8.58  				already finished... might hapen because
    8.59  				of dom_adj.*/
    8.60 -			PRINT(4,"\tDomain %i.%i exceeded it's deadline/"\
    8.61 -				"slice (%llu / %llu) now: %llu "\
    8.62 -				"cputime: %llu\n",
    8.63 +			PRINT(4,"\tDomain %i.%i exceeded it's deadline/"
    8.64 +				"slice (%"PRIu64" / %"PRIu64") now: %"PRIu64
    8.65 +				" cputime: %"PRIu64"\n",
    8.66  				curinf->exec_domain->domain->id,
    8.67  				curinf->exec_domain->id,
    8.68  				curinf->deadl_abs, curinf->slice, now,
    8.69 @@ -599,7 +600,7 @@ static inline void desched_extra_dom(s_t
    8.70  		/*reduce block lost, probably more sophistication here!*/
    8.71  		/*inf->short_block_lost_tot -= EXTRA_QUANTUM;*/
    8.72  		inf->short_block_lost_tot -= now - inf->sched_start_abs;
    8.73 -		PRINT(3,"Domain %i.%i: Short_block_loss: %lli\n", 
    8.74 +		PRINT(3,"Domain %i.%i: Short_block_loss: %"PRIi64"\n", 
    8.75  		      inf->exec_domain->domain->id, inf->exec_domain->id,
    8.76  		      inf->short_block_lost_tot);
    8.77  		if (inf->short_block_lost_tot <= 0) {
    8.78 @@ -796,7 +797,7 @@ sched_done:
    8.79  	/*TODO: Do something USEFUL when this happens and find out, why it
    8.80  	still can happen!!!*/
    8.81  	if (ret.time<0) {
    8.82 -		printk("Ouch! We are seriously BEHIND schedule! %lli\n",
    8.83 +		printk("Ouch! We are seriously BEHIND schedule! %"PRIi64"\n",
    8.84  		       ret.time);
    8.85  		ret.time = EXTRA_QUANTUM;
    8.86  	}
    8.87 @@ -1158,8 +1159,8 @@ void sedf_wake(struct exec_domain *d) {
    8.88  		/*initial setup of the deadline*/
    8.89  		inf->deadl_abs = now + inf->slice;
    8.90  		
    8.91 -	PRINT(3,"waking up domain %i.%i (deadl= %llu period= %llu "\
    8.92 -	        "now= %llu)\n", d->domain->id, d->id, inf->deadl_abs,
    8.93 +	PRINT(3,"waking up domain %i.%i (deadl= %"PRIu64" period= %"PRIu64" "\
    8.94 +	        "now= %"PRIu64")\n", d->domain->id, d->id, inf->deadl_abs,
    8.95  		 inf->period, now);
    8.96  #ifdef SEDF_STATS	
    8.97  	inf->block_tot++;
    8.98 @@ -1220,8 +1221,8 @@ void sedf_wake(struct exec_domain *d) {
    8.99  			extraq_check_add_unblocked(d, 1);
   8.100  		}
   8.101  	}
   8.102 -	PRINT(3,"woke up domain %i.%i (deadl= %llu period= %llu "\
   8.103 -	        "now= %llu)\n", d->domain->id, d->id, inf->deadl_abs,
   8.104 +	PRINT(3,"woke up domain %i.%i (deadl= %"PRIu64" period= %"PRIu64" "\
   8.105 +	        "now= %"PRIu64")\n", d->domain->id, d->id, inf->deadl_abs,
   8.106  		inf->period, now);
   8.107  	if (PERIOD_BEGIN(inf) > now) {
   8.108  		__add_to_waitqueue_sort(d);
   8.109 @@ -1258,21 +1259,21 @@ void sedf_wake(struct exec_domain *d) {
   8.110  static void sedf_dump_domain(struct exec_domain *d) {
   8.111  	printk("%i.%i has=%c ", d->domain->id, d->id,
   8.112  		test_bit(EDF_RUNNING, &d->flags) ? 'T':'F');
   8.113 -	printk("p=%llu sl=%llu ddl=%llu w=%hu c=%llu sc=%i xtr(%s)=%llu ew=%hu",
   8.114 +	printk("p=%"PRIu64" sl=%"PRIu64" ddl=%"PRIu64" w=%hu c=%"PRIu64" sc=%i xtr(%s)=%"PRIu64" ew=%hu",
   8.115  	  EDOM_INFO(d)->period, EDOM_INFO(d)->slice, EDOM_INFO(d)->deadl_abs,
   8.116  	  EDOM_INFO(d)->weight, d->cpu_time, EDOM_INFO(d)->score[EXTRA_UTIL_Q],
   8.117  	 (EDOM_INFO(d)->status & EXTRA_AWARE) ? "yes" : "no",
   8.118  	  EDOM_INFO(d)->extra_time_tot, EDOM_INFO(d)->extraweight);
   8.119  	if (d->cpu_time !=0)
   8.120 -		printf(" (%llu%%)", (EDOM_INFO(d)->extra_time_tot * 100)
   8.121 +		printf(" (%"PRIu64"%%)", (EDOM_INFO(d)->extra_time_tot * 100)
   8.122  		                 / d->cpu_time);
   8.123  #ifdef SEDF_STATS
   8.124  	if (EDOM_INFO(d)->block_time_tot!=0)
   8.125 -		printf(" pen=%llu%%", (EDOM_INFO(d)->penalty_time_tot * 100) /
   8.126 +		printf(" pen=%"PRIu64"%%", (EDOM_INFO(d)->penalty_time_tot * 100) /
   8.127  		                     EDOM_INFO(d)->block_time_tot);
   8.128  	if (EDOM_INFO(d)->block_tot!=0)
   8.129  		printf("\n   blks=%u sh=%u (%u%%) (shc=%u (%u%%) shex=%i "\
   8.130 -		       "shexsl=%i) l=%u (%u%%) avg: b=%llu p=%llu",
   8.131 +		       "shexsl=%i) l=%u (%u%%) avg: b=%"PRIu64" p=%"PRIu64"",
   8.132  		    EDOM_INFO(d)->block_tot, EDOM_INFO(d)->short_block_tot,
   8.133  		   (EDOM_INFO(d)->short_block_tot * 100) 
   8.134  		  / EDOM_INFO(d)->block_tot, EDOM_INFO(d)->short_cont,
   8.135 @@ -1296,7 +1297,7 @@ static void sedf_dump_cpu_state(int i)
   8.136  	struct exec_domain    *ed;
   8.137  	int loop = 0;
   8.138  	
   8.139 -	printk("now=%llu\n",NOW());
   8.140 +	printk("now=%"PRIu64"\n",NOW());
   8.141  	queue = RUNQ(i);
   8.142  	printk("RUNQ rq %lx   n: %lx, p: %lx\n",  (unsigned long)queue,
   8.143  		(unsigned long) queue->next, (unsigned long) queue->prev);
   8.144 @@ -1396,8 +1397,8 @@ static inline int sedf_adjust_weights(st
   8.145  static int sedf_adjdom(struct domain *p, struct sched_adjdom_cmd *cmd) {
   8.146  	struct exec_domain *ed;
   8.147  
   8.148 -	PRINT(2,"sedf_adjdom was called, domain-id %i new period %llu "\
   8.149 -	        "new slice %llu\nlatency %llu extra:%s\n",
   8.150 +	PRINT(2,"sedf_adjdom was called, domain-id %i new period %"PRIu64" "\
   8.151 +	        "new slice %"PRIu64"\nlatency %"PRIu64" extra:%s\n",
   8.152  		p->id, cmd->u.sedf.period, cmd->u.sedf.slice,
   8.153  		cmd->u.sedf.latency, (cmd->u.sedf.extratime)?"yes":"no");
   8.154  	if ( cmd->direction == SCHED_INFO_PUT )
     9.1 --- a/xen/include/asm-x86/bitops.h	Tue May 10 08:49:59 2005 +0000
     9.2 +++ b/xen/include/asm-x86/bitops.h	Tue May 10 10:20:50 2005 +0000
     9.3 @@ -368,6 +368,7 @@ static __inline__ unsigned long find_fir
     9.4   * The Hamming Weight of a number is the total number of bits set in it.
     9.5   */
     9.6  
     9.7 +#define hweight64(x) generic_hweight64(x)
     9.8  #define hweight32(x) generic_hweight32(x)
     9.9  #define hweight16(x) generic_hweight16(x)
    9.10  #define hweight8(x) generic_hweight8(x)
    10.1 --- a/xen/include/asm-x86/x86_32/domain_page.h	Tue May 10 08:49:59 2005 +0000
    10.2 +++ b/xen/include/asm-x86/x86_32/domain_page.h	Tue May 10 10:20:50 2005 +0000
    10.3 @@ -31,42 +31,45 @@ struct map_dom_mem_cache {
    10.4      void *va;
    10.5  };
    10.6  
    10.7 -#define MAP_DOM_MEM_CACHE_INIT { .pa = 0 }
    10.8 +static inline void
    10.9 +init_map_domain_mem_cache(struct map_dom_mem_cache *cache)
   10.10 +{
   10.11 +    ASSERT(cache != NULL);
   10.12 +    cache->pa = 0;
   10.13 +}
   10.14  
   10.15  static inline void *
   10.16 -map_domain_mem_with_cache(unsigned long pa,
   10.17 -                          struct map_dom_mem_cache *cache)
   10.18 +map_domain_mem_with_cache(unsigned long pa, struct map_dom_mem_cache *cache)
   10.19  {
   10.20 -    if ( likely(cache != NULL) )
   10.21 +    ASSERT(cache != NULL);
   10.22 +
   10.23 +    if ( likely(cache->pa) )
   10.24      {
   10.25 -        if ( likely(cache->pa) )
   10.26 -        {
   10.27 -            if ( likely((pa & PAGE_MASK) == (cache->pa & PAGE_MASK)) )
   10.28 -                goto done;
   10.29 -            unmap_domain_mem(cache->va);
   10.30 -        }
   10.31 -        cache->pa = (pa & PAGE_MASK) | 1;
   10.32 -        cache->va = map_domain_mem(cache->pa);
   10.33 -    done:
   10.34 -        return (void *)(((unsigned long)cache->va & PAGE_MASK) |
   10.35 -                        (pa & ~PAGE_MASK));
   10.36 +        if ( likely((pa & PAGE_MASK) == (cache->pa & PAGE_MASK)) )
   10.37 +            goto done;
   10.38 +        unmap_domain_mem(cache->va);
   10.39      }
   10.40  
   10.41 -    return map_domain_mem(pa);
   10.42 +    cache->pa = (pa & PAGE_MASK) | 1;
   10.43 +    cache->va = map_domain_mem(cache->pa);
   10.44 +
   10.45 + done:
   10.46 +    return (void *)(((unsigned long)cache->va & PAGE_MASK) |
   10.47 +                    (pa & ~PAGE_MASK));
   10.48  }
   10.49  
   10.50  static inline void
   10.51 -unmap_domain_mem_with_cache(void *va,
   10.52 -                            struct map_dom_mem_cache *cache)
   10.53 +unmap_domain_mem_with_cache(void *va, struct map_dom_mem_cache *cache)
   10.54  {
   10.55 -    if ( unlikely(!cache) )
   10.56 -        unmap_domain_mem(va);
   10.57 +    ASSERT(cache != NULL);
   10.58 +    unmap_domain_mem(va);
   10.59  }
   10.60  
   10.61  static inline void
   10.62 -unmap_domain_mem_cache(struct map_dom_mem_cache *cache)
   10.63 +destroy_map_domain_mem_cache(struct map_dom_mem_cache *cache)
   10.64  {
   10.65 -    if ( likely(cache != NULL) && likely(cache->pa) )
   10.66 +    ASSERT(cache != NULL);
   10.67 +    if ( likely(cache->pa) )
   10.68      {
   10.69          unmap_domain_mem(cache->va);
   10.70          cache->pa = 0;
    11.1 --- a/xen/include/asm-x86/x86_64/domain_page.h	Tue May 10 08:49:59 2005 +0000
    11.2 +++ b/xen/include/asm-x86/x86_64/domain_page.h	Tue May 10 10:20:50 2005 +0000
    11.3 @@ -10,4 +10,12 @@
    11.4  #define map_domain_mem(_pa)   phys_to_virt(_pa)
    11.5  #define unmap_domain_mem(_va) ((void)(_va))
    11.6  
    11.7 +struct map_dom_mem_cache { 
    11.8 +};
    11.9 +
   11.10 +#define init_map_domain_mem_cache(_c)      ((void)(_c))
   11.11 +#define map_domain_mem_with_cache(_p,_c)   (map_domain_mem(_p))
   11.12 +#define unmap_domain_mem_with_cache(_v,_c) ((void)(_v))
   11.13 +#define destroy_map_domain_mem_cache(_c)   ((void)(_c))
   11.14 +
   11.15  #endif /* __ASM_DOMAIN_PAGE_H__ */
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/xen/include/xen/inttypes.h	Tue May 10 10:20:50 2005 +0000
    12.3 @@ -0,0 +1,251 @@
    12.4 +/* Copyright (C) 1997-2001, 2004 Free Software Foundation, Inc.
    12.5 +   This file is part of the GNU C Library.
    12.6 +
    12.7 +   The GNU C Library is free software; you can redistribute it and/or
    12.8 +   modify it under the terms of the GNU Lesser General Public
    12.9 +   License as published by the Free Software Foundation; either
   12.10 +   version 2.1 of the License, or (at your option) any later version.
   12.11 +
   12.12 +   The GNU C Library is distributed in the hope that it will be useful,
   12.13 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
   12.14 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   12.15 +   Lesser General Public License for more details.
   12.16 +
   12.17 +   You should have received a copy of the GNU Lesser General Public
   12.18 +   License along with the GNU C Library; if not, write to the Free
   12.19 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   12.20 +   02111-1307 USA.  */
   12.21 +
   12.22 +/*
   12.23 + *	ISO C99: 7.8 Format conversion of integer types	<inttypes.h>
   12.24 + */
   12.25 +
   12.26 +#ifndef _XEN_INTTYPES_H
   12.27 +#define _XEN_INTTYPES_H	1
   12.28 +
   12.29 +#include <xen/config.h>
   12.30 +#include <xen/types.h>
   12.31 +
   12.32 +# if BITS_PER_LONG == 64
   12.33 +#  define __PRI64_PREFIX	"l"
   12.34 +#  define __PRIPTR_PREFIX	"l"
   12.35 +# else
   12.36 +#  define __PRI64_PREFIX	"ll"
   12.37 +#  define __PRIPTR_PREFIX
   12.38 +# endif
   12.39 +
   12.40 +/* Macros for printing format specifiers.  */
   12.41 +
   12.42 +/* Decimal notation.  */
   12.43 +# define PRId8		"d"
   12.44 +# define PRId16		"d"
   12.45 +# define PRId32		"d"
   12.46 +# define PRId64		__PRI64_PREFIX "d"
   12.47 +
   12.48 +# define PRIdLEAST8	"d"
   12.49 +# define PRIdLEAST16	"d"
   12.50 +# define PRIdLEAST32	"d"
   12.51 +# define PRIdLEAST64	__PRI64_PREFIX "d"
   12.52 +
   12.53 +# define PRIdFAST8	"d"
   12.54 +# define PRIdFAST16	__PRIPTR_PREFIX "d"
   12.55 +# define PRIdFAST32	__PRIPTR_PREFIX "d"
   12.56 +# define PRIdFAST64	__PRI64_PREFIX "d"
   12.57 +
   12.58 +
   12.59 +# define PRIi8		"i"
   12.60 +# define PRIi16		"i"
   12.61 +# define PRIi32		"i"
   12.62 +# define PRIi64		__PRI64_PREFIX "i"
   12.63 +
   12.64 +# define PRIiLEAST8	"i"
   12.65 +# define PRIiLEAST16	"i"
   12.66 +# define PRIiLEAST32	"i"
   12.67 +# define PRIiLEAST64	__PRI64_PREFIX "i"
   12.68 +
   12.69 +# define PRIiFAST8	"i"
   12.70 +# define PRIiFAST16	__PRIPTR_PREFIX "i"
   12.71 +# define PRIiFAST32	__PRIPTR_PREFIX "i"
   12.72 +# define PRIiFAST64	__PRI64_PREFIX "i"
   12.73 +
   12.74 +/* Octal notation.  */
   12.75 +# define PRIo8		"o"
   12.76 +# define PRIo16		"o"
   12.77 +# define PRIo32		"o"
   12.78 +# define PRIo64		__PRI64_PREFIX "o"
   12.79 +
   12.80 +# define PRIoLEAST8	"o"
   12.81 +# define PRIoLEAST16	"o"
   12.82 +# define PRIoLEAST32	"o"
   12.83 +# define PRIoLEAST64	__PRI64_PREFIX "o"
   12.84 +
   12.85 +# define PRIoFAST8	"o"
   12.86 +# define PRIoFAST16	__PRIPTR_PREFIX "o"
   12.87 +# define PRIoFAST32	__PRIPTR_PREFIX "o"
   12.88 +# define PRIoFAST64	__PRI64_PREFIX "o"
   12.89 +
   12.90 +/* Unsigned integers.  */
   12.91 +# define PRIu8		"u"
   12.92 +# define PRIu16		"u"
   12.93 +# define PRIu32		"u"
   12.94 +# define PRIu64		__PRI64_PREFIX "u"
   12.95 +
   12.96 +# define PRIuLEAST8	"u"
   12.97 +# define PRIuLEAST16	"u"
   12.98 +# define PRIuLEAST32	"u"
   12.99 +# define PRIuLEAST64	__PRI64_PREFIX "u"
  12.100 +
  12.101 +# define PRIuFAST8	"u"
  12.102 +# define PRIuFAST16	__PRIPTR_PREFIX "u"
  12.103 +# define PRIuFAST32	__PRIPTR_PREFIX "u"
  12.104 +# define PRIuFAST64	__PRI64_PREFIX "u"
  12.105 +
  12.106 +/* lowercase hexadecimal notation.  */
  12.107 +# define PRIx8		"x"
  12.108 +# define PRIx16		"x"
  12.109 +# define PRIx32		"x"
  12.110 +# define PRIx64		__PRI64_PREFIX "x"
  12.111 +
  12.112 +# define PRIxLEAST8	"x"
  12.113 +# define PRIxLEAST16	"x"
  12.114 +# define PRIxLEAST32	"x"
  12.115 +# define PRIxLEAST64	__PRI64_PREFIX "x"
  12.116 +
  12.117 +# define PRIxFAST8	"x"
  12.118 +# define PRIxFAST16	__PRIPTR_PREFIX "x"
  12.119 +# define PRIxFAST32	__PRIPTR_PREFIX "x"
  12.120 +# define PRIxFAST64	__PRI64_PREFIX "x"
  12.121 +
  12.122 +/* UPPERCASE hexadecimal notation.  */
  12.123 +# define PRIX8		"X"
  12.124 +# define PRIX16		"X"
  12.125 +# define PRIX32		"X"
  12.126 +# define PRIX64		__PRI64_PREFIX "X"
  12.127 +
  12.128 +# define PRIXLEAST8	"X"
  12.129 +# define PRIXLEAST16	"X"
  12.130 +# define PRIXLEAST32	"X"
  12.131 +# define PRIXLEAST64	__PRI64_PREFIX "X"
  12.132 +
  12.133 +# define PRIXFAST8	"X"
  12.134 +# define PRIXFAST16	__PRIPTR_PREFIX "X"
  12.135 +# define PRIXFAST32	__PRIPTR_PREFIX "X"
  12.136 +# define PRIXFAST64	__PRI64_PREFIX "X"
  12.137 +
  12.138 +
  12.139 +/* Macros for printing `intmax_t' and `uintmax_t'.  */
  12.140 +# define PRIdMAX	__PRI64_PREFIX "d"
  12.141 +# define PRIiMAX	__PRI64_PREFIX "i"
  12.142 +# define PRIoMAX	__PRI64_PREFIX "o"
  12.143 +# define PRIuMAX	__PRI64_PREFIX "u"
  12.144 +# define PRIxMAX	__PRI64_PREFIX "x"
  12.145 +# define PRIXMAX	__PRI64_PREFIX "X"
  12.146 +
  12.147 +
  12.148 +/* Macros for printing `intptr_t' and `uintptr_t'.  */
  12.149 +# define PRIdPTR	__PRIPTR_PREFIX "d"
  12.150 +# define PRIiPTR	__PRIPTR_PREFIX "i"
  12.151 +# define PRIoPTR	__PRIPTR_PREFIX "o"
  12.152 +# define PRIuPTR	__PRIPTR_PREFIX "u"
  12.153 +# define PRIxPTR	__PRIPTR_PREFIX "x"
  12.154 +# define PRIXPTR	__PRIPTR_PREFIX "X"
  12.155 +
  12.156 +
  12.157 +/* Macros for scanning format specifiers.  */
  12.158 +
  12.159 +/* Signed decimal notation.  */
  12.160 +# define SCNd8		"hhd"
  12.161 +# define SCNd16		"hd"
  12.162 +# define SCNd32		"d"
  12.163 +# define SCNd64		__PRI64_PREFIX "d"
  12.164 +
  12.165 +# define SCNdLEAST8	"hhd"
  12.166 +# define SCNdLEAST16	"hd"
  12.167 +# define SCNdLEAST32	"d"
  12.168 +# define SCNdLEAST64	__PRI64_PREFIX "d"
  12.169 +
  12.170 +# define SCNdFAST8	"hhd"
  12.171 +# define SCNdFAST16	__PRIPTR_PREFIX "d"
  12.172 +# define SCNdFAST32	__PRIPTR_PREFIX "d"
  12.173 +# define SCNdFAST64	__PRI64_PREFIX "d"
  12.174 +
  12.175 +/* Signed decimal notation.  */
  12.176 +# define SCNi8		"hhi"
  12.177 +# define SCNi16		"hi"
  12.178 +# define SCNi32		"i"
  12.179 +# define SCNi64		__PRI64_PREFIX "i"
  12.180 +
  12.181 +# define SCNiLEAST8	"hhi"
  12.182 +# define SCNiLEAST16	"hi"
  12.183 +# define SCNiLEAST32	"i"
  12.184 +# define SCNiLEAST64	__PRI64_PREFIX "i"
  12.185 +
  12.186 +# define SCNiFAST8	"hhi"
  12.187 +# define SCNiFAST16	__PRIPTR_PREFIX "i"
  12.188 +# define SCNiFAST32	__PRIPTR_PREFIX "i"
  12.189 +# define SCNiFAST64	__PRI64_PREFIX "i"
  12.190 +
  12.191 +/* Unsigned decimal notation.  */
  12.192 +# define SCNu8		"hhu"
  12.193 +# define SCNu16		"hu"
  12.194 +# define SCNu32		"u"
  12.195 +# define SCNu64		__PRI64_PREFIX "u"
  12.196 +
  12.197 +# define SCNuLEAST8	"hhu"
  12.198 +# define SCNuLEAST16	"hu"
  12.199 +# define SCNuLEAST32	"u"
  12.200 +# define SCNuLEAST64	__PRI64_PREFIX "u"
  12.201 +
  12.202 +# define SCNuFAST8	"hhu"
  12.203 +# define SCNuFAST16	__PRIPTR_PREFIX "u"
  12.204 +# define SCNuFAST32	__PRIPTR_PREFIX "u"
  12.205 +# define SCNuFAST64	__PRI64_PREFIX "u"
  12.206 +
  12.207 +/* Octal notation.  */
  12.208 +# define SCNo8		"hho"
  12.209 +# define SCNo16		"ho"
  12.210 +# define SCNo32		"o"
  12.211 +# define SCNo64		__PRI64_PREFIX "o"
  12.212 +
  12.213 +# define SCNoLEAST8	"hho"
  12.214 +# define SCNoLEAST16	"ho"
  12.215 +# define SCNoLEAST32	"o"
  12.216 +# define SCNoLEAST64	__PRI64_PREFIX "o"
  12.217 +
  12.218 +# define SCNoFAST8	"hho"
  12.219 +# define SCNoFAST16	__PRIPTR_PREFIX "o"
  12.220 +# define SCNoFAST32	__PRIPTR_PREFIX "o"
  12.221 +# define SCNoFAST64	__PRI64_PREFIX "o"
  12.222 +
  12.223 +/* Hexadecimal notation.  */
  12.224 +# define SCNx8		"hhx"
  12.225 +# define SCNx16		"hx"
  12.226 +# define SCNx32		"x"
  12.227 +# define SCNx64		__PRI64_PREFIX "x"
  12.228 +
  12.229 +# define SCNxLEAST8	"hhx"
  12.230 +# define SCNxLEAST16	"hx"
  12.231 +# define SCNxLEAST32	"x"
  12.232 +# define SCNxLEAST64	__PRI64_PREFIX "x"
  12.233 +
  12.234 +# define SCNxFAST8	"hhx"
  12.235 +# define SCNxFAST16	__PRIPTR_PREFIX "x"
  12.236 +# define SCNxFAST32	__PRIPTR_PREFIX "x"
  12.237 +# define SCNxFAST64	__PRI64_PREFIX "x"
  12.238 +
  12.239 +
  12.240 +/* Macros for scanning `intmax_t' and `uintmax_t'.  */
  12.241 +# define SCNdMAX	__PRI64_PREFIX "d"
  12.242 +# define SCNiMAX	__PRI64_PREFIX "i"
  12.243 +# define SCNoMAX	__PRI64_PREFIX "o"
  12.244 +# define SCNuMAX	__PRI64_PREFIX "u"
  12.245 +# define SCNxMAX	__PRI64_PREFIX "x"
  12.246 +
  12.247 +/* Macros for scaning `intptr_t' and `uintptr_t'.  */
  12.248 +# define SCNdPTR	__PRIPTR_PREFIX "d"
  12.249 +# define SCNiPTR	__PRIPTR_PREFIX "i"
  12.250 +# define SCNoPTR	__PRIPTR_PREFIX "o"
  12.251 +# define SCNuPTR	__PRIPTR_PREFIX "u"
  12.252 +# define SCNxPTR	__PRIPTR_PREFIX "x"
  12.253 +
  12.254 +#endif /* _XEN_INTTYPES_H */
    13.1 --- a/xen/include/xen/lib.h	Tue May 10 08:49:59 2005 +0000
    13.2 +++ b/xen/include/xen/lib.h	Tue May 10 10:20:50 2005 +0000
    13.3 @@ -1,6 +1,7 @@
    13.4  #ifndef __LIB_H__
    13.5  #define __LIB_H__
    13.6  
    13.7 +#include <xen/inttypes.h>
    13.8  #include <stdarg.h>
    13.9  #include <xen/config.h>
   13.10  #include <xen/types.h>