Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
apic.c File Reference
#include <linux/perf_event.h>
#include <linux/kernel_stat.h>
#include <linux/mc146818rtc.h>
#include <linux/acpi_pmtmr.h>
#include <linux/clockchips.h>
#include <linux/interrupt.h>
#include <linux/bootmem.h>
#include <linux/ftrace.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/syscore_ops.h>
#include <linux/delay.h>
#include <linux/timex.h>
#include <linux/i8253.h>
#include <linux/dmar.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/dmi.h>
#include <linux/smp.h>
#include <linux/mm.h>
#include <asm/irq_remapping.h>
#include <asm/perf_event.h>
#include <asm/x86_init.h>
#include <asm/pgalloc.h>
#include <linux/atomic.h>
#include <asm/mpspec.h>
#include <asm/i8259.h>
#include <asm/proto.h>
#include <asm/apic.h>
#include <asm/io_apic.h>
#include <asm/desc.h>
#include <asm/hpet.h>
#include <asm/idle.h>
#include <asm/mtrr.h>
#include <asm/time.h>
#include <asm/smp.h>
#include <asm/mce.h>
#include <asm/tsc.h>
#include <asm/hypervisor.h>

Go to the source code of this file.

Macros

#define APIC_DIVISOR   16
 
#define LAPIC_CAL_LOOPS   (HZ/10)
 

Functions

 DEFINE_EARLY_PER_CPU_READ_MOSTLY (u16, x86_cpu_to_apicid, BAD_APICID)
 
 DEFINE_EARLY_PER_CPU_READ_MOSTLY (u16, x86_bios_cpu_apicid, BAD_APICID)
 
 EXPORT_EARLY_PER_CPU_SYMBOL (x86_cpu_to_apicid)
 
 EXPORT_EARLY_PER_CPU_SYMBOL (x86_bios_cpu_apicid)
 
 EXPORT_SYMBOL_GPL (local_apic_timer_c2_ok)
 
void native_apic_wait_icr_idle (void)
 
u32 native_safe_apic_wait_icr_idle (void)
 
void native_apic_icr_write (u32 low, u32 id)
 
u64 native_apic_icr_read (void)
 
int lapic_get_maxlvt (void)
 
int setup_APIC_eilvt (u8 offset, u8 vector, u8 msg_type, u8 mask)
 
 EXPORT_SYMBOL_GPL (setup_APIC_eilvt)
 
void __init setup_boot_APIC_clock (void)
 
void __cpuinit setup_secondary_APIC_clock (void)
 
void __irq_entry smp_apic_timer_interrupt (struct pt_regs *regs)
 
int setup_profiling_timer (unsigned int multiplier)
 
void clear_local_APIC (void)
 
void disable_local_APIC (void)
 
void lapic_shutdown (void)
 
int __init verify_local_APIC (void)
 
void __init sync_Arb_IDs (void)
 
void __init init_bsp_APIC (void)
 
void __cpuinit setup_local_APIC (void)
 
void __cpuinit end_local_APIC_setup (void)
 
void __init bsp_end_local_APIC_setup (void)
 
int __init enable_IR (void)
 
void __init enable_IR_x2apic (void)
 
int __init apic_force_enable (unsigned long addr)
 
void __init init_apic_mappings (void)
 
void __init register_lapic_address (unsigned long address)
 
int __init APIC_init_uniprocessor (void)
 
void smp_spurious_interrupt (struct pt_regs *regs)
 
void smp_error_interrupt (struct pt_regs *regs)
 
void __init connect_bsp_APIC (void)
 
void disconnect_bsp_APIC (int virt_wire_setup)
 
void __cpuinit generic_processor_info (int apicid, int version)
 
int hard_smp_processor_id (void)
 
void default_init_apic_ldr (void)
 
int default_cpu_mask_to_apicid_and (const struct cpumask *cpumask, const struct cpumask *andmask, unsigned int *apicid)
 
void __init apic_set_eoi_write (void(*eoi_write)(u32 reg, u32 v))
 
 early_param ("disableapic", setup_disableapic)
 
 early_param ("nolapic", setup_nolapic)
 
 early_param ("lapic_timer_c2_ok", parse_lapic_timer_c2_ok)
 
 early_param ("noapictimer", parse_disable_apic_timer)
 
 early_param ("nolapic_timer", parse_nolapic_timer)
 
 early_param ("apic", apic_set_verbosity)
 
 late_initcall (lapic_insert_resource)
 

Variables

unsigned int num_processors
 
unsigned disabled_cpus __cpuinitdata
 
unsigned int boot_cpu_physical_apicid = -1U
 
unsigned int max_physical_apicid
 
physid_mask_t phys_cpu_present_map
 
int x2apic_mode
 
unsigned long mp_lapic_addr
 
int disable_apic
 
int local_apic_timer_c2_ok
 
int first_system_vector = 0xfe
 
unsigned int apic_verbosity
 
int pic_mode
 
int smp_found_config
 
unsigned int lapic_timer_frequency = 0
 
int apic_version [MAX_LOCAL_APIC]
 

Macro Definition Documentation

#define APIC_DIVISOR   16

Definition at line 317 of file apic.c.

#define LAPIC_CAL_LOOPS   (HZ/10)

Definition at line 560 of file apic.c.

Function Documentation

int __init apic_force_enable ( unsigned long  addr)

Definition at line 1656 of file apic.c.

int __init APIC_init_uniprocessor ( void  )

Definition at line 1801 of file apic.c.

void __init apic_set_eoi_write ( void(*)(u32 reg, u32 v eoi_write)

Definition at line 2151 of file apic.c.

void __init bsp_end_local_APIC_setup ( void  )

Definition at line 1439 of file apic.c.

void clear_local_APIC ( void  )

clear_local_APIC - shutdown the local APIC

This is called, when a CPU is disabled and before rebooting, so the state of the local APIC has no dangling leftovers. Also used to cleanout any BIOS leftovers during boot.

Definition at line 920 of file apic.c.

void __init connect_bsp_APIC ( void  )

connect_bsp_APIC - attach the APIC to the interrupt system

Definition at line 1947 of file apic.c.

int default_cpu_mask_to_apicid_and ( const struct cpumask cpumask,
const struct cpumask andmask,
unsigned int apicid 
)

Definition at line 2126 of file apic.c.

void default_init_apic_ldr ( void  )

Definition at line 2116 of file apic.c.

DEFINE_EARLY_PER_CPU_READ_MOSTLY ( u16  ,
x86_cpu_to_apicid  ,
BAD_APICID   
)
DEFINE_EARLY_PER_CPU_READ_MOSTLY ( u16  ,
x86_bios_cpu_apicid  ,
BAD_APICID   
)
void disable_local_APIC ( void  )

disable_local_APIC - clear and disable the local APIC

Definition at line 991 of file apic.c.

void disconnect_bsp_APIC ( int  virt_wire_setup)

disconnect_bsp_APIC - detach the APIC from the interrupt system : indicates, whether virtual wire mode is selected

Virtual wire mode is necessary to deliver legacy interrupts even when the APIC is disabled.

Definition at line 1975 of file apic.c.

early_param ( "disableapic"  ,
setup_disableapic   
)
early_param ( "nolapic"  ,
setup_nolapic   
)
early_param ( "lapic_timer_c2_ok"  ,
parse_lapic_timer_c2_ok   
)
early_param ( "noapictimer"  ,
parse_disable_apic_timer   
)
early_param ( "nolapic_timer"  ,
parse_nolapic_timer   
)
early_param ( "apic"  ,
apic_set_verbosity   
)
int __init enable_IR ( void  )

Definition at line 1520 of file apic.c.

void __init enable_IR_x2apic ( void  )

Definition at line 1539 of file apic.c.

void __cpuinit end_local_APIC_setup ( void  )

Definition at line 1422 of file apic.c.

EXPORT_EARLY_PER_CPU_SYMBOL ( x86_cpu_to_apicid  )
EXPORT_EARLY_PER_CPU_SYMBOL ( x86_bios_cpu_apicid  )
EXPORT_SYMBOL_GPL ( local_apic_timer_c2_ok  )
EXPORT_SYMBOL_GPL ( setup_APIC_eilvt  )
void __cpuinit generic_processor_info ( int  apicid,
int  version 
)

Definition at line 2033 of file apic.c.

int hard_smp_processor_id ( void  )

Definition at line 2111 of file apic.c.

void __init init_apic_mappings ( void  )

init_apic_mappings - initialize APIC mappings

Definition at line 1735 of file apic.c.

void __init init_bsp_APIC ( void  )

Definition at line 1136 of file apic.c.

int lapic_get_maxlvt ( void  )

lapic_get_maxlvt - get the maximum number of local vector table entries

Definition at line 300 of file apic.c.

void lapic_shutdown ( void  )

Definition at line 1030 of file apic.c.

late_initcall ( lapic_insert_resource  )
u64 native_apic_icr_read ( void  )

Definition at line 277 of file apic.c.

void native_apic_icr_write ( u32  low,
u32  id 
)

Definition at line 271 of file apic.c.

void native_apic_wait_icr_idle ( void  )

Definition at line 248 of file apic.c.

u32 native_safe_apic_wait_icr_idle ( void  )

Definition at line 254 of file apic.c.

void __init register_lapic_address ( unsigned long  address)

Definition at line 1779 of file apic.c.

int setup_APIC_eilvt ( u8  offset,
u8  vector,
u8  msg_type,
u8  mask 
)

Definition at line 415 of file apic.c.

void __init setup_boot_APIC_clock ( void  )

Definition at line 796 of file apic.c.

void __cpuinit setup_local_APIC ( void  )

setup_local_APIC - setup the local APIC

Used to setup local APIC while initializing BSP or bringin up APs. Always called with preemption disabled.

Definition at line 1227 of file apic.c.

int setup_profiling_timer ( unsigned int  multiplier)

Definition at line 904 of file apic.c.

void __cpuinit setup_secondary_APIC_clock ( void  )

Definition at line 835 of file apic.c.

void __irq_entry smp_apic_timer_interrupt ( struct pt_regs regs)

Definition at line 882 of file apic.c.

void smp_error_interrupt ( struct pt_regs regs)

Definition at line 1904 of file apic.c.

void smp_spurious_interrupt ( struct pt_regs regs)

Definition at line 1878 of file apic.c.

void __init sync_Arb_IDs ( void  )

sync_Arb_IDs - synchronize APIC bus arbitration IDs

Definition at line 1114 of file apic.c.

int __init verify_local_APIC ( void  )

Definition at line 1055 of file apic.c.

Variable Documentation

unsigned disabled_cpus __cpuinitdata

Definition at line 60 of file apic.c.

unsigned int apic_verbosity

Definition at line 188 of file apic.c.

int apic_version[MAX_LOCAL_APIC]

Definition at line 1799 of file apic.c.

unsigned int boot_cpu_physical_apicid = -1U

Definition at line 63 of file apic.c.

int disable_apic

Definition at line 176 of file apic.c.

int first_system_vector = 0xfe

Definition at line 183 of file apic.c.

unsigned int lapic_timer_frequency = 0

Definition at line 200 of file apic.c.

int local_apic_timer_c2_ok

Definition at line 180 of file apic.c.

unsigned int max_physical_apicid

Definition at line 68 of file apic.c.

unsigned long mp_lapic_addr

Definition at line 175 of file apic.c.

unsigned int num_processors

Definition at line 58 of file apic.c.

physid_mask_t phys_cpu_present_map

Definition at line 73 of file apic.c.

int pic_mode

Definition at line 190 of file apic.c.

int smp_found_config

Definition at line 193 of file apic.c.

int x2apic_mode

Definition at line 147 of file apic.c.