Split the commpage initialization into two parts. The second part is executed
after all CPUs have been queried for their features. On SMP machines sysenter/sysexit weren't used before due to the non-boot CPUs appearing not to have the feature. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31226 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -16,12 +16,14 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
status_t commpage_init(void);
|
status_t commpage_init(void);
|
||||||
|
status_t commpage_init_post_cpus(void);
|
||||||
void* allocate_commpage_entry(int entry, size_t size);
|
void* allocate_commpage_entry(int entry, size_t size);
|
||||||
void* fill_commpage_entry(int entry, const void* copyFrom, size_t size);
|
void* fill_commpage_entry(int entry, const void* copyFrom, size_t size);
|
||||||
image_id get_commpage_image();
|
image_id get_commpage_image();
|
||||||
|
|
||||||
|
// implemented in the architecture specific part
|
||||||
status_t arch_commpage_init(void);
|
status_t arch_commpage_init(void);
|
||||||
// implemented in the architecture specific part
|
status_t arch_commpage_init_post_cpus(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <commpage.h>
|
#include <commpage.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -15,7 +14,6 @@
|
|||||||
#include <smp.h>
|
#include <smp.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
arch_commpage_init(void)
|
arch_commpage_init(void)
|
||||||
{
|
{
|
||||||
@@ -27,3 +25,9 @@ arch_commpage_init(void)
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
arch_commpage_init_post_cpus(void)
|
||||||
|
{
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <commpage.h>
|
#include <commpage.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -14,8 +13,6 @@
|
|||||||
#include <smp.h>
|
#include <smp.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
arch_commpage_init(void)
|
arch_commpage_init(void)
|
||||||
{
|
{
|
||||||
@@ -24,3 +21,9 @@ arch_commpage_init(void)
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
arch_commpage_init_post_cpus(void)
|
||||||
|
{
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright 2008-2009, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2007, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2007, Travis Geiselbrecht. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
@@ -103,10 +104,16 @@ initialize_commpage_syscall(void)
|
|||||||
|
|
||||||
status_t
|
status_t
|
||||||
arch_commpage_init(void)
|
arch_commpage_init(void)
|
||||||
|
{
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
arch_commpage_init_post_cpus(void)
|
||||||
{
|
{
|
||||||
// select the optimum syscall mechanism and patch the commpage
|
// select the optimum syscall mechanism and patch the commpage
|
||||||
initialize_commpage_syscall();
|
initialize_commpage_syscall();
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,3 +89,9 @@ commpage_init(void)
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
commpage_init_post_cpus(void)
|
||||||
|
{
|
||||||
|
return arch_commpage_init_post_cpus();
|
||||||
|
}
|
||||||
|
|||||||
@@ -249,6 +249,8 @@ main2(void *unused)
|
|||||||
|
|
||||||
boot_splash_init(sKernelArgs.boot_splash);
|
boot_splash_init(sKernelArgs.boot_splash);
|
||||||
|
|
||||||
|
commpage_init_post_cpus();
|
||||||
|
|
||||||
TRACE("Init modules\n");
|
TRACE("Init modules\n");
|
||||||
boot_splash_set_stage(BOOT_SPLASH_STAGE_1_INIT_MODULES);
|
boot_splash_set_stage(BOOT_SPLASH_STAGE_1_INIT_MODULES);
|
||||||
module_init_post_threads();
|
module_init_post_threads();
|
||||||
|
|||||||
Reference in New Issue
Block a user