/drivers/gpu/drm/vmwgfx/ |
D | ttm_memory.c | 83 struct ttm_mem_zone *zone = in ttm_mem_zone_kobj_release() local 87 zone->name, (unsigned long long)zone->used_mem >> 10); in ttm_mem_zone_kobj_release() 88 kfree(zone); in ttm_mem_zone_kobj_release() 95 struct ttm_mem_zone *zone = in ttm_mem_zone_show() local 99 spin_lock(&zone->glob->lock); in ttm_mem_zone_show() 101 val = zone->zone_mem; in ttm_mem_zone_show() 103 val = zone->emer_mem; in ttm_mem_zone_show() 105 val = zone->max_mem; in ttm_mem_zone_show() 107 val = zone->swap_limit; in ttm_mem_zone_show() 109 val = zone->used_mem; in ttm_mem_zone_show() [all …]
|
/drivers/block/null_blk/ |
D | zoned.c | 32 struct nullb_zone *zone) in null_init_zone_lock() argument 35 spin_lock_init(&zone->spinlock); in null_init_zone_lock() 37 mutex_init(&zone->mutex); in null_init_zone_lock() 41 struct nullb_zone *zone) in null_lock_zone() argument 44 spin_lock_irq(&zone->spinlock); in null_lock_zone() 46 mutex_lock(&zone->mutex); in null_lock_zone() 50 struct nullb_zone *zone) in null_unlock_zone() argument 53 spin_unlock_irq(&zone->spinlock); in null_unlock_zone() 55 mutex_unlock(&zone->mutex); in null_unlock_zone() 61 struct nullb_zone *zone; in null_init_zoned_dev() local [all …]
|
/drivers/md/ |
D | dm-zoned-metadata.c | 137 struct dm_zone *zone; member 221 static unsigned int dmz_dev_zone_id(struct dmz_metadata *zmd, struct dm_zone *zone) in dmz_dev_zone_id() argument 223 if (WARN_ON(!zone)) in dmz_dev_zone_id() 226 return zone->id - zone->dev->zone_offset; in dmz_dev_zone_id() 229 sector_t dmz_start_sect(struct dmz_metadata *zmd, struct dm_zone *zone) in dmz_start_sect() argument 231 unsigned int zone_id = dmz_dev_zone_id(zmd, zone); in dmz_start_sect() 236 sector_t dmz_start_block(struct dmz_metadata *zmd, struct dm_zone *zone) in dmz_start_block() argument 238 unsigned int zone_id = dmz_dev_zone_id(zmd, zone); in dmz_start_block() 311 struct dm_zone *zone = kzalloc(sizeof(struct dm_zone), GFP_KERNEL); in dmz_insert() local 313 if (!zone) in dmz_insert() [all …]
|
D | dm-zoned-target.c | 21 struct dm_zone *zone; member 86 struct dm_zone *zone = bioctx->zone; in dmz_bio_endio() local 88 if (zone) { in dmz_bio_endio() 91 dmz_is_seq(zone)) in dmz_bio_endio() 92 set_bit(DMZ_SEQ_WRITE_ERR, &zone->flags); in dmz_bio_endio() 93 dmz_deactivate_zone(zone); in dmz_bio_endio() 116 static int dmz_submit_bio(struct dmz_target *dmz, struct dm_zone *zone, in dmz_submit_bio() argument 122 struct dmz_dev *dev = zone->dev; in dmz_submit_bio() 135 dmz_start_sect(dmz->metadata, zone) + dmz_blk2sect(chunk_block); in dmz_submit_bio() 145 if (bio_op(bio) == REQ_OP_WRITE && dmz_is_seq(zone)) in dmz_submit_bio() [all …]
|
D | raid0.c | 70 struct strip_zone *zone; in create_strip_zones() local 159 zone = &conf->strip_zone[0]; in create_strip_zones() 207 zone->nb_dev = cnt; in create_strip_zones() 208 zone->zone_end = smallest->sectors * cnt; in create_strip_zones() 210 curr_zone_end = zone->zone_end; in create_strip_zones() 217 zone = conf->strip_zone + i; in create_strip_zones() 221 zone->dev_start = smallest->sectors; in create_strip_zones() 227 if (rdev->sectors <= zone->dev_start) { in create_strip_zones() 247 zone->nb_dev = c; in create_strip_zones() 248 sectors = (smallest->sectors - zone->dev_start) * c; in create_strip_zones() [all …]
|
D | dm-zone.c | 76 static int dm_report_zones_cb(struct blk_zone *zone, unsigned int idx, in dm_report_zones_cb() argument 85 if (zone->start >= args->start + args->tgt->len) in dm_report_zones_cb() 92 zone->start += sector_diff; in dm_report_zones_cb() 93 if (zone->type != BLK_ZONE_TYPE_CONVENTIONAL) { in dm_report_zones_cb() 94 if (zone->cond == BLK_ZONE_COND_FULL) in dm_report_zones_cb() 95 zone->wp = zone->start + zone->len; in dm_report_zones_cb() 96 else if (zone->cond == BLK_ZONE_COND_EMPTY) in dm_report_zones_cb() 97 zone->wp = zone->start; in dm_report_zones_cb() 99 zone->wp += sector_diff; in dm_report_zones_cb() 102 args->next_sector = zone->start + zone->len; in dm_report_zones_cb() [all …]
|
D | dm-zoned.h | 207 sector_t dmz_start_sect(struct dmz_metadata *zmd, struct dm_zone *zone); 208 sector_t dmz_start_block(struct dmz_metadata *zmd, struct dm_zone *zone); 221 void dmz_free_zone(struct dmz_metadata *zmd, struct dm_zone *zone); 223 void dmz_map_zone(struct dmz_metadata *zmd, struct dm_zone *zone, 225 void dmz_unmap_zone(struct dmz_metadata *zmd, struct dm_zone *zone); 241 static inline void dmz_activate_zone(struct dm_zone *zone) in dmz_activate_zone() argument 243 atomic_inc(&zone->refcount); in dmz_activate_zone() 246 int dmz_lock_zone_reclaim(struct dm_zone *zone); 247 void dmz_unlock_zone_reclaim(struct dm_zone *zone); 253 void dmz_put_chunk_mapping(struct dmz_metadata *zmd, struct dm_zone *zone); [all …]
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | alloc.c | 250 struct mlx4_zone_entry *zone = kmalloc(sizeof(*zone), GFP_KERNEL); in mlx4_zone_add_one() local 252 if (NULL == zone) in mlx4_zone_add_one() 255 zone->flags = flags; in mlx4_zone_add_one() 256 zone->bitmap = bitmap; in mlx4_zone_add_one() 257 zone->use_rr = (flags & MLX4_ZONE_USE_RR) ? MLX4_USE_RR : 0; in mlx4_zone_add_one() 258 zone->priority = priority; in mlx4_zone_add_one() 259 zone->offset = offset; in mlx4_zone_add_one() 263 zone->uid = zone_alloc->last_uid++; in mlx4_zone_add_one() 264 zone->allocator = zone_alloc; in mlx4_zone_add_one() 274 list_add_tail(&zone->prio_list, &it->prio_list); in mlx4_zone_add_one() [all …]
|
/drivers/thermal/tegra/ |
D | tegra-bpmp-thermal.c | 35 struct tegra_bpmp_thermal_zone *zone = data; in tegra_bpmp_thermal_get_temp() local 43 req.get_temp.zone = zone->idx; in tegra_bpmp_thermal_get_temp() 52 err = tegra_bpmp_transfer(zone->tegra->bpmp, &msg); in tegra_bpmp_thermal_get_temp() 63 struct tegra_bpmp_thermal_zone *zone = data; in tegra_bpmp_thermal_set_trips() local 69 req.set_trip.zone = zone->idx; in tegra_bpmp_thermal_set_trips() 79 return tegra_bpmp_transfer(zone->tegra->bpmp, &msg); in tegra_bpmp_thermal_set_trips() 84 struct tegra_bpmp_thermal_zone *zone; in tz_device_update_work_fn() local 86 zone = container_of(work, struct tegra_bpmp_thermal_zone, in tz_device_update_work_fn() 89 thermal_zone_device_update(zone->tzd, THERMAL_TRIP_VIOLATED); in tz_device_update_work_fn() 109 if (tegra->zones[i]->idx != req->host_trip_reached.zone) in bpmp_mrq_thermal() [all …]
|
D | soctherm.c | 426 struct tegra_thermctl_zone *zone = data; in tegra_thermctl_get_temp() local 429 val = readl(zone->reg); in tegra_thermctl_get_temp() 430 val = REG_GET_MASK(val, zone->sg->sensor_temp_mask); in tegra_thermctl_get_temp() 587 struct tegra_thermctl_zone *zone = data; in tegra_thermctl_set_trip_temp() local 588 struct thermal_zone_device *tz = zone->tz; in tegra_thermctl_set_trip_temp() 589 struct tegra_soctherm *ts = zone->ts; in tegra_thermctl_set_trip_temp() 590 const struct tegra_tsensor_group *sg = zone->sg; in tegra_thermctl_set_trip_temp() 591 struct device *dev = zone->dev; in tegra_thermctl_set_trip_temp() 639 struct tegra_thermctl_zone *zone = data; in tegra_thermctl_get_trend() local 640 struct thermal_zone_device *tz = zone->tz; in tegra_thermctl_get_trend() [all …]
|
/drivers/mtd/ |
D | sm_ftl.c | 192 static loff_t sm_mkoffset(struct sm_ftl *ftl, int zone, int block, int boffset) in sm_mkoffset() argument 195 WARN_ON(zone < 0 || zone >= ftl->zone_count); in sm_mkoffset() 202 return (zone * SM_MAX_ZONE_SIZE + block) * ftl->block_size + boffset; in sm_mkoffset() 207 int *zone, int *block, int *boffset) in sm_break_offset() argument 212 *zone = offset >= ftl->zone_count ? -1 : offset; in sm_break_offset() 238 int zone, int block, int boffset, in sm_read_sector() argument 270 if (zone == 0 && block == ftl->cis_block && boffset == in sm_read_sector() 282 ret = mtd_read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); in sm_read_sector() 287 block, zone, ret); in sm_read_sector() 305 " as bad" , block, zone); in sm_read_sector() [all …]
|
/drivers/thermal/intel/int340x_thermal/ |
D | int340x_thermal_zone.c | 14 static int int340x_thermal_get_zone_temp(struct thermal_zone_device *zone, in int340x_thermal_get_zone_temp() argument 17 struct int34x_thermal_zone *d = zone->devdata; in int340x_thermal_get_zone_temp() 22 return d->override_ops->get_temp(zone, temp); in int340x_thermal_get_zone_temp() 43 static int int340x_thermal_get_trip_temp(struct thermal_zone_device *zone, in int340x_thermal_get_trip_temp() argument 46 struct int34x_thermal_zone *d = zone->devdata; in int340x_thermal_get_trip_temp() 50 return d->override_ops->get_trip_temp(zone, trip, temp); in int340x_thermal_get_trip_temp() 79 static int int340x_thermal_get_trip_type(struct thermal_zone_device *zone, in int340x_thermal_get_trip_type() argument 83 struct int34x_thermal_zone *d = zone->devdata; in int340x_thermal_get_trip_type() 87 return d->override_ops->get_trip_type(zone, trip, type); in int340x_thermal_get_trip_type() 116 static int int340x_thermal_set_trip_temp(struct thermal_zone_device *zone, in int340x_thermal_set_trip_temp() argument [all …]
|
/drivers/platform/x86/dell/ |
D | alienware-wmi.c | 239 static int parse_rgb(const char *buf, struct platform_zone *zone) in parse_rgb() argument 259 zone->colors = repackager.cp; in parse_rgb() 265 u8 zone; in match_zone() local 267 for (zone = 0; zone < quirks->num_zones; zone++) { in match_zone() 268 if ((struct device_attribute *)zone_data[zone].attr == attr) { in match_zone() 270 zone_data[zone].location); in match_zone() 271 return &zone_data[zone]; in match_zone() 280 static int alienware_update_led(struct platform_zone *zone) in alienware_update_led() argument 289 wmax_basic_args.led_mask = 1 << zone->location; in alienware_update_led() 290 wmax_basic_args.colors = zone->colors; in alienware_update_led() [all …]
|
/drivers/staging/rts5208/ |
D | xd.c | 800 xd_card->zone = vmalloc(size); in xd_init_l2p_tbl() 801 if (!xd_card->zone) in xd_init_l2p_tbl() 805 xd_card->zone[i].build_flag = 0; in xd_init_l2p_tbl() 806 xd_card->zone[i].l2p_table = NULL; in xd_init_l2p_tbl() 807 xd_card->zone[i].free_table = NULL; in xd_init_l2p_tbl() 808 xd_card->zone[i].get_index = 0; in xd_init_l2p_tbl() 809 xd_card->zone[i].set_index = 0; in xd_init_l2p_tbl() 810 xd_card->zone[i].unused_blk_cnt = 0; in xd_init_l2p_tbl() 816 static inline void free_zone(struct zone_entry *zone) in free_zone() argument 818 if (!zone) in free_zone() [all …]
|
/drivers/thermal/ |
D | rcar_gen3_thermal.c | 84 struct thermal_zone_device *zone; member 244 thermal_zone_device_update(priv->tscs[i]->zone, in rcar_gen3_thermal_irq() 267 if (tsc->zone->ops->set_trips) in rcar_gen3_thermal_init_r8a7795es1() 295 if (tsc->zone->ops->set_trips) in rcar_gen3_thermal_init() 361 struct thermal_zone_device *zone = data; in rcar_gen3_hwmon_action() local 363 thermal_remove_hwmon_sysfs(zone); in rcar_gen3_hwmon_action() 400 struct thermal_zone_device *zone; in rcar_gen3_thermal_probe() local 446 zone = devm_thermal_zone_of_sensor_register(dev, i, tsc, in rcar_gen3_thermal_probe() 448 if (IS_ERR(zone)) { in rcar_gen3_thermal_probe() 450 ret = PTR_ERR(zone); in rcar_gen3_thermal_probe() [all …]
|
D | rcar_thermal.c | 92 struct thermal_zone_device *zone; member 104 #define rcar_zone_to_priv(zone) ((zone)->devdata) argument 281 static int rcar_thermal_get_temp(struct thermal_zone_device *zone, int *temp) in rcar_thermal_get_temp() argument 283 struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); in rcar_thermal_get_temp() 288 static int rcar_thermal_get_trip_type(struct thermal_zone_device *zone, in rcar_thermal_get_trip_type() argument 291 struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); in rcar_thermal_get_trip_type() 307 static int rcar_thermal_get_trip_temp(struct thermal_zone_device *zone, in rcar_thermal_get_trip_temp() argument 310 struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); in rcar_thermal_get_trip_temp() 370 thermal_zone_device_update(priv->zone, THERMAL_EVENT_UNSPECIFIED); in rcar_thermal_work() 432 thermal_remove_hwmon_sysfs(priv->zone); in rcar_thermal_remove() [all …]
|
D | da9062-thermal.c | 51 struct thermal_zone_device *zone; member 95 thermal_zone_device_update(thermal->zone, in da9062_thermal_poll_on() 98 delay = thermal->zone->passive_delay_jiffies; in da9062_thermal_poll_on() 106 thermal_zone_device_update(thermal->zone, in da9062_thermal_poll_on() 231 thermal->zone = thermal_zone_device_register(thermal->config->name, in da9062_thermal_probe() 235 if (IS_ERR(thermal->zone)) { in da9062_thermal_probe() 237 ret = PTR_ERR(thermal->zone); in da9062_thermal_probe() 240 ret = thermal_zone_device_enable(thermal->zone); in da9062_thermal_probe() 248 jiffies_to_msecs(thermal->zone->passive_delay_jiffies)); in da9062_thermal_probe() 271 thermal_zone_device_unregister(thermal->zone); in da9062_thermal_probe() [all …]
|
/drivers/iio/light/ |
D | lm3533-als.c | 57 atomic_t zone; member 86 static int _lm3533_als_get_zone(struct iio_dev *indio_dev, u8 *zone) in _lm3533_als_get_zone() argument 99 *zone = min_t(u8, val, LM3533_ALS_ZONE_MAX); in _lm3533_als_get_zone() 104 static int lm3533_als_get_zone(struct iio_dev *indio_dev, u8 *zone) in lm3533_als_get_zone() argument 110 *zone = atomic_read(&als->zone); in lm3533_als_get_zone() 112 ret = _lm3533_als_get_zone(indio_dev, zone); in lm3533_als_get_zone() 124 static inline u8 lm3533_als_get_target_reg(unsigned channel, unsigned zone) in lm3533_als_get_target_reg() argument 126 return LM3533_REG_ALS_TARGET_BASE + 5 * channel + zone; in lm3533_als_get_target_reg() 130 unsigned zone, u8 *val) in lm3533_als_get_target() argument 139 if (zone > LM3533_ALS_ZONE_MAX) in lm3533_als_get_target() [all …]
|
/drivers/scsi/ |
D | sd_zbc.c | 23 static unsigned int sd_zbc_get_zone_wp_offset(struct blk_zone *zone) in sd_zbc_get_zone_wp_offset() argument 25 if (zone->type == ZBC_ZONE_TYPE_CONV) in sd_zbc_get_zone_wp_offset() 28 switch (zone->cond) { in sd_zbc_get_zone_wp_offset() 32 return zone->wp - zone->start; in sd_zbc_get_zone_wp_offset() 34 return zone->len; in sd_zbc_get_zone_wp_offset() 51 struct blk_zone zone = { 0 }; in sd_zbc_parse_report() local 54 zone.type = buf[0] & 0x0f; in sd_zbc_parse_report() 55 zone.cond = (buf[1] >> 4) & 0xf; in sd_zbc_parse_report() 57 zone.reset = 1; in sd_zbc_parse_report() 59 zone.non_seq = 1; in sd_zbc_parse_report() [all …]
|
/drivers/hwmon/ |
D | scpi-hwmon.c | 67 struct scpi_thermal_zone *zone = dev; in scpi_read_temp() local 68 struct scpi_sensors *scpi_sensors = zone->scpi_sensors; in scpi_read_temp() 70 struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id]; in scpi_read_temp() 269 struct scpi_thermal_zone *zone; in scpi_hwmon_probe() local 274 zone = devm_kzalloc(dev, sizeof(*zone), GFP_KERNEL); in scpi_hwmon_probe() 275 if (!zone) in scpi_hwmon_probe() 278 zone->sensor_id = i; in scpi_hwmon_probe() 279 zone->scpi_sensors = scpi_sensors; in scpi_hwmon_probe() 282 zone, in scpi_hwmon_probe() 291 devm_kfree(dev, zone); in scpi_hwmon_probe()
|
D | lm85.c | 227 static int ZONE_TO_REG(int zone) in ZONE_TO_REG() argument 232 if (zone == lm85_zone_map[i]) in ZONE_TO_REG() 318 struct lm85_zone zone[3]; member 511 data->zone[i].range = val >> 4; in lm85_update_device() 514 data->zone[i].limit = in lm85_update_device() 516 data->zone[i].critical = in lm85_update_device() 522 data->zone[i].limit -= 64; in lm85_update_device() 523 data->zone[i].critical -= 64; in lm85_update_device() 534 data->zone[0].hyst = i >> 4; in lm85_update_device() 535 data->zone[1].hyst = i & 0x0f; in lm85_update_device() [all …]
|
/drivers/usb/storage/ |
D | alauda.c | 549 unsigned int zone) in alauda_find_unused_pba() argument 551 u16 *pba_to_lba = info->pba_to_lba[zone]; in alauda_find_unused_pba() 556 return (zone << info->zoneshift) + i; in alauda_find_unused_pba() 565 static int alauda_read_map(struct us_data *us, unsigned int zone) in alauda_read_map() argument 573 unsigned int zone_base_lba = zone * uzonesize; in alauda_read_map() 574 unsigned int zone_base_pba = zone * zonesize; in alauda_read_map() 582 usb_stor_dbg(us, "Mapping blocks for zone %d\n", zone); in alauda_read_map() 673 MEDIA_INFO(us).lba_to_pba[zone] = lba_to_pba; in alauda_read_map() 674 MEDIA_INFO(us).pba_to_lba[zone] = pba_to_lba; in alauda_read_map() 689 static void alauda_ensure_map_for_zone(struct us_data *us, unsigned int zone) in alauda_ensure_map_for_zone() argument [all …]
|
/drivers/powercap/ |
D | dtpm.c | 100 child->weight, child->zone.name); in __dtpm_rebalance_weight() 260 dtpm->zone.name, power_limit); in __set_power_limit_uw() 290 child->zone.name, power); in __set_power_limit_uw() 323 dtpm->zone.name, dtpm->power_limit, dtpm->power_max); in set_power_limit_uw() 391 powercap_unregister_zone(pct, &dtpm->zone); in dtpm_unregister() 393 pr_info("Unregistered dtpm node '%s'\n", dtpm->zone.name); in dtpm_unregister() 442 pcz = powercap_register_zone(&dtpm->zone, pct, name, in dtpm_register() 443 parent ? &parent->zone : NULL, in dtpm_register() 461 dtpm->zone.name, dtpm->power_min, dtpm->power_max); in dtpm_register()
|
/drivers/nvme/host/ |
D | zns.c | 156 struct blk_zone zone = { }; in nvme_zone_parse_entry() local 164 zone.type = BLK_ZONE_TYPE_SEQWRITE_REQ; in nvme_zone_parse_entry() 165 zone.cond = entry->zs >> 4; in nvme_zone_parse_entry() 166 zone.len = ns->zsze; in nvme_zone_parse_entry() 167 zone.capacity = nvme_lba_to_sect(ns, le64_to_cpu(entry->zcap)); in nvme_zone_parse_entry() 168 zone.start = nvme_lba_to_sect(ns, le64_to_cpu(entry->zslba)); in nvme_zone_parse_entry() 169 zone.wp = nvme_lba_to_sect(ns, le64_to_cpu(entry->wp)); in nvme_zone_parse_entry() 171 return cb(&zone, idx, data); in nvme_zone_parse_entry()
|
/drivers/base/ |
D | memory.c | 183 struct zone *zone; in memory_block_online() local 186 zone = zone_for_pfn_range(mem->online_type, mem->nid, mem->group, in memory_block_online() 197 ret = mhp_init_memmap_on_memory(start_pfn, nr_vmemmap_pages, zone); in memory_block_online() 203 nr_pages - nr_vmemmap_pages, zone, mem->group); in memory_block_online() 386 int online_type, struct zone *default_zone) in print_allowed_zone() 388 struct zone *zone; in print_allowed_zone() local 390 zone = zone_for_pfn_range(online_type, nid, group, start_pfn, nr_pages); in print_allowed_zone() 391 if (zone == default_zone) in print_allowed_zone() 394 return sysfs_emit_at(buf, len, " %s", zone->name); in print_allowed_zone() 404 struct zone *default_zone; in valid_zones_show()
|