-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move the trampoline setup code out of smpboot.c - UP kernels can have suspend support too. Signed-off-by: Ingo Molnar <mingo@elte.hu>
- Loading branch information
Ingo Molnar
committed
Apr 17, 2008
1 parent
e44b7b7
commit 77ad386
Showing
3 changed files
with
19 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <linux/io.h> | ||
|
||
#include <asm/trampoline.h> | ||
|
||
/* ready for x86_64, no harm for x86, since it will overwrite after alloc */ | ||
unsigned char *trampoline_base = __va(TRAMPOLINE_BASE); | ||
|
||
/* | ||
* Currently trivial. Write the real->protected mode | ||
* bootstrap into the page concerned. The caller | ||
* has made sure it's suitably aligned. | ||
*/ | ||
unsigned long setup_trampoline(void) | ||
{ | ||
memcpy(trampoline_base, trampoline_data, | ||
trampoline_end - trampoline_data); | ||
return virt_to_phys(trampoline_base); | ||
} |