power_zone 90 drivers/powercap/intel_rapl_common.c container_of(_zone, struct rapl_domain, power_zone) power_zone 151 drivers/powercap/intel_rapl_common.c static int get_energy_counter(struct powercap_zone *power_zone, power_zone 161 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(power_zone); power_zone 182 drivers/powercap/intel_rapl_common.c static int release_zone(struct powercap_zone *power_zone) power_zone 184 drivers/powercap/intel_rapl_common.c struct rapl_domain *rd = power_zone_to_rapl_domain(power_zone); power_zone 211 drivers/powercap/intel_rapl_common.c static int set_domain_enable(struct powercap_zone *power_zone, bool mode) power_zone 213 drivers/powercap/intel_rapl_common.c struct rapl_domain *rd = power_zone_to_rapl_domain(power_zone); power_zone 227 drivers/powercap/intel_rapl_common.c static int get_domain_enable(struct powercap_zone *power_zone, bool *mode) power_zone 229 drivers/powercap/intel_rapl_common.c struct rapl_domain *rd = power_zone_to_rapl_domain(power_zone); power_zone 311 drivers/powercap/intel_rapl_common.c static int set_power_limit(struct powercap_zone *power_zone, int cid, power_zone 320 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(power_zone); power_zone 330 drivers/powercap/intel_rapl_common.c dev_warn(&power_zone->dev, power_zone 353 drivers/powercap/intel_rapl_common.c static int get_current_power_limit(struct powercap_zone *power_zone, int cid, power_zone 363 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(power_zone); power_zone 392 drivers/powercap/intel_rapl_common.c static int set_time_window(struct powercap_zone *power_zone, int cid, power_zone 400 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(power_zone); power_zone 423 drivers/powercap/intel_rapl_common.c static int get_time_window(struct powercap_zone *power_zone, int cid, power_zone 432 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(power_zone); power_zone 459 drivers/powercap/intel_rapl_common.c static const char *get_constraint_name(struct powercap_zone *power_zone, power_zone 465 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(power_zone); power_zone 473 drivers/powercap/intel_rapl_common.c static int get_max_power(struct powercap_zone *power_zone, int id, u64 *data) power_zone 481 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(power_zone); power_zone 1020 drivers/powercap/intel_rapl_common.c struct powercap_zone *power_zone = NULL; power_zone 1031 drivers/powercap/intel_rapl_common.c power_zone = powercap_register_zone(&rd->power_zone, power_zone 1035 drivers/powercap/intel_rapl_common.c if (IS_ERR(power_zone)) { power_zone 1038 drivers/powercap/intel_rapl_common.c return PTR_ERR(power_zone); power_zone 1041 drivers/powercap/intel_rapl_common.c rp->power_zone = power_zone; power_zone 1046 drivers/powercap/intel_rapl_common.c if (!power_zone) { power_zone 1056 drivers/powercap/intel_rapl_common.c power_zone = powercap_register_zone(&rd->power_zone, power_zone 1058 drivers/powercap/intel_rapl_common.c rd->name, rp->power_zone, power_zone 1062 drivers/powercap/intel_rapl_common.c if (IS_ERR(power_zone)) { power_zone 1065 drivers/powercap/intel_rapl_common.c ret = PTR_ERR(power_zone); power_zone 1079 drivers/powercap/intel_rapl_common.c &rd->power_zone); power_zone 1088 drivers/powercap/intel_rapl_common.c struct powercap_zone *power_zone; power_zone 1120 drivers/powercap/intel_rapl_common.c power_zone = powercap_register_zone(&rd->power_zone, priv->control_type, power_zone 1125 drivers/powercap/intel_rapl_common.c if (IS_ERR(power_zone)) { power_zone 1127 drivers/powercap/intel_rapl_common.c return PTR_ERR(power_zone); power_zone 1140 drivers/powercap/intel_rapl_common.c &priv->platform_rapl_domain->power_zone); power_zone 1262 drivers/powercap/intel_rapl_common.c &rd->power_zone); power_zone 1266 drivers/powercap/intel_rapl_common.c &rd_package->power_zone); power_zone 1342 drivers/powercap/intel_rapl_common.c if (!rp->power_zone) power_zone 1344 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(rp->power_zone); power_zone 1376 drivers/powercap/intel_rapl_common.c if (!rp->power_zone) power_zone 1378 drivers/powercap/intel_rapl_common.c rd = power_zone_to_rapl_domain(rp->power_zone); power_zone 25 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); \ power_zone 27 drivers/powercap/powercap_sys.c if (power_zone->ops->get_##_attr) { \ power_zone 28 drivers/powercap/powercap_sys.c if (!power_zone->ops->get_##_attr(power_zone, &value)) \ power_zone 42 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); \ power_zone 50 drivers/powercap/powercap_sys.c if (power_zone->ops->reset_##_attr) { \ power_zone 51 drivers/powercap/powercap_sys.c if (!power_zone->ops->reset_##_attr(power_zone)) \ power_zone 66 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); \ power_zone 72 drivers/powercap/powercap_sys.c if (id >= power_zone->const_id_cnt) \ power_zone 74 drivers/powercap/powercap_sys.c pconst = &power_zone->constraints[id]; \ power_zone 76 drivers/powercap/powercap_sys.c if (!pconst->ops->get_##_attr(power_zone, id, &value)) \ power_zone 91 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); \ power_zone 97 drivers/powercap/powercap_sys.c if (id >= power_zone->const_id_cnt) \ power_zone 99 drivers/powercap/powercap_sys.c pconst = &power_zone->constraints[id]; \ power_zone 104 drivers/powercap/powercap_sys.c if (!pconst->ops->set_##_attr(power_zone, id, value)) \ power_zone 159 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); power_zone 166 drivers/powercap/powercap_sys.c if (id >= power_zone->const_id_cnt) power_zone 168 drivers/powercap/powercap_sys.c pconst = &power_zone->constraints[id]; power_zone 171 drivers/powercap/powercap_sys.c name = pconst->ops->get_name(power_zone, id); power_zone 283 drivers/powercap/powercap_sys.c static int create_constraints(struct powercap_zone *power_zone, power_zone 292 drivers/powercap/powercap_sys.c if (!power_zone || !const_ops || !const_ops->get_power_limit_uw || power_zone 298 drivers/powercap/powercap_sys.c count = power_zone->zone_attr_count; power_zone 300 drivers/powercap/powercap_sys.c pconst = &power_zone->constraints[i]; power_zone 302 drivers/powercap/powercap_sys.c pconst->id = power_zone->const_id_cnt; power_zone 303 drivers/powercap/powercap_sys.c power_zone->const_id_cnt++; power_zone 304 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 306 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 309 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 312 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 315 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 318 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 321 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 324 drivers/powercap/powercap_sys.c power_zone->zone_attr_count = count; power_zone 351 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); power_zone 353 drivers/powercap/powercap_sys.c return sprintf(buf, "%s\n", power_zone->name); power_zone 360 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone) power_zone 364 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = &dev_attr_name.attr; power_zone 365 drivers/powercap/powercap_sys.c if (power_zone->ops->get_max_energy_range_uj) power_zone 366 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 368 drivers/powercap/powercap_sys.c if (power_zone->ops->get_energy_uj) { power_zone 369 drivers/powercap/powercap_sys.c if (power_zone->ops->reset_energy_uj) power_zone 373 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 376 drivers/powercap/powercap_sys.c if (power_zone->ops->get_power_uw) power_zone 377 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 379 drivers/powercap/powercap_sys.c if (power_zone->ops->get_max_power_range_uw) power_zone 380 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count++] = power_zone 382 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[count] = NULL; power_zone 383 drivers/powercap/powercap_sys.c power_zone->zone_attr_count = count; power_zone 391 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); power_zone 394 drivers/powercap/powercap_sys.c allocated = power_zone->allocated; power_zone 396 drivers/powercap/powercap_sys.c idr_remove(power_zone->parent_idr, power_zone->id); power_zone 398 drivers/powercap/powercap_sys.c idr_destroy(&power_zone->idr); power_zone 399 drivers/powercap/powercap_sys.c kfree(power_zone->name); power_zone 400 drivers/powercap/powercap_sys.c kfree(power_zone->zone_dev_attrs); power_zone 401 drivers/powercap/powercap_sys.c kfree(power_zone->constraints); power_zone 402 drivers/powercap/powercap_sys.c if (power_zone->ops->release) power_zone 403 drivers/powercap/powercap_sys.c power_zone->ops->release(power_zone); power_zone 405 drivers/powercap/powercap_sys.c kfree(power_zone); power_zone 429 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); power_zone 430 drivers/powercap/powercap_sys.c if (power_zone->ops->get_enable) power_zone 431 drivers/powercap/powercap_sys.c if (power_zone->ops->get_enable(power_zone, &mode)) power_zone 453 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone = to_powercap_zone(dev); power_zone 454 drivers/powercap/powercap_sys.c if (power_zone->ops->set_enable) power_zone 455 drivers/powercap/powercap_sys.c if (!power_zone->ops->set_enable(power_zone, mode)) power_zone 483 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone, power_zone 500 drivers/powercap/powercap_sys.c if (power_zone) { power_zone 503 drivers/powercap/powercap_sys.c memset(power_zone, 0, sizeof(*power_zone)); power_zone 505 drivers/powercap/powercap_sys.c power_zone = kzalloc(sizeof(*power_zone), GFP_KERNEL); power_zone 506 drivers/powercap/powercap_sys.c if (!power_zone) power_zone 508 drivers/powercap/powercap_sys.c power_zone->allocated = true; power_zone 510 drivers/powercap/powercap_sys.c power_zone->ops = ops; power_zone 511 drivers/powercap/powercap_sys.c power_zone->control_type_inst = control_type; power_zone 513 drivers/powercap/powercap_sys.c power_zone->dev.parent = &control_type->dev; power_zone 514 drivers/powercap/powercap_sys.c power_zone->parent_idr = &control_type->idr; power_zone 516 drivers/powercap/powercap_sys.c power_zone->dev.parent = &parent->dev; power_zone 517 drivers/powercap/powercap_sys.c power_zone->parent_idr = &parent->idr; power_zone 519 drivers/powercap/powercap_sys.c power_zone->dev.class = &powercap_class; power_zone 523 drivers/powercap/powercap_sys.c result = idr_alloc(power_zone->parent_idr, NULL, 0, 0, GFP_KERNEL); power_zone 527 drivers/powercap/powercap_sys.c power_zone->id = result; power_zone 528 drivers/powercap/powercap_sys.c idr_init(&power_zone->idr); power_zone 530 drivers/powercap/powercap_sys.c power_zone->name = kstrdup(name, GFP_KERNEL); power_zone 531 drivers/powercap/powercap_sys.c if (!power_zone->name) power_zone 533 drivers/powercap/powercap_sys.c dev_set_name(&power_zone->dev, "%s:%x", power_zone 534 drivers/powercap/powercap_sys.c dev_name(power_zone->dev.parent), power_zone 535 drivers/powercap/powercap_sys.c power_zone->id); power_zone 536 drivers/powercap/powercap_sys.c power_zone->constraints = kcalloc(nr_constraints, power_zone 537 drivers/powercap/powercap_sys.c sizeof(*power_zone->constraints), power_zone 539 drivers/powercap/powercap_sys.c if (!power_zone->constraints) power_zone 544 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs = kcalloc(nr_attrs, sizeof(void *), power_zone 546 drivers/powercap/powercap_sys.c if (!power_zone->zone_dev_attrs) power_zone 548 drivers/powercap/powercap_sys.c create_power_zone_common_attributes(power_zone); power_zone 549 drivers/powercap/powercap_sys.c result = create_constraints(power_zone, nr_constraints, const_ops); power_zone 553 drivers/powercap/powercap_sys.c power_zone->zone_dev_attrs[power_zone->zone_attr_count] = NULL; power_zone 554 drivers/powercap/powercap_sys.c power_zone->dev_zone_attr_group.attrs = power_zone->zone_dev_attrs; power_zone 555 drivers/powercap/powercap_sys.c power_zone->dev_attr_groups[0] = &power_zone->dev_zone_attr_group; power_zone 556 drivers/powercap/powercap_sys.c power_zone->dev_attr_groups[1] = NULL; power_zone 557 drivers/powercap/powercap_sys.c power_zone->dev.groups = power_zone->dev_attr_groups; power_zone 558 drivers/powercap/powercap_sys.c result = device_register(&power_zone->dev); power_zone 565 drivers/powercap/powercap_sys.c return power_zone; power_zone 568 drivers/powercap/powercap_sys.c kfree(power_zone->zone_dev_attrs); power_zone 570 drivers/powercap/powercap_sys.c kfree(power_zone->constraints); power_zone 572 drivers/powercap/powercap_sys.c kfree(power_zone->name); power_zone 574 drivers/powercap/powercap_sys.c idr_remove(power_zone->parent_idr, power_zone->id); power_zone 576 drivers/powercap/powercap_sys.c if (power_zone->allocated) power_zone 577 drivers/powercap/powercap_sys.c kfree(power_zone); power_zone 585 drivers/powercap/powercap_sys.c struct powercap_zone *power_zone) power_zone 587 drivers/powercap/powercap_sys.c if (!power_zone || !control_type) power_zone 594 drivers/powercap/powercap_sys.c device_unregister(&power_zone->dev); power_zone 83 include/linux/intel_rapl.h struct powercap_zone power_zone; power_zone 136 include/linux/intel_rapl.h struct powercap_zone *power_zone; /* keep track of parent zone */ power_zone 198 include/linux/powercap.h struct powercap_zone *power_zone; power_zone 204 include/linux/powercap.h #define POWERCAP_GET_DEV(power_zone) (&power_zone->dev) power_zone 213 include/linux/powercap.h static inline void powercap_set_zone_data(struct powercap_zone *power_zone, power_zone 216 include/linux/powercap.h if (power_zone) power_zone 217 include/linux/powercap.h power_zone->private_data = pdata; power_zone 227 include/linux/powercap.h static inline void *powercap_get_zone_data(struct powercap_zone *power_zone) power_zone 229 include/linux/powercap.h if (power_zone) power_zone 230 include/linux/powercap.h return power_zone->private_data; power_zone 294 include/linux/powercap.h struct powercap_zone *power_zone, power_zone 311 include/linux/powercap.h struct powercap_zone *power_zone);