Home
last modified time | relevance | path

Searched refs:part (Results 1 – 25 of 165) sorted by relevance

1234567

/drivers/mtd/
Drfd_ftl.c93 static int build_block_map(struct partition *part, int block_no) in build_block_map() argument
95 struct block *block = &part->blocks[block_no]; in build_block_map()
98 block->offset = part->block_size * block_no; in build_block_map()
100 if (le16_to_cpu(part->header_cache[0]) != RFD_MAGIC) { in build_block_map()
107 for (i=0; i<part->data_sectors_per_block; i++) { in build_block_map()
110 entry = le16_to_cpu(part->header_cache[HEADER_MAP_OFFSET + i]); in build_block_map()
123 if (entry >= part->sector_count) { in build_block_map()
127 part->mbd.mtd->name, block_no, i, entry); in build_block_map()
131 if (part->sector_map[entry] != -1) { in build_block_map()
134 part->mbd.mtd->name, entry); in build_block_map()
[all …]
Dftl.c151 static int scan_header(partition_t *part) in scan_header() argument
157 part->header.FormattedSize = 0; in scan_header()
158 max_offset = (0x100000<part->mbd.mtd->size)?0x100000:part->mbd.mtd->size; in scan_header()
162 offset += part->mbd.mtd->erasesize ? : 0x2000) { in scan_header()
164 err = mtd_read(part->mbd.mtd, offset, sizeof(header), &ret, in scan_header()
183 if ((1 << header.EraseUnitSize) != part->mbd.mtd->erasesize) { in scan_header()
185 1 << header.EraseUnitSize,part->mbd.mtd->erasesize); in scan_header()
188 part->header = header; in scan_header()
192 static int build_maps(partition_t *part) in build_maps() argument
202 part->DataUnits = le16_to_cpu(part->header.NumEraseUnits) - in build_maps()
[all …]
Dmtdpart.c35 const struct mtd_partition *part, in allocate_partition() argument
42 parent->part.size : parent->size; in allocate_partition()
50 name = kstrdup(part->name, GFP_KERNEL); in allocate_partition()
61 child->part.flags = parent->flags & ~part->mask_flags; in allocate_partition()
62 child->part.flags |= part->add_flags; in allocate_partition()
63 child->flags = child->part.flags; in allocate_partition()
64 child->part.size = part->size; in allocate_partition()
84 child->dev.of_node = part->of_node; in allocate_partition()
86 child->part.offset = part->offset; in allocate_partition()
89 if (child->part.offset == MTDPART_OFS_APPEND) in allocate_partition()
[all …]
/drivers/misc/sgi-xp/
Dxpc_main.c178 struct xpc_partition *part = from_timer(part, t, disengage_timer); in xpc_timeout_partition_disengage() local
180 DBUG_ON(time_is_after_jiffies(part->disengage_timeout)); in xpc_timeout_partition_disengage()
182 (void)xpc_partition_disengaged(part); in xpc_timeout_partition_disengage()
184 DBUG_ON(part->disengage_timeout != 0); in xpc_timeout_partition_disengage()
185 DBUG_ON(xpc_arch_ops.partition_engaged(XPC_PARTID(part))); in xpc_timeout_partition_disengage()
227 struct xpc_partition *part; in xpc_check_remote_hb() local
239 part = &xpc_partitions[partid]; in xpc_check_remote_hb()
241 if (part->act_state == XPC_P_AS_INACTIVE || in xpc_check_remote_hb()
242 part->act_state == XPC_P_AS_DEACTIVATING) { in xpc_check_remote_hb()
246 ret = xpc_arch_ops.get_remote_heartbeat(part); in xpc_check_remote_hb()
[all …]
Dxpc_partition.c266 xpc_partition_disengaged(struct xpc_partition *part) in xpc_partition_disengaged() argument
268 short partid = XPC_PARTID(part); in xpc_partition_disengaged()
272 if (part->disengage_timeout) { in xpc_partition_disengaged()
274 if (time_is_after_jiffies(part->disengage_timeout)) { in xpc_partition_disengaged()
290 part->disengage_timeout = 0; in xpc_partition_disengaged()
294 del_singleshot_timer_sync(&part->disengage_timer); in xpc_partition_disengaged()
296 DBUG_ON(part->act_state != XPC_P_AS_DEACTIVATING && in xpc_partition_disengaged()
297 part->act_state != XPC_P_AS_INACTIVE); in xpc_partition_disengaged()
298 if (part->act_state != XPC_P_AS_INACTIVE) in xpc_partition_disengaged()
299 xpc_wakeup_channel_mgr(part); in xpc_partition_disengaged()
[all …]
Dxpc_uv.c376 struct xpc_partition *part; in xpc_process_activate_IRQ_rcvd_uv() local
383 part = &xpc_partitions[partid]; in xpc_process_activate_IRQ_rcvd_uv()
385 if (part->sn.uv.act_state_req == 0) in xpc_process_activate_IRQ_rcvd_uv()
391 act_state_req = part->sn.uv.act_state_req; in xpc_process_activate_IRQ_rcvd_uv()
392 part->sn.uv.act_state_req = 0; in xpc_process_activate_IRQ_rcvd_uv()
396 if (part->act_state == XPC_P_AS_INACTIVE) in xpc_process_activate_IRQ_rcvd_uv()
397 xpc_activate_partition(part); in xpc_process_activate_IRQ_rcvd_uv()
398 else if (part->act_state == XPC_P_AS_DEACTIVATING) in xpc_process_activate_IRQ_rcvd_uv()
399 XPC_DEACTIVATE_PARTITION(part, xpReactivating); in xpc_process_activate_IRQ_rcvd_uv()
402 if (part->act_state == XPC_P_AS_INACTIVE) in xpc_process_activate_IRQ_rcvd_uv()
[all …]
Dxpc_channel.c82 struct xpc_partition *part = &xpc_partitions[ch->partid]; in xpc_process_disconnect() local
101 if (part->act_state == XPC_P_AS_DEACTIVATING) { in xpc_process_disconnect()
157 atomic_dec(&part->nchannels_active); in xpc_process_disconnect()
168 if (part->act_state != XPC_P_AS_DEACTIVATING) { in xpc_process_disconnect()
170 spin_lock(&part->chctl_lock); in xpc_process_disconnect()
171 part->chctl.flags[ch->number] |= in xpc_process_disconnect()
173 spin_unlock(&part->chctl_lock); in xpc_process_disconnect()
183 xpc_process_openclose_chctl_flags(struct xpc_partition *part, int ch_number, in xpc_process_openclose_chctl_flags() argument
188 &part->remote_openclose_args[ch_number]; in xpc_process_openclose_chctl_flags()
189 struct xpc_channel *ch = &part->channels[ch_number]; in xpc_process_openclose_chctl_flags()
[all …]
Dxpc.h664 xpc_wakeup_channel_mgr(struct xpc_partition *part) in xpc_wakeup_channel_mgr() argument
666 if (atomic_inc_return(&part->channel_mgr_requests) == 1) in xpc_wakeup_channel_mgr()
667 wake_up(&part->channel_mgr_wq); in xpc_wakeup_channel_mgr()
698 xpc_part_deref(struct xpc_partition *part) in xpc_part_deref() argument
700 s32 refs = atomic_dec_return(&part->references); in xpc_part_deref()
703 if (refs == 0 && part->setup_state == XPC_P_SS_WTEARDOWN) in xpc_part_deref()
704 wake_up(&part->teardown_wq); in xpc_part_deref()
708 xpc_part_ref(struct xpc_partition *part) in xpc_part_ref() argument
712 atomic_inc(&part->references); in xpc_part_ref()
713 setup = (part->setup_state == XPC_P_SS_SETUP); in xpc_part_ref()
[all …]
/drivers/acpi/acpica/
Dutmath.c23 struct uint64_struct part; member
62 ACPI_MUL_64_BY_32(0, multiplicand_ovl.part.hi, multiplier, in acpi_ut_short_multiply()
63 product.part.hi, carry32); in acpi_ut_short_multiply()
65 ACPI_MUL_64_BY_32(0, multiplicand_ovl.part.lo, multiplier, in acpi_ut_short_multiply()
66 product.part.lo, carry32); in acpi_ut_short_multiply()
68 product.part.hi += carry32; in acpi_ut_short_multiply()
100 operand_ovl.part.hi = operand_ovl.part.lo; in acpi_ut_short_shift_left()
101 operand_ovl.part.lo = 0; in acpi_ut_short_shift_left()
104 ACPI_SHIFT_LEFT_64_BY_32(operand_ovl.part.hi, in acpi_ut_short_shift_left()
105 operand_ovl.part.lo, count); in acpi_ut_short_shift_left()
[all …]
/drivers/net/ethernet/sfc/
Dmtd.c30 struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); in efx_mtd_sync() local
37 part->name, part->dev_type_name, rc); in efx_mtd_sync()
40 static void efx_mtd_remove_partition(struct efx_mtd_partition *part) in efx_mtd_remove_partition() argument
45 rc = mtd_device_unregister(&part->mtd); in efx_mtd_remove_partition()
51 list_del(&part->node); in efx_mtd_remove_partition()
57 struct efx_mtd_partition *part; in efx_mtd_add() local
61 part = (struct efx_mtd_partition *)((char *)parts + in efx_mtd_add()
64 part->mtd.writesize = 1; in efx_mtd_add()
66 if (!(part->mtd.flags & MTD_NO_ERASE)) in efx_mtd_add()
67 part->mtd.flags |= MTD_WRITEABLE; in efx_mtd_add()
[all …]
/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum1_kvdl.c74 struct mlxsw_sp1_kvdl_part *part, *min_part = NULL; in mlxsw_sp1_kvdl_alloc_size_part() local
78 part = kvdl->parts[i]; in mlxsw_sp1_kvdl_alloc_size_part()
79 if (alloc_size <= part->info.alloc_size && in mlxsw_sp1_kvdl_alloc_size_part()
81 part->info.alloc_size <= min_part->info.alloc_size)) in mlxsw_sp1_kvdl_alloc_size_part()
82 min_part = part; in mlxsw_sp1_kvdl_alloc_size_part()
91 struct mlxsw_sp1_kvdl_part *part; in mlxsw_sp1_kvdl_index_part() local
95 part = kvdl->parts[i]; in mlxsw_sp1_kvdl_index_part()
96 if (kvdl_index >= part->info.start_index && in mlxsw_sp1_kvdl_index_part()
97 kvdl_index <= part->info.end_index) in mlxsw_sp1_kvdl_index_part()
98 return part; in mlxsw_sp1_kvdl_index_part()
[all …]
Dspectrum2_kvdl.c55 static int mlxsw_sp2_kvdl_part_find_zero_bits(struct mlxsw_sp2_kvdl_part *part, in mlxsw_sp2_kvdl_part_find_zero_bits() argument
64 start_bit = part->last_allocated_bit + 1; in mlxsw_sp2_kvdl_part_find_zero_bits()
65 if (start_bit == part->usage_bit_count) in mlxsw_sp2_kvdl_part_find_zero_bits()
69 bit = find_next_zero_bit(part->usage, part->usage_bit_count, bit); in mlxsw_sp2_kvdl_part_find_zero_bits()
70 if (!wrap && bit + bit_count >= part->usage_bit_count) { in mlxsw_sp2_kvdl_part_find_zero_bits()
78 if (test_bit(bit + i, part->usage)) { in mlxsw_sp2_kvdl_part_find_zero_bits()
87 static int mlxsw_sp2_kvdl_part_alloc(struct mlxsw_sp2_kvdl_part *part, in mlxsw_sp2_kvdl_part_alloc() argument
96 bit_count = DIV_ROUND_UP(size, part->indexes_per_usage_bit); in mlxsw_sp2_kvdl_part_alloc()
97 err = mlxsw_sp2_kvdl_part_find_zero_bits(part, bit_count, &bit); in mlxsw_sp2_kvdl_part_alloc()
101 __set_bit(bit + i, part->usage); in mlxsw_sp2_kvdl_part_alloc()
[all …]
/drivers/net/ethernet/sfc/falcon/
Dmtd.c30 struct ef4_mtd_partition *part = to_ef4_mtd_partition(mtd); in ef4_mtd_sync() local
37 part->name, part->dev_type_name, rc); in ef4_mtd_sync()
40 static void ef4_mtd_remove_partition(struct ef4_mtd_partition *part) in ef4_mtd_remove_partition() argument
45 rc = mtd_device_unregister(&part->mtd); in ef4_mtd_remove_partition()
51 list_del(&part->node); in ef4_mtd_remove_partition()
57 struct ef4_mtd_partition *part; in ef4_mtd_add() local
61 part = (struct ef4_mtd_partition *)((char *)parts + in ef4_mtd_add()
64 part->mtd.writesize = 1; in ef4_mtd_add()
66 part->mtd.owner = THIS_MODULE; in ef4_mtd_add()
67 part->mtd.priv = efx; in ef4_mtd_add()
[all …]
/drivers/irqchip/
Dirq-partition-percpu.c25 static bool partition_check_cpu(struct partition_desc *part, in partition_check_cpu() argument
28 return cpumask_test_cpu(cpu, &part->parts[hwirq].mask); in partition_check_cpu()
33 struct partition_desc *part = irq_data_get_irq_chip_data(d); in partition_irq_mask() local
34 struct irq_chip *chip = irq_desc_get_chip(part->chained_desc); in partition_irq_mask()
35 struct irq_data *data = irq_desc_get_irq_data(part->chained_desc); in partition_irq_mask()
37 if (partition_check_cpu(part, smp_processor_id(), d->hwirq) && in partition_irq_mask()
44 struct partition_desc *part = irq_data_get_irq_chip_data(d); in partition_irq_unmask() local
45 struct irq_chip *chip = irq_desc_get_chip(part->chained_desc); in partition_irq_unmask()
46 struct irq_data *data = irq_desc_get_irq_data(part->chained_desc); in partition_irq_unmask()
48 if (partition_check_cpu(part, smp_processor_id(), d->hwirq) && in partition_irq_unmask()
[all …]
/drivers/net/wireless/ti/wlcore/
Dio.c57 struct wlcore_partition_set *part = &wl->curr_part; in wlcore_translate_addr() local
69 if ((addr >= part->mem.start) && in wlcore_translate_addr()
70 (addr < part->mem.start + part->mem.size)) in wlcore_translate_addr()
71 return addr - part->mem.start; in wlcore_translate_addr()
72 else if ((addr >= part->reg.start) && in wlcore_translate_addr()
73 (addr < part->reg.start + part->reg.size)) in wlcore_translate_addr()
74 return addr - part->reg.start + part->mem.size; in wlcore_translate_addr()
75 else if ((addr >= part->mem2.start) && in wlcore_translate_addr()
76 (addr < part->mem2.start + part->mem2.size)) in wlcore_translate_addr()
77 return addr - part->mem2.start + part->mem.size + in wlcore_translate_addr()
[all …]
/drivers/misc/
Dsram.c29 struct sram_partition *part; in sram_read() local
31 part = container_of(attr, struct sram_partition, battr); in sram_read()
33 mutex_lock(&part->lock); in sram_read()
34 memcpy_fromio(buf, part->base + pos, count); in sram_read()
35 mutex_unlock(&part->lock); in sram_read()
44 struct sram_partition *part; in sram_write() local
46 part = container_of(attr, struct sram_partition, battr); in sram_write()
48 mutex_lock(&part->lock); in sram_write()
49 memcpy_toio(part->base + pos, buf, count); in sram_write()
50 mutex_unlock(&part->lock); in sram_write()
[all …]
Dsram-exec.c31 struct sram_partition *part) in sram_check_protect_exec() argument
33 unsigned long base = (unsigned long)part->base; in sram_check_protect_exec()
45 int sram_add_protect_exec(struct sram_partition *part) in sram_add_protect_exec() argument
48 list_add_tail(&part->list, &exec_pool_list); in sram_add_protect_exec()
84 struct sram_partition *part = NULL, *p; in sram_exec_copy() local
93 part = p; in sram_exec_copy()
97 if (!part) in sram_exec_copy()
103 base = (unsigned long)part->base; in sram_exec_copy()
106 mutex_lock(&part->lock); in sram_exec_copy()
124 mutex_unlock(&part->lock); in sram_exec_copy()
[all …]
Dsram.h40 struct sram_partition *part);
41 int sram_add_protect_exec(struct sram_partition *part);
45 struct sram_partition *part) in sram_check_protect_exec() argument
50 static inline int sram_add_protect_exec(struct sram_partition *part) in sram_add_protect_exec() argument
/drivers/mtd/parsers/
Dcmdlinepart.c339 struct cmdline_mtd_partition *part; in parse_cmdline_partitions() local
353 for (part = partitions; part; part = part->next) { in parse_cmdline_partitions()
354 if ((!mtd_id) || (!strcmp(part->mtd_id, mtd_id))) in parse_cmdline_partitions()
358 if (!part) in parse_cmdline_partitions()
361 for (i = 0, offset = 0; i < part->num_parts; i++) { in parse_cmdline_partitions()
362 if (part->parts[i].offset == OFFSET_CONTINUOUS) in parse_cmdline_partitions()
363 part->parts[i].offset = offset; in parse_cmdline_partitions()
365 offset = part->parts[i].offset; in parse_cmdline_partitions()
367 if (part->parts[i].size == SIZE_REMAINING) in parse_cmdline_partitions()
368 part->parts[i].size = master->size - offset; in parse_cmdline_partitions()
[all …]
Dparser_trx.c55 struct mtd_partition *part; in parser_trx_parse() local
80 part = &parts[curr_part++]; in parser_trx_parse()
81 part->name = "loader"; in parser_trx_parse()
82 part->offset = trx.offset[i]; in parser_trx_parse()
87 part = &parts[curr_part++]; in parser_trx_parse()
88 part->name = "linux"; in parser_trx_parse()
89 part->offset = trx.offset[i]; in parser_trx_parse()
94 part = &parts[curr_part++]; in parser_trx_parse()
95 part->name = parser_trx_data_part_name(mtd, trx.offset[i]); in parser_trx_parse()
96 part->offset = trx.offset[i]; in parser_trx_parse()
Dafs.c120 u_int off, struct mtd_partition *part) in afs_parse_v1_partition() argument
201 part->name = kstrdup(iis.name, GFP_KERNEL); in afs_parse_v1_partition()
202 if (!part->name) in afs_parse_v1_partition()
205 part->size = (iis.length + mtd->erasesize - 1) & ~(mtd->erasesize - 1); in afs_parse_v1_partition()
206 part->offset = img_ptr; in afs_parse_v1_partition()
207 part->mask_flags = 0; in afs_parse_v1_partition()
210 img_ptr, part->size / 1024, in afs_parse_v1_partition()
211 iis.imageNumber, part->name); in afs_parse_v1_partition()
217 u_int off, struct mtd_partition *part) in afs_parse_v2_partition() argument
312 part->name = kstrdup(name, GFP_KERNEL); in afs_parse_v2_partition()
[all …]
Dofpart.c163 } *part; in parse_ofoldpart_partitions() local
171 part = of_get_property(dp, "partitions", &plen); in parse_ofoldpart_partitions()
172 if (!part) in parse_ofoldpart_partitions()
177 nr_parts = plen / sizeof(part[0]); in parse_ofoldpart_partitions()
186 parts[i].offset = be32_to_cpu(part->offset); in parse_ofoldpart_partitions()
187 parts[i].size = be32_to_cpu(part->len) & ~1; in parse_ofoldpart_partitions()
189 if (be32_to_cpu(part->len) & 1) in parse_ofoldpart_partitions()
202 part++; in parse_ofoldpart_partitions()
/drivers/firmware/efi/
Defi-pstore.c38 static inline u64 generic_id(u64 timestamp, unsigned int part, int count) in generic_id() argument
40 return (timestamp * 100 + part) * 1000 + count; in generic_id()
50 unsigned int part; in efi_pstore_read_func() local
61 &record->type, &part, &cnt, &time, &data_type) == 5) { in efi_pstore_read_func()
62 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
63 record->part = part; in efi_pstore_read_func()
73 &record->type, &part, &cnt, &time) == 4) { in efi_pstore_read_func()
74 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
75 record->part = part; in efi_pstore_read_func()
82 &record->type, &part, &time) == 3) { in efi_pstore_read_func()
[all …]
/drivers/gpu/drm/nouveau/nvkm/engine/dma/
Dusernv50.c78 u32 user, part, comp, kind; in nv50_dmaobj_new() local
97 args->v0.priv, args->v0.part, args->v0.comp, in nv50_dmaobj_new()
100 part = args->v0.part; in nv50_dmaobj_new()
107 part = NV50_DMA_V0_PART_256; in nv50_dmaobj_new()
112 part = NV50_DMA_V0_PART_VM; in nv50_dmaobj_new()
119 if (user > 2 || part > 2 || comp > 3 || kind > 0x7f) in nv50_dmaobj_new()
123 dmaobj->flags5 = (part << 16); in nv50_dmaobj_new()
/drivers/net/wireless/mediatek/mt76/
Deeprom.c19 const char *part; in mt76_get_of_eeprom() local
41 part = of_get_property(np, "label", NULL); in mt76_get_of_eeprom()
42 if (!part) in mt76_get_of_eeprom()
43 part = np->name; in mt76_get_of_eeprom()
45 mtd = get_mtd_device_nm(part); in mt76_get_of_eeprom()
78 dev->test.mtd_name = devm_kstrdup(dev->dev, part, GFP_KERNEL); in mt76_get_of_eeprom()

1234567