From c9efeda2ee7ebeb3e12013ead5b2aeb83e93036e Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 17 Nov 2006 09:16:27 +0000 Subject: [PATCH] [MINIOS] Move initialisation of events (masking event channels) earlier during the boot process. Otherwise 64bit guests would sometimes crash. Signed-off-by: Grzegorz Milos --- include/x86/os.h | 2 ++ kernel.c | 6 +++--- mm.c | 7 ++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/x86/os.h b/include/x86/os.h index eed5bda..80f5586 100644 --- a/include/x86/os.h +++ b/include/x86/os.h @@ -19,6 +19,8 @@ #include #include +#define USED __attribute__ ((used)) + extern void do_exit(void); #define BUG do_exit diff --git a/kernel.c b/kernel.c index 72fc65a..9b3c471 100644 --- a/kernel.c +++ b/kernel.c @@ -116,6 +116,9 @@ void start_kernel(start_info_t *si) printk(" cmd_line: %s\n", si->cmd_line ? (const char *)si->cmd_line : "NULL"); + /* Set up events. */ + init_events(); + arch_print_info(); setup_xen_features(); @@ -123,9 +126,6 @@ void start_kernel(start_info_t *si) /* Init memory management. */ init_mm(); - /* Set up events. */ - init_events(); - /* Init time and timers. */ init_time(); diff --git a/mm.c b/mm.c index 03fb3e9..85f9e92 100644 --- a/mm.c +++ b/mm.c @@ -148,7 +148,7 @@ static chunk_head_t free_tail[FREELIST_SIZE]; * Prints allocation[0/1] for @nr_pages, starting at @start * address (virtual). */ -static void print_allocation(void *start, int nr_pages) +USED static void print_allocation(void *start, int nr_pages) { unsigned long pfn_start = virt_to_pfn(start); int count; @@ -163,7 +163,7 @@ static void print_allocation(void *start, int nr_pages) * Prints chunks (making them with letters) for @nr_pages starting * at @start (virtual). */ -static void print_chunks(void *start, int nr_pages) +USED static void print_chunks(void *start, int nr_pages) { char chunks[1001], current='A'; int order, count; @@ -408,7 +408,6 @@ void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn, do_exit(); break; } - /* Update the entry */ #if defined(__x86_64__) tab = pte_to_virt(tab[l4_table_offset(pt_page)]); @@ -446,7 +445,6 @@ void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn, printk("ERROR: mmu_update failed\n"); do_exit(); } - *pt_pfn += 1; } @@ -581,7 +579,6 @@ void build_pagetable(unsigned long *start_pfn, unsigned long *max_pfn) } start_address += PAGE_SIZE; } - *start_pfn = pt_pfn; } -- 2.39.5