Skip to content

Commit d031655

Browse files
committed
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
2 parents fb0bbb9 + 51e99be commit d031655

79 files changed

Lines changed: 1222 additions & 978 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/ia64/Kconfig‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ config GENERIC_TIME_VSYSCALL
8787
bool
8888
default y
8989

90-
config HAVE_LEGACY_PER_CPU_AREA
91-
def_bool y
92-
9390
config HAVE_SETUP_PER_CPU_AREA
9491
def_bool y
9592

‎arch/ia64/include/asm/meminit.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern int register_active_ranges(u64 start, u64 len, int nid);
6161

6262
#ifdef CONFIG_VIRTUAL_MEM_MAP
6363
# define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */
64-
extern unsigned long vmalloc_end;
64+
extern unsigned long VMALLOC_END;
6565
extern struct page *vmem_map;
6666
extern int find_largest_hole(u64 start, u64 end, void *arg);
6767
extern int create_mem_map_page_table(u64 start, u64 end, void *arg);

‎arch/ia64/include/asm/pgtable.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ ia64_phys_addr_valid (unsigned long addr)
228228
#define VMALLOC_START (RGN_BASE(RGN_GATE) + 0x200000000UL)
229229
#ifdef CONFIG_VIRTUAL_MEM_MAP
230230
# define VMALLOC_END_INIT (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9)))
231-
# define VMALLOC_END vmalloc_end
232-
extern unsigned long vmalloc_end;
231+
extern unsigned long VMALLOC_END;
233232
#else
234233
#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_SPARSEMEM_VMEMMAP)
235234
/* SPARSEMEM_VMEMMAP uses half of vmalloc... */

‎arch/ia64/include/asm/processor.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,16 @@ struct cpuinfo_ia64 {
229229
#endif
230230
};
231231

232-
DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info);
232+
DECLARE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info);
233233

234234
/*
235235
* The "local" data variable. It refers to the per-CPU data of the currently executing
236236
* CPU, much like "current" points to the per-task data of the currently executing task.
237237
* Do not use the address of local_cpu_data, since it will be different from
238238
* cpu_data(smp_processor_id())!
239239
*/
240-
#define local_cpu_data (&__ia64_per_cpu_var(cpu_info))
241-
#define cpu_data(cpu) (&per_cpu(cpu_info, cpu))
240+
#define local_cpu_data (&__ia64_per_cpu_var(ia64_cpu_info))
241+
#define cpu_data(cpu) (&per_cpu(ia64_cpu_info, cpu))
242242

243243
extern void print_cpu_info (struct cpuinfo_ia64 *);
244244

‎arch/ia64/kernel/acpi.c‎

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,23 @@ int __init early_acpi_boot_init(void)
702702
printk(KERN_ERR PREFIX
703703
"Error parsing MADT - no LAPIC entries\n");
704704

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+
705719
return 0;
706720
}
707721

708-
709-
710722
int __init acpi_boot_init(void)
711723
{
712724

@@ -769,18 +781,8 @@ int __init acpi_boot_init(void)
769781
if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt))
770782
printk(KERN_ERR PREFIX "Can't find FADT\n");
771783

784+
#ifdef CONFIG_ACPI_NUMA
772785
#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
784786
if (srat_num_cpus == 0) {
785787
int cpu, i = 1;
786788
for (cpu = 0; cpu < smp_boot_data.cpu_count; cpu++)
@@ -789,14 +791,9 @@ int __init acpi_boot_init(void)
789791
node_cpuid[i++].phys_id =
790792
smp_boot_data.cpu_phys_id[cpu];
791793
}
792-
# endif
793794
#endif
794-
#ifdef CONFIG_ACPI_NUMA
795795
build_cpu_to_node_map();
796796
#endif
797-
/* Make boot-up look pretty */
798-
printk(KERN_INFO "%d CPUs available, %d CPUs total\n", available_cpus,
799-
total_cpus);
800797
return 0;
801798
}
802799

‎arch/ia64/kernel/head.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ END(ia64_delay_loop)
10511051
* intermediate precision so that we can produce a full 64-bit result.
10521052
*/
10531053
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
10551055
mov.m r9=ar.itc // fetch cycle-counter (35 cyc)
10561056
;;
10571057
ldf8 f8=[r8]
@@ -1077,7 +1077,7 @@ sched_clock = ia64_native_sched_clock
10771077
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
10781078
GLOBAL_ENTRY(cycle_to_cputime)
10791079
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
10811081
;;
10821082
ldf8 f8=[r8]
10831083
;;

‎arch/ia64/kernel/ia64_ksyms.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic
3030
#endif
3131

3232
#include <asm/processor.h>
33-
EXPORT_SYMBOL(per_cpu__cpu_info);
33+
EXPORT_SYMBOL(per_cpu__ia64_cpu_info);
3434
#ifdef CONFIG_SMP
3535
EXPORT_SYMBOL(per_cpu__local_per_cpu_offset);
3636
#endif

‎arch/ia64/kernel/mca_asm.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
ia64_do_tlb_purge:
6060
#define O(member) IA64_CPUINFO_##member##_OFFSET
6161

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
6363
;;
6464
addl r17=O(PTCE_STRIDE),r2
6565
addl r2=O(PTCE_BASE),r2

‎arch/ia64/kernel/relocate_kernel.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ GLOBAL_ENTRY(relocate_new_kernel)
6161

6262
// purge all TC entries
6363
#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
6565
;;
6666
addl r17=O(PTCE_STRIDE),r2
6767
addl r2=O(PTCE_BASE),r2

‎arch/ia64/kernel/setup.c‎

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ unsigned long __per_cpu_offset[NR_CPUS];
7474
EXPORT_SYMBOL(__per_cpu_offset);
7575
#endif
7676

77-
DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
77+
DEFINE_PER_CPU(struct cpuinfo_ia64, ia64_cpu_info);
7878
DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
7979
unsigned long ia64_cycles_per_usec;
8080
struct ia64_boot_param *ia64_boot_param;
@@ -566,19 +566,18 @@ setup_arch (char **cmdline_p)
566566
early_acpi_boot_init();
567567
# ifdef CONFIG_ACPI_NUMA
568568
acpi_numa_init();
569-
#ifdef CONFIG_ACPI_HOTPLUG_CPU
569+
# ifdef CONFIG_ACPI_HOTPLUG_CPU
570570
prefill_possible_map();
571-
#endif
571+
# endif
572572
per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ?
573573
32 : cpus_weight(early_cpu_possible_map)),
574574
additional_cpus > 0 ? additional_cpus : 0);
575575
# endif
576-
#else
577-
# ifdef CONFIG_SMP
578-
smp_build_cpu_map(); /* happens, e.g., with the Ski simulator */
579-
# endif
580576
#endif /* CONFIG_APCI_BOOT */
581577

578+
#ifdef CONFIG_SMP
579+
smp_build_cpu_map();
580+
#endif
582581
find_memory();
583582

584583
/* process SAL system table: */
@@ -855,18 +854,6 @@ identify_cpu (struct cpuinfo_ia64 *c)
855854
c->unimpl_pa_mask = ~((1L<<63) | ((1L << phys_addr_size) - 1));
856855
}
857856

858-
/*
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-
870857
/*
871858
* Do the following calculations:
872859
*
@@ -980,7 +967,7 @@ cpu_init (void)
980967
* depends on the data returned by identify_cpu(). We break the dependency by
981968
* accessing cpu_data() through the canonical per-CPU address.
982969
*/
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);
984971
identify_cpu(cpu_info);
985972

986973
#ifdef CONFIG_MCKINLEY

0 commit comments

Comments
 (0)