Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | drivers/acpi/nfit/core.c |
static ssize_t formats_show(struct device *dev, struct device_attribute *attr,
char *buf) {
struct nvdimm *nvdimm = to_nvdimm(dev);
return sprintf(buf, "%d\n", num_nvdimm_formats(nvdimm));
} | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static ssize_t serial_show(struct device *dev, struct device_attribute *attr,
char *buf) {
struct acpi_nfit_control_region *dcr = to_nfit_dcr(dev);
return sprintf(buf, "0x%08x\n", be32_to_cpu(dcr->serial_number));
} | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static ssize_t dsm_mask_show(struct device *dev, struct device_attribute *attr,
char *buf) {
struct nvdimm *nvdimm = to_nvdimm(dev);
struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
if (nfit_mem->family < 0)
return -ENXIO;
return sprintf(buf, "%#lx\n", nfit_mem->dsm_m... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static ssize_t id_show(struct device *dev, struct device_attribute *attr,
char *buf) {
struct nvdimm *nvdimm = to_nvdimm(dev);
struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
return sprintf(buf, "%s\n", nfit_mem->id);
} | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static umode_t acpi_nfit_dimm_attr_visible(struct kobject *kobj,
struct attribute *a, int n) {
struct device *dev = kobj_to_dev(kobj);
struct nvdimm *nvdimm = to_nvdimm(dev);
struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
if (!to_nfit_dcr(dev)) {
if (a... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static struct nvdimm *acpi_nfit_dimm_by_handle(struct acpi_nfit_desc *acpi_desc,
u32 device_handle) {
struct nfit_mem *nfit_mem;
list_for_each_entry(nfit_mem, &acpi_desc->dimms,
list) if (__to_nfit_memdev(nfit_mem)->device_handle ==
... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
__weak void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem) {
struct device *dev = &nfit_mem->adev->dev;
struct nd_intel_smart smart = {0};
union acpi_object in_buf = {
.buffer.type = ACPI_TYPE_BUFFER,
.buffer.length = 0,
};
union acpi_object in_obj = {
.package.type = ACPI_TYPE_PACKA... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static void populate_shutdown_status(struct nfit_mem *nfit_mem) {
if (nfit_mem->family == NVDIMM_FAMILY_INTEL)
nfit_intel_shutdown_status(nfit_mem);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static void shutdown_dimm_notify(void *data) {
struct acpi_nfit_desc *acpi_desc = data;
struct nfit_mem *nfit_mem;
mutex_lock(&acpi_desc->init_mutex);
list_for_each_entry(nfit_mem, &acpi_desc->dimms, list) {
struct acpi_device *adev_dimm = nfit_mem->adev;
if (nfit_mem->flags_attr) {
sysfs_put(n... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static const struct nvdimm_security_ops *
acpi_nfit_get_security_ops(int family) {
switch (family) {
case NVDIMM_FAMILY_INTEL:
return intel_security_ops;
default:
return NULL;
}
} | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static int cmp_map2(const void *m0, const void *m1) {
const struct nfit_set_info2 *map0 = m0;
const struct nfit_set_info2 *map1 = m1;
if (map0->region_offset < map1->region_offset)
return -1;
else if (map0->region_offset > map1->region_offset)
return 1;
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static int ars_get_status(struct acpi_nfit_desc *acpi_desc) {
struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc;
struct nd_cmd_ars_status *ars_status = acpi_desc->ars_status;
int rc, cmd_rc;
rc = nd_desc->ndctl(nd_desc, NULL, ND_CMD_ARS_STATUS, ars_status,
acpi_desc->max_ars, &... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static void acpi_nfit_remove_resource(void *data) {
struct resource *res = data;
remove_resource(res);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
static int ars_status_alloc(struct acpi_nfit_desc *acpi_desc) {
struct device *dev = acpi_desc->dev;
struct nd_cmd_ars_status *ars_status;
if (acpi_desc->ars_status) {
memset(acpi_desc->ars_status, 0, acpi_desc->max_ars);
return 0;
}
ars_status = devm_kzalloc(dev, acpi_desc->max_ars, GFP_KERNEL);
... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static int ars_register(struct acpi_nfit_desc *acpi_desc,
struct nfit_spa *nfit_spa) {
int rc;
if (test_bit(ARS_FAILED, &nfit_spa->ars_state))
return acpi_nfit_register_region(acpi_desc, nfit_spa);
set_bit(ARS_REQ_SHORT, &nfit_spa->ars_state);
if (!no_init_ars)
set_bit(ARS_REQ_... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static void __sched_ars(struct acpi_nfit_desc *acpi_desc, unsigned int tmo) {
lockdep_assert_held(&acpi_desc->init_mutex);
set_bit(ARS_BUSY, &acpi_desc->scrub_flags);
if (tmo)
acpi_desc->scrub_tmo = tmo;
queue_delayed_work(nfit_wq, &acpi_desc->dwork, tmo * HZ);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static int __acpi_nfit_clear_to_send(struct nvdimm_bus_descriptor *nd_desc,
struct nvdimm *nvdimm, unsigned int cmd) {
struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc);
if (nvdimm)
return 0;
if (cmd != ND_CMD_ARS_START)
return 0;
if (work_busy(&acpi_desc->d... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static int acpi_nfit_clear_to_send(struct nvdimm_bus_descriptor *nd_desc,
struct nvdimm *nvdimm, unsigned int cmd,
void *buf) {
struct nd_cmd_pkg *call_pkg = buf;
unsigned int func;
if (nvdimm && cmd == ND_CMD_CALL &&
call_pkg->nd_family... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c | static void acpi_nfit_update_notify(struct device *dev, acpi_handle handle) {
struct acpi_nfit_desc *acpi_desc = dev_get_drvdata(dev);
struct acpi_buffer buf = {ACPI_ALLOCATE_BUFFER, NULL};
union acpi_object *obj;
acpi_status status;
int ret;
if (!dev->driver) {
dev_dbg(dev, "no driver found for dev\n... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/core.c |
void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event) {
dev_dbg(dev, "event: 0x%x\n", event);
switch (event) {
case NFIT_NOTIFY_UPDATE:
return acpi_nfit_update_notify(dev, handle);
case NFIT_NOTIFY_UC_MEMORY_ERROR:
return acpi_nfit_uc_error_notify(dev, handle);
default:
retu... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/intel.c |
static ssize_t firmware_activate_noidle_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size) {
struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev);
struct nvdimm_bus_descriptor *nd_desc = to... | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/intel.c |
static int intel_security_freeze(struct nvdimm *nvdimm) {
struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
struct {
struct nd_cmd_pkg pkg;
struct nd_intel_freeze_lock cmd;
} nd_cmd = {
.pkg =
{
.nd_command = NVDIMM_INTEL_FREEZE_LOCK,
.nd_family = NVDIM... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/intel.c |
static int __maybe_unused intel_security_unlock(
struct nvdimm *nvdimm, const struct nvdimm_key_data *key_data) {
struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
struct {
struct nd_cmd_pkg pkg;
struct nd_intel_unlock_unit cmd;
} nd_cmd = {
.pkg =
{
.nd_command ... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/intel.c |
static int __maybe_unused
intel_security_query_overwrite(struct nvdimm *nvdimm) {
int rc;
struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
struct {
struct nd_cmd_pkg pkg;
struct nd_intel_query_overwrite cmd;
} nd_cmd = {
.pkg =
{
.nd_command = NVDIMM_INTEL_QUERY_O... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/intel.c | static int intel_fwa_arm(struct nvdimm *nvdimm, enum nvdimm_fwa_trigger arm) {
struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm);
struct acpi_nfit_desc *acpi_desc = nfit_mem->acpi_desc;
struct {
struct nd_cmd_pkg pkg;
struct nd_intel_fw_activate_arm cmd;
} nd_cmd = {
.pkg =
{
... | [
1,
0
] |
Linux Kernel | drivers/acpi/nfit/mce.c |
void nfit_mce_register(void) { mce_register_decode_chain(&nfit_mce_dec); } | [
0,
0
] |
Linux Kernel | drivers/acpi/nfit/nfit.h | static inline void nfit_mce_register(void) {} | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
void __init disable_hmat(void) { hmat_disable = 1; } | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static struct memory_initiator *find_mem_initiator(unsigned int cpu_pxm) {
struct memory_initiator *initiator;
list_for_each_entry(initiator, &initiators,
node) if (initiator->processor_pxm ==
cpu_pxm) return initiator;
return NULL;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c | static __init void alloc_memory_target(unsigned int mem_pxm,
resource_size_t start,
resource_size_t len) {
struct memory_target *target;
target = find_mem_target(mem_pxm);
if (!target) {
target = kzalloc(sizeof(*target), GFP_KERNEL... | [
1,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c | static u32 hmat_normalize(u16 entry, u64 base, u8 type) {
u32 value;
if (entry == 0xffff || !entry)
return 0;
else if (base > (UINT_MAX / (entry)))
return 0;
/*
* Divide by the base unit for version 1, convert latency from
* picosenonds to nanoseconds if revision 2.
*/
value = entry * base;... | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static void hmat_update_target_access(struct memory_target *target, u8 type,
u32 value, int access) {
switch (type) {
case ACPI_HMAT_ACCESS_LATENCY:
target->hmem_attrs[access].read_latency = value;
target->hmem_attrs[access].write_latency = value;
break;
case ACP... | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static __init int hmat_parse_cache(union acpi_subtable_headers *header,
const unsigned long end) {
struct acpi_hmat_cache *cache = (void *)header;
struct memory_target *target;
struct target_cache *tcache;
u32 attrs;
if (cache->header.length < sizeof(*cache)) {
pr_noti... | [
1,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static __init int srat_parse_mem_affinity(union acpi_subtable_headers *header,
const unsigned long end) {
struct acpi_srat_mem_affinity *ma = (void *)header;
if (!ma)
return -EINVAL;
if (!(ma->flags & ACPI_SRAT_MEM_ENABLED))
return 0;
alloc_memory_target(ma->p... | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static int initiator_cmp(void *priv, const struct list_head *a,
const struct list_head *b) {
struct memory_initiator *ia;
struct memory_initiator *ib;
ia = list_entry(a, struct memory_initiator, node);
ib = list_entry(b, struct memory_initiator, node);
return ia->processor_pxm - ib... | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static int initiators_to_nodemask(unsigned long *p_nodes) {
struct memory_initiator *initiator;
if (list_empty(&initiators))
return -ENXIO;
list_for_each_entry(initiator, &initiators, node)
set_bit(initiator->processor_pxm, p_nodes);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static void hmat_register_target_cache(struct memory_target *target) {
unsigned mem_nid = pxm_to_node(target->memory_pxm);
struct target_cache *tcache;
list_for_each_entry(tcache, &target->caches, node)
node_add_cache(mem_nid, &tcache->cache_attrs);
} | [
1,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static void hmat_register_target_perf(struct memory_target *target,
int access) {
unsigned mem_nid = pxm_to_node(target->memory_pxm);
node_set_perf_attrs(mem_nid, &target->hmem_attrs[access], access);
} | [
1,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c |
static __init void hmat_free_structures(void) {
struct memory_target *target, *tnext;
struct memory_locality *loc, *lnext;
struct memory_initiator *initiator, *inext;
struct target_cache *tcache, *cnext;
list_for_each_entry_safe(target, tnext, &targets, node) {
struct resource *res, *res_next;
list... | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/hmat.c | static __init int hmat_init(void) {
struct acpi_table_header *tbl;
enum acpi_hmat_type i;
acpi_status status;
if (srat_disabled() || hmat_disable)
return 0;
status = acpi_get_table(ACPI_SIG_SRAT, 0, &tbl);
if (ACPI_FAILURE(status))
return 0;
if (acpi_table_parse_entries(ACPI_SIG_SRAT, sizeof(st... | [
1,
0
] |
Linux Kernel | drivers/acpi/numa/srat.c |
int pxm_to_node(int pxm) {
if (pxm < 0 || pxm >= MAX_PXM_DOMAINS || numa_off)
return NUMA_NO_NODE;
return pxm_to_node_map[pxm];
} | [
1,
0
] |
Linux Kernel | drivers/acpi/numa/srat.c |
int node_to_pxm(int node) {
if (node < 0)
return PXM_INVAL;
return node_to_pxm_map[node];
} | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/srat.c | static int __init slit_valid(struct acpi_table_slit *slit) {
int i, j;
int d = slit->locality_count;
for (i = 0; i < d; i++) {
for (j = 0; j < d; j++) {
u8 val = slit->entry[d * i + j];
if (i == j) {
if (val != LOCAL_DISTANCE)
return 0;
} else if (val <= LOCAL_DISTANCE)
... | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/srat.c |
int __init srat_disabled(void) { return acpi_numa < 0; } | [
0,
0
] |
Linux Kernel | drivers/acpi/numa/srat.c | static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
void *arg, const unsigned long table_end) {
struct acpi_cedt_cfmws *cfmws;
int *fake_pxm = arg;
u64 start, end;
int node;
cfmws = (struct acpi_cedt_cfmws *)header;
start = cfmws->base_hpa;
end = cfm... | [
1,
0
] |
Linux Kernel | drivers/acpi/nvs.c | static inline int suspend_nvs_register(unsigned long a, unsigned long b) {
return 0;
}
#endif | [
0,
0
] |
Linux Kernel | drivers/acpi/nvs.c |
int acpi_nvs_for_each_region(int (*func)(__u64 start, __u64 size, void *data),
void *data) {
int rc;
struct nvs_region *region;
list_for_each_entry(region, &nvs_region_list, node) {
rc = func(region->phys_start, region->size, data);
if (rc)
return rc;
}
return 0;
... | [
0,
0
] |
Linux Kernel | drivers/acpi/nvs.c | static int suspend_nvs_register(unsigned long start, unsigned long size) {
struct nvs_page *entry, *next;
pr_info("Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
start, start + size - 1, size);
while (size > 0) {
unsigned int nr_bytes;
entry = kzalloc(sizeof(struct nvs_page... | [
1,
0
] |
Linux Kernel | drivers/acpi/nvs.c | int suspend_nvs_alloc(void) {
struct nvs_page *entry;
list_for_each_entry(entry, &nvs_list, node) {
entry->data = (void *)__get_free_page(GFP_KERNEL);
if (!entry->data) {
suspend_nvs_free();
return -ENOMEM;
}
}
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osi.c |
static u32 acpi_osi_handler(acpi_string interface, u32 supported) {
if (!strcmp("Linux", interface)) {
pr_notice_once(FW_BUG "BIOS _OSI(Linux) query %s%s\n",
osi_config.linux_enable ? "honored" : "ignored",
osi_config.linux_cmdline ? " via cmdline"
: osi_c... | [
0,
0
] |
Linux Kernel | drivers/acpi/osi.c |
bool acpi_osi_is_win8(void) { return acpi_gbl_osi_data >= ACPI_OSI_WIN_8; } | [
0,
0
] |
Linux Kernel | drivers/acpi/osi.c |
static int __init dmi_enable_osi_linux(const struct dmi_system_id *d) {
acpi_osi_dmi_linux(true, d);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
void acpi_os_vprintf(const char *fmt, va_list args) {
static char buffer[512];
vsprintf(buffer, fmt, args);
#ifdef ENABLE_DEBUGGER
if (acpi_in_debugger) {
kdb_printf("%s", buffer);
} else {
if (printk_get_level(buffer))
printk("%s", buffer);
else
printk(KERN_CONT "%s", buffer);
}
#e... | [
1,
0
] |
Linux Kernel | drivers/acpi/osl.c | static int __init setup_acpi_rsdp(char *arg) {
return kstrtoul(arg, 16, &acpi_rsdp);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c | acpi_physical_address __init acpi_os_get_root_pointer(void) {
acpi_physical_address pa;
#ifdef CONFIG_KEXEC
if (acpi_rsdp && !security_locked_down(LOCKDOWN_ACPI_TABLES)) {
acpi_arch_set_root_pointer(acpi_rsdp);
return acpi_rsdp;
}
#endif
pa = acpi_arch_get_root_pointer();
if (pa)
return pa;
i... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c | static struct acpi_ioremap *acpi_map_lookup(acpi_physical_address phys,
acpi_size size) {
struct acpi_ioremap *map;
list_for_each_entry_rcu(
map, &acpi_ioremaps, list,
acpi_ioremap_lock_held()) if (map->phys <= phys &&
phys... | [
1,
0
] |
Linux Kernel | drivers/acpi/osl.c |
static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr) {
unsigned long pfn;
pfn = pg_off >> PAGE_SHIFT;
if (should_use_kmap(pfn))
kunmap(pfn_to_page(pfn));
else
iounmap(vaddr);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c | void acpi_os_unmap_generic_address(struct acpi_generic_address *gas) {
u64 addr;
struct acpi_ioremap *map;
if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
return;
memcpy(&addr, &gas->address, sizeof(addr));
if (!addr || !gas->bit_width)
return;
mutex_lock(&acpi_ioremap_lock);
map = acpi_map... | [
1,
0
] |
Linux Kernel | drivers/acpi/osl.c |
void acpi_os_stall(u32 us) {
while (us) {
u32 delay = 1000;
if (delay > us)
delay = us;
udelay(delay);
touch_nmi_watchdog();
us -= delay;
}
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width) {
if (width <= 8) {
outb(value, port);
} else if (width <= 16) {
outw(value, port);
} else if (width <= 32) {
outl(value, port);
} else {
pr_debug("%s: Access width %d not supported\n", __func__, width);
return AE_BA... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
int acpi_os_read_iomem(void __iomem *virt_addr, u64 *value, u32 width) {
switch (width) {
case 8:
*(u8 *)value = readb(virt_addr);
break;
case 16:
*(u16 *)value = readw(virt_addr);
break;
case 32:
*(u32 *)value = readl(virt_addr);
break;
case 64:
*(u64 *)value = readq(virt_addr);... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
acpi_status acpi_os_write_memory(acpi_physical_address phys_addr, u64 value,
u32 width) {
void __iomem *virt_addr;
unsigned int size = width / 8;
bool unmap = false;
rcu_read_lock();
virt_addr = acpi_map_vaddr_lookup(phys_addr, size);
if (!virt_addr) {
rcu_read_unlock(... | [
1,
0
] |
Linux Kernel | drivers/acpi/osl.c | acpi_status acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, u32 reg,
u64 *value, u32 width) {
int result, size;
u32 value32;
if (!value)
return AE_BAD_PARAMETER;
switch (width) {
case 8:
size = 1;
break;
case 16:
size = 2;
break;
... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
int acpi_register_debugger(struct module *owner,
const struct acpi_debugger_ops *ops) {
int ret = 0;
mutex_lock(&acpi_debugger.lock);
if (acpi_debugger.ops) {
ret = -EBUSY;
goto err_lock;
}
acpi_debugger.owner = owner;
acpi_debugger.ops = ops;
err_lock:
mutex_unlock(... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
void acpi_unregister_debugger(const struct acpi_debugger_ops *ops) {
mutex_lock(&acpi_debugger.lock);
if (ops == acpi_debugger.ops) {
acpi_debugger.ops = NULL;
acpi_debugger.owner = NULL;
}
mutex_unlock(&acpi_debugger.lock);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
int acpi_debugger_create_thread(acpi_osd_exec_callback function,
void *context) {
int ret;
int (*func)(acpi_osd_exec_callback, void *);
struct module *owner;
if (!acpi_debugger_initialized)
return -ENODEV;
mutex_lock(&acpi_debugger.lock);
if (!acpi_debugger.ops) {
r... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
ssize_t acpi_debugger_write_log(const char *msg) {
ssize_t ret;
ssize_t (*func)(const char *);
struct module *owner;
if (!acpi_debugger_initialized)
return -ENODEV;
mutex_lock(&acpi_debugger.lock);
if (!acpi_debugger.ops) {
ret = -ENODEV;
goto err_lock;
}
if (!try_module_get(acpi_debugger.... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
acpi_status acpi_os_create_semaphore(u32 max_units, u32 initial_units,
acpi_handle *handle) {
struct semaphore *sem = NULL;
sem = acpi_os_allocate_zeroed(sizeof(struct semaphore));
if (!sem)
return AE_NO_MEMORY;
sema_init(sem, initial_units);
*handle = (acpi_handle... | [
1,
0
] |
Linux Kernel | drivers/acpi/osl.c | acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout) {
acpi_status status = AE_OK;
struct semaphore *sem = (struct semaphore *)handle;
long jiffies;
int ret = 0;
if (!acpi_os_initialized)
return AE_OK;
if (!sem || (units < 1))
return AE_BAD_PARAMETER;
if (units > 1)
... | [
1,
1
] |
Linux Kernel | drivers/acpi/osl.c | acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units) {
struct semaphore *sem = (struct semaphore *)handle;
if (!acpi_os_initialized)
return AE_OK;
if (!sem || (units < 1))
return AE_BAD_PARAMETER;
if (units > 1)
return AE_SUPPORT;
ACPI_DEBUG_PRINT(
(ACPI_DB_MUTEX, "Signali... | [
1,
1
] |
Linux Kernel | drivers/acpi/osl.c |
acpi_status acpi_os_wait_command_ready(void) {
int ret;
ret = acpi_debugger_wait_command_ready();
if (ret < 0)
return AE_ERROR;
return AE_OK;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
static int __init acpi_enforce_resources_setup(char *str) {
if (str == NULL || *str == '\0')
return 0;
if (!strcmp("strict", str))
acpi_enforce_resources = ENFORCE_RESOURCES_STRICT;
else if (!strcmp("lax", str))
acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
else if (!strcmp("no", str))
acpi_... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c | void acpi_os_delete_lock(acpi_spinlock handle) { ACPI_FREE(handle); } | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) __acquires(lockp) {
acpi_cpu_flags flags;
spin_lock_irqsave(lockp, flags);
return flags;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c | acpi_status acpi_os_delete_cache(acpi_cache_t *cache) {
kmem_cache_destroy(cache);
return (AE_OK);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
static int __init acpi_disable_return_repair(char *s) {
pr_notice("Predefined validation mechanism disabled\n");
acpi_gbl_disable_auto_repair = TRUE;
return 1;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c |
acpi_status acpi_os_terminate(void) {
if (acpi_irq_handler) {
acpi_os_remove_interrupt_handler(acpi_gbl_FADT.sci_interrupt,
acpi_irq_handler);
}
acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe1_block);
acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block);
acpi... | [
0,
0
] |
Linux Kernel | drivers/acpi/osl.c | acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state, u32 val_a,
u32 val_b) {
return AE_OK;
}
#endif | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_irq.c |
static int bridge_has_boot_interrupt_variant(struct pci_bus *bus) {
struct pci_bus *bus_it;
for (bus_it = bus; bus_it; bus_it = bus_it->parent) {
if (!bus_it->self)
return 0;
if (bus_it->self->irq_reroute_variant)
return bus_it->self->irq_reroute_variant;
}
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_irq.c | static inline int acpi_isa_register_gsi(struct pci_dev *dev) { return -ENODEV; }
#endif | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_link.c | static int acpi_pci_link_get_current(struct acpi_pci_link *link) {
acpi_handle handle = link->device->handle;
acpi_status status;
int result = 0;
int irq = 0;
link->irq.active = 0;
if (acpi_strict) {
/* Query _STA, set link->device->status */
result = acpi_bus_get_status(link->device);
if (res... | [
1,
0
] |
Linux Kernel | drivers/acpi/pci_link.c | static int acpi_pci_link_add(struct acpi_device *device,
const struct acpi_device_id *not_used) {
acpi_handle handle = device->handle;
struct acpi_pci_link *link;
int result;
int i;
link = kzalloc(sizeof(struct acpi_pci_link), GFP_KERNEL);
if (!link)
return -ENOMEM;
link... | [
1,
0
] |
Linux Kernel | drivers/acpi/pci_link.c |
static int acpi_pci_link_resume(struct acpi_pci_link *link) {
if (link->refcnt && link->irq.active && link->irq.initialized)
return (acpi_pci_link_set(link, link->irq.active));
return 0;
} | [
1,
0
] |
Linux Kernel | drivers/acpi/pci_link.c |
static void irqrouter_resume(void) {
struct acpi_pci_link *link;
list_for_each_entry(link, &acpi_link_list, list) {
acpi_pci_link_resume(link);
}
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_link.c |
bool acpi_isa_irq_available(int irq) {
return irq >= 0 && (irq >= ARRAY_SIZE(acpi_isa_irq_penalty) ||
acpi_irq_get_penalty(irq) < PIRQ_PENALTY_ISA_ALWAYS);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_link.c |
void acpi_penalize_sci_irq(int irq, int trigger, int polarity) {
sci_irq = irq;
if (trigger == ACPI_MADT_TRIGGER_LEVEL &&
polarity == ACPI_MADT_POLARITY_ACTIVE_LOW)
sci_penalty = PIRQ_PENALTY_PCI_USING;
else
sci_penalty = PIRQ_PENALTY_ISA_ALWAYS;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_link.c | static int __init acpi_irq_isa(char *str) {
return acpi_irq_penalty_update(str, 1);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_link.c |
static int __init acpi_irq_nobalance_set(char *str) {
acpi_irq_balance = 0;
return 1;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c |
static void decode_osc_support(struct acpi_pci_root *root, char *msg,
u32 word) {
decode_osc_bits(root, msg, word, pci_osc_support_bit,
ARRAY_SIZE(pci_osc_support_bit));
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c |
static void decode_osc_control(struct acpi_pci_root *root, char *msg,
u32 word) {
decode_osc_bits(root, msg, word, pci_osc_control_bit,
ARRAY_SIZE(pci_osc_control_bit));
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c |
static inline bool is_cxl(struct acpi_pci_root *root) {
return root->bridge_type == ACPI_BRIDGE_TYPE_CXL;
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c |
static int cap_length(struct acpi_pci_root *root) {
if (is_cxl(root))
return sizeof(u32) * OSC_CXL_CAPABILITY_DWORDS;
return sizeof(u32) * OSC_PCI_CAPABILITY_DWORDS;
} | [
1,
0
] |
Linux Kernel | drivers/acpi/pci_root.c | struct pci_dev *acpi_get_pci_dev(acpi_handle handle) {
struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
struct acpi_device_physical_node *pn;
struct pci_dev *pci_dev = NULL;
if (!adev)
return NULL;
mutex_lock(&adev->physical_node_lock);
list_for_each_entry(pn, &adev->physical_node_list, node) ... | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c | static u32 calculate_cxl_support(void) {
u32 support;
support = OSC_CXL_2_0_PORT_DEV_REG_ACCESS_SUPPORT;
support |= OSC_CXL_1_1_PORT_REG_ACCESS_SUPPORT;
if (pci_aer_available())
support |= OSC_CXL_PROTOCOL_ERR_REPORTING_SUPPORT;
if (IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE))
support |= OSC_CXL_NATIVE_HP_SU... | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c |
static void acpi_pci_root_remove(struct acpi_device *device) {
struct acpi_pci_root *root = acpi_driver_data(device);
pci_lock_rescan_remove();
pci_stop_root_bus(root->bus);
pci_ioapic_remove(root);
device_set_wakeup_capable(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
pci_remo... | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c |
static void acpi_pci_root_remap_iospace(struct fwnode_handle *fwnode,
struct resource_entry *entry) {
#ifdef PCI_IOBASE
struct resource *res = entry->res;
resource_size_t cpu_addr = res->start;
resource_size_t pci_addr = cpu_addr - entry->offset;
resource_size_t length =... | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_root.c | static void pci_acpi_root_add_resources(struct acpi_pci_root_info *info) {
struct resource_entry *entry, *tmp;
struct resource *res, *conflict, *root = NULL;
resource_list_for_each_entry_safe(entry, tmp, &info->resources) {
res = entry->res;
if (res->flags & IORESOURCE_MEM)
root = &iomem_resource;
... | [
0,
0
] |
Linux Kernel | drivers/acpi/pci_slot.c | static acpi_status register_slot(acpi_handle handle, u32 lvl, void *context,
void **rv) {
int device;
unsigned long long sun;
char name[SLOT_NAME_SIZE];
struct acpi_pci_slot *slot;
struct pci_slot *pci_slot;
struct pci_bus *pci_bus = context;
device = check_slot(handle, &... | [
1,
0
] |
Linux Kernel | drivers/acpi/pfr_telemetry.c |
static inline struct pfrt_log_device *to_pfrt_log_dev(struct file *file) {
return container_of(file->private_data, struct pfrt_log_device, miscdev);
} | [
0,
0
] |
Linux Kernel | drivers/acpi/pfr_telemetry.c |
static int set_pfrt_log_level(int level, struct pfrt_log_device *pfrt_log_dev) {
acpi_handle handle = ACPI_HANDLE(pfrt_log_dev->parent_dev);
union acpi_object *out_obj, *obj, in_obj, in_buf;
enum pfru_dsm_status status, ext_status;
int ret = 0;
memset(&in_obj, 0, sizeof(in_obj));
memset(&in_buf, 0, sizeof... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.