Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
drivers/acpi/pfr_telemetry.c
static int get_pfrt_log_level(struct pfrt_log_device *pfrt_log_dev) { acpi_handle handle = ACPI_HANDLE(pfrt_log_dev->parent_dev); union acpi_object *out_obj, *obj; enum pfru_dsm_status status, ext_status; int ret = -EBUSY; out_obj = acpi_evaluate_dsm_typed(handle, &pfrt_log_guid, ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/pfr_telemetry.c
static int valid_log_type(u32 type) { return type == PFRT_LOG_EXEC_IDX || type == PFRT_LOG_HISTORY_IDX; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pfr_update.c
static int query_buffer(struct pfru_com_buf_info *info, struct pfru_device *pfru_dev) { acpi_handle handle = ACPI_HANDLE(pfru_dev->parent_dev); union acpi_object *out_obj; int ret = -EINVAL; out_obj = acpi_evaluate_dsm_typed(handle, &pfru_guid, pfru_dev->rev_id, ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pfr_update.c
static int adjust_efi_size(const struct efi_manage_capsule_image_header *img_hdr, int size) { size += sizeof(struct efi_manage_capsule_image_header); switch (img_hdr->ver) { case 1: return size - 2 * sizeof(u64); case 2: return size - sizeof(u64); default: /* only support versio...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pfr_update.c
static void print_update_debug_info(struct pfru_updated_result *result, struct pfru_device *pfru_dev) { dev_dbg(pfru_dev->parent_dev, "Update result:\n"); dev_dbg(pfru_dev->parent_dev, "Authentication Time Low:%lld\n", result->low_auth_time); dev_dbg(pfru_dev->parent...
[ 0, 0 ]
Linux Kernel
drivers/acpi/pfr_update.c
static void pfru_put_idx(void *data) { struct pfru_device *pfru_dev = data; ida_free(&pfru_ida, pfru_dev->index); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pfr_update.c
static int acpi_pfru_probe(struct platform_device *pdev) { acpi_handle handle = ACPI_HANDLE(&pdev->dev); struct pfru_device *pfru_dev; int ret; if (!acpi_has_method(handle, "_DSM")) { dev_dbg(&pdev->dev, "Missing _DSM\n"); return -ENODEV; } pfru_dev = devm_kzalloc(&pdev->dev, sizeof(*pfru_dev), G...
[ 1, 0 ]
Linux Kernel
drivers/acpi/platform_profile.c
static ssize_t platform_profile_choices_show(struct device *dev, struct device_attribute *attr, char *buf) { int len = 0; int err, i; err = mutex_lock_interruptible(&profile_lock); if (err) return err; if (!cur_pr...
[ 0, 0 ]
Linux Kernel
drivers/acpi/platform_profile.c
static ssize_t platform_profile_show(struct device *dev, struct device_attribute *attr, char *buf) { enum platform_profile_option profile = PLATFORM_PROFILE_BALANCED; int err; err = mutex_lock_interruptible(&profile_lock); if (err) return err; if (!cur_profile) { ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/platform_profile.c
void platform_profile_notify(void) { if (!cur_profile) return; sysfs_notify(acpi_kobj, NULL, "platform_profile"); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/platform_profile.c
int platform_profile_register(struct platform_profile_handler *pprof) { int err; mutex_lock(&profile_lock); if (cur_profile) { mutex_unlock(&profile_lock); return -EEXIST; } /* Sanity check the profile handler field are set */ if (!pprof || bitmap_empty(pprof->choices, PLATFORM_PROFILE_LAST) || ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic.c
static int pmic_thermal_temp(struct intel_pmic_opregion *opregion, int reg, u32 function, u64 *value) { return function == ACPI_READ ? pmic_read_temp(opregion, reg, value) : -EINVAL; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic.c
static bool pmic_thermal_is_aux(int address) { return (address >= 4 && address <= 0x40 && !((address - 4) % 12)) || (address >= 8 && address <= 0x44 && !((address - 8) % 12)); }
[ 1, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic.c
static bool pmic_thermal_is_pen(int address) { return address >= 0x48 && address <= 0x5c; }
[ 1, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic.c
static acpi_status intel_pmic_thermal_handler(u32 function, acpi_physical_address address, u32 bits, u64 *value64, void *handler_context, ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_bxtwc.c
static int intel_bxtwc_pmic_get_power(struct regmap *regmap, int reg, int bit, u64 *value) { int data; if (regmap_read(regmap, reg, &data)) return -EIO; *value = (data & bit) ? 1 : 0; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_bxtwc.c
static int intel_bxtwc_pmic_get_policy(struct regmap *regmap, int reg, int bit, u64 *value) { u8 mask = BIT(bit); unsigned int val; if (regmap_read(regmap, reg, &val)) return -EIO; *value = (val & mask) >> bit; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_bxtwc.c
static int intel_bxtwc_pmic_update_policy(struct regmap *regmap, int reg, int bit, int enable) { u8 mask = BIT(bit), val = enable << bit; return regmap_update_bits(regmap, reg, mask, val); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_chtcrc.c
static int intel_chtcrc_pmic_opregion_probe(struct platform_device *pdev) { struct intel_soc_pmic *pmic = dev_get_drvdata(pdev->dev.parent); return intel_pmic_install_opregion_handler( &pdev->dev, ACPI_HANDLE(pdev->dev.parent), pmic->regmap, &intel_chtcrc_pmic_opregion_data); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_chtdc_ti.c
static int chtdc_ti_pmic_get_raw_temp(struct regmap *regmap, int reg) { u8 buf[2]; if (regmap_bulk_read(regmap, reg, buf, 2)) return -EIO; return ((buf[0] & 0x03) << 8) | buf[1]; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_chtwc.c
static int intel_cht_wc_pmic_get_power(struct regmap *regmap, int reg, int bit, u64 *value) { int data; if (regmap_read(regmap, reg, &data)) return -EIO; *value = (data & bit) ? 1 : 0; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_chtwc.c
static int intel_cht_wc_pmic_update_power(struct regmap *regmap, int reg, int bitmask, bool on) { return regmap_update_bits(regmap, reg, bitmask, on ? 1 : 0); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_xpower.c
static int intel_xpower_lpat_raw_to_temp(struct acpi_lpat_conversion_table *lpat_table, int raw) { struct acpi_lpat first = lpat_table->lpat[0]; struct acpi_lpat last = lpat_table->lpat[lpat_table->lpat_count - 1]; if (first.raw < last.raw) raw = clamp(raw, first.raw, last.raw);...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pmic/intel_pmic_xpower.c
static int intel_xpower_pmic_opregion_probe(struct platform_device *pdev) { struct device *parent = pdev->dev.parent; struct axp20x_dev *axp20x = dev_get_drvdata(parent); acpi_status status; int result; status = acpi_install_address_space_handler( ACPI_HANDLE(parent), ACPI_ADR_SPACE_GPIO, intel_xpower...
[ 0, 0 ]
Linux Kernel
drivers/acpi/pmic/tps68470_pmic.c
static int tps68470_pmic_get_clk_freq(struct regmap *regmap, int reg, int bitmask, u64 *value) { unsigned int data; if (regmap_read(regmap, reg, &data)) return -EIO; *value = data & bitmask; return 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/power.c
static int acpi_power_resources_list_add(acpi_handle handle, struct list_head *list) { struct acpi_power_resource *resource = acpi_power_get_context(handle); struct acpi_power_resource_entry *entry; if (!resource || !list) return -EINVAL; entry = kzalloc(sizeof(*e...
[ 1, 0 ]
Linux Kernel
drivers/acpi/power.c
void acpi_device_power_remove_dependent(struct acpi_device *adev, struct device *dev) { struct acpi_power_resource_entry *entry; struct list_head *resources; if (!adev->flags.power_manageable) return; resources = &adev->power.states[ACPI_STATE_D0].resources; list_...
[ 0, 0 ]
Linux Kernel
drivers/acpi/power.c
static int acpi_power_on_unlocked(struct acpi_power_resource *resource) { int result = 0; if (resource->ref_count++) { acpi_handle_debug(resource->device.handle, "Power resource already on\n"); } else { result = __acpi_power_on(resource); if (result) resource->ref_count--; } return result;...
[ 0, 0 ]
Linux Kernel
drivers/acpi/power.c
int acpi_device_sleep_wake(struct acpi_device *dev, int enable, int sleep_state, int dev_state) { union acpi_object in_arg[3]; struct acpi_object_list arg_list = {3, in_arg}; acpi_status status = AE_OK; in_arg[0].type = ACPI_TYPE_INTEGER; in_arg[0].integer.value = enable; in_arg[...
[ 0, 0 ]
Linux Kernel
drivers/acpi/power.c
int acpi_disable_wakeup_device_power(struct acpi_device *dev) { struct acpi_power_resource_entry *entry; int err = 0; if (!dev || !dev->wakeup.flags.valid) return -EINVAL; mutex_lock(&acpi_device_lock); dev_dbg(&dev->dev, "Disabling wakeup power (count %d)\n", dev->wakeup.prepare_count); i...
[ 1, 0 ]
Linux Kernel
drivers/acpi/power.c
static void acpi_release_power_resource(struct device *dev) { struct acpi_device *device = to_acpi_device(dev); struct acpi_power_resource *resource; resource = container_of(device, struct acpi_power_resource, device); mutex_lock(&power_resource_list_lock); list_del(&resource->list_node); mutex_unlock(&p...
[ 0, 0 ]
Linux Kernel
drivers/acpi/power.c
static void acpi_power_add_resource_to_list(struct acpi_power_resource *resource) { mutex_lock(&power_resource_list_lock); if (!list_empty(&acpi_power_resource_list)) { struct acpi_power_resource *r; list_for_each_entry(r, &acpi_power_resource_list, list_node) if (r->order > resou...
[ 0, 0 ]
Linux Kernel
drivers/acpi/pptt.c
static unsigned int acpi_pptt_walk_cache(struct acpi_table_header *table_hdr, unsigned int local_level, struct acpi_subtable_header *res, struct acpi_pptt_cache **found, ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/pptt.c
static struct acpi_pptt_processor * acpi_find_processor_node(struct acpi_table_header *table_hdr, u32 acpi_cpu_id) { struct acpi_subtable_header *entry; unsigned long table_end; struct acpi_pptt_processor *cpu_node; u32 proc_sz; table_end = (unsigned long)table_hdr + table_hdr->length; entry = ACPI_ADD_PTR...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pptt.c
static int acpi_find_cache_levels(struct acpi_table_header *table_hdr, u32 acpi_cpu_id) { int number_of_levels = 0; struct acpi_pptt_processor *cpu; cpu = acpi_find_processor_node(table_hdr, acpi_cpu_id); if (cpu) number_of_levels = acpi_count_levels(table_hdr, cpu); r...
[ 0, 0 ]
Linux Kernel
drivers/acpi/pptt.c
static bool flag_identical(struct acpi_table_header *table_hdr, struct acpi_pptt_processor *cpu) { struct acpi_pptt_processor *next; if (table_hdr->revision < 2) return false; /* Locate the last node in the tree with IDENTICAL set */ if (cpu->flags & ACPI_PPTT_ACPI_IDENTICAL) { ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pptt.c
static int check_acpi_cpu_flag(unsigned int cpu, int rev, u32 flag) { struct acpi_table_header *table; u32 acpi_cpu_id = get_acpi_id_for_cpu(cpu); struct acpi_pptt_processor *cpu_node = NULL; int ret = -ENOENT; table = acpi_get_pptt(); if (!table) return -ENOENT; if (table->revision >= rev) cpu_...
[ 1, 0 ]
Linux Kernel
drivers/acpi/pptt.c
int acpi_pptt_cpu_is_thread(unsigned int cpu) { return check_acpi_cpu_flag(cpu, 2, ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/prmt.c
static void *find_guid_info(const guid_t *guid, u8 mode) { struct prm_handler_info *cur_handler; struct prm_module_info *cur_module; int i = 0; list_for_each_entry(cur_module, &prm_module_list, module_list) { for (i = 0; i < cur_module->handler_count; ++i) { cur_handler = &cur_module->handlers[i]; ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/prmt.c
static struct prm_module_info *find_prm_module(const guid_t *guid) { return (struct prm_module_info *)find_guid_info(guid, GET_MODULE); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/proc.c
static int acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset) { struct acpi_device *dev, *tmp; seq_printf(seq, "Device\tS-state\t Status Sysfs node\n"); mutex_lock(&acpi_device_lock); list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_li...
[ 1, 0 ]
Linux Kernel
drivers/acpi/proc.c
static ssize_t acpi_system_write_wakeup_device(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { struct acpi_device *dev, *tmp; char strbuf[5]; char str[5] = ""; if (count > 4) count = 4...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_core.c
static phys_cpuid_t map_madt_entry(struct acpi_table_madt *madt, int type, u32 acpi_id) { unsigned long madt_end, entry; phys_cpuid_t phys_id = PHYS_CPUID_INVALID; if (!madt) return phys_id; entry = (unsigned long)madt; madt_end = entry + madt->header.length; /* Par...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_core.c
phys_cpuid_t __init acpi_map_madt_entry(u32 acpi_id) { struct acpi_table_madt *madt = NULL; phys_cpuid_t rv; acpi_get_table(ACPI_SIG_MADT, 0, (struct acpi_table_header **)&madt); if (!madt) return PHYS_CPUID_INVALID; rv = map_madt_entry(madt, 1, acpi_id); acpi_put_table((struct acpi_table_header *)m...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_core.c
phys_cpuid_t acpi_get_phys_id(acpi_handle handle, int type, u32 acpi_id) { phys_cpuid_t phys_id; phys_id = map_mat_entry(handle, type, acpi_id); if (invalid_phys_cpuid(phys_id)) phys_id = map_madt_entry(get_madt_table(), type, acpi_id); return phys_id; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_core.c
static int parse_madt_ioapic_entry(u32 gsi_base, u64 *phys_addr) { struct acpi_subtable_header *hdr; unsigned long madt_end, entry; struct acpi_table_madt *madt; int apic_id = -1; madt = get_madt_table(); if (!madt) return apic_id; entry = (unsigned long)madt; madt_end = entry + madt->header.lengt...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_driver.c
static int __acpi_processor_start(struct acpi_device *device) { struct acpi_processor *pr = acpi_driver_data(device); acpi_status status; int result = 0; if (!pr) return -ENODEV; if (pr->flags.need_hotplug_init) return 0; result = acpi_cppc_processor_probe(pr); if (result && !IS_ENABLED(CONFIG...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_driver.c
static int acpi_processor_start(struct device *dev) { struct acpi_device *device = ACPI_COMPANION(dev); int ret; if (!device) return -ENODEV; cpu_hotplug_disable(); ret = __acpi_processor_start(device); cpu_hotplug_enable(); return ret; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_driver.c
static int acpi_processor_notifier(struct notifier_block *nb, unsigned long event, void *data) { struct cpufreq_policy *policy = data; if (event == CPUFREQ_CREATE_POLICY) { acpi_thermal_cpufreq_init(policy); acpi_processor_ppc_init(policy); } else if (event == CPUFREQ_...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
static void __cpuidle acpi_safe_halt(void) { if (!tif_need_resched()) { safe_halt(); local_irq_disable(); } }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
static void tsc_check_state(int state) { switch (boot_cpu_data.x86_vendor) { case X86_VENDOR_HYGON: case X86_VENDOR_AMD: case X86_VENDOR_INTEL: case X86_VENDOR_CENTAUR: case X86_VENDOR_ZHAOXIN: if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) return; fallthrough; default: /* TSC could halt in...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
static int acpi_processor_get_power_info_default(struct acpi_processor *pr) { if (!pr->power.states[ACPI_STATE_C1].valid) { /* all processors need to support C1 */ pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1; pr->power.states[ACPI_STATE_C1].valid = 1; pr->power.states[ACPI_STATE_C1].entry_me...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
static void acpi_cst_latency_swap(void *a, void *b, int n) { struct acpi_processor_cx *x = a, *y = b; if (!(x->valid && y->valid)) return; swap(x->latency, y->latency); }
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
static int acpi_processor_power_verify(struct acpi_processor *pr) { unsigned int i; unsigned int working = 0; unsigned int last_latency = 0; unsigned int last_type = 0; bool buggy_latency = false; pr->power.timer_broadcast_on_state = INT_MAX; for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate;...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
static int acpi_idle_bm_check(void) { u32 bm_status = 0; if (bm_check_disable) return 0; acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); if (bm_status) acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); else if (errata.piix4.bmisx) { if ((inb_p(errata.piix4.bmisx + 0x...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
int __weak acpi_processor_ffh_lpi_probe(unsigned int cpu) { return -EOPNOTSUPP; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
static int acpi_processor_get_lpi_info(struct acpi_processor *pr) { int ret, i; acpi_status status; acpi_handle handle = pr->handle, pr_ahandle; struct acpi_device *d = NULL; struct acpi_lpi_states_array info[2], *tmp, *prev, *curr; ret = acpi_processor_ffh_lpi_probe(pr->id); if (ret == -EOPNOTSUPP) ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
int acpi_processor_hotplug(struct acpi_processor *pr) { int ret = 0; struct cpuidle_device *dev; if (disabled_by_idle_boot_param()) return 0; if (!pr->flags.power_setup_done) return -ENODEV; dev = per_cpu(acpi_cpuidle_device, pr->id); cpuidle_pause_and_lock(); cpuidle_disable_device(dev); re...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
int acpi_processor_power_init(struct acpi_processor *pr) { int retval; struct cpuidle_device *dev; if (disabled_by_idle_boot_param()) return 0; acpi_processor_cstate_first_run_checks(); if (!acpi_processor_get_power_info(pr)) pr->flags.power_setup_done = 1; if (pr->flags.power) { /* Register...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_idle.c
int acpi_processor_power_exit(struct acpi_processor *pr) { struct cpuidle_device *dev = per_cpu(acpi_cpuidle_device, pr->id); if (disabled_by_idle_boot_param()) return 0; if (pr->flags.power) { cpuidle_unregister_device(dev); acpi_processor_registered--; if (acpi_processor_registered == 0) ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_pdc.c
static int __init set_no_mwait(const struct dmi_system_id *id) { pr_notice("%s detected - disabling mwait for CPU C-states\n", id->ident); boot_option_idle_override = IDLE_NOMWAIT; return 0; }
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_pdc.c
static void __init processor_dmi_check(void) { dmi_check_system(processor_idle_dmi_table); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
static int acpi_processor_get_platform_limit(struct acpi_processor *pr) { acpi_status status = 0; unsigned long long ppc = 0; int ret; if (!pr) return -EINVAL; status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc); if (status != AE_NOT_FOUND) { acpi_processor_ppc_in_use = true; if (A...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) { struct acpi_processor *pr; pr = per_cpu(processors, cpu); if (!pr || !pr->performance || !pr->performance->state_count) return -ENODEV; *limit = pr->performance->states[pr->performance_platform_limit].core_frequency * 1000; r...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
void acpi_processor_ignore_ppc_init(void) { if (ignore_ppc < 0) ignore_ppc = 0; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
void acpi_processor_ppc_init(struct cpufreq_policy *policy) { unsigned int cpu; for_each_cpu(cpu, policy->related_cpus) { struct acpi_processor *pr = per_cpu(processors, cpu); int ret; if (!pr) continue; ret = freq_qos_add_request(&policy->constraints, &pr->perflib_req, ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
static int acpi_processor_get_performance_control(struct acpi_processor *pr) { int result = 0; acpi_status status = 0; struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; union acpi_object *pct = NULL; union acpi_object obj = {0}; status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); if...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
static void amd_fixup_frequency(struct acpi_processor_px *px, int i) { u32 hi, lo, fid, did; int index = px->control & 0x00000007; if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) return; if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10) || boot_cpu_data.x86 == 0x11) { rdmsr(MSR_AMD...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
static void amd_fixup_frequency(struct acpi_processor_px *px, int i) {};
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
int acpi_processor_register_performance( struct acpi_processor_performance *performance, unsigned int cpu) { struct acpi_processor *pr; if (!acpi_processor_cpufreq_init) return -EINVAL; mutex_lock(&performance_mutex); pr = per_cpu(processors, cpu); if (!pr) { mutex_unlock(&performance_mutex); ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_perflib.c
void acpi_processor_unregister_performance(unsigned int cpu) { struct acpi_processor *pr; mutex_lock(&performance_mutex); pr = per_cpu(processors, cpu); if (!pr) goto unlock; if (pr->performance) kfree(pr->performance->states); pr->performance = NULL; unlock: mutex_unlock(&performance_mutex)...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_thermal.c
static int cpufreq_get_max_state(unsigned int cpu) { if (!cpu_has_cpufreq(cpu)) return 0; return CPUFREQ_THERMAL_MAX_STEP; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_thermal.c
static int acpi_processor_max_state(struct acpi_processor *pr) { int max_state = 0; max_state += cpufreq_get_max_state(pr->id); if (pr->flags.throttling) max_state += (pr->throttling.state_count - 1); return max_state; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_throttling.c
void acpi_processor_throttling_init(void) { if (acpi_processor_update_tsd_coord()) pr_debug("Assume no T-state coordination\n"); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_throttling.c
static int acpi_processor_get_platform_limit(struct acpi_processor *pr) { acpi_status status = 0; unsigned long long tpc = 0; if (!pr) return -EINVAL; if (ignore_tpc) goto end; status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); if (ACPI_FAILURE(status)) { if (status != AE_NOT_FOU...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_throttling.c
static int acpi_throttling_rdmsr(u64 *value) { u64 msr_high, msr_low; u64 msr = 0; int ret = -1; if ((this_cpu_read(cpu_info.x86_vendor) != X86_VENDOR_INTEL) || !this_cpu_has(X86_FEATURE_ACPI)) { pr_err("HARDWARE addr space,NOT supported yet\n"); } else { msr_low = 0; msr_high = 0; rdms...
[ 1, 0 ]
Linux Kernel
drivers/acpi/processor_throttling.c
static int acpi_throttling_rdmsr(u64 *value) { pr_err("HARDWARE addr space,NOT supported yet\n"); return -1; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_throttling.c
static int acpi_processor_get_fadt_info(struct acpi_processor *pr) { int i, step; if (!pr->throttling.address) { acpi_handle_debug(pr->handle, "No throttling register\n"); return -EINVAL; } else if (!pr->throttling.duty_width) { acpi_handle_debug(pr->handle, "No throttling states\n"); return -EIN...
[ 0, 0 ]
Linux Kernel
drivers/acpi/processor_throttling.c
static long acpi_processor_throttling_fn(void *data) { struct acpi_processor_throttling_arg *arg = data; struct acpi_processor *pr = arg->pr; return pr->throttling.acpi_processor_set_throttling(pr, arg->target_state, arg->force); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static bool acpi_enumerate_nondev_subnodes(acpi_handle scope, union acpi_object *desc, struct acpi_device_data *data, struct fwnode_handle *parent) { int i; for (i = 0; i < desc->package...
[ 1, 0 ]
Linux Kernel
drivers/acpi/property.c
static void acpi_nondev_subnode_tag(acpi_handle handle, void *context) {}
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static void acpi_untie_nondev_subnodes(struct acpi_device_data *data) { struct acpi_data_node *dn; list_for_each_entry(dn, &data->subnodes, sibling) { acpi_detach_data(dn->handle, acpi_nondev_subnode_tag); acpi_untie_nondev_subnodes(&dn->data); } }
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
void acpi_init_properties(struct acpi_device *adev) { struct acpi_buffer buf = {ACPI_ALLOCATE_BUFFER}; struct acpi_hardware_id *hwid; acpi_status status; bool acpi_of = false; INIT_LIST_HEAD(&adev->data.properties); INIT_LIST_HEAD(&adev->data.subnodes); if (!adev->handle) return; list_for_each_en...
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static int acpi_data_get_property(const struct acpi_device_data *data, const char *name, acpi_object_type type, const union acpi_object **obj) { const struct acpi_device_properties *props; if (!data || !name) return -EINVAL; if (!data->poin...
[ 1, 0 ]
Linux Kernel
drivers/acpi/property.c
int acpi_dev_get_property(const struct acpi_device *adev, const char *name, acpi_object_type type, const union acpi_object **obj) { return adev ? acpi_data_get_property(&adev->data, name, type, obj) : -EINVAL; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static const struct acpi_device_data * acpi_device_data_of_node(const struct fwnode_handle *fwnode) { if (is_acpi_device_node(fwnode)) { const struct acpi_device *adev = to_acpi_device_node(fwnode); return &adev->data; } if (is_acpi_data_node(fwnode)) { const struct acpi_data_node *dn = to_acpi_data_...
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static struct fwnode_handle * acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode, const char *childname) { struct fwnode_handle *child; fwnode_for_each_child_node(fwnode, child) { if (is_acpi_data_node(child)) { if (acpi_data_node_match(child, childname)...
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static int acpi_copy_property_array_string(const union acpi_object *items, char **val, size_t nval) { int i; for (i = 0; i < nval; i++) { if (items[i].type != ACPI_TYPE_STRING) return -EPROTO; val[i] = items[i].string.pointer; } return nval; }
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static int acpi_node_prop_read(const struct fwnode_handle *fwnode, const char *propname, enum dev_prop_type proptype, void *val, size_t nval) { return acpi_data_prop_read(acpi_device_data_of_node(fwnode), propname, ...
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static bool acpi_fwnode_device_is_available(const struct fwnode_handle *fwnode) { if (!is_acpi_device_node(fwnode)) return false; return acpi_device_is_present(to_acpi_device_node(fwnode)); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static bool acpi_fwnode_property_present(const struct fwnode_handle *fwnode, const char *propname) { return !acpi_node_prop_get(fwnode, propname, NULL); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static struct fwnode_handle * acpi_fwnode_get_parent(struct fwnode_handle *fwnode) { return acpi_node_get_parent(fwnode); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/property.c
static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, struct fwnode_endpoint *endpoint) { struct fwnode_handle *port_fwnode = fwnode_get_parent(fwnode); endpoint->local_fwnode = fwnode; if (fwnode_property_read_u32(port_fwnode, "reg", &endpo...
[ 0, 0 ]
Linux Kernel
drivers/acpi/reboot.c
static inline void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value) { pr_warn_once("PCI configuration space access is not supported\n"); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/resource.c
bool acpi_dev_resource_ext_address_space(struct acpi_resource *ares, struct resource_win *win) { struct acpi_resource_extended_address64 *ext_addr; win->res.flags = 0; if (ares->type != ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64) return false; ext_addr = &ares->data.ext...
[ 0, 0 ]
Linux Kernel
drivers/acpi/resource.c
unsigned int acpi_dev_get_irq_type(int triggering, int polarity) { switch (polarity) { case ACPI_ACTIVE_LOW: return triggering == ACPI_EDGE_SENSITIVE ? IRQ_TYPE_EDGE_FALLING : IRQ_TYPE_LEVEL_LOW; case ACPI_ACTIVE_HIGH: return triggering == ACPI_EDGE_SENSITIVE ?...
[ 0, 0 ]
Linux Kernel
drivers/acpi/resource.c
void acpi_dev_free_resource_list(struct list_head *list) { resource_list_free(list); }
[ 0, 0 ]
Linux Kernel
drivers/acpi/resource.c
static acpi_status acpi_dev_new_resource_entry(struct resource_win *win, struct res_proc_context *c) { struct resource_entry *rentry; rentry = resource_list_create_entry(NULL, 0); if (!rentry) { c->error = -ENOMEM; return AE_NO_MEMORY; } *rentry->res = ...
[ 1, 0 ]
Linux Kernel
drivers/acpi/resource.c
int acpi_dev_filter_resource_type(struct acpi_resource *ares, unsigned long types) { unsigned long type = 0; switch (ares->type) { case ACPI_RESOURCE_TYPE_MEMORY24: case ACPI_RESOURCE_TYPE_MEMORY32: case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: type = IORESOURCE_MEM; break...
[ 1, 0 ]
Linux Kernel
drivers/acpi/sbs.c
static int acpi_battery_technology(struct acpi_battery *battery) { if (!strcasecmp("NiCd", battery->device_chemistry)) return POWER_SUPPLY_TECHNOLOGY_NiCd; if (!strcasecmp("NiMH", battery->device_chemistry)) return POWER_SUPPLY_TECHNOLOGY_NiMH; if (!strcasecmp("LION", battery->device_chemistry)) retu...
[ 0, 0 ]