Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | drivers/acpi/apei/apei-base.c |
static int apei_exec_for_each_entry(struct apei_exec_context *ctx,
apei_exec_entry_func_t func, void *data,
int *end) {
u8 ins;
int i, rc;
struct acpi_whea_header *entry;
struct apei_exec_ins_type *ins_table = ctx->ins_table;
for (i = 0... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/apei-base.c | int apei_exec_pre_map_gars(struct apei_exec_context *ctx) {
int rc, end;
rc = apei_exec_for_each_entry(ctx, pre_map_gar_callback, NULL, &end);
if (rc) {
struct apei_exec_context ctx_unmap;
memcpy(&ctx_unmap, ctx, sizeof(*ctx));
ctx_unmap.entries = end;
apei_exec_post_unmap_gars(&ctx_unmap);
}
... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/apei-base.c | int apei_resources_sub(struct apei_resources *resources1,
struct apei_resources *resources2) {
int rc;
rc = apei_res_sub(&resources1->iomem, &resources2->iomem);
if (rc)
return rc;
return apei_res_sub(&resources1->ioport, &resources2->ioport);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/apei-base.c |
static int apei_get_res_callback(__u64 start, __u64 size, void *data) {
struct apei_resources *resources = data;
return apei_res_add(&resources->iomem, start, size);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/apei-base.c |
int __weak arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr,
void *data) {
return 1;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/apei-base.c |
void __weak arch_apei_report_mem_error(int sev,
struct cper_sec_mem_err *mem_err) {} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/apei-internal.h |
static inline int apei_exec_run(struct apei_exec_context *ctx, u8 action) {
return __apei_exec_run(ctx, action, 0);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/bert.c |
static int __init bert_check_table(struct acpi_table_bert *bert_tab) {
if (bert_tab->header.length < sizeof(struct acpi_table_bert) ||
bert_tab->region_length < sizeof(struct acpi_bert_region))
return -EINVAL;
return 0;
} | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/einj.c |
static void einj_exec_ctx_init(struct apei_exec_context *ctx) {
apei_exec_ctx_init(ctx, einj_ins_type, ARRAY_SIZE(einj_ins_type),
EINJ_TAB_ENTRY(einj_tab), einj_tab->entries);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/einj.c | static int einj_get_available_error_type(u32 *type) {
int rc;
mutex_lock(&einj_mutex);
rc = __einj_get_available_error_type(type);
mutex_unlock(&einj_mutex);
return rc;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/einj.c | static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2,
u64 param3, u64 param4) {
int rc;
u64 base_addr, size;
if (flags &&
(flags & ~(SETWA_FLAGS_APICID | SETWA_FLAGS_MEM | SETWA_FLAGS_PCIE_SBDF)))
return -EINVAL;
/*
* We need extra sanity checks fo... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/einj.c |
static void __exit einj_exit(void) {
struct apei_exec_context ctx;
if (einj_param) {
acpi_size size = (acpi5) ? sizeof(struct set_error_type_with_address)
: sizeof(struct einj_parameter);
acpi_os_unmap_iomem(einj_param, size);
}
einj_exec_ctx_init(&ctx);
apei_exec_post_... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/erst-dbg.c | static ssize_t erst_dbg_read(struct file *filp, char __user *ubuf, size_t usize,
loff_t *off) {
int rc, *pos;
ssize_t len = 0;
u64 id;
if (*off)
return -EINVAL;
if (mutex_lock_interruptible(&erst_dbg_mutex) != 0)
return -EINTR;
pos = (int *)&filp->private_data;
retry... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst-dbg.c |
static ssize_t erst_dbg_write(struct file *filp, const char __user *ubuf,
size_t usize, loff_t *off) {
int rc;
struct cper_record_header *rcd;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (usize > ERST_DBG_RECORD_LEN_MAX) {
pr_err(ERST_DBG_PFX "Too long record to be wr... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static int erst_exec_store_var1(struct apei_exec_context *ctx,
struct acpi_whea_header *entry) {
return __apei_exec_write_register(entry, ctx->var1);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c | static int erst_exec_move_data(struct apei_exec_context *ctx,
struct acpi_whea_header *entry) {
int rc;
u64 offset;
void *src, *dst;
if (in_interrupt()) {
pr_warn("MOVE_DATA can not be used in interrupt context.\n");
return -EBUSY;
}
rc = __apei_exec_read_register(en... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static int erst_get_erange(struct erst_erange *range) {
struct apei_exec_context ctx;
int rc;
erst_exec_ctx_init(&ctx);
rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_RANGE);
if (rc)
return rc;
range->base = apei_exec_ctx_get_output(&ctx);
rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_LENGTH);
if (rc... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static ssize_t __erst_get_record_count(void) {
struct apei_exec_context ctx;
int rc;
erst_exec_ctx_init(&ctx);
rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT);
if (rc)
return rc;
return apei_exec_ctx_get_output(&ctx);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
ssize_t erst_get_record_count(void) {
ssize_t count;
unsigned long flags;
if (erst_disable)
return -ENODEV;
raw_spin_lock_irqsave(&erst_lock, flags);
count = __erst_get_record_count();
raw_spin_unlock_irqrestore(&erst_lock, flags);
return count;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
int erst_get_record_id_begin(int *pos) {
int rc;
if (erst_disable)
return -ENODEV;
rc = mutex_lock_interruptible(&erst_record_id_cache.lock);
if (rc)
return rc;
erst_record_id_cache.refcount++;
mutex_unlock(&erst_record_id_cache.lock);
*pos = 0;
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static int __erst_read_from_storage(u64 record_id, u64 offset) {
struct apei_exec_context ctx;
u64 timeout = FIRMWARE_TIMEOUT;
u64 val;
int rc;
erst_exec_ctx_init(&ctx);
rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_READ);
if (rc)
return rc;
apei_exec_ctx_set_input(&ctx, offset);
rc = apei_e... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c | static void pr_unimpl_nvram(void) {
if (printk_ratelimit())
pr_warn("NVRAM ERST Log Address Range not implemented yet.\n");
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c | static int __erst_write_to_nvram(const struct cper_record_header *record) {
return -ENOSYS;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static int __erst_read_to_erange_from_nvram(u64 record_id, u64 *offset) {
pr_unimpl_nvram();
return -ENOSYS;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static int __erst_read_to_erange(u64 record_id, u64 *offset) {
int rc;
if (erst_erange.attr & ERST_RANGE_NVRAM)
return __erst_read_to_erange_from_nvram(record_id, offset);
rc = __erst_read_from_storage(record_id, 0);
if (rc)
return rc;
*offset = 0;
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static void erst_clear_cache(u64 record_id) {
int i;
u64 *entries;
mutex_lock(&erst_record_id_cache.lock);
entries = erst_record_id_cache.entries;
for (i = 0; i < erst_record_id_cache.len; i++) {
if (entries[i] == record_id)
entries[i] = APEI_ERST_INVALID_RECORD_ID;
}
__erst_record_id_cache_c... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c | ssize_t erst_read_record(u64 record_id, struct cper_record_header *record,
size_t buflen, size_t recordlen,
const guid_t *creatorid) {
ssize_t len;
if (creatorid == NULL) {
len = erst_read(record_id, record, buflen);
if (len == -ENOENT)
erst_clear_cac... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static int __init setup_erst_disable(char *str) {
erst_disable = 1;
return 1;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/erst.c |
static int erst_clearer(struct pstore_record *record) {
return erst_clear(record->id);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/ghes.c |
int ghes_estatus_pool_init(unsigned int num_ghes) {
unsigned long addr, len;
int rc;
ghes_estatus_pool = gen_pool_create(GHES_ESTATUS_POOL_MIN_ALLOC_ORDER, -1);
if (!ghes_estatus_pool)
return -ENOMEM;
len = GHES_ESTATUS_CACHE_AVG_SIZE * GHES_ESTATUS_CACHE_ALLOCED_MAX;
len += (num_ghes * GHES_ESOURCE_... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/ghes.c | static int __ghes_check_estatus(struct ghes *ghes,
struct acpi_hest_generic_status *estatus) {
u32 len = cper_estatus_len(estatus);
if (len < sizeof(*estatus)) {
pr_warn_ratelimited(FW_WARN GHES_PFX "Truncated error status block!\n");
return -EIO;
}
if (len > ghes->gene... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/ghes.c |
static int ghes_read_estatus(struct ghes *ghes,
struct acpi_hest_generic_status *estatus,
u64 *buf_paddr, enum fixed_addresses fixmap_idx) {
int rc;
rc = __ghes_peek_estatus(ghes, estatus, buf_paddr, fixmap_idx);
if (rc)
return rc;
rc = __ghes_che... | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/ghes.c | static bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata,
int sev) {
int flags = -1;
int sec_sev = ghes_severity(gdata->error_severity);
struct cper_sec_mem_err *mem_err = acpi_hest_get_payload(gdata);
if (!(mem_err->validation_bits & CPER_MEM_VALID_PA)... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/ghes.c | static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
int sev) {
struct cper_sec_proc_arm *err = acpi_hest_get_payload(gdata);
bool queued = false;
int sec_sev, i;
char *p;
log_arm_hw_error(err);
sec_sev = ghes_severity(gdata->error_severity);
if... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/hest.c |
static inline bool is_generic_error(struct acpi_hest_header *hest_hdr) {
return hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR ||
hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/apei/hest.c |
static int __init hest_parse_ghes(struct acpi_hest_header *hest_hdr,
void *data) {
struct platform_device *ghes_dev;
struct ghes_arr *ghes_arr = data;
int rc, i;
if (!is_generic_error(hest_hdr))
return 0;
if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
return... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/hest.c |
static int __init hest_ghes_dev_register(unsigned int ghes_count) {
int rc, i;
struct ghes_arr ghes_arr;
ghes_arr.count = 0;
ghes_arr.ghes_devs = kmalloc_array(ghes_count, sizeof(void *), GFP_KERNEL);
if (!ghes_arr.ghes_devs)
return -ENOMEM;
rc = apei_hest_parse(hest_parse_ghes, &ghes_arr);
if (rc)... | [
1,
0
] |
Linux Kernel | drivers/acpi/apei/hest.c |
static int __init setup_hest_disable(char *str) {
hest_disable = HEST_DISABLED;
return 1;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/agdi.c |
static int agdi_probe(struct platform_device *pdev) {
struct agdi_data *adata = dev_get_platdata(&pdev->dev);
if (!adata)
return -EINVAL;
return agdi_sdei_probe(pdev, adata);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/apmt.c |
static int __init apmt_init_resources(struct resource *res,
struct acpi_apmt_node *node) {
int irq, trigger;
int num_res = 0;
res[num_res].start = node->base_address0;
res[num_res].end = node->base_address0 + SZ_4K - 1;
res[num_res].flags = IORESOURCE_MEM;
num_res++;... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/gtdt.c |
static inline __init void *next_platform_timer(void *platform_timer) {
struct acpi_gtdt_header *gh = platform_timer;
platform_timer += gh->length;
if (platform_timer < acpi_gtdt_desc.gtdt_end)
return platform_timer;
return NULL;
}
#define for_each_platform_timer(_g) ... | [
1,
0
] |
Linux Kernel | drivers/acpi/arm64/gtdt.c |
static int __init map_gt_gsi(u32 interrupt, u32 flags) {
int trigger, polarity;
trigger = (flags & ACPI_GTDT_INTERRUPT_MODE) ? ACPI_EDGE_SENSITIVE
: ACPI_LEVEL_SENSITIVE;
polarity = (flags & ACPI_GTDT_INTERRUPT_POLARITY) ? ACPI_ACTIVE_LOW
... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/gtdt.c | int __init acpi_arch_timer_mem_init(struct arch_timer_mem *timer_mem,
int *timer_count) {
int ret;
void *platform_timer;
*timer_count = 0;
for_each_platform_timer(platform_timer) {
if (is_timer_block(platform_timer)) {
ret = gtdt_parse_timer_block(platform_timer, t... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static inline int iort_set_fwnode(struct acpi_iort_node *iort_node,
struct fwnode_handle *fwnode) {
struct iort_fwnode *np;
np = kzalloc(sizeof(struct iort_fwnode), GFP_ATOMIC);
if (WARN_ON(!np))
return -ENOMEM;
INIT_LIST_HEAD(&np->list);
np->iort_node = iort_node;
n... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static inline void iort_delete_fwnode(struct acpi_iort_node *node) {
struct iort_fwnode *curr, *tmp;
spin_lock(&iort_fwnode_lock);
list_for_each_entry_safe(curr, tmp, &iort_fwnode_list, list) {
if (curr->iort_node == node) {
list_del(&curr->list);
kfree(curr);
break;
}
}
spin_unlock... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | void iort_deregister_domain_token(int trans_id) {
struct iort_its_msi_chip *its_msi_chip, *t;
spin_lock(&iort_msi_chip_lock);
list_for_each_entry_safe(its_msi_chip, t, &iort_msi_chip_list, list) {
if (its_msi_chip->translation_id == trans_id) {
list_del(&its_msi_chip->list);
kfree(its_msi_chip);
... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static struct acpi_iort_node *iort_scan_node(enum acpi_iort_node_type type,
iort_find_node_callback callback,
void *context) {
struct acpi_iort_node *iort_node, *iort_end;
struct acpi_table_iort *iort;
int i;
if (!iort_ta... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static acpi_status iort_match_node_callback(struct acpi_iort_node *node,
void *context) {
struct device *dev = context;
acpi_status status = AE_NOT_FOUND;
if (node->type == ACPI_IORT_NODE_NAMED_COMPONENT) {
struct acpi_buffer buf = {ACPI_ALLOCATE_BUFFER, NULL};
... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static int iort_dev_find_its_id(struct device *dev, u32 id, unsigned int idx,
int *its_id) {
struct acpi_iort_its_group *its;
struct acpi_iort_node *node;
node = iort_find_dev_node(dev);
if (!node)
return -ENXIO;
node = iort_node_map_id(node, id, NULL, IORT_MSI_TYPE);
i... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | struct irq_domain *iort_get_device_domain(struct device *dev, u32 id,
enum irq_domain_bus_token bus_token) {
struct fwnode_handle *handle;
int its_id;
if (iort_dev_find_its_id(dev, id, 0, &its_id))
return NULL;
handle = iort_find_domain_token(its_id);
if (!handl... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c |
void acpi_configure_pmsi_domain(struct device *dev) {
struct irq_domain *msi_domain;
msi_domain = iort_get_platform_device_domain(dev);
if (msi_domain)
dev_set_msi_domain(dev, msi_domain);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static void iort_rmr_desc_check_overlap(struct acpi_iort_rmr_desc *desc,
u32 count) {
int i, j;
for (i = 0; i < count; i++) {
u64 end, start = desc[i].base_address, length = desc[i].length;
if (!length) {
pr_err(FW_BUG
"RMR descriptor[0x%llx] with... | [
1,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static void iort_get_rmrs(struct acpi_iort_node *node,
struct acpi_iort_node *smmu, u32 *sids, u32 num_sids,
struct list_head *head) {
struct acpi_iort_rmr *rmr = (struct acpi_iort_rmr *)node->node_data;
struct acpi_iort_rmr_desc *rmr_desc;
int i;
rmr_desc = ... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c |
static u32 *iort_rmr_alloc_sids(u32 *sids, u32 count, u32 id_start,
u32 new_count) {
u32 *new_sids;
u32 total_count = count + new_count;
int i;
new_sids =
krealloc_array(sids, count + new_count, sizeof(*new_sids), GFP_KERNEL);
if (!new_sids)
return NULL;
for (i =... | [
1,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static bool iort_rmr_has_dev(struct device *dev, u32 id_start, u32 id_count) {
int i;
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
if (dev_is_pci(dev)) {
struct pci_dev *pdev = to_pci_dev(dev);
struct pci_host_bridge *host = pci_find_host_bridge(pdev->bus);
if (!host->preserve_config)
... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | void iort_iommu_get_resv_regions(struct device *dev, struct list_head *head) {
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
iort_iommu_msi_get_resv_regions(dev, head);
iort_iommu_rmr_get_resv_regions(fwspec->iommu_fwnode, dev, head);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c |
static void iort_named_component_init(struct device *dev,
struct acpi_iort_node *node) {
struct property_entry props[3] = {};
struct acpi_iort_named_component *nc;
nc = (struct acpi_iort_named_component *)node->node_data;
props[0] = PROPERTY_ENTRY_U32(
"pasid-num-bi... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c |
static int iort_nc_iommu_map_id(struct device *dev, struct acpi_iort_node *node,
const u32 *in_id) {
struct acpi_iort_node *parent;
u32 streamid;
parent = iort_node_map_id(node, *in_id, &streamid, IORT_IOMMU_TYPE);
if (parent)
return iort_iommu_xlate(dev, parent, streamid);... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | int iort_iommu_configure_id(struct device *dev, const u32 *id_in) {
struct acpi_iort_node *node;
int err = -ENODEV;
if (dev_is_pci(dev)) {
struct iommu_fwspec *fwspec;
struct pci_bus *bus = to_pci_dev(dev)->bus;
struct iort_pci_alias_info info = {.dev = dev};
node = iort_scan_node(ACPI_IORT_NODE... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c |
static int nc_dma_get_range(struct device *dev, u64 *size) {
struct acpi_iort_node *node;
struct acpi_iort_named_component *ncomp;
node = iort_scan_node(ACPI_IORT_NODE_NAMED_COMPONENT,
iort_match_node_callback, dev);
if (!node)
return -ENODEV;
ncomp = (struct acpi_iort_named_com... | [
1,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c |
static int rc_dma_get_range(struct device *dev, u64 *size) {
struct acpi_iort_node *node;
struct acpi_iort_root_complex *rc;
struct pci_bus *pbus = to_pci_dev(dev)->bus;
node = iort_scan_node(ACPI_IORT_NODE_PCI_ROOT_COMPLEX,
iort_match_node_callback, &pbus->dev);
if (!node || node->r... | [
1,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static int __init arm_smmu_v3_count_resources(struct acpi_iort_node *node) {
struct acpi_iort_smmu_v3 *smmu;
int num_res = 1;
/* Retrieve SMMUv3 specific data */
smmu = (struct acpi_iort_smmu_v3 *)node->node_data;
if (smmu->event_gsiv)
num_res++;
if (smmu->pri_gsiv)
num_res++;
if (smmu->gerr_... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static bool arm_smmu_v3_is_combined_irq(struct acpi_iort_smmu_v3 *smmu) {
if (smmu->model != ACPI_IORT_SMMU_V3_CAVIUM_CN99XX)
return false;
/*
* ThunderX2 doesn't support MSIs from the SMMU, so we're checking
* SPI numbers here.
*/
return smmu->event_gsiv == smmu->pri_gsiv &&
smmu->event_g... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static void __init arm_smmu_v3_init_resources(struct resource *res,
struct acpi_iort_node *node) {
struct acpi_iort_smmu_v3 *smmu;
int num_res = 0;
smmu = (struct acpi_iort_smmu_v3 *)node->node_data;
res[num_res].start = smmu->base_address;
res[num_res].end = sm... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static int __init
arm_smmu_v3_pmcg_count_resources(struct acpi_iort_node *node) {
struct acpi_iort_pmcg *pmcg;
pmcg = (struct acpi_iort_pmcg *)node->node_data;
/*
* There are always 2 memory resources.
* If the overflow_gsiv is present then add that for a total of 3.
*/
return pmcg->overflow_gsiv ? 3... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | static void __init iort_enable_acs(struct acpi_iort_node *iort_node) {
static bool acs_enabled __initdata;
if (acs_enabled)
return;
if (iort_node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) {
struct acpi_iort_node *parent;
struct acpi_iort_id_mapping *map;
int i;
map = ACPI_ADD_PTR(struct acp... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | void __init acpi_iort_init(void) {
acpi_status status;
status = acpi_get_table(ACPI_SIG_IORT, 0, &iort_table);
if (ACPI_FAILURE(status)) {
if (status != AE_NOT_FOUND) {
const char *msg = acpi_format_exception(status);
pr_err("Failed to get table, %s\n", msg);
}
return;
}
iort_init_... | [
0,
0
] |
Linux Kernel | drivers/acpi/arm64/iort.c | phys_addr_t __init acpi_iort_dma_get_max_cpu_address(void) {
phys_addr_t limit = PHYS_ADDR_MAX;
struct acpi_iort_node *node, *end;
struct acpi_table_iort *iort;
acpi_status status;
int i;
if (acpi_disabled)
return limit;
status = acpi_get_table(ACPI_SIG_IORT, 0, (struct acpi_table_header **)&iort);
... | [
1,
0
] |
Linux Kernel | drivers/acpi/battery.c | static int acpi_battery_is_charged(struct acpi_battery *battery) {
if (battery->state != 0)
return 0;
/* battery not reporting charge */
if (battery->capacity_now == ACPI_BATTERY_VALUE_UNKNOWN ||
battery->capacity_now == 0)
return 0;
/* good batteries update full_charge as the batteries degrade... | [
0,
0
] |
Linux Kernel | drivers/acpi/battery.c |
static int acpi_battery_get_status(struct acpi_battery *battery) {
if (acpi_bus_get_status(battery->device)) {
acpi_handle_info(battery->device->handle, "_STA evaluation failed\n");
return -ENODEV;
}
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/battery.c | static int extract_battery_info(const int use_bix, struct acpi_battery *battery,
const struct acpi_buffer *buffer) {
int result = -EFAULT;
if (use_bix && battery_bix_broken_package)
result =
extract_package(battery, buffer->pointer, extended_info_offsets + 1,
... | [
1,
0
] |
Linux Kernel | drivers/acpi/battery.c |
static int acpi_battery_get_info(struct acpi_battery *battery) {
const int xinfo = test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags);
int use_bix;
int result = -ENODEV;
if (!acpi_battery_present(battery))
return 0;
for (use_bix = xinfo ? 1 : 0; use_bix >= 0; use_bix--) {
struct acpi_buffer buff... | [
0,
0
] |
Linux Kernel | drivers/acpi/battery.c | static void __battery_hook_unregister(struct acpi_battery_hook *hook,
int lock) {
struct acpi_battery *battery;
if (lock)
mutex_lock(&hook_mutex);
list_for_each_entry(battery, &acpi_battery_list, list) {
if (!hook->remove_battery(battery->bat, hook))
power_supp... | [
0,
0
] |
Linux Kernel | drivers/acpi/battery.c | static void battery_hook_remove_battery(struct acpi_battery *battery) {
struct acpi_battery_hook *hook;
mutex_lock(&hook_mutex);
list_for_each_entry(hook, &battery_hook_list, list) {
hook->remove_battery(battery->bat, hook);
}
/* Then, just remove the battery from the list */
list_del(&battery->list);... | [
0,
0
] |
Linux Kernel | drivers/acpi/battery.c |
static int __init acpi_battery_init(void) {
if (acpi_disabled)
return -ENODEV;
async_cookie = async_schedule(acpi_battery_init_async, NULL);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/bgrt.c |
static ssize_t image_read(struct file *file, struct kobject *kobj,
struct bin_attribute *attr, char *buf, loff_t off,
size_t count) {
memcpy(buf, attr->private + off, count);
return count;
} | [
1,
0
] |
Linux Kernel | drivers/acpi/blacklist.c |
int __init acpi_blacklisted(void) {
int i;
int blacklisted = 0;
i = acpi_match_platform_list(acpi_blacklist);
if (i >= 0) {
pr_err("Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI "
"BIOS problem.\n",
acpi_blacklist[i].oem_id, acpi_blacklist[i].oem_table_id,
... | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c |
void acpi_bus_private_data_handler(acpi_handle handle, void *context) {
return;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c |
static void acpi_print_osc_error(acpi_handle handle,
struct acpi_osc_context *context,
char *error) {
int i;
acpi_handle_debug(handle, "(%s): %s\n", context->uuid_str, error);
pr_debug("_OSC request data:");
for (i = 0; i < context->cap.length... | [
1,
0
] |
Linux Kernel | drivers/acpi/bus.c | static void acpi_bus_osc_negotiate_usb_control(void) {
u32 capbuf[3];
struct acpi_osc_context context = {
.uuid_str = sb_usb_uuid_str,
.rev = 1,
.cap.length = sizeof(capbuf),
.cap.pointer = capbuf,
};
acpi_handle handle;
acpi_status status;
u32 control;
if (!osc_sb_native_usb4_sup... | [
1,
0
] |
Linux Kernel | drivers/acpi/bus.c | static void acpi_notify_device_fixed(void *data) {
struct acpi_device *device = data;
acpi_notify_device(NULL, ACPI_FIXED_HARDWARE_EVENT, device);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c | static bool acpi_of_match_device(struct acpi_device *adev,
const struct of_device_id *of_match_table,
const struct of_device_id **of_id) {
const union acpi_object *of_compatible, *obj;
int i, nval;
if (!adev)
return false;
of_compatible = a... | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c | static bool __acpi_match_device_cls(const struct acpi_device_id *id,
struct acpi_hardware_id *hwid) {
int i, msk, byte_shift;
char buf[3];
if (!id->cls)
return false;
for (i = 1; i <= 3; i++) {
byte_shift = 8 * (3 - i);
msk = (id->cls_msk >> byte_shift) & 0xFF;
... | [
1,
0
] |
Linux Kernel | drivers/acpi/bus.c |
bool acpi_driver_match_device(struct device *dev,
const struct device_driver *drv) {
const struct acpi_device_id *acpi_ids = drv->acpi_match_table;
const struct of_device_id *of_ids = drv->of_match_table;
if (!acpi_ids)
return acpi_of_match_device(ACPI_COMPANION(dev), of_ids, N... | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c |
static int acpi_device_uevent(struct device *dev, struct kobj_uevent_env *env) {
return __acpi_device_uevent_modalias(to_acpi_device(dev), env);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c |
int acpi_bus_for_each_dev(int (*fn)(struct device *, void *), void *data) {
return bus_for_each_dev(&acpi_bus_type, NULL, data, fn);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c |
int acpi_dev_for_each_child_reverse(struct acpi_device *adev,
int (*fn)(struct acpi_device *, void *),
void *data) {
struct acpi_dev_walk_context adwc = {
.fn = fn,
.data = data,
};
return device_for_each_child_reverse(&adev->de... | [
0,
0
] |
Linux Kernel | drivers/acpi/bus.c | static int __init acpi_bus_init_irq(void) {
acpi_status status;
char *message = NULL;
switch (acpi_irq_model) {
case ACPI_IRQ_MODEL_PIC:
message = "PIC";
break;
case ACPI_IRQ_MODEL_IOAPIC:
message = "IOAPIC";
break;
case ACPI_IRQ_MODEL_IOSAPIC:
message = "IOSAPIC";
break;
case ACP... | [
0,
0
] |
Linux Kernel | drivers/acpi/button.c |
static int acpi_lid_evaluate_state(struct acpi_device *device) {
unsigned long long lid_state;
acpi_status status;
status = acpi_evaluate_integer(device->handle, "_LID", NULL, &lid_state);
if (ACPI_FAILURE(status))
return -ENODEV;
return lid_state ? 1 : 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/button.c | static int acpi_button_add_fs(struct acpi_device *device) {
struct acpi_button *button = acpi_driver_data(device);
struct proc_dir_entry *entry = NULL;
int ret = 0;
if (button->type != ACPI_BUTTON_TYPE_LID)
return 0;
if (acpi_button_dir || acpi_lid_dir) {
pr_info("More than one Lid device found!\n")... | [
0,
0
] |
Linux Kernel | drivers/acpi/button.c |
static void acpi_button_remove(struct acpi_device *device) {
struct acpi_button *button = acpi_driver_data(device);
acpi_button_remove_fs(device);
input_unregister_device(button->input);
kfree(button);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/button.c |
static int param_set_lid_init_state(const char *val,
const struct kernel_param *kp) {
int i;
i = sysfs_match_string(lid_init_state_str, val);
if (i < 0)
return i;
lid_init_state = i;
pr_info("Initial lid state set to '%s'\n", lid_init_state_str[i]);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/container.c |
static void acpi_container_release(struct device *dev) {
kfree(to_container_dev(dev));
} | [
0,
0
] |
Linux Kernel | drivers/acpi/container.c |
static int container_device_attach(struct acpi_device *adev,
const struct acpi_device_id *not_used) {
struct container_dev *cdev;
struct device *dev;
int ret;
if (adev->flags.is_dock_station)
return 0;
cdev = kzalloc(sizeof(*cdev), GFP_KERNEL);
if (!cdev)
return... | [
0,
0
] |
Linux Kernel | drivers/acpi/container.c | void __init acpi_container_init(void) {
acpi_scan_add_handler_with_hotplug(&container_handler, "container");
}
#endif | [
0,
0
] |
Linux Kernel | drivers/acpi/cppc_acpi.c |
bool acpi_cpc_valid(void) {
struct cpc_desc *cpc_ptr;
int cpu;
if (acpi_disabled)
return false;
for_each_present_cpu(cpu) {
cpc_ptr = per_cpu(cpc_desc_ptr, cpu);
if (!cpc_ptr)
return false;
}
return true;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/cppc_acpi.c | static int register_pcc_channel(int pcc_ss_idx) {
struct pcc_mbox_chan *pcc_chan;
u64 usecs_lat;
if (pcc_ss_idx >= 0) {
pcc_chan = pcc_mbox_request_channel(&cppc_mbox_cl, pcc_ss_idx);
if (IS_ERR(pcc_chan)) {
pr_err("Failed to find PCC channel for subspace %d\n", pcc_ss_idx);
return -ENODEV;
... | [
0,
0
] |
Linux Kernel | drivers/acpi/cppc_acpi.c | bool __weak cpc_ffh_supported(void) { return false; } | [
0,
0
] |
Linux Kernel | drivers/acpi/cppc_acpi.c | static inline void arch_init_invariance_cppc(void) {}
#endif | [
0,
0
] |
Linux Kernel | drivers/acpi/device_pm.c | int acpi_device_get_power(struct acpi_device *device, int *state) {
int result = ACPI_STATE_UNKNOWN;
struct acpi_device *parent;
int error;
if (!device || !state)
return -EINVAL;
parent = acpi_dev_parent(device);
if (!device->flags.power_manageable) {
*state = parent ? parent->power.state : ACPI... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.