ChangeSet 1.1463, 2005/05/10 10:54:46+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx
Fix the 64-bit build.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
arch/x86/acpi/boot.c | 5
arch/x86/mm.c | 10 -
arch/x86/mpparse.c | 2
arch/x86/shadow.c | 13 +
common/sched_sedf.c | 53 +++----
include/asm-x86/bitops.h | 1
include/asm-x86/x86_32/domain_page.h | 47 +++---
include/asm-x86/x86_64/domain_page.h | 8 +
include/xen/inttypes.h | 251 +++++++++++++++++++++++++++++++++++
include/xen/lib.h | 1
10 files changed, 331 insertions(+), 60 deletions(-)
diff -Nru a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
--- a/xen/arch/x86/acpi/boot.c 2005-05-10 06:04:13 -04:00
+++ b/xen/arch/x86/acpi/boot.c 2005-05-10 06:04:13 -04:00
@@ -44,7 +44,6 @@
static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { }
extern void __init clustered_apic_check(void);
static inline int ioapic_setup_disabled(void) { return 0; }
-#include <asm/proto.h>
#else /* X86 */
@@ -110,7 +109,7 @@
if (!phys_addr || !size)
return NULL;
- if (phys_addr < (end_pfn_map << PAGE_SHIFT))
+ if (phys_addr < (max_page << PAGE_SHIFT))
return __va(phys_addr);
return NULL;
@@ -155,7 +154,7 @@
mapped_size += PAGE_SIZE;
}
- return ((unsigned char *) base + offset);
+ return ((char *) base + offset);
}
#endif
diff -Nru a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c 2005-05-10 06:04:13 -04:00
+++ b/xen/arch/x86/mm.c 2005-05-10 06:04:13 -04:00
@@ -1813,8 +1813,7 @@
struct exec_domain *ed = current;
struct domain *d = ed->domain;
u32 type_info;
- struct map_dom_mem_cache mapcache = MAP_DOM_MEM_CACHE_INIT;
- struct map_dom_mem_cache sh_mapcache = MAP_DOM_MEM_CACHE_INIT;
+ struct map_dom_mem_cache mapcache, sh_mapcache;
LOCK_BIGLOCK(d);
@@ -1830,6 +1829,9 @@
(void)get_user(done, pdone);
}
+ init_map_domain_mem_cache(&mapcache);
+ init_map_domain_mem_cache(&sh_mapcache);
+
if ( !set_foreigndom(cpu, foreigndom) )
{
rc = -EINVAL;
@@ -2037,8 +2039,8 @@
}
out:
- unmap_domain_mem_cache(&mapcache);
- unmap_domain_mem_cache(&sh_mapcache);
+ destroy_map_domain_mem_cache(&mapcache);
+ destroy_map_domain_mem_cache(&sh_mapcache);
process_deferred_ops(cpu);
diff -Nru a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
--- a/xen/arch/x86/mpparse.c 2005-05-10 06:04:13 -04:00
+++ b/xen/arch/x86/mpparse.c 2005-05-10 06:04:13 -04:00
@@ -690,7 +690,7 @@
* Read the physical hardware table. Anything here will
* override the defaults.
*/
- if (!smp_read_mpc((void *)mpf->mpf_physptr)) {
+ if (!smp_read_mpc((void *)(unsigned long)mpf->mpf_physptr)) {
smp_found_config = 0;
printk(KERN_ERR "BIOS bug, MP table errors
detected!...\n");
printk(KERN_ERR "... disabling SMP support. (tell your
hw vendor)\n");
diff -Nru a/xen/arch/x86/shadow.c b/xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c 2005-05-10 06:04:13 -04:00
+++ b/xen/arch/x86/shadow.c 2005-05-10 06:04:13 -04:00
@@ -808,12 +808,15 @@
struct pfn_info *page, *l2page;
l2_pgentry_t *l2;
unsigned long mfn, pfn;
- struct map_dom_mem_cache l2cache = MAP_DOM_MEM_CACHE_INIT;
- struct map_dom_mem_cache l1cache = MAP_DOM_MEM_CACHE_INIT;
+ struct map_dom_mem_cache l1cache, l2cache;
l2page = alloc_domheap_page(NULL);
- if ( !l2page )
+ if ( l2page == NULL )
return 0;
+
+ init_map_domain_mem_cache(&l1cache);
+ init_map_domain_mem_cache(&l2cache);
+
d->arch.phys_table = mk_pagetable(page_to_phys(l2page));
l2 = map_domain_mem_with_cache(page_to_phys(l2page), &l2cache);
memset(l2, 0, PAGE_SIZE);
@@ -848,8 +851,8 @@
list_ent = page->list.next;
}
- unmap_domain_mem_cache(&l2cache);
- unmap_domain_mem_cache(&l1cache);
+ destroy_map_domain_mem_cache(&l2cache);
+ destroy_map_domain_mem_cache(&l1cache);
return 1;
}
diff -Nru a/xen/common/sched_sedf.c b/xen/common/sched_sedf.c
--- a/xen/common/sched_sedf.c 2005-05-10 06:04:13 -04:00
+++ b/xen/common/sched_sedf.c 2005-05-10 06:04:13 -04:00
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/******************************************************************************
* Simple EDF scheduler for xen
*
* by Stephan Diestelhorst (C) 2004 Cambridge University
@@ -180,9 +180,10 @@
struct sedf_edom_info *curinf;
ASSERT(!extraq_on(d,i));
- PRINT(3, "Adding domain %i.%i (score= %i, short_pen= %lli) to L%i "\
- "extraq\n", d->domain->id, d->id, EDOM_INFO(d)->score[i],
- EDOM_INFO(d)->short_block_lost_tot, i);
+ PRINT(3, "Adding domain %i.%i (score= %i, short_pen= %"PRIi64")"
+ " to L%i extraq\n",
+ d->domain->id, d->id, EDOM_INFO(d)->score[i],
+ EDOM_INFO(d)->short_block_lost_tot, i);
/*iterate through all elements to find our "hole" and on our way
update all the other scores*/
list_for_each(cur,EXTRAQ(d->processor,i)){
@@ -266,8 +267,8 @@
{
struct list_head *list = LIST(d);
ASSERT(__task_on_queue(d));
- PRINT(3,"Removing domain %i.%i (bop= %llu) from runq/waitq\n",
d->domain->id,
- d->id, PERIOD_BEGIN(EDOM_INFO(d)));
+ PRINT(3,"Removing domain %i.%i (bop= %"PRIu64") from runq/waitq\n",
+ d->domain->id, d->id, PERIOD_BEGIN(EDOM_INFO(d)));
list_del(list);
list->next = NULL;
ASSERT(!__task_on_queue(d));
@@ -307,8 +308,8 @@
DOMAIN_COMPARER(waitq, list, PERIOD_BEGIN(d1), PERIOD_BEGIN(d2))
static inline void __add_to_waitqueue_sort(struct exec_domain *d) {
ASSERT(!__task_on_queue(d));
- PRINT(3,"Adding domain %i.%i (bop= %llu) to waitq\n", d->domain->id,
- d->id, PERIOD_BEGIN(EDOM_INFO(d)));
+ PRINT(3,"Adding domain %i.%i (bop= %"PRIu64") to waitq\n",
+ d->domain->id, d->id, PERIOD_BEGIN(EDOM_INFO(d)));
list_insert_sort(WAITQ(d->processor), LIST(d), waitq_comp);
ASSERT(__task_on_queue(d));
}
@@ -320,8 +321,8 @@
*/
DOMAIN_COMPARER(runq, list, d1->deadl_abs, d2->deadl_abs)
static inline void __add_to_runqueue_sort(struct exec_domain *d) {
- PRINT(3,"Adding domain %i.%i (deadl= %llu) to runq\n", d->domain->id,
- d->id, EDOM_INFO(d)->deadl_abs);
+ PRINT(3,"Adding domain %i.%i (deadl= %"PRIu64") to runq\n",
+ d->domain->id, d->id, EDOM_INFO(d)->deadl_abs);
list_insert_sort(RUNQ(d->processor), LIST(d), runq_comp);
}
@@ -530,9 +531,9 @@
/*we missed the deadline or the slice was
already finished... might hapen because
of dom_adj.*/
- PRINT(4,"\tDomain %i.%i exceeded it's deadline/"\
- "slice (%llu / %llu) now: %llu "\
- "cputime: %llu\n",
+ PRINT(4,"\tDomain %i.%i exceeded it's deadline/"
+ "slice (%"PRIu64" / %"PRIu64") now: %"PRIu64
+ " cputime: %"PRIu64"\n",
curinf->exec_domain->domain->id,
curinf->exec_domain->id,
curinf->deadl_abs, curinf->slice, now,
@@ -599,7 +600,7 @@
/*reduce block lost, probably more sophistication here!*/
/*inf->short_block_lost_tot -= EXTRA_QUANTUM;*/
inf->short_block_lost_tot -= now - inf->sched_start_abs;
- PRINT(3,"Domain %i.%i: Short_block_loss: %lli\n",
+ PRINT(3,"Domain %i.%i: Short_block_loss: %"PRIi64"\n",
inf->exec_domain->domain->id, inf->exec_domain->id,
inf->short_block_lost_tot);
if (inf->short_block_lost_tot <= 0) {
@@ -796,7 +797,7 @@
/*TODO: Do something USEFUL when this happens and find out, why it
still can happen!!!*/
if (ret.time<0) {
- printk("Ouch! We are seriously BEHIND schedule! %lli\n",
+ printk("Ouch! We are seriously BEHIND schedule! %"PRIi64"\n",
ret.time);
ret.time = EXTRA_QUANTUM;
}
@@ -1158,8 +1159,8 @@
/*initial setup of the deadline*/
inf->deadl_abs = now + inf->slice;
- PRINT(3,"waking up domain %i.%i (deadl= %llu period= %llu "\
- "now= %llu)\n", d->domain->id, d->id, inf->deadl_abs,
+ PRINT(3,"waking up domain %i.%i (deadl= %"PRIu64" period= %"PRIu64" "\
+ "now= %"PRIu64")\n", d->domain->id, d->id, inf->deadl_abs,
inf->period, now);
#ifdef SEDF_STATS
inf->block_tot++;
@@ -1220,8 +1221,8 @@
extraq_check_add_unblocked(d, 1);
}
}
- PRINT(3,"woke up domain %i.%i (deadl= %llu period= %llu "\
- "now= %llu)\n", d->domain->id, d->id, inf->deadl_abs,
+ PRINT(3,"woke up domain %i.%i (deadl= %"PRIu64" period= %"PRIu64" "\
+ "now= %"PRIu64")\n", d->domain->id, d->id, inf->deadl_abs,
inf->period, now);
if (PERIOD_BEGIN(inf) > now) {
__add_to_waitqueue_sort(d);
@@ -1258,21 +1259,21 @@
static void sedf_dump_domain(struct exec_domain *d) {
printk("%i.%i has=%c ", d->domain->id, d->id,
test_bit(EDF_RUNNING, &d->flags) ? 'T':'F');
- printk("p=%llu sl=%llu ddl=%llu w=%hu c=%llu sc=%i xtr(%s)=%llu ew=%hu",
+ printk("p=%"PRIu64" sl=%"PRIu64" ddl=%"PRIu64" w=%hu c=%"PRIu64" sc=%i
xtr(%s)=%"PRIu64" ew=%hu",
EDOM_INFO(d)->period, EDOM_INFO(d)->slice, EDOM_INFO(d)->deadl_abs,
EDOM_INFO(d)->weight, d->cpu_time, EDOM_INFO(d)->score[EXTRA_UTIL_Q],
(EDOM_INFO(d)->status & EXTRA_AWARE) ? "yes" : "no",
EDOM_INFO(d)->extra_time_tot, EDOM_INFO(d)->extraweight);
if (d->cpu_time !=0)
- printf(" (%llu%%)", (EDOM_INFO(d)->extra_time_tot * 100)
+ printf(" (%"PRIu64"%%)", (EDOM_INFO(d)->extra_time_tot * 100)
/ d->cpu_time);
#ifdef SEDF_STATS
if (EDOM_INFO(d)->block_time_tot!=0)
- printf(" pen=%llu%%", (EDOM_INFO(d)->penalty_time_tot * 100) /
+ printf(" pen=%"PRIu64"%%", (EDOM_INFO(d)->penalty_time_tot *
100) /
EDOM_INFO(d)->block_time_tot);
if (EDOM_INFO(d)->block_tot!=0)
printf("\n blks=%u sh=%u (%u%%) (shc=%u (%u%%) shex=%i "\
- "shexsl=%i) l=%u (%u%%) avg: b=%llu p=%llu",
+ "shexsl=%i) l=%u (%u%%) avg: b=%"PRIu64" p=%"PRIu64"",
EDOM_INFO(d)->block_tot, EDOM_INFO(d)->short_block_tot,
(EDOM_INFO(d)->short_block_tot * 100)
/ EDOM_INFO(d)->block_tot, EDOM_INFO(d)->short_cont,
@@ -1296,7 +1297,7 @@
struct exec_domain *ed;
int loop = 0;
- printk("now=%llu\n",NOW());
+ printk("now=%"PRIu64"\n",NOW());
queue = RUNQ(i);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|