Searched refs:part (Results 1 - 200 of 3607) sorted by relevance

1234567891011>>

/linux-4.1.27/drivers/mtd/
H A Drfd_ftl.c92 static int build_block_map(struct partition *part, int block_no) build_block_map() argument
94 struct block *block = &part->blocks[block_no]; build_block_map()
97 block->offset = part->block_size * block_no; build_block_map()
99 if (le16_to_cpu(part->header_cache[0]) != RFD_MAGIC) { build_block_map()
106 for (i=0; i<part->data_sectors_per_block; i++) { build_block_map()
109 entry = le16_to_cpu(part->header_cache[HEADER_MAP_OFFSET + i]); build_block_map()
122 if (entry >= part->sector_count) { build_block_map()
126 part->mbd.mtd->name, block_no, i, entry); build_block_map()
130 if (part->sector_map[entry] != -1) { build_block_map()
133 part->mbd.mtd->name, entry); build_block_map()
134 part->errors = 1; build_block_map()
138 part->sector_map[entry] = block->offset + build_block_map()
139 (i + part->header_sectors_per_block) * SECTOR_SIZE; build_block_map()
144 if (block->free_sectors == part->data_sectors_per_block) build_block_map()
145 part->reserved_block = block_no; build_block_map()
150 static int scan_header(struct partition *part) scan_header() argument
157 sectors_per_block = part->block_size / SECTOR_SIZE; scan_header()
158 part->total_blocks = (u32)part->mbd.mtd->size / part->block_size; scan_header()
160 if (part->total_blocks < 2) scan_header()
164 part->header_sectors_per_block = scan_header()
168 part->data_sectors_per_block = sectors_per_block - scan_header()
169 part->header_sectors_per_block; scan_header()
171 part->header_size = (HEADER_MAP_OFFSET + scan_header()
172 part->data_sectors_per_block) * sizeof(u16); scan_header()
174 part->cylinders = (part->data_sectors_per_block * scan_header()
175 (part->total_blocks - 1) - 1) / SECTORS_PER_TRACK; scan_header()
177 part->sector_count = part->cylinders * SECTORS_PER_TRACK; scan_header()
179 part->current_block = -1; scan_header()
180 part->reserved_block = -1; scan_header()
181 part->is_reclaiming = 0; scan_header()
183 part->header_cache = kmalloc(part->header_size, GFP_KERNEL); scan_header()
184 if (!part->header_cache) scan_header()
187 part->blocks = kcalloc(part->total_blocks, sizeof(struct block), scan_header()
189 if (!part->blocks) scan_header()
192 part->sector_map = vmalloc(part->sector_count * sizeof(u_long)); scan_header()
193 if (!part->sector_map) { scan_header()
195 "sector map", part->mbd.mtd->name); scan_header()
199 for (i=0; i<part->sector_count; i++) scan_header()
200 part->sector_map[i] = -1; scan_header()
202 for (i=0, blocks_found=0; i<part->total_blocks; i++) { scan_header()
203 rc = mtd_read(part->mbd.mtd, i * part->block_size, scan_header()
204 part->header_size, &retlen, scan_header()
205 (u_char *)part->header_cache); scan_header()
207 if (!rc && retlen != part->header_size) scan_header()
213 if (!build_block_map(part, i)) scan_header()
219 part->mbd.mtd->name); scan_header()
224 if (part->reserved_block == -1) { scan_header()
226 part->mbd.mtd->name); scan_header()
228 part->errors = 1; scan_header()
234 vfree(part->sector_map); scan_header()
235 kfree(part->header_cache); scan_header()
236 kfree(part->blocks); scan_header()
243 struct partition *part = (struct partition*)dev; rfd_ftl_readsect() local
248 if (sector >= part->sector_count) rfd_ftl_readsect()
251 addr = part->sector_map[sector]; rfd_ftl_readsect()
253 rc = mtd_read(part->mbd.mtd, addr, SECTOR_SIZE, &retlen, rfd_ftl_readsect()
260 "0x%lx\n", part->mbd.mtd->name, addr); rfd_ftl_readsect()
271 struct partition *part; erase_callback() local
276 part = (struct partition*)erase->priv; erase_callback()
278 i = (u32)erase->addr / part->block_size; erase_callback()
279 if (i >= part->total_blocks || part->blocks[i].offset != erase->addr || erase_callback()
282 "on '%s'\n", (unsigned long long)erase->addr, part->mbd.mtd->name); erase_callback()
289 part->mbd.mtd->name, erase->state); erase_callback()
291 part->blocks[i].state = BLOCK_FAILED; erase_callback()
292 part->blocks[i].free_sectors = 0; erase_callback()
293 part->blocks[i].used_sectors = 0; erase_callback()
302 part->blocks[i].state = BLOCK_ERASED; erase_callback()
303 part->blocks[i].free_sectors = part->data_sectors_per_block; erase_callback()
304 part->blocks[i].used_sectors = 0; erase_callback()
305 part->blocks[i].erases++; erase_callback()
307 rc = mtd_write(part->mbd.mtd, part->blocks[i].offset, sizeof(magic), erase_callback()
316 part->mbd.mtd->name, erase_callback()
317 part->blocks[i].offset); erase_callback()
318 part->blocks[i].state = BLOCK_FAILED; erase_callback()
321 part->blocks[i].state = BLOCK_OK; erase_callback()
326 static int erase_block(struct partition *part, int block) erase_block() argument
335 erase->mtd = part->mbd.mtd; erase_block()
337 erase->addr = part->blocks[block].offset; erase_block()
338 erase->len = part->block_size; erase_block()
339 erase->priv = (u_long)part; erase_block()
341 part->blocks[block].state = BLOCK_ERASING; erase_block()
342 part->blocks[block].free_sectors = 0; erase_block()
344 rc = mtd_erase(part->mbd.mtd, erase); erase_block()
349 (unsigned long long)erase->len, part->mbd.mtd->name); erase_block()
357 static int move_block_contents(struct partition *part, int block_no, u_long *old_sector) move_block_contents() argument
364 part->is_reclaiming = 1; move_block_contents()
370 map = kmalloc(part->header_size, GFP_KERNEL); move_block_contents()
374 rc = mtd_read(part->mbd.mtd, part->blocks[block_no].offset, move_block_contents()
375 part->header_size, &retlen, (u_char *)map); move_block_contents()
377 if (!rc && retlen != part->header_size) move_block_contents()
382 "0x%lx\n", part->mbd.mtd->name, move_block_contents()
383 part->blocks[block_no].offset); move_block_contents()
388 for (i=0; i<part->data_sectors_per_block; i++) { move_block_contents()
400 if (entry >= part->sector_count) move_block_contents()
403 addr = part->blocks[block_no].offset + move_block_contents()
404 (i + part->header_sectors_per_block) * SECTOR_SIZE; move_block_contents()
408 if (!part->blocks[block_no].used_sectors--) { move_block_contents()
409 rc = erase_block(part, block_no); move_block_contents()
414 rc = mtd_read(part->mbd.mtd, addr, SECTOR_SIZE, &retlen, move_block_contents()
423 part->mbd.mtd->name); move_block_contents()
428 rc = rfd_ftl_writesect((struct mtd_blktrans_dev*)part, move_block_contents()
440 part->is_reclaiming = 0; move_block_contents()
445 static int reclaim_block(struct partition *part, u_long *old_sector) reclaim_block() argument
451 mtd_sync(part->mbd.mtd); reclaim_block()
456 old_sector_block = *old_sector / part->block_size; reclaim_block()
460 for (block=0; block<part->total_blocks; block++) { reclaim_block()
463 if (block == part->reserved_block) reclaim_block()
471 if (part->blocks[block].free_sectors) reclaim_block()
474 this_score = part->blocks[block].used_sectors; reclaim_block()
480 if (part->blocks[block].used_sectors == reclaim_block()
481 part->data_sectors_per_block) reclaim_block()
485 this_score += part->blocks[block].erases; reclaim_block()
496 part->current_block = -1; reclaim_block()
497 part->reserved_block = best_block; reclaim_block()
501 part->blocks[best_block].used_sectors, reclaim_block()
502 part->blocks[best_block].free_sectors); reclaim_block()
504 if (part->blocks[best_block].used_sectors) reclaim_block()
505 rc = move_block_contents(part, best_block, old_sector); reclaim_block()
507 rc = erase_block(part, best_block); reclaim_block()
517 static int find_free_block(struct partition *part) find_free_block() argument
521 block = part->current_block == -1 ? find_free_block()
522 jiffies % part->total_blocks : part->current_block; find_free_block()
526 if (part->blocks[block].free_sectors && find_free_block()
527 block != part->reserved_block) find_free_block()
530 if (part->blocks[block].state == BLOCK_UNUSED) find_free_block()
531 erase_block(part, block); find_free_block()
533 if (++block >= part->total_blocks) find_free_block()
541 static int find_writable_block(struct partition *part, u_long *old_sector) find_writable_block() argument
546 block = find_free_block(part); find_writable_block()
549 if (!part->is_reclaiming) { find_writable_block()
550 rc = reclaim_block(part, old_sector); find_writable_block()
554 block = find_free_block(part); find_writable_block()
563 rc = mtd_read(part->mbd.mtd, part->blocks[block].offset, find_writable_block()
564 part->header_size, &retlen, find_writable_block()
565 (u_char *)part->header_cache); find_writable_block()
567 if (!rc && retlen != part->header_size) find_writable_block()
572 "0x%lx\n", part->mbd.mtd->name, find_writable_block()
573 part->blocks[block].offset); find_writable_block()
577 part->current_block = block; find_writable_block()
583 static int mark_sector_deleted(struct partition *part, u_long old_addr) mark_sector_deleted() argument
590 block = old_addr / part->block_size; mark_sector_deleted()
591 offset = (old_addr % part->block_size) / SECTOR_SIZE - mark_sector_deleted()
592 part->header_sectors_per_block; mark_sector_deleted()
594 addr = part->blocks[block].offset + mark_sector_deleted()
596 rc = mtd_write(part->mbd.mtd, addr, sizeof(del), &retlen, mark_sector_deleted()
604 "0x%lx\n", part->mbd.mtd->name, addr); mark_sector_deleted()
607 if (block == part->current_block) mark_sector_deleted()
608 part->header_cache[offset + HEADER_MAP_OFFSET] = del; mark_sector_deleted()
610 part->blocks[block].used_sectors--; mark_sector_deleted()
612 if (!part->blocks[block].used_sectors && mark_sector_deleted()
613 !part->blocks[block].free_sectors) mark_sector_deleted()
614 rc = erase_block(part, block); mark_sector_deleted()
620 static int find_free_sector(const struct partition *part, const struct block *block) find_free_sector() argument
624 i = stop = part->data_sectors_per_block - block->free_sectors; find_free_sector()
627 if (le16_to_cpu(part->header_cache[HEADER_MAP_OFFSET + i]) find_free_sector()
631 if (++i == part->data_sectors_per_block) find_free_sector()
641 struct partition *part = (struct partition*)dev; do_writesect() local
649 if (part->current_block == -1 || do_writesect()
650 !part->blocks[part->current_block].free_sectors) { do_writesect()
652 rc = find_writable_block(part, old_addr); do_writesect()
657 block = &part->blocks[part->current_block]; do_writesect()
659 i = find_free_sector(part, block); do_writesect()
666 addr = (i + part->header_sectors_per_block) * SECTOR_SIZE + do_writesect()
668 rc = mtd_write(part->mbd.mtd, addr, SECTOR_SIZE, &retlen, do_writesect()
676 part->mbd.mtd->name, addr); do_writesect()
680 part->sector_map[sector] = addr; do_writesect()
684 part->header_cache[i + HEADER_MAP_OFFSET] = entry; do_writesect()
687 rc = mtd_write(part->mbd.mtd, addr, sizeof(entry), &retlen, do_writesect()
695 part->mbd.mtd->name, addr); do_writesect()
707 struct partition *part = (struct partition*)dev; rfd_ftl_writesect() local
714 if (part->reserved_block == -1) { rfd_ftl_writesect()
719 if (sector >= part->sector_count) { rfd_ftl_writesect()
724 old_addr = part->sector_map[sector]; rfd_ftl_writesect()
737 part->sector_map[sector] = -1; rfd_ftl_writesect()
740 rc = mark_sector_deleted(part, old_addr); rfd_ftl_writesect()
748 struct partition *part = (struct partition*)dev; rfd_ftl_getgeo() local
752 geo->cylinders = part->cylinders; rfd_ftl_getgeo()
759 struct partition *part; rfd_ftl_add_mtd() local
764 part = kzalloc(sizeof(struct partition), GFP_KERNEL); rfd_ftl_add_mtd()
765 if (!part) rfd_ftl_add_mtd()
768 part->mbd.mtd = mtd; rfd_ftl_add_mtd()
771 part->block_size = block_size; rfd_ftl_add_mtd()
777 part->block_size = mtd->erasesize; rfd_ftl_add_mtd()
780 if (scan_header(part) == 0) { rfd_ftl_add_mtd()
781 part->mbd.size = part->sector_count; rfd_ftl_add_mtd()
782 part->mbd.tr = tr; rfd_ftl_add_mtd()
783 part->mbd.devnum = -1; rfd_ftl_add_mtd()
785 part->mbd.readonly = 1; rfd_ftl_add_mtd()
786 else if (part->errors) { rfd_ftl_add_mtd()
789 part->mbd.readonly = 1; rfd_ftl_add_mtd()
795 if (!add_mtd_blktrans_dev((void*)part)) rfd_ftl_add_mtd()
799 kfree(part); rfd_ftl_add_mtd()
804 struct partition *part = (struct partition*)dev; rfd_ftl_remove_dev() local
807 for (i=0; i<part->total_blocks; i++) { rfd_ftl_remove_dev()
809 part->mbd.mtd->name, i, part->blocks[i].erases); rfd_ftl_remove_dev()
813 vfree(part->sector_map); rfd_ftl_remove_dev()
814 kfree(part->header_cache); rfd_ftl_remove_dev()
815 kfree(part->blocks); rfd_ftl_remove_dev()
H A Dftl.c157 static int scan_header(partition_t *part) scan_header() argument
163 part->header.FormattedSize = 0; scan_header()
164 max_offset = (0x100000<part->mbd.mtd->size)?0x100000:part->mbd.mtd->size; scan_header()
168 offset += part->mbd.mtd->erasesize ? : 0x2000) { scan_header()
170 err = mtd_read(part->mbd.mtd, offset, sizeof(header), &ret, scan_header()
189 if ((1 << header.EraseUnitSize) != part->mbd.mtd->erasesize) { scan_header()
191 1 << header.EraseUnitSize,part->mbd.mtd->erasesize); scan_header()
194 part->header = header; scan_header()
198 static int build_maps(partition_t *part) build_maps() argument
208 part->DataUnits = le16_to_cpu(part->header.NumEraseUnits) - build_maps()
209 part->header.NumTransferUnits; build_maps()
210 part->EUNInfo = kmalloc(part->DataUnits * sizeof(struct eun_info_t), build_maps()
212 if (!part->EUNInfo) build_maps()
214 for (i = 0; i < part->DataUnits; i++) build_maps()
215 part->EUNInfo[i].Offset = 0xffffffff; build_maps()
216 part->XferInfo = build_maps()
217 kmalloc(part->header.NumTransferUnits * sizeof(struct xfer_info_t), build_maps()
219 if (!part->XferInfo) build_maps()
223 for (i = 0; i < le16_to_cpu(part->header.NumEraseUnits); i++) { build_maps()
224 offset = ((i + le16_to_cpu(part->header.FirstPhysicalEUN)) build_maps()
225 << part->header.EraseUnitSize); build_maps()
226 ret = mtd_read(part->mbd.mtd, offset, sizeof(header), &retval, build_maps()
235 if (hdr_ok && (le16_to_cpu(header.LogicalEUN) < part->DataUnits) && build_maps()
236 (part->EUNInfo[le16_to_cpu(header.LogicalEUN)].Offset == 0xffffffff)) { build_maps()
237 part->EUNInfo[le16_to_cpu(header.LogicalEUN)].Offset = offset; build_maps()
238 part->EUNInfo[le16_to_cpu(header.LogicalEUN)].EraseCount = build_maps()
242 if (xtrans == part->header.NumTransferUnits) { build_maps()
248 part->XferInfo[xtrans].state = XFER_PREPARED; build_maps()
249 part->XferInfo[xtrans].EraseCount = le32_to_cpu(header.EraseCount); build_maps()
251 part->XferInfo[xtrans].state = XFER_UNKNOWN; build_maps()
253 part->XferInfo[xtrans].EraseCount = build_maps()
254 le32_to_cpu(part->header.EraseCount); build_maps()
256 part->XferInfo[xtrans].Offset = offset; build_maps()
261 header = part->header; build_maps()
271 part->VirtualBlockMap = vmalloc(blocks * sizeof(uint32_t)); build_maps()
272 if (!part->VirtualBlockMap) build_maps()
275 memset(part->VirtualBlockMap, 0xff, blocks * sizeof(uint32_t)); build_maps()
276 part->BlocksPerUnit = (1 << header.EraseUnitSize) >> header.BlockSize; build_maps()
278 part->bam_cache = kmalloc(part->BlocksPerUnit * sizeof(uint32_t), build_maps()
280 if (!part->bam_cache) build_maps()
283 part->bam_index = 0xffff; build_maps()
284 part->FreeTotal = 0; build_maps()
286 for (i = 0; i < part->DataUnits; i++) { build_maps()
287 part->EUNInfo[i].Free = 0; build_maps()
288 part->EUNInfo[i].Deleted = 0; build_maps()
289 offset = part->EUNInfo[i].Offset + le32_to_cpu(header.BAMOffset); build_maps()
291 ret = mtd_read(part->mbd.mtd, offset, build_maps()
292 part->BlocksPerUnit * sizeof(uint32_t), &retval, build_maps()
293 (unsigned char *)part->bam_cache); build_maps()
298 for (j = 0; j < part->BlocksPerUnit; j++) { build_maps()
299 if (BLOCK_FREE(le32_to_cpu(part->bam_cache[j]))) { build_maps()
300 part->EUNInfo[i].Free++; build_maps()
301 part->FreeTotal++; build_maps()
302 } else if ((BLOCK_TYPE(le32_to_cpu(part->bam_cache[j])) == BLOCK_DATA) && build_maps()
303 (BLOCK_NUMBER(le32_to_cpu(part->bam_cache[j])) < blocks)) build_maps()
304 part->VirtualBlockMap[BLOCK_NUMBER(le32_to_cpu(part->bam_cache[j]))] = build_maps()
306 else if (BLOCK_DELETED(le32_to_cpu(part->bam_cache[j]))) build_maps()
307 part->EUNInfo[i].Deleted++; build_maps()
315 kfree(part->bam_cache); build_maps()
317 vfree(part->VirtualBlockMap); build_maps()
319 kfree(part->XferInfo); build_maps()
321 kfree(part->EUNInfo); build_maps()
333 static int erase_xfer(partition_t *part, erase_xfer() argument
340 xfer = &part->XferInfo[xfernum]; erase_xfer()
351 erase->mtd = part->mbd.mtd; erase_xfer()
354 erase->len = 1 << part->header.EraseUnitSize; erase_xfer()
355 erase->priv = (u_long)part; erase_xfer()
357 ret = mtd_erase(part->mbd.mtd, erase); erase_xfer()
376 partition_t *part; ftl_erase_callback() local
381 part = (partition_t *)(erase->priv); ftl_erase_callback()
383 for (i = 0; i < part->header.NumTransferUnits; i++) ftl_erase_callback()
384 if (part->XferInfo[i].Offset == erase->addr) break; ftl_erase_callback()
386 if (i == part->header.NumTransferUnits) { ftl_erase_callback()
392 xfer = &part->XferInfo[i]; ftl_erase_callback()
405 static int prepare_xfer(partition_t *part, int i) prepare_xfer() argument
414 xfer = &part->XferInfo[i]; prepare_xfer()
420 header = part->header; prepare_xfer()
424 ret = mtd_write(part->mbd.mtd, xfer->Offset, sizeof(header), &retlen, prepare_xfer()
432 nbam = (part->BlocksPerUnit * sizeof(uint32_t) + prepare_xfer()
433 le32_to_cpu(part->header.BAMOffset) + SECTOR_SIZE - 1) / SECTOR_SIZE; prepare_xfer()
435 offset = xfer->Offset + le32_to_cpu(part->header.BAMOffset); prepare_xfer()
440 ret = mtd_write(part->mbd.mtd, offset, sizeof(uint32_t), &retlen, prepare_xfer()
463 static int copy_erase_unit(partition_t *part, uint16_t srcunit, copy_erase_unit() argument
476 eun = &part->EUNInfo[srcunit]; copy_erase_unit()
477 xfer = &part->XferInfo[xferunit]; copy_erase_unit()
483 if (part->bam_index != srcunit) { copy_erase_unit()
485 offset = eun->Offset + le32_to_cpu(part->header.BAMOffset); copy_erase_unit()
487 ret = mtd_read(part->mbd.mtd, offset, copy_erase_unit()
488 part->BlocksPerUnit * sizeof(uint32_t), &retlen, copy_erase_unit()
489 (u_char *)(part->bam_cache)); copy_erase_unit()
492 part->bam_index = 0xffff; copy_erase_unit()
505 ret = mtd_write(part->mbd.mtd, offset, sizeof(uint16_t), &retlen, copy_erase_unit()
518 for (i = 0; i < part->BlocksPerUnit; i++) { copy_erase_unit()
519 switch (BLOCK_TYPE(le32_to_cpu(part->bam_cache[i]))) { copy_erase_unit()
525 ret = mtd_read(part->mbd.mtd, src, SECTOR_SIZE, &retlen, copy_erase_unit()
533 ret = mtd_write(part->mbd.mtd, dest, SECTOR_SIZE, &retlen, copy_erase_unit()
543 part->bam_cache[i] = cpu_to_le32(0xffffffff); copy_erase_unit()
552 ret = mtd_write(part->mbd.mtd, copy_erase_unit()
553 xfer->Offset + le32_to_cpu(part->header.BAMOffset), copy_erase_unit()
554 part->BlocksPerUnit * sizeof(int32_t), copy_erase_unit()
556 (u_char *)part->bam_cache); copy_erase_unit()
564 ret = mtd_write(part->mbd.mtd, xfer->Offset + 20, sizeof(uint16_t), copy_erase_unit()
580 part->FreeTotal -= eun->Free; copy_erase_unit()
581 part->FreeTotal += free; copy_erase_unit()
586 part->bam_index = srcunit; copy_erase_unit()
607 static int reclaim_block(partition_t *part) reclaim_block() argument
614 pr_debug("NumTransferUnits == %x\n", part->header.NumTransferUnits); reclaim_block()
619 for (i = 0; i < part->header.NumTransferUnits; i++) { reclaim_block()
621 if (part->XferInfo[i].state == XFER_UNKNOWN) { reclaim_block()
624 erase_xfer(part, i); reclaim_block()
626 if (part->XferInfo[i].state == XFER_ERASING) { reclaim_block()
631 else if (part->XferInfo[i].state == XFER_ERASED) { reclaim_block()
634 prepare_xfer(part, i); reclaim_block()
636 if (part->XferInfo[i].state == XFER_PREPARED) { reclaim_block()
639 if (part->XferInfo[i].EraseCount <= best) { reclaim_block()
640 best = part->XferInfo[i].EraseCount; reclaim_block()
645 pr_debug("XferInfo[%d].state == %x\n",i, part->XferInfo[i].state); reclaim_block()
652 mtd_sync(part->mbd.mtd); reclaim_block()
671 for (i = 0; i < part->DataUnits; i++) reclaim_block()
672 if (part->EUNInfo[i].EraseCount <= best) { reclaim_block()
673 best = part->EUNInfo[i].EraseCount; reclaim_block()
678 for (i = 0; i < part->DataUnits; i++) reclaim_block()
679 if (part->EUNInfo[i].Deleted >= best) { reclaim_block()
680 best = part->EUNInfo[i].Deleted; reclaim_block()
695 ret = copy_erase_unit(part, eun, xfer); reclaim_block()
697 erase_xfer(part, xfer); reclaim_block()
714 static void dump_lists(partition_t *part) dump_lists() argument
717 printk(KERN_DEBUG "ftl_cs: Free total = %d\n", part->FreeTotal); dump_lists()
718 for (i = 0; i < part->DataUnits; i++) dump_lists()
721 part->EUNInfo[i].Offset >> part->header.EraseUnitSize, dump_lists()
722 part->EUNInfo[i].Free, part->EUNInfo[i].Deleted); dump_lists()
726 static uint32_t find_free(partition_t *part) find_free() argument
734 stop = (part->bam_index == 0xffff) ? 0 : part->bam_index; find_free()
737 if (part->EUNInfo[eun].Free != 0) break; find_free()
739 if (++eun == part->DataUnits) eun = 0; find_free()
742 if (part->EUNInfo[eun].Free == 0) find_free()
746 if (eun != part->bam_index) { find_free()
748 part->bam_index = 0xffff; find_free()
750 ret = mtd_read(part->mbd.mtd, find_free()
751 part->EUNInfo[eun].Offset + le32_to_cpu(part->header.BAMOffset), find_free()
752 part->BlocksPerUnit * sizeof(uint32_t), find_free()
754 (u_char *)(part->bam_cache)); find_free()
760 part->bam_index = eun; find_free()
764 for (blk = 0; blk < part->BlocksPerUnit; blk++) find_free()
765 if (BLOCK_FREE(le32_to_cpu(part->bam_cache[blk]))) break; find_free()
766 if (blk == part->BlocksPerUnit) { find_free()
770 dump_lists(part); find_free()
787 static int ftl_read(partition_t *part, caddr_t buffer, ftl_read() argument
796 part, sector, nblocks); ftl_read()
797 if (!(part->state & FTL_FORMATTED)) { ftl_read()
801 bsize = 1 << part->header.EraseUnitSize; ftl_read()
804 if (((sector+i) * SECTOR_SIZE) >= le32_to_cpu(part->header.FormattedSize)) { ftl_read()
808 log_addr = part->VirtualBlockMap[sector+i]; ftl_read()
812 offset = (part->EUNInfo[log_addr / bsize].Offset ftl_read()
814 ret = mtd_read(part->mbd.mtd, offset, SECTOR_SIZE, &retlen, ftl_read()
833 static int set_bam_entry(partition_t *part, uint32_t log_addr, set_bam_entry() argument
845 part, log_addr, virt_addr); set_bam_entry()
846 bsize = 1 << part->header.EraseUnitSize; set_bam_entry()
849 offset = (part->EUNInfo[eun].Offset + blk * sizeof(uint32_t) + set_bam_entry()
850 le32_to_cpu(part->header.BAMOffset)); set_bam_entry()
853 ret = mtd_read(part->mbd.mtd, offset, sizeof(uint32_t), &retlen, set_bam_entry()
874 if (part->bam_index == eun) { set_bam_entry()
876 if (le32_to_cpu(part->bam_cache[blk]) != old_addr) { set_bam_entry()
883 le32_to_cpu(part->bam_cache[blk]), old_addr); set_bam_entry()
888 part->bam_cache[blk] = le_virt_addr; set_bam_entry()
890 ret = mtd_write(part->mbd.mtd, offset, sizeof(uint32_t), &retlen, set_bam_entry()
901 static int ftl_write(partition_t *part, caddr_t buffer, ftl_write() argument
910 part, sector, nblocks); ftl_write()
911 if (!(part->state & FTL_FORMATTED)) { ftl_write()
916 while (part->FreeTotal < nblocks) { ftl_write()
917 ret = reclaim_block(part); ftl_write()
922 bsize = 1 << part->header.EraseUnitSize; ftl_write()
926 if (virt_addr >= le32_to_cpu(part->header.FormattedSize)) { ftl_write()
932 blk = find_free(part); ftl_write()
942 log_addr = part->bam_index * bsize + blk * SECTOR_SIZE; ftl_write()
943 part->EUNInfo[part->bam_index].Free--; ftl_write()
944 part->FreeTotal--; ftl_write()
945 if (set_bam_entry(part, log_addr, 0xfffffffe)) ftl_write()
947 part->EUNInfo[part->bam_index].Deleted++; ftl_write()
948 offset = (part->EUNInfo[part->bam_index].Offset + ftl_write()
950 ret = mtd_write(part->mbd.mtd, offset, SECTOR_SIZE, &retlen, buffer); ftl_write()
961 old_addr = part->VirtualBlockMap[sector+i]; ftl_write()
963 part->VirtualBlockMap[sector+i] = 0xffffffff; ftl_write()
964 part->EUNInfo[old_addr/bsize].Deleted++; ftl_write()
965 if (set_bam_entry(part, old_addr, 0)) ftl_write()
970 if (set_bam_entry(part, log_addr, virt_addr)) ftl_write()
972 part->VirtualBlockMap[sector+i] = log_addr; ftl_write()
973 part->EUNInfo[part->bam_index].Deleted--; ftl_write()
983 partition_t *part = (void *)dev; ftl_getgeo() local
987 sect = le32_to_cpu(part->header.FormattedSize)/SECTOR_SIZE; ftl_getgeo()
1011 partition_t *part = (void *)dev; ftl_discardsect() local
1012 uint32_t bsize = 1 << part->header.EraseUnitSize; ftl_discardsect()
1018 uint32_t old_addr = part->VirtualBlockMap[sector]; ftl_discardsect()
1020 part->VirtualBlockMap[sector] = 0xffffffff; ftl_discardsect()
1021 part->EUNInfo[old_addr/bsize].Deleted++; ftl_discardsect()
1022 if (set_bam_entry(part, old_addr, 0)) ftl_discardsect()
1033 static void ftl_freepart(partition_t *part) ftl_freepart() argument
1035 vfree(part->VirtualBlockMap); ftl_freepart()
1036 part->VirtualBlockMap = NULL; ftl_freepart()
1037 kfree(part->EUNInfo); ftl_freepart()
1038 part->EUNInfo = NULL; ftl_freepart()
1039 kfree(part->XferInfo); ftl_freepart()
1040 part->XferInfo = NULL; ftl_freepart()
1041 kfree(part->bam_cache); ftl_freepart()
1042 part->bam_cache = NULL; ftl_freepart()
H A Dmtdpart.c64 struct mtd_part *part = PART(mtd); part_read() local
68 stats = part->master->ecc_stats; part_read()
69 res = part->master->_read(part->master, from + part->offset, len, part_read()
73 part->master->ecc_stats.failed - stats.failed; part_read()
76 part->master->ecc_stats.corrected - stats.corrected; part_read()
83 struct mtd_part *part = PART(mtd); part_point() local
85 return part->master->_point(part->master, from + part->offset, len, part_point()
91 struct mtd_part *part = PART(mtd); part_unpoint() local
93 return part->master->_unpoint(part->master, from + part->offset, len); part_unpoint()
101 struct mtd_part *part = PART(mtd); part_get_unmapped_area() local
103 offset += part->offset; part_get_unmapped_area()
104 return part->master->_get_unmapped_area(part->master, len, offset, part_get_unmapped_area()
111 struct mtd_part *part = PART(mtd); part_read_oob() local
136 res = part->master->_read_oob(part->master, from + part->offset, ops); part_read_oob()
149 struct mtd_part *part = PART(mtd); part_read_user_prot_reg() local
150 return part->master->_read_user_prot_reg(part->master, from, len, part_read_user_prot_reg()
157 struct mtd_part *part = PART(mtd); part_get_user_prot_info() local
158 return part->master->_get_user_prot_info(part->master, len, retlen, part_get_user_prot_info()
165 struct mtd_part *part = PART(mtd); part_read_fact_prot_reg() local
166 return part->master->_read_fact_prot_reg(part->master, from, len, part_read_fact_prot_reg()
173 struct mtd_part *part = PART(mtd); part_get_fact_prot_info() local
174 return part->master->_get_fact_prot_info(part->master, len, retlen, part_get_fact_prot_info()
181 struct mtd_part *part = PART(mtd); part_write() local
182 return part->master->_write(part->master, to + part->offset, len, part_write()
189 struct mtd_part *part = PART(mtd); part_panic_write() local
190 return part->master->_panic_write(part->master, to + part->offset, len, part_panic_write()
197 struct mtd_part *part = PART(mtd); part_write_oob() local
203 return part->master->_write_oob(part->master, to + part->offset, ops); part_write_oob()
209 struct mtd_part *part = PART(mtd); part_write_user_prot_reg() local
210 return part->master->_write_user_prot_reg(part->master, from, len, part_write_user_prot_reg()
217 struct mtd_part *part = PART(mtd); part_lock_user_prot_reg() local
218 return part->master->_lock_user_prot_reg(part->master, from, len); part_lock_user_prot_reg()
224 struct mtd_part *part = PART(mtd); part_writev() local
225 return part->master->_writev(part->master, vecs, count, part_writev()
226 to + part->offset, retlen); part_writev()
231 struct mtd_part *part = PART(mtd); part_erase() local
234 instr->addr += part->offset; part_erase()
235 ret = part->master->_erase(part->master, instr); part_erase()
238 instr->fail_addr -= part->offset; part_erase()
239 instr->addr -= part->offset; part_erase()
247 struct mtd_part *part = PART(instr->mtd); mtd_erase_callback() local
250 instr->fail_addr -= part->offset; mtd_erase_callback()
251 instr->addr -= part->offset; mtd_erase_callback()
260 struct mtd_part *part = PART(mtd); part_lock() local
261 return part->master->_lock(part->master, ofs + part->offset, len); part_lock()
266 struct mtd_part *part = PART(mtd); part_unlock() local
267 return part->master->_unlock(part->master, ofs + part->offset, len); part_unlock()
272 struct mtd_part *part = PART(mtd); part_is_locked() local
273 return part->master->_is_locked(part->master, ofs + part->offset, len); part_is_locked()
278 struct mtd_part *part = PART(mtd); part_sync() local
279 part->master->_sync(part->master); part_sync()
284 struct mtd_part *part = PART(mtd); part_suspend() local
285 return part->master->_suspend(part->master); part_suspend()
290 struct mtd_part *part = PART(mtd); part_resume() local
291 part->master->_resume(part->master); part_resume()
296 struct mtd_part *part = PART(mtd); part_block_isreserved() local
297 ofs += part->offset; part_block_isreserved()
298 return part->master->_block_isreserved(part->master, ofs); part_block_isreserved()
303 struct mtd_part *part = PART(mtd); part_block_isbad() local
304 ofs += part->offset; part_block_isbad()
305 return part->master->_block_isbad(part->master, ofs); part_block_isbad()
310 struct mtd_part *part = PART(mtd); part_block_markbad() local
313 ofs += part->offset; part_block_markbad()
314 res = part->master->_block_markbad(part->master, ofs); part_block_markbad()
353 const struct mtd_partition *part, int partno, allocate_partition()
361 name = kstrdup(part->name, GFP_KERNEL); allocate_partition()
372 slave->mtd.flags = master->flags & ~part->mask_flags; allocate_partition()
373 slave->mtd.size = part->size; allocate_partition()
447 slave->offset = part->offset; allocate_partition()
468 part->name, master->size - slave->offset, allocate_partition()
486 part->name); allocate_partition()
492 part->name, master->name, (unsigned long long)slave->mtd.size); allocate_partition()
500 /* Find the first erase regions which is part of this allocate_partition()
527 part->name); allocate_partition()
533 part->name); allocate_partition()
561 struct mtd_part *part = PART(mtd); mtd_partition_offset_show() local
562 return snprintf(buf, PAGE_SIZE, "%lld\n", part->offset); mtd_partition_offset_show()
584 struct mtd_partition part; mtd_add_partition() local
599 part.name = name; mtd_add_partition()
600 part.size = length; mtd_add_partition()
601 part.offset = offset; mtd_add_partition()
602 part.mask_flags = 0; mtd_add_partition()
603 part.ecclayout = NULL; mtd_add_partition()
605 new = allocate_partition(master, &part, -1, offset); mtd_add_partition()
780 struct mtd_part *part; mtd_is_partition() local
784 list_for_each_entry(part, &mtd_partitions, list) mtd_is_partition()
785 if (&part->mtd == mtd) { mtd_is_partition()
352 allocate_partition(struct mtd_info *master, const struct mtd_partition *part, int partno, uint64_t cur_offset) allocate_partition() argument
H A Dcmdlinepart.c29 * if specified or truncated size is 0 the part is skipped
31 * if omitted the part will immediately follow the previous part
32 * or 0 if the first part
314 struct cmdline_mtd_partition *part; parse_cmdline_partitions() local
328 for (part = partitions; part; part = part->next) { parse_cmdline_partitions()
329 if ((!mtd_id) || (!strcmp(part->mtd_id, mtd_id))) parse_cmdline_partitions()
333 if (!part) parse_cmdline_partitions()
336 for (i = 0, offset = 0; i < part->num_parts; i++) { parse_cmdline_partitions()
337 if (part->parts[i].offset == OFFSET_CONTINUOUS) parse_cmdline_partitions()
338 part->parts[i].offset = offset; parse_cmdline_partitions()
340 offset = part->parts[i].offset; parse_cmdline_partitions()
342 if (part->parts[i].size == SIZE_REMAINING) parse_cmdline_partitions()
343 part->parts[i].size = master->size - offset; parse_cmdline_partitions()
345 if (offset + part->parts[i].size > master->size) { parse_cmdline_partitions()
348 part->mtd_id); parse_cmdline_partitions()
349 part->parts[i].size = master->size - offset; parse_cmdline_partitions()
351 offset += part->parts[i].size; parse_cmdline_partitions()
353 if (part->parts[i].size == 0) { parse_cmdline_partitions()
356 part->mtd_id); parse_cmdline_partitions()
357 part->num_parts--; parse_cmdline_partitions()
358 memmove(&part->parts[i], &part->parts[i + 1], parse_cmdline_partitions()
359 sizeof(*part->parts) * (part->num_parts - i)); parse_cmdline_partitions()
364 *pparts = kmemdup(part->parts, sizeof(*part->parts) * part->num_parts, parse_cmdline_partitions()
369 return part->num_parts; parse_cmdline_partitions()
H A Dofpart.c120 } *part; parse_ofoldpart_partitions() local
130 part = of_get_property(dp, "partitions", &plen); parse_ofoldpart_partitions()
131 if (!part) parse_ofoldpart_partitions()
137 nr_parts = plen / sizeof(part[0]); parse_ofoldpart_partitions()
146 (*pparts)[i].offset = be32_to_cpu(part->offset); parse_ofoldpart_partitions()
147 (*pparts)[i].size = be32_to_cpu(part->len) & ~1; parse_ofoldpart_partitions()
149 if (be32_to_cpu(part->len) & 1) parse_ofoldpart_partitions()
162 part++; parse_ofoldpart_partitions()
/linux-4.1.27/block/partitions/
H A Dmac.c15 extern void note_bootable_part(dev_t dev, int part, int goodness);
40 struct mac_partition *part; mac_partition() local
56 part = (struct mac_partition *) (data + secsize%512); mac_partition()
57 if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) { mac_partition()
61 blocks_in_map = be32_to_cpu(part->map_count); mac_partition()
77 part = (struct mac_partition *) (data + pos%512); mac_partition()
78 if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) mac_partition()
81 be32_to_cpu(part->start_block) * (secsize/512), mac_partition()
82 be32_to_cpu(part->block_count) * (secsize/512)); mac_partition()
84 if (!strncasecmp(part->type, "Linux_RAID", 10)) mac_partition()
94 mac_fix_string(part->processor, 16); mac_partition()
95 mac_fix_string(part->name, 32); mac_partition()
96 mac_fix_string(part->type, 32); mac_partition()
98 if ((be32_to_cpu(part->status) & MAC_STATUS_BOOTABLE) mac_partition()
99 && strcasecmp(part->processor, "powerpc") == 0) mac_partition()
102 if (strcasecmp(part->type, "Apple_UNIX_SVR2") == 0 mac_partition()
103 || (strncasecmp(part->type, "Linux", 5) == 0 mac_partition()
104 && strcasecmp(part->type, "Linux_swap") != 0)) { mac_partition()
108 l = strlen(part->name); mac_partition()
109 if (strcmp(part->name, "/") == 0) mac_partition()
112 if (strncasecmp(part->name + i, "root", mac_partition()
118 if (strncasecmp(part->name, "swap", 4) == 0) mac_partition()
H A Datari.c51 if (!VALID_PARTITION(&rs->part[0], hd_size) && atari_partition()
52 !VALID_PARTITION(&rs->part[1], hd_size) && atari_partition()
53 !VALID_PARTITION(&rs->part[2], hd_size) && atari_partition()
54 !VALID_PARTITION(&rs->part[3], hd_size)) { atari_partition()
64 pi = &rs->part[0]; atari_partition()
66 for (slot = 1; pi < &rs->part[4] && slot < state->limit; slot++, pi++) { atari_partition()
95 if (!(xrs->part[0].flg & 1)) { atari_partition()
102 partsect + be32_to_cpu(xrs->part[0].st), atari_partition()
103 be32_to_cpu(xrs->part[0].siz)); atari_partition()
105 if (!(xrs->part[1].flg & 1)) { atari_partition()
110 if (memcmp( xrs->part[1].id, "XGM", 3 ) != 0) { atari_partition()
116 partsect = be32_to_cpu(xrs->part[1].st) + extensect; atari_partition()
H A Dacorn.c71 struct riscix_part part[8]; member in struct:riscix_record
92 int part; riscix_partition() local
97 for (part = 0; part < 8; part++) { riscix_partition()
98 if (rr->part[part].one && riscix_partition()
99 memcmp(rr->part[part].name, "All\0", 4)) { riscix_partition()
101 le32_to_cpu(rr->part[part].start), riscix_partition()
102 le32_to_cpu(rr->part[part].length)); riscix_partition()
104 strlcat(state->pp_buf, rr->part[part].name, PAGE_SIZE); riscix_partition()
H A Damiga.c34 int start_sect, nr_sects, blk, part, res = 0; amiga_partition() local
83 for (part = 1; blk>0 && part<=16; part++, put_dev_sector(sect)) { amiga_partition()
H A Datari.h30 struct partition_info part[4]; member in struct:rootsector
H A Dultrix.c18 s32 pt_magic; /* magic no. indicating part. info exits */ ultrix_partition()
/linux-4.1.27/drivers/net/ethernet/sfc/
H A Dmtd.c42 struct efx_mtd_partition *part = to_efx_mtd_partition(mtd); efx_mtd_sync() local
49 part->name, part->dev_type_name, rc); efx_mtd_sync()
52 static void efx_mtd_remove_partition(struct efx_mtd_partition *part) efx_mtd_remove_partition() argument
57 rc = mtd_device_unregister(&part->mtd); efx_mtd_remove_partition()
63 list_del(&part->node); efx_mtd_remove_partition()
69 struct efx_mtd_partition *part; efx_mtd_add() local
73 part = (struct efx_mtd_partition *)((char *)parts + efx_mtd_add()
76 part->mtd.writesize = 1; efx_mtd_add()
78 part->mtd.owner = THIS_MODULE; efx_mtd_add()
79 part->mtd.priv = efx; efx_mtd_add()
80 part->mtd.name = part->name; efx_mtd_add()
81 part->mtd._erase = efx_mtd_erase; efx_mtd_add()
82 part->mtd._read = efx->type->mtd_read; efx_mtd_add()
83 part->mtd._write = efx->type->mtd_write; efx_mtd_add()
84 part->mtd._sync = efx_mtd_sync; efx_mtd_add()
86 efx->type->mtd_rename(part); efx_mtd_add()
88 if (mtd_device_register(&part->mtd, NULL, 0)) efx_mtd_add()
92 list_add_tail(&part->node, &efx->mtd_list); efx_mtd_add()
99 part = (struct efx_mtd_partition *)((char *)parts + efx_mtd_add()
101 efx_mtd_remove_partition(part); efx_mtd_add()
109 struct efx_mtd_partition *parts, *part, *next; efx_mtd_remove() local
119 list_for_each_entry_safe(part, next, &efx->mtd_list, node) efx_mtd_remove()
120 efx_mtd_remove_partition(part); efx_mtd_remove()
127 struct efx_mtd_partition *part; efx_mtd_rename() local
131 list_for_each_entry(part, &efx->mtd_list, node) efx_mtd_rename()
132 efx->type->mtd_rename(part); efx_mtd_rename()
/linux-4.1.27/drivers/acpi/acpica/
H A Dutmath.c68 struct uint64_struct part; member in union:uint64_overlay
112 ACPI_DIV_64_BY_32(0, dividend_ovl.part.hi, divisor, acpi_ut_short_divide()
113 quotient.part.hi, remainder32); acpi_ut_short_divide()
114 ACPI_DIV_64_BY_32(remainder32, dividend_ovl.part.lo, divisor, acpi_ut_short_divide()
115 quotient.part.lo, remainder32); acpi_ut_short_divide()
169 if (divisor.part.hi == 0) { acpi_ut_divide()
174 remainder.part.hi = 0; acpi_ut_divide()
180 ACPI_DIV_64_BY_32(0, dividend.part.hi, divisor.part.lo, acpi_ut_divide()
181 quotient.part.hi, partial1); acpi_ut_divide()
182 ACPI_DIV_64_BY_32(partial1, dividend.part.lo, divisor.part.lo, acpi_ut_divide()
183 quotient.part.lo, remainder.part.lo); acpi_ut_divide()
191 quotient.part.hi = 0; acpi_ut_divide()
198 ACPI_SHIFT_RIGHT_64(normalized_divisor.part.hi, acpi_ut_divide()
199 normalized_divisor.part.lo); acpi_ut_divide()
200 ACPI_SHIFT_RIGHT_64(normalized_dividend.part.hi, acpi_ut_divide()
201 normalized_dividend.part.lo); acpi_ut_divide()
203 } while (normalized_divisor.part.hi != 0); acpi_ut_divide()
207 ACPI_DIV_64_BY_32(normalized_dividend.part.hi, acpi_ut_divide()
208 normalized_dividend.part.lo, acpi_ut_divide()
209 normalized_divisor.part.lo, acpi_ut_divide()
210 quotient.part.lo, partial1); acpi_ut_divide()
216 partial1 = quotient.part.lo * divisor.part.hi; acpi_ut_divide()
217 partial2.full = (u64) quotient.part.lo * divisor.part.lo; acpi_ut_divide()
218 partial3.full = (u64) partial2.part.hi + partial1; acpi_ut_divide()
220 remainder.part.hi = partial3.part.lo; acpi_ut_divide()
221 remainder.part.lo = partial2.part.lo; acpi_ut_divide()
223 if (partial3.part.hi == 0) { acpi_ut_divide()
224 if (partial3.part.lo >= dividend.part.hi) { acpi_ut_divide()
225 if (partial3.part.lo == dividend.part.hi) { acpi_ut_divide()
226 if (partial2.part.lo > dividend.part.lo) { acpi_ut_divide()
227 quotient.part.lo--; acpi_ut_divide()
231 quotient.part.lo--; acpi_ut_divide()
237 remainder.part.hi = (u32) - ((s32) remainder.part.hi); acpi_ut_divide()
238 remainder.part.lo = (u32) - ((s32) remainder.part.lo); acpi_ut_divide()
240 if (remainder.part.lo) { acpi_ut_divide()
241 remainder.part.hi--; acpi_ut_divide()
/linux-4.1.27/drivers/net/wireless/ti/wlcore/
H A Dio.c2 * This file is part of wl1271
71 struct wlcore_partition_set *part = &wl->curr_part; wlcore_translate_addr() local
83 if ((addr >= part->mem.start) && wlcore_translate_addr()
84 (addr < part->mem.start + part->mem.size)) wlcore_translate_addr()
85 return addr - part->mem.start; wlcore_translate_addr()
86 else if ((addr >= part->reg.start) && wlcore_translate_addr()
87 (addr < part->reg.start + part->reg.size)) wlcore_translate_addr()
88 return addr - part->reg.start + part->mem.size; wlcore_translate_addr()
89 else if ((addr >= part->mem2.start) && wlcore_translate_addr()
90 (addr < part->mem2.start + part->mem2.size)) wlcore_translate_addr()
91 return addr - part->mem2.start + part->mem.size + wlcore_translate_addr()
92 part->reg.size; wlcore_translate_addr()
93 else if ((addr >= part->mem3.start) && wlcore_translate_addr()
94 (addr < part->mem3.start + part->mem3.size)) wlcore_translate_addr()
95 return addr - part->mem3.start + part->mem.size + wlcore_translate_addr()
96 part->reg.size + part->mem2.size; wlcore_translate_addr()
H A Dvendor_cmd.h2 * This file is part of wlcore
H A Dsysfs.h2 * This file is part of wlcore
H A Dtestmode.h2 * This file is part of wl1271
/linux-4.1.27/arch/arm/mach-omap2/
H A Dprminst44xx.h23 extern u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx);
24 extern void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx);
25 extern u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part,
30 extern int omap4_prminst_is_hardreset_asserted(u8 shift, u8 part, s16 inst,
32 extern int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst,
34 int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part,
H A Dprminst44xx.c59 u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx) omap4_prminst_read_inst_reg() argument
61 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || omap4_prminst_read_inst_reg()
62 part == OMAP4430_INVALID_PRCM_PARTITION || omap4_prminst_read_inst_reg()
63 !_prm_bases[part]); omap4_prminst_read_inst_reg()
64 return readl_relaxed(_prm_bases[part] + inst + idx); omap4_prminst_read_inst_reg()
68 void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx) omap4_prminst_write_inst_reg() argument
70 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || omap4_prminst_write_inst_reg()
71 part == OMAP4430_INVALID_PRCM_PARTITION || omap4_prminst_write_inst_reg()
72 !_prm_bases[part]); omap4_prminst_write_inst_reg()
73 writel_relaxed(val, _prm_bases[part] + inst + idx); omap4_prminst_write_inst_reg()
77 u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst, omap4_prminst_rmw_inst_reg_bits() argument
82 v = omap4_prminst_read_inst_reg(part, inst, idx); omap4_prminst_rmw_inst_reg_bits()
85 omap4_prminst_write_inst_reg(v, part, inst, idx); omap4_prminst_rmw_inst_reg_bits()
100 int omap4_prminst_is_hardreset_asserted(u8 shift, u8 part, s16 inst, omap4_prminst_is_hardreset_asserted() argument
105 v = omap4_prminst_read_inst_reg(part, inst, rstctrl_offs); omap4_prminst_is_hardreset_asserted()
124 int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst, omap4_prminst_assert_hardreset() argument
129 omap4_prminst_rmw_inst_reg_bits(mask, mask, part, inst, rstctrl_offs); omap4_prminst_assert_hardreset()
139 * @part: PRM partition
153 int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst, omap4_prminst_deassert_hardreset() argument
161 if (omap4_prminst_is_hardreset_asserted(shift, part, inst, omap4_prminst_deassert_hardreset()
166 omap4_prminst_rmw_inst_reg_bits(0xffffffff, st_mask, part, inst, omap4_prminst_deassert_hardreset()
169 omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs); omap4_prminst_deassert_hardreset()
171 omap_test_timeout(omap4_prminst_is_hardreset_asserted(st_shift, part, omap4_prminst_deassert_hardreset()
H A Dcminst44xx.c48 * 0x2 idle: Module is in Idle mode (only OCP part). It is functional if
76 static u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx);
80 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
87 static u32 _clkctrl_idlest(u8 part, u16 inst, u16 clkctrl_offs) _clkctrl_idlest() argument
89 u32 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs); _clkctrl_idlest()
97 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
104 static bool _is_module_ready(u8 part, u16 inst, u16 clkctrl_offs) _is_module_ready() argument
108 v = _clkctrl_idlest(part, inst, clkctrl_offs); _is_module_ready()
115 static u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx) omap4_cminst_read_inst_reg() argument
117 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || omap4_cminst_read_inst_reg()
118 part == OMAP4430_INVALID_PRCM_PARTITION || omap4_cminst_read_inst_reg()
119 !_cm_bases[part]); omap4_cminst_read_inst_reg()
120 return readl_relaxed(_cm_bases[part] + inst + idx); omap4_cminst_read_inst_reg()
124 static void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx) omap4_cminst_write_inst_reg() argument
126 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || omap4_cminst_write_inst_reg()
127 part == OMAP4430_INVALID_PRCM_PARTITION || omap4_cminst_write_inst_reg()
128 !_cm_bases[part]); omap4_cminst_write_inst_reg()
129 writel_relaxed(val, _cm_bases[part] + inst + idx); omap4_cminst_write_inst_reg()
133 static u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, u16 inst, omap4_cminst_rmw_inst_reg_bits() argument
138 v = omap4_cminst_read_inst_reg(part, inst, idx); omap4_cminst_rmw_inst_reg_bits()
141 omap4_cminst_write_inst_reg(v, part, inst, idx); omap4_cminst_rmw_inst_reg_bits()
146 static u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, u16 inst, s16 idx) omap4_cminst_set_inst_reg_bits() argument
148 return omap4_cminst_rmw_inst_reg_bits(bits, bits, part, inst, idx); omap4_cminst_set_inst_reg_bits()
151 static u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, u16 inst, omap4_cminst_clear_inst_reg_bits() argument
154 return omap4_cminst_rmw_inst_reg_bits(bits, 0x0, part, inst, idx); omap4_cminst_clear_inst_reg_bits()
157 static u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, u32 mask) omap4_cminst_read_inst_reg_bits() argument
161 v = omap4_cminst_read_inst_reg(part, inst, idx); omap4_cminst_read_inst_reg_bits()
175 * @part: PRCM partition ID that the CM_CLKSTCTRL register exists in
182 static void _clktrctrl_write(u8 c, u8 part, u16 inst, u16 cdoffs) _clktrctrl_write() argument
186 v = omap4_cminst_read_inst_reg(part, inst, cdoffs + OMAP4_CM_CLKSTCTRL); _clktrctrl_write()
189 omap4_cminst_write_inst_reg(v, part, inst, cdoffs + OMAP4_CM_CLKSTCTRL); _clktrctrl_write()
194 * @part: PRCM partition ID that the CM_CLKSTCTRL register exists in
198 * Returns true if the clockdomain referred to by (@part, @inst, @cdoffs)
201 static bool omap4_cminst_is_clkdm_in_hwsup(u8 part, u16 inst, u16 cdoffs) omap4_cminst_is_clkdm_in_hwsup() argument
205 v = omap4_cminst_read_inst_reg(part, inst, cdoffs + OMAP4_CM_CLKSTCTRL); omap4_cminst_is_clkdm_in_hwsup()
214 * @part: PRCM partition ID that the clockdomain registers exist in
218 * Put a clockdomain referred to by (@part, @inst, @cdoffs) into
221 static void omap4_cminst_clkdm_enable_hwsup(u8 part, u16 inst, u16 cdoffs) omap4_cminst_clkdm_enable_hwsup() argument
223 _clktrctrl_write(OMAP34XX_CLKSTCTRL_ENABLE_AUTO, part, inst, cdoffs); omap4_cminst_clkdm_enable_hwsup()
228 * @part: PRCM partition ID that the clockdomain registers exist in
232 * Put a clockdomain referred to by (@part, @inst, @cdoffs) into
236 static void omap4_cminst_clkdm_disable_hwsup(u8 part, u16 inst, u16 cdoffs) omap4_cminst_clkdm_disable_hwsup() argument
238 _clktrctrl_write(OMAP34XX_CLKSTCTRL_DISABLE_AUTO, part, inst, cdoffs); omap4_cminst_clkdm_disable_hwsup()
243 * @part: PRCM partition ID that the clockdomain registers exist in
247 * Take a clockdomain referred to by (@part, @inst, @cdoffs) out of idle,
250 static void omap4_cminst_clkdm_force_wakeup(u8 part, u16 inst, u16 cdoffs) omap4_cminst_clkdm_force_wakeup() argument
252 _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_WAKEUP, part, inst, cdoffs); omap4_cminst_clkdm_force_wakeup()
259 static void omap4_cminst_clkdm_force_sleep(u8 part, u16 inst, u16 cdoffs) omap4_cminst_clkdm_force_sleep() argument
261 _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_SLEEP, part, inst, cdoffs); omap4_cminst_clkdm_force_sleep()
266 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
276 static int omap4_cminst_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, omap4_cminst_wait_module_ready() argument
284 omap_test_timeout(_is_module_ready(part, inst, clkctrl_offs), omap4_cminst_wait_module_ready()
293 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
302 static int omap4_cminst_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs, omap4_cminst_wait_module_idle() argument
310 omap_test_timeout((_clkctrl_idlest(part, inst, clkctrl_offs) == omap4_cminst_wait_module_idle()
320 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
326 static void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, omap4_cminst_module_enable() argument
331 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs); omap4_cminst_module_enable()
334 omap4_cminst_write_inst_reg(v, part, inst, clkctrl_offs); omap4_cminst_module_enable()
339 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
345 static void omap4_cminst_module_disable(u8 part, u16 inst, u16 clkctrl_offs) omap4_cminst_module_disable() argument
349 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs); omap4_cminst_module_disable()
351 omap4_cminst_write_inst_reg(v, part, inst, clkctrl_offs); omap4_cminst_module_disable()
H A Dcm.h55 int (*wait_module_ready)(u8 part, s16 prcm_mod, u16 idlest_reg,
57 int (*wait_module_idle)(u8 part, s16 prcm_mod, u16 idlest_reg,
59 void (*module_enable)(u8 mode, u8 part, u16 inst, u16 clkctrl_offs);
60 void (*module_disable)(u8 part, u16 inst, u16 clkctrl_offs);
65 int omap_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_reg,
67 int omap_cm_wait_module_idle(u8 part, s16 prcm_mod, u16 idlest_reg,
69 int omap_cm_module_enable(u8 mode, u8 part, u16 inst, u16 clkctrl_offs);
70 int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs);
H A Dprm.h143 bool (*was_any_context_lost_old)(u8 part, s16 inst, u16 idx);
144 void (*clear_context_loss_flags_old)(u8 part, s16 inst, u16 idx);
146 int (*assert_hardreset)(u8 shift, u8 part, s16 prm_mod, u16 offset);
147 int (*deassert_hardreset)(u8 shift, u8 st_shift, u8 part, s16 prm_mod,
149 int (*is_hardreset_asserted)(u8 shift, u8 part, s16 prm_mod,
160 int omap_prm_assert_hardreset(u8 shift, u8 part, s16 prm_mod, u16 offset);
161 int omap_prm_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 prm_mod,
163 int omap_prm_is_hardreset_asserted(u8 shift, u8 part, s16 prm_mod, u16 offset);
165 extern bool prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx);
166 extern void prm_clear_context_loss_flags_old(u8 part, s16 inst, u16 idx);
H A Dcm_common.c83 * @part: PRCM partition
94 int omap_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_reg, omap_cm_wait_module_ready() argument
103 return cm_ll_data->wait_module_ready(part, prcm_mod, idlest_reg, omap_cm_wait_module_ready()
109 * @part: PRCM partition
120 int omap_cm_wait_module_idle(u8 part, s16 prcm_mod, u16 idlest_reg, omap_cm_wait_module_idle() argument
129 return cm_ll_data->wait_module_idle(part, prcm_mod, idlest_reg, omap_cm_wait_module_idle()
136 * @part: PRCM partition
140 * Enables clocks for a module identified by (@part, @inst, @clkctrl_offs)
144 int omap_cm_module_enable(u8 mode, u8 part, u16 inst, u16 clkctrl_offs) omap_cm_module_enable() argument
152 cm_ll_data->module_enable(mode, part, inst, clkctrl_offs); omap_cm_module_enable()
158 * @part: PRCM partition
162 * Disables clocks for a module identified by (@part, @inst, @clkctrl_offs)
166 int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs) omap_cm_module_disable() argument
174 cm_ll_data->module_disable(part, inst, clkctrl_offs); omap_cm_module_disable()
H A Dcm33xx.c38 * 0x2 idle: Module is in Idle mode (only OCP part). It is functional if
208 * @part: PRCM partition, ignored for AM33xx
218 static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, am33xx_cm_wait_module_ready() argument
232 * @part: CM partition, ignored for AM33xx
241 static int am33xx_cm_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs, am33xx_cm_wait_module_idle() argument
259 * @part: CM partition, ignored for AM33xx
265 static void am33xx_cm_module_enable(u8 mode, u8 part, u16 inst, am33xx_cm_module_enable() argument
278 * @part: CM partition, ignored for AM33xx
284 static void am33xx_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs) am33xx_cm_module_disable() argument
H A Dprm_common.c398 * @part: PRM partition ID (e.g., OMAP4430_PRM_PARTITION)
403 * identified by (@part, @inst, @idx), which means that some context
408 bool prm_was_any_context_lost_old(u8 part, s16 inst, u16 idx) prm_was_any_context_lost_old() argument
413 ret = prm_ll_data->was_any_context_lost_old(part, inst, idx); prm_was_any_context_lost_old()
423 * @part: PRM partition ID (e.g., OMAP4430_PRM_PARTITION)
428 * (@part, @inst, @idx). No return value. XXX Deprecated; callers
432 void prm_clear_context_loss_flags_old(u8 part, s16 inst, u16 idx) prm_clear_context_loss_flags_old() argument
435 prm_ll_data->clear_context_loss_flags_old(part, inst, idx); prm_clear_context_loss_flags_old()
444 * @part: PRM partition
450 int omap_prm_assert_hardreset(u8 shift, u8 part, s16 prm_mod, u16 offset) omap_prm_assert_hardreset() argument
458 return prm_ll_data->assert_hardreset(shift, part, prm_mod, offset); omap_prm_assert_hardreset()
465 * @part: PRM partition
472 int omap_prm_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 prm_mod, omap_prm_deassert_hardreset() argument
481 return prm_ll_data->deassert_hardreset(shift, st_shift, part, prm_mod, omap_prm_deassert_hardreset()
488 * @part: PRM partition
494 int omap_prm_is_hardreset_asserted(u8 shift, u8 part, s16 prm_mod, u16 offset) omap_prm_is_hardreset_asserted() argument
502 return prm_ll_data->is_hardreset_asserted(shift, part, prm_mod, offset); omap_prm_is_hardreset_asserted()
H A Dprm2xxx_3xxx.c28 * @part: PRM partition, ignored for OMAP2
36 int omap2_prm_is_hardreset_asserted(u8 shift, u8 part, s16 prm_mod, u16 offset) omap2_prm_is_hardreset_asserted() argument
45 * @part: PRM partition, ignored for OMAP2
56 int omap2_prm_assert_hardreset(u8 shift, u8 part, s16 prm_mod, u16 offset) omap2_prm_assert_hardreset() argument
71 * @part: PRM partition, not used for OMAP2
85 int omap2_prm_deassert_hardreset(u8 rst_shift, u8 st_shift, u8 part, omap2_prm_deassert_hardreset() argument
H A Dprm33xx.c59 * @part: PRM partition, ignored for AM33xx
67 static int am33xx_prm_is_hardreset_asserted(u8 shift, u8 part, s16 inst, am33xx_prm_is_hardreset_asserted() argument
82 * @part: CM partition, ignored for AM33xx
93 static int am33xx_prm_assert_hardreset(u8 shift, u8 part, s16 inst, am33xx_prm_assert_hardreset() argument
108 * @part: PRM partition, not used for AM33xx
122 static int am33xx_prm_deassert_hardreset(u8 shift, u8 st_shift, u8 part, am33xx_prm_deassert_hardreset() argument
/linux-4.1.27/drivers/misc/sgi-xp/
H A Dxpc_main.c15 * partition This part detects the presence/absence of other
19 * channel This part manages the channels and sends/receives
67 .init_name = "", /* set to "part" at xpc_init() time */
177 struct xpc_partition *part = (struct xpc_partition *)data; xpc_timeout_partition_disengage() local
179 DBUG_ON(time_is_after_jiffies(part->disengage_timeout)); xpc_timeout_partition_disengage()
181 (void)xpc_partition_disengaged(part); xpc_timeout_partition_disengage()
183 DBUG_ON(part->disengage_timeout != 0); xpc_timeout_partition_disengage()
184 DBUG_ON(xpc_arch_ops.partition_engaged(XPC_PARTID(part))); xpc_timeout_partition_disengage()
227 struct xpc_partition *part; xpc_check_remote_hb() local
239 part = &xpc_partitions[partid]; xpc_check_remote_hb()
241 if (part->act_state == XPC_P_AS_INACTIVE || xpc_check_remote_hb()
242 part->act_state == XPC_P_AS_DEACTIVATING) { xpc_check_remote_hb()
246 ret = xpc_arch_ops.get_remote_heartbeat(part); xpc_check_remote_hb()
248 XPC_DEACTIVATE_PARTITION(part, ret); xpc_check_remote_hb()
347 xpc_channel_mgr(struct xpc_partition *part) xpc_channel_mgr() argument
349 while (part->act_state != XPC_P_AS_DEACTIVATING || xpc_channel_mgr()
350 atomic_read(&part->nchannels_active) > 0 || xpc_channel_mgr()
351 !xpc_partition_disengaged(part)) { xpc_channel_mgr()
353 xpc_process_sent_chctl_flags(part); xpc_channel_mgr()
368 atomic_dec(&part->channel_mgr_requests); xpc_channel_mgr()
369 (void)wait_event_interruptible(part->channel_mgr_wq, xpc_channel_mgr()
370 (atomic_read(&part->channel_mgr_requests) > 0 || xpc_channel_mgr()
371 part->chctl.all_flags != 0 || xpc_channel_mgr()
372 (part->act_state == XPC_P_AS_DEACTIVATING && xpc_channel_mgr()
373 atomic_read(&part->nchannels_active) == 0 && xpc_channel_mgr()
374 xpc_partition_disengaged(part)))); xpc_channel_mgr()
375 atomic_set(&part->channel_mgr_requests, 1); xpc_channel_mgr()
408 xpc_setup_ch_structures(struct xpc_partition *part) xpc_setup_ch_structures() argument
413 short partid = XPC_PARTID(part); xpc_setup_ch_structures()
419 DBUG_ON(part->channels != NULL); xpc_setup_ch_structures()
420 part->channels = kzalloc(sizeof(struct xpc_channel) * XPC_MAX_NCHANNELS, xpc_setup_ch_structures()
422 if (part->channels == NULL) { xpc_setup_ch_structures()
429 part->remote_openclose_args = xpc_setup_ch_structures()
431 GFP_KERNEL, &part-> xpc_setup_ch_structures()
433 if (part->remote_openclose_args == NULL) { xpc_setup_ch_structures()
439 part->chctl.all_flags = 0; xpc_setup_ch_structures()
440 spin_lock_init(&part->chctl_lock); xpc_setup_ch_structures()
442 atomic_set(&part->channel_mgr_requests, 1); xpc_setup_ch_structures()
443 init_waitqueue_head(&part->channel_mgr_wq); xpc_setup_ch_structures()
445 part->nchannels = XPC_MAX_NCHANNELS; xpc_setup_ch_structures()
447 atomic_set(&part->nchannels_active, 0); xpc_setup_ch_structures()
448 atomic_set(&part->nchannels_engaged, 0); xpc_setup_ch_structures()
450 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { xpc_setup_ch_structures()
451 ch = &part->channels[ch_number]; xpc_setup_ch_structures()
472 ret = xpc_arch_ops.setup_ch_structures(part); xpc_setup_ch_structures()
480 part->setup_state = XPC_P_SS_SETUP; xpc_setup_ch_structures()
486 kfree(part->remote_openclose_args_base); xpc_setup_ch_structures()
487 part->remote_openclose_args = NULL; xpc_setup_ch_structures()
489 kfree(part->channels); xpc_setup_ch_structures()
490 part->channels = NULL; xpc_setup_ch_structures()
499 xpc_teardown_ch_structures(struct xpc_partition *part) xpc_teardown_ch_structures() argument
501 DBUG_ON(atomic_read(&part->nchannels_engaged) != 0); xpc_teardown_ch_structures()
502 DBUG_ON(atomic_read(&part->nchannels_active) != 0); xpc_teardown_ch_structures()
509 DBUG_ON(part->setup_state != XPC_P_SS_SETUP); xpc_teardown_ch_structures()
510 part->setup_state = XPC_P_SS_WTEARDOWN; xpc_teardown_ch_structures()
512 wait_event(part->teardown_wq, (atomic_read(&part->references) == 0)); xpc_teardown_ch_structures()
516 xpc_arch_ops.teardown_ch_structures(part); xpc_teardown_ch_structures()
518 kfree(part->remote_openclose_args_base); xpc_teardown_ch_structures()
519 part->remote_openclose_args = NULL; xpc_teardown_ch_structures()
520 kfree(part->channels); xpc_teardown_ch_structures()
521 part->channels = NULL; xpc_teardown_ch_structures()
523 part->setup_state = XPC_P_SS_TORNDOWN; xpc_teardown_ch_structures()
541 struct xpc_partition *part = &xpc_partitions[partid]; xpc_activating() local
546 spin_lock_irqsave(&part->act_lock, irq_flags); xpc_activating()
548 if (part->act_state == XPC_P_AS_DEACTIVATING) { xpc_activating()
549 part->act_state = XPC_P_AS_INACTIVE; xpc_activating()
550 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_activating()
551 part->remote_rp_pa = 0; xpc_activating()
556 DBUG_ON(part->act_state != XPC_P_AS_ACTIVATION_REQ); xpc_activating()
557 part->act_state = XPC_P_AS_ACTIVATING; xpc_activating()
559 XPC_SET_REASON(part, 0, 0); xpc_activating()
560 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_activating()
566 if (xpc_setup_ch_structures(part) == xpSuccess) { xpc_activating()
567 (void)xpc_part_ref(part); /* this will always succeed */ xpc_activating()
569 if (xpc_arch_ops.make_first_contact(part) == xpSuccess) { xpc_activating()
570 xpc_mark_partition_active(part); xpc_activating()
571 xpc_channel_mgr(part); xpc_activating()
575 xpc_part_deref(part); xpc_activating()
576 xpc_teardown_ch_structures(part); xpc_activating()
580 xpc_mark_partition_inactive(part); xpc_activating()
582 if (part->reason == xpReactivating) { xpc_activating()
584 xpc_arch_ops.request_partition_reactivation(part); xpc_activating()
591 xpc_activate_partition(struct xpc_partition *part) xpc_activate_partition() argument
593 short partid = XPC_PARTID(part); xpc_activate_partition()
597 spin_lock_irqsave(&part->act_lock, irq_flags); xpc_activate_partition()
599 DBUG_ON(part->act_state != XPC_P_AS_INACTIVE); xpc_activate_partition()
601 part->act_state = XPC_P_AS_ACTIVATION_REQ; xpc_activate_partition()
602 XPC_SET_REASON(part, xpCloneKThread, __LINE__); xpc_activate_partition()
604 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_activate_partition()
609 spin_lock_irqsave(&part->act_lock, irq_flags); xpc_activate_partition()
610 part->act_state = XPC_P_AS_INACTIVE; xpc_activate_partition()
611 XPC_SET_REASON(part, xpCloneKThreadFailed, __LINE__); xpc_activate_partition()
612 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_activate_partition()
655 xpc_kthread_waitmsgs(struct xpc_partition *part, struct xpc_channel *ch) xpc_kthread_waitmsgs() argument
692 struct xpc_partition *part = &xpc_partitions[partid]; xpc_kthread_start() local
702 ch = &part->channels[ch_number]; xpc_kthread_start()
734 xpc_kthread_waitmsgs(part, ch); xpc_kthread_start()
753 atomic_dec_return(&part->nchannels_engaged) == 0) { xpc_kthread_start()
754 xpc_arch_ops.indicate_partition_disengaged(part); xpc_kthread_start()
762 xpc_part_deref(part); xpc_kthread_start()
784 struct xpc_partition *part = &xpc_partitions[ch->partid]; xpc_create_kthreads() local
808 atomic_inc_return(&part->nchannels_engaged) == 1) { xpc_create_kthreads()
809 xpc_arch_ops.indicate_partition_engaged(part); xpc_create_kthreads()
811 (void)xpc_part_ref(part); xpc_create_kthreads()
830 atomic_dec_return(&part->nchannels_engaged) == 0) { xpc_create_kthreads()
831 indicate_partition_disengaged(part); xpc_create_kthreads()
834 xpc_part_deref(part); xpc_create_kthreads()
858 struct xpc_partition *part; xpc_disconnect_wait() local
864 part = &xpc_partitions[partid]; xpc_disconnect_wait()
866 if (!xpc_part_ref(part)) xpc_disconnect_wait()
869 ch = &part->channels[ch_number]; xpc_disconnect_wait()
872 xpc_part_deref(part); xpc_disconnect_wait()
883 if (part->act_state != XPC_P_AS_DEACTIVATING) { xpc_disconnect_wait()
884 spin_lock(&part->chctl_lock); xpc_disconnect_wait()
885 part->chctl.flags[ch->number] |= xpc_disconnect_wait()
887 spin_unlock(&part->chctl_lock); xpc_disconnect_wait()
897 xpc_wakeup_channel_mgr(part); xpc_disconnect_wait()
899 xpc_part_deref(part); xpc_disconnect_wait()
907 struct xpc_partition *part; xpc_setup_partitions() local
925 part = &xpc_partitions[partid]; xpc_setup_partitions()
927 DBUG_ON((u64)part != L1_CACHE_ALIGN((u64)part)); xpc_setup_partitions()
929 part->activate_IRQ_rcvd = 0; xpc_setup_partitions()
930 spin_lock_init(&part->act_lock); xpc_setup_partitions()
931 part->act_state = XPC_P_AS_INACTIVE; xpc_setup_partitions()
932 XPC_SET_REASON(part, 0, 0); xpc_setup_partitions()
934 init_timer(&part->disengage_timer); xpc_setup_partitions()
935 part->disengage_timer.function = xpc_setup_partitions()
937 part->disengage_timer.data = (unsigned long)part; xpc_setup_partitions()
939 part->setup_state = XPC_P_SS_UNSET; xpc_setup_partitions()
940 init_waitqueue_head(&part->teardown_wq); xpc_setup_partitions()
941 atomic_set(&part->references, 0); xpc_setup_partitions()
959 struct xpc_partition *part; xpc_do_exit() local
991 part = &xpc_partitions[partid]; xpc_do_exit()
993 if (xpc_partition_disengaged(part) && xpc_do_exit()
994 part->act_state == XPC_P_AS_INACTIVE) { xpc_do_exit()
1000 XPC_DEACTIVATE_PARTITION(part, reason); xpc_do_exit()
1002 if (part->disengage_timeout > disengage_timeout) xpc_do_exit()
1003 disengage_timeout = part->disengage_timeout; xpc_do_exit()
1096 struct xpc_partition *part; xpc_die_deactivate() local
1111 part = &xpc_partitions[partid]; xpc_die_deactivate()
1114 part->act_state != XPC_P_AS_INACTIVE) { xpc_die_deactivate()
1115 xpc_arch_ops.request_partition_deactivation(part); xpc_die_deactivate()
1116 xpc_arch_ops.indicate_partition_disengaged(part); xpc_die_deactivate()
1236 dev_set_name(xpc_part, "part"); xpc_init()
H A Dxpc_partition.c12 * This is the part of XPC that detects the presence/absence of
270 xpc_partition_disengaged(struct xpc_partition *part) xpc_partition_disengaged() argument
272 short partid = XPC_PARTID(part); xpc_partition_disengaged()
276 if (part->disengage_timeout) { xpc_partition_disengaged()
278 if (time_is_after_jiffies(part->disengage_timeout)) { xpc_partition_disengaged()
294 part->disengage_timeout = 0; xpc_partition_disengaged()
298 del_singleshot_timer_sync(&part->disengage_timer); xpc_partition_disengaged()
300 DBUG_ON(part->act_state != XPC_P_AS_DEACTIVATING && xpc_partition_disengaged()
301 part->act_state != XPC_P_AS_INACTIVE); xpc_partition_disengaged()
302 if (part->act_state != XPC_P_AS_INACTIVE) xpc_partition_disengaged()
303 xpc_wakeup_channel_mgr(part); xpc_partition_disengaged()
305 xpc_arch_ops.cancel_partition_deactivation_request(part); xpc_partition_disengaged()
314 xpc_mark_partition_active(struct xpc_partition *part) xpc_mark_partition_active() argument
319 dev_dbg(xpc_part, "setting partition %d to ACTIVE\n", XPC_PARTID(part)); xpc_mark_partition_active()
321 spin_lock_irqsave(&part->act_lock, irq_flags); xpc_mark_partition_active()
322 if (part->act_state == XPC_P_AS_ACTIVATING) { xpc_mark_partition_active()
323 part->act_state = XPC_P_AS_ACTIVE; xpc_mark_partition_active()
326 DBUG_ON(part->reason == xpSuccess); xpc_mark_partition_active()
327 ret = part->reason; xpc_mark_partition_active()
329 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_mark_partition_active()
338 xpc_deactivate_partition(const int line, struct xpc_partition *part, xpc_deactivate_partition() argument
343 spin_lock_irqsave(&part->act_lock, irq_flags); xpc_deactivate_partition()
345 if (part->act_state == XPC_P_AS_INACTIVE) { xpc_deactivate_partition()
346 XPC_SET_REASON(part, reason, line); xpc_deactivate_partition()
347 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_deactivate_partition()
350 xpc_arch_ops.request_partition_reactivation(part); xpc_deactivate_partition()
354 if (part->act_state == XPC_P_AS_DEACTIVATING) { xpc_deactivate_partition()
355 if ((part->reason == xpUnloading && reason != xpUnloading) || xpc_deactivate_partition()
357 XPC_SET_REASON(part, reason, line); xpc_deactivate_partition()
359 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_deactivate_partition()
363 part->act_state = XPC_P_AS_DEACTIVATING; xpc_deactivate_partition()
364 XPC_SET_REASON(part, reason, line); xpc_deactivate_partition()
366 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_deactivate_partition()
369 xpc_arch_ops.request_partition_deactivation(part); xpc_deactivate_partition()
372 part->disengage_timeout = jiffies + (xpc_disengage_timelimit * HZ); xpc_deactivate_partition()
373 part->disengage_timer.expires = part->disengage_timeout; xpc_deactivate_partition()
374 add_timer(&part->disengage_timer); xpc_deactivate_partition()
377 XPC_PARTID(part), reason); xpc_deactivate_partition()
379 xpc_partition_going_down(part, reason); xpc_deactivate_partition()
386 xpc_mark_partition_inactive(struct xpc_partition *part) xpc_mark_partition_inactive() argument
391 XPC_PARTID(part)); xpc_mark_partition_inactive()
393 spin_lock_irqsave(&part->act_lock, irq_flags); xpc_mark_partition_inactive()
394 part->act_state = XPC_P_AS_INACTIVE; xpc_mark_partition_inactive()
395 spin_unlock_irqrestore(&part->act_lock, irq_flags); xpc_mark_partition_inactive()
396 part->remote_rp_pa = 0; xpc_mark_partition_inactive()
478 "part of the local partition; skipping " xpc_discovery()
491 dev_dbg(xpc_part, "Nasid %d is part of a " xpc_discovery()
528 struct xpc_partition *part; xpc_initiate_partid_to_nasids() local
531 part = &xpc_partitions[partid]; xpc_initiate_partid_to_nasids()
532 if (part->remote_rp_pa == 0) xpc_initiate_partid_to_nasids()
537 part_nasid_pa = (unsigned long)XPC_RP_PART_NASIDS(part->remote_rp_pa); xpc_initiate_partid_to_nasids()
H A Dxpc_uv.c373 struct xpc_partition *part; xpc_process_activate_IRQ_rcvd_uv() local
380 part = &xpc_partitions[partid]; xpc_process_activate_IRQ_rcvd_uv()
382 if (part->sn.uv.act_state_req == 0) xpc_process_activate_IRQ_rcvd_uv()
388 act_state_req = part->sn.uv.act_state_req; xpc_process_activate_IRQ_rcvd_uv()
389 part->sn.uv.act_state_req = 0; xpc_process_activate_IRQ_rcvd_uv()
393 if (part->act_state == XPC_P_AS_INACTIVE) xpc_process_activate_IRQ_rcvd_uv()
394 xpc_activate_partition(part); xpc_process_activate_IRQ_rcvd_uv()
395 else if (part->act_state == XPC_P_AS_DEACTIVATING) xpc_process_activate_IRQ_rcvd_uv()
396 XPC_DEACTIVATE_PARTITION(part, xpReactivating); xpc_process_activate_IRQ_rcvd_uv()
399 if (part->act_state == XPC_P_AS_INACTIVE) xpc_process_activate_IRQ_rcvd_uv()
400 xpc_activate_partition(part); xpc_process_activate_IRQ_rcvd_uv()
402 XPC_DEACTIVATE_PARTITION(part, xpReactivating); xpc_process_activate_IRQ_rcvd_uv()
405 XPC_DEACTIVATE_PARTITION(part, part->sn.uv.reason); xpc_process_activate_IRQ_rcvd_uv()
420 xpc_handle_activate_mq_msg_uv(struct xpc_partition *part, xpc_handle_activate_mq_msg_uv() argument
426 struct xpc_partition_uv *part_uv = &part->sn.uv; xpc_handle_activate_mq_msg_uv()
451 part->remote_rp_pa = msg->rp_gpa; /* !!! _pa is _gpa */ xpc_handle_activate_mq_msg_uv()
452 part->remote_rp_ts_jiffies = msg_hdr->rp_ts_jiffies; xpc_handle_activate_mq_msg_uv()
493 args = &part->remote_openclose_args[msg->ch_number]; xpc_handle_activate_mq_msg_uv()
496 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
497 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_CLOSEREQUEST; xpc_handle_activate_mq_msg_uv()
498 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
500 xpc_wakeup_channel_mgr(part); xpc_handle_activate_mq_msg_uv()
513 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
514 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_CLOSEREPLY; xpc_handle_activate_mq_msg_uv()
515 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
517 xpc_wakeup_channel_mgr(part); xpc_handle_activate_mq_msg_uv()
529 args = &part->remote_openclose_args[msg->ch_number]; xpc_handle_activate_mq_msg_uv()
533 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
534 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENREQUEST; xpc_handle_activate_mq_msg_uv()
535 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
537 xpc_wakeup_channel_mgr(part); xpc_handle_activate_mq_msg_uv()
548 args = &part->remote_openclose_args[msg->ch_number]; xpc_handle_activate_mq_msg_uv()
553 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
554 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENREPLY; xpc_handle_activate_mq_msg_uv()
555 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
557 xpc_wakeup_channel_mgr(part); xpc_handle_activate_mq_msg_uv()
568 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
569 part->chctl.flags[msg->ch_number] |= XPC_CHCTL_OPENCOMPLETE; xpc_handle_activate_mq_msg_uv()
570 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_handle_activate_mq_msg_uv()
572 xpc_wakeup_channel_mgr(part); xpc_handle_activate_mq_msg_uv()
588 "from partition=%d\n", msg_hdr->type, XPC_PARTID(part)); xpc_handle_activate_mq_msg_uv()
602 if (msg_hdr->rp_ts_jiffies != part->remote_rp_ts_jiffies && xpc_handle_activate_mq_msg_uv()
603 part->remote_rp_ts_jiffies != 0) { xpc_handle_activate_mq_msg_uv()
623 struct xpc_partition *part; xpc_handle_activate_IRQ_uv() local
638 part = &xpc_partitions[partid]; xpc_handle_activate_IRQ_uv()
640 part_referenced = xpc_part_ref(part); xpc_handle_activate_IRQ_uv()
641 xpc_handle_activate_mq_msg_uv(part, msg_hdr, xpc_handle_activate_IRQ_uv()
645 xpc_part_deref(part); xpc_handle_activate_IRQ_uv()
672 xpc_send_activate_IRQ_uv(struct xpc_partition *part, void *msg, size_t msg_size, xpc_send_activate_IRQ_uv() argument
676 struct xpc_partition_uv *part_uv = &part->sn.uv; xpc_send_activate_IRQ_uv()
685 msg_hdr->act_state = part->act_state; xpc_send_activate_IRQ_uv()
728 xpc_send_activate_IRQ_part_uv(struct xpc_partition *part, void *msg, xpc_send_activate_IRQ_part_uv() argument
733 ret = xpc_send_activate_IRQ_uv(part, msg, msg_size, msg_type); xpc_send_activate_IRQ_part_uv()
735 XPC_DEACTIVATE_PARTITION(part, ret); xpc_send_activate_IRQ_part_uv()
742 struct xpc_partition *part = &xpc_partitions[ch->partid]; xpc_send_activate_IRQ_ch_uv() local
745 ret = xpc_send_activate_IRQ_uv(part, msg, msg_size, msg_type); xpc_send_activate_IRQ_ch_uv()
750 XPC_DEACTIVATE_PARTITION(part, ret); xpc_send_activate_IRQ_ch_uv()
758 xpc_send_local_activate_IRQ_uv(struct xpc_partition *part, int act_state_req) xpc_send_local_activate_IRQ_uv() argument
761 struct xpc_partition_uv *part_uv = &part->sn.uv; xpc_send_local_activate_IRQ_uv()
871 xpc_get_remote_heartbeat_uv(struct xpc_partition *part) xpc_get_remote_heartbeat_uv() argument
873 struct xpc_partition_uv *part_uv = &part->sn.uv; xpc_get_remote_heartbeat_uv()
882 if (part_uv->cached_heartbeat.value == part->last_heartbeat && xpc_get_remote_heartbeat_uv()
887 part->last_heartbeat = part_uv->cached_heartbeat.value; xpc_get_remote_heartbeat_uv()
897 struct xpc_partition *part = &xpc_partitions[partid]; xpc_request_partition_activation_uv() local
900 part->remote_rp_pa = remote_rp_gpa; /* !!! _pa here is really _gpa */ xpc_request_partition_activation_uv()
901 part->remote_rp_ts_jiffies = remote_rp->ts_jiffies; xpc_request_partition_activation_uv()
902 part->sn.uv.heartbeat_gpa = remote_rp->sn.uv.heartbeat_gpa; xpc_request_partition_activation_uv()
903 part->sn.uv.activate_gru_mq_desc_gpa = xpc_request_partition_activation_uv()
910 if (part->sn.uv.remote_act_state == XPC_P_AS_INACTIVE) { xpc_request_partition_activation_uv()
915 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), xpc_request_partition_activation_uv()
919 if (part->act_state == XPC_P_AS_INACTIVE) xpc_request_partition_activation_uv()
920 xpc_send_local_activate_IRQ_uv(part, XPC_P_ASR_ACTIVATE_UV); xpc_request_partition_activation_uv()
924 xpc_request_partition_reactivation_uv(struct xpc_partition *part) xpc_request_partition_reactivation_uv() argument
926 xpc_send_local_activate_IRQ_uv(part, XPC_P_ASR_ACTIVATE_UV); xpc_request_partition_reactivation_uv()
930 xpc_request_partition_deactivation_uv(struct xpc_partition *part) xpc_request_partition_deactivation_uv() argument
938 if (part->sn.uv.remote_act_state != XPC_P_AS_DEACTIVATING && xpc_request_partition_deactivation_uv()
939 part->sn.uv.remote_act_state != XPC_P_AS_INACTIVE) { xpc_request_partition_deactivation_uv()
941 msg.reason = part->reason; xpc_request_partition_deactivation_uv()
942 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), xpc_request_partition_deactivation_uv()
948 xpc_cancel_partition_deactivation_request_uv(struct xpc_partition *part) xpc_cancel_partition_deactivation_request_uv() argument
1012 xpc_setup_ch_structures_uv(struct xpc_partition *part) xpc_setup_ch_structures_uv() argument
1017 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { xpc_setup_ch_structures_uv()
1018 ch_uv = &part->channels[ch_number].sn.uv; xpc_setup_ch_structures_uv()
1031 xpc_teardown_ch_structures_uv(struct xpc_partition *part) xpc_teardown_ch_structures_uv() argument
1038 xpc_make_first_contact_uv(struct xpc_partition *part) xpc_make_first_contact_uv() argument
1047 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), xpc_make_first_contact_uv()
1050 while (!((part->sn.uv.remote_act_state == XPC_P_AS_ACTIVATING) || xpc_make_first_contact_uv()
1051 (part->sn.uv.remote_act_state == XPC_P_AS_ACTIVE))) { xpc_make_first_contact_uv()
1054 "partition %d\n", XPC_PARTID(part)); xpc_make_first_contact_uv()
1059 if (part->act_state == XPC_P_AS_DEACTIVATING) xpc_make_first_contact_uv()
1060 return part->reason; xpc_make_first_contact_uv()
1067 xpc_get_chctl_all_flags_uv(struct xpc_partition *part) xpc_get_chctl_all_flags_uv() argument
1072 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_get_chctl_all_flags_uv()
1073 chctl = part->chctl; xpc_get_chctl_all_flags_uv()
1075 part->chctl.all_flags = 0; xpc_get_chctl_all_flags_uv()
1077 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_get_chctl_all_flags_uv()
1256 xpc_send_chctl_local_msgrequest_uv(struct xpc_partition *part, int ch_number) xpc_send_chctl_local_msgrequest_uv() argument
1260 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_send_chctl_local_msgrequest_uv()
1261 part->chctl.flags[ch_number] |= XPC_CHCTL_MSGREQUEST; xpc_send_chctl_local_msgrequest_uv()
1262 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_send_chctl_local_msgrequest_uv()
1264 xpc_wakeup_channel_mgr(part); xpc_send_chctl_local_msgrequest_uv()
1279 xpc_indicate_partition_engaged_uv(struct xpc_partition *part) xpc_indicate_partition_engaged_uv() argument
1283 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), xpc_indicate_partition_engaged_uv()
1288 xpc_indicate_partition_disengaged_uv(struct xpc_partition *part) xpc_indicate_partition_disengaged_uv() argument
1292 xpc_send_activate_IRQ_part_uv(part, &msg, sizeof(msg), xpc_indicate_partition_disengaged_uv()
1406 xpc_handle_notify_mq_msg_uv(struct xpc_partition *part, xpc_handle_notify_mq_msg_uv() argument
1409 struct xpc_partition_uv *part_uv = &part->sn.uv; xpc_handle_notify_mq_msg_uv()
1416 if (unlikely(ch_number >= part->nchannels)) { xpc_handle_notify_mq_msg_uv()
1419 ch_number, XPC_PARTID(part)); xpc_handle_notify_mq_msg_uv()
1433 ch = &part->channels[ch_number]; xpc_handle_notify_mq_msg_uv()
1469 xpc_send_chctl_local_msgrequest_uv(part, ch->number); xpc_handle_notify_mq_msg_uv()
1479 struct xpc_partition *part; xpc_handle_notify_IRQ_uv() local
1489 part = &xpc_partitions[partid]; xpc_handle_notify_IRQ_uv()
1491 if (xpc_part_ref(part)) { xpc_handle_notify_IRQ_uv()
1492 xpc_handle_notify_mq_msg_uv(part, msg); xpc_handle_notify_IRQ_uv()
1493 xpc_part_deref(part); xpc_handle_notify_IRQ_uv()
1510 xpc_process_msg_chctl_flags_uv(struct xpc_partition *part, int ch_number) xpc_process_msg_chctl_flags_uv() argument
1512 struct xpc_channel *ch = &part->channels[ch_number]; xpc_process_msg_chctl_flags_uv()
H A Dxpc_sn2.c268 xpc_check_for_sent_chctl_flags_sn2(struct xpc_partition *part) xpc_check_for_sent_chctl_flags_sn2() argument
273 chctl.all_flags = xpc_receive_IRQ_amo_sn2(part->sn.sn2. xpc_check_for_sent_chctl_flags_sn2()
278 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_check_for_sent_chctl_flags_sn2()
279 part->chctl.all_flags |= chctl.all_flags; xpc_check_for_sent_chctl_flags_sn2()
280 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_check_for_sent_chctl_flags_sn2()
283 "0x%llx\n", XPC_PARTID(part), chctl.all_flags); xpc_check_for_sent_chctl_flags_sn2()
285 xpc_wakeup_channel_mgr(part); xpc_check_for_sent_chctl_flags_sn2()
308 struct xpc_partition *part = &xpc_partitions[partid]; xpc_handle_notify_IRQ_sn2() local
312 if (xpc_part_ref(part)) { xpc_handle_notify_IRQ_sn2()
313 xpc_check_for_sent_chctl_flags_sn2(part); xpc_handle_notify_IRQ_sn2()
315 xpc_part_deref(part); xpc_handle_notify_IRQ_sn2()
326 xpc_check_for_dropped_notify_IRQ_sn2(struct xpc_partition *part) xpc_check_for_dropped_notify_IRQ_sn2() argument
328 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_check_for_dropped_notify_IRQ_sn2()
330 if (xpc_part_ref(part)) { xpc_check_for_dropped_notify_IRQ_sn2()
331 xpc_check_for_sent_chctl_flags_sn2(part); xpc_check_for_dropped_notify_IRQ_sn2()
336 xpc_part_deref(part); xpc_check_for_dropped_notify_IRQ_sn2()
348 struct xpc_partition *part = &xpc_partitions[ch->partid]; xpc_send_notify_IRQ_sn2() local
349 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_send_notify_IRQ_sn2()
353 if (likely(part->act_state != XPC_P_AS_DEACTIVATING)) { xpc_send_notify_IRQ_sn2()
365 XPC_DEACTIVATE_PARTITION(part, ret); xpc_send_notify_IRQ_sn2()
384 struct xpc_partition *part = &xpc_partitions[ch->partid]; xpc_send_local_notify_IRQ_sn2() local
388 FETCHOP_STORE_OP(TO_AMO((u64)&part->sn.sn2.local_chctl_amo_va-> xpc_send_local_notify_IRQ_sn2()
467 xpc_indicate_partition_engaged_sn2(struct xpc_partition *part) xpc_indicate_partition_engaged_sn2() argument
470 struct amo *amo = (struct amo *)__va(part->sn.sn2.remote_amos_page_pa + xpc_indicate_partition_engaged_sn2()
494 xpc_indicate_partition_disengaged_sn2(struct xpc_partition *part) xpc_indicate_partition_disengaged_sn2() argument
496 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_indicate_partition_disengaged_sn2()
768 xpc_get_remote_heartbeat_sn2(struct xpc_partition *part) xpc_get_remote_heartbeat_sn2() argument
777 part->sn.sn2.remote_vars_pa, xpc_get_remote_heartbeat_sn2()
783 "heartbeat_offline=%lld, HB_mask[0]=0x%lx\n", XPC_PARTID(part), xpc_get_remote_heartbeat_sn2()
784 remote_vars->heartbeat, part->last_heartbeat, xpc_get_remote_heartbeat_sn2()
788 if ((remote_vars->heartbeat == part->last_heartbeat && xpc_get_remote_heartbeat_sn2()
794 part->last_heartbeat = remote_vars->heartbeat; xpc_get_remote_heartbeat_sn2()
837 xpc_request_partition_reactivation_sn2(struct xpc_partition *part) xpc_request_partition_reactivation_sn2() argument
839 xpc_send_local_activate_IRQ_sn2(part->sn.sn2.activate_IRQ_nasid); xpc_request_partition_reactivation_sn2()
843 xpc_request_partition_deactivation_sn2(struct xpc_partition *part) xpc_request_partition_deactivation_sn2() argument
845 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_request_partition_deactivation_sn2()
880 xpc_cancel_partition_deactivation_request_sn2(struct xpc_partition *part) xpc_cancel_partition_deactivation_request_sn2() argument
883 struct amo *amo = (struct amo *)__va(part->sn.sn2.remote_amos_page_pa + xpc_cancel_partition_deactivation_request_sn2()
921 xpc_update_partition_info_sn2(struct xpc_partition *part, u8 remote_rp_version, xpc_update_partition_info_sn2() argument
927 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_update_partition_info_sn2()
929 part->remote_rp_version = remote_rp_version; xpc_update_partition_info_sn2()
931 part->remote_rp_version); xpc_update_partition_info_sn2()
933 part->remote_rp_ts_jiffies = *remote_rp_ts_jiffies; xpc_update_partition_info_sn2()
935 part->remote_rp_ts_jiffies); xpc_update_partition_info_sn2()
937 part->remote_rp_pa = remote_rp_pa; xpc_update_partition_info_sn2()
938 dev_dbg(xpc_part, " remote_rp_pa = 0x%016lx\n", part->remote_rp_pa); xpc_update_partition_info_sn2()
944 part->last_heartbeat = remote_vars->heartbeat - 1; xpc_update_partition_info_sn2()
946 part->last_heartbeat); xpc_update_partition_info_sn2()
995 struct xpc_partition *part; xpc_identify_activate_IRQ_req_sn2() local
1015 part = &xpc_partitions[partid]; xpc_identify_activate_IRQ_req_sn2()
1016 part_sn2 = &part->sn.sn2; xpc_identify_activate_IRQ_req_sn2()
1027 XPC_DEACTIVATE_PARTITION(part, ret); xpc_identify_activate_IRQ_req_sn2()
1031 part->activate_IRQ_rcvd++; xpc_identify_activate_IRQ_req_sn2()
1035 part->activate_IRQ_rcvd, xpc_identify_activate_IRQ_req_sn2()
1038 if (xpc_partition_disengaged(part) && xpc_identify_activate_IRQ_req_sn2()
1039 part->act_state == XPC_P_AS_INACTIVE) { xpc_identify_activate_IRQ_req_sn2()
1041 xpc_update_partition_info_sn2(part, remote_rp_version, xpc_identify_activate_IRQ_req_sn2()
1054 xpc_activate_partition(part); xpc_identify_activate_IRQ_req_sn2()
1058 DBUG_ON(part->remote_rp_version == 0); xpc_identify_activate_IRQ_req_sn2()
1061 if (remote_rp_ts_jiffies != part->remote_rp_ts_jiffies) { xpc_identify_activate_IRQ_req_sn2()
1068 xpc_update_partition_info_sn2(part, remote_rp_version, xpc_identify_activate_IRQ_req_sn2()
1075 if (part->disengage_timeout > 0 && !xpc_partition_disengaged(part)) { xpc_identify_activate_IRQ_req_sn2()
1081 XPC_DEACTIVATE_PARTITION(part, xpReactivating); xpc_identify_activate_IRQ_req_sn2()
1083 XPC_DEACTIVATE_PARTITION(part, xpOtherGoingDown); xpc_identify_activate_IRQ_req_sn2()
1168 xpc_setup_ch_structures_sn2(struct xpc_partition *part) xpc_setup_ch_structures_sn2() argument
1170 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_setup_ch_structures_sn2()
1177 short partid = XPC_PARTID(part); xpc_setup_ch_structures_sn2()
1238 timer->data = (unsigned long)part; xpc_setup_ch_structures_sn2()
1242 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { xpc_setup_ch_structures_sn2()
1243 ch_sn2 = &part->channels[ch_number].sn.sn2; xpc_setup_ch_structures_sn2()
1268 xpc_vars_part_sn2[partid].nchannels = part->nchannels; xpc_setup_ch_structures_sn2()
1290 xpc_teardown_ch_structures_sn2(struct xpc_partition *part) xpc_teardown_ch_structures_sn2() argument
1292 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_teardown_ch_structures_sn2()
1293 short partid = XPC_PARTID(part); xpc_teardown_ch_structures_sn2()
1324 xpc_pull_remote_cachelines_sn2(struct xpc_partition *part, void *dst, xpc_pull_remote_cachelines_sn2() argument
1333 if (part->act_state == XPC_P_AS_DEACTIVATING) xpc_pull_remote_cachelines_sn2()
1334 return part->reason; xpc_pull_remote_cachelines_sn2()
1339 " ret=%d\n", XPC_PARTID(part), ret); xpc_pull_remote_cachelines_sn2()
1349 xpc_pull_remote_vars_part_sn2(struct xpc_partition *part) xpc_pull_remote_vars_part_sn2() argument
1351 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_pull_remote_vars_part_sn2()
1358 short partid = XPC_PARTID(part); xpc_pull_remote_vars_part_sn2()
1376 ret = xpc_pull_remote_cachelines_sn2(part, pulled_entry_cacheline, xpc_pull_remote_vars_part_sn2()
1426 if (part->nchannels > pulled_entry->nchannels) xpc_pull_remote_vars_part_sn2()
1427 part->nchannels = pulled_entry->nchannels; xpc_pull_remote_vars_part_sn2()
1446 xpc_make_first_contact_sn2(struct xpc_partition *part) xpc_make_first_contact_sn2() argument
1448 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_make_first_contact_sn2()
1464 "xp_addr region\n", XPC_PARTID(part)); xpc_make_first_contact_sn2()
1467 XPC_DEACTIVATE_PARTITION(part, ret); xpc_make_first_contact_sn2()
1480 while ((ret = xpc_pull_remote_vars_part_sn2(part)) != xpSuccess) { xpc_make_first_contact_sn2()
1482 XPC_DEACTIVATE_PARTITION(part, ret); xpc_make_first_contact_sn2()
1487 "partition %d\n", XPC_PARTID(part)); xpc_make_first_contact_sn2()
1492 if (part->act_state == XPC_P_AS_DEACTIVATING) xpc_make_first_contact_sn2()
1493 return part->reason; xpc_make_first_contact_sn2()
1503 xpc_get_chctl_all_flags_sn2(struct xpc_partition *part) xpc_get_chctl_all_flags_sn2() argument
1505 struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; xpc_get_chctl_all_flags_sn2()
1514 spin_lock_irqsave(&part->chctl_lock, irq_flags); xpc_get_chctl_all_flags_sn2()
1515 chctl = part->chctl; xpc_get_chctl_all_flags_sn2()
1517 part->chctl.all_flags = 0; xpc_get_chctl_all_flags_sn2()
1519 spin_unlock_irqrestore(&part->chctl_lock, irq_flags); xpc_get_chctl_all_flags_sn2()
1522 ret = xpc_pull_remote_cachelines_sn2(part, part-> xpc_get_chctl_all_flags_sn2()
1528 XPC_DEACTIVATE_PARTITION(part, ret); xpc_get_chctl_all_flags_sn2()
1531 "partition %d, ret=%d\n", XPC_PARTID(part), xpc_get_chctl_all_flags_sn2()
1540 ret = xpc_pull_remote_cachelines_sn2(part, part_sn2->remote_GPs, xpc_get_chctl_all_flags_sn2()
1544 XPC_DEACTIVATE_PARTITION(part, ret); xpc_get_chctl_all_flags_sn2()
1547 "%d, ret=%d\n", XPC_PARTID(part), ret); xpc_get_chctl_all_flags_sn2()
1808 xpc_process_msg_chctl_flags_sn2(struct xpc_partition *part, int ch_number) xpc_process_msg_chctl_flags_sn2() argument
1810 struct xpc_channel *ch = &part->channels[ch_number]; xpc_process_msg_chctl_flags_sn2()
1814 ch_sn2->remote_GP = part->sn.sn2.remote_GPs[ch_number]; xpc_process_msg_chctl_flags_sn2()
1912 struct xpc_partition *part = &xpc_partitions[ch->partid]; xpc_pull_remote_msg_sn2() local
1944 ret = xpc_pull_remote_cachelines_sn2(part, msg, remote_msg_pa, xpc_pull_remote_msg_sn2()
1953 XPC_DEACTIVATE_PARTITION(part, ret); xpc_pull_remote_msg_sn2()
H A Dxpc_channel.c12 * This is the part of XPC that manages the channels and
82 struct xpc_partition *part = &xpc_partitions[ch->partid]; xpc_process_disconnect() local
101 if (part->act_state == XPC_P_AS_DEACTIVATING) { xpc_process_disconnect()
157 atomic_dec(&part->nchannels_active); xpc_process_disconnect()
168 if (part->act_state != XPC_P_AS_DEACTIVATING) { xpc_process_disconnect()
170 spin_lock(&part->chctl_lock); xpc_process_disconnect()
171 part->chctl.flags[ch->number] |= xpc_process_disconnect()
173 spin_unlock(&part->chctl_lock); xpc_process_disconnect()
183 xpc_process_openclose_chctl_flags(struct xpc_partition *part, int ch_number, xpc_process_openclose_chctl_flags() argument
188 &part->remote_openclose_args[ch_number]; xpc_process_openclose_chctl_flags()
189 struct xpc_channel *ch = &part->channels[ch_number]; xpc_process_openclose_chctl_flags()
238 if (part->chctl.flags[ch_number] & xpc_process_openclose_chctl_flags()
242 spin_lock(&part->chctl_lock); xpc_process_openclose_chctl_flags()
243 part->chctl.flags[ch_number] |= xpc_process_openclose_chctl_flags()
245 spin_unlock(&part->chctl_lock); xpc_process_openclose_chctl_flags()
253 atomic_inc(&part->nchannels_active); xpc_process_openclose_chctl_flags()
289 DBUG_ON(part->act_state != XPC_P_AS_DEACTIVATING); xpc_process_openclose_chctl_flags()
296 if (part->chctl.flags[ch_number] & xpc_process_openclose_chctl_flags()
300 spin_lock(&part->chctl_lock); xpc_process_openclose_chctl_flags()
301 part->chctl.flags[ch_number] |= xpc_process_openclose_chctl_flags()
303 spin_unlock(&part->chctl_lock); xpc_process_openclose_chctl_flags()
323 if (part->act_state == XPC_P_AS_DEACTIVATING || xpc_process_openclose_chctl_flags()
362 atomic_inc(&part->nchannels_active); xpc_process_openclose_chctl_flags()
511 * done with the part that required the registration xpc_connect_channel()
546 xpc_process_sent_chctl_flags(struct xpc_partition *part) xpc_process_sent_chctl_flags() argument
554 chctl.all_flags = xpc_arch_ops.get_chctl_all_flags(part); xpc_process_sent_chctl_flags()
563 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { xpc_process_sent_chctl_flags()
564 ch = &part->channels[ch_number]; xpc_process_sent_chctl_flags()
572 xpc_process_openclose_chctl_flags(part, ch_number, xpc_process_sent_chctl_flags()
585 if (part->act_state == XPC_P_AS_DEACTIVATING) xpc_process_sent_chctl_flags()
603 xpc_arch_ops.process_msg_chctl_flags(part, ch_number); xpc_process_sent_chctl_flags()
617 xpc_partition_going_down(struct xpc_partition *part, enum xp_retval reason) xpc_partition_going_down() argument
624 XPC_PARTID(part), reason); xpc_partition_going_down()
626 if (!xpc_part_ref(part)) { xpc_partition_going_down()
633 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { xpc_partition_going_down()
634 ch = &part->channels[ch_number]; xpc_partition_going_down()
645 xpc_wakeup_channel_mgr(part); xpc_partition_going_down()
647 xpc_part_deref(part); xpc_partition_going_down()
658 struct xpc_partition *part; xpc_initiate_connect() local
664 part = &xpc_partitions[partid]; xpc_initiate_connect()
666 if (xpc_part_ref(part)) { xpc_initiate_connect()
667 ch = &part->channels[ch_number]; xpc_initiate_connect()
673 xpc_wakeup_channel_mgr(part); xpc_initiate_connect()
674 xpc_part_deref(part); xpc_initiate_connect()
714 struct xpc_partition *part; xpc_initiate_disconnect() local
721 part = &xpc_partitions[partid]; xpc_initiate_disconnect()
723 if (xpc_part_ref(part)) { xpc_initiate_disconnect()
724 ch = &part->channels[ch_number]; xpc_initiate_disconnect()
739 xpc_part_deref(part); xpc_initiate_disconnect()
878 struct xpc_partition *part = &xpc_partitions[partid]; xpc_initiate_send() local
885 DBUG_ON(ch_number < 0 || ch_number >= part->nchannels); xpc_initiate_send()
888 if (xpc_part_ref(part)) { xpc_initiate_send()
889 ret = xpc_arch_ops.send_payload(&part->channels[ch_number], xpc_initiate_send()
891 xpc_part_deref(part); xpc_initiate_send()
929 struct xpc_partition *part = &xpc_partitions[partid]; xpc_initiate_send_notify() local
936 DBUG_ON(ch_number < 0 || ch_number >= part->nchannels); xpc_initiate_send_notify()
940 if (xpc_part_ref(part)) { xpc_initiate_send_notify()
941 ret = xpc_arch_ops.send_payload(&part->channels[ch_number], xpc_initiate_send_notify()
943 xpc_part_deref(part); xpc_initiate_send_notify()
1003 struct xpc_partition *part = &xpc_partitions[partid]; xpc_initiate_received() local
1007 DBUG_ON(ch_number < 0 || ch_number >= part->nchannels); xpc_initiate_received()
1009 ch = &part->channels[ch_number]; xpc_initiate_received()
/linux-4.1.27/include/linux/
H A Dgenhd.h22 #define part_to_dev(part) (&((part)->__dev))
160 struct hd_struct __rcu *part[]; member in struct:disk_part_tbl
205 static inline struct gendisk *part_to_disk(struct hd_struct *part) part_to_disk() argument
207 if (likely(part)) { part_to_disk()
208 if (part->partno) part_to_disk()
209 return dev_to_disk(part_to_dev(part)->parent); part_to_disk()
211 return dev_to_disk(part_to_dev(part)); part_to_disk()
258 static inline dev_t part_devt(struct hd_struct *part) part_devt() argument
260 return part_to_dev(part)->devt; part_devt()
265 static inline void disk_put_part(struct hd_struct *part) disk_put_part() argument
267 if (likely(part)) disk_put_part()
268 put_device(part_to_dev(part)); disk_put_part()
281 struct hd_struct *part; member in struct:disk_part_iter
297 * {disk|part|all}_stat_{add|sub|inc|dec}() modify the stat counters
310 #define __part_stat_add(cpu, part, field, addnd) \
311 (per_cpu_ptr((part)->dkstats, (cpu))->field += (addnd))
313 #define part_stat_read(part, field) \
315 typeof((part)->dkstats->field) res = 0; \
318 res += per_cpu_ptr((part)->dkstats, _cpu)->field; \
322 static inline void part_stat_set_all(struct hd_struct *part, int value) part_stat_set_all() argument
327 memset(per_cpu_ptr(part->dkstats, i), value, part_stat_set_all()
331 static inline int init_part_stats(struct hd_struct *part) init_part_stats() argument
333 part->dkstats = alloc_percpu(struct disk_stats); init_part_stats()
334 if (!part->dkstats) init_part_stats()
339 static inline void free_part_stats(struct hd_struct *part) free_part_stats() argument
341 free_percpu(part->dkstats); free_part_stats()
348 #define __part_stat_add(cpu, part, field, addnd) \
349 ((part)->dkstats.field += addnd)
351 #define part_stat_read(part, field) ((part)->dkstats.field)
353 static inline void part_stat_set_all(struct hd_struct *part, int value) part_stat_set_all() argument
355 memset(&part->dkstats, value, sizeof(struct disk_stats)); part_stat_set_all()
358 static inline int init_part_stats(struct hd_struct *part) init_part_stats() argument
363 static inline void free_part_stats(struct hd_struct *part) free_part_stats() argument
369 #define part_stat_add(cpu, part, field, addnd) do { \
370 __part_stat_add((cpu), (part), field, addnd); \
371 if ((part)->partno) \
372 __part_stat_add((cpu), &part_to_disk((part))->part0, \
383 static inline void part_inc_in_flight(struct hd_struct *part, int rw) part_inc_in_flight() argument
385 atomic_inc(&part->in_flight[rw]); part_inc_in_flight()
386 if (part->partno) part_inc_in_flight()
387 atomic_inc(&part_to_disk(part)->part0.in_flight[rw]); part_inc_in_flight()
390 static inline void part_dec_in_flight(struct hd_struct *part, int rw) part_dec_in_flight() argument
392 atomic_dec(&part->in_flight[rw]); part_dec_in_flight()
393 if (part->partno) part_dec_in_flight()
394 atomic_dec(&part_to_disk(part)->part0.in_flight[rw]); part_dec_in_flight()
397 static inline int part_in_flight(struct hd_struct *part) part_in_flight() argument
399 return atomic_read(&part->in_flight[0]) + atomic_read(&part->in_flight[1]); part_in_flight()
410 static inline void free_part_info(struct hd_struct *part) free_part_info() argument
412 kfree(part->info); free_part_info()
416 extern void part_round_stats(int cpu, struct hd_struct *part);
601 extern int blk_alloc_devt(struct hd_struct *part, dev_t *devt);
643 static inline void hd_ref_init(struct hd_struct *part) hd_ref_init() argument
645 atomic_set(&part->ref, 1); hd_ref_init()
649 static inline void hd_struct_get(struct hd_struct *part) hd_struct_get() argument
651 atomic_inc(&part->ref); hd_struct_get()
655 static inline int hd_struct_try_get(struct hd_struct *part) hd_struct_try_get() argument
657 return atomic_inc_not_zero(&part->ref); hd_struct_try_get()
660 static inline void hd_struct_put(struct hd_struct *part) hd_struct_put() argument
662 if (atomic_dec_and_test(&part->ref)) hd_struct_put()
663 __delete_partition(part); hd_struct_put()
667 * Any access of part->nr_sects which is not protected by partition
675 static inline sector_t part_nr_sects_read(struct hd_struct *part) part_nr_sects_read() argument
681 seq = read_seqcount_begin(&part->nr_sects_seq); part_nr_sects_read()
682 nr_sects = part->nr_sects; part_nr_sects_read()
683 } while (read_seqcount_retry(&part->nr_sects_seq, seq)); part_nr_sects_read()
689 nr_sects = part->nr_sects; part_nr_sects_read()
693 return part->nr_sects; part_nr_sects_read()
702 static inline void part_nr_sects_write(struct hd_struct *part, sector_t size) part_nr_sects_write() argument
705 write_seqcount_begin(&part->nr_sects_seq); part_nr_sects_write()
706 part->nr_sects = size; part_nr_sects_write()
707 write_seqcount_end(&part->nr_sects_seq); part_nr_sects_write()
710 part->nr_sects = size; part_nr_sects_write()
713 part->nr_sects = size; part_nr_sects_write()
H A Dcordic.h24 * @i: real part of coordinate (in phase).
25 * @q: imaginary part of coordinate (quadrature).
40 * imaginary (q) part. The real part is essentially the cosine of the
41 * angle and the imaginary part is the sine of the angle. The returned
H A Dauto_fs.h7 * This file is part of the Linux kernel and is made available under
H A Dhwmon.h2 hwmon.h - part of lm_sensors, Linux kernel modules for hardware monitoring
H A Dpstore.h64 unsigned int part, int count, bool compressed,
68 unsigned int part, const char *buf, bool compressed,
/linux-4.1.27/arch/powerpc/kernel/
H A Dnvram_64.c13 * TODO: Split the /dev/nvram part (that one can use
191 int nvram_write_os_partition(struct nvram_os_partition *part, nvram_write_os_partition() argument
200 if (part->index == -1) nvram_write_os_partition()
203 if (length > part->size) nvram_write_os_partition()
204 length = part->size; nvram_write_os_partition()
209 tmp_index = part->index; nvram_write_os_partition()
231 int nvram_read_partition(struct nvram_os_partition *part, char *buff, nvram_read_partition() argument
239 if (part->index == -1) nvram_read_partition()
242 if (length > part->size) nvram_read_partition()
243 length = part->size; nvram_read_partition()
245 tmp_index = part->index; nvram_read_partition()
247 if (part->os_partition) { nvram_read_partition()
263 if (part->os_partition) { nvram_read_partition()
288 int __init nvram_init_os_partition(struct nvram_os_partition *part) nvram_init_os_partition() argument
294 p = nvram_find_partition(part->name, NVRAM_SIG_OS, &size); nvram_init_os_partition()
297 if (p && size < part->min_size) { nvram_init_os_partition()
299 " removing it...\n", part->name); nvram_init_os_partition()
300 nvram_remove_partition(part->name, NVRAM_SIG_OS, NULL); nvram_init_os_partition()
306 p = nvram_create_partition(part->name, NVRAM_SIG_OS, nvram_init_os_partition()
307 part->req_size, part->min_size); nvram_init_os_partition()
311 part->name); nvram_init_os_partition()
314 p = nvram_create_partition(part->name, NVRAM_SIG_OS, nvram_init_os_partition()
315 part->req_size, part->min_size); nvram_init_os_partition()
321 " partition, err %d\n", part->name, (int)p); nvram_init_os_partition()
325 part->index = p; nvram_init_os_partition()
326 part->size = nvram_get_partition_size(p) - sizeof(struct err_log_info); nvram_init_os_partition()
396 * @part: pstore writes data to registered buffer in parts,
397 * part number will indicate the same.
409 u64 *id, unsigned int part, int count, nvram_pstore_write()
417 /* part 1 has the recent messages from printk buffer */ nvram_pstore_write()
418 if (part > 1 || (type != PSTORE_TYPE_DMESG)) nvram_pstore_write()
437 *id = part; nvram_pstore_write()
452 struct nvram_os_partition *part = NULL; nvram_pstore_read() local
461 part = &oops_log_partition; nvram_pstore_read()
466 part = &common_partition; nvram_pstore_read()
474 part = &rtas_log_partition; nvram_pstore_read()
481 part = &of_config_partition; nvram_pstore_read()
491 part = &skiboot_partition; nvram_pstore_read()
502 if (!part->os_partition) { nvram_pstore_read()
503 p = nvram_find_partition(part->name, sig, &size); nvram_pstore_read()
506 "err %d\n", part->name, (int)p); nvram_pstore_read()
509 part->index = p; nvram_pstore_read()
510 part->size = size; nvram_pstore_read()
513 buff = kmalloc(part->size, GFP_KERNEL); nvram_pstore_read()
518 if (nvram_read_partition(part, buff, part->size, &err_type, &id_no)) { nvram_pstore_read()
525 if (part->os_partition) nvram_pstore_read()
558 return part->size; nvram_pstore_read()
846 int part, offset; dev_nvram_ioctl() local
850 if (copy_from_user(&part, (void __user*)arg, sizeof(part)) != 0) dev_nvram_ioctl()
852 if (part < pmac_nvram_OF || part > pmac_nvram_NR) dev_nvram_ioctl()
854 offset = pmac_get_partition(part); dev_nvram_ioctl()
899 static int __init nvram_write_header(struct nvram_partition * part) nvram_write_header() argument
905 memcpy(&phead, &part->header, NVRAM_HEADER_LEN); nvram_write_header()
908 tmp_index = part->index; nvram_write_header()
933 static int nvram_can_remove_partition(struct nvram_partition *part, nvram_can_remove_partition() argument
936 if (part->header.signature != sig) nvram_can_remove_partition()
939 if (strncmp(name, part->header.name, 12)) nvram_can_remove_partition()
944 if (!strncmp(*except, part->header.name, 12)) nvram_can_remove_partition()
963 struct nvram_partition *part, *prev, *tmp; nvram_remove_partition() local
966 list_for_each_entry(part, &nvram_partitions, partition) { nvram_remove_partition()
967 if (!nvram_can_remove_partition(part, name, sig, exceptions)) nvram_remove_partition()
971 part->header.signature = NVRAM_SIG_FREE; nvram_remove_partition()
972 strncpy(part->header.name, "wwwwwwwwwwww", 12); nvram_remove_partition()
973 part->header.checksum = nvram_checksum(&part->header); nvram_remove_partition()
974 rc = nvram_write_header(part); nvram_remove_partition()
983 list_for_each_entry_safe(part, tmp, &nvram_partitions, partition) { nvram_remove_partition()
984 if (part->header.signature != NVRAM_SIG_FREE) { nvram_remove_partition()
989 prev->header.length += part->header.length; nvram_remove_partition()
990 prev->header.checksum = nvram_checksum(&part->header); nvram_remove_partition()
991 rc = nvram_write_header(part); nvram_remove_partition()
996 list_del(&part->partition); nvram_remove_partition()
997 kfree(part); nvram_remove_partition()
999 prev = part; nvram_remove_partition()
1021 struct nvram_partition *part; nvram_create_partition() local
1047 list_for_each_entry(part, &nvram_partitions, partition) { nvram_create_partition()
1048 if (part->header.signature != NVRAM_SIG_FREE) nvram_create_partition()
1051 if (part->header.length >= req_size) { nvram_create_partition()
1053 free_part = part; nvram_create_partition()
1056 if (part->header.length > size && nvram_create_partition()
1057 part->header.length >= min_size) { nvram_create_partition()
1058 size = part->header.length; nvram_create_partition()
1059 free_part = part; nvram_create_partition()
1124 struct nvram_partition *part; nvram_get_partition_size() local
1126 list_for_each_entry(part, &nvram_partitions, partition) { nvram_get_partition_size()
1127 if (part->index + NVRAM_HEADER_LEN == data_index) nvram_get_partition_size()
1128 return (part->header.length - 1) * NVRAM_BLOCK_LEN; nvram_get_partition_size()
1138 * @out_size: if non-NULL, returns the size of the data part of the partition
407 nvram_pstore_write(enum pstore_type_id type, enum kmsg_dump_reason reason, u64 *id, unsigned int part, int count, bool compressed, size_t size, struct pstore_info *psi) nvram_pstore_write() argument
/linux-4.1.27/drivers/isdn/hardware/eicon/
H A Ddsrv_bri.h29 Functions exported from os dependent part of
31 OS independed part
34 Prepare OS dependent part of BRI functions
H A Ddsrv_pri.h29 Functions exported from os dependent part of
31 OS independed part
34 Prepare OS dependent part of PRI/PRI Rev.2 functions
H A Dum_idi.h8 interface between UM IDI core and OS dependent part
/linux-4.1.27/drivers/macintosh/
H A Dnvram.c84 int part, offset; nvram_ioctl() local
85 if (copy_from_user(&part, (void __user*)arg, sizeof(part)) != 0) nvram_ioctl()
87 if (part < pmac_nvram_OF || part > pmac_nvram_NR) nvram_ioctl()
89 offset = pmac_get_partition(part); nvram_ioctl()
/linux-4.1.27/drivers/staging/rtl8192u/
H A Dr8192U_wx.h2 * This is part of rtl8180 OpenSource driver - v 0.3
6 * Parts of this driver are based on the GPL part of the official realtek driver
H A Dr8180_93cx6.h2 This is part of rtl8187 OpenSource driver
6 Parts of this driver are based on the GPL part of the
H A Dr8190_rtl8256.h2 This is part of the rtl8180-sa2400 driver
/linux-4.1.27/lib/
H A Dflex_array.c168 struct flex_array_part *part = fa->parts[part_nr]; __fa_get_part() local
169 if (!part) { __fa_get_part()
170 part = kmalloc(sizeof(struct flex_array_part), flags); __fa_get_part()
171 if (!part) __fa_get_part()
174 memset(part, FLEX_ARRAY_FREE, __fa_get_part()
176 fa->parts[part_nr] = part; __fa_get_part()
178 return part; __fa_get_part()
202 struct flex_array_part *part; flex_array_put() local
210 part = (struct flex_array_part *)&fa->parts[0]; flex_array_put()
213 part = __fa_get_part(fa, part_nr, flags); flex_array_put()
214 if (!part) flex_array_put()
217 dst = &part->elements[index_inside_part(fa, element_nr, part_nr)]; flex_array_put()
233 struct flex_array_part *part; flex_array_clear() local
241 part = (struct flex_array_part *)&fa->parts[0]; flex_array_clear()
244 part = fa->parts[part_nr]; flex_array_clear()
245 if (!part) flex_array_clear()
248 dst = &part->elements[index_inside_part(fa, element_nr, part_nr)]; flex_array_clear()
275 struct flex_array_part *part; flex_array_prealloc() local
295 part = __fa_get_part(fa, part_nr, flags); flex_array_prealloc()
296 if (!part) flex_array_prealloc()
318 struct flex_array_part *part; flex_array_get() local
325 part = (struct flex_array_part *)&fa->parts[0]; flex_array_get()
328 part = fa->parts[part_nr]; flex_array_get()
329 if (!part) flex_array_get()
332 return &part->elements[index_inside_part(fa, element_nr, part_nr)]; flex_array_get()
357 static int part_is_free(struct flex_array_part *part) part_is_free() argument
362 if (part->elements[i] != FLEX_ARRAY_FREE) part_is_free()
378 struct flex_array_part *part; flex_array_shrink() local
387 part = fa->parts[part_nr]; flex_array_shrink()
388 if (!part) flex_array_shrink()
390 if (part_is_free(part)) { flex_array_shrink()
392 kfree(part); flex_array_shrink()
H A Dlist_sort.c108 struct list_head *part[MAX_LIST_LENGTH_BITS+1]; /* sorted partial lists list_sort() local
110 int lev; /* index into part[] */ list_sort()
117 memset(part, 0, sizeof(part)); list_sort()
127 for (lev = 0; part[lev]; lev++) { list_sort()
128 cur = merge(priv, cmp, part[lev], cur); list_sort()
129 part[lev] = NULL; list_sort()
132 if (unlikely(lev >= ARRAY_SIZE(part)-1)) { list_sort()
138 part[lev] = cur; list_sort()
142 if (part[lev]) list_sort()
143 list = merge(priv, cmp, part[lev], list); list_sort()
145 merge_and_restore_back_links(priv, cmp, head, part[max_lev], list); list_sort()
H A Drational.c24 * with the fractional part size described in given_denominator.
/linux-4.1.27/block/
H A Dgenhd.c62 struct hd_struct *part = NULL; disk_get_part() local
72 part = rcu_dereference(ptbl->part[partno]); disk_get_part()
73 if (part) disk_get_part()
74 get_device(part_to_dev(part)); disk_get_part()
79 return part; disk_get_part()
103 piter->part = NULL; disk_part_iter_init()
133 disk_put_part(piter->part); disk_part_iter_next()
134 piter->part = NULL; disk_part_iter_next()
155 struct hd_struct *part; disk_part_iter_next() local
157 part = rcu_dereference(ptbl->part[piter->idx]); disk_part_iter_next()
158 if (!part) disk_part_iter_next()
160 if (!part_nr_sects_read(part) && disk_part_iter_next()
166 get_device(part_to_dev(part)); disk_part_iter_next()
167 piter->part = part; disk_part_iter_next()
174 return piter->part; disk_part_iter_next()
189 disk_put_part(piter->part); disk_part_iter_exit()
190 piter->part = NULL; disk_part_iter_exit()
194 static inline int sector_in_part(struct hd_struct *part, sector_t sector) sector_in_part() argument
196 return part->start_sect <= sector && sector_in_part()
197 sector < part->start_sect + part_nr_sects_read(part); sector_in_part()
218 struct hd_struct *part; disk_map_sector_rcu() local
223 part = rcu_dereference(ptbl->last_lookup); disk_map_sector_rcu()
224 if (part && sector_in_part(part, sector)) disk_map_sector_rcu()
225 return part; disk_map_sector_rcu()
228 part = rcu_dereference(ptbl->part[i]); disk_map_sector_rcu()
230 if (part && sector_in_part(part, sector)) { disk_map_sector_rcu()
231 rcu_assign_pointer(ptbl->last_lookup, part); disk_map_sector_rcu()
232 return part; disk_map_sector_rcu()
399 * @part: partition to allocate dev_t for
411 int blk_alloc_devt(struct hd_struct *part, dev_t *devt) blk_alloc_devt() argument
413 struct gendisk *disk = part_to_disk(part); blk_alloc_devt()
417 if (part->partno < disk->minors) { blk_alloc_devt()
418 *devt = MKDEV(disk->major, disk->first_minor + part->partno); blk_alloc_devt()
426 idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT); blk_alloc_devt()
512 struct hd_struct *part; register_disk() local
568 while ((part = disk_part_iter_next(&piter))) register_disk()
569 kobject_uevent(&part_to_dev(part)->kobj, KOBJ_ADD); register_disk()
638 struct hd_struct *part; del_gendisk() local
645 while ((part = disk_part_iter_next(&piter))) { del_gendisk()
646 invalidate_partition(disk, part->partno); del_gendisk()
647 delete_partition(disk, part->partno); del_gendisk()
691 struct hd_struct *part; get_gendisk() local
694 part = idr_find(&ext_devt_idr, blk_mangle_minor(MINOR(devt))); get_gendisk()
695 if (part && get_disk(part_to_disk(part))) { get_gendisk()
696 *partno = part->partno; get_gendisk()
697 disk = part_to_disk(part); get_gendisk()
721 struct hd_struct *part; bdget_disk() local
724 part = disk_get_part(disk, partno); bdget_disk()
725 if (part) bdget_disk()
726 bdev = bdget(part_devt(part)); bdget_disk()
727 disk_put_part(part); bdget_disk()
747 struct hd_struct *part; printk_all_partitions() local
765 while ((part = disk_part_iter_next(&piter))) { printk_all_partitions()
766 bool is_part0 = part == &disk->part0; printk_all_partitions()
769 bdevt_str(part_devt(part), devt_buf), printk_all_partitions()
770 (unsigned long long)part_nr_sects_read(part) >> 1 printk_all_partitions()
771 , disk_name(disk, part->partno, name_buf), printk_all_partitions()
772 part->info ? part->info->uuid : ""); printk_all_partitions()
848 struct hd_struct *part; show_partition() local
860 while ((part = disk_part_iter_next(&piter))) show_partition()
862 MAJOR(part_devt(part)), MINOR(part_devt(part)), show_partition()
863 (unsigned long long)part_nr_sects_read(part) >> 1, show_partition()
864 disk_name(sgp, part->partno, buf)); show_partition()
1090 size = sizeof(*new_ptbl) + target * sizeof(new_ptbl->part[0]); disk_expand_part_tbl()
1098 rcu_assign_pointer(new_ptbl->part[i], old_ptbl->part[i]); disk_expand_part_tbl()
1227 struct hd_struct *part; blk_lookup_devt() local
1240 part = disk_get_part(disk, partno); blk_lookup_devt()
1241 if (part) { blk_lookup_devt()
1242 devt = part_devt(part); blk_lookup_devt()
1243 disk_put_part(part); blk_lookup_devt()
1246 disk_put_part(part); blk_lookup_devt()
1275 disk->part_tbl->part[0] = &disk->part0; alloc_disk_node()
1348 struct hd_struct *part; set_disk_ro() local
1356 while ((part = disk_part_iter_next(&piter))) set_disk_ro()
1357 part->policy = flag; set_disk_ro()
1607 * Separate this part out so that a different pointer for clearing_ptr can be
H A Dioctl.c16 struct hd_struct *part, *lpart; blkpg_ioctl() local
53 while ((part = disk_part_iter_next(&piter))) { blkpg_ioctl()
54 if (!(start + length <= part->start_sect || blkpg_ioctl()
55 start >= part->start_sect + part->nr_sects)) { blkpg_ioctl()
64 part = add_partition(disk, partno, start, length, blkpg_ioctl()
67 return PTR_ERR_OR_ZERO(part); blkpg_ioctl()
69 part = disk_get_part(disk, partno); blkpg_ioctl()
70 if (!part) blkpg_ioctl()
73 bdevp = bdget(part_devt(part)); blkpg_ioctl()
74 disk_put_part(part); blkpg_ioctl()
107 part = disk_get_part(disk, partno); blkpg_ioctl()
108 if (!part) blkpg_ioctl()
110 bdevp = bdget(part_devt(part)); blkpg_ioctl()
112 disk_put_part(part); blkpg_ioctl()
117 if (start != part->start_sect) { blkpg_ioctl()
121 disk_put_part(part); blkpg_ioctl()
136 disk_put_part(part); blkpg_ioctl()
141 part_nr_sects_write(part, (sector_t)length); blkpg_ioctl()
146 disk_put_part(part); blkpg_ioctl()
H A Dpartition-generic.c228 struct hd_struct *part = container_of(head, struct hd_struct, rcu_head); delete_partition_rcu_cb() local
230 part->start_sect = 0; delete_partition_rcu_cb()
231 part->nr_sects = 0; delete_partition_rcu_cb()
232 part_stat_set_all(part, 0); delete_partition_rcu_cb()
233 put_device(part_to_dev(part)); delete_partition_rcu_cb()
236 void __delete_partition(struct hd_struct *part) __delete_partition() argument
238 call_rcu(&part->rcu_head, delete_partition_rcu_cb); __delete_partition()
244 struct hd_struct *part; delete_partition() local
249 part = ptbl->part[partno]; delete_partition()
250 if (!part) delete_partition()
253 rcu_assign_pointer(ptbl->part[partno], NULL); delete_partition()
255 kobject_put(part->holder_dir); delete_partition()
256 device_del(part_to_dev(part)); delete_partition()
258 hd_struct_put(part); delete_partition()
286 if (ptbl->part[partno]) add_partition()
353 rcu_assign_pointer(ptbl->part[partno], p); add_partition()
397 struct hd_struct *part; drop_partitions() local
407 while ((part = disk_part_iter_next(&piter))) drop_partitions()
408 delete_partition(disk, part->partno); drop_partitions()
417 struct hd_struct *part; rescan_partitions() local
515 part = add_partition(disk, p, from, size, rescan_partitions()
518 if (IS_ERR(part)) { rescan_partitions()
520 disk->disk_name, p, -PTR_ERR(part)); rescan_partitions()
525 md_autodetect_dev(part_to_dev(part)->devt); rescan_partitions()
/linux-4.1.27/drivers/net/ethernet/dec/tulip/
H A DMakefile15 # Declare multi-part drivers.
/linux-4.1.27/drivers/staging/sm750fb/
H A Dddk750.h7 * All rights are reserved. Reproduction or in part is prohibited
/linux-4.1.27/drivers/firmware/efi/
H A Defi-pstore.c41 unsigned int part, int count) generic_id()
43 return ((u64) timestamp * 100 + part) * 1000 + count; generic_id()
53 unsigned int part; efi_pstore_read_func() local
63 cb_data->type, &part, &cnt, &time, &data_type) == 5) { efi_pstore_read_func()
64 *cb_data->id = generic_id(time, part, cnt); efi_pstore_read_func()
73 cb_data->type, &part, &cnt, &time) == 4) { efi_pstore_read_func()
74 *cb_data->id = generic_id(time, part, cnt); efi_pstore_read_func()
80 cb_data->type, &part, &time) == 3) { efi_pstore_read_func()
86 *cb_data->id = generic_id(time, part, 0); efi_pstore_read_func()
240 unsigned int part, int count, bool compressed, size_t size, efi_pstore_write()
248 sprintf(name, "dump-type%u-%u-%d-%lu-%c", type, part, count, efi_pstore_write()
261 *id = part; efi_pstore_write()
329 unsigned int part; efi_pstore_erase() local
332 part = do_div(id, 100); efi_pstore_erase()
333 sprintf(name, "dump-type%u-%u-%d-%lu", type, part, count, time.tv_sec); efi_pstore_erase()
338 edata.id = part; efi_pstore_erase()
40 generic_id(unsigned long timestamp, unsigned int part, int count) generic_id() argument
238 efi_pstore_write(enum pstore_type_id type, enum kmsg_dump_reason reason, u64 *id, unsigned int part, int count, bool compressed, size_t size, struct pstore_info *psi) efi_pstore_write() argument
/linux-4.1.27/arch/x86/include/asm/
H A Dmath_emu.h8 following a device-not-present interrupt, part of it saved
H A Dpgtable-3level.h59 * only return an atomic pmdval if the low part of the pmdval is later
61 * pmdval if the low part of the pmd is none. In some cases the high
62 * and low part of the pmdval returned may not be consistent if THP is
63 * enabled (the low part may point to previously mapped hugepage,
64 * while the high part may point to a more recently mapped hugepage),
65 * but pmd_none_or_trans_huge_or_clear_bad() only needs the low part
67 * or not, with the only exception of when the low part of the pmd is
78 * If the low part is null, we must not read the high part pmd_read_atomic()
H A Dxcr.h5 * This file is part of the Linux kernel, and is made available under
H A Dlguest.h32 /* Manually saved part. */
38 /* Trap pushed part */
H A Dvm86.h34 * the below part remains on the kernel stack while we are in VM86 mode.
50 * The below is not part of the structure, but the stack layout continues
/linux-4.1.27/arch/x86/boot/
H A Dversion.c6 * This file is part of the Linux kernel, and is made available under
H A Dmca.c7 * This file is part of the Linux kernel, and is made available under
H A Dregs.c5 * This file is part of the Linux kernel, and is made available under
H A Dbitops.h6 * This file is part of the Linux kernel, and is made available under
H A Dmkcpustr.c5 * This file is part of the Linux kernel, and is made available under
/linux-4.1.27/arch/mips/boot/dts/include/dt-bindings/gpio/
H A Dgpio.h4 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
/linux-4.1.27/arch/mips/boot/dts/include/dt-bindings/interrupt-controller/
H A Dirq.h4 * Most IRQ bindings include a flags cell as part of the IRQ specifier.
/linux-4.1.27/arch/mips/boot/dts/include/dt-bindings/pwm/
H A Dpwm.h4 * Most PWM bindings can include a flags cell as part of the PWM specifier.
/linux-4.1.27/fs/ncpfs/
H A Dncp_fs_i.h12 * This is the ncpfs part of the inode structure. This must contain
/linux-4.1.27/include/net/netfilter/ipv4/
H A Dnf_conntrack_ipv4.h5 * - move L3 protocol dependent part from include/linux/netfilter_ipv4/
/linux-4.1.27/include/trace/events/
H A Dprintk.h27 /* This part must be outside protection */
H A Dudp.h31 /* This part must be outside protection */
H A Dnapi.h37 /* This part must be outside protection */
H A Dnmi.h36 /* This part ust be outside protection */
H A Doom.h32 /* This part must be outside protection */
H A Dswiotlb.h45 /* This part must be outside protection */
H A Dcma.h65 /* This part must be outside protection */
H A Dcontext_tracking.h57 /* This part must be outside protection */
H A Dfilemap.h57 /* This part must be outside protection */
H A Dgpio.h55 /* This part must be outside protection */
H A Dpower_cpu_migrate.h64 /* This part must be outside protection */
H A Dskb.h74 /* This part must be outside protection */
H A Dsock.h67 /* This part must be outside protection */
H A Dsyscalls.h70 /* This part must be outside protection */
H A Dtask.h60 /* This part must be outside protection */
H A Dtlb.h61 /* This part must be outside protection */
/linux-4.1.27/arch/powerpc/boot/dts/include/dt-bindings/gpio/
H A Dgpio.h4 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
/linux-4.1.27/arch/powerpc/boot/dts/include/dt-bindings/interrupt-controller/
H A Dirq.h4 * Most IRQ bindings include a flags cell as part of the IRQ specifier.
/linux-4.1.27/arch/powerpc/boot/dts/include/dt-bindings/pwm/
H A Dpwm.h4 * Most PWM bindings can include a flags cell as part of the PWM specifier.
/linux-4.1.27/arch/arm64/boot/dts/include/dt-bindings/gpio/
H A Dgpio.h4 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
/linux-4.1.27/arch/arm64/boot/dts/include/dt-bindings/interrupt-controller/
H A Dirq.h4 * Most IRQ bindings include a flags cell as part of the IRQ specifier.
/linux-4.1.27/arch/arm64/boot/dts/include/dt-bindings/pwm/
H A Dpwm.h4 * Most PWM bindings can include a flags cell as part of the PWM specifier.
/linux-4.1.27/arch/metag/boot/dts/include/dt-bindings/gpio/
H A Dgpio.h4 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
/linux-4.1.27/arch/metag/boot/dts/include/dt-bindings/interrupt-controller/
H A Dirq.h4 * Most IRQ bindings include a flags cell as part of the IRQ specifier.
/linux-4.1.27/arch/metag/boot/dts/include/dt-bindings/pwm/
H A Dpwm.h4 * Most PWM bindings can include a flags cell as part of the PWM specifier.
/linux-4.1.27/arch/arm/boot/dts/include/dt-bindings/gpio/
H A Dgpio.h4 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
/linux-4.1.27/arch/arm/boot/dts/include/dt-bindings/interrupt-controller/
H A Dirq.h4 * Most IRQ bindings include a flags cell as part of the IRQ specifier.
/linux-4.1.27/arch/arm/boot/dts/include/dt-bindings/pwm/
H A Dpwm.h4 * Most PWM bindings can include a flags cell as part of the PWM specifier.
/linux-4.1.27/lib/zlib_inflate/
H A Dinffixed.h6 is part of the implementation of the compression library and
H A Dinfutil.h7 part of the implementation of the compression library and is
H A Dinftrees.h10 part of the implementation of the compression library and is
23 the number of bits in this code or part of the code to drop off
29 unsigned char bits; /* bits in this part of the code */
/linux-4.1.27/include/dt-bindings/gpio/
H A Dgpio.h4 * Most GPIO bindings include a flags cell as part of the GPIO specifier.
/linux-4.1.27/include/dt-bindings/interrupt-controller/
H A Dirq.h4 * Most IRQ bindings include a flags cell as part of the IRQ specifier.
/linux-4.1.27/include/dt-bindings/pwm/
H A Dpwm.h4 * Most PWM bindings can include a flags cell as part of the PWM specifier.
/linux-4.1.27/fs/hfs/
H A Dpart_tbl.c56 * start and length of the 'part'th HFS partition.
82 (HFS_SB(sb)->part < 0 || HFS_SB(sb)->part == i)) { hfs_part_find()
98 (HFS_SB(sb)->part < 0 || HFS_SB(sb)->part == i)) { hfs_part_find()
H A Dsuper.c148 if (sbi->part >= 0) hfs_show_options()
149 seq_printf(seq, ",part=%u", sbi->part); hfs_show_options()
205 { opt_part, "part=%u" },
242 hsb->part = -1; parse_options()
299 if (match_int(&args[0], &hsb->part)) { parse_options()
300 pr_err("part requires an argument\n"); parse_options()
/linux-4.1.27/sound/soc/intel/atom/sst/
H A Dsst_ipc.c137 while (header.p.header_high.part.busy) { sst_post_message_mrfld()
157 if (header.p.header_high.part.busy) { sst_post_message_mrfld()
173 if (msg->mrfld_header.p.header_high.part.large) sst_post_message_mrfld()
199 isr.part.busy_interrupt = 1; intel_sst_clear_intr_mrfld()
205 clear_ipc.p.header_high.part.busy = 0; intel_sst_clear_intr_mrfld()
206 clear_ipc.p.header_high.part.done = 1; intel_sst_clear_intr_mrfld()
210 imr.part.busy_interrupt = 0; intel_sst_clear_intr_mrfld()
330 drv_id = msg_high.part.drv_id; sst_process_reply_mrfld()
340 if (msg_high.part.result && drv_id && !msg_high.part.large) { sst_process_reply_mrfld()
343 sst_wake_up_block(sst_drv_ctx, msg_high.part.result, sst_process_reply_mrfld()
344 msg_high.part.drv_id, sst_process_reply_mrfld()
345 msg_high.part.msg_id, NULL, 0); sst_process_reply_mrfld()
354 if (msg_high.part.large) { sst_process_reply_mrfld()
363 if (sst_wake_up_block(sst_drv_ctx, msg_high.part.result, sst_process_reply_mrfld()
364 msg_high.part.drv_id, sst_process_reply_mrfld()
365 msg_high.part.msg_id, data, msg_low)) sst_process_reply_mrfld()
368 sst_wake_up_block(sst_drv_ctx, msg_high.part.result, sst_process_reply_mrfld()
369 msg_high.part.drv_id, sst_process_reply_mrfld()
370 msg_high.part.msg_id, NULL, 0); sst_process_reply_mrfld()
H A Dsst_pvt.c259 msg->mrfld_header.p.header_high.part.res_rqd = !sync; sst_prepare_and_post_msg()
263 msg->mrfld_header.p.header_high.part.res_rqd); sst_prepare_and_post_msg()
317 header->p.header_high.part.msg_id = msg; sst_fill_header_mrfld()
318 header->p.header_high.part.task_id = task_id; sst_fill_header_mrfld()
319 header->p.header_high.part.large = large; sst_fill_header_mrfld()
320 header->p.header_high.part.drv_id = drv_id; sst_fill_header_mrfld()
321 header->p.header_high.part.done = 0; sst_fill_header_mrfld()
322 header->p.header_high.part.busy = 1; sst_fill_header_mrfld()
323 header->p.header_high.part.res_rqd = 1; sst_fill_header_mrfld()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/dmaobj/
H A Dnv50.c94 u32 user, part, comp, kind; nv50_dmaobj_ctor() local
105 nv_ioctl(parent, "create nv50 dma vers %d priv %d part %d " nv50_dmaobj_ctor()
107 args->v0.priv, args->v0.part, args->v0.comp, nv50_dmaobj_ctor()
110 part = args->v0.part; nv50_dmaobj_ctor()
117 part = NV50_DMA_V0_PART_256; nv50_dmaobj_ctor()
122 part = NV50_DMA_V0_PART_VM; nv50_dmaobj_ctor()
129 if (user > 2 || part > 2 || comp > 3 || kind > 0x7f) nv50_dmaobj_ctor()
132 priv->flags5 = (part << 16); nv50_dmaobj_ctor()
/linux-4.1.27/drivers/char/
H A Dgeneric_nvram.c100 int part, offset; nvram_ioctl() local
104 if (copy_from_user(&part, (void __user*)arg, sizeof(part)) != 0) nvram_ioctl()
106 if (part < pmac_nvram_OF || part > pmac_nvram_NR) nvram_ioctl()
108 offset = pmac_get_partition(part); nvram_ioctl()
/linux-4.1.27/drivers/media/platform/s5p-tv/
H A Dregs-sdo.h17 * Register part
30 * Bit definition part
H A Dregs-vp.h16 * Register part
47 * Bit definition part
H A Dregs-mixer.h15 * Register part
51 * Bit definition part
/linux-4.1.27/include/scsi/
H A Dosd_types.h2 * osd_types.h - Types and constants which are not part of the protocol.
14 * used by more than one part of the osd library.
/linux-4.1.27/arch/arc/include/asm/
H A Dtlb.h21 * 1) cache-flush part -implemented via tlb_start_vma( ) for VIPT aliasing D$
22 * 2) tlb-flush part - implemted via tlb_end_vma( ) flushes the TLB range
/linux-4.1.27/drivers/media/pci/bt8xx/
H A Ddst_priv.h2 * dst-bt878.h: part of the DST driver for the TwinHan DST Frontend
/linux-4.1.27/arch/arm64/kernel/
H A Dtrace-events-emulation.h29 /* This part must be outside protection */
/linux-4.1.27/kernel/trace/
H A Dtrace_benchmark.h40 /* This part must be outside protection */
H A Dtrace_events_filter_test.h49 /* This part must be outside protection */
/linux-4.1.27/include/net/netfilter/
H A Dnf_nat_l4proto.h23 /* Is the manipable part of the tuple between min and max incl? */
29 /* Alter the per-proto part of the tuple (depending on
31 * possible. Per-protocol part of tuple is initialized to the
H A Dnf_conntrack_l4proto.h5 * - generalized L3 protocol dependent part.
31 /* Invert the per-proto part of the tuple: ie. turn xmit into reply.
58 /* Print out the per-protocol part of the tuple. Return like seq_* */
62 /* Print out the private part of the conntrack. */
102 /* Return the per-net protocol part. */
H A Dnf_conntrack_l3proto.h34 * Invert the per-proto part of the tuple: ie. turn xmit into reply.
40 /* Print out the per-protocol part of the tuple. */
/linux-4.1.27/arch/arm/nwfpe/
H A Dmilieu.h5 This C header file is part of the SoftFloat IEC/IEEE Floating-point
8 Written by John R. Hauser. This work was made possible in part by the
12 of this code was written as part of a project to build a fixed-point vector
/linux-4.1.27/net/batman-adv/
H A Dpacket.h136 * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be part of
206 * @packet_type: batman-adv packet type, part of the general header
207 * @version: batman-adv protocol version, part of the genereal header
208 * @ttl: time to live for this packet, part of the genereal header
232 * @packet_type: batman-adv packet type, part of the general header
233 * @version: batman-adv protocol version, part of the genereal header
234 * @ttl: time to live for this packet, part of the genereal header
258 * @packet_type: batman-adv packet type, part of the general header
259 * @version: batman-adv protocol version, part of the genereal header
260 * @ttl: time to live for this packet, part of the genereal header
284 * @packet_type: batman-adv packet type, part of the general header
285 * @version: batman-adv protocol version, part of the genereal header
286 * @ttl: time to live for this packet, part of the genereal header
324 * @packet_type: batman-adv packet type, part of the general header
325 * @version: batman-adv protocol version, part of the genereal header
326 * @ttl: time to live for this packet, part of the genereal header
359 * @packet_type: batman-adv packet type, part of the general header
360 * @version: batman-adv protocol version, part of the genereal header
361 * @ttl: time to live for this packet, part of the genereal header
390 * @packet_type: batman-adv packet type, part of the general header
391 * @version: batman-adv protocol version, part of the genereal header
392 * @ttl: time to live for this packet, part of the genereal header
411 * @packet_type: batman-adv packet type, part of the general header
412 * @version: batman-adv protocol version, part of the genereal header
413 * @ttl: time to live for this packet, part of the genereal header
425 * @coded_len: length of network coded part of the payload
449 * @packet_type: batman-adv packet type, part of the general header
450 * @version: batman-adv protocol version, part of the genereal header
451 * @ttl: time to live for this packet, part of the genereal header
/linux-4.1.27/arch/sh/kernel/cpu/shmobile/
H A Dpm.c89 /* part 0: data area */ sh_mobile_register_self_refresh()
105 /* part 1: common code to enter sleep mode */ sh_mobile_register_self_refresh()
110 /* part 2: board specific code to enter self-refresh mode */ sh_mobile_register_self_refresh()
116 /* part 3: board specific code to resume from self-refresh mode */ sh_mobile_register_self_refresh()
122 /* part 4: common code to resume from sleep mode */ sh_mobile_register_self_refresh()
/linux-4.1.27/fs/hfsplus/
H A Doptions.c36 { opt_part, "part=%u" },
58 opts->part = -1; hfsplus_fill_defaults()
156 if (match_int(&args[0], &sbi->part)) { hfsplus_parse_options()
157 pr_err("part requires an argument\n"); hfsplus_parse_options()
227 if (sbi->part >= 0) hfsplus_show_options()
228 seq_printf(seq, ",part=%u", sbi->part); hfsplus_show_options()
H A Dpart_tbl.c81 (sbi->part < 0 || sbi->part == i)) { hfs_parse_old_pmap()
102 (sbi->part < 0 || sbi->part == i)) { hfs_parse_new_pmap()
/linux-4.1.27/arch/metag/mm/
H A Dcache.c204 int part, offset; metag_phys_data_cache_flush() local
219 part = metag_in32(SYSC_DCPART0 + metag_phys_data_cache_flush()
224 part >>= SYSC_xCPARTG_AND_S metag_phys_data_cache_flush()
228 offset = (part & SYSC_xCPARTL_OR_BITS) metag_phys_data_cache_flush()
233 part = (part & SYSC_xCPARTL_AND_BITS) metag_phys_data_cache_flush()
235 loops = ((part + 1) << (set_shift - 4)); metag_phys_data_cache_flush()
350 int part, offset; metag_phys_code_cache_flush() local
362 part = metag_in32(SYSC_ICPART0 + metag_phys_code_cache_flush()
367 part >>= SYSC_xCPARTG_AND_S-SYSC_xCPARTL_AND_S; metag_phys_code_cache_flush()
370 offset = (part & SYSC_xCPARTL_OR_BITS) metag_phys_code_cache_flush()
375 part = (part & SYSC_xCPARTL_AND_BITS) metag_phys_code_cache_flush()
377 loops = ((part + 1) << (set_shift - 4)); metag_phys_code_cache_flush()
/linux-4.1.27/lib/mpi/
H A Dmpih-mul.c5 * This file is part of GnuPG.
152 * Put result in upper part of PROD and pass low part of TSPACE mul_n()
175 /* Read temporary operands from low part of PROD. mul_n()
176 * Put result in low part of TSPACE using upper part of TSPACE mul_n()
199 * Read temporary operands from low part of PROD. mul_n()
200 * Put result in low part of TSPACE using upper part of TSPACE mul_n()
286 * Put result in upper part of PROD and pass low part of TSPACE mpih_sqr_n()
299 /* Read temporary operands from low part of PROD. mpih_sqr_n()
300 * Put result in low part of TSPACE using upper part of TSPACE mpih_sqr_n()
314 * Read temporary operands from low part of PROD. mpih_sqr_n()
315 * Put result in low part of TSPACE using upper part of TSPACE mpih_sqr_n()
/linux-4.1.27/arch/x86/platform/uv/
H A Dbios_uv.c91 union partition_info_u part; uv_bios_get_sn_info() local
98 part.val = v0; uv_bios_get_sn_info()
100 *uvtype = part.hub_version; uv_bios_get_sn_info()
102 *partid = part.partition_id; uv_bios_get_sn_info()
104 *coher = part.coherence_id; uv_bios_get_sn_info()
106 *region = part.region_size; uv_bios_get_sn_info()
/linux-4.1.27/drivers/uio/
H A Duio_sercos3.c8 by the userspace-part.
10 The only part that may seem odd is the use of a logical OR when
12 userspace-part could directly modify the Interrupt Enable Register
17 Race conditions exist if the userspace-part directly modifies the
20 this reason, the userspace-part should only directly modify the
22 The userspace-part can safely disable interrupts at any time using
/linux-4.1.27/drivers/isdn/hysdn/
H A Dhysdn_pof.h30 * 1. page contains the high 16-bit part of the 32-bit E1 words
31 * 2. page contains the low 16-bit part of the 32-bit E1 words
34 * in the highest 2KB part (at offset 0x3800);
/linux-4.1.27/drivers/irqchip/
H A Dirqchip.c19 * the end of the array by the linker, thanks to being part of a
/linux-4.1.27/drivers/media/usb/dvb-usb/
H A Ddvb-usb-i2c.c1 /* dvb-usb-i2c.c is part of the DVB USB library.
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dnv44.c94 u32 part = (cnt > max) ? max : cnt; nv44_vm_map_sg() local
95 nv44_vm_fill(pgt, priv->null, list, pte, part); nv44_vm_map_sg()
96 pte += part; nv44_vm_map_sg()
97 list += part; nv44_vm_map_sg()
98 cnt -= part; nv44_vm_map_sg()
122 u32 part = (cnt > max) ? max : cnt; nv44_vm_unmap() local
123 nv44_vm_fill(pgt, priv->null, NULL, pte, part); nv44_vm_unmap()
124 pte += part; nv44_vm_unmap()
125 cnt -= part; nv44_vm_unmap()
/linux-4.1.27/drivers/clk/mvebu/
H A Darmada-xp.c28 #define SARL 0 /* Low part [0:31] */
33 #define SARH 4 /* High part [32:63] */
79 * located in the high part of the SAR registers axp_get_cpu_freq()
132 * located in the high part of the SAR registers axp_get_clk_ratio()
/linux-4.1.27/drivers/atm/
H A Dzatm.h43 /*-------------------------------- RX part */
46 /*-------------------------------- TX part */
58 /*-------------------------------- TX part */
63 /*-------------------------------- RX part */
/linux-4.1.27/init/
H A Dversion.c6 * May be freely distributed as part of Linux.
H A Ddo_mounts.c89 struct hd_struct *part = dev_to_part(dev); match_dev_by_uuid() local
91 if (!part->info) match_dev_by_uuid()
94 if (strncasecmp(cmp->uuid, part->info->uuid, cmp->len)) match_dev_by_uuid()
122 struct hd_struct *part; devt_from_partuuid() local
162 part = disk_get_part(disk, dev_to_part(dev)->partno + offset); devt_from_partuuid()
163 if (part) { devt_from_partuuid()
164 res = part_devt(part); devt_from_partuuid()
165 put_device(part_to_dev(part)); devt_from_partuuid()
215 int part; name_to_dev_t() local
271 /* try disk name without <part number> */ name_to_dev_t()
272 part = simple_strtoul(p, NULL, 10); name_to_dev_t()
274 res = blk_lookup_devt(s, part); name_to_dev_t()
278 /* try disk name without p<part number> */ name_to_dev_t()
282 res = blk_lookup_devt(s, part); name_to_dev_t()
/linux-4.1.27/arch/ia64/kernel/
H A Dsigframe.h10 * DO NOT MOVE THESE. They are part of the IA-64 Linux ABI and there is
/linux-4.1.27/fs/autofs4/
H A Dsymlink.c7 * This file is part of the Linux kernel and is made available under
H A Dinit.c7 * This file is part of the Linux kernel and is made available under
/linux-4.1.27/net/rds/
H A Dtransport.c116 unsigned int part; rds_trans_stats_info_copy() local
128 part = trans->stats_info_copy(iter, avail); rds_trans_stats_info_copy()
129 avail -= min(avail, part); rds_trans_stats_info_copy()
130 total += part; rds_trans_stats_info_copy()
/linux-4.1.27/security/selinux/
H A DMakefile2 # Makefile for building the SELinux module as part of the kernel tree.
/linux-4.1.27/drivers/rtc/
H A Drtc-abx80x.c195 unsigned int part = id->driver_data; abx80x_probe() local
235 /* part autodetection */ abx80x_probe()
236 if (part == ABX80X) { abx80x_probe()
241 dev_err(&client->dev, "Unknown part: %04x\n", abx80x_probe()
245 part = i; abx80x_probe()
248 if (partnumber != abx80x_caps[part].pn) { abx80x_probe()
250 partnumber, abx80x_caps[part].pn); abx80x_probe()
254 if (np && abx80x_caps[part].has_tc) abx80x_probe()
/linux-4.1.27/drivers/gpu/drm/exynos/
H A Dregs-vp.h19 * Register part
50 * Bit definition part
/linux-4.1.27/arch/mips/dec/
H A Dwbflush.c51 * as part of Coprocessor 0.
63 * For the DS5100 the writeback buffer seems to be a part of Coprocessor 3.
/linux-4.1.27/include/uapi/linux/
H A Dauto_fs.h7 * This file is part of the Linux kernel and is made available under
31 * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
H A Datm_tcp.h23 __u32 length; /* ... of data part */
/linux-4.1.27/tools/usb/usbip/libsrc/
H A Dvhci_driver.c159 * validate each part's size. The initial buffer is padded by 4 to
161 * which is needed to properly validate the 3rd part without it being
167 int part; read_record() local
198 for (part = 0; part < 3; part++) { read_record()
199 end = strchr(start, delim[part]); read_record()
200 if (end == NULL || (end - start) > max_len[part]) { read_record()
/linux-4.1.27/arch/mn10300/mm/
H A Dcache-flush-icache.c19 * @vma: The VMA the page is part of.
41 * flush_icache_page_range - Flush dcache and invalidate icache for part of a
43 * @start: The starting virtual address of the page part.
44 * @end: The ending virtual address of the page part.
46 * Flush the dcache and invalidate the icache for part of a single page, as
H A Dcache-inv-icache.c19 * flush_icache_page_range - Flush dcache and invalidate icache for part of a
21 * @start: The starting virtual address of the page part.
22 * @end: The ending virtual address of the page part.
24 * Invalidate the icache for part of a single page, as determined by the
/linux-4.1.27/drivers/media/i2c/
H A Dsaa711x_regs.h18 /* Video Decoder - Frontend part */
24 /* Video Decoder - Decoder part */
52 /* Component processing and interrupt masking part */
64 /* Audio clock generator part */
71 /* General purpose VBI data slicer part */
84 /* X port, I port and the scaler part */
238 /* Video Decoder - Frontend part: R_01_INC_DELAY to R_05_INPUT_CNTL_4 */
250 /* Video Decoder - Decoder part: R_06_H_SYNC_START to R_1F_STATUS_BYTE_2_VD_DEC */
304 /* Component processing and interrupt masking part: 0x20h to R_2F_INTERRUPT_MASK_3 */
328 /* Audio clock generator part: R_30_AUD_MAST_CLK_CYCLES_PER_FIELD to 0x3f */
343 /* General purpose VBI data slicer part: R_40_SLICER_CNTL_1 to 0x7f */
368 /* X port, I port and the scaler part: R_80_GLOBAL_CNTL_1 to R_EF_B_VERT_LUMA_PHASE_OFF_11 */
389 "Status information scaler part"},
/linux-4.1.27/drivers/staging/lustre/lustre/libcfs/linux/
H A Dlinux-cpu.c28 * This file is part of Lustre, http://www.lustre.org/
110 struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; cfs_cpt_table_free() local
112 if (part->cpt_nodemask != NULL) { cfs_cpt_table_free()
113 LIBCFS_FREE(part->cpt_nodemask, cfs_cpt_table_free()
114 sizeof(*part->cpt_nodemask)); cfs_cpt_table_free()
117 if (part->cpt_cpumask != NULL) cfs_cpt_table_free()
118 LIBCFS_FREE(part->cpt_cpumask, cpumask_size()); cfs_cpt_table_free()
166 struct cfs_cpu_partition *part = &cptab->ctb_parts[i]; cfs_cpt_table_alloc() local
168 LIBCFS_ALLOC(part->cpt_cpumask, cpumask_size()); cfs_cpt_table_alloc()
169 LIBCFS_ALLOC(part->cpt_nodemask, sizeof(*part->cpt_nodemask)); cfs_cpt_table_alloc()
170 if (part->cpt_cpumask == NULL || part->cpt_nodemask == NULL) cfs_cpt_table_alloc()
774 struct cfs_cpu_partition *part; for_each_online_node() local
780 part = &cptab->ctb_parts[cpt]; for_each_online_node()
782 n = num - cpumask_weight(part->cpt_cpumask); for_each_online_node()
789 LASSERT(num >= cpumask_weight(part->cpt_cpumask)); for_each_online_node()
790 if (num == cpumask_weight(part->cpt_cpumask)) for_each_online_node()
/linux-4.1.27/drivers/net/fddi/skfp/h/
H A Dosdef1st.h98 * OS-specific part of the transmit/receive descriptor structure (TXD/RXD).
108 struct s_txd_os { // os-specific part of transmit descriptor
113 struct s_rxd_os { // os-specific part of receive descriptor
/linux-4.1.27/arch/powerpc/include/asm/
H A Dnvram.h85 extern int __init nvram_init_os_partition(struct nvram_os_partition *part);
91 extern int nvram_read_partition(struct nvram_os_partition *part, char *buff,
96 extern int nvram_write_os_partition(struct nvram_os_partition *part,
/linux-4.1.27/net/irda/irnet/
H A Dirnet_irda.h7 * IRDA part of the IrNET module (dealing with IrTTP, IrIAS and co).
25 /* IAS object name (or part of it) */
58 /* Server socket part */
/linux-4.1.27/drivers/isdn/hisax/
H A Dhscx.h41 extern void inithscxisac(struct IsdnCardState *cs, int part);
/linux-4.1.27/drivers/net/ethernet/chelsio/cxgb4/
H A Dclip_tbl.h2 * This file is part of the Chelsio T4 Ethernet driver for Linux.
/linux-4.1.27/drivers/net/wireless/ti/
H A Dwilink_platform_data.c2 * This file is part of wl12xx
/linux-4.1.27/drivers/net/wireless/ti/wl1251/
H A Dboot.h2 * This file is part of wl1251
H A Ddebugfs.h2 * This file is part of wl1251
H A Dps.h2 * This file is part of wl1251
/linux-4.1.27/drivers/net/wireless/ti/wl12xx/
H A Dconf.h2 * This file is part of wl12xx
H A Ddebugfs.h2 * This file is part of wl12xx
/linux-4.1.27/drivers/net/wireless/ti/wl18xx/
H A Ddebugfs.h2 * This file is part of wl18xx
H A Dio.h2 * This file is part of wl18xx
/linux-4.1.27/drivers/gpu/drm/
H A Ddrm_trace.h62 /* This part must be outside protection */
/linux-4.1.27/arch/x86/include/asm/trace/
H A Dexceptions.h51 /* This part must be outside protection */
/linux-4.1.27/arch/sh/lib64/
H A Dudelay.c19 * The active part of our cycle counter is only 32-bits wide, and
/linux-4.1.27/arch/mips/include/asm/octeon/
H A Dcvmx-helper-errata.h5 * This file is part of the OCTEON SDK
/linux-4.1.27/drivers/media/common/b2c2/
H A Dflexcop-common.h138 /* the PCI part uses this call to get the MAC address, the USB part has its own */
142 /* the PCI part uses this a i2c_request callback, whereas the usb part has its own
/linux-4.1.27/include/linux/platform_data/
H A Dbt-nokia-h4p.h2 * This file is part of Nokia H4P bluetooth driver
/linux-4.1.27/include/linux/spi/
H A Dtsc2005.h2 * This file is part of TSC2005 touchscreen driver
/linux-4.1.27/include/linux/usb/
H A Dgpio_vbus.h23 * part of a resistor ladder turning a 4.0V-5.25V level on VBUS into a
H A Dphy_companion.h2 * phy-companion.h -- phy companion to indicate the comparator part of PHY
/linux-4.1.27/arch/sh/boards/mach-dreamcast/
H A Dsetup.c9 * This file is part of the LinuxDC project (www.linuxdc.org)
/linux-4.1.27/arch/mips/kvm/
H A Dtrace.h43 /* This part must be outside protection */
/linux-4.1.27/arch/arm64/kvm/
H A Dtrace.h54 /* This part must be outside protection */
/linux-4.1.27/arch/alpha/lib/
H A Dudelay.c16 * The active part of our cycle counter is only 32-bits wide, and
H A Dev6-divide.S175 nop # E : as part of the cmovne
181 nop # E : as part of the cmovne
186 nop # E : as part of the cmovne
236 nop # E : as part of the cmov
253 nop # E : U L L U : as part of the cmov
256 nop # E : as part of the cmov
/linux-4.1.27/arch/arc/plat-arcfpga/
H A Dplatform.c19 * however as part of early device tree scan, we also select the right
/linux-4.1.27/net/ipv4/
H A Dtcp_hybla.c20 u32 rho; /* Rho parameter, integer part */
21 u32 rho2; /* Rho * Rho, integer part */
120 * into 2 parts: an integer part and a fraction part. hybla_cong_avoid()
/linux-4.1.27/security/apparmor/
H A Dsid.c40 * TODO FIXME: sid recycling - part of profile mapping table aa_alloc_sid()
/linux-4.1.27/security/selinux/include/
H A Dnetnode.h5 * mapping is maintained as part of the normal policy but a fast cache is
H A Dnetport.h5 * mapping is maintained as part of the normal policy but a fast cache is
/linux-4.1.27/sound/firewire/bebob/
H A Dbebob_terratec.c2 * bebob_terratec.c - a part of driver for BeBoB based devices
/linux-4.1.27/sound/hda/
H A Dtrace.h55 /* This part must be outside protection */
/linux-4.1.27/sound/pci/hda/
H A Dhda_intel_trace.h59 /* This part must be outside protection */
/linux-4.1.27/include/linux/lockd/
H A Dbind.h4 * This is the part of lockd visible to nfsd and the nfs client.
/linux-4.1.27/arch/mips/cavium-octeon/executive/
H A Dcvmx-helper-errata.c5 * This file is part of the OCTEON SDK
32 * chip errata. For the most part, code doesn't need to call
/linux-4.1.27/arch/mips/include/asm/mach-au1x00/
H A Dgpio.h47 * which are in part provided by spare Au1300 GPIO pins and in part by
/linux-4.1.27/drivers/pinctrl/samsung/
H A Dpinctrl-exynos.h96 * @nr_banks: count of banks being part of the mux
97 * @banks: array of banks being part of the mux
/linux-4.1.27/arch/arm/include/asm/
H A Dsmp_plat.h30 * smp_cpuid_part() - return part id for a given cpu
33 * Return: part id of logical cpu passed as argument.
H A Ducontext.h33 * coprocessor's layouts are part of the userspace ABI. Each one of
82 * The layout of this structure is not part of the user ABI,
/linux-4.1.27/fs/exofs/
H A Dfile.c16 * This file is part of exofs.
42 * Note, in exofs all metadata is written as part of inode, regardless.
/linux-4.1.27/include/crypto/
H A Dpublic_key.h44 * Note that this may include private part of the key as well as the public
45 * part.
/linux-4.1.27/arch/m68k/lib/
H A Dudivsi3.S4 This file is part of GNU CC.
119 mulu d0, d1 /* low part, 32 bits */
121 mulu d0, d2 /* high part, at most 17 bits */
122 swap d2 /* align high part with low part */
123 tstw d2 /* high part 17 bits? */
/linux-4.1.27/drivers/net/ethernet/freescale/
H A Dgianfar.h800 u32 mac01addr1; /* 0x.548 - MAC exact match address 1, part 1 */
801 u32 mac01addr2; /* 0x.54c - MAC exact match address 1, part 2 */
802 u32 mac02addr1; /* 0x.550 - MAC exact match address 2, part 1 */
803 u32 mac02addr2; /* 0x.554 - MAC exact match address 2, part 2 */
804 u32 mac03addr1; /* 0x.558 - MAC exact match address 3, part 1 */
805 u32 mac03addr2; /* 0x.55c - MAC exact match address 3, part 2 */
806 u32 mac04addr1; /* 0x.560 - MAC exact match address 4, part 1 */
807 u32 mac04addr2; /* 0x.564 - MAC exact match address 4, part 2 */
808 u32 mac05addr1; /* 0x.568 - MAC exact match address 5, part 1 */
809 u32 mac05addr2; /* 0x.56c - MAC exact match address 5, part 2 */
810 u32 mac06addr1; /* 0x.570 - MAC exact match address 6, part 1 */
811 u32 mac06addr2; /* 0x.574 - MAC exact match address 6, part 2 */
812 u32 mac07addr1; /* 0x.578 - MAC exact match address 7, part 1 */
813 u32 mac07addr2; /* 0x.57c - MAC exact match address 7, part 2 */
814 u32 mac08addr1; /* 0x.580 - MAC exact match address 8, part 1 */
815 u32 mac08addr2; /* 0x.584 - MAC exact match address 8, part 2 */
816 u32 mac09addr1; /* 0x.588 - MAC exact match address 9, part 1 */
817 u32 mac09addr2; /* 0x.58c - MAC exact match address 9, part 2 */
818 u32 mac10addr1; /* 0x.590 - MAC exact match address 10, part 1*/
819 u32 mac10addr2; /* 0x.594 - MAC exact match address 10, part 2*/
820 u32 mac11addr1; /* 0x.598 - MAC exact match address 11, part 1*/
821 u32 mac11addr2; /* 0x.59c - MAC exact match address 11, part 2*/
822 u32 mac12addr1; /* 0x.5a0 - MAC exact match address 12, part 1*/
823 u32 mac12addr2; /* 0x.5a4 - MAC exact match address 12, part 2*/
824 u32 mac13addr1; /* 0x.5a8 - MAC exact match address 13, part 1*/
825 u32 mac13addr2; /* 0x.5ac - MAC exact match address 13, part 2*/
826 u32 mac14addr1; /* 0x.5b0 - MAC exact match address 14, part 1*/
827 u32 mac14addr2; /* 0x.5b4 - MAC exact match address 14, part 2*/
828 u32 mac15addr1; /* 0x.5b8 - MAC exact match address 15, part 1*/
829 u32 mac15addr2; /* 0x.5bc - MAC exact match address 15, part 2*/
/linux-4.1.27/arch/parisc/math-emu/
H A Dfloat.h111 * |s| exponent | mantissa part 1 |
115 * | mantissa part 2 |
188 * |s| exponent | mantissa part 1 |
192 * | mantissa part 2 |
196 * | mantissa part 3 |
200 * | mantissa part 4 |
335 * | integer part 2 |
339 * | integer part 3 |
343 * | integer part 4 |
/linux-4.1.27/arch/ia64/sn/kernel/
H A Dtiocx.c81 * @cx_device: part/mfg id for the device
92 * part/mfg == 0 we should return no-match (NULL) here. cx_device_match()
108 * @cx_device: part/mfg id for the device
158 * a table of part/mfg numbers and a pointer to the driver's
182 * @part_num: device's part number
224 * @cx_dev: part/mfg id for the device
236 * @part_num: device's part number
240 * call device-register with the given part/mfg numbers.
425 DBG("part= 0x%x, mfg= 0x%x\n", part_num, mfg_num); tiocx_reload()

Completed in 6896 milliseconds

1234567891011>>