diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/ia64/kernel/acpi.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/ia64/kernel/acpi.c')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 74 |
1 files changed, 22 insertions, 52 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index baec6f00f7f3..4d1a7e9314cf 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -44,6 +44,8 @@ | |||
44 | #include <linux/efi.h> | 44 | #include <linux/efi.h> |
45 | #include <linux/mmzone.h> | 45 | #include <linux/mmzone.h> |
46 | #include <linux/nodemask.h> | 46 | #include <linux/nodemask.h> |
47 | #include <linux/slab.h> | ||
48 | #include <acpi/processor.h> | ||
47 | #include <asm/io.h> | 49 | #include <asm/io.h> |
48 | #include <asm/iosapic.h> | 50 | #include <asm/iosapic.h> |
49 | #include <asm/machvec.h> | 51 | #include <asm/machvec.h> |
@@ -60,11 +62,6 @@ | |||
60 | 62 | ||
61 | #define PREFIX "ACPI: " | 63 | #define PREFIX "ACPI: " |
62 | 64 | ||
63 | void (*pm_idle) (void); | ||
64 | EXPORT_SYMBOL(pm_idle); | ||
65 | void (*pm_power_off) (void); | ||
66 | EXPORT_SYMBOL(pm_power_off); | ||
67 | |||
68 | u32 acpi_rsdt_forced; | 65 | u32 acpi_rsdt_forced; |
69 | unsigned int acpi_cpei_override; | 66 | unsigned int acpi_cpei_override; |
70 | unsigned int acpi_cpei_phys_cpuid; | 67 | unsigned int acpi_cpei_phys_cpuid; |
@@ -83,12 +80,10 @@ static unsigned long __init acpi_find_rsdp(void) | |||
83 | "v1.0/r0.71 tables no longer supported\n"); | 80 | "v1.0/r0.71 tables no longer supported\n"); |
84 | return rsdp_phys; | 81 | return rsdp_phys; |
85 | } | 82 | } |
86 | #endif | ||
87 | 83 | ||
88 | const char __init * | 84 | const char __init * |
89 | acpi_get_sysname(void) | 85 | acpi_get_sysname(void) |
90 | { | 86 | { |
91 | #ifdef CONFIG_IA64_GENERIC | ||
92 | unsigned long rsdp_phys; | 87 | unsigned long rsdp_phys; |
93 | struct acpi_table_rsdp *rsdp; | 88 | struct acpi_table_rsdp *rsdp; |
94 | struct acpi_table_xsdt *xsdt; | 89 | struct acpi_table_xsdt *xsdt; |
@@ -143,30 +138,8 @@ acpi_get_sysname(void) | |||
143 | #endif | 138 | #endif |
144 | 139 | ||
145 | return "dig"; | 140 | return "dig"; |
146 | #else | ||
147 | # if defined (CONFIG_IA64_HP_SIM) | ||
148 | return "hpsim"; | ||
149 | # elif defined (CONFIG_IA64_HP_ZX1) | ||
150 | return "hpzx1"; | ||
151 | # elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB) | ||
152 | return "hpzx1_swiotlb"; | ||
153 | # elif defined (CONFIG_IA64_SGI_SN2) | ||
154 | return "sn2"; | ||
155 | # elif defined (CONFIG_IA64_SGI_UV) | ||
156 | return "uv"; | ||
157 | # elif defined (CONFIG_IA64_DIG) | ||
158 | return "dig"; | ||
159 | # elif defined (CONFIG_IA64_XEN_GUEST) | ||
160 | return "xen"; | ||
161 | # elif defined(CONFIG_IA64_DIG_VTD) | ||
162 | return "dig_vtd"; | ||
163 | # else | ||
164 | # error Unknown platform. Fix acpi.c. | ||
165 | # endif | ||
166 | #endif | ||
167 | } | 141 | } |
168 | 142 | #endif /* CONFIG_IA64_GENERIC */ | |
169 | #ifdef CONFIG_ACPI | ||
170 | 143 | ||
171 | #define ACPI_MAX_PLATFORM_INTERRUPTS 256 | 144 | #define ACPI_MAX_PLATFORM_INTERRUPTS 256 |
172 | 145 | ||
@@ -702,11 +675,23 @@ int __init early_acpi_boot_init(void) | |||
702 | printk(KERN_ERR PREFIX | 675 | printk(KERN_ERR PREFIX |
703 | "Error parsing MADT - no LAPIC entries\n"); | 676 | "Error parsing MADT - no LAPIC entries\n"); |
704 | 677 | ||
678 | #ifdef CONFIG_SMP | ||
679 | if (available_cpus == 0) { | ||
680 | printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); | ||
681 | printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id()); | ||
682 | smp_boot_data.cpu_phys_id[available_cpus] = | ||
683 | hard_smp_processor_id(); | ||
684 | available_cpus = 1; /* We've got at least one of these, no? */ | ||
685 | } | ||
686 | smp_boot_data.cpu_count = available_cpus; | ||
687 | #endif | ||
688 | /* Make boot-up look pretty */ | ||
689 | printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, | ||
690 | total_cpus); | ||
691 | |||
705 | return 0; | 692 | return 0; |
706 | } | 693 | } |
707 | 694 | ||
708 | |||
709 | |||
710 | int __init acpi_boot_init(void) | 695 | int __init acpi_boot_init(void) |
711 | { | 696 | { |
712 | 697 | ||
@@ -769,18 +754,8 @@ int __init acpi_boot_init(void) | |||
769 | if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt)) | 754 | if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt)) |
770 | printk(KERN_ERR PREFIX "Can't find FADT\n"); | 755 | printk(KERN_ERR PREFIX "Can't find FADT\n"); |
771 | 756 | ||
757 | #ifdef CONFIG_ACPI_NUMA | ||
772 | #ifdef CONFIG_SMP | 758 | #ifdef CONFIG_SMP |
773 | if (available_cpus == 0) { | ||
774 | printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); | ||
775 | printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id()); | ||
776 | smp_boot_data.cpu_phys_id[available_cpus] = | ||
777 | hard_smp_processor_id(); | ||
778 | available_cpus = 1; /* We've got at least one of these, no? */ | ||
779 | } | ||
780 | smp_boot_data.cpu_count = available_cpus; | ||
781 | |||
782 | smp_build_cpu_map(); | ||
783 | # ifdef CONFIG_ACPI_NUMA | ||
784 | if (srat_num_cpus == 0) { | 759 | if (srat_num_cpus == 0) { |
785 | int cpu, i = 1; | 760 | int cpu, i = 1; |
786 | for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++) | 761 | for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++) |
@@ -789,14 +764,9 @@ int __init acpi_boot_init(void) | |||
789 | node_cpuid[i++].phys_id = | 764 | node_cpuid[i++].phys_id = |
790 | smp_boot_data.cpu_phys_id[cpu]; | 765 | smp_boot_data.cpu_phys_id[cpu]; |
791 | } | 766 | } |
792 | # endif | ||
793 | #endif | 767 | #endif |
794 | #ifdef CONFIG_ACPI_NUMA | ||
795 | build_cpu_to_node_map(); | 768 | build_cpu_to_node_map(); |
796 | #endif | 769 | #endif |
797 | /* Make boot-up look pretty */ | ||
798 | printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, | ||
799 | total_cpus); | ||
800 | return 0; | 770 | return 0; |
801 | } | 771 | } |
802 | 772 | ||
@@ -884,8 +854,8 @@ __init void prefill_possible_map(void) | |||
884 | 854 | ||
885 | possible = available_cpus + additional_cpus; | 855 | possible = available_cpus + additional_cpus; |
886 | 856 | ||
887 | if (possible > NR_CPUS) | 857 | if (possible > nr_cpu_ids) |
888 | possible = NR_CPUS; | 858 | possible = nr_cpu_ids; |
889 | 859 | ||
890 | printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n", | 860 | printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n", |
891 | possible, max((possible - available_cpus), 0)); | 861 | possible, max((possible - available_cpus), 0)); |
@@ -939,6 +909,8 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
939 | cpu_set(cpu, cpu_present_map); | 909 | cpu_set(cpu, cpu_present_map); |
940 | ia64_cpu_to_sapicid[cpu] = physid; | 910 | ia64_cpu_to_sapicid[cpu] = physid; |
941 | 911 | ||
912 | acpi_processor_set_pdc(handle); | ||
913 | |||
942 | *pcpu = cpu; | 914 | *pcpu = cpu; |
943 | return (0); | 915 | return (0); |
944 | } | 916 | } |
@@ -1063,5 +1035,3 @@ void acpi_restore_state_mem(void) {} | |||
1063 | * do_suspend_lowlevel() | 1035 | * do_suspend_lowlevel() |
1064 | */ | 1036 | */ |
1065 | void do_suspend_lowlevel(void) {} | 1037 | void do_suspend_lowlevel(void) {} |
1066 | |||
1067 | #endif /* CONFIG_ACPI */ | ||