Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
common.c File Reference
#include <linux/bootmem.h>
#include <linux/linkage.h>
#include <linux/bitops.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/percpu.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/kgdb.h>
#include <linux/smp.h>
#include <linux/io.h>
#include <asm/stackprotector.h>
#include <asm/perf_event.h>
#include <asm/mmu_context.h>
#include <asm/archrandom.h>
#include <asm/hypervisor.h>
#include <asm/processor.h>
#include <asm/debugreg.h>
#include <asm/sections.h>
#include <linux/topology.h>
#include <linux/cpumask.h>
#include <asm/pgtable.h>
#include <linux/atomic.h>
#include <asm/proto.h>
#include <asm/setup.h>
#include <asm/apic.h>
#include <asm/desc.h>
#include <asm/i387.h>
#include <asm/fpu-internal.h>
#include <asm/mtrr.h>
#include <linux/numa.h>
#include <asm/asm.h>
#include <asm/cpu.h>
#include <asm/mce.h>
#include <asm/msr.h>
#include <asm/pat.h>
#include "cpu.h"

Go to the source code of this file.

Data Structures

struct  cpuid_dependent_feature
struct  msr_range


#define dbg_restore_debug_regs()


void __init setup_cpu_local_masks (void)
 DEFINE_PER_CPU_PAGE_ALIGNED (struct gdt_page, gdt_page)
 __setup ("noxsave", x86_xsave_setup)
 __setup ("noxsaveopt", x86_xsaveopt_setup)
 __setup ("nosmep", setup_disable_smep)
 __setup ("nosmap", setup_disable_smap)
void load_percpu_segment (int cpu)
void switch_to_new_gdt (int cpu)
void __cpuinit cpu_detect_cache_sizes (struct cpuinfo_x86 *c)
void __cpuinit cpu_detect_tlb (struct cpuinfo_x86 *c)
void __cpuinit detect_ht (struct cpuinfo_x86 *c)
void __cpuinit cpu_detect (struct cpuinfo_x86 *c)
void __cpuinit get_cpu_cap (struct cpuinfo_x86 *c)
void __init early_cpu_init (void)
void __init identify_boot_cpu (void)
void __cpuinit identify_secondary_cpu (struct cpuinfo_x86 *c)
 __setup ("show_msr=", setup_show_msr)
 __setup ("noclflush", setup_noclflush)
void __cpuinit print_cpu_info (struct cpuinfo_x86 *c)
void __cpuinit print_cpu_msr (struct cpuinfo_x86 *c)
 DEFINE_PER_CPU (struct task_struct *, current_task)
 EXPORT_PER_CPU_SYMBOL (current_task)
 DEFINE_PER_CPU (struct task_struct *, fpu_owner_task)
struct pt_regs *__cpuinit idle_regs (struct pt_regs *regs)
void __cpuinit cpu_init (void)


cpumask_var_t cpu_initialized_mask
cpumask_var_t cpu_callout_mask
cpumask_var_t cpu_callin_mask
cpumask_var_t cpu_sibling_setup_mask
u16 __read_mostly tlb_lli_4k [NR_INFO]
u16 __read_mostly tlb_lli_2m [NR_INFO]
u16 __read_mostly tlb_lli_4m [NR_INFO]
u16 __read_mostly tlb_lld_4k [NR_INFO]
u16 __read_mostly tlb_lld_2m [NR_INFO]
u16 __read_mostly tlb_lld_4m [NR_INFO]
s8 __read_mostly tlb_flushall_shift = -1

Macro Definition Documentation

#define dbg_restore_debug_regs ( )

Definition at line 1214 of file common.c.

Function Documentation

__setup ( "noxsave"  ,
__setup ( "noxsaveopt"  ,
__setup ( "nosmep"  ,
__setup ( "nosmap"  ,
__setup ( )
__setup ( "noclflush"  ,
void __cpuinit cpu_detect ( struct cpuinfo_x86 c)

Definition at line 577 of file common.c.

void __cpuinit cpu_detect_cache_sizes ( struct cpuinfo_x86 c)

Definition at line 431 of file common.c.

void __cpuinit cpu_detect_tlb ( struct cpuinfo_x86 c)

Definition at line 485 of file common.c.

void __cpuinit cpu_init ( void  )


This is our initial entry point for each CPU, and is invoked on the boot CPU prior to calling start_kernel(). For SMP, a combination of this and start_secondary() will bring up each processor to a ready state prior to hand forking the idle loop.

We do all of the basic processor init here, including setting up the caches, FPU, DSP, etc. By the time start_kernel() is hit (and subsequently platform_setup()) things like determining the CPU subtype and initial configuration will all be done.

Each processor family is still responsible for doing its own probing and cache configuration in cpu_probe().

Definition at line 1320 of file common.c.

DEFINE_PER_CPU ( struct task_struct ,
DEFINE_PER_CPU ( struct task_struct ,
DEFINE_PER_CPU_PAGE_ALIGNED ( struct gdt_page  ,
void __cpuinit detect_ht ( struct cpuinfo_x86 c)

Definition at line 499 of file common.c.

void __init early_cpu_init ( void  )

Definition at line 732 of file common.c.

EXPORT_PER_CPU_SYMBOL ( current_task  )
void __cpuinit get_cpu_cap ( struct cpuinfo_x86 c)

Definition at line 607 of file common.c.

void __init identify_boot_cpu ( void  )

Definition at line 948 of file common.c.

void __cpuinit identify_secondary_cpu ( struct cpuinfo_x86 c)

Definition at line 961 of file common.c.

struct pt_regs* __cpuinit idle_regs ( struct pt_regs regs)

Definition at line 1177 of file common.c.

void load_percpu_segment ( int  cpu)

Definition at line 373 of file common.c.

void __cpuinit print_cpu_info ( struct cpuinfo_x86 c)

Definition at line 1023 of file common.c.

void __cpuinit print_cpu_msr ( struct cpuinfo_x86 c)

Definition at line 1052 of file common.c.

void __init setup_cpu_local_masks ( void  )

Definition at line 56 of file common.c.

void switch_to_new_gdt ( int  cpu)

Definition at line 388 of file common.c.

Variable Documentation

cpumask_var_t cpu_callin_mask

Definition at line 50 of file common.c.

cpumask_var_t cpu_callout_mask

Definition at line 49 of file common.c.

cpumask_var_t cpu_initialized_mask

Definition at line 48 of file common.c.

cpumask_var_t cpu_sibling_setup_mask

Definition at line 53 of file common.c.

s8 __read_mostly tlb_flushall_shift = -1

Definition at line 483 of file common.c.

u16 __read_mostly tlb_lld_2m[NR_INFO]

Definition at line 474 of file common.c.

u16 __read_mostly tlb_lld_4k[NR_INFO]

Definition at line 473 of file common.c.

u16 __read_mostly tlb_lld_4m[NR_INFO]

Definition at line 475 of file common.c.

u16 __read_mostly tlb_lli_2m[NR_INFO]

Definition at line 471 of file common.c.

u16 __read_mostly tlb_lli_4k[NR_INFO]

Definition at line 470 of file common.c.

u16 __read_mostly tlb_lli_4m[NR_INFO]

Definition at line 472 of file common.c.