* Find a place to put the bootmap and return its starting address in
* bootmap_start. This address must be page-aligned.
*/
-static int __init
+int
find_bootmap_location (unsigned long start, unsigned long end, void *arg)
{
unsigned long needed = *(unsigned long *)arg;
* Walk the EFI memory map and find usable memory for the system, taking
* into account reserved areas.
*/
-void __init
+void
find_memory (void)
{
unsigned long bootmap_size;
*
* Allocate and setup per-cpu data areas.
*/
-void * __cpuinit
+void *
per_cpu_init (void)
{
void *cpu_data;
int cpu;
- static int first_time=1;
/*
* get_free_pages() cannot be used before cpu_init() done. BSP
* allocates "NR_CPUS" pages for all CPUs to avoid that AP calls
* get_zeroed_page().
*/
- if (first_time) {
- first_time=0;
+ if (smp_processor_id() == 0) {
cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS,
PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
for (cpu = 0; cpu < NR_CPUS; cpu++) {
* Set up the page tables.
*/
-void __init
+void
paging_init (void)
{
unsigned long max_dma;