Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (34 commits) m68k: rename global variable vmalloc_end to m68k_vmalloc_end percpu: add missing per_cpu_ptr_to_phys() definition for UP percpu: Fix kdump failure if booted with percpu_alloc=page percpu: make misc percpu symbols unique percpu: make percpu symbols in ia64 unique percpu: make percpu symbols in powerpc unique percpu: make percpu symbols in x86 unique percpu: make percpu symbols in xen unique percpu: make percpu symbols in cpufreq unique percpu: make percpu symbols in oprofile unique percpu: make percpu symbols in tracer unique percpu: make percpu symbols under kernel/ and mm/ unique percpu: remove some sparse warnings percpu: make alloc_percpu() handle array types vmalloc: fix use of non-existent percpu variable in put_cpu_var() this_cpu: Use this_cpu_xx in trace_functions_graph.c this_cpu: Use this_cpu_xx for ftrace this_cpu: Use this_cpu_xx in nmi handling this_cpu: Use this_cpu operations in RCU this_cpu: Use this_cpu ops for VM statistics ... Fix up trivial (famous last words) global per-cpu naming conflicts in arch/x86/kvm/svm.c mm/slab.c
This commit is contained in:
@@ -702,11 +702,23 @@ int __init early_acpi_boot_init(void)
|
||||
printk(KERN_ERR PREFIX
|
||||
"Error parsing MADT - no LAPIC entries\n");
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
if (available_cpus == 0) {
|
||||
printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n");
|
||||
printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id());
|
||||
smp_boot_data.cpu_phys_id[available_cpus] =
|
||||
hard_smp_processor_id();
|
||||
available_cpus = 1; /* We've got at least one of these, no? */
|
||||
}
|
||||
smp_boot_data.cpu_count = available_cpus;
|
||||
#endif
|
||||
/* Make boot-up look pretty */
|
||||
printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus,
|
||||
total_cpus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int __init acpi_boot_init(void)
|
||||
{
|
||||
|
||||
@@ -769,18 +781,8 @@ int __init acpi_boot_init(void)
|
||||
if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt))
|
||||
printk(KERN_ERR PREFIX "Can't find FADT\n");
|
||||
|
||||
#ifdef CONFIG_ACPI_NUMA
|
||||
#ifdef CONFIG_SMP
|
||||
if (available_cpus == 0) {
|
||||
printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n");
|
||||
printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id());
|
||||
smp_boot_data.cpu_phys_id[available_cpus] =
|
||||
hard_smp_processor_id();
|
||||
available_cpus = 1; /* We've got at least one of these, no? */
|
||||
}
|
||||
smp_boot_data.cpu_count = available_cpus;
|
||||
|
||||
smp_build_cpu_map();
|
||||
# ifdef CONFIG_ACPI_NUMA
|
||||
if (srat_num_cpus == 0) {
|
||||
int cpu, i = 1;
|
||||
for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++)
|
||||
@@ -789,14 +791,9 @@ int __init acpi_boot_init(void)
|
||||
node_cpuid[i++].phys_id =
|
||||
smp_boot_data.cpu_phys_id[cpu];
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#ifdef CONFIG_ACPI_NUMA
|
||||
build_cpu_to_node_map();
|
||||
#endif
|
||||
/* Make boot-up look pretty */
|
||||
printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus,
|
||||
total_cpus);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -1051,7 +1051,7 @@ END(ia64_delay_loop)
|
||||
* intermediate precision so that we can produce a full 64-bit result.
|
||||
*/
|
||||
GLOBAL_ENTRY(ia64_native_sched_clock)
|
||||
addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
|
||||
addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
|
||||
mov.m r9=ar.itc // fetch cycle-counter (35 cyc)
|
||||
;;
|
||||
ldf8 f8=[r8]
|
||||
@@ -1077,7 +1077,7 @@ sched_clock = ia64_native_sched_clock
|
||||
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
|
||||
GLOBAL_ENTRY(cycle_to_cputime)
|
||||
alloc r16=ar.pfs,1,0,0,0
|
||||
addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
|
||||
addl r8=THIS_CPU(ia64_cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
|
||||
;;
|
||||
ldf8 f8=[r8]
|
||||
;;
|
||||
|
@@ -30,7 +30,7 @@ EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic
|
||||
#endif
|
||||
|
||||
#include <asm/processor.h>
|
||||
EXPORT_SYMBOL(per_cpu__cpu_info);
|
||||
EXPORT_SYMBOL(per_cpu__ia64_cpu_info);
|
||||
#ifdef CONFIG_SMP
|
||||
EXPORT_SYMBOL(per_cpu__local_per_cpu_offset);
|
||||
#endif
|
||||
|
@@ -59,7 +59,7 @@
|
||||
ia64_do_tlb_purge:
|
||||
#define O(member) IA64_CPUINFO_##member##_OFFSET
|
||||
|
||||
GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2
|
||||
GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2
|
||||
;;
|
||||
addl r17=O(PTCE_STRIDE),r2
|
||||
addl r2=O(PTCE_BASE),r2
|
||||
|
@@ -61,7 +61,7 @@ GLOBAL_ENTRY(relocate_new_kernel)
|
||||
|
||||
// purge all TC entries
|
||||
#define O(member) IA64_CPUINFO_##member##_OFFSET
|
||||
GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2
|
||||
GET_THIS_PADDR(r2, ia64_cpu_info) // load phys addr of cpu_info into r2
|
||||
;;
|
||||
addl r17=O(PTCE_STRIDE),r2
|
||||
addl r2=O(PTCE_BASE),r2
|
||||
|
@@ -74,7 +74,7 @@ unsigned long __per_cpu_offset[NR_CPUS];
|
||||
EXPORT_SYMBOL(__per_cpu_offset);
|
||||
#endif
|
||||
|
||||
DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
|
||||
DEFINE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info);
|
||||
DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
|
||||
unsigned long ia64_cycles_per_usec;
|
||||
struct ia64_boot_param *ia64_boot_param;
|
||||
@@ -566,19 +566,18 @@ setup_arch (char **cmdline_p)
|
||||
early_acpi_boot_init();
|
||||
# ifdef CONFIG_ACPI_NUMA
|
||||
acpi_numa_init();
|
||||
#ifdef CONFIG_ACPI_HOTPLUG_CPU
|
||||
# ifdef CONFIG_ACPI_HOTPLUG_CPU
|
||||
prefill_possible_map();
|
||||
#endif
|
||||
# endif
|
||||
per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ?
|
||||
32 : cpus_weight(early_cpu_possible_map)),
|
||||
additional_cpus > 0 ? additional_cpus : 0);
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_SMP
|
||||
smp_build_cpu_map(); /* happens, e.g., with the Ski simulator */
|
||||
# endif
|
||||
#endif /* CONFIG_APCI_BOOT */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
smp_build_cpu_map();
|
||||
#endif
|
||||
find_memory();
|
||||
|
||||
/* process SAL system table: */
|
||||
@@ -855,18 +854,6 @@ identify_cpu (struct cpuinfo_ia64 *c)
|
||||
c->unimpl_pa_mask = ~((1L<<63) | ((1L << phys_addr_size) - 1));
|
||||
}
|
||||
|
||||
/*
|
||||
* In UP configuration, setup_per_cpu_areas() is defined in
|
||||
* include/linux/percpu.h
|
||||
*/
|
||||
#ifdef CONFIG_SMP
|
||||
void __init
|
||||
setup_per_cpu_areas (void)
|
||||
{
|
||||
/* start_kernel() requires this... */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Do the following calculations:
|
||||
*
|
||||
@@ -980,7 +967,7 @@ cpu_init (void)
|
||||
* depends on the data returned by identify_cpu(). We break the dependency by
|
||||
* accessing cpu_data() through the canonical per-CPU address.
|
||||
*/
|
||||
cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(cpu_info) - __per_cpu_start);
|
||||
cpu_info = cpu_data + ((char *) &__ia64_per_cpu_var(ia64_cpu_info) - __per_cpu_start);
|
||||
identify_cpu(cpu_info);
|
||||
|
||||
#ifdef CONFIG_MCKINLEY
|
||||
|
@@ -166,6 +166,12 @@ SECTIONS
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
. = ALIGN(PERCPU_PAGE_SIZE);
|
||||
__cpu0_per_cpu = .;
|
||||
. = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
|
||||
#endif
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__init_end = .;
|
||||
|
||||
@@ -198,11 +204,6 @@ SECTIONS
|
||||
data : { } :data
|
||||
.data : AT(ADDR(.data) - LOAD_OFFSET)
|
||||
{
|
||||
#ifdef CONFIG_SMP
|
||||
. = ALIGN(PERCPU_PAGE_SIZE);
|
||||
__cpu0_per_cpu = .;
|
||||
. = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
|
||||
#endif
|
||||
INIT_TASK_DATA(PAGE_SIZE)
|
||||
CACHELINE_ALIGNED_DATA(SMP_CACHE_BYTES)
|
||||
READ_MOSTLY_DATA(SMP_CACHE_BYTES)
|
||||
|
Reference in New Issue
Block a user