| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * SMP boot-related support |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 24 | 25 | |
|---|
| 25 | 26 | #include <linux/module.h> |
|---|
| 26 | 27 | #include <linux/acpi.h> |
|---|
| 27 | | -#include <linux/bootmem.h> |
|---|
| 28 | +#include <linux/memblock.h> |
|---|
| 28 | 29 | #include <linux/cpu.h> |
|---|
| 29 | 30 | #include <linux/delay.h> |
|---|
| 30 | 31 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 46 | 47 | #include <asm/delay.h> |
|---|
| 47 | 48 | #include <asm/io.h> |
|---|
| 48 | 49 | #include <asm/irq.h> |
|---|
| 49 | | -#include <asm/machvec.h> |
|---|
| 50 | 50 | #include <asm/mca.h> |
|---|
| 51 | 51 | #include <asm/page.h> |
|---|
| 52 | | -#include <asm/pgalloc.h> |
|---|
| 53 | | -#include <asm/pgtable.h> |
|---|
| 54 | 52 | #include <asm/processor.h> |
|---|
| 55 | 53 | #include <asm/ptrace.h> |
|---|
| 56 | 54 | #include <asm/sal.h> |
|---|
| 57 | 55 | #include <asm/tlbflush.h> |
|---|
| 58 | 56 | #include <asm/unistd.h> |
|---|
| 59 | | -#include <asm/sn/arch.h> |
|---|
| 60 | 57 | |
|---|
| 61 | 58 | #define SMP_DEBUG 0 |
|---|
| 62 | 59 | |
|---|
| .. | .. |
|---|
| 358 | 355 | extern void ia64_init_itm(void); |
|---|
| 359 | 356 | extern volatile int time_keeper_id; |
|---|
| 360 | 357 | |
|---|
| 361 | | -#ifdef CONFIG_PERFMON |
|---|
| 362 | | - extern void pfm_init_percpu(void); |
|---|
| 363 | | -#endif |
|---|
| 364 | | - |
|---|
| 365 | 358 | cpuid = smp_processor_id(); |
|---|
| 366 | 359 | phys_id = hard_smp_processor_id(); |
|---|
| 367 | 360 | itc_master = time_keeper_id; |
|---|
| .. | .. |
|---|
| 391 | 384 | smp_setup_percpu_timer(); |
|---|
| 392 | 385 | |
|---|
| 393 | 386 | ia64_mca_cmc_vector_setup(); /* Setup vector on AP */ |
|---|
| 394 | | - |
|---|
| 395 | | -#ifdef CONFIG_PERFMON |
|---|
| 396 | | - pfm_init_percpu(); |
|---|
| 397 | | -#endif |
|---|
| 398 | 387 | |
|---|
| 399 | 388 | local_irq_enable(); |
|---|
| 400 | 389 | |
|---|
| .. | .. |
|---|
| 451 | 440 | #endif |
|---|
| 452 | 441 | efi_map_pal_code(); |
|---|
| 453 | 442 | cpu_init(); |
|---|
| 454 | | - preempt_disable(); |
|---|
| 455 | 443 | smp_callin(); |
|---|
| 456 | 444 | |
|---|
| 457 | 445 | cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); |
|---|
| .. | .. |
|---|
| 467 | 455 | Dprintk("Sending wakeup vector %lu to AP 0x%x/0x%x.\n", ap_wakeup_vector, cpu, sapicid); |
|---|
| 468 | 456 | |
|---|
| 469 | 457 | set_brendez_area(cpu); |
|---|
| 470 | | - platform_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0); |
|---|
| 458 | + ia64_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0); |
|---|
| 471 | 459 | |
|---|
| 472 | 460 | /* |
|---|
| 473 | 461 | * Wait 10s total for the AP to start |
|---|
| .. | .. |
|---|
| 655 | 643 | if (cpu == 0 && !bsp_remove_ok) { |
|---|
| 656 | 644 | printk ("Your platform does not support removal of BSP\n"); |
|---|
| 657 | 645 | return (-EBUSY); |
|---|
| 658 | | - } |
|---|
| 659 | | - |
|---|
| 660 | | - if (ia64_platform_is("sn2")) { |
|---|
| 661 | | - if (!sn_cpu_disable_allowed(cpu)) |
|---|
| 662 | | - return -EBUSY; |
|---|
| 663 | 646 | } |
|---|
| 664 | 647 | |
|---|
| 665 | 648 | set_cpu_online(cpu, false); |
|---|