mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-01 14:36:51 +07:00
77ad386e59
move the trampoline setup code out of smpboot.c - UP kernels can have suspend support too. Signed-off-by: Ingo Molnar <mingo@elte.hu>
19 lines
500 B
C
19 lines
500 B
C
#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);
|
|
}
|