summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2007-05-05 15:27:44 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:27:09 +0200
commit4777d7850b0f4826066a878b81b2223bc375886c (patch)
treebed87035fc4729b279f5e58d9bfa4430a29abfb2 /i386/i386at
parent72826a301936f2a473c996da0b4a0199cb1bba32 (diff)
2007-05-05 Thomas Schwinge <tschwinge@gnu.org>
* i386/i386at/model_dep.c (halt_cpu, halt_all_cpus): Call `machine_idle' to avoid busy-looping.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/model_dep.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index f183d19..da5c91c 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -106,7 +106,7 @@ extern void linux_init(void);
/*
* Find devices. The system is alive.
*/
-void machine_init()
+void machine_init(void)
{
/*
* Initialize the console.
@@ -159,7 +159,8 @@ void machine_idle (int cpu)
void halt_cpu(void)
{
asm volatile("cli");
- while(1);
+ while (TRUE)
+ machine_idle (cpu_number ());
}
/*
@@ -176,8 +177,8 @@ void halt_all_cpus(reboot)
printf("In tight loop: hit ctl-alt-del to reboot\n");
(void) spl0();
}
- for (;;)
- continue;
+ while (TRUE)
+ machine_idle (cpu_number ());
}
void exit(int rc)
@@ -185,7 +186,7 @@ void exit(int rc)
halt_all_cpus(0);
}
-void db_reset_cpu()
+void db_reset_cpu(void)
{
halt_all_cpus(1);
}
@@ -195,7 +196,7 @@ void db_reset_cpu()
* Compute physical memory size and other parameters.
*/
void
-mem_size_init()
+mem_size_init(void)
{
vm_size_t phys_last_kb;
@@ -230,7 +231,7 @@ mem_size_init()
* Turns on paging and changes the kernel segments to use high linear addresses.
*/
void
-i386at_init()
+i386at_init(void)
{
/* XXX move to intel/pmap.h */
extern pt_entry_t *kernel_page_dir;
@@ -417,13 +418,13 @@ timemmap(dev,off,prot)
}
void
-startrtclock()
+startrtclock(void)
{
clkstart();
}
void
-inittodr()
+inittodr(void)
{
time_value_t new_time;
@@ -440,12 +441,12 @@ inittodr()
}
void
-resettodr()
+resettodr(void)
{
writetodc();
}
-unsigned int pmap_free_pages()
+unsigned int pmap_free_pages(void)
{
return atop(avail_remaining);
}
@@ -567,7 +568,7 @@ boolean_t pmap_next_page(addrp)
the standard memory allocation mechanism
during system initialization. */
vm_offset_t
-pmap_grab_page()
+pmap_grab_page(void)
{
vm_offset_t addr;
if (!pmap_next_page(&addr))