/drivers/iommu/ |
D | msm_iommu_hw-8xxx.h | 33 #define SET_GLOBAL_REG_N(b, n, r, v) SET_GLOBAL_REG(b, ((r) + (n << 2)), (v)) argument 34 #define GET_GLOBAL_REG_N(b, n, r) GET_GLOBAL_REG(b, ((r) + (n << 2))) argument 37 #define GET_GLOBAL_FIELD(b, r, F) GET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT) argument 38 #define GET_CONTEXT_FIELD(b, c, r, F) \ argument 39 GET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT) 41 #define SET_GLOBAL_FIELD(b, r, F, v) \ argument 42 SET_FIELD(((b) + (r)), F##_MASK, F##_SHIFT, (v)) 43 #define SET_CONTEXT_FIELD(b, c, r, F, v) \ argument 44 SET_FIELD(((b) + (r) + ((c) << CTX_SHIFT)), F##_MASK, F##_SHIFT, (v)) 97 #define SET_M2VCBR_N(b, N, v) SET_GLOBAL_REG_N(M2VCBR_N, N, (b), (v)) argument [all …]
|
/drivers/md/bcache/ |
D | btree.c | 99 #define insert_lock(s, b) ((b)->level <= (s)->lock) argument 119 #define btree(fn, key, b, op, ...) \ argument 121 int _r, l = (b)->level - 1; \ 123 struct btree *_child = bch_btree_node_get((b)->c, op, key, l, \ 124 _w, b); \ 160 static inline struct bset *write_block(struct btree *b) in write_block() argument 162 return ((void *) btree_bset_first(b)) + b->written * block_bytes(b->c); in write_block() 165 static void bch_btree_init_next(struct btree *b) in bch_btree_init_next() argument 168 if (b->level && b->keys.nsets) in bch_btree_init_next() 169 bch_btree_sort(&b->keys, &b->c->sort); in bch_btree_init_next() [all …]
|
D | alloc.c | 76 uint8_t bch_inc_gen(struct cache *ca, struct bucket *b) in bch_inc_gen() argument 78 uint8_t ret = ++b->gen; in bch_inc_gen() 80 ca->set->need_gc = max(ca->set->need_gc, bucket_gc_gen(b)); in bch_inc_gen() 89 struct bucket *b; in bch_rescale_priorities() local 108 for_each_bucket(b, ca) in bch_rescale_priorities() 109 if (b->prio && in bch_rescale_priorities() 110 b->prio != BTREE_PRIO && in bch_rescale_priorities() 111 !atomic_read(&b->pin)) { in bch_rescale_priorities() 112 b->prio--; in bch_rescale_priorities() 113 c->min_prio = min(c->min_prio, b->prio); in bch_rescale_priorities() [all …]
|
D | bset.c | 21 void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned set) in bch_dump_bset() argument 31 if (b->ops->key_dump) in bch_dump_bset() 32 b->ops->key_dump(b, k); in bch_dump_bset() 37 bkey_cmp(k, b->ops->is_extents ? in bch_dump_bset() 43 void bch_dump_bucket(struct btree_keys *b) in bch_dump_bucket() argument 48 for (i = 0; i <= b->nsets; i++) in bch_dump_bucket() 49 bch_dump_bset(b, b->set[i].data, in bch_dump_bucket() 50 bset_sector_offset(b, b->set[i].data)); in bch_dump_bucket() 54 int __bch_count_data(struct btree_keys *b) in __bch_count_data() argument 60 if (b->ops->is_extents) in __bch_count_data() [all …]
|
D | bset.h | 227 static inline struct bset_tree *bset_tree_last(struct btree_keys *b) in bset_tree_last() argument 229 return b->set + b->nsets; in bset_tree_last() 232 static inline bool bset_written(struct btree_keys *b, struct bset_tree *t) in bset_written() argument 234 return t <= b->set + b->nsets - b->last_set_unwritten; in bset_written() 237 static inline bool bkey_written(struct btree_keys *b, struct bkey *k) in bkey_written() argument 239 return !b->last_set_unwritten || k < b->set[b->nsets].data->start; in bkey_written() 242 static inline unsigned bset_byte_offset(struct btree_keys *b, struct bset *i) in bset_byte_offset() argument 244 return ((size_t) i) - ((size_t) b->set->data); in bset_byte_offset() 247 static inline unsigned bset_sector_offset(struct btree_keys *b, struct bset *i) in bset_sector_offset() argument 249 return bset_byte_offset(b, i) >> 9; in bset_sector_offset() [all …]
|
D | extents.c | 128 struct btree *b = container_of(keys, struct btree, keys); in bch_bkey_dump() local 136 size_t n = PTR_BUCKET_NR(b->c, k, j); in bch_bkey_dump() 139 if (n >= b->c->sb.first_bucket && n < b->c->sb.nbuckets) in bch_bkey_dump() 141 PTR_BUCKET(b->c, k, j)->prio); in bch_bkey_dump() 144 printk(" %s\n", bch_ptr_status(b->c, k)); in bch_bkey_dump() 168 struct btree *b = container_of(bk, struct btree, keys); in bch_btree_ptr_invalid() local 169 return __bch_btree_ptr_invalid(b->c, k); in bch_btree_ptr_invalid() 172 static bool btree_ptr_bad_expensive(struct btree *b, const struct bkey *k) in btree_ptr_bad_expensive() argument 178 if (mutex_trylock(&b->c->bucket_lock)) { in btree_ptr_bad_expensive() 180 if (ptr_available(b->c, k, i)) { in btree_ptr_bad_expensive() [all …]
|
D | btree.h | 151 static inline bool btree_node_ ## flag(struct btree *b) \ 152 { return test_bit(BTREE_NODE_ ## flag, &b->flags); } \ 154 static inline void set_btree_node_ ## flag(struct btree *b) \ 155 { set_bit(BTREE_NODE_ ## flag, &b->flags); } \ 167 static inline struct btree_write *btree_current_write(struct btree *b) in btree_current_write() argument 169 return b->writes + btree_node_write_idx(b); in btree_current_write() 172 static inline struct btree_write *btree_prev_write(struct btree *b) in btree_prev_write() argument 174 return b->writes + (btree_node_write_idx(b) ^ 1); in btree_prev_write() 177 static inline struct bset *btree_bset_first(struct btree *b) in btree_bset_first() argument 179 return b->keys.set->data; in btree_bset_first() [all …]
|
D | debug.c | 24 #define for_each_written_bset(b, start, i) \ argument 26 (void *) i < (void *) (start) + (KEY_SIZE(&b->key) << 9) &&\ 28 i = (void *) i + set_blocks(i, block_bytes(b->c)) * \ 29 block_bytes(b->c)) 31 void bch_btree_verify(struct btree *b) in bch_btree_verify() argument 33 struct btree *v = b->c->verify_data; in bch_btree_verify() 37 if (!b->c->verify || !b->c->verify_ondisk) in bch_btree_verify() 40 down(&b->io_mutex); in bch_btree_verify() 41 mutex_lock(&b->c->verify_lock); in bch_btree_verify() 43 ondisk = b->c->verify_ondisk; in bch_btree_verify() [all …]
|
/drivers/misc/ |
D | vmw_balloon.c | 259 void (*add_page)(struct vmballoon *b, int idx, struct page *p); 260 int (*lock)(struct vmballoon *b, unsigned int num_pages, 262 int (*unlock)(struct vmballoon *b, unsigned int num_pages, 323 static bool vmballoon_send_start(struct vmballoon *b, unsigned long req_caps) in vmballoon_send_start() argument 328 STATS_INC(b->stats.start); in vmballoon_send_start() 334 b->capabilities = capabilities; in vmballoon_send_start() 338 b->capabilities = VMW_BALLOON_BASIC_CMDS; in vmballoon_send_start() 350 if ((b->capabilities & VMW_BALLOON_BATCHED_2M_CMDS) && in vmballoon_send_start() 351 (b->capabilities & VMW_BALLOON_BATCHED_CMDS)) in vmballoon_send_start() 352 b->supported_page_sizes = 2; in vmballoon_send_start() [all …]
|
/drivers/md/ |
D | dm-bufio.c | 263 static void buffer_record_stack(struct dm_buffer *b) in buffer_record_stack() argument 265 b->stack_trace.nr_entries = 0; in buffer_record_stack() 266 b->stack_trace.max_entries = MAX_STACK; in buffer_record_stack() 267 b->stack_trace.entries = b->stack_entries; in buffer_record_stack() 268 b->stack_trace.skip = 2; in buffer_record_stack() 269 save_stack_trace(&b->stack_trace); in buffer_record_stack() 279 struct dm_buffer *b; in __find() local 282 b = container_of(n, struct dm_buffer, node); in __find() 284 if (b->block == block) in __find() 285 return b; in __find() [all …]
|
D | dm-cache-background-tracker.c | 34 struct background_tracker *b = kmalloc(sizeof(*b), GFP_KERNEL); in btracker_create() local 36 if (!b) { in btracker_create() 41 b->max_work = max_work; in btracker_create() 42 atomic_set(&b->pending_promotes, 0); in btracker_create() 43 atomic_set(&b->pending_writebacks, 0); in btracker_create() 44 atomic_set(&b->pending_demotes, 0); in btracker_create() 46 INIT_LIST_HEAD(&b->issued); in btracker_create() 47 INIT_LIST_HEAD(&b->queued); in btracker_create() 49 b->pending = RB_ROOT; in btracker_create() 50 b->work_cache = KMEM_CACHE(bt_work, 0); in btracker_create() [all …]
|
/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/ |
D | math_support.h | 56 #define IMPLIES(a, b) (!(a) || (b)) argument 62 #define MAX(a, b) (((a) > (b)) ? (a) : (b)) argument 63 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) argument 65 #define ROUND_DIV(a, b) (((b) != 0) ? ((a) + ((b) >> 1)) / (b) : 0) argument 67 #define CEIL_DIV(a, b) (((b) != 0) ? ((a) + (b) - 1) / (b) : 0) argument 68 #define CEIL_MUL(a, b) (CEIL_DIV(a, b) * (b)) argument 69 #define CEIL_MUL2(a, b) (((a) + (b) - 1) & ~((b) - 1)) argument 70 #define CEIL_SHIFT(a, b) (((a) + (1 << (b)) - 1)>>(b)) argument 71 #define CEIL_SHIFT_MUL(a, b) (CEIL_SHIFT(a, b) << (b)) argument 73 #define ROUND_HALF_DOWN_DIV(a, b) (((b) != 0) ? ((a) + (b / 2) - 1) / (b) : 0) argument [all …]
|
/drivers/gpu/drm/i915/ |
D | intel_breadcrumbs.c | 30 static unsigned int __intel_breadcrumbs_wakeup(struct intel_breadcrumbs *b) in __intel_breadcrumbs_wakeup() argument 35 lockdep_assert_held(&b->irq_lock); in __intel_breadcrumbs_wakeup() 37 wait = b->irq_wait; in __intel_breadcrumbs_wakeup() 49 struct intel_breadcrumbs *b = &engine->breadcrumbs; in intel_engine_wakeup() local 53 spin_lock_irqsave(&b->irq_lock, flags); in intel_engine_wakeup() 54 result = __intel_breadcrumbs_wakeup(b); in intel_engine_wakeup() 55 spin_unlock_irqrestore(&b->irq_lock, flags); in intel_engine_wakeup() 80 struct intel_breadcrumbs *b = &engine->breadcrumbs; in intel_breadcrumbs_hangcheck() local 82 if (!b->irq_armed) in intel_breadcrumbs_hangcheck() 85 if (b->hangcheck_interrupts != atomic_read(&engine->irq_count)) { in intel_breadcrumbs_hangcheck() [all …]
|
/drivers/block/drbd/ |
D | drbd_bitmap.c | 127 struct drbd_bitmap *b = device->bitmap; in __bm_print_lock_info() local 132 func, b->bm_why ?: "?", in __bm_print_lock_info() 133 b->bm_task->comm, task_pid_nr(b->bm_task)); in __bm_print_lock_info() 138 struct drbd_bitmap *b = device->bitmap; in drbd_bm_lock() local 141 if (!b) { in drbd_bm_lock() 146 trylock_failed = !mutex_trylock(&b->bm_change); in drbd_bm_lock() 151 why, b->bm_why ?: "?", in drbd_bm_lock() 152 b->bm_task->comm, task_pid_nr(b->bm_task)); in drbd_bm_lock() 153 mutex_lock(&b->bm_change); in drbd_bm_lock() 155 if (BM_LOCKED_MASK & b->bm_flags) in drbd_bm_lock() [all …]
|
/drivers/media/platform/s5p-mfc/ |
D | s5p_mfc_opr.c | 41 struct s5p_mfc_priv_buf *b) in s5p_mfc_alloc_priv_buf() argument 44 unsigned int count = b->size >> PAGE_SHIFT; in s5p_mfc_alloc_priv_buf() 48 mfc_debug(3, "Allocating priv: %zu\n", b->size); in s5p_mfc_alloc_priv_buf() 57 b->virt = dev->mem_virt + offset; in s5p_mfc_alloc_priv_buf() 58 b->dma = dev->mem_base + offset; in s5p_mfc_alloc_priv_buf() 63 b->ctx = mem_ctx; in s5p_mfc_alloc_priv_buf() 64 b->virt = dma_alloc_coherent(mem_dev, b->size, &b->dma, GFP_KERNEL); in s5p_mfc_alloc_priv_buf() 65 if (!b->virt) in s5p_mfc_alloc_priv_buf() 67 if (b->dma < base) { in s5p_mfc_alloc_priv_buf() 69 &b->dma, &base); in s5p_mfc_alloc_priv_buf() [all …]
|
/drivers/crypto/cavium/cpt/ |
D | cpt_common.h | 52 #define CPTX_PF_MBOX_INTX(a, b) \ argument 53 (0x400ll + ((u64)(a) << 36) + ((b) << 3)) 54 #define CPTX_PF_MBOX_INT_W1SX(a, b) \ argument 55 (0x420ll + ((u64)(a) << 36) + ((b) << 3)) 56 #define CPTX_PF_MBOX_ENA_W1CX(a, b) \ argument 57 (0x440ll + ((u64)(a) << 36) + ((b) << 3)) 58 #define CPTX_PF_MBOX_ENA_W1SX(a, b) \ argument 59 (0x460ll + ((u64)(a) << 36) + ((b) << 3)) 64 #define CPTX_PF_GX_EN(a, b) \ argument 65 (0x600ll + ((u64)(a) << 36) + ((b) << 3)) [all …]
|
/drivers/media/v4l2-core/ |
D | videobuf2-v4l2.c | 56 static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer *b) in __verify_planes_array() argument 58 if (!V4L2_TYPE_IS_MULTIPLANAR(b->type)) in __verify_planes_array() 62 if (b->m.planes == NULL) { in __verify_planes_array() 67 if (b->length < vb->num_planes || b->length > VB2_MAX_PLANES) { in __verify_planes_array() 69 vb->num_planes, b->length); in __verify_planes_array() 85 static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b) in __verify_length() argument 91 if (!V4L2_TYPE_IS_OUTPUT(b->type)) in __verify_length() 94 if (V4L2_TYPE_IS_MULTIPLANAR(b->type)) { in __verify_length() 96 length = (b->memory == VB2_MEMORY_USERPTR || in __verify_length() 97 b->memory == VB2_MEMORY_DMABUF) in __verify_length() [all …]
|
/drivers/video/fbdev/matrox/ |
D | i2c-matroxfb.c | 72 struct i2c_bit_adapter* b = data; in matroxfb_gpio_setsda() local 73 matroxfb_i2c_set(b->minfo, b->mask.data, state); in matroxfb_gpio_setsda() 77 struct i2c_bit_adapter* b = data; in matroxfb_gpio_setscl() local 78 matroxfb_i2c_set(b->minfo, b->mask.clock, state); in matroxfb_gpio_setscl() 82 struct i2c_bit_adapter* b = data; in matroxfb_gpio_getsda() local 83 return (matroxfb_read_gpio(b->minfo) & b->mask.data) ? 1 : 0; in matroxfb_gpio_getsda() 87 struct i2c_bit_adapter* b = data; in matroxfb_gpio_getscl() local 88 return (matroxfb_read_gpio(b->minfo) & b->mask.clock) ? 1 : 0; in matroxfb_gpio_getscl() 101 static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, in i2c_bus_reg() argument 107 b->minfo = minfo; in i2c_bus_reg() [all …]
|
/drivers/md/persistent-data/ |
D | dm-space-map-common.c | 23 struct dm_block *b, in index_prepare_for_write() argument 26 struct disk_metadata_index *mi_le = dm_block_data(b); in index_prepare_for_write() 28 mi_le->blocknr = cpu_to_le64(dm_block_location(b)); in index_prepare_for_write() 35 struct dm_block *b, in index_check() argument 38 struct disk_metadata_index *mi_le = dm_block_data(b); in index_check() 41 if (dm_block_location(b) != le64_to_cpu(mi_le->blocknr)) { in index_check() 43 le64_to_cpu(mi_le->blocknr), dm_block_location(b)); in index_check() 73 struct dm_block *b, in bitmap_prepare_for_write() argument 76 struct disk_bitmap_header *disk_header = dm_block_data(b); in bitmap_prepare_for_write() 78 disk_header->blocknr = cpu_to_le64(dm_block_location(b)); in bitmap_prepare_for_write() [all …]
|
/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
D | vpstate.c | 29 nvbios_vpstate_offset(struct nvkm_bios *b) in nvbios_vpstate_offset() argument 33 if (!bit_entry(b, 'P', &bit_P)) { in nvbios_vpstate_offset() 35 return nvbios_rd32(b, bit_P.offset + 0x38); in nvbios_vpstate_offset() 42 nvbios_vpstate_parse(struct nvkm_bios *b, struct nvbios_vpstate_header *h) in nvbios_vpstate_parse() argument 47 h->offset = nvbios_vpstate_offset(b); in nvbios_vpstate_parse() 51 h->version = nvbios_rd08(b, h->offset); in nvbios_vpstate_parse() 54 h->hlen = nvbios_rd08(b, h->offset + 0x1); in nvbios_vpstate_parse() 55 h->elen = nvbios_rd08(b, h->offset + 0x2); in nvbios_vpstate_parse() 56 h->slen = nvbios_rd08(b, h->offset + 0x3); in nvbios_vpstate_parse() 57 h->scount = nvbios_rd08(b, h->offset + 0x4); in nvbios_vpstate_parse() [all …]
|
/drivers/staging/skein/ |
D | skein_base.c | 26 u8 b[SKEIN_256_STATE_BYTES]; in skein_256_init() member 66 skein_256_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN); in skein_256_init() 86 u8 b[SKEIN_256_STATE_BYTES]; in skein_256_init_ext() member 98 skein_assert(sizeof(cfg.b) >= sizeof(ctx->x)); in skein_256_init_ext() 109 skein_256_final_pad(ctx, cfg.b); in skein_256_init_ext() 111 memcpy(ctx->x, cfg.b, sizeof(cfg.b)); in skein_256_init_ext() 130 skein_256_process_block(ctx, cfg.b, 1, SKEIN_CFG_STR_LEN); in skein_256_init_ext() 158 memcpy(&ctx->b[ctx->h.b_cnt], msg, n); in skein_256_update() 164 skein_256_process_block(ctx, ctx->b, 1, in skein_256_update() 187 memcpy(&ctx->b[ctx->h.b_cnt], msg, msg_byte_cnt); in skein_256_update() [all …]
|
/drivers/net/wan/ |
D | sealevel.c | 212 struct slvl_board *b; in slvl_init() local 223 b = kzalloc(sizeof(struct slvl_board), GFP_KERNEL); in slvl_init() 224 if (!b) in slvl_init() 227 b->dev[0].chan = &b->board.chanA; in slvl_init() 228 b->dev[0].channel = 0; in slvl_init() 230 b->dev[1].chan = &b->board.chanB; in slvl_init() 231 b->dev[1].channel = 1; in slvl_init() 233 dev = &b->board; in slvl_init() 241 b->iobase = iobase; in slvl_init() 262 outb(3 | (1 << 7), b->iobase + 4); in slvl_init() [all …]
|
/drivers/media/pci/saa7164/ |
D | saa7164-bus.c | 25 struct tmComResBusInfo *b = &dev->bus; in saa7164_bus_setup() local 27 mutex_init(&b->lock); in saa7164_bus_setup() 29 b->Type = TYPE_BUS_PCIe; in saa7164_bus_setup() 30 b->m_wMaxReqSize = SAA_DEVICE_MAXREQUESTSIZE; in saa7164_bus_setup() 32 b->m_pdwSetRing = (u8 __iomem *)(dev->bmmio + in saa7164_bus_setup() 35 b->m_dwSizeSetRing = SAA_DEVICE_BUFFERBLOCKSIZE; in saa7164_bus_setup() 37 b->m_pdwGetRing = (u8 __iomem *)(dev->bmmio + in saa7164_bus_setup() 40 b->m_dwSizeGetRing = SAA_DEVICE_BUFFERBLOCKSIZE; in saa7164_bus_setup() 42 b->m_dwSetWritePos = ((u32)dev->intfdesc.BARLocation) + in saa7164_bus_setup() 44 b->m_dwSetReadPos = b->m_dwSetWritePos + (1 * sizeof(u32)); in saa7164_bus_setup() [all …]
|
/drivers/media/pci/bt8xx/ |
D | bttv.h | 270 #define _MUXSELe(a, b...) 0##a << 28 | _MUXSELf(b) argument 271 #define _MUXSELd(a, b...) 0##a << 26 | _MUXSELe(b) argument 272 #define _MUXSELc(a, b...) 0##a << 24 | _MUXSELd(b) argument 273 #define _MUXSELb(a, b...) 0##a << 22 | _MUXSELc(b) argument 274 #define _MUXSELa(a, b...) 0##a << 20 | _MUXSELb(b) argument 275 #define _MUXSEL9(a, b...) 0##a << 18 | _MUXSELa(b) argument 276 #define _MUXSEL8(a, b...) 0##a << 16 | _MUXSEL9(b) argument 277 #define _MUXSEL7(a, b...) 0##a << 14 | _MUXSEL8(b) argument 278 #define _MUXSEL6(a, b...) 0##a << 12 | _MUXSEL7(b) argument 279 #define _MUXSEL5(a, b...) 0##a << 10 | _MUXSEL6(b) argument [all …]
|
/drivers/gpu/drm/nouveau/include/nvif/ |
D | object.h | 39 #define nvif_rd(a,f,b,c) ({ \ argument 45 _data = nvif_object_rd(_object, (b), (c)); \ 48 #define nvif_wr(a,f,b,c,d) ({ \ argument 53 nvif_object_wr(_object, (b), (c), (d)); \ 55 #define nvif_rd08(a,b) ({ ((u8)nvif_rd((a), ioread8, 1, (b))); }) argument 56 #define nvif_rd16(a,b) ({ ((u16)nvif_rd((a), ioread16_native, 2, (b))); }) argument 57 #define nvif_rd32(a,b) ({ ((u32)nvif_rd((a), ioread32_native, 4, (b))); }) argument 58 #define nvif_wr08(a,b,c) nvif_wr((a), iowrite8, 1, (b), (u8)(c)) argument 59 #define nvif_wr16(a,b,c) nvif_wr((a), iowrite16_native, 2, (b), (u16)(c)) argument 60 #define nvif_wr32(a,b,c) nvif_wr((a), iowrite32_native, 4, (b), (u32)(c)) argument [all …]
|