| /linux/arch/powerpc/sysdev/ |
| H A D | msi_bitmap.c | 15 int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num) in msi_bitmap_alloc_hwirqs() argument 20 spin_lock_irqsave(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 22 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, in msi_bitmap_alloc_hwirqs() 24 if (offset >= bmp->irq_count) in msi_bitmap_alloc_hwirqs() 27 bitmap_set(bmp->bitmap, offset, num); in msi_bitmap_alloc_hwirqs() 28 spin_unlock_irqrestore(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 34 spin_unlock_irqrestore(&bmp->lock, flags); in msi_bitmap_alloc_hwirqs() 39 void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset, in msi_bitmap_free_hwirqs() argument 47 spin_lock_irqsave(&bmp->lock, flags); in msi_bitmap_free_hwirqs() 48 bitmap_clear(bmp->bitmap, offset, num); in msi_bitmap_free_hwirqs() [all …]
|
| /linux/tools/power/cpupower/utils/helpers/ |
| H A D | bitmask.c | 26 struct bitmask *bmp; in bitmask_alloc() local 28 bmp = malloc(sizeof(*bmp)); in bitmask_alloc() 29 if (!bmp) in bitmask_alloc() 31 bmp->size = n; in bitmask_alloc() 32 bmp->maskp = calloc(longsperbits(n), sizeof(unsigned long)); in bitmask_alloc() 33 if (!bmp->maskp) { in bitmask_alloc() 34 free(bmp); in bitmask_alloc() 37 return bmp; in bitmask_alloc() 41 void bitmask_free(struct bitmask *bmp) in bitmask_free() argument 43 if (!bmp) in bitmask_free() [all …]
|
| H A D | bitmask.h | 17 void bitmask_free(struct bitmask *bmp); 19 struct bitmask *bitmask_setbit(struct bitmask *bmp, unsigned int i); 20 struct bitmask *bitmask_setall(struct bitmask *bmp); 21 struct bitmask *bitmask_clearall(struct bitmask *bmp); 23 unsigned int bitmask_first(const struct bitmask *bmp); 24 unsigned int bitmask_next(const struct bitmask *bmp, unsigned int i); 25 unsigned int bitmask_last(const struct bitmask *bmp); 26 int bitmask_isallclear(const struct bitmask *bmp); 27 int bitmask_isbitset(const struct bitmask *bmp, unsigned int i); 29 int bitmask_parselist(const char *buf, struct bitmask *bmp); [all …]
|
| /linux/tools/testing/selftests/bpf/libarena/selftests/ |
| H A D | test_bitmap.bpf.c | 14 static void test_bmp_setall(struct arena_bitmap __arena *bmp) in test_bmp_setall() 19 bmp->bits[i] = ~0ULL; 25 struct arena_bitmap __arena *bmp; in test_bitmap_alloc_free() 27 bmp = bmp_alloc(TEST_BITS); in test_bitmap_alloc_free() 28 if (!bmp) in test_bitmap_alloc_free() 31 if (!bmp_empty(TEST_BITS, bmp)) in test_bitmap_alloc_free() 34 __bmp_set_bit(LAST_BIT, bmp); in test_bitmap_alloc_free() 35 if (!bmp_test_bit(LAST_BIT, bmp)) in test_bitmap_alloc_free() 38 __bmp_clear_bit(LAST_BIT, bmp); in test_bitmap_alloc_free() 39 if (bmp_test_bit(LAST_BIT, bmp)) in test_bitmap_alloc_free() 11 test_bmp_setall(struct arena_bitmap __arena * bmp) test_bmp_setall() argument 22 struct arena_bitmap __arena *bmp; test_bitmap_alloc_free() local 50 struct arena_bitmap __arena *bmp; test_bitmap_bit_ops() local 100 test_bitmap_test_and_clear_single(struct arena_bitmap __arena * bmp,size_t ind) test_bitmap_test_and_clear_single() argument 119 test_bitmap_test_and_set_single(struct arena_bitmap __arena * bmp,size_t ind) test_bitmap_test_and_set_single() argument 141 struct arena_bitmap __arena *bmp; test_bitmap_test_and_clear_bit() local 170 struct arena_bitmap __arena *bmp; test_bitmap_test_and_set_bit() local [all...] |
| /linux/tools/testing/selftests/bpf/libarena/src/ |
| H A D | bitmap.bpf.c | 15 struct arena_bitmap __arena *bmp; in bmp_alloc() local 16 size_t size = BITS_TO_LONG_LONGS(bits) * sizeof(bmp->bits[0]); in bmp_alloc() 22 bmp = (struct arena_bitmap __arena *)arena_malloc(size); in bmp_alloc() 23 if (!bmp) in bmp_alloc() 26 bmp_clear(bits, bmp); in bmp_alloc() 28 return bmp; in bmp_alloc() 32 void bmp_free(struct arena_bitmap __arena *bmp) in bmp_free() argument 34 arena_free(bmp); in bmp_free() 38 bool bmp_test_and_clear_bit(u32 bit, struct arena_bitmap __arena *bmp) in __bmp_set_bit() argument 45 old = bmp in __bmp_clear_bit() 44 __bmp_clear_bit(u32 bit,struct arena_bitmap __arena * bmp) __bmp_clear_bit() argument 50 bmp_test_bit(u32 bit,struct arena_bitmap __arena * bmp) bmp_test_bit() argument 56 bmp_test_and_clear_bit(u32 bit,struct arena_bitmap __arena * bmp) bmp_test_and_clear_bit() argument 80 bmp_test_and_set_bit(u32 bit,struct arena_bitmap __arena * bmp) bmp_test_and_set_bit() argument 104 bmp_clear_bit(u32 bit,struct arena_bitmap __arena * bmp) bmp_clear_bit() argument 119 bmp_set_bit(u32 bit,struct arena_bitmap __arena * bmp) bmp_set_bit() argument 134 bmp_clear(size_t bits,struct arena_bitmap __arena * bmp) bmp_clear() argument 177 bmp_empty(size_t bits,struct arena_bitmap __arena * bmp) bmp_empty() argument 238 bmp_print(size_t bits,struct arena_bitmap __arena * bmp) bmp_print() argument [all...] |
| /linux/fs/hpfs/ |
| H A D | alloc.c | 72 __le32 *bmp; in chk_if_allocated() local 73 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "chk"))) goto fail; in chk_if_allocated() 74 if ((le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) >> (sec & 0x1f)) & 1) { in chk_if_allocated() 81 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto fail; in chk_if_allocated() 82 if ((le32_to_cpu(bmp[ssec >> 5]) >> (ssec & 0x1f)) & 1) { in chk_if_allocated() 118 __le32 *bmp; in alloc_in_bmp() local 130 if (!(bmp = hpfs_map_bitmap(s, near >> 14, &qbh, "aib"))) goto uls; in alloc_in_bmp() 132 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto uls; in alloc_in_bmp() 134 if (!tstbits(bmp, nr, n + forward)) { in alloc_in_bmp() 139 while ((a = tstbits(bmp, q, n + forward)) != 0) { in alloc_in_bmp() [all …]
|
| H A D | hpfs_fn.h | 187 static inline unsigned tstbits(__le32 *bmp, unsigned b, unsigned n) in tstbits() argument 191 if (!((le32_to_cpu(bmp[(b & 0x3fff) >> 5]) >> (b & 0x1f)) & 1)) return 1; in tstbits() 193 if (!((le32_to_cpu(bmp[((b+i) & 0x3fff) >> 5]) >> ((b+i) & 0x1f)) & 1)) in tstbits() 293 __le32 *hpfs_load_bitmap_directory(struct super_block *, secno bmp);
|
| H A D | map.c | 112 __le32 *hpfs_load_bitmap_directory(struct super_block *s, secno bmp) in hpfs_load_bitmap_directory() argument 123 __le32 *d = hpfs_map_sector(s, bmp+i, &bh, n - i - 1); in hpfs_load_bitmap_directory()
|
| /linux/tools/testing/selftests/bpf/libarena/include/libarena/ |
| H A D | bitmap.h | 19 void bmp_free(struct arena_bitmap __arena *bmp); 21 void bmp_set_bit(u32 bit, struct arena_bitmap __arena *bmp); 22 void bmp_clear_bit(u32 bit, struct arena_bitmap __arena *bmp); 23 bool bmp_test_and_clear_bit(u32 bit, struct arena_bitmap __arena *bmp); 24 bool bmp_test_and_set_bit(u32 bit, struct arena_bitmap __arena *bmp); 26 void bmp_clear(size_t bits, struct arena_bitmap __arena *bmp); 29 bool bmp_empty(size_t bits, struct arena_bitmap __arena *bmp); 34 void bmp_print(size_t bits, struct arena_bitmap __arena *bmp); 37 void __bmp_set_bit(u32 bit, struct arena_bitmap __arena *bmp) 39 volatile u64 __arena *word = &bmp [all...] |
| /linux/arch/powerpc/include/asm/ |
| H A D | msi_bitmap.h | 20 int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num); 21 void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset, 23 void msi_bitmap_reserve_hwirq(struct msi_bitmap *bmp, unsigned int hwirq); 25 int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp); 27 int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, 29 void msi_bitmap_free(struct msi_bitmap *bmp);
|
| /linux/tools/testing/selftests/filesystems/mount_cycle/ |
| H A D | overmount_reparent_test.c | 131 char a[PATH_LEN], b[PATH_LEN], amp[PATH_LEN], bmp[PATH_LEN]; in TEST_F() local 144 snprintf(bmp, sizeof(bmp), "%s/b/mp", self->dir); in TEST_F() 152 fd = open(bmp, O_PATH | O_CLOEXEC); in TEST_F() 156 ASSERT_EQ(mount(NULL, bmp, NULL, MS_PRIVATE, NULL), 0); in TEST_F() 159 ASSERT_EQ(mount("tmpfs", bmp, "tmpfs", 0, NULL), 0); in TEST_F() 165 ASSERT_EQ(umount2(bmp, MNT_DETACH), 0); in TEST_F()
|
| /linux/arch/powerpc/platforms/44x/ |
| H A D | hsta_msi.c | 28 struct msi_bitmap bmp; member 52 irq = msi_bitmap_alloc_hwirqs(&ppc4xx_hsta_msi.bmp, 1); in hsta_setup_msi_irqs() 83 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); in hsta_setup_msi_irqs() 115 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); in hsta_teardown_msi_irqs() 150 ret = msi_bitmap_alloc(&ppc4xx_hsta_msi.bmp, irq_count, dev->of_node); in hsta_msi_probe() 181 msi_bitmap_free(&ppc4xx_hsta_msi.bmp); in hsta_msi_probe()
|
| /linux/fs/jfs/ |
| H A D | resize.c | 58 struct bmap *bmp = sbi->bmap; in jfs_extendfs() local 173 if (newFSSize < bmp->db_mapsize) { in jfs_extendfs() 300 mapSize = bmp->db_mapsize; in jfs_extendfs() 303 old_agsize = bmp->db_agsize; /* We need to know if this changes */ in jfs_extendfs() 325 agsizechanged |= (bmp->db_agsize != old_agsize); in jfs_extendfs() 488 j_sb->s_size = cpu_to_le64(bmp->db_mapsize << in jfs_extendfs() 490 j_sb->s_agsize = cpu_to_le32(bmp->db_agsize); in jfs_extendfs()
|
| H A D | jfs_extent.c | 315 struct bmap *bmp = sbi->bmap; in extBalloc() local 326 if (bmp->db_maxfreebud == -1) in extBalloc() 329 max = (s64) 1 << bmp->db_maxfreebud; in extBalloc() 358 atomic_inc(&bmp->db_active[ag]); in extBalloc() 361 atomic_dec(&bmp->db_active[ji->active_ag]); in extBalloc() 362 atomic_inc(&bmp->db_active[ag]); in extBalloc()
|
| /linux/arch/powerpc/platforms/ps3/ |
| H A D | interrupt.c | 69 * @bmp: ps3_bmp structure 70 * @bmp_lock: Synchronize access to bmp. 78 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); member 104 clear_bit(63 - d->irq, &pd->bmp.mask); in ps3_chip_mask() 125 set_bit(63 - d->irq, &pd->bmp.mask); in ps3_chip_unmask() 630 _dump_64_bmp("stat", &pd->bmp.status, pd->thread_id, func, line); in _dump_256_bmp() 631 _dump_64_bmp("mask", (u64*)&pd->bmp.mask, pd->thread_id, func, line); in _dump_256_bmp() 642 _dump_64_bmp("mask", (u64*)&pd->bmp.mask, pd->thread_id, func, line); in _dump_bmp() 695 u64 x = (pd->bmp.status & pd->bmp in ps3_register_ipi_irq() [all...] |
| /linux/drivers/scsi/lpfc/ |
| H A D | lpfc_ct.c | 119 struct lpfc_dmabuf *mp, *bmp; in lpfc_ct_unsol_cmpl() local 126 bmp = cmdiocb->bpl_dmabuf; in lpfc_ct_unsol_cmpl() 133 if (bmp) { in lpfc_ct_unsol_cmpl() 134 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); in lpfc_ct_unsol_cmpl() 135 kfree(bmp); in lpfc_ct_unsol_cmpl() 161 struct lpfc_dmabuf *bmp = NULL; in lpfc_ct_reject_event() local 181 bmp = kmalloc_obj(*bmp); in lpfc_ct_reject_event() 182 if (!bmp) { in lpfc_ct_reject_event() 586 lpfc_gen_req(struct lpfc_vport * vport,struct lpfc_dmabuf * bmp,struct lpfc_dmabuf * inp,struct lpfc_dmabuf * outp,void (* cmpl)(struct lpfc_hba *,struct lpfc_iocbq *,struct lpfc_iocbq *),struct lpfc_nodelist * ndlp,uint32_t event_tag,uint32_t num_entry,uint32_t tmo,uint8_t retry) lpfc_gen_req() argument 665 lpfc_ct_cmd(struct lpfc_vport * vport,struct lpfc_dmabuf * inmp,struct lpfc_dmabuf * bmp,struct lpfc_nodelist * ndlp,void (* cmpl)(struct lpfc_hba *,struct lpfc_iocbq *,struct lpfc_iocbq *),uint32_t rsp_size,uint8_t retry) lpfc_ct_cmd() argument 1890 struct lpfc_dmabuf *mp, *bmp; lpfc_ns_cmd() local 3679 struct lpfc_dmabuf *mp, *bmp; lpfc_vmid_cmd() local [all...] |
| H A D | lpfc_bsg.c | 307 struct lpfc_dmabuf *bmp, *cmp, *rmp; in lpfc_bsg_send_mgmt_cmd_cmp() local 335 bmp = cmdiocbq->bpl_dmabuf; in lpfc_bsg_send_mgmt_cmd_cmp() 368 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); in lpfc_bsg_send_mgmt_cmd_cmp() 369 kfree(bmp); in lpfc_bsg_send_mgmt_cmd_cmp() 398 struct lpfc_dmabuf *bmp = NULL, *cmp = NULL, *rmp = NULL; in lpfc_bsg_send_mgmt_cmd() local 433 bmp = kmalloc_obj(struct lpfc_dmabuf); in lpfc_bsg_send_mgmt_cmd() 434 if (!bmp) { in lpfc_bsg_send_mgmt_cmd() 438 bmp->virt = lpfc_mbuf_alloc(phba, 0, &bmp->phys); in lpfc_bsg_send_mgmt_cmd() 439 if (!bmp->virt) { in lpfc_bsg_send_mgmt_cmd() 444 INIT_LIST_HEAD(&bmp->list); in lpfc_bsg_send_mgmt_cmd() [all …]
|
| /linux/fs/xfs/scrub/ |
| H A D | rmap.c | 288 struct xagb_bitmap *bmp = NULL; in xchk_rmapbt_mark_bitmap() local 308 bmp = &cr->fs_owned; in xchk_rmapbt_mark_bitmap() 311 bmp = &cr->log_owned; in xchk_rmapbt_mark_bitmap() 314 bmp = &cr->ag_owned; in xchk_rmapbt_mark_bitmap() 317 bmp = &cr->inobt_owned; in xchk_rmapbt_mark_bitmap() 320 bmp = &cr->refcbt_owned; in xchk_rmapbt_mark_bitmap() 324 if (!bmp) in xchk_rmapbt_mark_bitmap() 327 if (xagb_bitmap_test(bmp, irec->rm_startblock, &fsbcount)) { in xchk_rmapbt_mark_bitmap() 348 return xagb_bitmap_clear(bmp, irec->rm_startblock, irec->rm_blockcount); in xchk_rmapbt_mark_bitmap()
|
| /linux/drivers/ps3/ |
| H A D | ps3-vuart.c | 104 const struct ports_bmp *bmp, const char *func, int line) in _dump_ports_bmp() argument 106 pr_debug("%s:%d: ports_bmp: %016llxh\n", func, line, bmp->status); in _dump_ports_bmp() 862 struct ports_bmp *bmp; member 886 dump_ports_bmp(bus_priv->bmp); in ps3_vuart_irq_handler() 888 port = (BITS_PER_LONG - 1) - __ilog2(bus_priv->bmp->status); in ps3_vuart_irq_handler() 915 BUG_ON(vuart_bus_priv.bmp); in ps3_vuart_bus_interrupt_get() 917 vuart_bus_priv.bmp = kzalloc_obj(struct ports_bmp); in ps3_vuart_bus_interrupt_get() 919 if (!vuart_bus_priv.bmp) { in ps3_vuart_bus_interrupt_get() 924 result = ps3_vuart_irq_setup(PS3_BINDING_CPU_ANY, vuart_bus_priv.bmp, in ps3_vuart_bus_interrupt_get() 950 kfree(vuart_bus_priv.bmp); in ps3_vuart_bus_interrupt_get() [all …]
|
| /linux/net/xfrm/ |
| H A D | xfrm_replay.c | 245 if (replay_esn->bmp[nr] & (1U << bitnr)) in xfrm_replay_check_bmp() 278 replay_esn->bmp[nr] &= ~(1U << bitnr); in xfrm_replay_advance_bmp() 283 replay_esn->bmp[i] = 0; in xfrm_replay_advance_bmp() 299 replay_esn->bmp[nr] |= (1U << bitnr); in xfrm_replay_advance_bmp() 498 if (replay_esn->bmp[nr] & (1U << bitnr)) in xfrm_replay_check_esn() 579 replay_esn->bmp[nr] &= ~(1U << bitnr); in xfrm_replay_advance_esn() 584 replay_esn->bmp[i] = 0; in xfrm_replay_advance_esn() 605 replay_esn->bmp[nr] |= (1U << bitnr); in xfrm_replay_advance_esn()
|
| /linux/drivers/vfio/pci/pds/ |
| H A D | dirty.c | 383 const void *bmp; in pds_vfio_dirty_seq_ack() local 389 bmp = (void *)((u64)seq_ack_bmp + offset); in pds_vfio_dirty_seq_ack() 390 page_offset = offset_in_page(bmp); in pds_vfio_dirty_seq_ack() 391 bmp -= page_offset; in pds_vfio_dirty_seq_ack() 404 struct page *page = vmalloc_to_page(bmp); in pds_vfio_dirty_seq_ack() 412 bmp += PAGE_SIZE; in pds_vfio_dirty_seq_ack()
|
| /linux/net/netfilter/ |
| H A D | nf_conntrack_h323_asn1.c | 513 unsigned int ext, bmp, i, opt, len = 0, bmp2, bmp2_len; in decode_seq() local 533 bmp = get_bitmap(bs, f->sz); in decode_seq() 535 *(unsigned int *)base = bmp; in decode_seq() 546 if (!((0x80000000U >> (opt++)) & bmp)) /* Not exist */ in decode_seq() 592 bmp |= bmp2 >> f->sz; in decode_seq() 594 *(unsigned int *)base = bmp; in decode_seq()
|
| /linux/fs/hfsplus/ |
| H A D | xattr.c | 63 char *bmp; in hfsplus_init_header_node() local 107 bmp = buf + offset; in hfsplus_init_header_node() 112 memset(bmp, 0xFF, used_bmp_bytes); in hfsplus_init_header_node() 113 bmp += used_bmp_bytes; in hfsplus_init_header_node() 116 *bmp = ~(0xFF >> used_nodes); in hfsplus_init_header_node()
|
| /linux/fs/ntfs3/ |
| H A D | index.c | 1544 struct ATTRIB *bmp, *alloc; in indx_add_allocate() 1548 err = indx_find_free(indx, ni, &bit, &bmp); in indx_add_allocate() 1553 bmp = NULL; in indx_add_allocate() 1556 if (bmp->non_res) { in indx_add_allocate() 1557 bmp_size = le64_to_cpu(bmp->nres.data_size); in indx_add_allocate() 1558 bmp_size_v = le64_to_cpu(bmp->nres.valid_size); in indx_add_allocate() 1560 bmp_size = bmp_size_v = le32_to_cpu(bmp->res.data_size); in indx_add_allocate() 1578 if (bmp) { in indx_add_allocate() 1591 if (bmp) in indx_add_allocate() 1605 if (bmp) in indx_add_allocate() 1539 struct ATTRIB *bmp, *alloc; indx_add_allocate() local [all...] |
| /linux/drivers/net/ethernet/freescale/enetc/ |
| H A D | enetc_hw.h | 223 #define ENETC_PVCLCTR_OVTPIDL(bmp) ((bmp) & 0xff) /* VLAN_TYPE */ 243 #define ENETC_PSICFGR0_SIVC(bmp) (((bmp) & 0xff) << 24) /* VLAN_TYPE */ 197 ENETC_PVCLCTR_OVTPIDL(bmp) global() argument 217 ENETC_PSICFGR0_SIVC(bmp) global() argument
|