arch/x86/include/asm/acpi.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/acpi.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/acpi.h- Extension
.h- Size
- 6733 bytes
- Lines
- 261
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
acpi/proc_cap_intel.hasm/numa.hasm/fixmap.hasm/processor.hasm/mmu.hasm/mpspec.hasm/x86_init.hasm/cpufeature.hasm/irq_vectors.hasm/xen/hypervisor.hxen/xen.hasm/pgtable_types.h
Detected Declarations
struct devicestruct cper_ia_proc_ctxfunction disable_acpifunction acpi_noirq_setfunction acpi_disable_pcifunction acpi_skip_set_wakeup_addressfunction acpi_processor_cstate_checkfunction arch_has_acpi_pdcfunction arch_acpi_set_proc_cap_bitsfunction acpi_has_cpu_in_madtfunction acpi_arch_set_root_pointerfunction acpi_arch_get_root_pointerfunction acpi_noirq_setfunction acpi_setup_mp_wakeup_mailboxfunction acpi_get_mp_wakeup_mailbox_paddrfunction arch_apei_get_mem_attributefunction arch_apei_report_x86_error
Annotated Snippet
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
static inline void acpi_disable_pci(void)
{
acpi_pci_disabled = 1;
acpi_noirq_set();
}
/* Low-level suspend routine. */
extern int (*acpi_suspend_lowlevel)(void);
/* Physical address to resume after wakeup */
unsigned long acpi_get_wakeup_address(void);
static inline bool acpi_skip_set_wakeup_address(void)
{
return cpu_feature_enabled(X86_FEATURE_XENPV);
}
#define acpi_skip_set_wakeup_address acpi_skip_set_wakeup_address
union acpi_subtable_headers;
int __init acpi_parse_mp_wake(union acpi_subtable_headers *header,
const unsigned long end);
void asm_acpi_mp_play_dead(u64 reset_vector, u64 pgd_pa);
/*
* Check if the CPU can handle C2 and deeper
*/
static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
{
/*
* Early models (<=5) of AMD Opterons are not supposed to go into
* C2 state.
*
* Steppings 0x0A and later are good
*/
if (boot_cpu_data.x86 == 0x0F &&
boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
boot_cpu_data.x86_model <= 0x05 &&
boot_cpu_data.x86_stepping < 0x0A)
return 1;
else if (boot_cpu_has(X86_BUG_AMD_APIC_C1E))
return 1;
else
return max_cstate;
}
static inline bool arch_has_acpi_pdc(void)
{
struct cpuinfo_x86 *c = &cpu_data(0);
return (c->x86_vendor == X86_VENDOR_INTEL ||
c->x86_vendor == X86_VENDOR_CENTAUR);
}
static inline void arch_acpi_set_proc_cap_bits(u32 *cap)
{
struct cpuinfo_x86 *c = &cpu_data(0);
*cap |= ACPI_PROC_CAP_C_CAPABILITY_SMP;
/* Enable coordination with firmware's _TSD info */
*cap |= ACPI_PROC_CAP_SMP_T_SWCOORD;
if (cpu_has(c, X86_FEATURE_EST))
*cap |= ACPI_PROC_CAP_EST_CAPABILITY_SWSMP;
if (cpu_has(c, X86_FEATURE_ACPI))
*cap |= ACPI_PROC_CAP_T_FFH;
if (cpu_has(c, X86_FEATURE_HWP))
*cap |= ACPI_PROC_CAP_COLLAB_PROC_PERF;
/*
* If mwait/monitor is unsupported, C_C1_FFH and
* C2/C3_FFH will be disabled.
*/
if (!cpu_has(c, X86_FEATURE_MWAIT) ||
boot_option_idle_override == IDLE_NOMWAIT)
*cap &= ~(ACPI_PROC_CAP_C_C1_FFH | ACPI_PROC_CAP_C_C2C3_FFH);
if (xen_initial_domain()) {
/*
* When Linux is running as Xen dom0, the hypervisor is the
* entity in charge of the processor power management, and so
* Xen needs to check the OS capabilities reported in the
* processor capabilities buffer matches what the hypervisor
* driver supports.
*/
Annotation
- Immediate include surface: `acpi/proc_cap_intel.h`, `asm/numa.h`, `asm/fixmap.h`, `asm/processor.h`, `asm/mmu.h`, `asm/mpspec.h`, `asm/x86_init.h`, `asm/cpufeature.h`.
- Detected declarations: `struct device`, `struct cper_ia_proc_ctx`, `function disable_acpi`, `function acpi_noirq_set`, `function acpi_disable_pci`, `function acpi_skip_set_wakeup_address`, `function acpi_processor_cstate_check`, `function arch_has_acpi_pdc`, `function arch_acpi_set_proc_cap_bits`, `function acpi_has_cpu_in_madt`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.