#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/memblock.h>
#include <linux/percpu.h>
#include <linux/kexec.h>
#include <linux/crash_dump.h>
#include <linux/smp.h>
#include <linux/topology.h>
#include <linux/pfn.h>
#include <linux/stackprotector.h>
#include <asm/sections.h>
#include <asm/processor.h>
#include <asm/desc.h>
#include <asm/setup.h>
#include <asm/mpspec.h>
#include <asm/apicdef.h>
#include <asm/highmem.h>
#include <asm/proto.h>
#include <asm/cpumask.h>
#include <asm/cpu.h>
#ifdef CONFIG_X86_64
#define BOOT_PERCPU_OFFSET …
#else
#define BOOT_PERCPU_OFFSET …
#endif
DEFINE_PER_CPU_READ_MOSTLY(unsigned long, this_cpu_off) = …;
EXPORT_PER_CPU_SYMBOL(…);
unsigned long __per_cpu_offset[NR_CPUS] __ro_after_init = …;
EXPORT_SYMBOL(…);
#ifdef CONFIG_X86_64
#define PERCPU_FIRST_CHUNK_RESERVE …
#else
#define PERCPU_FIRST_CHUNK_RESERVE …
#endif
#ifdef CONFIG_X86_32
static bool __init pcpu_need_numa(void)
{
#ifdef CONFIG_NUMA
pg_data_t *last = NULL;
unsigned int cpu;
for_each_possible_cpu(cpu) {
int node = early_cpu_to_node(cpu);
if (node_online(node) && NODE_DATA(node) &&
last && last != NODE_DATA(node))
return true;
last = NODE_DATA(node);
}
#endif
return false;
}
#endif
static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)
{ … }
static int __init pcpu_cpu_to_node(int cpu)
{ … }
void __init pcpu_populate_pte(unsigned long addr)
{ … }
static inline void setup_percpu_segment(int cpu)
{ … }
void __init setup_per_cpu_areas(void)
{ … }