diff options
Diffstat (limited to 'arch/ia64/kernel')
| -rw-r--r-- | arch/ia64/kernel/acpi.c | 33 | ||||
| -rw-r--r-- | arch/ia64/kernel/head.S | 4 | ||||
| -rw-r--r-- | arch/ia64/kernel/ia64_ksyms.c | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/mca_asm.S | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/relocate_kernel.S | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/setup.c | 27 | ||||
| -rw-r--r-- | arch/ia64/kernel/vmlinux.lds.S | 11 |
7 files changed, 33 insertions, 48 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index baec6f00f7f3..40574ae11401 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
| @@ -702,11 +702,23 @@ int __init early_acpi_boot_init(void) | |||
| 702 | printk(KERN_ERR PREFIX | 702 | printk(KERN_ERR PREFIX |
| 703 | "Error parsing MADT - no LAPIC entries\n"); | 703 | "Error parsing MADT - no LAPIC entries\n"); |
| 704 | 704 | ||
| 705 | #ifdef CONFIG_SMP | ||
| 706 | if (available_cpus == 0) { | ||
| 707 | printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); | ||
| 708 | printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id()); | ||
| 709 | smp_boot_data.cpu_phys_id[available_cpus] = | ||
| 710 | hard_smp_processor_id(); | ||
| 711 | available_cpus = 1; /* We've got at least one of these, no? */ | ||
| 712 | } | ||
| 713 | smp_boot_data.cpu_count = available_cpus; | ||
| 714 | #endif | ||
| 715 | /* Make boot-up look pretty */ | ||
| 716 | printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus, | ||
| 717 | total_cpus); | ||
| 718 | |||
| 705 | return 0; | 719 | return 0; |
| 706 | } | 720 | } |
| 707 | 721 | ||
| 708 | |||
| 709 | |||
| 710 | int __init acpi_boot_init(void) | 722 | int __init acpi_boot_init(void) |
| 711 | { | 723 | { |
| 712 | 724 | ||
| @@ -769,18 +781,8 @@ int __init acpi_boot_init(void) | |||
| 769 | if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt)) | 781 | if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt)) |
| 770 | printk(KERN_ERR PREFIX "Can't find FADT\n"); | 782 | printk(KERN_ERR PREFIX "Can't find FADT\n"); |
| 771 | 783 | ||
| 784 | #ifdef CONFIG_ACPI_NUMA | ||
| 772 | #ifdef CONFIG_SMP | 785 | #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) { | 786 | if (srat_num_cpus == 0) { |
| 785 | int cpu, i = 1; | 787 | int cpu, i = 1; |
| 786 | for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++) | 788 | for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++) |
| @@ -789,14 +791,9 @@ int __init acpi_boot_init(void) | |||
| 789 | node_cpuid[i++].phys_id = | 791 | node_cpuid[i++].phys_id = |
| 790 | smp_boot_data.cpu_phys_id[cpu]; | 792 | smp_boot_data.cpu_phys_id[cpu]; |
| 791 | } | 793 | } |
| 792 | # endif | ||
| 793 | #endif | 794 | #endif |
| 794 | #ifdef CONFIG_ACPI_NUMA | ||
| 795 | build_cpu_to_node_map(); | 795 | build_cpu_to_node_map(); |
| 796 | #endif | 796 | #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; | 797 | return 0; |
| 801 | } | 798 | } |
| 802 | 799 | ||
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index 696eff28a0c4..17a9fba38930 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
| @@ -1051,7 +1051,7 @@ END(ia64_delay_loop) | |||
| 1051 | * intermediate precision so that we can produce a full 64-bit result. | 1051 | * intermediate precision so that we can produce a full 64-bit result. |
| 1052 | */ | 1052 | */ |
| 1053 | GLOBAL_ENTRY(ia64_native_sched_clock) | 1053 | GLOBAL_ENTRY(ia64_native_sched_clock) |
| 1054 | addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0 | 1054 | addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0 |
| 1055 | mov.m r9=ar.itc // fetch cycle-counter (35 cyc) | 1055 | mov.m r9=ar.itc // fetch cycle-counter (35 cyc) |
| 1056 | ;; | 1056 | ;; |
| 1057 | ldf8 f8=[r8] | 1057 | ldf8 f8=[r8] |
| @@ -1077,7 +1077,7 @@ sched_clock = ia64_native_sched_clock | |||
| 1077 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 1077 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
| 1078 | GLOBAL_ENTRY(cycle_to_cputime) | 1078 | GLOBAL_ENTRY(cycle_to_cputime) |
| 1079 | alloc r16=ar.pfs,1,0,0,0 | 1079 | alloc r16=ar.pfs,1,0,0,0 |
| 1080 | addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0 | 1080 | addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0 |
| 1081 | ;; | 1081 | ;; |
| 1082 | ldf8 f8=[r8] | 1082 | ldf8 f8=[r8] |
| 1083 | ;; | 1083 | ;; |
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c index 14d39e300627..461b99902bf6 100644 --- a/arch/ia64/kernel/ia64_ksyms.c +++ b/arch/ia64/kernel/ia64_ksyms.c | |||
| @@ -30,7 +30,7 @@ EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic | |||
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
| 33 | EXPORT_SYMBOL(per_cpu__cpu_info); | 33 | EXPORT_SYMBOL(per_cpu__ia64_cpu_info); |
| 34 | #ifdef CONFIG_SMP | 34 | #ifdef CONFIG_SMP |
| 35 | EXPORT_SYMBOL(per_cpu__local_per_cpu_offset); | 35 | EXPORT_SYMBOL(per_cpu__local_per_cpu_offset); |
| 36 | #endif | 36 | #endif |
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S index 7461d2573d41..d5bdf9de36b6 100644 --- a/arch/ia64/kernel/mca_asm.S +++ b/arch/ia64/kernel/mca_asm.S | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | ia64_do_tlb_purge: | 59 | ia64_do_tlb_purge: |
| 60 | #define O(member) IA64_CPUINFO_##member##_OFFSET | 60 | #define O(member) IA64_CPUINFO_##member##_OFFSET |
| 61 | 61 | ||
| 62 | GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2 | 62 | GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2 |
| 63 | ;; | 63 | ;; |
| 64 | addl r17=O(PTCE_STRIDE),r2 | 64 | addl r17=O(PTCE_STRIDE),r2 |
| 65 | addl r2=O(PTCE_BASE),r2 | 65 | addl r2=O(PTCE_BASE),r2 |
diff --git a/arch/ia64/kernel/relocate_kernel.S b/arch/ia64/kernel/relocate_kernel.S index 32f6fc131fbe..c370e02f0061 100644 --- a/arch/ia64/kernel/relocate_kernel.S +++ b/arch/ia64/kernel/relocate_kernel.S | |||
| @@ -61,7 +61,7 @@ GLOBAL_ENTRY(relocate_new_kernel) | |||
| 61 | 61 | ||
| 62 | // purge all TC entries | 62 | // purge all TC entries |
| 63 | #define O(member) IA64_CPUINFO_##member##_OFFSET | 63 | #define O(member) IA64_CPUINFO_##member##_OFFSET |
| 64 | GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2 | 64 | GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2 |
| 65 | ;; | 65 | ;; |
| 66 | addl r17=O(PTCE_STRIDE),r2 | 66 | addl r17=O(PTCE_STRIDE),r2 |
| 67 | addl r2=O(PTCE_BASE),r2 | 67 | addl r2=O(PTCE_BASE),r2 |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 1de86c96801d..a1ea87919777 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
| @@ -74,7 +74,7 @@ unsigned long __per_cpu_offset[NR_CPUS]; | |||
| 74 | EXPORT_SYMBOL(__per_cpu_offset); | 74 | EXPORT_SYMBOL(__per_cpu_offset); |
| 75 | #endif | 75 | #endif |
| 76 | 76 | ||
| 77 | DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); | 77 | DEFINE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info); |
| 78 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); | 78 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); |
| 79 | unsigned long ia64_cycles_per_usec; | 79 | unsigned long ia64_cycles_per_usec; |
| 80 | struct ia64_boot_param *ia64_boot_param; | 80 | struct ia64_boot_param *ia64_boot_param; |
| @@ -566,19 +566,18 @@ setup_arch (char **cmdline_p) | |||
| 566 | early_acpi_boot_init(); | 566 | early_acpi_boot_init(); |
| 567 | # ifdef CONFIG_ACPI_NUMA | 567 | # ifdef CONFIG_ACPI_NUMA |
| 568 | acpi_numa_init(); | 568 | acpi_numa_init(); |
| 569 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | 569 | # ifdef CONFIG_ACPI_HOTPLUG_CPU |
| 570 | prefill_possible_map(); | 570 | prefill_possible_map(); |
| 571 | #endif | 571 | # endif |
| 572 | per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? | 572 | per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? |
| 573 | 32 : cpus_weight(early_cpu_possible_map)), | 573 | 32 : cpus_weight(early_cpu_possible_map)), |
| 574 | additional_cpus > 0 ? additional_cpus : 0); | 574 | additional_cpus > 0 ? additional_cpus : 0); |
| 575 | # endif | 575 | # endif |
| 576 | #else | ||
| 577 | # ifdef CONFIG_SMP | ||
| 578 | smp_build_cpu_map(); /* happens, e.g., with the Ski simulator */ | ||
| 579 | # endif | ||
| 580 | #endif /* CONFIG_APCI_BOOT */ | 576 | #endif /* CONFIG_APCI_BOOT */ |
| 581 | 577 | ||
| 578 | #ifdef CONFIG_SMP | ||
| 579 | smp_build_cpu_map(); | ||
| 580 | #endif | ||
| 582 | find_memory(); | 581 | find_memory(); |
| 583 | 582 | ||
| 584 | /* process SAL system table: */ | 583 | /* process SAL system table: */ |
| @@ -856,18 +855,6 @@ identify_cpu (struct cpuinfo_ia64 *c) | |||
| 856 | } | 855 | } |
| 857 | 856 | ||
| 858 | /* | 857 | /* |
| 859 | * In UP configuration, setup_per_cpu_areas() is defined in | ||
| 860 | * include/linux/percpu.h | ||
| 861 | */ | ||
| 862 | #ifdef CONFIG_SMP | ||
| 863 | void __init | ||
| 864 | setup_per_cpu_areas (void) | ||
| 865 | { | ||
| 866 | /* start_kernel() requires this... */ | ||
| 867 | } | ||
| 868 | #endif | ||
| 869 | |||
| 870 | /* | ||
| 871 | * Do the following calculations: | 858 | * Do the following calculations: |
| 872 | * | 859 | * |
| 873 | * 1. the max. cache line size. | 860 | * 1. the max. cache line size. |
| @@ -980,7 +967,7 @@ cpu_init (void) | |||
| 980 | * depends on the data returned by identify_cpu(). We break the dependency by | 967 | * depends on the data returned by identify_cpu(). We break the dependency by |
| 981 | * accessing cpu_data() through the canonical per-CPU address. | 968 | * accessing cpu_data() through the canonical per-CPU address. |
| 982 | */ | 969 | */ |
| 983 | cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(cpu_info) - __per_cpu_start); | 970 | cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(ia64_cpu_info) - __per_cpu_start); |
| 984 | identify_cpu(cpu_info); | 971 | identify_cpu(cpu_info); |
| 985 | 972 | ||
| 986 | #ifdef CONFIG_MCKINLEY | 973 | #ifdef CONFIG_MCKINLEY |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 0a0c77b2c988..1295ba327f6f 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
| @@ -166,6 +166,12 @@ SECTIONS | |||
| 166 | } | 166 | } |
| 167 | #endif | 167 | #endif |
| 168 | 168 | ||
| 169 | #ifdef CONFIG_SMP | ||
| 170 | . = ALIGN(PERCPU_PAGE_SIZE); | ||
| 171 | __cpu0_per_cpu = .; | ||
| 172 | . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ | ||
| 173 | #endif | ||
| 174 | |||
| 169 | . = ALIGN(PAGE_SIZE); | 175 | . = ALIGN(PAGE_SIZE); |
| 170 | __init_end = .; | 176 | __init_end = .; |
| 171 | 177 | ||
| @@ -198,11 +204,6 @@ SECTIONS | |||
| 198 | data : { } :data | 204 | data : { } :data |
| 199 | .data : AT(ADDR(.data) - LOAD_OFFSET) | 205 | .data : AT(ADDR(.data) - LOAD_OFFSET) |
| 200 | { | 206 | { |
| 201 | #ifdef CONFIG_SMP | ||
| 202 | . = ALIGN(PERCPU_PAGE_SIZE); | ||
| 203 | __cpu0_per_cpu = .; | ||
| 204 | . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ | ||
| 205 | #endif | ||
| 206 | INIT_TASK_DATA(PAGE_SIZE) | 207 | INIT_TASK_DATA(PAGE_SIZE) |
| 207 | CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES) | 208 | CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES) |
| 208 | READ_MOSTLY_DATA(SMP_CACHE_BYTES) | 209 | READ_MOSTLY_DATA(SMP_CACHE_BYTES) |
