diff options
Diffstat (limited to 'arch/ia64/kernel/acpi.c')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 9ad94ddf6687..ecd44bdc8394 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -567,16 +567,16 @@ void __init acpi_numa_arch_fixup(void) | |||
567 | * success: return IRQ number (>=0) | 567 | * success: return IRQ number (>=0) |
568 | * failure: return < 0 | 568 | * failure: return < 0 |
569 | */ | 569 | */ |
570 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | 570 | int acpi_register_gsi(u32 gsi, int triggering, int polarity) |
571 | { | 571 | { |
572 | if (has_8259 && gsi < 16) | 572 | if (has_8259 && gsi < 16) |
573 | return isa_irq_to_vector(gsi); | 573 | return isa_irq_to_vector(gsi); |
574 | 574 | ||
575 | return iosapic_register_intr(gsi, | 575 | return iosapic_register_intr(gsi, |
576 | (active_high_low == | 576 | (polarity == |
577 | ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : | 577 | ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : |
578 | IOSAPIC_POL_LOW, | 578 | IOSAPIC_POL_LOW, |
579 | (edge_level == | 579 | (triggering == |
580 | ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : | 580 | ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : |
581 | IOSAPIC_LEVEL); | 581 | IOSAPIC_LEVEL); |
582 | } | 582 | } |
@@ -761,6 +761,59 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) | |||
761 | return (0); | 761 | return (0); |
762 | } | 762 | } |
763 | 763 | ||
764 | int additional_cpus __initdata = -1; | ||
765 | |||
766 | static __init int setup_additional_cpus(char *s) | ||
767 | { | ||
768 | if (s) | ||
769 | additional_cpus = simple_strtol(s, NULL, 0); | ||
770 | |||
771 | return 0; | ||
772 | } | ||
773 | |||
774 | early_param("additional_cpus", setup_additional_cpus); | ||
775 | |||
776 | /* | ||
777 | * cpu_possible_map should be static, it cannot change as cpu's | ||
778 | * are onlined, or offlined. The reason is per-cpu data-structures | ||
779 | * are allocated by some modules at init time, and dont expect to | ||
780 | * do this dynamically on cpu arrival/departure. | ||
781 | * cpu_present_map on the other hand can change dynamically. | ||
782 | * In case when cpu_hotplug is not compiled, then we resort to current | ||
783 | * behaviour, which is cpu_possible == cpu_present. | ||
784 | * - Ashok Raj | ||
785 | * | ||
786 | * Three ways to find out the number of additional hotplug CPUs: | ||
787 | * - If the BIOS specified disabled CPUs in ACPI/mptables use that. | ||
788 | * - The user can overwrite it with additional_cpus=NUM | ||
789 | * - Otherwise don't reserve additional CPUs. | ||
790 | */ | ||
791 | __init void prefill_possible_map(void) | ||
792 | { | ||
793 | int i; | ||
794 | int possible, disabled_cpus; | ||
795 | |||
796 | disabled_cpus = total_cpus - available_cpus; | ||
797 | |||
798 | if (additional_cpus == -1) { | ||
799 | if (disabled_cpus > 0) | ||
800 | additional_cpus = disabled_cpus; | ||
801 | else | ||
802 | additional_cpus = 0; | ||
803 | } | ||
804 | |||
805 | possible = available_cpus + additional_cpus; | ||
806 | |||
807 | if (possible > NR_CPUS) | ||
808 | possible = NR_CPUS; | ||
809 | |||
810 | printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n", | ||
811 | possible, max((possible - available_cpus), 0)); | ||
812 | |||
813 | for (i = 0; i < possible; i++) | ||
814 | cpu_set(i, cpu_possible_map); | ||
815 | } | ||
816 | |||
764 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) | 817 | int acpi_map_lsapic(acpi_handle handle, int *pcpu) |
765 | { | 818 | { |
766 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 819 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |