Searched refs:bmp (Results 1 - 33 of 33) sorted by relevance

/linux-4.4.14/arch/powerpc/sysdev/
H A Dmsi_bitmap.c18 int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num) msi_bitmap_alloc_hwirqs() argument
23 spin_lock_irqsave(&bmp->lock, flags); msi_bitmap_alloc_hwirqs()
25 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, msi_bitmap_alloc_hwirqs()
27 if (offset > bmp->irq_count) msi_bitmap_alloc_hwirqs()
30 bitmap_set(bmp->bitmap, offset, num); msi_bitmap_alloc_hwirqs()
31 spin_unlock_irqrestore(&bmp->lock, flags); msi_bitmap_alloc_hwirqs()
37 spin_unlock_irqrestore(&bmp->lock, flags); msi_bitmap_alloc_hwirqs()
42 void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset, msi_bitmap_free_hwirqs() argument
50 spin_lock_irqsave(&bmp->lock, flags); msi_bitmap_free_hwirqs()
51 bitmap_clear(bmp->bitmap, offset, num); msi_bitmap_free_hwirqs()
52 spin_unlock_irqrestore(&bmp->lock, flags); msi_bitmap_free_hwirqs()
56 void msi_bitmap_reserve_hwirq(struct msi_bitmap *bmp, unsigned int hwirq) msi_bitmap_reserve_hwirq() argument
62 spin_lock_irqsave(&bmp->lock, flags); msi_bitmap_reserve_hwirq()
63 bitmap_allocate_region(bmp->bitmap, hwirq, 0); msi_bitmap_reserve_hwirq()
64 spin_unlock_irqrestore(&bmp->lock, flags); msi_bitmap_reserve_hwirq()
69 * @bmp: pointer to the MSI bitmap.
78 int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp) msi_bitmap_reserve_dt_hwirqs() argument
83 if (!bmp->of_node) msi_bitmap_reserve_dt_hwirqs()
86 p = of_get_property(bmp->of_node, "msi-available-ranges", &len); msi_bitmap_reserve_dt_hwirqs()
89 "found on %s\n", bmp->of_node->full_name); msi_bitmap_reserve_dt_hwirqs()
95 " property on %s\n", bmp->of_node->full_name); msi_bitmap_reserve_dt_hwirqs()
99 bitmap_allocate_region(bmp->bitmap, 0, get_count_order(bmp->irq_count)); msi_bitmap_reserve_dt_hwirqs()
101 spin_lock(&bmp->lock); msi_bitmap_reserve_dt_hwirqs()
107 bitmap_release_region(bmp->bitmap, *p + j, 0); msi_bitmap_reserve_dt_hwirqs()
110 spin_unlock(&bmp->lock); msi_bitmap_reserve_dt_hwirqs()
115 int __init_refok msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, msi_bitmap_alloc() argument
126 bmp->bitmap_from_slab = slab_is_available(); msi_bitmap_alloc()
127 if (bmp->bitmap_from_slab) msi_bitmap_alloc()
128 bmp->bitmap = kzalloc(size, GFP_KERNEL); msi_bitmap_alloc()
130 bmp->bitmap = memblock_virt_alloc(size, 0); msi_bitmap_alloc()
132 kmemleak_not_leak(bmp->bitmap); msi_bitmap_alloc()
135 if (!bmp->bitmap) { msi_bitmap_alloc()
141 spin_lock_init(&bmp->lock); msi_bitmap_alloc()
142 bmp->of_node = of_node_get(of_node); msi_bitmap_alloc()
143 bmp->irq_count = irq_count; msi_bitmap_alloc()
148 void msi_bitmap_free(struct msi_bitmap *bmp) msi_bitmap_free() argument
150 if (bmp->bitmap_from_slab) msi_bitmap_free()
151 kfree(bmp->bitmap); msi_bitmap_free()
152 of_node_put(bmp->of_node); msi_bitmap_free()
153 bmp->bitmap = NULL; msi_bitmap_free()
160 struct msi_bitmap bmp; test_basics() local
164 WARN_ON(msi_bitmap_alloc(&bmp, 0, NULL) == 0); test_basics()
167 WARN_ON(msi_bitmap_alloc(&bmp, size, NULL)); test_basics()
170 WARN_ON(bitmap_find_free_region(bmp.bitmap, size, get_count_order(size))); test_basics()
171 bitmap_release_region(bmp.bitmap, 0, get_count_order(size)); test_basics()
174 WARN_ON(msi_bitmap_reserve_dt_hwirqs(&bmp) <= 0); test_basics()
177 WARN_ON(bitmap_find_free_region(bmp.bitmap, size, get_count_order(size))); test_basics()
178 bitmap_release_region(bmp.bitmap, 0, get_count_order(size)); test_basics()
182 WARN_ON(msi_bitmap_alloc_hwirqs(&bmp, 1) < 0); test_basics()
184 WARN_ON(msi_bitmap_alloc_hwirqs(&bmp, 1) >= 0); test_basics()
187 WARN_ON(bitmap_find_free_region(bmp.bitmap, size, 0) >= 0); test_basics()
190 msi_bitmap_free_hwirqs(&bmp, size / 2, 1); test_basics()
191 WARN_ON(msi_bitmap_alloc_hwirqs(&bmp, 1) != size / 2); test_basics()
194 msi_bitmap_free_hwirqs(&bmp, 3, size - 3); test_basics()
197 rc = msi_bitmap_alloc_hwirqs(&bmp, 2); test_basics()
199 rc = msi_bitmap_alloc_hwirqs(&bmp, 4); test_basics()
201 rc = msi_bitmap_alloc_hwirqs(&bmp, 8); test_basics()
203 rc = msi_bitmap_alloc_hwirqs(&bmp, 9); test_basics()
205 rc = msi_bitmap_alloc_hwirqs(&bmp, 3); test_basics()
207 rc = msi_bitmap_alloc_hwirqs(&bmp, 7); test_basics()
209 rc = msi_bitmap_alloc_hwirqs(&bmp, 121); test_basics()
212 msi_bitmap_free(&bmp); test_basics()
215 WARN_ON(bmp.bitmap != NULL); test_basics()
226 struct msi_bitmap bmp; test_of_node() local
235 WARN_ON(msi_bitmap_alloc(&bmp, size, &of_node)); test_of_node()
238 WARN_ON(msi_bitmap_reserve_dt_hwirqs(&bmp) <= 0); test_of_node()
241 WARN_ON(bitmap_find_free_region(bmp.bitmap, size, get_count_order(size))); test_of_node()
242 bitmap_release_region(bmp.bitmap, 0, get_count_order(size)); test_of_node()
255 WARN_ON(msi_bitmap_reserve_dt_hwirqs(&bmp)); test_of_node()
259 WARN_ON(!bitmap_equal(expected, bmp.bitmap, size)); test_of_node()
261 msi_bitmap_free(&bmp); test_of_node()
262 kfree(bmp.bitmap); test_of_node()
H A Dppc4xx_hsta_msi.c31 struct msi_bitmap bmp; member in struct:ppc4xx_hsta_msi
55 irq = msi_bitmap_alloc_hwirqs(&ppc4xx_hsta_msi.bmp, 1); for_each_pci_msi_entry()
86 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); for_each_pci_msi_entry()
121 msi_bitmap_free_hwirqs(&ppc4xx_hsta_msi.bmp, irq, 1); for_each_pci_msi_entry()
155 ret = msi_bitmap_alloc(&ppc4xx_hsta_msi.bmp, irq_count, dev->of_node); hsta_msi_probe()
186 msi_bitmap_free(&ppc4xx_hsta_msi.bmp); hsta_msi_probe()
/linux-4.4.14/tools/power/cpupower/utils/helpers/
H A Dbitmask.h16 void bitmask_free(struct bitmask *bmp);
18 struct bitmask *bitmask_setbit(struct bitmask *bmp, unsigned int i);
19 struct bitmask *bitmask_setall(struct bitmask *bmp);
20 struct bitmask *bitmask_clearall(struct bitmask *bmp);
22 unsigned int bitmask_first(const struct bitmask *bmp);
23 unsigned int bitmask_next(const struct bitmask *bmp, unsigned int i);
24 unsigned int bitmask_last(const struct bitmask *bmp);
25 int bitmask_isallclear(const struct bitmask *bmp);
26 int bitmask_isbitset(const struct bitmask *bmp, unsigned int i);
28 int bitmask_parselist(const char *buf, struct bitmask *bmp);
29 int bitmask_displaylist(char *buf, int len, const struct bitmask *bmp);
H A Dbitmask.c25 struct bitmask *bmp; bitmask_alloc() local
27 bmp = malloc(sizeof(*bmp)); bitmask_alloc()
28 if (bmp == 0) bitmask_alloc()
30 bmp->size = n; bitmask_alloc()
31 bmp->maskp = calloc(longsperbits(n), sizeof(unsigned long)); bitmask_alloc()
32 if (bmp->maskp == 0) { bitmask_alloc()
33 free(bmp); bitmask_alloc()
36 return bmp; bitmask_alloc()
40 void bitmask_free(struct bitmask *bmp) bitmask_free() argument
42 if (bmp == 0) bitmask_free()
44 free(bmp->maskp); bitmask_free()
45 bmp->maskp = (unsigned long *)0xdeadcdef; /* double free tripwire */ bitmask_free()
46 free(bmp); bitmask_free()
51 * routines that actually understand the layout of bmp->maskp[].
60 /* Return the value (0 or 1) of bit n in bitmask bmp */ _getbit()
61 static unsigned int _getbit(const struct bitmask *bmp, unsigned int n) _getbit() argument
63 if (n < bmp->size) _getbit()
64 return (bmp->maskp[n/bitsperlong] >> (n % bitsperlong)) & 1; _getbit()
69 /* Set bit n in bitmask bmp to value v (0 or 1) */ _setbit()
70 static void _setbit(struct bitmask *bmp, unsigned int n, unsigned int v) _setbit() argument
72 if (n < bmp->size) { _setbit()
74 bmp->maskp[n/bitsperlong] |= 1UL << (n % bitsperlong); _setbit()
76 bmp->maskp[n/bitsperlong] &= _setbit()
114 struct bitmask *bitmask_setbit(struct bitmask *bmp, unsigned int i) bitmask_setbit() argument
116 _setbit(bmp, i, 1); bitmask_setbit()
117 return bmp; bitmask_setbit()
120 /* Set all bits in bitmask: bmp = ~0 */ bitmask_setall()
121 struct bitmask *bitmask_setall(struct bitmask *bmp) bitmask_setall() argument
124 for (i = 0; i < bmp->size; i++) bitmask_setall()
125 _setbit(bmp, i, 1); bitmask_setall()
126 return bmp; bitmask_setall()
129 /* Clear all bits in bitmask: bmp = 0 */ bitmask_clearall()
130 struct bitmask *bitmask_clearall(struct bitmask *bmp) bitmask_clearall() argument
133 for (i = 0; i < bmp->size; i++) bitmask_clearall()
134 _setbit(bmp, i, 0); bitmask_clearall()
135 return bmp; bitmask_clearall()
139 int bitmask_isallclear(const struct bitmask *bmp) bitmask_isallclear() argument
142 for (i = 0; i < bmp->size; i++) bitmask_isallclear()
143 if (_getbit(bmp, i)) bitmask_isallclear()
149 int bitmask_isbitset(const struct bitmask *bmp, unsigned int i) bitmask_isbitset() argument
151 return _getbit(bmp, i); bitmask_isbitset()
155 unsigned int bitmask_first(const struct bitmask *bmp) bitmask_first() argument
157 return bitmask_next(bmp, 0); bitmask_first()
161 unsigned int bitmask_last(const struct bitmask *bmp) bitmask_last() argument
164 unsigned int m = bmp->size; bitmask_last()
165 for (i = 0; i < bmp->size; i++) bitmask_last()
166 if (_getbit(bmp, i)) bitmask_last()
172 unsigned int bitmask_next(const struct bitmask *bmp, unsigned int i) bitmask_next() argument
175 for (n = i; n < bmp->size; n++) bitmask_next()
176 if (_getbit(bmp, n)) bitmask_next()
191 int bitmask_parselist(const char *buf, struct bitmask *bmp) bitmask_parselist() argument
195 bitmask_clearall(bmp); bitmask_parselist()
226 if (b >= bmp->size) bitmask_parselist()
229 _setbit(bmp, a, 1); bitmask_parselist()
235 bitmask_clearall(bmp); bitmask_parselist()
261 * Write decimal list representation of bmp to buf.
274 int bitmask_displaylist(char *buf, int buflen, const struct bitmask *bmp) bitmask_displaylist() argument
282 rbot = cur = bitmask_first(bmp); bitmask_displaylist()
283 while (cur < bmp->size) { bitmask_displaylist()
285 cur = bitmask_next(bmp, cur+1); bitmask_displaylist()
286 if (cur >= bmp->size || cur > rtop + 1) { bitmask_displaylist()
/linux-4.4.14/arch/powerpc/include/asm/
H A Dmsi_bitmap.h25 int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num);
26 void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset,
28 void msi_bitmap_reserve_hwirq(struct msi_bitmap *bmp, unsigned int hwirq);
30 int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp);
32 int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count,
34 void msi_bitmap_free(struct msi_bitmap *bmp);
/linux-4.4.14/fs/hpfs/
H A Dalloc.c71 __le32 *bmp; chk_if_allocated() local
72 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "chk"))) goto fail; chk_if_allocated()
73 if ((le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) >> (sec & 0x1f)) & 1) { chk_if_allocated()
80 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto fail; chk_if_allocated()
81 if ((le32_to_cpu(bmp[ssec >> 5]) >> (ssec & 0x1f)) & 1) { chk_if_allocated()
117 __le32 *bmp; alloc_in_bmp() local
129 if (!(bmp = hpfs_map_bitmap(s, near >> 14, &qbh, "aib"))) goto uls; alloc_in_bmp()
131 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) goto uls; alloc_in_bmp()
133 if (!tstbits(bmp, nr, n + forward)) { alloc_in_bmp()
138 while ((a = tstbits(bmp, q, n + forward)) != 0) { alloc_in_bmp()
156 if (!le32_to_cpu(bmp[i])) goto cont; alloc_in_bmp()
157 if (n + forward >= 0x3f && le32_to_cpu(bmp[i]) != 0xffffffff) goto cont; alloc_in_bmp()
160 unsigned k = le32_to_cpu(bmp[i-1]); alloc_in_bmp()
166 while ((a = tstbits(bmp, q, n + forward)) != 0) { alloc_in_bmp()
180 if (hpfs_sb(s)->sb_chk && ((ret >> 14) != (bs >> 14) || (le32_to_cpu(bmp[(ret & 0x3fff) >> 5]) | ~(((1 << n) - 1) << (ret & 0x1f))) != 0xffffffff)) { alloc_in_bmp()
185 bmp[(ret & 0x3fff) >> 5] &= cpu_to_le32(~(((1 << n) - 1) << (ret & 0x1f))); alloc_in_bmp()
298 __le32 *bmp; hpfs_alloc_if_possible() local
299 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "aip"))) goto end; hpfs_alloc_if_possible()
300 if (le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) & (1 << (sec & 0x1f))) { hpfs_alloc_if_possible()
301 bmp[(sec & 0x3fff) >> 5] &= cpu_to_le32(~(1 << (sec & 0x1f))); hpfs_alloc_if_possible()
317 __le32 *bmp; hpfs_free_sectors() local
328 if (!(bmp = hpfs_map_bitmap(s, sec >> 14, &qbh, "free"))) { hpfs_free_sectors()
332 if ((le32_to_cpu(bmp[(sec & 0x3fff) >> 5]) >> (sec & 0x1f) & 1)) { hpfs_free_sectors()
337 bmp[(sec & 0x3fff) >> 5] |= cpu_to_le32(1 << (sec & 0x1f)); hpfs_free_sectors()
363 __le32 *bmp; hpfs_check_free_dnodes() local
365 if ((bmp = hpfs_map_dnode_bitmap(s, &qbh))) { hpfs_check_free_dnodes()
368 if (!le32_to_cpu(bmp[j])) continue; hpfs_check_free_dnodes()
369 for (k = le32_to_cpu(bmp[j]); k; k >>= 1) if (k & 1) if (!--n) { hpfs_check_free_dnodes()
378 bmp = hpfs_map_bitmap(s, b, &qbh, "chkdn1"); hpfs_check_free_dnodes()
384 bmp = hpfs_map_bitmap(s, i, &qbh, "chkdn2"); hpfs_check_free_dnodes()
386 if (bmp) { hpfs_check_free_dnodes()
389 if (!le32_to_cpu(bmp[j])) continue; hpfs_check_free_dnodes()
391 if ((le32_to_cpu(bmp[j]) & k) == k) { hpfs_check_free_dnodes()
415 __le32 *bmp; hpfs_free_dnode() local
417 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) { hpfs_free_dnode()
420 bmp[ssec >> 5] |= cpu_to_le32(1 << (ssec & 0x1f)); hpfs_free_dnode()
488 static unsigned find_run(__le32 *bmp, unsigned *idx) find_run() argument
491 while (tstbits(bmp, *idx, 1)) { find_run()
497 while (!tstbits(bmp, *idx + len, 1)) find_run()
529 __le32 *bmp; hpfs_trim_fs() local
545 if (!(bmp = hpfs_map_dnode_bitmap(s, &qbh))) { hpfs_trim_fs()
550 while ((len = find_run(bmp, &idx)) && !err) { hpfs_trim_fs()
566 if (!(bmp = hpfs_map_bitmap(s, start_bmp, &qbh, "trim"))) { hpfs_trim_fs()
571 while ((len = find_run(bmp, &idx)) && !err) { hpfs_trim_fs()
H A Dhpfs_fn.h187 static inline unsigned tstbits(__le32 *bmp, unsigned b, unsigned n) tstbits() argument
191 if (!((le32_to_cpu(bmp[(b & 0x3fff) >> 5]) >> (b & 0x1f)) & 1)) return 1; tstbits()
193 if (!((le32_to_cpu(bmp[((b+i) & 0x3fff) >> 5]) >> ((b+i) & 0x1f)) & 1)) tstbits()
293 __le32 *hpfs_load_bitmap_directory(struct super_block *, secno bmp);
H A Dmap.c111 __le32 *hpfs_load_bitmap_directory(struct super_block *s, secno bmp) hpfs_load_bitmap_directory() argument
122 __le32 *d = hpfs_map_sector(s, bmp+i, &bh, n - i - 1); hpfs_load_bitmap_directory()
/linux-4.4.14/fs/jfs/
H A Djfs_dmap.c70 #define BMAP_LOCK_INIT(bmp) mutex_init(&bmp->db_bmaplock)
71 #define BMAP_LOCK(bmp) mutex_lock(&bmp->db_bmaplock)
72 #define BMAP_UNLOCK(bmp) mutex_unlock(&bmp->db_bmaplock)
77 static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
83 static int dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc,
85 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results);
86 static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno,
88 static int dbAllocNear(struct bmap * bmp, struct dmap * dp, s64 blkno,
91 static int dbAllocDmap(struct bmap * bmp, struct dmap * dp, s64 blkno,
93 static int dbAllocDmapLev(struct bmap * bmp, struct dmap * dp, int nblocks,
96 static int dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb,
98 static int dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno,
102 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno);
104 static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
106 static int dbFreeDmap(struct bmap * bmp, struct dmap * dp, s64 blkno,
114 static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno,
167 struct bmap *bmp; dbMount() local
176 bmp = kmalloc(sizeof(struct bmap), GFP_KERNEL); dbMount()
177 if (bmp == NULL) dbMount()
185 kfree(bmp); dbMount()
191 bmp->db_mapsize = le64_to_cpu(dbmp_le->dn_mapsize); dbMount()
192 bmp->db_nfree = le64_to_cpu(dbmp_le->dn_nfree); dbMount()
193 bmp->db_l2nbperpage = le32_to_cpu(dbmp_le->dn_l2nbperpage); dbMount()
194 bmp->db_numag = le32_to_cpu(dbmp_le->dn_numag); dbMount()
195 bmp->db_maxlevel = le32_to_cpu(dbmp_le->dn_maxlevel); dbMount()
196 bmp->db_maxag = le32_to_cpu(dbmp_le->dn_maxag); dbMount()
197 bmp->db_agpref = le32_to_cpu(dbmp_le->dn_agpref); dbMount()
198 bmp->db_aglevel = le32_to_cpu(dbmp_le->dn_aglevel); dbMount()
199 bmp->db_agheight = le32_to_cpu(dbmp_le->dn_agheight); dbMount()
200 bmp->db_agwidth = le32_to_cpu(dbmp_le->dn_agwidth); dbMount()
201 bmp->db_agstart = le32_to_cpu(dbmp_le->dn_agstart); dbMount()
202 bmp->db_agl2size = le32_to_cpu(dbmp_le->dn_agl2size); dbMount()
204 bmp->db_agfree[i] = le64_to_cpu(dbmp_le->dn_agfree[i]); dbMount()
205 bmp->db_agsize = le64_to_cpu(dbmp_le->dn_agsize); dbMount()
206 bmp->db_maxfreebud = dbmp_le->dn_maxfreebud; dbMount()
212 bmp->db_ipbmap = ipbmap; dbMount()
213 JFS_SBI(ipbmap->i_sb)->bmap = bmp; dbMount()
215 memset(bmp->db_active, 0, sizeof(bmp->db_active)); dbMount()
220 BMAP_LOCK_INIT(bmp); dbMount()
244 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbUnmount() local
255 kfree(bmp); dbUnmount()
266 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbSync() local
283 dbmp_le->dn_mapsize = cpu_to_le64(bmp->db_mapsize); dbSync()
284 dbmp_le->dn_nfree = cpu_to_le64(bmp->db_nfree); dbSync()
285 dbmp_le->dn_l2nbperpage = cpu_to_le32(bmp->db_l2nbperpage); dbSync()
286 dbmp_le->dn_numag = cpu_to_le32(bmp->db_numag); dbSync()
287 dbmp_le->dn_maxlevel = cpu_to_le32(bmp->db_maxlevel); dbSync()
288 dbmp_le->dn_maxag = cpu_to_le32(bmp->db_maxag); dbSync()
289 dbmp_le->dn_agpref = cpu_to_le32(bmp->db_agpref); dbSync()
290 dbmp_le->dn_aglevel = cpu_to_le32(bmp->db_aglevel); dbSync()
291 dbmp_le->dn_agheight = cpu_to_le32(bmp->db_agheight); dbSync()
292 dbmp_le->dn_agwidth = cpu_to_le32(bmp->db_agwidth); dbSync()
293 dbmp_le->dn_agstart = cpu_to_le32(bmp->db_agstart); dbSync()
294 dbmp_le->dn_agl2size = cpu_to_le32(bmp->db_agl2size); dbSync()
296 dbmp_le->dn_agfree[i] = cpu_to_le64(bmp->db_agfree[i]); dbSync()
297 dbmp_le->dn_agsize = cpu_to_le64(bmp->db_agsize); dbSync()
298 dbmp_le->dn_maxfreebud = bmp->db_maxfreebud; dbSync()
338 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbFree() local
344 if (unlikely((blkno == 0) || (blkno + nblocks > bmp->db_mapsize))) { dbFree()
371 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); dbFree()
385 if ((rc = dbFreeDmap(bmp, dp, blkno, nb))) { dbFree()
429 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbUpdatePMap() local
439 if (blkno + nblocks > bmp->db_mapsize) { dbUpdatePMap()
459 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); dbUpdatePMap()
465 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, dbUpdatePMap()
610 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbNextAG() local
612 BMAP_LOCK(bmp); dbNextAG()
615 avgfree = (u32)bmp->db_nfree / bmp->db_numag; dbNextAG()
621 agpref = bmp->db_agpref; dbNextAG()
622 if ((atomic_read(&bmp->db_active[agpref]) == 0) && dbNextAG()
623 (bmp->db_agfree[agpref] >= avgfree)) dbNextAG()
629 for (i = 0 ; i < bmp->db_numag; i++, agpref++) { dbNextAG()
630 if (agpref == bmp->db_numag) dbNextAG()
633 if (atomic_read(&bmp->db_active[agpref])) dbNextAG()
636 if (bmp->db_agfree[agpref] >= avgfree) { dbNextAG()
638 bmp->db_agpref = agpref; dbNextAG()
640 } else if (bmp->db_agfree[agpref] > hwm) { dbNextAG()
642 hwm = bmp->db_agfree[agpref]; dbNextAG()
652 bmp->db_agpref = next_best; dbNextAG()
655 BMAP_UNLOCK(bmp); dbNextAG()
659 return (bmp->db_agpref); dbNextAG()
704 struct bmap *bmp; dbAlloc() local
721 bmp = JFS_SBI(ip->i_sb)->bmap; dbAlloc()
723 mapSize = bmp->db_mapsize; dbAlloc()
734 if (l2nb > bmp->db_agl2size) { dbAlloc()
737 rc = dbAllocAny(bmp, nblocks, l2nb, results); dbAlloc()
754 if (blkno >= bmp->db_mapsize) dbAlloc()
757 agno = blkno >> bmp->db_agl2size; dbAlloc()
763 if ((blkno & (bmp->db_agsize - 1)) == 0) dbAlloc()
768 if (atomic_read(&bmp->db_active[agno])) dbAlloc()
781 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); dbAlloc()
791 if ((rc = dbAllocNext(bmp, dp, blkno, (int) nblocks)) dbAlloc()
802 writers = atomic_read(&bmp->db_active[agno]); dbAlloc()
818 dbAllocNear(bmp, dp, blkno, (int) nblocks, l2nb, results)) dbAlloc()
830 if ((rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results)) dbAlloc()
847 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) != -ENOSPC) dbAlloc()
863 if ((rc = dbAllocAG(bmp, agno, nblocks, l2nb, results)) == -ENOSPC) dbAlloc()
864 rc = dbAllocAny(bmp, nblocks, l2nb, results); dbAlloc()
897 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbAllocExact() local
911 if (nblocks <= 0 || nblocks > BPERDMAP || blkno >= bmp->db_mapsize) { dbAllocExact()
916 if (nblocks > ((s64) 1 << bmp->db_maxfreebud)) { dbAllocExact()
923 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); dbAllocExact()
932 rc = dbAllocNext(bmp, dp, blkno, nblocks); dbAllocExact()
1035 struct bmap *bmp; dbExtend() local
1055 bmp = sbi->bmap; dbExtend()
1056 if (lastblkno < 0 || lastblkno >= bmp->db_mapsize) { dbExtend()
1070 if (addnblocks > BPERDMAP || extblkno >= bmp->db_mapsize || dbExtend()
1071 (extblkno & (bmp->db_agsize - 1)) == 0) { dbExtend()
1079 lblkno = BLKTODMAP(extblkno, bmp->db_l2nbperpage); dbExtend()
1091 rc = dbAllocNext(bmp, dp, extblkno, (int) addnblocks); dbExtend()
1113 * bmp - pointer to bmap descriptor
1125 static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocNext() argument
1134 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmap page\n"); dbAllocNext()
1225 return (dbAllocDmap(bmp, dp, blkno, nblocks)); dbAllocNext()
1241 * bmp - pointer to bmap descriptor
1257 dbAllocNear(struct bmap * bmp, dbAllocNear() argument
1264 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmap page\n"); dbAllocNear()
1301 if ((rc = dbAllocDmap(bmp, dp, blkno, nblocks)) == 0) dbAllocNear()
1351 * bmp - pointer to bmap descriptor
1366 dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) dbAllocAG() argument
1377 if (l2nb > bmp->db_agl2size) { dbAllocAG()
1378 jfs_error(bmp->db_ipbmap->i_sb, dbAllocAG()
1386 blkno = (s64) agno << bmp->db_agl2size; dbAllocAG()
1405 if (bmp->db_agsize == BPERDMAP dbAllocAG()
1406 || bmp->db_agfree[agno] == bmp->db_agsize) { dbAllocAG()
1407 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); dbAllocAG()
1409 (bmp->db_agfree[agno] == bmp->db_agsize)) { dbAllocAG()
1413 jfs_error(bmp->db_ipbmap->i_sb, dbAllocAG()
1422 lblkno = BLKTOCTL(blkno, bmp->db_l2nbperpage, bmp->db_aglevel); dbAllocAG()
1423 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); dbAllocAG()
1430 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmapctl page\n"); dbAllocAG()
1443 (1 << (L2LPERCTL - (bmp->db_agheight << 1))) / bmp->db_agwidth; dbAllocAG()
1444 ti = bmp->db_agstart + bmp->db_agwidth * (agno & (agperlev - 1)); dbAllocAG()
1452 for (i = 0; i < bmp->db_agwidth; i++, ti++) { dbAllocAG()
1462 for (k = bmp->db_agheight; k > 0; k--) { dbAllocAG()
1470 jfs_error(bmp->db_ipbmap->i_sb, dbAllocAG()
1480 if (bmp->db_aglevel == 2) dbAllocAG()
1482 else if (bmp->db_aglevel == 1) dbAllocAG()
1484 else /* bmp->db_aglevel == 0 */ dbAllocAG()
1507 dbFindCtl(bmp, l2nb, bmp->db_aglevel - 1, dbAllocAG()
1510 jfs_error(bmp->db_ipbmap->i_sb, dbAllocAG()
1520 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); dbAllocAG()
1522 jfs_error(bmp->db_ipbmap->i_sb, dbAllocAG()
1551 * bmp - pointer to bmap descriptor
1564 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results) dbAllocAny() argument
1575 if ((rc = dbFindCtl(bmp, l2nb, bmp->db_maxlevel, &blkno))) dbAllocAny()
1580 rc = dbAllocCtl(bmp, nblocks, l2nb, blkno, results); dbAllocAny()
1582 jfs_error(bmp->db_ipbmap->i_sb, "unable to allocate blocks\n"); dbAllocAny()
1622 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbDiscardAG() local
1640 nblocks = bmp->db_agfree[agno]; dbDiscardAG()
1646 jfs_error(bmp->db_ipbmap->i_sb, "no memory for trim array\n"); dbDiscardAG()
1656 rc = dbAllocAG(bmp, agno, nblocks, l2nb, &blkno); dbDiscardAG()
1663 if (bmp->db_agfree[agno] == 0) dbDiscardAG()
1667 nblocks = bmp->db_agfree[agno]; dbDiscardAG()
1675 jfs_error(bmp->db_ipbmap->i_sb, "-EIO\n"); dbDiscardAG()
1713 * bmp - pointer to bmap descriptor
1727 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) dbFindCtl() argument
1744 lblkno = BLKTOCTL(b, bmp->db_l2nbperpage, lev); dbFindCtl()
1745 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); dbFindCtl()
1752 jfs_error(bmp->db_ipbmap->i_sb, dbFindCtl()
1773 jfs_error(bmp->db_ipbmap->i_sb, dbFindCtl()
1830 * bmp - pointer to bmap descriptor
1846 dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) dbAllocCtl() argument
1858 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); dbAllocCtl()
1859 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); dbAllocCtl()
1866 rc = dbAllocDmapLev(bmp, dp, (int) nblocks, l2nb, results); dbAllocCtl()
1885 lblkno = BLKTODMAP(b, bmp->db_l2nbperpage); dbAllocCtl()
1886 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); dbAllocCtl()
1897 jfs_error(bmp->db_ipbmap->i_sb, dbAllocCtl()
1909 if ((rc = dbAllocDmap(bmp, dp, b, nb))) { dbAllocCtl()
1938 lblkno = BLKTODMAP(b, bmp->db_l2nbperpage); dbAllocCtl()
1939 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); dbAllocCtl()
1944 jfs_error(bmp->db_ipbmap->i_sb, dbAllocCtl()
1952 if (dbFreeDmap(bmp, dp, b, BPERDMAP)) { dbAllocCtl()
1957 jfs_error(bmp->db_ipbmap->i_sb, "Block Leakage\n"); dbAllocCtl()
1997 dbAllocDmapLev(struct bmap * bmp, dbAllocDmapLev() argument
2026 if ((rc = dbAllocDmap(bmp, dp, blkno, nblocks)) == 0) dbAllocDmapLev()
2049 * bmp - pointer to bmap descriptor
2060 static int dbAllocDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocDmap() argument
2072 dbAllocBits(bmp, dp, blkno, nblocks); dbAllocDmap()
2082 if ((rc = dbAdjCtl(bmp, blkno, dp->tree.stree[ROOT], 1, 0))) dbAllocDmap()
2083 dbFreeBits(bmp, dp, blkno, nblocks); dbAllocDmap()
2104 * bmp - pointer to bmap descriptor
2115 static int dbFreeDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, dbFreeDmap() argument
2127 rc = dbFreeBits(bmp, dp, blkno, nblocks); dbFreeDmap()
2137 if ((rc = dbAdjCtl(bmp, blkno, dp->tree.stree[ROOT], 0, 0))) { dbFreeDmap()
2148 dbAllocBits(bmp, dp, blkno, nblocks); dbFreeDmap()
2168 * bmp - pointer to bmap descriptor
2177 static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocBits() argument
2253 jfs_error(bmp->db_ipbmap->i_sb, dbAllocBits()
2284 BMAP_LOCK(bmp); dbAllocBits()
2290 agno = blkno >> bmp->db_agl2size; dbAllocBits()
2291 if (agno > bmp->db_maxag) dbAllocBits()
2292 bmp->db_maxag = agno; dbAllocBits()
2295 bmp->db_agfree[agno] -= nblocks; dbAllocBits()
2296 bmp->db_nfree -= nblocks; dbAllocBits()
2298 BMAP_UNLOCK(bmp); dbAllocBits()
2315 * bmp - pointer to bmap descriptor
2324 static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, dbFreeBits() argument
2428 BMAP_LOCK(bmp); dbFreeBits()
2433 agno = blkno >> bmp->db_agl2size; dbFreeBits()
2434 bmp->db_nfree += nblocks; dbFreeBits()
2435 bmp->db_agfree[agno] += nblocks; dbFreeBits()
2442 if ((bmp->db_agfree[agno] == bmp->db_agsize && agno == bmp->db_maxag) || dbFreeBits()
2443 (agno == bmp->db_numag - 1 && dbFreeBits()
2444 bmp->db_agfree[agno] == (bmp-> db_mapsize & (BPERDMAP - 1)))) { dbFreeBits()
2445 while (bmp->db_maxag > 0) { dbFreeBits()
2446 bmp->db_maxag -= 1; dbFreeBits()
2447 if (bmp->db_agfree[bmp->db_maxag] != dbFreeBits()
2448 bmp->db_agsize) dbFreeBits()
2456 if (bmp->db_agpref > bmp->db_maxag) dbFreeBits()
2457 bmp->db_agpref = bmp->db_maxag; dbFreeBits()
2460 BMAP_UNLOCK(bmp); dbFreeBits()
2491 * bmp - pointer to bmap descriptor
2508 dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc, int level) dbAdjCtl() argument
2520 lblkno = BLKTOCTL(blkno, bmp->db_l2nbperpage, level); dbAdjCtl()
2521 mp = read_metapage(bmp->db_ipbmap, lblkno, PSIZE, 0); dbAdjCtl()
2527 jfs_error(bmp->db_ipbmap->i_sb, "Corrupt dmapctl page\n"); dbAdjCtl()
2587 if (level < bmp->db_maxlevel) { dbAdjCtl()
2592 dbAdjCtl(bmp, blkno, dcp->stree[ROOT], alloc, dbAdjCtl()
2625 assert(level == bmp->db_maxlevel); dbAdjCtl()
2626 if (bmp->db_maxfreebud != oldroot) { dbAdjCtl()
2627 jfs_error(bmp->db_ipbmap->i_sb, dbAdjCtl()
2630 bmp->db_maxfreebud = dcp->stree[ROOT]; dbAdjCtl()
3215 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbAllocBottomUp() local
3220 ASSERT(nblocks <= bmp->db_mapsize - blkno); dbAllocBottomUp()
3233 lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage); dbAllocBottomUp()
3247 if ((rc = dbAllocDmapBU(bmp, dp, blkno, nb))) { dbAllocBottomUp()
3263 static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocDmapBU() argument
3336 BMAP_LOCK(bmp); dbAllocDmapBU()
3342 agno = blkno >> bmp->db_agl2size; dbAllocDmapBU()
3343 if (agno > bmp->db_maxag) dbAllocDmapBU()
3344 bmp->db_maxag = agno; dbAllocDmapBU()
3347 bmp->db_agfree[agno] -= nblocks; dbAllocDmapBU()
3348 bmp->db_nfree -= nblocks; dbAllocDmapBU()
3350 BMAP_UNLOCK(bmp); dbAllocDmapBU()
3360 if ((rc = dbAdjCtl(bmp, blkno, tp->stree[ROOT], 1, 0))) dbAllocDmapBU()
3361 dbFreeBits(bmp, dp, blkno, nblocks); dbAllocDmapBU()
3395 struct bmap *bmp = sbi->bmap; dbExtendFS() local
3412 bmp->db_mapsize = newsize; dbExtendFS()
3413 bmp->db_maxlevel = BMAPSZTOLEV(bmp->db_mapsize); dbExtendFS()
3417 oldl2agsize = bmp->db_agl2size; dbExtendFS()
3419 bmp->db_agl2size = l2agsize; dbExtendFS()
3420 bmp->db_agsize = 1 << l2agsize; dbExtendFS()
3423 agno = bmp->db_numag; dbExtendFS()
3424 bmp->db_numag = newsize >> l2agsize; dbExtendFS()
3425 bmp->db_numag += ((u32) newsize % (u32) bmp->db_agsize) ? 1 : 0; dbExtendFS()
3438 ag_rem = bmp->db_agfree[0]; /* save agfree[0] */ dbExtendFS()
3440 bmp->db_agfree[n] = 0; /* init collection point */ dbExtendFS()
3445 bmp->db_agfree[n] += bmp->db_agfree[i]; dbExtendFS()
3448 bmp->db_agfree[0] += ag_rem; /* restore agfree[0] */ dbExtendFS()
3451 bmp->db_agfree[n] = 0; dbExtendFS()
3457 bmp->db_maxag = bmp->db_maxag / k; dbExtendFS()
3573 bmp->db_nfree += n; dbExtendFS()
3575 bmp->db_agfree[agno] += n; dbExtendFS()
3604 bmp->db_maxfreebud = *l1leaf; dbExtendFS()
3628 bmp->db_maxfreebud = *l2leaf; dbExtendFS()
3658 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbFinalizeBmap() local
3673 actags = bmp->db_maxag + 1; dbFinalizeBmap()
3674 inactags = bmp->db_numag - actags; dbFinalizeBmap()
3675 ag_rem = bmp->db_mapsize & (bmp->db_agsize - 1); /* ??? */ dbFinalizeBmap()
3683 ((inactags - 1) << bmp->db_agl2size) + ag_rem dbFinalizeBmap()
3684 : inactags << bmp->db_agl2size; dbFinalizeBmap()
3690 actfree = bmp->db_nfree - inactfree; dbFinalizeBmap()
3697 if (bmp->db_agfree[bmp->db_agpref] < avgfree) { dbFinalizeBmap()
3698 for (bmp->db_agpref = 0; bmp->db_agpref < actags; dbFinalizeBmap()
3699 bmp->db_agpref++) { dbFinalizeBmap()
3700 if (bmp->db_agfree[bmp->db_agpref] >= avgfree) dbFinalizeBmap()
3703 if (bmp->db_agpref >= bmp->db_numag) { dbFinalizeBmap()
3716 bmp->db_aglevel = BMAPSZTOLEV(bmp->db_agsize); dbFinalizeBmap()
3718 bmp->db_agl2size - (L2BPERDMAP + bmp->db_aglevel * L2LPERCTL); dbFinalizeBmap()
3719 bmp->db_agheight = l2nl >> 1; dbFinalizeBmap()
3720 bmp->db_agwidth = 1 << (l2nl - (bmp->db_agheight << 1)); dbFinalizeBmap()
3721 for (i = 5 - bmp->db_agheight, bmp->db_agstart = 0, n = 1; i > 0; dbFinalizeBmap()
3723 bmp->db_agstart += n; dbFinalizeBmap()
H A Djfs_discard.c83 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; jfs_ioc_trim() local
101 if (minlen > bmp->db_agsize || jfs_ioc_trim()
102 start >= bmp->db_mapsize || jfs_ioc_trim()
106 if (end >= bmp->db_mapsize) jfs_ioc_trim()
107 end = bmp->db_mapsize - 1; jfs_ioc_trim()
H A Dresize.c70 struct bmap *bmp = sbi->bmap; jfs_extendfs() local
186 if (newFSSize < bmp->db_mapsize) { jfs_extendfs()
313 mapSize = bmp->db_mapsize; jfs_extendfs()
316 old_agsize = bmp->db_agsize; /* We need to know if this changes */ jfs_extendfs()
338 agsizechanged |= (bmp->db_agsize != old_agsize); jfs_extendfs()
495 j_sb->s_size = cpu_to_le64(bmp->db_mapsize << jfs_extendfs()
497 j_sb->s_agsize = cpu_to_le32(bmp->db_agsize); jfs_extendfs()
H A Djfs_extent.c515 struct bmap *bmp = sbi->bmap; extBalloc() local
524 max = (s64) 1 << bmp->db_maxfreebud; extBalloc()
553 atomic_inc(&bmp->db_active[ag]); extBalloc()
556 atomic_dec(&bmp->db_active[ji->active_ag]); extBalloc()
557 atomic_inc(&bmp->db_active[ag]); extBalloc()
H A Djfs_imap.c868 struct metapage *mp, *amp, *bmp, *cmp, *dmp; diFree() local
1044 amp = bmp = cmp = dmp = NULL; diFree()
1081 if ((rc = diIAGRead(imap, back, &bmp))) diFree()
1083 biagp = (struct iag *) bmp->data; diFree()
1108 ciagp = (struct iag *) bmp->data; diFree()
1122 diagp = (struct iag *) bmp->data; diFree()
1233 if (bmp) diFree()
1234 write_metapage(bmp); diFree()
1295 if (bmp) diFree()
1296 release_metapage(bmp); diFree()
2027 struct metapage *amp = NULL, *bmp = NULL; diAllocBit() local
2049 &bmp))) { diAllocBit()
2054 biagp = (struct iag *) bmp->data; diAllocBit()
2076 if (bmp) diAllocBit()
2077 release_metapage(bmp); diAllocBit()
2106 if (bmp) { diAllocBit()
2108 write_metapage(bmp); diAllocBit()
2174 struct metapage *amp, *bmp, *cmp, *dmp; diNewExt() local
2195 amp = bmp = cmp = NULL; diNewExt()
2215 if ((rc = diIAGRead(imap, back, &bmp))) diNewExt()
2217 biagp = (struct iag *) bmp->data; diNewExt()
2390 if (bmp) diNewExt()
2391 write_metapage(bmp); diNewExt()
2403 if (bmp) diNewExt()
2404 release_metapage(bmp); diNewExt()
/linux-4.4.14/drivers/uwb/
H A Ddrp-avail.c125 uwb_mas_bm_copy_le(rc->drp_avail.ie.bmp, &avail); uwb_drp_avail_ie_update()
227 int uwbd_evt_get_drp_avail(struct uwb_event *evt, unsigned long *bmp) uwbd_evt_get_drp_avail() argument
241 buffer_to_bmp(bmp, drp_evt->bmp, UWB_NUM_MAS/8); uwbd_evt_get_drp_avail()
275 DECLARE_BITMAP(bmp, UWB_NUM_MAS); uwbd_evt_handle_rc_drp_avail()
277 result = uwbd_evt_get_drp_avail(evt, bmp); uwbd_evt_handle_rc_drp_avail()
282 bitmap_copy(rc->drp_avail.global, bmp, UWB_NUM_MAS); uwbd_evt_handle_rc_drp_avail()
H A Ddrp.c732 drp_availability_ie->bmp, UWB_NUM_MAS); uwb_drp_availability_process()
H A Dhwa-rc.c220 memcpy(newda->bmp, (u8 *) ie_hdr + sizeof(*ie_hdr), ie_hdr->length); hwarc_filter_evt_drp_avail_WUSB_0100()
/linux-4.4.14/arch/powerpc/platforms/ps3/
H A Dinterrupt.c80 * @bmp: ps3_bmp structure
81 * @bmp_lock: Syncronize access to bmp.
89 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); member in struct:ps3_private
115 clear_bit(63 - d->irq, &pd->bmp.mask); ps3_chip_mask()
136 set_bit(63 - d->irq, &pd->bmp.mask); ps3_chip_unmask()
651 _dump_64_bmp("stat", &pd->bmp.status, pd->thread_id, func, line); _dump_bmp()
652 _dump_64_bmp("mask", (u64*)&pd->bmp.mask, pd->thread_id, func, line); _dump_bmp()
663 _dump_64_bmp("mask", (u64*)&pd->bmp.mask, pd->thread_id, func, line); _dump_mask()
716 u64 x = (pd->bmp.status & pd->bmp.mask); ps3_get_irq()
767 DBG("%s:%d: ppe_id %llu, thread_id %llu, bmp %lxh\n", for_each_possible_cpu()
769 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); for_each_possible_cpu()
772 pd->thread_id, ps3_mm_phys_to_lpar(__pa(&pd->bmp))); for_each_possible_cpu()
/linux-4.4.14/net/xfrm/
H A Dxfrm_replay.c228 if (replay_esn->bmp[nr] & (1U << bitnr)) xfrm_replay_check_bmp()
261 replay_esn->bmp[nr] &= ~(1U << bitnr); xfrm_replay_advance_bmp()
266 replay_esn->bmp[i] = 0; xfrm_replay_advance_bmp()
282 replay_esn->bmp[nr] |= (1U << bitnr); xfrm_replay_advance_bmp()
481 if (replay_esn->bmp[nr] & (1U << bitnr)) xfrm_replay_check_esn()
531 replay_esn->bmp[nr] &= ~(1U << bitnr); xfrm_replay_advance_esn()
536 replay_esn->bmp[i] = 0; xfrm_replay_advance_esn()
555 replay_esn->bmp[nr] |= (1U << bitnr); xfrm_replay_advance_esn()
H A Dxfrm_user.c130 if (rs->bmp_len > XFRMA_REPLAY_ESN_MAX / sizeof(rs->bmp[0]) / 8) verify_replay()
/linux-4.4.14/drivers/scsi/lpfc/
H A Dlpfc_ct.c291 lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, lpfc_gen_req() argument
311 icmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys); lpfc_gen_req()
312 icmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys); lpfc_gen_req()
319 geniocb->context3 = (uint8_t *) bmp; lpfc_gen_req()
375 struct lpfc_dmabuf *bmp, struct lpfc_nodelist *ndlp, lpfc_ct_cmd()
381 struct ulp_bde64 *bpl = (struct ulp_bde64 *) bmp->virt; lpfc_ct_cmd()
399 status = lpfc_gen_req(vport, bmp, inmp, outmp, cmpl, ndlp, 0, lpfc_ct_cmd()
1131 struct lpfc_dmabuf *mp, *bmp; lpfc_ns_cmd() local
1163 bmp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL); lpfc_ns_cmd()
1164 if (!bmp) { lpfc_ns_cmd()
1169 INIT_LIST_HEAD(&bmp->list); lpfc_ns_cmd()
1170 bmp->virt = lpfc_mbuf_alloc(phba, MEM_PRI, &(bmp->phys)); lpfc_ns_cmd()
1171 if (!bmp->virt) { lpfc_ns_cmd()
1181 bpl = (struct ulp_bde64 *) bmp->virt; lpfc_ns_cmd()
1294 if (!lpfc_ct_cmd(vport, mp, bmp, ndlp, cmpl, rsp_size, retry)) { lpfc_ns_cmd()
1308 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_ns_cmd()
1310 kfree(bmp); lpfc_ns_cmd()
1406 struct lpfc_dmabuf *mp, *bmp; lpfc_fdmi_cmd() local
1440 bmp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); lpfc_fdmi_cmd()
1441 if (!bmp) lpfc_fdmi_cmd()
1444 bmp->virt = lpfc_mbuf_alloc(phba, 0, &(bmp->phys)); lpfc_fdmi_cmd()
1445 if (!bmp->virt) lpfc_fdmi_cmd()
1449 INIT_LIST_HEAD(&bmp->list); lpfc_fdmi_cmd()
2076 bpl = (struct ulp_bde64 *)bmp->virt; lpfc_fdmi_cmd()
2086 if (!lpfc_ct_cmd(vport, mp, bmp, ndlp, cmpl, rsp_size, 0)) lpfc_fdmi_cmd()
2096 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_fdmi_cmd()
2098 kfree(bmp); lpfc_fdmi_cmd()
374 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
H A Dlpfc_bsg.c302 struct lpfc_dmabuf *bmp, *cmp, *rmp; lpfc_bsg_send_mgmt_cmd_cmp() local
329 bmp = cmdiocbq->context3; lpfc_bsg_send_mgmt_cmd_cmp()
361 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_bsg_send_mgmt_cmd_cmp()
362 kfree(bmp); lpfc_bsg_send_mgmt_cmd_cmp()
391 struct lpfc_dmabuf *bmp = NULL, *cmp = NULL, *rmp = NULL; lpfc_bsg_send_mgmt_cmd() local
430 bmp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); lpfc_bsg_send_mgmt_cmd()
431 if (!bmp) { lpfc_bsg_send_mgmt_cmd()
435 bmp->virt = lpfc_mbuf_alloc(phba, 0, &bmp->phys); lpfc_bsg_send_mgmt_cmd()
436 if (!bmp->virt) { lpfc_bsg_send_mgmt_cmd()
441 INIT_LIST_HEAD(&bmp->list); lpfc_bsg_send_mgmt_cmd()
443 bpl = (struct ulp_bde64 *) bmp->virt; lpfc_bsg_send_mgmt_cmd()
464 cmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys); lpfc_bsg_send_mgmt_cmd()
465 cmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys); lpfc_bsg_send_mgmt_cmd()
482 cmdiocbq->context3 = bmp; lpfc_bsg_send_mgmt_cmd()
490 cmdiocbq->context3 = bmp; lpfc_bsg_send_mgmt_cmd()
534 if (bmp->virt) lpfc_bsg_send_mgmt_cmd()
535 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_bsg_send_mgmt_cmd()
536 kfree(bmp); lpfc_bsg_send_mgmt_cmd()
1385 struct lpfc_dmabuf *bmp, *cmp; lpfc_issue_ct_rsp_cmp() local
1408 bmp = cmdiocbq->context3; lpfc_issue_ct_rsp_cmp()
1436 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_issue_ct_rsp_cmp()
1437 kfree(bmp); lpfc_issue_ct_rsp_cmp()
1456 * @bmp: Pointer to a dma buffer descriptor.
1461 struct lpfc_dmabuf *cmp, struct lpfc_dmabuf *bmp, lpfc_issue_ct_rsp()
1490 icmd->un.xseq64.bdl.addrHigh = putPaddrHigh(bmp->phys); lpfc_issue_ct_rsp()
1491 icmd->un.xseq64.bdl.addrLow = putPaddrLow(bmp->phys); lpfc_issue_ct_rsp()
1556 ctiocb->context3 = bmp; lpfc_issue_ct_rsp()
1613 struct lpfc_dmabuf *bmp = NULL, *cmp = NULL; lpfc_bsg_send_mgmt_rsp() local
1628 bmp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); lpfc_bsg_send_mgmt_rsp()
1629 if (!bmp) { lpfc_bsg_send_mgmt_rsp()
1634 bmp->virt = lpfc_mbuf_alloc(phba, 0, &bmp->phys); lpfc_bsg_send_mgmt_rsp()
1635 if (!bmp->virt) { lpfc_bsg_send_mgmt_rsp()
1640 INIT_LIST_HEAD(&bmp->list); lpfc_bsg_send_mgmt_rsp()
1641 bpl = (struct ulp_bde64 *) bmp->virt; lpfc_bsg_send_mgmt_rsp()
1652 rc = lpfc_issue_ct_rsp(phba, job, tag, cmp, bmp, bpl_entries); lpfc_bsg_send_mgmt_rsp()
1662 if (bmp->virt) lpfc_bsg_send_mgmt_rsp()
1663 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_bsg_send_mgmt_rsp()
1664 kfree(bmp); lpfc_bsg_send_mgmt_rsp()
4941 struct lpfc_dmabuf *bmp, *cmp, *rmp; lpfc_bsg_menlo_cmd_cmp() local
4950 bmp = cmdiocbq->context3; lpfc_bsg_menlo_cmd_cmp()
5003 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_bsg_menlo_cmd_cmp()
5004 kfree(bmp); lpfc_bsg_menlo_cmd_cmp()
5035 struct lpfc_dmabuf *bmp = NULL, *cmp = NULL, *rmp = NULL; lpfc_menlo_cmd() local
5083 bmp = kmalloc(sizeof(struct lpfc_dmabuf), GFP_KERNEL); lpfc_menlo_cmd()
5084 if (!bmp) { lpfc_menlo_cmd()
5089 bmp->virt = lpfc_mbuf_alloc(phba, 0, &bmp->phys); lpfc_menlo_cmd()
5090 if (!bmp->virt) { lpfc_menlo_cmd()
5095 INIT_LIST_HEAD(&bmp->list); lpfc_menlo_cmd()
5097 bpl = (struct ulp_bde64 *)bmp->virt; lpfc_menlo_cmd()
5125 cmd->un.genreq64.bdl.addrHigh = putPaddrHigh(bmp->phys); lpfc_menlo_cmd()
5126 cmd->un.genreq64.bdl.addrLow = putPaddrLow(bmp->phys); lpfc_menlo_cmd()
5145 cmdiocbq->context3 = bmp; lpfc_menlo_cmd()
5176 if (bmp->virt) lpfc_menlo_cmd()
5177 lpfc_mbuf_free(phba, bmp->virt, bmp->phys); lpfc_menlo_cmd()
5178 kfree(bmp); lpfc_menlo_cmd()
1460 lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct fc_bsg_job *job, uint32_t tag, struct lpfc_dmabuf *cmp, struct lpfc_dmabuf *bmp, int num_entry) lpfc_issue_ct_rsp() argument
/linux-4.4.14/drivers/ps3/
H A Dps3-vuart.c116 const struct ports_bmp *bmp, const char *func, int line) _dump_ports_bmp()
118 pr_debug("%s:%d: ports_bmp: %016llxh\n", func, line, bmp->status); _dump_ports_bmp()
257 * @bmp: Logical OR of enum vuart_interrupt_mask values. A zero bit disables.
874 struct ports_bmp *bmp; member in struct:vuart_bus_priv
898 dump_ports_bmp(bus_priv->bmp); ps3_vuart_irq_handler()
900 port = (BITS_PER_LONG - 1) - __ilog2(bus_priv->bmp->status); ps3_vuart_irq_handler()
927 BUG_ON(vuart_bus_priv.bmp); ps3_vuart_bus_interrupt_get()
929 vuart_bus_priv.bmp = kzalloc(sizeof(struct ports_bmp), GFP_KERNEL); ps3_vuart_bus_interrupt_get()
931 if (!vuart_bus_priv.bmp) { ps3_vuart_bus_interrupt_get()
937 result = ps3_vuart_irq_setup(PS3_BINDING_CPU_ANY, vuart_bus_priv.bmp, ps3_vuart_bus_interrupt_get()
963 kfree(vuart_bus_priv.bmp); ps3_vuart_bus_interrupt_get()
964 vuart_bus_priv.bmp = NULL; ps3_vuart_bus_interrupt_get()
987 kfree(vuart_bus_priv.bmp); ps3_vuart_bus_interrupt_put()
988 vuart_bus_priv.bmp = NULL; ps3_vuart_bus_interrupt_put()
115 _dump_ports_bmp( const struct ports_bmp *bmp, const char *func, int line) _dump_ports_bmp() argument
/linux-4.4.14/drivers/gpu/drm/nouveau/
H A Dnouveau_bios.c1087 uint8_t *bmp = &bios->data[offset], bmp_version_major, bmp_version_minor; parse_bmp_structure() local
1097 bmp_version_major = bmp[5]; parse_bmp_structure()
1098 bmp_version_minor = bmp[6]; parse_bmp_structure()
1164 if (nv_cksum(bmp, 8)) { parse_bmp_structure()
1175 bios->feature_byte = bmp[9]; parse_bmp_structure()
1182 bios->init_script_tbls_ptr = ROM16(bmp[legacy_scripts_offset]); parse_bmp_structure()
1183 bios->extra_init_script_tbl_ptr = ROM16(bmp[legacy_scripts_offset + 2]); parse_bmp_structure()
1186 bios->legacy.mem_init_tbl_ptr = ROM16(bmp[24]); parse_bmp_structure()
1187 bios->legacy.sdr_seq_tbl_ptr = ROM16(bmp[26]); parse_bmp_structure()
1188 bios->legacy.ddr_seq_tbl_ptr = ROM16(bmp[28]); parse_bmp_structure()
1199 bios->fmaxvco = ROM32(bmp[67]); parse_bmp_structure()
1200 bios->fminvco = ROM32(bmp[71]); parse_bmp_structure()
1205 bios->tmds.output0_script_ptr = ROM16(bmp[89]); parse_bmp_structure()
1206 bios->tmds.output1_script_ptr = ROM16(bmp[91]); parse_bmp_structure()
1212 bios->legacy.lvds_single_a_script_ptr = ROM16(bmp[95]); parse_bmp_structure()
1215 bios->fp.fptablepointer = ROM16(bmp[105]); parse_bmp_structure()
1216 bios->fp.fpxlatetableptr = ROM16(bmp[107]); parse_bmp_structure()
1220 bios->fp.lvdsmanufacturerpointer = ROM16(bmp[117]); parse_bmp_structure()
1221 bios->fp.fpxlatemanufacturertableptr = ROM16(bmp[119]); parse_bmp_structure()
1225 bios->pll_limit_tbl_ptr = ROM16(bmp[142]); parse_bmp_structure()
1229 bios->fp.duallink_transition_clk = ROM16(bmp[156]) * 10; parse_bmp_structure()
/linux-4.4.14/net/netfilter/
H A Dnf_conntrack_h323_asn1.c495 unsigned int ext, bmp, i, opt, len = 0, bmp2, bmp2_len; decode_seq() local
509 bmp = get_bitmap(bs, f->sz); decode_seq()
511 *(unsigned int *)base = bmp; decode_seq()
522 if (!((0x80000000U >> (opt++)) & bmp)) /* Not exist */ decode_seq()
561 bmp |= bmp2 >> f->sz; decode_seq()
563 *(unsigned int *)base = bmp; decode_seq()
/linux-4.4.14/fs/hfsplus/
H A Dxattr.c67 char *bmp; hfsplus_init_header_node() local
112 bmp = buf + offset; hfsplus_init_header_node()
117 memset(bmp, 0xFF, used_bmp_bytes); hfsplus_init_header_node()
118 bmp += used_bmp_bytes; hfsplus_init_header_node()
121 *bmp = ~(0xFF >> used_nodes); hfsplus_init_header_node()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dbase.c27 #include <subdev/bios/bmp.h>
H A Dpll.c26 #include <subdev/bios/bmp.h>
H A Dinit.c26 #include <subdev/bios/bmp.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/
H A Dnv05.c30 #include <subdev/bios/bmp.h>
/linux-4.4.14/include/linux/uwb/
H A Dspec.h398 DECLARE_BITMAP(bmp, UWB_NUM_MAS);
728 DECLARE_BITMAP(bmp, UWB_NUM_MAS);
/linux-4.4.14/include/uapi/linux/
H A Dxfrm.h98 __u32 bmp[0]; member in struct:xfrm_replay_state_esn
/linux-4.4.14/fs/ntfs/
H A Ddir.c1115 u8 *kaddr, *bmp, *index_end; ntfs_readdir() local
1264 bmp = (u8*)page_address(bmp_page); ntfs_readdir()
1266 while (!(bmp[cur_bmp_pos >> 3] & (1 << (cur_bmp_pos & 7)))) { ntfs_readdir()
/linux-4.4.14/drivers/net/wireless/brcm80211/brcmfmac/
H A Dfwsignal.c911 brcmf_dbg(TRACE, "adding TIM info: handle %d bmp 0x%X\n", brcmf_fws_hdrpush()
1150 brcmf_dbg(TRACE, "%s (%d): %s cnt %d bmp %d\n", brcmf_fws_request_indicate()

Completed in 941 milliseconds