| /rk3399_rockchip-uboot/fs/ubifs/ |
| H A D | master.c | 30 static int scan_for_master(struct ubifs_info *c) in scan_for_master() argument 38 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master() 47 memcpy(c->mst_node, snod->node, snod->len); in scan_for_master() 54 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master() 66 if (memcmp((void *)c->mst_node + UBIFS_CH_SZ, in scan_for_master() 70 c->mst_offs = offs; in scan_for_master() 79 ubifs_err(c, "unexpected node type %d master LEB %d:%d", in scan_for_master() 92 static int validate_master(const struct ubifs_info *c) in validate_master() argument 97 if (c->max_sqnum >= SQNUM_WATERMARK) { in validate_master() 102 if (c->cmt_no >= c->max_sqnum) { in validate_master() [all …]
|
| H A D | sb.c | 71 static int create_default_filesystem(struct ubifs_info *c) in create_default_filesystem() argument 87 c->key_len = UBIFS_SK_LEN; in create_default_filesystem() 93 if (c->leb_cnt < 0x7FFFFFFF / DEFAULT_JNL_PERCENT) in create_default_filesystem() 95 jnl_lebs = c->leb_cnt * DEFAULT_JNL_PERCENT / 100; in create_default_filesystem() 97 jnl_lebs = (c->leb_cnt / 100) * DEFAULT_JNL_PERCENT; in create_default_filesystem() 101 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem() 102 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem() 110 tmp = 2 * (c->ref_node_alsz * jnl_lebs) + c->leb_size - 1; in create_default_filesystem() 111 log_lebs = tmp / c->leb_size; in create_default_filesystem() 114 if (c->leb_cnt - min_leb_cnt > 8) { in create_default_filesystem() [all …]
|
| H A D | lpt_commit.c | 29 static int dbg_populate_lsave(struct ubifs_info *c); 96 static int get_cnodes_to_commit(struct ubifs_info *c) in get_cnodes_to_commit() argument 101 if (!c->nroot) in get_cnodes_to_commit() 104 if (!test_bit(DIRTY_CNODE, &c->nroot->flags)) in get_cnodes_to_commit() 107 c->lpt_cnext = first_dirty_cnode(c->nroot); in get_cnodes_to_commit() 108 cnode = c->lpt_cnext; in get_cnodes_to_commit() 117 cnode->cnext = c->lpt_cnext; in get_cnodes_to_commit() 126 ubifs_assert(cnt == c->dirty_nn_cnt + c->dirty_pn_cnt); in get_cnodes_to_commit() 137 static void upd_ltab(struct ubifs_info *c, int lnum, int free, int dirty) in upd_ltab() argument 140 lnum, c->ltab[lnum - c->lpt_first].free, in upd_ltab() [all …]
|
| H A D | super.c | 205 static int validate_inode(struct ubifs_info *c, const struct inode *inode) in validate_inode() argument 210 if (inode->i_size > c->max_inode_sz) { in validate_inode() 211 ubifs_err(c, "inode is too large (%lld)", in validate_inode() 217 ubifs_err(c, "unknown compression type %d", ui->compr_type); in validate_inode() 231 ubifs_warn(c, "inode %lu uses '%s' compression, but it was not compiled in", in validate_inode() 235 err = dbg_check_dir(c, inode); in validate_inode() 244 struct ubifs_info *c = sb->s_fs_info; in ubifs_iget() local 289 ino_key_init(c, &key, inode->i_ino); in ubifs_iget() 291 err = ubifs_tnc_lookup(c, &key, ino); in ubifs_iget() 319 err = validate_inode(c, inode); in ubifs_iget() [all …]
|
| H A D | budget.c | 57 static void shrink_liability(struct ubifs_info *c, int nr_to_write) in shrink_liability() argument 59 down_read(&c->vfs_sb->s_umount); in shrink_liability() 60 writeback_inodes_sb(c->vfs_sb, WB_REASON_FS_FREE_SPACE); in shrink_liability() 61 up_read(&c->vfs_sb->s_umount); in shrink_liability() 72 static int run_gc(struct ubifs_info *c) in run_gc() argument 77 down_read(&c->commit_sem); in run_gc() 78 lnum = ubifs_garbage_collect(c, 1); in run_gc() 79 up_read(&c->commit_sem); in run_gc() 85 err = ubifs_return_leb(c, lnum); in run_gc() 98 static long long get_liability(struct ubifs_info *c) in get_liability() argument [all …]
|
| H A D | log.c | 24 static int dbg_check_bud_bytes(struct ubifs_info *c); 34 struct ubifs_bud *ubifs_search_bud(struct ubifs_info *c, int lnum) in ubifs_search_bud() argument 39 spin_lock(&c->buds_lock); in ubifs_search_bud() 40 p = c->buds.rb_node; in ubifs_search_bud() 48 spin_unlock(&c->buds_lock); in ubifs_search_bud() 52 spin_unlock(&c->buds_lock); in ubifs_search_bud() 63 struct ubifs_wbuf *ubifs_get_wbuf(struct ubifs_info *c, int lnum) in ubifs_get_wbuf() argument 69 if (!c->jheads) in ubifs_get_wbuf() 72 spin_lock(&c->buds_lock); in ubifs_get_wbuf() 73 p = c->buds.rb_node; in ubifs_get_wbuf() [all …]
|
| H A D | orphan.c | 45 static int dbg_check_orphans(struct ubifs_info *c); 55 int ubifs_add_orphan(struct ubifs_info *c, ino_t inum) in ubifs_add_orphan() argument 66 spin_lock(&c->orphan_lock); in ubifs_add_orphan() 67 if (c->tot_orphans >= c->max_orphans) { in ubifs_add_orphan() 68 spin_unlock(&c->orphan_lock); in ubifs_add_orphan() 72 p = &c->orph_tree.rb_node; in ubifs_add_orphan() 81 ubifs_err(c, "orphaned twice"); in ubifs_add_orphan() 82 spin_unlock(&c->orphan_lock); in ubifs_add_orphan() 87 c->tot_orphans += 1; in ubifs_add_orphan() 88 c->new_orphans += 1; in ubifs_add_orphan() [all …]
|
| H A D | lpt.c | 54 static void do_calc_lpt_geom(struct ubifs_info *c) in do_calc_lpt_geom() argument 59 n = c->main_lebs + c->max_leb_cnt - c->leb_cnt; in do_calc_lpt_geom() 62 c->lpt_hght = 1; in do_calc_lpt_geom() 65 c->lpt_hght += 1; in do_calc_lpt_geom() 69 c->pnode_cnt = DIV_ROUND_UP(c->main_lebs, UBIFS_LPT_FANOUT); in do_calc_lpt_geom() 71 n = DIV_ROUND_UP(c->pnode_cnt, UBIFS_LPT_FANOUT); in do_calc_lpt_geom() 72 c->nnode_cnt = n; in do_calc_lpt_geom() 73 for (i = 1; i < c->lpt_hght; i++) { in do_calc_lpt_geom() 75 c->nnode_cnt += n; in do_calc_lpt_geom() 78 c->space_bits = fls(c->leb_size) - 3; in do_calc_lpt_geom() [all …]
|
| H A D | lprops.c | 54 static void move_up_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in move_up_lpt_heap() argument 91 static void adjust_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in adjust_lpt_heap() argument 170 static int add_to_lpt_heap(struct ubifs_info *c, struct ubifs_lprops *lprops, in add_to_lpt_heap() argument 173 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; in add_to_lpt_heap() 194 list_add(&lp->list, &c->uncat_list); in add_to_lpt_heap() 197 move_up_lpt_heap(c, heap, lprops, cat); in add_to_lpt_heap() 198 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap() 201 dbg_check_heap(c, heap, cat, -1); in add_to_lpt_heap() 206 move_up_lpt_heap(c, heap, lprops, cat); in add_to_lpt_heap() 207 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap() [all …]
|
| H A D | replay.c | 91 static int set_bud_lprops(struct ubifs_info *c, struct bud_entry *b) in set_bud_lprops() argument 96 ubifs_get_lprops(c); in set_bud_lprops() 98 lp = ubifs_lpt_lookup_dirty(c, b->bud->lnum); in set_bud_lprops() 105 if (b->bud->start == 0 && (lp->free != c->leb_size || lp->dirty != 0)) { in set_bud_lprops() 129 dirty -= c->leb_size - lp->free; in set_bud_lprops() 142 lp = ubifs_change_lp(c, lp, b->free, dirty + b->dirty, in set_bud_lprops() 150 err = ubifs_wbuf_seek_nolock(&c->jheads[b->bud->jhead].wbuf, in set_bud_lprops() 151 b->bud->lnum, c->leb_size - b->free); in set_bud_lprops() 154 ubifs_release_lprops(c); in set_bud_lprops() 165 static int set_buds_lprops(struct ubifs_info *c) in set_buds_lprops() argument [all …]
|
| H A D | debug.h | 16 typedef int (*dbg_leaf_callback)(struct ubifs_info *c, 18 typedef int (*dbg_znode_callback)(struct ubifs_info *c, 149 #define ubifs_assert_cmt_locked(c) do { \ argument 150 if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ 151 up_write(&(c)->commit_sem); \ 166 dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \ 172 #define ubifs_assert_cmt_locked(c) do { } while (0) argument 183 dbg_snprintf_key(c, key, __tmp_key_buf, DBG_KEY_BUF_LEN)); \ 224 static inline int dbg_is_chk_gen(const struct ubifs_info *c) in dbg_is_chk_gen() argument 226 return !!(ubifs_dbg.chk_gen || c->dbg->chk_gen); in dbg_is_chk_gen() [all …]
|
| H A D | io.c | 76 void ubifs_ro_mode(struct ubifs_info *c, int err) in ubifs_ro_mode() argument 78 if (!c->ro_error) { in ubifs_ro_mode() 79 c->ro_error = 1; in ubifs_ro_mode() 80 c->no_chk_data_crc = 0; in ubifs_ro_mode() 81 c->vfs_sb->s_flags |= MS_RDONLY; in ubifs_ro_mode() 82 ubifs_warn(c, "switched to read-only mode, error %d", err); in ubifs_ro_mode() 93 int ubifs_leb_read(const struct ubifs_info *c, int lnum, void *buf, int offs, in ubifs_leb_read() argument 98 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read() 104 ubifs_err(c, "reading %d bytes from LEB %d:%d failed, error %d", in ubifs_leb_read() 111 int ubifs_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs, in ubifs_leb_write() argument [all …]
|
| H A D | gc.c | 72 static int switch_gc_head(struct ubifs_info *c) in switch_gc_head() argument 74 int err, gc_lnum = c->gc_lnum; in switch_gc_head() 75 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in switch_gc_head() 80 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head() 90 err = ubifs_leb_unmap(c, gc_lnum); in switch_gc_head() 98 err = ubifs_add_bud_to_log(c, GCHD, gc_lnum, 0); in switch_gc_head() 102 c->gc_lnum = -1; in switch_gc_head() 119 struct ubifs_info *c = priv; in data_nodes_cmp() local 129 ubifs_assert(key_type(c, &sa->key) == UBIFS_DATA_KEY); in data_nodes_cmp() 130 ubifs_assert(key_type(c, &sb->key) == UBIFS_DATA_KEY); in data_nodes_cmp() [all …]
|
| H A D | recovery.c | 102 static int get_master_node(const struct ubifs_info *c, int lnum, void **pbuf, in get_master_node() argument 105 const int sz = c->mst_node_alsz; in get_master_node() 109 sbuf = vmalloc(c->leb_size); in get_master_node() 113 err = ubifs_leb_read(c, lnum, sbuf, 0, c->leb_size, 0); in get_master_node() 120 len = c->leb_size; in get_master_node() 121 while (offs + UBIFS_MST_NODE_SZ <= c->leb_size) { in get_master_node() 137 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node() 143 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node() 165 if (offs < c->leb_size) { in get_master_node() 175 if (offs < c->leb_size) in get_master_node() [all …]
|
| H A D | tnc.c | 49 static int try_read_node(const struct ubifs_info *c, void *buf, int type, 51 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key, 77 static int insert_old_idx(struct ubifs_info *c, int lnum, int offs) in insert_old_idx() argument 88 p = &c->old_idx.rb_node; in insert_old_idx() 101 ubifs_err(c, "old idx added twice!"); in insert_old_idx() 107 rb_insert_color(&old_idx->rb, &c->old_idx); in insert_old_idx() 118 int insert_old_idx_znode(struct ubifs_info *c, struct ubifs_znode *znode) in insert_old_idx_znode() argument 125 return insert_old_idx(c, zbr->lnum, zbr->offs); in insert_old_idx_znode() 127 if (c->zroot.len) in insert_old_idx_znode() 128 return insert_old_idx(c, c->zroot.lnum, in insert_old_idx_znode() [all …]
|
| H A D | debug.c | 101 const char *dbg_snprintf_key(const struct ubifs_info *c, in dbg_snprintf_key() argument 105 int type = key_type(c, key); in dbg_snprintf_key() 107 if (c->key_fmt == UBIFS_SIMPLE_KEY_FMT) { in dbg_snprintf_key() 111 (unsigned long)key_inum(c, key), in dbg_snprintf_key() 117 (unsigned long)key_inum(c, key), in dbg_snprintf_key() 118 get_key_type(type), key_hash(c, key)); in dbg_snprintf_key() 122 (unsigned long)key_inum(c, key), in dbg_snprintf_key() 123 get_key_type(type), key_block(c, key)); in dbg_snprintf_key() 127 (unsigned long)key_inum(c, key), in dbg_snprintf_key() 135 len -= snprintf(p, len, "bad key format %d", c->key_fmt); in dbg_snprintf_key() [all …]
|
| H A D | ubifs.h | 622 #define ubifs_msg(c, fmt, ...) argument 624 #define ubifs_msg(c, fmt, ...) \ argument 626 (c)->vi.ubi_num, (c)->vi.vol_id, ##__VA_ARGS__) 630 #define ubifs_err(c, fmt, ...) \ argument 632 (c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \ 635 #define ubifs_warn(c, fmt, ...) \ argument 637 (c)->vi.ubi_num, (c)->vi.vol_id, current->pid, \ 640 #define ubifs_err(c, fmt, ...) \ argument 642 (c)->vi.ubi_num, (c)->vi.vol_id, 0, \ 645 #define ubifs_warn(c, fmt, ...) \ argument [all …]
|
| H A D | misc.h | 57 static inline void ubifs_wake_up_bgt(struct ubifs_info *c) in ubifs_wake_up_bgt() argument 59 if (c->bgt && !c->need_bgt) { in ubifs_wake_up_bgt() 60 c->need_bgt = 1; in ubifs_wake_up_bgt() 61 wake_up_process(c->bgt); in ubifs_wake_up_bgt() 167 static inline int ubifs_add_dirt(struct ubifs_info *c, int lnum, int dirty) in ubifs_add_dirt() argument 169 return ubifs_update_one_lp(c, lnum, LPROPS_NC, dirty, 0, 0); in ubifs_add_dirt() 181 static inline int ubifs_return_leb(struct ubifs_info *c, int lnum) in ubifs_return_leb() argument 183 return ubifs_change_one_lp(c, lnum, LPROPS_NC, LPROPS_NC, 0, in ubifs_return_leb() 192 static inline int ubifs_idx_node_sz(const struct ubifs_info *c, int child_cnt) in ubifs_idx_node_sz() argument 194 return UBIFS_IDX_NODE_SZ + (UBIFS_BRANCH_SZ + c->key_len) * child_cnt; in ubifs_idx_node_sz() [all …]
|
| /rk3399_rockchip-uboot/include/linux/ |
| H A D | ctype.h | 22 #define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) argument 23 #define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) argument 24 #define iscntrl(c) ((__ismask(c)&(_C)) != 0) argument 25 #define isdigit(c) ((__ismask(c)&(_D)) != 0) argument 26 #define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) argument 27 #define islower(c) ((__ismask(c)&(_L)) != 0) argument 28 #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) argument 29 #define ispunct(c) ((__ismask(c)&(_P)) != 0) argument 30 #define isspace(c) ((__ismask(c)&(_S)) != 0) argument 31 #define isupper(c) ((__ismask(c)&(_U)) != 0) argument [all …]
|
| /rk3399_rockchip-uboot/common/ |
| H A D | zm.c | 97 static void zputhex __P ((int c, char *pos)); 107 extern void xsendline(int c); 118 register int c; in noxrd7() local 121 if ((c = READLINE_PF(Rxtimeout)) < 0) in noxrd7() 122 return c; in noxrd7() 123 switch (c &= 0177) { in noxrd7() 128 if (Zctlesc && !(c & 0140)) in noxrd7() 133 return c; in noxrd7() 141 register int c, n; in zgeth1() local 143 if ((c = noxrd7()) < 0) in zgeth1() [all …]
|
| /rk3399_rockchip-uboot/arch/arm/cpu/armv7/bcm235xx/ |
| H A D | clk-core.c | 30 struct clk *c; in clk_get_and_enable() local 34 c = clk_get(clkstr); in clk_get_and_enable() 35 if (c) { in clk_get_and_enable() 36 ret = clk_enable(c); in clk_get_and_enable() 78 static int peri_clk_enable(struct clk *c, int enable) in peri_clk_enable() argument 82 struct peri_clock *peri_clk = to_peri_clk(c); in peri_clk_enable() 85 void *base = (void *)c->ccu_clk_mgr_base; in peri_clk_enable() 88 debug("%s: %s\n", __func__, c->name); in peri_clk_enable() 90 clk_get_rate(c); /* Make sure rate and sel are filled in */ in peri_clk_enable() 97 __func__, c->name, c->rate, c->div, c->sel, in peri_clk_enable() [all …]
|
| /rk3399_rockchip-uboot/arch/arm/cpu/armv7/bcm281xx/ |
| H A D | clk-core.c | 30 struct clk *c; in clk_get_and_enable() local 34 c = clk_get(clkstr); in clk_get_and_enable() 35 if (c) { in clk_get_and_enable() 36 ret = clk_enable(c); in clk_get_and_enable() 78 static int peri_clk_enable(struct clk *c, int enable) in peri_clk_enable() argument 82 struct peri_clock *peri_clk = to_peri_clk(c); in peri_clk_enable() 85 void *base = (void *)c->ccu_clk_mgr_base; in peri_clk_enable() 88 debug("%s: %s\n", __func__, c->name); in peri_clk_enable() 90 clk_get_rate(c); /* Make sure rate and sel are filled in */ in peri_clk_enable() 97 __func__, c->name, c->rate, c->div, c->sel, in peri_clk_enable() [all …]
|
| /rk3399_rockchip-uboot/drivers/usb/gadget/ |
| H A D | usbstring.c | 21 u8 c; in utf8_to_utf16le() local 29 while (len != 0 && (c = (u8) *s++) != 0) { in utf8_to_utf16le() 30 if ((c & 0x80)) { in utf8_to_utf16le() 35 if ((c & 0xe0) == 0xc0) { in utf8_to_utf16le() 36 uchar = (c & 0x1f) << 6; in utf8_to_utf16le() 38 c = (u8) *s++; in utf8_to_utf16le() 39 if ((c & 0xc0) != 0x80) in utf8_to_utf16le() 41 c &= 0x3f; in utf8_to_utf16le() 42 uchar |= c; in utf8_to_utf16le() 48 } else if ((c & 0xf0) == 0xe0) { in utf8_to_utf16le() [all …]
|
| /rk3399_rockchip-uboot/scripts/dtc/ |
| H A D | Makefile.dtc | 7 checks.c \ 8 data.c \ 9 dtc.c \ 10 flattree.c \ 11 fstree.c \ 12 livetree.c \ 13 srcpos.c \ 14 treesource.c \ 15 util.c 17 DTC_GEN_SRCS = dtc-lexer.lex.c dtc-parser.tab.c [all …]
|
| /rk3399_rockchip-uboot/lib/ |
| H A D | md5.c | 185 register __u32 a, b, c, d; in MD5Transform() local 189 c = buf[2]; in MD5Transform() 192 MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); in MD5Transform() 193 MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); in MD5Transform() 194 MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); in MD5Transform() 195 MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); in MD5Transform() 196 MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); in MD5Transform() 197 MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); in MD5Transform() 198 MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); in MD5Transform() 199 MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); in MD5Transform() [all …]
|