Home
last modified time | relevance | path

Searched refs:ofs (Results 1 – 200 of 226) sorted by relevance

12

/linux-4.4.14/fs/logfs/
Ddev_mtd.c14 #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) argument
16 static int logfs_mtd_read(struct super_block *sb, loff_t ofs, size_t len, in logfs_mtd_read() argument
23 ret = mtd_read(mtd, ofs, len, &retlen, buf); in logfs_mtd_read()
35 static int loffs_mtd_write(struct super_block *sb, loff_t ofs, size_t len, in loffs_mtd_write() argument
47 BUG_ON((ofs >= mtd->size) || (len > mtd->size - ofs)); in loffs_mtd_write()
48 BUG_ON(ofs != (ofs >> super->s_writeshift) << super->s_writeshift); in loffs_mtd_write()
50 page_start = ofs & PAGE_CACHE_MASK; in loffs_mtd_write()
51 page_end = PAGE_CACHE_ALIGN(ofs + len) - 1; in loffs_mtd_write()
52 ret = mtd_write(mtd, ofs, len, &retlen, buf); in loffs_mtd_write()
72 static int logfs_mtd_erase_mapping(struct super_block *sb, loff_t ofs, in logfs_mtd_erase_mapping() argument
[all …]
Ddev_bdev.c15 #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) argument
74 static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index, in __bdev_writeseg() argument
95 bio->bi_iter.bi_sector = ofs >> 9; in __bdev_writeseg()
101 ofs += i * PAGE_SIZE; in __bdev_writeseg()
122 bio->bi_iter.bi_sector = ofs >> 9; in __bdev_writeseg()
130 static void bdev_writeseg(struct super_block *sb, u64 ofs, size_t len) in bdev_writeseg() argument
144 head = ofs & (PAGE_SIZE - 1); in bdev_writeseg()
146 ofs -= head; in bdev_writeseg()
150 __bdev_writeseg(sb, ofs, ofs >> PAGE_SHIFT, len >> PAGE_SHIFT); in bdev_writeseg()
166 static int do_erase(struct super_block *sb, u64 ofs, pgoff_t index, in do_erase() argument
[all …]
Dsegment.c41 s32 ofs; in logfs_get_free_bytes() local
45 ofs = area->a_used_bytes; in logfs_get_free_bytes()
49 return dev_ofs(area->a_sb, area->a_segno, ofs); in logfs_get_free_bytes()
71 int __logfs_buf_write(struct logfs_area *area, u64 ofs, void *buf, size_t len, in __logfs_buf_write() argument
74 pgoff_t index = ofs >> PAGE_SHIFT; in __logfs_buf_write()
76 long offset = ofs & (PAGE_SIZE-1); in __logfs_buf_write()
109 u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes); in pad_partial_page() local
110 pgoff_t index = ofs >> PAGE_SHIFT; in pad_partial_page()
111 long offset = ofs & (PAGE_SIZE-1); in pad_partial_page()
130 u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes); in pad_full_pages() local
[all …]
Djournal.c119 u64 ofs; in read_area() local
133 ofs = dev_ofs(sb, area->a_segno, area->a_written_bytes); in read_area()
135 return logfs_buf_recover(area, ofs, a + 1, super->s_writesize); in read_area()
137 return logfs_buf_recover(area, ofs, NULL, 0); in read_area()
159 static int __read_je_header(struct super_block *sb, u64 ofs, in __read_je_header() argument
169 err = wbuf_read(sb, ofs, sizeof(*jh), jh); in __read_je_header()
184 static int __read_je_payload(struct super_block *sb, u64 ofs, in __read_je_payload() argument
191 err = wbuf_read(sb, ofs + sizeof(*jh), len, jh + 1); in __read_je_payload()
211 static int __read_je(struct super_block *sb, u64 ofs, in __read_je() argument
216 err = __read_je_header(sb, ofs, jh); in __read_je()
[all …]
Dlogfs.h151 struct page *(*find_first_sb)(struct super_block *sb, u64 *ofs);
152 struct page *(*find_last_sb)(struct super_block *sb, u64 *ofs);
155 void (*writeseg)(struct super_block *sb, u64 ofs, size_t len);
156 int (*erase)(struct super_block *sb, loff_t ofs, size_t len,
158 int (*can_write_buf)(struct super_block *sb, u64 ofs);
551 int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs,
553 int logfs_is_valid_block(struct super_block *sb, u64 ofs, u64 ino, u64 bix,
567 void logfs_set_segment_used(struct super_block *sb, u64 ofs, int increment);
585 int logfs_erase_segment(struct super_block *sb, u32 ofs, int ensure_erase);
586 int wbuf_read(struct super_block *sb, u64 ofs, size_t len, void *buf);
[all …]
Dreadwrite.c956 static int logfs_is_valid_direct(struct logfs_inode *li, u64 bix, u64 ofs) in logfs_is_valid_direct() argument
958 return pure_ofs(li->li_data[bix]) == ofs; in logfs_is_valid_direct()
962 u64 ofs, u64 bofs) in __logfs_is_valid_loop() argument
984 if (pure_ofs(bofs) == ofs) in __logfs_is_valid_loop()
990 static int logfs_is_valid_loop(struct inode *inode, u64 bix, u64 ofs) in logfs_is_valid_loop() argument
1001 if (pure_ofs(bofs) == ofs) in logfs_is_valid_loop()
1004 return __logfs_is_valid_loop(inode, bix, ofs, bofs); in logfs_is_valid_loop()
1007 static int __logfs_is_valid_block(struct inode *inode, u64 bix, u64 ofs) in __logfs_is_valid_block() argument
1015 return logfs_is_valid_direct(li, bix, ofs); in __logfs_is_valid_block()
1016 return logfs_is_valid_loop(inode, bix, ofs); in __logfs_is_valid_block()
[all …]
Dgc.c113 static void logfs_cleanse_block(struct super_block *sb, u64 ofs, u64 ino, in logfs_cleanse_block() argument
120 err = logfs_rewrite_block(inode, bix, ofs, gc_level, 0); in logfs_cleanse_block()
130 u64 ofs, ino, bix; in logfs_gc_segment() local
150 ofs = dev_ofs(sb, logical_segno, seg_ofs); in logfs_gc_segment()
167 valid = logfs_is_valid_block(sb, ofs, ino, bix, gc_level); in logfs_gc_segment()
169 logfs_cleanse_block(sb, ofs, ino, bix, gc_level); in logfs_gc_segment()
638 u64 ofs = dev_ofs(sb, area->a_segno, area->a_written_bytes); in check_area() local
643 if (super->s_devops->can_write_buf(sb, ofs) == 0) in check_area()
646 printk(KERN_INFO"LogFS: Possibly incomplete write at %llx\n", ofs); in check_area()
Dlogfs_abi.h117 #define pure_ofs(ofs) (ofs & ~LOGFS_FULLY_POPULATED) argument
Dsuper.c188 struct page *(*find_sb)(struct super_block *sb, u64 *ofs)) in write_one_sb() argument
194 u64 ofs; in write_one_sb() local
198 page = find_sb(sb, &ofs); in write_one_sb()
202 segno = seg_no(sb, ofs); in write_one_sb()
/linux-4.4.14/fs/jffs2/
Dnodelist.c66 if (frag && frag->ofs != size) { in jffs2_truncate_fragtree()
67 if (frag->ofs+frag->size > size) { in jffs2_truncate_fragtree()
68 frag->size = size - frag->ofs; in jffs2_truncate_fragtree()
72 while (frag && frag->ofs >= size) { in jffs2_truncate_fragtree()
88 if (frag->ofs + frag->size < size) in jffs2_truncate_fragtree()
89 return frag->ofs + frag->size; in jffs2_truncate_fragtree()
93 if (frag->node && (frag->ofs & (PAGE_CACHE_SIZE - 1)) == 0) { in jffs2_truncate_fragtree()
95 frag->ofs, frag->ofs + frag->size); in jffs2_truncate_fragtree()
109 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size); in jffs2_obsolete_node_frag()
114 …ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size, this->node->frags); in jffs2_obsolete_node_frag()
[all …]
Dscan.c47 struct jffs2_raw_inode *ri, uint32_t ofs, struct jffs2_summary *s);
49 struct jffs2_raw_dirent *rd, uint32_t ofs, struct jffs2_summary *s);
288 uint32_t ofs, uint32_t len) in jffs2_fill_scan_buf() argument
293 ret = jffs2_flash_read(c, ofs, len, &retlen, buf); in jffs2_fill_scan_buf()
296 len, ofs, ret); in jffs2_fill_scan_buf()
301 ofs, retlen); in jffs2_fill_scan_buf()
328 struct jffs2_raw_xattr *rx, uint32_t ofs, in jffs2_scan_xattr_node() argument
338 ofs, je32_to_cpu(rx->node_crc), crc); in jffs2_scan_xattr_node()
351 ofs, je32_to_cpu(rx->totlen), totlen); in jffs2_scan_xattr_node()
363 = jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, totlen, NULL); in jffs2_scan_xattr_node()
[all …]
Dread.c25 int ofs, int len) in jffs2_read_dnode() argument
71 D1(if(ofs + len > je32_to_cpu(ri->dsize)) { in jffs2_read_dnode()
73 len, ofs, je32_to_cpu(ri->dsize)); in jffs2_read_dnode()
143 memcpy(buf, decomprbuf+ofs, len); in jffs2_read_dnode()
177 if (unlikely(!frag || frag->ofs > offset || in jffs2_read_inode_range()
178 frag->ofs + frag->size <= offset)) { in jffs2_read_inode_range()
180 if (frag && frag->ofs > offset) { in jffs2_read_inode_range()
182 f->inocache->ino, frag->ofs, offset); in jffs2_read_inode_range()
183 holesize = min(holesize, frag->ofs - offset); in jffs2_read_inode_range()
192 uint32_t holeend = min(end, frag->ofs + frag->size); in jffs2_read_inode_range()
[all …]
Dreadinode.c37 uint32_t crc, ofs, len; in check_node_data() local
43 ofs = ref_offset(ref) + sizeof(struct jffs2_raw_inode); in check_node_data()
47 int adj = ofs % c->wbuf_pagesize; in check_node_data()
53 ref_offset(ref), tn->csize, ofs); in check_node_data()
57 ofs += adj; in check_node_data()
62 ref_offset(ref), tn->csize, tn->partial_crc, tn->data_crc, ofs - len, ofs, len); in check_node_data()
67 err = mtd_point(c->mtd, ofs, len, &retlen, (void **)&buffer, NULL); in check_node_data()
70 mtd_unpoint(c->mtd, ofs, retlen); in check_node_data()
85 err = jffs2_flash_read(c, ofs, len, &retlen, buffer); in check_node_data()
87 JFFS2_ERROR("can not read %d bytes from 0x%08x, error code: %d.\n", len, ofs, err); in check_node_data()
[all …]
Dcompr_rubin.c33 unsigned int ofs; member
48 unsigned buflen, unsigned ofs, in init_pushpull() argument
53 pp->ofs = ofs; in init_pushpull()
59 if (pp->ofs >= pp->buflen - (use_reserved?0:pp->reserve)) in pushbit()
63 pp->buf[pp->ofs >> 3] |= (1<<(7-(pp->ofs & 7))); in pushbit()
65 pp->buf[pp->ofs >> 3] &= ~(1<<(7-(pp->ofs & 7))); in pushbit()
67 pp->ofs++; in pushbit()
74 return pp->ofs; in pushedbits()
81 bit = (pp->buf[pp->ofs >> 3] >> (7-(pp->ofs & 7))) & 1; in pullbit()
83 pp->ofs++; in pullbit()
Dgc.c517 end = frag->ofs + frag->size; in jffs2_garbage_collect_live()
519 start = frag->ofs; in jffs2_garbage_collect_live()
788 ilen = last_frag->ofs + last_frag->size; in jffs2_garbage_collect_metadata()
1067 ilen = frag->ofs + frag->size; in jffs2_garbage_collect_hole()
1119 for (frag = jffs2_lookup_node_frag(&f->fragtree, fn->ofs); in jffs2_garbage_collect_hole()
1121 if (frag->ofs > fn->size + fn->ofs) in jffs2_garbage_collect_hole()
1182 BUG_ON(frag->ofs != start); in jffs2_garbage_collect_dnode()
1185 while((frag = frag_prev(frag)) && frag->ofs >= min) { in jffs2_garbage_collect_dnode()
1189 if (frag->ofs > min) { in jffs2_garbage_collect_dnode()
1191 frag->ofs, frag->ofs+frag->size); in jffs2_garbage_collect_dnode()
[all …]
Ddebug.h192 uint32_t ofs, int len);
216 __jffs2_dbg_dump_node(struct jffs2_sb_info *c, uint32_t ofs);
227 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) \ argument
228 __jffs2_dbg_prewrite_paranoia_check(c, ofs, len)
234 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) argument
252 #define jffs2_dbg_dump_node(c, ofs) \ argument
253 __jffs2_dbg_dump_node(c, ofs);
262 #define jffs2_dbg_dump_node(c, ofs) argument
Dwbuf.c231 uint32_t ofs) in jffs2_verify_write() argument
237 ret = mtd_read(c->mtd, ofs, c->wbuf_pagesize, &retlen, c->wbuf_verify); in jffs2_verify_write()
244 __func__, ofs, retlen, c->wbuf_pagesize); in jffs2_verify_write()
283 uint32_t start, end, ofs, len; in jffs2_wbuf_recover() local
406 ofs = write_ofs(c); in jffs2_wbuf_recover()
418 towrite, ofs); in jffs2_wbuf_recover()
423 pr_notice("Faking write error at 0x%08x\n", ofs); in jffs2_wbuf_recover()
425 mtd_write(c->mtd, ofs, towrite, &retlen, brokenbuf); in jffs2_wbuf_recover()
429 ret = mtd_write(c->mtd, ofs, towrite, &retlen, in jffs2_wbuf_recover()
432 if (ret || retlen != towrite || jffs2_verify_write(c, rewrite_buf, ofs)) { in jffs2_wbuf_recover()
[all …]
Dsummary.c116 uint32_t ofs) in jffs2_sum_add_inode_mem() argument
126 temp->offset = cpu_to_je32(ofs); /* relative offset from the beginning of the jeb */ in jffs2_sum_add_inode_mem()
134 uint32_t ofs) in jffs2_sum_add_dirent_mem() argument
144 temp->offset = cpu_to_je32(ofs); /* relative from the beginning of the jeb */ in jffs2_sum_add_dirent_mem()
158 int jffs2_sum_add_xattr_mem(struct jffs2_summary *s, struct jffs2_raw_xattr *rx, uint32_t ofs) in jffs2_sum_add_xattr_mem() argument
169 temp->offset = cpu_to_je32(ofs); in jffs2_sum_add_xattr_mem()
176 int jffs2_sum_add_xref_mem(struct jffs2_summary *s, struct jffs2_raw_xref *rr, uint32_t ofs) in jffs2_sum_add_xref_mem() argument
185 temp->offset = cpu_to_je32(ofs); in jffs2_sum_add_xref_mem()
249 unsigned long count, uint32_t ofs) in jffs2_sum_add_kvec() argument
260 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_sum_add_kvec()
[all …]
Dwritev.c32 int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, in jffs2_flash_direct_write() argument
36 ret = mtd_write(c->mtd, ofs, len, retlen, buf); in jffs2_flash_direct_write()
45 res = jffs2_sum_add_kvec(c, vecs, 1, (uint32_t) ofs); in jffs2_flash_direct_write()
Dos-linux.h78 #define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, b… argument
79 #define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf)) argument
116 int jffs2_flash_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, const u_char…
117 int jffs2_flash_read(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, u_char *buf);
194 int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len,
Ddebug.c98 if (frag->ofs & (PAGE_CACHE_SIZE-1) && frag_prev(frag) in __jffs2_dbg_fragtree_paranoia_check_nolock()
105 if ((frag->ofs+frag->size) & (PAGE_CACHE_SIZE-1) && frag_next(frag) in __jffs2_dbg_fragtree_paranoia_check_nolock()
108 ref_offset(fn->raw), frag->ofs, frag->ofs+frag->size); in __jffs2_dbg_fragtree_paranoia_check_nolock()
126 uint32_t ofs, int len) in __jffs2_dbg_prewrite_paranoia_check() argument
136 ret = jffs2_flash_read(c, ofs, len, &retlen, buf); in __jffs2_dbg_prewrite_paranoia_check()
151 ofs, ofs + i); in __jffs2_dbg_prewrite_paranoia_check()
152 __jffs2_dbg_dump_buffer(buf, len, ofs); in __jffs2_dbg_prewrite_paranoia_check()
713 this->ofs, this->ofs+this->size, ref_offset(this->node->raw), in __jffs2_dbg_dump_fragtree_nolock()
718 this->ofs, this->ofs+this->size, this, frag_left(this), in __jffs2_dbg_dump_fragtree_nolock()
720 if (this->ofs != lastofs) in __jffs2_dbg_dump_fragtree_nolock()
[all …]
Derase.c343 uint32_t ofs; in jffs2_block_check_erase() local
388 for (ofs = jeb->offset; ofs < jeb->offset + c->sector_size; ) { in jffs2_block_check_erase()
389 uint32_t readlen = min((uint32_t)PAGE_SIZE, jeb->offset + c->sector_size - ofs); in jffs2_block_check_erase()
392 *bad_offset = ofs; in jffs2_block_check_erase()
394 ret = mtd_read(c->mtd, ofs, readlen, &retlen, ebuf); in jffs2_block_check_erase()
397 ofs, ret); in jffs2_block_check_erase()
403 ofs, readlen, retlen); in jffs2_block_check_erase()
418 ofs += readlen; in jffs2_block_check_erase()
Dsummary.h185 int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, uint32_t ofs);
186 int jffs2_sum_add_dirent_mem(struct jffs2_summary *s, struct jffs2_raw_dirent *rd, uint32_t ofs);
187 int jffs2_sum_add_xattr_mem(struct jffs2_summary *s, struct jffs2_raw_xattr *rx, uint32_t ofs);
188 int jffs2_sum_add_xref_mem(struct jffs2_summary *s, struct jffs2_raw_xref *rr, uint32_t ofs);
Dnodemgmt.c501 uint32_t ofs, uint32_t len, in jffs2_add_physical_node_ref() argument
507 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_add_physical_node_ref()
510 __func__, ofs & ~3, ofs & 3, len); in jffs2_add_physical_node_ref()
515 if ((c->nextblock || ((ofs & 3) != REF_OBSOLETE)) in jffs2_add_physical_node_ref()
516 && (jeb != c->nextblock || (ofs & ~3) != jeb->offset + (c->sector_size - jeb->free_size))) { in jffs2_add_physical_node_ref()
518 ofs & ~3, ofs & 3); in jffs2_add_physical_node_ref()
530 new = jffs2_link_node_ref(c, jeb, ofs, len, ic); in jffs2_add_physical_node_ref()
Dnodelist.h216 uint32_t ofs; /* The offset to which the data of this node belongs */ member
274 uint32_t ofs; /* The offset to which this fragment belongs */ member
377 uint32_t ofs, uint32_t len,
390 uint32_t ofs, uint32_t len,
455 int ofs, int len);
/linux-4.4.14/drivers/net/wireless/iwlwifi/
Diwl-io.c39 void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val) in iwl_write8() argument
41 trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val); in iwl_write8()
42 iwl_trans_write8(trans, ofs, val); in iwl_write8()
46 void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_write32() argument
48 trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val); in iwl_write32()
49 iwl_trans_write32(trans, ofs, val); in iwl_write32()
53 u32 iwl_read32(struct iwl_trans *trans, u32 ofs) in iwl_read32() argument
55 u32 val = iwl_trans_read32(trans, ofs); in iwl_read32()
57 trace_iwlwifi_dev_ioread32(trans->dev, ofs, val); in iwl_read32()
120 u32 __iwl_read_prph(struct iwl_trans *trans, u32 ofs) in __iwl_read_prph() argument
[all …]
Diwl-io.h35 void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val);
36 void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val);
37 u32 iwl_read32(struct iwl_trans *trans, u32 ofs);
58 u32 __iwl_read_prph(struct iwl_trans *trans, u32 ofs);
59 u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs);
60 void __iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val);
61 void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val);
64 void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask);
65 void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs,
67 void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask);
Diwl-trans.h591 void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val);
592 void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val);
593 u32 (*read32)(struct iwl_trans *trans, u32 ofs);
594 u32 (*read_prph)(struct iwl_trans *trans, u32 ofs);
595 void (*write_prph)(struct iwl_trans *trans, u32 ofs, u32 val);
1015 static inline void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val) in iwl_trans_write8() argument
1017 trans->ops->write8(trans, ofs, val); in iwl_trans_write8()
1020 static inline void iwl_trans_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_trans_write32() argument
1022 trans->ops->write32(trans, ofs, val); in iwl_trans_write32()
1025 static inline u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs) in iwl_trans_read32() argument
[all …]
/linux-4.4.14/security/selinux/ss/
Debitmap.h49 unsigned int ofs; in ebitmap_start_positive() local
52 ofs = find_first_bit((*n)->maps, EBITMAP_SIZE); in ebitmap_start_positive()
53 if (ofs < EBITMAP_SIZE) in ebitmap_start_positive()
54 return (*n)->startbit + ofs; in ebitmap_start_positive()
68 unsigned int ofs; in ebitmap_next_positive() local
70 ofs = find_next_bit((*n)->maps, EBITMAP_SIZE, bit - (*n)->startbit + 1); in ebitmap_next_positive()
71 if (ofs < EBITMAP_SIZE) in ebitmap_next_positive()
72 return ofs + (*n)->startbit; in ebitmap_next_positive()
75 ofs = find_first_bit((*n)->maps, EBITMAP_SIZE); in ebitmap_next_positive()
76 if (ofs < EBITMAP_SIZE) in ebitmap_next_positive()
[all …]
/linux-4.4.14/drivers/media/pci/pt3/
Dpt3_dma.c70 static u8 *next_unit(struct pt3_adapter *adap, int *idx, int *ofs) in next_unit() argument
72 *ofs += PT3_ACCESS_UNIT; in next_unit()
73 if (*ofs >= DATA_BUF_SZ) { in next_unit()
74 *ofs -= DATA_BUF_SZ; in next_unit()
79 return &adap->buffer[*idx].data[*ofs]; in next_unit()
84 int idx, ofs; in pt3_proc_dma() local
87 ofs = adap->buf_ofs; in pt3_proc_dma()
89 if (adap->buffer[idx].data[ofs] == PT3_BUF_CANARY) in pt3_proc_dma()
92 while (*next_unit(adap, &idx, &ofs) != PT3_BUF_CANARY) { in pt3_proc_dma()
102 adap->buffer[idx].data, ofs / TS_PACKET_SZ); in pt3_proc_dma()
[all …]
/linux-4.4.14/drivers/staging/goldfish/
Dgoldfish_nand.c100 loff_t ofs = instr->addr; in goldfish_nand_erase() local
104 if (ofs + len > mtd->size) in goldfish_nand_erase()
106 rem = do_div(ofs, mtd->writesize); in goldfish_nand_erase()
109 ofs *= (mtd->writesize + mtd->oobsize); in goldfish_nand_erase()
115 if (goldfish_nand_cmd(mtd, NAND_CMD_ERASE, ofs, len, NULL) != len) { in goldfish_nand_erase()
117 ofs, len, mtd->size, mtd->erasesize); in goldfish_nand_erase()
128 ofs, len, mtd->size, mtd->erasesize); in goldfish_nand_erase()
132 static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs, in goldfish_nand_read_oob() argument
137 if (ofs + ops->len > mtd->size) in goldfish_nand_read_oob()
144 rem = do_div(ofs, mtd->writesize); in goldfish_nand_read_oob()
[all …]
/linux-4.4.14/drivers/s390/char/
Dhmcdrv_cache.c39 loff_t ofs; member
49 .ofs = -1,
70 if (ftp->ofs >= hmcdrv_cache_file.fsize) /* EOF ? */ in hmcdrv_cache_get()
73 if ((hmcdrv_cache_file.ofs < 0) || /* has content? */ in hmcdrv_cache_get()
80 len = hmcdrv_cache_file.fsize - ftp->ofs; in hmcdrv_cache_get()
88 pos = ftp->ofs - hmcdrv_cache_file.ofs; in hmcdrv_cache_get()
142 hmcdrv_cache_file.ofs = ftp->ofs; in hmcdrv_cache_do()
149 hmcdrv_cache_file.ofs = -1; /* invalidate content */ in hmcdrv_cache_do()
204 hmcdrv_cache_file.ofs = -1; in hmcdrv_cache_cmd()
250 hmcdrv_cache_file.ofs = -1; in hmcdrv_cache_shutdown()
Dhmcdrv_ftp.c168 ftp->id, ftp->fname, (long long) ftp->ofs, ftp->len); in hmcdrv_ftp_do()
190 .ofs = 0, in hmcdrv_ftp_probe()
241 struct hmcdrv_ftp_cmdspec ftp = {.len = len, .ofs = offset}; in hmcdrv_ftp_cmd()
Dhmcdrv_ftp.h50 loff_t ofs; member
Dsclp_ftp.c112 sccb->evbuf.mdd.ftp.offset = ftp->ofs; in sclp_ftp_et7()
177 ftp->id, ftp->fname, (long long) ftp->ofs, ftp->len); in sclp_ftp_cmd()
Ddiag_ftp.c168 ldfpl->offset = ftp->ofs; in diag_ftp_cmd()
/linux-4.4.14/drivers/mtd/maps/
Dpci.c28 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
36 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
40 static map_word mtd_pci_read8(struct map_info *_map, unsigned long ofs) in mtd_pci_read8() argument
44 val.x[0]= readb(map->base + map->translate(map, ofs)); in mtd_pci_read8()
48 static map_word mtd_pci_read32(struct map_info *_map, unsigned long ofs) in mtd_pci_read32() argument
52 val.x[0] = readl(map->base + map->translate(map, ofs)); in mtd_pci_read32()
62 static void mtd_pci_write8(struct map_info *_map, map_word val, unsigned long ofs) in mtd_pci_write8() argument
65 writeb(val.x[0], map->base + map->translate(map, ofs)); in mtd_pci_write8()
68 static void mtd_pci_write32(struct map_info *_map, map_word val, unsigned long ofs) in mtd_pci_write32() argument
71 writel(val.x[0], map->base + map->translate(map, ofs)); in mtd_pci_write32()
[all …]
Dmap_funcs.c12 static map_word __xipram simple_map_read(struct map_info *map, unsigned long ofs) in simple_map_read() argument
14 return inline_map_read(map, ofs); in simple_map_read()
17 static void __xipram simple_map_write(struct map_info *map, const map_word datum, unsigned long ofs) in simple_map_write() argument
19 inline_map_write(map, datum, ofs); in simple_map_write()
Dgpio-addr-flash.c63 static void gf_set_gpios(struct async_state *state, unsigned long ofs) in gf_set_gpios() argument
67 ofs /= state->win_size; in gf_set_gpios()
69 value = ofs & (1 << i); in gf_set_gpios()
82 static map_word gf_read(struct map_info *map, unsigned long ofs) in gf_read() argument
88 gf_set_gpios(state, ofs); in gf_read()
90 word = readw(map->virt + (ofs % state->win_size)); in gf_read()
131 static void gf_write(struct map_info *map, map_word d1, unsigned long ofs) in gf_write() argument
136 gf_set_gpios(state, ofs); in gf_write()
139 writew(d, map->virt + (ofs % state->win_size)); in gf_write()
Ddc21285.c54 static map_word dc21285_read8(struct map_info *map, unsigned long ofs) in dc21285_read8() argument
57 val.x[0] = *(uint8_t*)(map->virt + ofs); in dc21285_read8()
61 static map_word dc21285_read16(struct map_info *map, unsigned long ofs) in dc21285_read16() argument
64 val.x[0] = *(uint16_t*)(map->virt + ofs); in dc21285_read16()
68 static map_word dc21285_read32(struct map_info *map, unsigned long ofs) in dc21285_read32() argument
71 val.x[0] = *(uint32_t*)(map->virt + ofs); in dc21285_read32()
Dsbc_gxx.c103 static inline void sbc_gxx_page(struct map_info *map, unsigned long ofs) in sbc_gxx_page() argument
105 unsigned long page = ofs >> WINDOW_SHIFT; in sbc_gxx_page()
114 static map_word sbc_gxx_read8(struct map_info *map, unsigned long ofs) in sbc_gxx_read8() argument
118 sbc_gxx_page(map, ofs); in sbc_gxx_read8()
119 ret.x[0] = readb(iomapadr + (ofs & WINDOW_MASK)); in sbc_gxx_read8()
Dlatch-addr-flash.c38 static map_word lf_read(struct map_info *map, unsigned long ofs) in lf_read() argument
47 info->set_window(ofs, info->data); in lf_read()
48 datum = inline_map_read(map, info->win_mask & ofs); in lf_read()
55 static void lf_write(struct map_info *map, map_word datum, unsigned long ofs) in lf_write() argument
63 info->set_window(ofs, info->data); in lf_write()
64 inline_map_write(map, datum, info->win_mask & ofs); in lf_write()
Dpcmciamtd.c108 static map_word pcmcia_read8_remap(struct map_info *map, unsigned long ofs) in pcmcia_read8_remap() argument
113 addr = remap_window(map, ofs); in pcmcia_read8_remap()
118 pr_debug("ofs = 0x%08lx (%p) data = 0x%02lx\n", ofs, addr, d.x[0]); in pcmcia_read8_remap()
123 static map_word pcmcia_read16_remap(struct map_info *map, unsigned long ofs) in pcmcia_read16_remap() argument
128 addr = remap_window(map, ofs); in pcmcia_read16_remap()
133 pr_debug("ofs = 0x%08lx (%p) data = 0x%04lx\n", ofs, addr, d.x[0]); in pcmcia_read16_remap()
217 static map_word pcmcia_read8(struct map_info *map, unsigned long ofs) in pcmcia_read8() argument
225 d.x[0] = readb(win_base + ofs); in pcmcia_read8()
227 ofs, win_base + ofs, d.x[0]); in pcmcia_read8()
232 static map_word pcmcia_read16(struct map_info *map, unsigned long ofs) in pcmcia_read16() argument
[all …]
Dvmu-flash.c55 unsigned int ofs; /* block offset */ member
83 vblock->ofs = src_ofs % card->blocklen; in ofs_to_block()
304 static unsigned char vmu_flash_read_char(unsigned long ofs, int *retval, in vmu_flash_read_char() argument
327 vblock = ofs_to_block(ofs, mtd, partition); in vmu_flash_read_char()
341 ret = buf[vblock->ofs]; in vmu_flash_read_char()
384 leftover = card->blocklen - vblock->ofs; in vmu_flash_read()
385 if (vblock->ofs + len - index < card->blocklen) { in vmu_flash_read()
388 pcache->buffer + vblock->ofs, in vmu_flash_read()
394 vblock->ofs, leftover); in vmu_flash_read()
461 buffer[vblock->ofs] = buf[index]; in vmu_flash_write()
[all …]
Dbfin-async-flash.c70 static map_word bfin_flash_read(struct map_info *map, unsigned long ofs) in bfin_flash_read() argument
78 word = readw(map->virt + ofs); in bfin_flash_read()
97 static void bfin_flash_write(struct map_info *map, map_word d1, unsigned long ofs) in bfin_flash_write() argument
106 writew(d, map->virt + ofs); in bfin_flash_write()
Dixp4xx.c88 static map_word ixp4xx_read16(struct map_info *map, unsigned long ofs) in ixp4xx_read16() argument
91 val.x[0] = flash_read16(map->virt + ofs); in ixp4xx_read16()
/linux-4.4.14/arch/mips/txx9/generic/
Dirq_tx4939.c57 int ofs; in tx4939_irq_unmask() local
65 ofs = (irq_nr & 16) + (irq_nr & 1) * 8; in tx4939_irq_unmask()
66 __raw_writel((__raw_readl(lvlp) & ~(0xff << ofs)) in tx4939_irq_unmask()
67 | (tx4939irq[irq_nr].level << ofs), in tx4939_irq_unmask()
75 int ofs; in tx4939_irq_mask() local
83 ofs = (irq_nr & 16) + (irq_nr & 1) * 8; in tx4939_irq_mask()
84 __raw_writel((__raw_readl(lvlp) & ~(0xff << ofs)) in tx4939_irq_mask()
85 | (irc_dlevel << ofs), in tx4939_irq_mask()
109 int ofs; in tx4939_irq_set_type() local
137 ofs = (((irq_nr & 16) >> 1) | (irq_nr & (8 - 1))) * 2; in tx4939_irq_set_type()
[all …]
/linux-4.4.14/drivers/net/arcnet/
Darc-rawmode.c45 int ofs; in rx() local
50 ofs = 512 - length; in rx()
52 ofs = 256 - length; in rx()
70 lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), in rx()
118 int ofs; in prepare_tx() local
134 hard->offset[1] = ofs = 512 - length; in prepare_tx()
137 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
139 hard->offset[0] = ofs = 256 - length; in prepare_tx()
143 length, ofs); in prepare_tx()
146 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()
Dcapmode.c49 int ofs; in rx() local
55 ofs = 512 - length; in rx()
57 ofs = 256 - length; in rx()
83 lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), in rx()
137 int ofs; in prepare_tx() local
158 hard->offset[1] = ofs = 512 - length; in prepare_tx()
161 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
163 hard->offset[0] = ofs = 256 - length; in prepare_tx()
167 length, ofs); in prepare_tx()
171 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft.cap.proto, in prepare_tx()
[all …]
Drfc1051.c127 int ofs; in rx() local
132 ofs = 512 - length; in rx()
134 ofs = 256 - length; in rx()
149 lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), in rx()
212 int ofs; in prepare_tx() local
228 hard->offset[1] = ofs = 512 - length; in prepare_tx()
231 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
233 hard->offset[0] = ofs = 256 - length; in prepare_tx()
237 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()
Drfc1201.c139 int saddr = pkt->hard.source, ofs; in rx() local
146 ofs = 512 - length; in rx()
148 ofs = 256 - length; in rx()
161 ofs += 4; in rx()
198 ofs + sizeof(pkt->soft), in rx()
353 lp->hw.copy_from_card(dev, bufnum, ofs + RFC1201_HDR_SIZE, in rx()
446 int ofs; in load_pkt() local
452 hard->offset[1] = ofs = 512 - softlen; in load_pkt()
461 ofs = 512 - softlen; in load_pkt()
462 hard->offset[1] = ofs - RFC1201_HDR_SIZE; in load_pkt()
[all …]
Dcom20020.c65 int ioaddr = dev->base_addr, ofs = 512 * bufnum + offset; in com20020_copy_from_card() local
68 arcnet_outb((ofs >> 8) | RDDATAflag | AUTOINCflag, in com20020_copy_from_card()
70 arcnet_outb(ofs & 0xff, ioaddr, COM20020_REG_W_ADDR_LO); in com20020_copy_from_card()
80 int ioaddr = dev->base_addr, ofs = 512 * bufnum + offset; in com20020_copy_to_card() local
83 arcnet_outb((ofs >> 8) | AUTOINCflag, ioaddr, COM20020_REG_W_ADDR_HI); in com20020_copy_to_card()
84 arcnet_outb(ofs & 0xff, ioaddr, COM20020_REG_W_ADDR_LO); in com20020_copy_to_card()
Darcnet.c1014 int length, ofs; in arcnet_rx() local
1020 ofs = pkt.hard.offset[0]; in arcnet_rx()
1021 length = 256 - ofs; in arcnet_rx()
1023 ofs = pkt.hard.offset[1]; in arcnet_rx()
1024 length = 512 - ofs; in arcnet_rx()
1029 lp->hw.copy_from_card(dev, bufnum, ofs, soft, sizeof(pkt.soft)); in arcnet_rx()
1032 lp->hw.copy_from_card(dev, bufnum, ofs, soft, length); in arcnet_rx()
/linux-4.4.14/arch/mips/kernel/
Dirq_txx9.c70 int ofs = irq_nr / 16 * 16 + (irq_nr & 1) * 8; in txx9_irq_unmask() local
72 __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs)) in txx9_irq_unmask()
73 | (txx9irq[irq_nr].level << ofs), in txx9_irq_unmask()
86 int ofs = irq_nr / 16 * 16 + (irq_nr & 1) * 8; in txx9_irq_mask() local
88 __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs)) in txx9_irq_mask()
89 | (irc_dlevel << ofs), in txx9_irq_mask()
117 int ofs; in txx9_irq_set_type() local
132 ofs = (irq_nr & (8 - 1)) * 2; in txx9_irq_set_type()
133 cr &= ~(0x3 << ofs); in txx9_irq_set_type()
134 cr |= (mode & 0x3) << ofs; in txx9_irq_set_type()
Dprocess.c389 unsigned long ofs; in frame_info_init() local
398 kallsyms_lookup_size_offset(addr, &size, &ofs); in frame_info_init()
441 unsigned long size, ofs; in unwind_stack_by_address() local
468 if (!kallsyms_lookup_size_offset(pc, &size, &ofs)) in unwind_stack_by_address()
473 if (unlikely(ofs == 0)) { in unwind_stack_by_address()
479 info.func = (void *)(pc - ofs); in unwind_stack_by_address()
480 info.func_size = ofs; /* analyze from start to ofs */ in unwind_stack_by_address()
/linux-4.4.14/include/linux/mtd/
Dmap.h411 static inline map_word inline_map_read(struct map_info *map, unsigned long ofs) in inline_map_read() argument
416 r.x[0] = __raw_readb(map->virt + ofs); in inline_map_read()
418 r.x[0] = __raw_readw(map->virt + ofs); in inline_map_read()
420 r.x[0] = __raw_readl(map->virt + ofs); in inline_map_read()
423 r.x[0] = __raw_readq(map->virt + ofs); in inline_map_read()
426 memcpy_fromio(r.x, map->virt + ofs, map->bankwidth); in inline_map_read()
433 static inline void inline_map_write(struct map_info *map, const map_word datum, unsigned long ofs) in inline_map_write() argument
436 __raw_writeb(datum.x[0], map->virt + ofs); in inline_map_write()
438 __raw_writew(datum.x[0], map->virt + ofs); in inline_map_write()
440 __raw_writel(datum.x[0], map->virt + ofs); in inline_map_write()
[all …]
Dmtd.h222 int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
223 int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
224 int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
225 int (*_block_isreserved) (struct mtd_info *mtd, loff_t ofs);
226 int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs);
227 int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs);
304 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
305 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
306 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len);
307 int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs);
[all …]
Dspi-nor.h181 int (*flash_lock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
182 int (*flash_unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len);
183 int (*flash_is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len);
Dbbm.h160 int (*isbad_bbt)(struct mtd_info *mtd, loff_t ofs, int allowbbt);
Dnand.h48 extern int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
51 extern int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
654 int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip);
655 int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
Donenand.h119 int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
Dcfi.h389 loff_t ofs, size_t len, void *thunk);
/linux-4.4.14/arch/arm/mach-netx/include/mach/
Dnetx-regs.h118 #define NETX_SYSTEM_REG(ofs) IOMEM(NETX_VA_SYSTEM + (ofs)) argument
188 #define NETX_GPIO_REG(ofs) IOMEM(NETX_VA_GPIO + (ofs)) argument
233 #define NETX_PIO_REG(ofs) IOMEM(NETX_VA_PIO + (ofs)) argument
320 #define NETX_PFIFO_REG(ofs) IOMEM(NETX_VA_PFIFO + (ofs)) argument
337 #define NETX_MEMCR_REG(ofs) IOMEM(NETX_VA_MEMCR + (ofs)) argument
358 #define NETX_DPMAS_REG(ofs) IOMEM(NETX_VA_DPMAS + (ofs)) argument
428 #define NETX_I2C_REG(ofs) IOMEM(NETX_VA_I2C, (ofs)) argument
/linux-4.4.14/drivers/mtd/lpddr/
Dlpddr_cmds.c39 static int lpddr_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
40 static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
527 unsigned long ofs, last_end = 0; in lpddr_point() local
535 ofs = adr - (chipnum << lpddr->chipshift); in lpddr_point()
536 *mtdbuf = (void *)map->virt + chip->start + ofs; in lpddr_point()
550 if ((len + ofs - 1) >> lpddr->chipshift) in lpddr_point()
551 thislen = (1<<lpddr->chipshift) - ofs; in lpddr_point()
566 ofs = 0; in lpddr_point()
579 unsigned long ofs; in lpddr_unpoint() local
582 ofs = adr - (chipnum << lpddr->chipshift); in lpddr_unpoint()
[all …]
/linux-4.4.14/drivers/net/ethernet/ti/
Dnetcp_xgbepcsr.c41 u32 ofs; member
140 reg_rmw(serdes_regs + cfg_phyb_1p25g_156p25mhz_cmu0[i].ofs, in netcp_xgbe_serdes_cmu_init()
147 reg_rmw(serdes_regs + cfg_phyb_10p3125g_156p25mhz_cmu1[i].ofs, in netcp_xgbe_serdes_cmu_init()
162 cfg_phyb_10p3125g_16bit_lane[i].ofs + in netcp_xgbe_serdes_lane_config()
182 reg_rmw(serdes_regs + cfg_phyb_10p3125g_comlane[i].ofs, in netcp_xgbe_serdes_com_enable()
257 int select, int ofs) in netcp_xgbe_serdes_write_tbus_addr() argument
260 reg_rmw(serdes_regs + 0x0008, ((select << 5) + ofs) << 24, in netcp_xgbe_serdes_write_tbus_addr()
277 reg_rmw(serdes_regs + 0x00fc, ((select << 8) + ofs) << 16, ~0xf800ffff); in netcp_xgbe_serdes_write_tbus_addr()
281 int select, int ofs) in netcp_xgbe_serdes_read_select_tbus() argument
284 netcp_xgbe_serdes_write_tbus_addr(serdes_regs, select, ofs); in netcp_xgbe_serdes_read_select_tbus()
[all …]
Ddavinci_cpdma.c133 #define dma_reg_read(ctlr, ofs) __raw_readl((ctlr)->dmaregs + (ofs)) argument
136 #define dma_reg_write(ctlr, ofs, v) __raw_writel(v, (ctlr)->dmaregs + (ofs)) argument
/linux-4.4.14/arch/ia64/kernel/
Delfcore.c19 Elf64_Off ofs = 0; in elf_core_write_extra_phdrs() local
27 if (ofs == 0) { in elf_core_write_extra_phdrs()
28 ofs = phdr.p_offset = offset; in elf_core_write_extra_phdrs()
31 phdr.p_offset = ofs; in elf_core_write_extra_phdrs()
34 phdr.p_offset += ofs; in elf_core_write_extra_phdrs()
/linux-4.4.14/arch/sh/include/mach-common/mach/
Durquell.h30 #define BOARDREG(ofs) (FPGA_BASE + ofs##_OFS) argument
31 #define UBOARDREG(ofs) (0xa0000000 + FPGA_BASE + ofs##_OFS) argument
/linux-4.4.14/drivers/mtd/chips/
Dcfi_cmdset_0002.c86 static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
87 static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
89 static int cfi_ppb_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
90 static int cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
91 static int cfi_ppb_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len);
1141 unsigned long ofs; in cfi_amdstd_read() local
1147 ofs = from - (chipnum << cfi->chipshift); in cfi_amdstd_read()
1155 if ((len + ofs -1) >> cfi->chipshift) in cfi_amdstd_read()
1156 thislen = (1<<cfi->chipshift) - ofs; in cfi_amdstd_read()
1160 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); in cfi_amdstd_read()
[all …]
Dfwh_lock.h79 static int fwh_lock_varsize(struct mtd_info *mtd, loff_t ofs, uint64_t len) in fwh_lock_varsize() argument
83 ret = cfi_varsize_frob(mtd, fwh_xxlock_oneblock, ofs, len, in fwh_lock_varsize()
90 static int fwh_unlock_varsize(struct mtd_info *mtd, loff_t ofs, uint64_t len) in fwh_unlock_varsize() argument
94 ret = cfi_varsize_frob(mtd, fwh_xxlock_oneblock, ofs, len, in fwh_unlock_varsize()
Dcfi_cmdset_0001.c67 static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
68 static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
69 static int cfi_intelext_is_locked(struct mtd_info *mtd, loff_t ofs,
1353 unsigned long ofs, last_end = 0; in cfi_intelext_point() local
1364 ofs = from - (chipnum << cfi->chipshift); in cfi_intelext_point()
1366 *virt = map->virt + cfi->chips[chipnum].start + ofs; in cfi_intelext_point()
1368 *phys = map->phys + cfi->chips[chipnum].start + ofs; in cfi_intelext_point()
1382 if ((len + ofs -1) >> cfi->chipshift) in cfi_intelext_point()
1383 thislen = (1<<cfi->chipshift) - ofs; in cfi_intelext_point()
1387 ret = do_point_onechip(map, &cfi->chips[chipnum], ofs, thislen); in cfi_intelext_point()
[all …]
Dcfi_util.c353 loff_t ofs, size_t len, void *thunk) in cfi_varsize_frob() argument
374 while (i < mtd->numeraseregions && ofs >= regions[i].offset) in cfi_varsize_frob()
384 if (ofs & (regions[i].erasesize-1)) in cfi_varsize_frob()
394 while (i<mtd->numeraseregions && (ofs + len) >= regions[i].offset) in cfi_varsize_frob()
402 if ((ofs + len) & (regions[i].erasesize-1)) in cfi_varsize_frob()
405 chipnum = ofs >> cfi->chipshift; in cfi_varsize_frob()
406 adr = ofs - (chipnum << cfi->chipshift); in cfi_varsize_frob()
419 ofs += size; in cfi_varsize_frob()
422 if (ofs == regions[i].offset + size * regions[i].numblocks) in cfi_varsize_frob()
Dcfi_cmdset_0020.c43 static int cfi_staa_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
44 static int cfi_staa_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
386 unsigned long ofs; in cfi_staa_read() local
392 ofs = from - (chipnum << cfi->chipshift); in cfi_staa_read()
400 if ((len + ofs -1) >> cfi->chipshift) in cfi_staa_read()
401 thislen = (1<<cfi->chipshift) - ofs; in cfi_staa_read()
405 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); in cfi_staa_read()
413 ofs = 0; in cfi_staa_read()
613 unsigned long ofs; in cfi_staa_write_buffers() local
616 ofs = to - (chipnum << cfi->chipshift); in cfi_staa_write_buffers()
[all …]
Djedec_probe.c1890 uint32_t ofs = cfi_build_cmd_addr(0 + (bank << 8), map, cfi); in jedec_read_mfr() local
1892 result = map_read(map, base + ofs); in jedec_read_mfr()
1904 u32 ofs = cfi_build_cmd_addr(1, map, cfi); in jedec_read_id() local
1906 result = map_read(map, base + ofs); in jedec_read_id()
/linux-4.4.14/arch/xtensa/variants/fsf/include/variant/
Dtie-asm.h37 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
38 xchal_sa_start \continue, \ofs
52 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
53 xchal_sa_start \continue, \ofs
/linux-4.4.14/include/linux/
Dihex.h37 size_t ofs = 0; in ihex_validate_fw() local
39 while (ofs <= fw->size - sizeof(*rec)) { in ihex_validate_fw()
40 rec = (void *)&fw->data[ofs]; in ihex_validate_fw()
47 ofs += (sizeof(*rec) + be16_to_cpu(rec->len) + 3) & ~3; in ihex_validate_fw()
Dtty.h73 static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs) in char_buf_ptr() argument
75 return ((unsigned char *)b->data) + ofs; in char_buf_ptr()
78 static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs) in flag_buf_ptr() argument
80 return (char *)char_buf_ptr(b, ofs) + b->size; in flag_buf_ptr()
/linux-4.4.14/sound/hda/
Dhdac_stream.c317 int ofs, int size, int with_ioc) in setup_bdle() argument
328 addr = snd_sgbuf_get_addr(dmab, ofs); in setup_bdle()
333 chunk = snd_sgbuf_get_chunk_size(dmab, ofs, size); in setup_bdle()
336 u32 remain = 0x1000 - (ofs & 0xfff); in setup_bdle()
349 ofs += chunk; in setup_bdle()
352 return ofs; in setup_bdle()
368 int i, ofs, periods, period_bytes; in snd_hdac_stream_setup_periods() local
380 ofs = 0; in snd_hdac_stream_setup_periods()
398 ofs = setup_bdle(bus, snd_pcm_get_dma_buf(substream), in snd_hdac_stream_setup_periods()
400 &bdl, ofs, pos_adj, true); in snd_hdac_stream_setup_periods()
[all …]
/linux-4.4.14/drivers/mtd/
Dmtdconcat.c498 static int concat_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in concat_lock() argument
507 if (ofs >= subdev->size) { in concat_lock()
509 ofs -= subdev->size; in concat_lock()
512 if (ofs + len > subdev->size) in concat_lock()
513 size = subdev->size - ofs; in concat_lock()
517 err = mtd_lock(subdev, ofs, size); in concat_lock()
526 ofs = 0; in concat_lock()
532 static int concat_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in concat_unlock() argument
541 if (ofs >= subdev->size) { in concat_unlock()
543 ofs -= subdev->size; in concat_unlock()
[all …]
Dmtdcore.c1078 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_lock() argument
1082 if (ofs < 0 || ofs >= mtd->size || len > mtd->size - ofs) in mtd_lock()
1086 return mtd->_lock(mtd, ofs, len); in mtd_lock()
1090 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_unlock() argument
1094 if (ofs < 0 || ofs >= mtd->size || len > mtd->size - ofs) in mtd_unlock()
1098 return mtd->_unlock(mtd, ofs, len); in mtd_unlock()
1102 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_is_locked() argument
1106 if (ofs < 0 || ofs >= mtd->size || len > mtd->size - ofs) in mtd_is_locked()
1110 return mtd->_is_locked(mtd, ofs, len); in mtd_is_locked()
1114 int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs) in mtd_block_isreserved() argument
[all …]
Dmtdpart.c258 static int part_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in part_lock() argument
261 return part->master->_lock(part->master, ofs + part->offset, len); in part_lock()
264 static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in part_unlock() argument
267 return part->master->_unlock(part->master, ofs + part->offset, len); in part_unlock()
270 static int part_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) in part_is_locked() argument
273 return part->master->_is_locked(part->master, ofs + part->offset, len); in part_is_locked()
294 static int part_block_isreserved(struct mtd_info *mtd, loff_t ofs) in part_block_isreserved() argument
297 ofs += part->offset; in part_block_isreserved()
298 return part->master->_block_isreserved(part->master, ofs); in part_block_isreserved()
301 static int part_block_isbad(struct mtd_info *mtd, loff_t ofs) in part_block_isbad() argument
[all …]
/linux-4.4.14/sound/pci/ice1712/
Dphase.c494 int i, ofs, voices; in wm_vol_get() local
497 ofs = kcontrol->private_value & 0xff; in wm_vol_get()
500 spec->vol[ofs+i] & ~WM_VOL_MUTE; in wm_vol_get()
509 int i, idx, ofs, voices; in wm_vol_put() local
513 ofs = kcontrol->private_value & 0xff; in wm_vol_put()
520 vol |= spec->vol[ofs+i] & WM_VOL_MUTE; in wm_vol_put()
521 if (vol != spec->vol[ofs+i]) { in wm_vol_put()
522 spec->vol[ofs+i] = vol; in wm_vol_put()
523 idx = WM_DAC_ATTEN + ofs + i; in wm_vol_put()
524 wm_set_vol(ice, idx, spec->vol[ofs+i], in wm_vol_put()
[all …]
Daureon.c810 int i, ofs, voices; in wm_vol_get() local
813 ofs = kcontrol->private_value & 0xff; in wm_vol_get()
816 spec->vol[ofs+i] & ~WM_VOL_MUTE; in wm_vol_get()
824 int i, idx, ofs, voices; in wm_vol_put() local
828 ofs = kcontrol->private_value & 0xff; in wm_vol_put()
834 vol |= spec->vol[ofs+i] & WM_VOL_MUTE; in wm_vol_put()
835 if (vol != spec->vol[ofs+i]) { in wm_vol_put()
836 spec->vol[ofs+i] = vol; in wm_vol_put()
837 idx = WM_DAC_ATTEN + ofs + i; in wm_vol_put()
838 wm_set_vol(ice, idx, spec->vol[ofs + i], in wm_vol_put()
[all …]
Dprodigy_hifi.c446 int i, ofs, voices; in wm8766_vol_get() local
449 ofs = kcontrol->private_value & 0xff; in wm8766_vol_get()
451 ucontrol->value.integer.value[i] = spec->vol[ofs + i]; in wm8766_vol_get()
459 int i, idx, ofs, voices; in wm8766_vol_put() local
463 ofs = kcontrol->private_value & 0xff; in wm8766_vol_put()
466 if (ucontrol->value.integer.value[i] != spec->vol[ofs + i]) { in wm8766_vol_put()
467 idx = WM8766_LDA1 + ofs + i; in wm8766_vol_put()
468 spec->vol[ofs + i] &= WM_VOL_MUTE; in wm8766_vol_put()
469 spec->vol[ofs + i] |= ucontrol->value.integer.value[i]; in wm8766_vol_put()
471 spec->vol[ofs + i], spec->master[i]); in wm8766_vol_put()
/linux-4.4.14/arch/mips/txx9/rbtx4939/
Dsetup.c290 static unsigned long rbtx4939_flash_fixup_ofs(unsigned long ofs) in rbtx4939_flash_fixup_ofs() argument
299 return (ofs & ~0xc00000) | ((((ofs >> 22) + shift) & 3) << 22); in rbtx4939_flash_fixup_ofs()
304 ofs ^= 0x400000; /* swap A[22] */ in rbtx4939_flash_fixup_ofs()
306 return ofs; in rbtx4939_flash_fixup_ofs()
309 static map_word rbtx4939_flash_read16(struct map_info *map, unsigned long ofs) in rbtx4939_flash_read16() argument
313 ofs = rbtx4939_flash_fixup_ofs(ofs); in rbtx4939_flash_read16()
314 r.x[0] = __raw_readw(map->virt + ofs); in rbtx4939_flash_read16()
319 unsigned long ofs) in rbtx4939_flash_write16() argument
321 ofs = rbtx4939_flash_fixup_ofs(ofs); in rbtx4939_flash_write16()
322 __raw_writew(datum.x[0], map->virt + ofs); in rbtx4939_flash_write16()
/linux-4.4.14/drivers/staging/comedi/drivers/
Damplc_dio200_common.c100 unsigned int ofs; /* DIO base offset */ member
105 unsigned int ofs; member
196 data[1] = dio200_read8(dev, subpriv->ofs) & subpriv->valid_isns; in dio200_subdev_intr_insn_bits()
214 dio200_write8(dev, subpriv->ofs, 0); in dio200_stop_intr()
236 dio200_write8(dev, subpriv->ofs, isn_bits); in dio200_start_intr()
307 while ((intstat = (dio200_read8(dev, subpriv->ofs) & in dio200_handle_read_intr()
311 dio200_write8(dev, subpriv->ofs, cur_enabled); in dio200_handle_read_intr()
330 dio200_write8(dev, subpriv->ofs, cur_enabled); in dio200_handle_read_intr()
451 subpriv->ofs = offset; in dio200_subdev_intr_init()
457 dio200_write8(dev, subpriv->ofs, 0); in dio200_subdev_intr_init()
[all …]
/linux-4.4.14/arch/powerpc/kernel/vdso32/
Dsigtramp.S57 #define rsave(regno, ofs) \ argument
64 .ifne ofs; \
65 .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \
114 #define vsave_msr2(regno, ofs) \ argument
119 .byte 0x0a; .short ofs; /* DW_OP_const2u */ \
124 #define vsave(regno, ofs) \ argument
132 .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \
/linux-4.4.14/drivers/mtd/devices/
Ddocg3.c425 static void doc_setup_writeaddr_sector(struct docg3 *docg3, int sector, int ofs) in doc_setup_writeaddr_sector() argument
427 ofs = ofs >> 2; in doc_setup_writeaddr_sector()
429 doc_flash_address(docg3, ofs & 0xff); in doc_setup_writeaddr_sector()
449 int wear, int ofs) in doc_read_seek() argument
454 block0, block1, page, ofs, wear); in doc_read_seek()
456 if (!wear && (ofs < 2 * DOC_LAYOUT_PAGE_SIZE)) { in doc_read_seek()
498 int ofs) in doc_write_seek() argument
503 block0, block1, page, ofs); in doc_write_seek()
507 if (ofs < 2 * DOC_LAYOUT_PAGE_SIZE) { in doc_write_seek()
521 doc_setup_writeaddr_sector(docg3, sector, ofs); in doc_write_seek()
[all …]
Dmtdram.c35 static int check_offs_len(struct mtd_info *mtd, loff_t ofs, uint64_t len) in check_offs_len() argument
40 if (mtd_mod_by_eb(ofs, mtd)) { in check_offs_len()
/linux-4.4.14/drivers/staging/fwserial/
Ddma_fifo.c150 int ofs, l; in dma_fifo_in() local
162 ofs = fifo->in % fifo->capacity; in dma_fifo_in()
163 l = min(n, fifo->capacity - ofs); in dma_fifo_in()
164 memcpy(fifo->data + ofs, src, l); in dma_fifo_in()
193 unsigned len, n, ofs, l, limit; in dma_fifo_out_pend() local
211 ofs = fifo->out % fifo->capacity; in dma_fifo_out_pend()
212 l = fifo->capacity - ofs; in dma_fifo_out_pend()
217 } else if (ofs + n > fifo->guard) { in dma_fifo_out_pend()
229 pended->data = fifo->data + ofs; in dma_fifo_out_pend()
/linux-4.4.14/arch/frv/mb93090-mb00/
Dpci-dma-nommu.c30 unsigned long ofs; member
61 end = this_r->ofs; in dma_alloc_coherent()
66 start = this_r->ofs + this_r->len; in dma_alloc_coherent()
74 new->ofs = start; in dma_alloc_coherent()
97 if (rec->ofs == dma_handle) { in dma_free_coherent()
/linux-4.4.14/fs/f2fs/
Dnode.h216 nid_t ino, unsigned int ofs, bool reset) in fill_node_footer() argument
230 rn->footer.flag = cpu_to_le32((ofs << OFFSET_BIT_SHIFT) | in fill_node_footer()
304 unsigned int ofs = ofs_of_node(node_page); in IS_DNODE() local
306 if (f2fs_has_xattr_block(ofs)) in IS_DNODE()
309 if (ofs == 3 || ofs == 4 + NIDS_PER_BLOCK || in IS_DNODE()
310 ofs == 5 + 2 * NIDS_PER_BLOCK) in IS_DNODE()
312 if (ofs >= 6 + 2 * NIDS_PER_BLOCK) { in IS_DNODE()
313 ofs -= 6 + 2 * NIDS_PER_BLOCK; in IS_DNODE()
314 if (!((long int)ofs % (NIDS_PER_BLOCK + 1))) in IS_DNODE()
Dnode.c648 int ofs, int depth) in truncate_nodes() argument
671 for (i = ofs; i < NIDS_PER_BLOCK; i++, freed++) { in truncate_nodes()
682 child_nofs = nofs + ofs * (NIDS_PER_BLOCK + 1) + 1; in truncate_nodes()
683 for (i = ofs; i < NIDS_PER_BLOCK; i++) { in truncate_nodes()
701 if (!ofs) { in truncate_nodes()
947 unsigned int ofs, struct page *ipage) in new_node_page() argument
975 fill_node_footer(page, dn->nid, dn->inode->i_ino, ofs, true); in new_node_page()
980 if (f2fs_has_xattr_block(ofs)) in new_node_page()
988 if (ofs == 0) in new_node_page()
Dfile.c456 int nr_free = 0, ofs = dn->ofs_in_node, len = count; in truncate_data_blocks_range() local
460 addr = blkaddr_in_node(raw_node) + ofs; in truncate_data_blocks_range()
483 F2FS_I(dn->inode)) + ofs; in truncate_data_blocks_range()
489 dn->ofs_in_node = ofs; in truncate_data_blocks_range()
Ddata.c577 int err = 0, ofs = 1; in f2fs_map_blocks() local
688 blkaddr == (map->m_pblk + ofs)) || in f2fs_map_blocks()
691 ofs++; in f2fs_map_blocks()
/linux-4.4.14/arch/powerpc/kernel/vdso64/
Dsigtramp.S56 #define rsave(regno, ofs) \ argument
63 .ifne ofs; \
64 .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \
114 #define vsave_msr2(regno, ofs) \ argument
119 .byte 0x0a; .short ofs; /* DW_OP_const2u */ \
124 #define vsave(regno, ofs) \ argument
133 .byte 0x23; .uleb128 ofs; /* DW_OP_plus_uconst */ \
/linux-4.4.14/fs/ntfs/
Daops.c89 int ofs; in ntfs_end_buffer_async_read() local
92 ofs = 0; in ntfs_end_buffer_async_read()
94 ofs = init_size - file_ofs; in ntfs_end_buffer_async_read()
97 memset(kaddr + bh_offset(bh) + ofs, 0, in ntfs_end_buffer_async_read()
98 bh->b_size - ofs); in ntfs_end_buffer_async_read()
1124 unsigned int ofs; in ntfs_write_mst_block() local
1130 ofs = bh_offset(tbh); in ntfs_write_mst_block()
1136 mft_no = (((s64)page->index << PAGE_CACHE_SHIFT) + ofs) in ntfs_write_mst_block()
1141 (MFT_RECORD*)(kaddr + ofs), &tni)) { in ntfs_write_mst_block()
1166 err2 = pre_write_mst_fixup((NTFS_RECORD*)(kaddr + ofs), in ntfs_write_mst_block()
[all …]
Dmft.c54 unsigned ofs; in map_mft_record_page() local
65 ofs = (ni->mft_no << vol->mft_record_size_bits) & ~PAGE_CACHE_MASK; in map_mft_record_page()
73 if (index > end_index || (i_size & ~PAGE_CACHE_MASK) < ofs + in map_mft_record_page()
88 ofs)))) { in map_mft_record_page()
90 ni->page_ofs = ofs; in map_mft_record_page()
91 return page_address(page) + ofs; in map_mft_record_page()
1134 s64 pass_end, ll, data_pos, pass_start, ofs, bit; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock() local
1180 ofs = data_pos >> 3; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1181 page_ofs = ofs & ~PAGE_CACHE_MASK; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
1183 ll = ((pass_end + 7) >> 3) - ofs; in ntfs_mft_bitmap_find_and_alloc_free_rec_nolock()
[all …]
Daops.h103 extern void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs);
Dfile.c1218 int ofs = 0; in ntfs_prepare_pages_for_non_resident_write() local
1221 ofs = initialized_size - bh_pos; in ntfs_prepare_pages_for_non_resident_write()
1222 zero_user_segment(page, bh_offset(bh) + ofs, in ntfs_prepare_pages_for_non_resident_write()
1701 unsigned ofs, struct iov_iter *i, size_t bytes) in ntfs_copy_from_user_iter() argument
1709 len = PAGE_CACHE_SIZE - ofs; in ntfs_copy_from_user_iter()
1712 copied = iov_iter_copy_from_user_atomic(*pages, &data, ofs, in ntfs_copy_from_user_iter()
1721 ofs = 0; in ntfs_copy_from_user_iter()
1796 unsigned ofs, do_pages, u; in ntfs_perform_write() local
1800 ofs = pos & ~PAGE_CACHE_MASK; in ntfs_perform_write()
1801 bytes = PAGE_CACHE_SIZE - ofs; in ntfs_perform_write()
[all …]
Dattrib.h111 extern int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt,
Dattrib.c2493 int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) in ntfs_attr_set() argument
2503 (long long)ofs, (long long)cnt, val); in ntfs_attr_set()
2504 BUG_ON(ofs < 0); in ntfs_attr_set()
2516 idx = ofs >> PAGE_CACHE_SHIFT; in ntfs_attr_set()
2517 start_ofs = ofs & ~PAGE_CACHE_MASK; in ntfs_attr_set()
2519 end = ofs + cnt; in ntfs_attr_set()
/linux-4.4.14/drivers/mtd/spi-nor/
Dspi-nor.c403 static void stm_get_locked_range(struct spi_nor *nor, u8 sr, loff_t *ofs, in stm_get_locked_range() argument
413 *ofs = 0; in stm_get_locked_range()
418 *ofs = mtd->size - *len; in stm_get_locked_range()
425 static int stm_is_locked_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, in stm_is_locked_sr() argument
433 return (ofs + len <= lock_offs + lock_len) && (ofs >= lock_offs); in stm_is_locked_sr()
459 static int stm_lock(struct spi_nor *nor, loff_t ofs, uint64_t len) in stm_lock() argument
469 if (ofs + len != mtd->size) { in stm_lock()
471 if (!stm_is_locked_sr(nor, ofs + len, mtd->size - ofs - len, in stm_lock()
474 len = mtd->size - ofs; in stm_lock()
509 static int stm_unlock(struct spi_nor *nor, loff_t ofs, uint64_t len) in stm_unlock() argument
[all …]
/linux-4.4.14/fs/omfs/
Ddir.c25 const char *name, int namelen, int *ofs) in omfs_get_bucket() argument
30 *ofs = OMFS_DIR_START + bucket * 8; in omfs_get_bucket()
71 int ofs; in omfs_find_entry() local
74 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_find_entry()
78 block = be64_to_cpu(*((__be64 *) &bh->b_data[ofs])); in omfs_find_entry()
120 int ofs; in omfs_add_link() local
123 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_add_link()
127 entry = (__be64 *) &bh->b_data[ofs]; in omfs_add_link()
166 int ofs; in omfs_delete_entry() local
170 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_delete_entry()
[all …]
Dinode.c83 int xor, i, ofs = 0, count; in omfs_update_checksums() local
88 ofs = sizeof(struct omfs_header); in omfs_update_checksums()
90 crc = crc_itu_t(crc, ptr + ofs, count); in omfs_update_checksums()
/linux-4.4.14/arch/mips/cavium-octeon/
Dflash_setup.c30 static map_word octeon_flash_map_read(struct map_info *map, unsigned long ofs) in octeon_flash_map_read() argument
35 r = inline_map_read(map, ofs); in octeon_flash_map_read()
42 unsigned long ofs) in octeon_flash_map_write() argument
45 inline_map_write(map, datum, ofs); in octeon_flash_map_write()
/linux-4.4.14/arch/mips/include/asm/
Dgt64120.h568 #define __GT_READ(ofs) \ argument
569 (*(volatile u32 *)(GT64120_BASE+(ofs)))
570 #define __GT_WRITE(ofs, data) \ argument
571 do { *(volatile u32 *)(GT64120_BASE+(ofs)) = (data); } while (0)
572 #define GT_READ(ofs) le32_to_cpu(__GT_READ(ofs)) argument
573 #define GT_WRITE(ofs, data) __GT_WRITE(ofs, cpu_to_le32(data)) argument
/linux-4.4.14/drivers/phy/
Dphy-brcmstb-sata.c28 #define SATA_MDIO_REG_OFFSET(ofs) ((ofs) * 4) argument
73 static void brcm_sata_mdio_wr(void __iomem *addr, u32 bank, u32 ofs, in brcm_sata_mdio_wr() argument
79 tmp = readl(addr + SATA_MDIO_REG_OFFSET(ofs)); in brcm_sata_mdio_wr()
81 writel(tmp, addr + SATA_MDIO_REG_OFFSET(ofs)); in brcm_sata_mdio_wr()
/linux-4.4.14/drivers/pcmcia/
Dcistpl.c478 u_int ofs; in follow_link() local
487 ofs = get_unaligned_le32(link + 1); in follow_link()
493 ofs = tuple->LinkOffset; in follow_link()
502 ret = read_cis_cache(s, SPACE(tuple->Flags), ofs, 5, link); in follow_link()
507 return ofs; in follow_link()
508 remove_cis_cache(s, SPACE(tuple->Flags), ofs, 5); in follow_link()
510 ofs = ofs >> 1; in follow_link()
512 ret = read_cis_cache(s, SPACE(tuple->Flags), ofs, 5, link); in follow_link()
517 return ofs; in follow_link()
518 remove_cis_cache(s, SPACE(tuple->Flags), ofs, 5); in follow_link()
[all …]
/linux-4.4.14/arch/arm/mach-iop13xx/include/mach/
Diop13xx.h241 #define IOP13XX_ATUX_OFFSET(ofs) IOP13XX_REG_ADDR32(\ argument
242 iop13xx_atux_pmmr_offset + (ofs))
324 #define IOP13XX_ATUE_OFFSET(ofs) IOP13XX_REG_ADDR32(\ argument
325 iop13xx_atue_pmmr_offset + (ofs))
441 #define IOP13XX_MU_OFFSET(ofs) IOP13XX_REG_ADDR32(IOP13XX_MU_PMMR_OFFSET +\ argument
442 (ofs))
486 #define IOP13XX_PBI_OFFSET(ofs) IOP13XX_REG_ADDR32(IOP13XX_PBI_PMMR_OFFSET +\ argument
487 (ofs))
/linux-4.4.14/drivers/watchdog/
Dw83877f_wdt.c196 size_t ofs; in fop_write() local
204 for (ofs = 0; ofs != count; ofs++) { in fop_write()
206 if (get_user(c, buf + ofs)) in fop_write()
Dsbc60xxwdt.c176 size_t ofs; in fop_write() local
184 for (ofs = 0; ofs != count; ofs++) { in fop_write()
186 if (get_user(c, buf + ofs)) in fop_write()
Dsc520_wdt.c228 size_t ofs; in fop_write() local
235 for (ofs = 0; ofs != count; ofs++) { in fop_write()
237 if (get_user(c, buf + ofs)) in fop_write()
Dalim7101_wdt.c189 size_t ofs; in fop_write() local
196 for (ofs = 0; ofs != count; ofs++) { in fop_write()
198 if (get_user(c, buf + ofs)) in fop_write()
Dmachzwd.c279 size_t ofs; in zf_write() local
287 for (ofs = 0; ofs != count; ofs++) { in zf_write()
289 if (get_user(c, buf + ofs)) in zf_write()
Dw83977f_wdt.c338 size_t ofs; in wdt_write() local
346 for (ofs = 0; ofs != count; ofs++) { in wdt_write()
348 if (get_user(c, buf + ofs)) in wdt_write()
Dit87_wdt.c476 size_t ofs; in wdt_write() local
479 for (ofs = 0; ofs != count; ofs++) { in wdt_write()
481 if (get_user(c, buf + ofs)) in wdt_write()
/linux-4.4.14/arch/x86/um/
Delfcore.c22 Elf32_Off ofs = 0; in elf_core_write_extra_phdrs() local
28 ofs = phdr.p_offset = offset; in elf_core_write_extra_phdrs()
31 phdr.p_offset += ofs; in elf_core_write_extra_phdrs()
/linux-4.4.14/arch/xtensa/variants/dc232b/include/variant/
Dtie-asm.h37 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
38 xchal_sa_start \continue, \ofs
78 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
79 xchal_sa_start \continue, \ofs
/linux-4.4.14/arch/xtensa/variants/de212/include/variant/
Dtie-asm.h76 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
77 xchal_sa_start \continue, \ofs
130 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
131 xchal_sa_start \continue, \ofs
/linux-4.4.14/sound/core/
Dsgbuf.c144 unsigned int ofs, unsigned int size) in snd_sgbuf_get_chunk_size() argument
149 start = ofs >> PAGE_SHIFT; in snd_sgbuf_get_chunk_size()
150 end = (ofs + size - 1) >> PAGE_SHIFT; in snd_sgbuf_get_chunk_size()
159 return (start << PAGE_SHIFT) - ofs; in snd_sgbuf_get_chunk_size()
Dpcm_lib.c56 snd_pcm_uframes_t frames, ofs, transfer; in snd_pcm_playback_silence() local
88 ofs = runtime->status->hw_ptr; in snd_pcm_playback_silence()
89 frames = new_hw_ptr - ofs; in snd_pcm_playback_silence()
97 runtime->silence_start = ofs; in snd_pcm_playback_silence()
106 ofs = runtime->silence_start % runtime->buffer_size; in snd_pcm_playback_silence()
108 transfer = ofs + frames > runtime->buffer_size ? runtime->buffer_size - ofs : frames; in snd_pcm_playback_silence()
113 err = substream->ops->silence(substream, -1, ofs, transfer); in snd_pcm_playback_silence()
116 char *hwbuf = runtime->dma_area + frames_to_bytes(runtime, ofs); in snd_pcm_playback_silence()
125 err = substream->ops->silence(substream, c, ofs, transfer); in snd_pcm_playback_silence()
131 char *hwbuf = runtime->dma_area + (c * dma_csize) + samples_to_bytes(runtime, ofs); in snd_pcm_playback_silence()
[all …]
/linux-4.4.14/drivers/gpu/ipu-v3/
Dipu-cpmem.c35 #define IPU_CPMEM_WORD(word, ofs, size) ((((word) * 160 + (ofs)) << 8) | (size)) argument
112 u32 ofs = bit % 32; in ipu_ch_param_write_field() local
119 val &= ~(mask << ofs); in ipu_ch_param_write_field()
120 val |= v << ofs; in ipu_ch_param_write_field()
125 val &= ~(mask >> (ofs ? (32 - ofs) : 0)); in ipu_ch_param_write_field()
126 val |= v >> (ofs ? (32 - ofs) : 0); in ipu_ch_param_write_field()
138 u32 ofs = bit % 32; in ipu_ch_param_read_field() local
144 val = (readl(&base->word[word].data[i]) >> ofs) & mask; in ipu_ch_param_read_field()
150 tmp &= mask >> (ofs ? (32 - ofs) : 0); in ipu_ch_param_read_field()
151 val |= tmp << (ofs ? (32 - ofs) : 0); in ipu_ch_param_read_field()
/linux-4.4.14/arch/xtensa/variants/dc233c/include/variant/
Dtie-asm.h77 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
78 xchal_sa_start \continue, \ofs
141 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
142 xchal_sa_start \continue, \ofs
/linux-4.4.14/drivers/scsi/sym53c8xx_2/
Dsym_fw.h195 #define HADDR_2(label,ofs) (RELOC_SOFTC | \ argument
196 (offsetof(struct sym_hcb, label)+(ofs)))
198 #define RADDR_2(label,ofs) (RELOC_REGISTER | ((REG(label))+(ofs))) argument
Dsym_defs.h582 #define SCR_REG_OFS(ofs) ((((ofs) & 0x7f) << 16ul) + ((ofs) & 0x80)) argument
652 #define SCR_REG_OFS2(ofs) (((ofs) & 0xff) << 16ul) argument
Dsym_hipd.c1944 static void sym_settrans(struct sym_hcb *np, int target, u_char opts, u_char ofs, argument
1965 sval = (sval & ~0x1f) | ofs;
1967 sval = (sval & ~0x3f) | ofs;
1972 if (ofs != 0) {
2105 u_char ofs, u_char per, u_char div, u_char fak) argument
2111 sym_settrans(np, target, 0, ofs, per, wide, div, fak);
2115 else if (ofs)
2120 spi_offset(starget) = ofs;
2125 tp->tgoal.offset = ofs;
2137 sym_setpprot(struct sym_hcb *np, int target, u_char opts, u_char ofs, argument
[all …]
/linux-4.4.14/include/linux/rtc/
Dm48t59.h53 void (*write_byte)(struct device *dev, u32 ofs, u8 val);
54 unsigned char (*read_byte)(struct device *dev, u32 ofs);
/linux-4.4.14/fs/cifs/
Dlink.c150 unsigned int ofs; in format_mf_symlink() local
172 ofs = CIFS_MF_SYMLINK_LINK_OFFSET; in format_mf_symlink()
173 memcpy(buf + ofs, link_str, link_len); in format_mf_symlink()
175 ofs += link_len; in format_mf_symlink()
176 if (ofs < CIFS_MF_SYMLINK_FILE_SIZE) { in format_mf_symlink()
177 buf[ofs] = '\n'; in format_mf_symlink()
178 ofs++; in format_mf_symlink()
181 while (ofs < CIFS_MF_SYMLINK_FILE_SIZE) { in format_mf_symlink()
182 buf[ofs] = ' '; in format_mf_symlink()
183 ofs++; in format_mf_symlink()
/linux-4.4.14/drivers/mtd/nand/
Dsm_common.c41 static int sm_block_markbad(struct mtd_info *mtd, loff_t ofs) in sm_block_markbad() argument
59 ret = mtd_write_oob(mtd, ofs, &ops); in sm_block_markbad()
63 (int)ofs); in sm_block_markbad()
Dnand_base.c107 loff_t ofs, uint64_t len) in check_offs_len() argument
113 if (ofs & ((1ULL << chip->phys_erase_shift) - 1)) { in check_offs_len()
320 static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) in nand_block_bad() argument
327 ofs += mtd->erasesize - mtd->writesize; in nand_block_bad()
329 page = (int)(ofs >> chip->page_shift) & chip->pagemask; in nand_block_bad()
332 chipnr = (int)(ofs >> chip->chip_shift); in nand_block_bad()
359 ofs += mtd->writesize; in nand_block_bad()
360 page = (int)(ofs >> chip->page_shift) & chip->pagemask; in nand_block_bad()
381 static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) in nand_default_block_markbad() argument
401 ofs += mtd->erasesize - mtd->writesize; in nand_default_block_markbad()
[all …]
Ddocg4.c1079 static int docg4_block_markbad(struct mtd_info *mtd, loff_t ofs) in docg4_block_markbad() argument
1095 int page = (int)(ofs >> nand->page_shift); in docg4_block_markbad()
1098 dev_dbg(doc->dev, "%s: %08llx\n", __func__, ofs); in docg4_block_markbad()
1100 if (unlikely(ofs & (DOCG4_BLOCK_SIZE - 1))) in docg4_block_markbad()
1102 __func__, ofs); in docg4_block_markbad()
1124 static int docg4_block_neverbad(struct mtd_info *mtd, loff_t ofs, int getchip) in docg4_block_neverbad() argument
/linux-4.4.14/drivers/staging/rdma/ehca/
Dehca_uverbs.c139 u64 start, ofs; in ehca_mmap_queue() local
144 for (ofs = 0; ofs < queue->queue_length; ofs += PAGE_SIZE) { in ehca_mmap_queue()
145 u64 virt_addr = (u64)ipz_qeit_calc(queue, ofs); in ehca_mmap_queue()
/linux-4.4.14/sound/pci/lola/
Dlola_pcm.c320 int ofs, int size) in setup_bdle() argument
331 addr = snd_pcm_sgbuf_get_addr(substream, ofs); in setup_bdle()
336 chunk = snd_pcm_sgbuf_get_chunk_size(substream, ofs, size); in setup_bdle()
345 ofs += chunk; in setup_bdle()
348 return ofs; in setup_bdle()
359 int i, ofs, periods, period_bytes; in lola_setup_periods() local
366 ofs = 0; in lola_setup_periods()
369 ofs = setup_bdle(substream, str, &bdl, ofs, period_bytes); in lola_setup_periods()
370 if (ofs < 0) in lola_setup_periods()
Dlola_mixer.c688 unsigned int ofs = kcontrol->private_value & 0xff; in lola_src_gain_get() local
694 unsigned int idx = ofs + i; in lola_src_gain_get()
711 unsigned int ofs = kcontrol->private_value & 0xff; in lola_src_gain_put() local
716 unsigned int idx = ofs + i; in lola_src_gain_put()
741 int num, int ofs, char *name) in create_src_gain_mixer() argument
744 lola_src_gain_mixer.private_value = ofs + (num << 8); in create_src_gain_mixer()
829 int num, int ofs, char *name)
834 src_ofs + (src_num << 8) + (ofs << 16) + (num << 24);
/linux-4.4.14/arch/sparc/kernel/
Dtime_32.c237 static unsigned char mostek_read_byte(struct device *dev, u32 ofs) in mostek_read_byte() argument
242 return readb(pdata->ioaddr + ofs); in mostek_read_byte()
245 static void mostek_write_byte(struct device *dev, u32 ofs, u8 val) in mostek_write_byte() argument
250 writeb(val, pdata->ioaddr + ofs); in mostek_write_byte()
Dtime_64.c491 static unsigned char mostek_read_byte(struct device *dev, u32 ofs) in mostek_read_byte() argument
496 return readb(regs + ofs); in mostek_read_byte()
499 static void mostek_write_byte(struct device *dev, u32 ofs, u8 val) in mostek_write_byte() argument
504 writeb(val, regs + ofs); in mostek_write_byte()
/linux-4.4.14/arch/microblaze/kernel/
Dunwind.c192 int ofs = 0; in microblaze_unwind_inner() local
235 pc -= ofs; in microblaze_unwind_inner()
265 ofs = sizeof(unsigned long); in microblaze_unwind_inner()
/linux-4.4.14/arch/sh/kernel/cpu/sh5/
Dunwind.c231 int ofs = 0; in sh64_unwind_inner() local
271 pc -= ofs; in sh64_unwind_inner()
285 ofs = sizeof(unsigned long); in sh64_unwind_inner()
/linux-4.4.14/drivers/staging/rdma/ipath/
Dipath_user_sdma.c685 unsigned ofs, u16 tail) in ipath_user_sdma_send_frag() argument
695 descq0 = ipath_sdma_make_desc0(dd, addr, dwlen, ofs); in ipath_user_sdma_send_frag()
733 unsigned ofs = 0; in ipath_user_sdma_push_pkts() local
740 ipath_user_sdma_send_frag(dd, pkt, i, ofs, tail); in ipath_user_sdma_push_pkts()
741 ofs += pkt->addr[i].length >> 2; in ipath_user_sdma_push_pkts()
749 if ((ofs<<2) > dd->ipath_ibmaxlen) { in ipath_user_sdma_push_pkts()
751 ofs<<2, dd->ipath_ibmaxlen); in ipath_user_sdma_push_pkts()
761 if (ofs >= IPATH_SMALLBUF_DWORDS) { in ipath_user_sdma_push_pkts()
/linux-4.4.14/include/sound/
Dmemalloc.h126 unsigned int ofs, unsigned int size);
141 #define snd_sgbuf_get_chunk_size(dmab, ofs, size) (size) argument
Dpcm.h1238 snd_pcm_sgbuf_get_addr(struct snd_pcm_substream *substream, unsigned int ofs) in snd_pcm_sgbuf_get_addr() argument
1240 return snd_sgbuf_get_addr(snd_pcm_get_dma_buf(substream), ofs); in snd_pcm_sgbuf_get_addr()
1249 snd_pcm_sgbuf_get_ptr(struct snd_pcm_substream *substream, unsigned int ofs) in snd_pcm_sgbuf_get_ptr() argument
1251 return snd_sgbuf_get_ptr(snd_pcm_get_dma_buf(substream), ofs); in snd_pcm_sgbuf_get_ptr()
1263 unsigned int ofs, unsigned int size) in snd_pcm_sgbuf_get_chunk_size() argument
1265 return snd_sgbuf_get_chunk_size(snd_pcm_get_dma_buf(substream), ofs, size); in snd_pcm_sgbuf_get_chunk_size()
/linux-4.4.14/drivers/mtd/onenand/
Donenand_base.c308 loff_t ofs = 0; in flexonenand_addr() local
314 ofs = this->diesize[0]; in flexonenand_addr()
318 ofs += (loff_t)block << (this->erase_shift - 1); in flexonenand_addr()
320 ofs += (loff_t)(block - boundary - 1) << (this->erase_shift - 1); in flexonenand_addr()
321 return ofs; in flexonenand_addr()
2226 static int onenand_block_isbad_nolock(struct mtd_info *mtd, loff_t ofs, int allowbbt) in onenand_block_isbad_nolock() argument
2232 return bbm->isbad_bbt(mtd, ofs, allowbbt); in onenand_block_isbad_nolock()
2548 static int onenand_block_isbad(struct mtd_info *mtd, loff_t ofs) in onenand_block_isbad() argument
2553 ret = onenand_block_isbad_nolock(mtd, ofs, 0); in onenand_block_isbad()
2566 static int onenand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) in onenand_default_block_markbad() argument
[all …]
Dsamsung.c630 int err, ofs, page_dma = 0; in s5pc110_read_bufferram() local
657 ofs = ((size_t) buf & ~PAGE_MASK); in s5pc110_read_bufferram()
662 dma_dst = dma_map_page(dev, page, ofs, count, DMA_FROM_DEVICE); in s5pc110_read_bufferram()
754 static void s3c_onenand_do_lock_cmd(struct mtd_info *mtd, loff_t ofs, in s3c_onenand_do_lock_cmd() argument
760 start = ofs >> this->erase_shift; in s3c_onenand_do_lock_cmd()
783 loff_t ofs = 0; in s3c_unlock_all() local
800 ofs = this->chipsize >> 1; in s3c_unlock_all()
804 s3c_onenand_do_lock_cmd(mtd, ofs, len, ONENAND_CMD_UNLOCK); in s3c_unlock_all()
/linux-4.4.14/arch/alpha/include/asm/
Dbitops.h444 unsigned long b0, b1, ofs, tmp; in sched_find_first_bit() local
448 ofs = (b0 ? 0 : 64); in sched_find_first_bit()
451 return __ffs(tmp) + ofs; in sched_find_first_bit()
/linux-4.4.14/arch/alpha/kernel/
Dsys_cabriolet.c43 int ofs = (irq - 16) / 8; in cabriolet_update_irq_hw() local
44 outb(mask >> (16 + ofs * 8), 0x804 + ofs); in cabriolet_update_irq_hw()
Dpci_iommu.c211 iommu_arena_free(struct pci_iommu_arena *arena, long ofs, long n) in iommu_arena_free() argument
216 p = arena->ptes + ofs; in iommu_arena_free()
760 long npages, ofs; in alpha_pci_unmap_sg() local
787 ofs = (addr - arena->dma_base) >> PAGE_SHIFT; in alpha_pci_unmap_sg()
788 iommu_arena_free(arena, ofs, npages); in alpha_pci_unmap_sg()
/linux-4.4.14/drivers/isdn/hisax/
Dst5481.h478 int len, ofs; in dump_iso_packet() local
489 ofs = urb->iso_frame_desc[i].offset; in dump_iso_packet()
490 printk(KERN_DEBUG "len=%.2d,ofs=%.3d ", len, ofs); in dump_iso_packet()
492 data = urb->transfer_buffer + ofs; in dump_iso_packet()
/linux-4.4.14/drivers/block/
Dps3disk.c330 static void ata_id_string(const u16 *id, unsigned char *s, unsigned int ofs, in ata_id_string() argument
336 c = id[ofs] >> 8; in ata_id_string()
340 c = id[ofs] & 0xff; in ata_id_string()
344 ofs++; in ata_id_string()
349 static void ata_id_c_string(const u16 *id, unsigned char *s, unsigned int ofs, in ata_id_c_string() argument
356 ata_id_string(id, s, ofs, len - 1); in ata_id_c_string()
Dmg_disk.c309 unsigned int ofs, unsigned int len) in mg_id_string() argument
316 c = id[ofs] >> 8; in mg_id_string()
320 c = id[ofs] & 0xff; in mg_id_string()
324 ofs++; in mg_id_string()
331 unsigned int ofs, unsigned int len) in mg_id_c_string() argument
335 mg_id_string(id, s, ofs, len - 1); in mg_id_c_string()
/linux-4.4.14/fs/overlayfs/
Dsuper.c101 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_path_upper() local
104 path->mnt = ofs->upper_mnt; in ovl_path_upper()
183 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_want_write() local
184 return mnt_want_write(ofs->upper_mnt); in ovl_want_write()
189 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_drop_write() local
190 mnt_drop_write(ofs->upper_mnt); in ovl_drop_write()
195 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_workdir() local
196 return ofs->workdir; in ovl_workdir()
602 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_statfs() local
611 buf->f_namelen = max(buf->f_namelen, ofs->lower_namelen); in ovl_statfs()
/linux-4.4.14/tools/perf/util/
Dunwind-libunwind.c295 u64 ofs = dso->data.debug_frame_offset; in read_unwind_spec_debug_frame() local
297 if (ofs == 0) { in read_unwind_spec_debug_frame()
303 ofs = elf_section_offset(fd, ".debug_frame"); in read_unwind_spec_debug_frame()
304 dso->data.debug_frame_offset = ofs; in read_unwind_spec_debug_frame()
308 *offset = ofs; in read_unwind_spec_debug_frame()
/linux-4.4.14/drivers/net/ethernet/broadcom/
Dbcmsysport.h596 #define STAT_RXCHK(str, m, ofs) { \ argument
601 .reg_offset = ofs, \
604 #define STAT_RBUF(str, m, ofs) { \ argument
609 .reg_offset = ofs, \
/linux-4.4.14/sound/pci/trident/
Dtrident_memory.c217 unsigned long ofs = idx << PAGE_SHIFT; in snd_trident_alloc_sg_pages() local
218 dma_addr_t addr = snd_pcm_sgbuf_get_addr(substream, ofs); in snd_trident_alloc_sg_pages()
220 snd_pcm_sgbuf_get_ptr(substream, ofs); in snd_trident_alloc_sg_pages()
/linux-4.4.14/drivers/scsi/
Dncr53c8xx.h1098 #define SCR_REG_OFS(ofs) ((((ofs) & 0x7f) << 16ul) + ((ofs) & 0x80)) argument
1168 #define SCR_REG_OFS2(ofs) (((ofs) & 0xff) << 16ul) argument
Dncr53c8xx.c2002 #define FADDR(label,ofs)(RELOC_REGISTER | ((REG(label))+(ofs))) argument
6695 u_char chg, ofs, per, fak, wide; in ncr_int_sir() local
6882 ofs = np->msgin[4]; in ncr_int_sir()
6883 if (ofs==0) per=255; in ncr_int_sir()
6890 if (ofs && starget) in ncr_int_sir()
6901 if (ofs > tp->maxoffs) in ncr_int_sir()
6902 {chg = 1; ofs = tp->maxoffs;} in ncr_int_sir()
6909 if (ofs != 0) { in ncr_int_sir()
6913 ofs = 0; in ncr_int_sir()
6916 if (ofs == 0) { in ncr_int_sir()
[all …]
Dwd7000.c327 unsigned long ofs; /* offset from BIOS base address */ member
1415 void __iomem *biosaddr = ioremap(wd7000_biosaddr[biosaddr_ptr] + signatures[sig_ptr].ofs, in wd7000_detect()
/linux-4.4.14/drivers/ata/
Dsata_mv.c924 unsigned long ofs = (mv_hardport_from_port(port) + 1) * 0x100UL; in mv5_phy_base() local
926 return hc_mmio + ofs; in mv5_phy_base()
1340 unsigned int ofs; in mv_scr_offset() local
1346 ofs = SATA_STATUS + (sc_reg_in * sizeof(u32)); in mv_scr_offset()
1349 ofs = SATA_ACTIVE; /* active is not with the others */ in mv_scr_offset()
1352 ofs = 0xffffffffU; in mv_scr_offset()
1355 return ofs; in mv_scr_offset()
1360 unsigned int ofs = mv_scr_offset(sc_reg_in); in mv_scr_read() local
1362 if (ofs != 0xffffffffU) { in mv_scr_read()
1363 *val = readl(mv_ap_base(link->ap) + ofs); in mv_scr_read()
[all …]
/linux-4.4.14/drivers/rtc/
Drtc-m48t59.c48 m48t59_mem_writeb(struct device *dev, u32 ofs, u8 val) in m48t59_mem_writeb() argument
53 writeb(val, m48t59->ioaddr+ofs); in m48t59_mem_writeb()
57 m48t59_mem_readb(struct device *dev, u32 ofs) in m48t59_mem_readb() argument
62 return readb(m48t59->ioaddr+ofs); in m48t59_mem_readb()
/linux-4.4.14/arch/arm/mach-netx/
Dxc.c39 unsigned int ofs; member
155 src = fw->data + head->fw_desc[i].ofs; in xc_request_firmware()
/linux-4.4.14/arch/cris/arch-v10/drivers/
Daxisflashmap.c55 static map_word flash_read(struct map_info *map, unsigned long ofs) in flash_read() argument
58 tmp.x[0] = *(flash_data *)(map->map_priv_1 + ofs); in flash_read()
/linux-4.4.14/drivers/net/wireless/iwlwifi/mvm/
Ddebugfs.c129 unsigned int ofs, len; in iwl_dbgfs_sram_read() local
138 ofs = img->sec[IWL_UCODE_SECTION_DATA].offset; in iwl_dbgfs_sram_read()
142 ofs = mvm->dbgfs_sram_offset; in iwl_dbgfs_sram_read()
150 iwl_trans_read_mem_bytes(mvm->trans, ofs, ptr, len); in iwl_dbgfs_sram_read()
1185 int ofs, len, pos = 0; in iwl_dbgfs_d3_sram_read() local
1202 for (ofs = 0; ofs < len; ofs += 16) { in iwl_dbgfs_d3_sram_read()
1204 "0x%.4x %16ph\n", ofs, ptr + ofs); in iwl_dbgfs_d3_sram_read()
/linux-4.4.14/sound/pci/
Dvia82xx_modem.c282 unsigned int i, idx, ofs, rest; in build_via_table() local
302 ofs = 0; in build_via_table()
318 addr = snd_pcm_sgbuf_get_addr(substream, ofs); in build_via_table()
320 r = PAGE_SIZE - (ofs % PAGE_SIZE); in build_via_table()
337 dev->idx_table[idx].offset = ofs; in build_via_table()
339 ofs += r; in build_via_table()
Dvia82xx.c429 unsigned int i, idx, ofs, rest; in build_via_table() local
449 ofs = 0; in build_via_table()
465 addr = snd_pcm_sgbuf_get_addr(substream, ofs); in build_via_table()
467 r = snd_pcm_sgbuf_get_chunk_size(substream, ofs, rest); in build_via_table()
482 dev->idx_table[idx].offset = ofs; in build_via_table()
484 ofs += r; in build_via_table()
/linux-4.4.14/fs/ncpfs/
Ddir.c467 ctl.ofs = ctl.fpos / NCP_DIRCACHE_SIZE; in ncp_readdir()
471 if (ctl.ofs != 0) { in ncp_readdir()
472 ctl.page = find_lock_page(&inode->i_data, ctl.ofs); in ncp_readdir()
517 ctl.ofs += 1; in ncp_readdir()
537 ctl.ofs = 0; in ncp_readdir()
656 ctl.ofs += 1; in ncp_fill_cache()
657 ctl.page = grab_cache_page(&dir->i_data, ctl.ofs); in ncp_fill_cache()
Dncplib_kernel.h210 unsigned long fpos, ofs; member
/linux-4.4.14/drivers/infiniband/hw/qib/
Dqib_user_sdma.c1213 unsigned ofs, u16 tail, u8 gen) in qib_user_sdma_send_frag() argument
1223 descq0 = qib_sdma_make_desc0(gen, addr, dwlen, ofs); in qib_user_sdma_send_frag()
1259 unsigned ofs = 0; in qib_user_sdma_send_desc() local
1263 qib_user_sdma_send_frag(ppd, pkt, i, ofs, tail, gen); in qib_user_sdma_send_desc()
1264 ofs += pkt->addr[i].length >> 2; in qib_user_sdma_send_desc()
1283 if (ofs > dd->piosize2kmax_dwords) { in qib_user_sdma_send_desc()
1295 ofs = 0; /* reset for next packet */ in qib_user_sdma_send_desc()
/linux-4.4.14/sound/pci/hda/
Dhda_codec.c1282 unsigned int ofs) in get_amp_max_value() argument
1287 if (ofs < caps) in get_amp_max_value()
1288 caps -= ofs; in get_amp_max_value()
1307 unsigned int ofs = get_amp_offset(kcontrol); in snd_hda_mixer_amp_volume_info() local
1312 uinfo->value.integer.max = get_amp_max_value(codec, nid, dir, ofs); in snd_hda_mixer_amp_volume_info()
1326 int ch, int dir, int idx, unsigned int ofs) in read_amp_value() argument
1331 if (val >= ofs) in read_amp_value()
1332 val -= ofs; in read_amp_value()
1340 int ch, int dir, int idx, unsigned int ofs, in update_amp_value() argument
1346 val += ofs; in update_amp_value()
[all …]
Dhda_local.h39 #define HDA_COMPOSE_AMP_VAL_OFS(nid,chs,idx,dir,ofs) \ argument
40 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23))
/linux-4.4.14/net/openvswitch/
Dconntrack.c282 int ofs; in ovs_ct_helper() local
284 ofs = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, in ovs_ct_helper()
286 if (ofs < 0 || (frag_off & htons(~0x7)) != 0) { in ovs_ct_helper()
290 protoff = ofs; in ovs_ct_helper()
/linux-4.4.14/drivers/net/irda/
Dau1k_ir.c190 unsigned long ofs) in irda_read() argument
196 (void)__raw_readl(p->iobase + ofs); in irda_read()
197 return __raw_readl(p->iobase + ofs); in irda_read()
200 static inline void irda_write(struct au1k_private *p, unsigned long ofs, in irda_write() argument
203 __raw_writel(val, p->iobase + ofs); in irda_write()
/linux-4.4.14/drivers/tty/
Dmoxa.c1878 void __iomem *baseAddr, *ofsAddr, *ofs; in MoxaPortWriteData() local
1904 ofs = baseAddr + DynPage_addr + bufhead + tail; in MoxaPortWriteData()
1905 memcpy_toio(ofs, buffer, len); in MoxaPortWriteData()
1918 ofs = baseAddr + DynPage_addr + pageofs; in MoxaPortWriteData()
1919 memcpy_toio(ofs, buffer, len); in MoxaPortWriteData()
1937 void __iomem *baseAddr, *ofsAddr, *ofs; in MoxaPortReadData() local
1959 ofs = baseAddr + DynPage_addr + bufhead + head; in MoxaPortReadData()
1964 memcpy_fromio(dst, ofs, len); in MoxaPortReadData()
1973 ofs = baseAddr + DynPage_addr + pageofs; in MoxaPortReadData()
1976 memcpy_fromio(dst, ofs, len); in MoxaPortReadData()
/linux-4.4.14/drivers/tty/serial/
Datmel_serial.c104 unsigned int ofs; member
1346 xmit->tail += pdc->ofs; in atmel_tx_pdc()
1349 port->icount.tx += pdc->ofs; in atmel_tx_pdc()
1350 pdc->ofs = 0; in atmel_tx_pdc()
1364 pdc->ofs = count; in atmel_tx_pdc()
1398 pdc->ofs = 0; in atmel_prepare_tx_pdc()
1503 tail = pdc->ofs; in atmel_rx_from_pdc()
1529 tty_insert_flip_string(tport, pdc->buf + pdc->ofs, in atmel_rx_from_pdc()
1536 pdc->ofs = head; in atmel_rx_from_pdc()
1544 pdc->ofs = 0; in atmel_rx_from_pdc()
[all …]
/linux-4.4.14/drivers/staging/iio/adc/
Dmxs-lradc.c1265 int ret = 0, chan, ofs = 0; in mxs_lradc_buffer_preenable() local
1300 ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs); in mxs_lradc_buffer_preenable()
1301 ctrl4_clr |= LRADC_CTRL4_LRADCSELECT_MASK(ofs); in mxs_lradc_buffer_preenable()
1302 ctrl1_irq |= LRADC_CTRL1_LRADC_IRQ_EN(ofs); in mxs_lradc_buffer_preenable()
1303 mxs_lradc_reg_wrt(lradc, chan_value, LRADC_CH(ofs)); in mxs_lradc_buffer_preenable()
1304 bitmap_set(&enable, ofs, 1); in mxs_lradc_buffer_preenable()
1305 ofs++; in mxs_lradc_buffer_preenable()
/linux-4.4.14/include/trace/events/
Df2fs.h319 TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs, int free),
321 TP_ARGS(inode, nid, ofs, free),
327 __field(unsigned int, ofs)
335 __entry->ofs = ofs;
342 __entry->ofs,
/linux-4.4.14/include/net/
Dip_vs.h250 #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) \ argument
253 pp->debug_packet(af, pp, skb, ofs, msg); \
255 #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) \ argument
259 pp->debug_packet(af, pp, skb, ofs, msg); \
266 #define IP_VS_DBG_PKT(level, af, pp, skb, ofs, msg) do {} while (0) argument
267 #define IP_VS_DBG_RL_PKT(level, af, pp, skb, ofs, msg) do {} while (0) argument
/linux-4.4.14/sound/pci/emu10k1/
Dmemory.c330 unsigned long ofs = idx << PAGE_SHIFT; in snd_emu10k1_alloc_pages() local
332 if (ofs >= runtime->dma_bytes) in snd_emu10k1_alloc_pages()
335 addr = snd_pcm_sgbuf_get_addr(substream, ofs); in snd_emu10k1_alloc_pages()
/linux-4.4.14/arch/cris/arch-v32/drivers/
Daxisflashmap.c60 static map_word flash_read(struct map_info *map, unsigned long ofs) in flash_read() argument
63 tmp.x[0] = *(flash_data *)(map->map_priv_1 + ofs); in flash_read()
/linux-4.4.14/include/pcmcia/
Dcistpl.h89 u_char ofs[CISTPL_MAX_ALTSTR_STRINGS]; member
130 u_char ofs[CISTPL_VERS_1_MAX_PROD_STRINGS]; member
/linux-4.4.14/drivers/media/platform/s5p-mfc/
Ds5p_mfc_opr_v5.c222 ctx->ctx.ofs = OFFSETA(ctx->ctx.dma); in s5p_mfc_alloc_instance_buffer_v5()
238 ctx->shm.ofs = ctx->shm.dma - dev->bank1; in s5p_mfc_alloc_instance_buffer_v5()
239 BUG_ON(ctx->shm.ofs & ((1 << MFC_BANK1_ALIGN_ORDER) - 1)); in s5p_mfc_alloc_instance_buffer_v5()
266 unsigned int ofs) in s5p_mfc_write_info_v5() argument
268 *(u32 *)(ctx->shm.virt + ofs) = data; in s5p_mfc_write_info_v5()
273 unsigned long ofs) in s5p_mfc_read_info_v5() argument
276 return *(u32 *)(ctx->shm.virt + ofs); in s5p_mfc_read_info_v5()
363 mfc_write(dev, ctx->shm.ofs, S5P_FIMV_SI_CH0_HOST_WR_ADR); in s5p_mfc_set_shared_buffer()
Ds5p_mfc_cmd_v5.c117 h2r_args.arg[2] = ctx->ctx.ofs; in s5p_mfc_open_inst_cmd_v5()
Ds5p_mfc_opr.h303 unsigned int ofs);
305 unsigned long ofs);
Ds5p_mfc_common.h247 unsigned long ofs; member
/linux-4.4.14/drivers/gpu/drm/i915/
Dintel_bios.c162 size_t ofs; in get_lvds_fp_timing() local
166 ofs = ptrs->ptr[index].fp_timing_offset; in get_lvds_fp_timing()
167 if (ofs < data_ofs || in get_lvds_fp_timing()
168 ofs + sizeof(struct lvds_fp_timing) > data_ofs + data_size) in get_lvds_fp_timing()
170 return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs); in get_lvds_fp_timing()
/linux-4.4.14/drivers/video/fbdev/
Dmxsfb.c632 int bits_per_pixel, ofs, ret = 0; in mxsfb_restore_mode() local
710 ofs = pa - fb_info->fix.smem_start; in mxsfb_restore_mode()
711 if (ofs) { in mxsfb_restore_mode()
712 memmove(fb_info->screen_base, fb_info->screen_base + ofs, fbsize); in mxsfb_restore_mode()
/linux-4.4.14/drivers/mailbox/
Domap-mailbox.c145 unsigned int mbox_read_reg(struct omap_mbox_device *mdev, size_t ofs) in mbox_read_reg() argument
147 return __raw_readl(mdev->mbox_base + ofs); in mbox_read_reg()
151 void mbox_write_reg(struct omap_mbox_device *mdev, u32 val, size_t ofs) in mbox_write_reg() argument
153 __raw_writel(val, mdev->mbox_base + ofs); in mbox_write_reg()
/linux-4.4.14/drivers/net/wireless/ipw2x00/
Dipw2200.c235 const u8 * data, u32 len, u32 ofs) in snprint_line() argument
240 out = snprintf(buf, count, "%08X", ofs); in snprint_line()
272 u32 ofs = 0; in printk_buf() local
277 snprint_line(line, sizeof(line), &data[ofs], in printk_buf()
278 min(len, 16U), ofs); in printk_buf()
280 ofs += 16; in printk_buf()
288 u32 ofs = 0; in snprintk_buf() local
292 out = snprint_line(output, size, &data[ofs], in snprintk_buf()
293 min_t(size_t, len, 16U), ofs); in snprintk_buf()
295 ofs += 16; in snprintk_buf()
[all …]
/linux-4.4.14/drivers/net/wireless/iwlegacy/
Dcommon.h1998 _il_write8(struct il_priv *il, u32 ofs, u8 val) in _il_write8() argument
2000 writeb(val, il->hw_base + ofs); in _il_write8()
2002 #define il_write8(il, ofs, val) _il_write8(il, ofs, val) argument
2005 _il_wr(struct il_priv *il, u32 ofs, u32 val) in _il_wr() argument
2007 writel(val, il->hw_base + ofs); in _il_wr()
2011 _il_rd(struct il_priv *il, u32 ofs) in _il_rd() argument
2013 return readl(il->hw_base + ofs); in _il_rd()
Ddebug.c489 int pos = 0, ofs = 0, buf_size = 0; in il_dbgfs_nvm_read() local
517 for (ofs = 0; ofs < eeprom_len; ofs += 16) { in il_dbgfs_nvm_read()
519 ofs, ptr + ofs); in il_dbgfs_nvm_read()
/linux-4.4.14/sound/pci/rme9652/
Dhdsp.c4584 int i, j, channels, ofs; in hdsp_9652_get_peak() local
4592 ofs = HDSP_9652_peakBase - j * 4; in hdsp_9652_get_peak()
4593 if (copy_u32_le(&peak_rms->input_peaks[i], hdsp->iobase + ofs)) in hdsp_9652_get_peak()
4595 ofs -= channels * 4; in hdsp_9652_get_peak()
4596 if (copy_u32_le(&peak_rms->playback_peaks[i], hdsp->iobase + ofs)) in hdsp_9652_get_peak()
4598 ofs -= channels * 4; in hdsp_9652_get_peak()
4599 if (copy_u32_le(&peak_rms->output_peaks[i], hdsp->iobase + ofs)) in hdsp_9652_get_peak()
4601 ofs = HDSP_9652_rmsBase + j * 8; in hdsp_9652_get_peak()
4602 if (copy_u48_le(&peak_rms->input_rms[i], hdsp->iobase + ofs, in hdsp_9652_get_peak()
4603 hdsp->iobase + ofs + 4)) in hdsp_9652_get_peak()
[all …]
/linux-4.4.14/drivers/media/dvb-frontends/
Dascot2e.c77 #define ASCOT2E_OFFSET(ofs) ((u8)(ofs) & 0x1F) argument
/linux-4.4.14/sound/drivers/
Ddummy.c951 #define get_dummy_int_ptr(dummy, ofs) \ argument
952 (unsigned int *)((char *)&((dummy)->pcm_hw) + (ofs))
953 #define get_dummy_ll_ptr(dummy, ofs) \ argument
954 (unsigned long long *)((char *)&((dummy)->pcm_hw) + (ofs))
/linux-4.4.14/net/ceph/
Dceph_common.c129 int ofs = offsetof(struct ceph_options, mon_addr); in ceph_compare_options() local
140 ret = memcmp(opt1, opt2, ofs); in ceph_compare_options()
/linux-4.4.14/drivers/net/ethernet/dec/tulip/
Dde2104x.c1788 unsigned i, sa_offset = 0, ofs; in de21041_get_srom_info() local
1816 ofs = ee_data[SROMC0InfoLeaf]; in de21041_get_srom_info()
1817 …if (ofs >= (sizeof(ee_data) - sizeof(struct de_srom_info_leaf) - sizeof(struct de_srom_media_block… in de21041_get_srom_info()
1821 il = (struct de_srom_info_leaf *) &ee_data[ofs]; in de21041_get_srom_info()
1826 if ((sizeof(ee_data) - ofs) < in de21041_get_srom_info()
1840 de->board_idx, ofs, media_name[de->media_type]); in de21041_get_srom_info()
/linux-4.4.14/drivers/gpu/drm/nouveau/
Dnouveau_bios.c347 int ret, ofs, fpstrapping; in parse_fp_mode_table() local
375 ofs = -1; in parse_fp_mode_table()
379 ofs = 0; in parse_fp_mode_table()
390 ofs = -7; in parse_fp_mode_table()
439 recordlen * fpindex + ofs; in parse_fp_mode_table()
/linux-4.4.14/drivers/hwmon/
Dlm93.c1508 int ofs = s_attr->nr; in show_temp_auto_offset() local
1512 LM93_TEMP_AUTO_OFFSET_FROM_REG(data->block10.offset[ofs], in show_temp_auto_offset()
1522 int ofs = s_attr->nr; in store_temp_auto_offset() local
1537 data->block10.offset[ofs] = LM93_TEMP_AUTO_OFFSET_TO_REG( in store_temp_auto_offset()
1538 data->block10.offset[ofs], val, nr, 1); in store_temp_auto_offset()
1539 lm93_write_byte(client, LM93_REG_TEMP_OFFSET(ofs), in store_temp_auto_offset()
1540 data->block10.offset[ofs]); in store_temp_auto_offset()
/linux-4.4.14/drivers/net/wireless/iwlwifi/pcie/
Dtrans.c1395 static void iwl_trans_pcie_write8(struct iwl_trans *trans, u32 ofs, u8 val) in iwl_trans_pcie_write8() argument
1397 writeb(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); in iwl_trans_pcie_write8()
1400 static void iwl_trans_pcie_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_trans_pcie_write32() argument
1402 writel(val, IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); in iwl_trans_pcie_write32()
1405 static u32 iwl_trans_pcie_read32(struct iwl_trans *trans, u32 ofs) in iwl_trans_pcie_read32() argument
1407 return readl(IWL_TRANS_GET_PCIE_TRANS(trans)->hw_base + ofs); in iwl_trans_pcie_read32()
/linux-4.4.14/drivers/input/touchscreen/
Dcyttsp4_core.h265 size_t ofs; /* abs byte offset */ member
/linux-4.4.14/fs/ceph/
Dsuper.c320 int ofs = offsetof(struct ceph_mount_options, snapdir_name); in compare_mount_options() local
323 ret = memcmp(fsopt1, fsopt2, ofs); in compare_mount_options()
/linux-4.4.14/drivers/net/wireless/iwlwifi/dvm/
Ddebugfs.c290 int pos = 0, ofs = 0, buf_size = 0; in iwl_dbgfs_nvm_read() local
312 for (ofs = 0 ; ofs < eeprom_len ; ofs += 16) { in iwl_dbgfs_nvm_read()
314 ofs, ptr + ofs); in iwl_dbgfs_nvm_read()

12