include/xen/acpi.h
Source file repositories/reference/linux-study-clean/include/xen/acpi.h
File Facts
- System
- Linux kernel
- Corpus path
include/xen/acpi.h- Extension
.h- Size
- 3306 bytes
- Lines
- 108
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hasm/xen/hypervisor.hxen/xen.hlinux/acpi.h
Detected Declarations
function xen_acpi_suspend_lowlevelfunction xen_acpi_sleep_registerfunction xen_acpi_sleep_registerfunction xen_acpi_get_gsi_infofunction xen_acpi_register_get_gsi_func
Annotated Snippet
#ifndef _XEN_ACPI_H
#define _XEN_ACPI_H
#include <linux/types.h>
typedef int (*get_gsi_from_sbdf_t)(u32 sbdf);
#ifdef CONFIG_XEN_DOM0
#include <asm/xen/hypervisor.h>
#include <xen/xen.h>
#include <linux/acpi.h>
int xen_acpi_notify_hypervisor_sleep(u8 sleep_state,
u32 pm1a_cnt, u32 pm1b_cnd);
int xen_acpi_notify_hypervisor_extended_sleep(u8 sleep_state,
u32 val_a, u32 val_b);
static inline int xen_acpi_suspend_lowlevel(void)
{
/*
* Xen will save and restore CPU context, so
* we can skip that and just go straight to
* the suspend.
*/
acpi_enter_sleep_state(ACPI_STATE_S3);
return 0;
}
static inline void xen_acpi_sleep_register(void)
{
if (xen_initial_domain()) {
acpi_os_set_prepare_sleep(
&xen_acpi_notify_hypervisor_sleep);
acpi_os_set_prepare_extended_sleep(
&xen_acpi_notify_hypervisor_extended_sleep);
acpi_suspend_lowlevel = xen_acpi_suspend_lowlevel;
}
}
int xen_pvh_setup_gsi(int gsi, int trigger, int polarity);
int xen_acpi_get_gsi_info(struct pci_dev *dev,
int *gsi_out,
int *trigger_out,
int *polarity_out);
void xen_acpi_register_get_gsi_func(get_gsi_from_sbdf_t func);
int xen_acpi_get_gsi_from_sbdf(u32 sbdf);
#else
static inline void xen_acpi_sleep_register(void)
{
}
static inline int xen_pvh_setup_gsi(int gsi, int trigger, int polarity)
{
return -1;
}
static inline int xen_acpi_get_gsi_info(struct pci_dev *dev,
int *gsi_out,
int *trigger_out,
int *polarity_out)
{
return -1;
}
static inline void xen_acpi_register_get_gsi_func(get_gsi_from_sbdf_t func)
{
}
static inline int xen_acpi_get_gsi_from_sbdf(u32 sbdf)
{
return -1;
}
#endif
#endif /* _XEN_ACPI_H */
Annotation
- Immediate include surface: `linux/types.h`, `asm/xen/hypervisor.h`, `xen/xen.h`, `linux/acpi.h`.
- Detected declarations: `function xen_acpi_suspend_lowlevel`, `function xen_acpi_sleep_register`, `function xen_acpi_sleep_register`, `function xen_acpi_get_gsi_info`, `function xen_acpi_register_get_gsi_func`.
- Atlas domain: Repository Root And Misc / include.
- 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.