Home
last modified time | relevance | path

Searched refs:c (Results 1 – 25 of 2233) sorted by relevance

12345678910>>...90

/Linux-v5.10/fs/ubifs/
Dmaster.c24 int ubifs_compare_master_node(struct ubifs_info *c, void *m1, void *m2) in ubifs_compare_master_node() argument
64 static int mst_node_check_hash(const struct ubifs_info *c, in mst_node_check_hash() argument
71 crypto_shash_tfm_digest(c->hash_tfm, node + sizeof(struct ubifs_ch), in mst_node_check_hash()
75 if (ubifs_check_hash(c, expected, calc)) in mst_node_check_hash()
90 static int scan_for_master(struct ubifs_info *c) in scan_for_master() argument
98 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
107 memcpy(c->mst_node, snod->node, snod->len); in scan_for_master()
114 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
126 if (ubifs_compare_master_node(c, c->mst_node, snod->node)) in scan_for_master()
129 c->mst_offs = offs; in scan_for_master()
[all …]
Dsuper.c73 static int validate_inode(struct ubifs_info *c, const struct inode *inode) in validate_inode() argument
78 if (inode->i_size > c->max_inode_sz) { in validate_inode()
79 ubifs_err(c, "inode is too large (%lld)", in validate_inode()
85 ubifs_err(c, "unknown compression type %d", ui->compr_type); in validate_inode()
98 if (!ubifs_compr_present(c, ui->compr_type)) { in validate_inode()
99 ubifs_warn(c, "inode %lu uses '%s' compression, but it was not compiled in", in validate_inode()
100 inode->i_ino, ubifs_compr_name(c, ui->compr_type)); in validate_inode()
103 err = dbg_check_dir(c, inode); in validate_inode()
112 struct ubifs_info *c = sb->s_fs_info; in ubifs_iget() local
131 ino_key_init(c, &key, inode->i_ino); in ubifs_iget()
[all …]
Dbudget.c51 static void shrink_liability(struct ubifs_info *c, int nr_to_write) in shrink_liability() argument
53 down_read(&c->vfs_sb->s_umount); in shrink_liability()
54 writeback_inodes_sb_nr(c->vfs_sb, nr_to_write, WB_REASON_FS_FREE_SPACE); in shrink_liability()
55 up_read(&c->vfs_sb->s_umount); in shrink_liability()
66 static int run_gc(struct ubifs_info *c) in run_gc() argument
71 down_read(&c->commit_sem); in run_gc()
72 lnum = ubifs_garbage_collect(c, 1); in run_gc()
73 up_read(&c->commit_sem); in run_gc()
79 err = ubifs_return_leb(c, lnum); in run_gc()
92 static long long get_liability(struct ubifs_info *c) in get_liability() argument
[all …]
Dlpt_commit.c21 static int dbg_populate_lsave(struct ubifs_info *c);
30 static struct ubifs_cnode *first_dirty_cnode(const struct ubifs_info *c, struct ubifs_nnode *nnode) in first_dirty_cnode() argument
32 ubifs_assert(c, nnode); in first_dirty_cnode()
61 static struct ubifs_cnode *next_dirty_cnode(const struct ubifs_info *c, struct ubifs_cnode *cnode) in next_dirty_cnode() argument
66 ubifs_assert(c, cnode); in next_dirty_cnode()
76 return first_dirty_cnode(c, (struct ubifs_nnode *)cnode); in next_dirty_cnode()
88 static int get_cnodes_to_commit(struct ubifs_info *c) in get_cnodes_to_commit() argument
93 if (!c->nroot) in get_cnodes_to_commit()
96 if (!test_bit(DIRTY_CNODE, &c->nroot->flags)) in get_cnodes_to_commit()
99 c->lpt_cnext = first_dirty_cnode(c, c->nroot); in get_cnodes_to_commit()
[all …]
Dsb.c54 static int get_default_compressor(struct ubifs_info *c) in get_default_compressor() argument
56 if (ubifs_compr_present(c, UBIFS_COMPR_LZO)) in get_default_compressor()
59 if (ubifs_compr_present(c, UBIFS_COMPR_ZLIB)) in get_default_compressor()
72 static int create_default_filesystem(struct ubifs_info *c) in create_default_filesystem() argument
92 c->key_len = UBIFS_SK_LEN; in create_default_filesystem()
98 if (c->leb_cnt < 0x7FFFFFFF / DEFAULT_JNL_PERCENT) in create_default_filesystem()
100 jnl_lebs = c->leb_cnt * DEFAULT_JNL_PERCENT / 100; in create_default_filesystem()
102 jnl_lebs = (c->leb_cnt / 100) * DEFAULT_JNL_PERCENT; in create_default_filesystem()
106 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem()
107 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem()
[all …]
Dlog.c20 static int dbg_check_bud_bytes(struct ubifs_info *c);
30 struct ubifs_bud *ubifs_search_bud(struct ubifs_info *c, int lnum) in ubifs_search_bud() argument
35 spin_lock(&c->buds_lock); in ubifs_search_bud()
36 p = c->buds.rb_node; in ubifs_search_bud()
44 spin_unlock(&c->buds_lock); in ubifs_search_bud()
48 spin_unlock(&c->buds_lock); in ubifs_search_bud()
59 struct ubifs_wbuf *ubifs_get_wbuf(struct ubifs_info *c, int lnum) in ubifs_get_wbuf() argument
65 if (!c->jheads) in ubifs_get_wbuf()
68 spin_lock(&c->buds_lock); in ubifs_get_wbuf()
69 p = c->buds.rb_node; in ubifs_get_wbuf()
[all …]
Dcommit.c56 static int nothing_to_commit(struct ubifs_info *c) in nothing_to_commit() argument
62 if (c->mounting || c->remounting_rw) in nothing_to_commit()
69 if (c->zroot.znode && ubifs_zn_dirty(c->zroot.znode)) in nothing_to_commit()
79 if (c->nroot && test_bit(DIRTY_CNODE, &c->nroot->flags)) in nothing_to_commit()
82 ubifs_assert(c, atomic_long_read(&c->dirty_zn_cnt) == 0); in nothing_to_commit()
83 ubifs_assert(c, c->dirty_pn_cnt == 0); in nothing_to_commit()
84 ubifs_assert(c, c->dirty_nn_cnt == 0); in nothing_to_commit()
97 static int do_commit(struct ubifs_info *c) in do_commit() argument
104 ubifs_assert(c, !c->ro_media && !c->ro_mount); in do_commit()
106 if (c->ro_error) { in do_commit()
[all …]
Dtnc_commit.c25 static int make_idx_node(struct ubifs_info *c, struct ubifs_idx_node *idx, in make_idx_node() argument
37 struct ubifs_branch *br = ubifs_idx_branch(c, idx, i); in make_idx_node()
40 key_write_idx(c, &zbr->key, &br->key); in make_idx_node()
44 ubifs_copy_hash(c, zbr->hash, ubifs_branch_hash(c, br)); in make_idx_node()
46 ubifs_err(c, "bad ref in znode"); in make_idx_node()
47 ubifs_dump_znode(c, znode); in make_idx_node()
49 ubifs_dump_znode(c, zbr->znode); in make_idx_node()
54 ubifs_prepare_node(c, idx, len, 0); in make_idx_node()
55 ubifs_node_calc_hash(c, idx, hash); in make_idx_node()
61 err = insert_old_idx_znode(c, znode); in make_idx_node()
[all …]
Dlpt.c46 static void do_calc_lpt_geom(struct ubifs_info *c) in do_calc_lpt_geom() argument
51 n = c->main_lebs + c->max_leb_cnt - c->leb_cnt; in do_calc_lpt_geom()
54 c->lpt_hght = 1; in do_calc_lpt_geom()
57 c->lpt_hght += 1; in do_calc_lpt_geom()
61 c->pnode_cnt = DIV_ROUND_UP(c->main_lebs, UBIFS_LPT_FANOUT); in do_calc_lpt_geom()
63 n = DIV_ROUND_UP(c->pnode_cnt, UBIFS_LPT_FANOUT); in do_calc_lpt_geom()
64 c->nnode_cnt = n; in do_calc_lpt_geom()
65 for (i = 1; i < c->lpt_hght; i++) { in do_calc_lpt_geom()
67 c->nnode_cnt += n; in do_calc_lpt_geom()
70 c->space_bits = fls(c->leb_size) - 3; in do_calc_lpt_geom()
[all …]
Dorphan.c43 static int dbg_check_orphans(struct ubifs_info *c);
45 static struct ubifs_orphan *orphan_add(struct ubifs_info *c, ino_t inum, in orphan_add() argument
58 spin_lock(&c->orphan_lock); in orphan_add()
59 if (c->tot_orphans >= c->max_orphans) { in orphan_add()
60 spin_unlock(&c->orphan_lock); in orphan_add()
64 p = &c->orph_tree.rb_node; in orphan_add()
73 ubifs_err(c, "orphaned twice"); in orphan_add()
74 spin_unlock(&c->orphan_lock); in orphan_add()
79 c->tot_orphans += 1; in orphan_add()
80 c->new_orphans += 1; in orphan_add()
[all …]
Dfind.c42 static int valuable(struct ubifs_info *c, const struct ubifs_lprops *lprops) in valuable() argument
51 heap = &c->lpt_heap[cat - 1]; in valuable()
54 if (lprops->free + lprops->dirty >= c->dark_wm) in valuable()
58 n = c->lst.empty_lebs + c->freeable_cnt - in valuable()
59 c->lst.taken_empty_lebs; in valuable()
60 if (n < c->lsave_cnt) in valuable()
83 static int scan_for_dirty_cb(struct ubifs_info *c, in scan_for_dirty_cb() argument
93 if (!in_tree && valuable(c, lprops)) in scan_for_dirty_cb()
102 if (lprops->free + lprops->dirty == c->leb_size) { in scan_for_dirty_cb()
106 } else if (lprops->dirty < c->dead_wm) in scan_for_dirty_cb()
[all …]
Dio.c70 void ubifs_ro_mode(struct ubifs_info *c, int err) in ubifs_ro_mode() argument
72 if (!c->ro_error) { in ubifs_ro_mode()
73 c->ro_error = 1; in ubifs_ro_mode()
74 c->no_chk_data_crc = 0; in ubifs_ro_mode()
75 c->vfs_sb->s_flags |= SB_RDONLY; in ubifs_ro_mode()
76 ubifs_warn(c, "switched to read-only mode, error %d", err); in ubifs_ro_mode()
87 int ubifs_leb_read(const struct ubifs_info *c, int lnum, void *buf, int offs, in ubifs_leb_read() argument
92 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read()
98 ubifs_err(c, "reading %d bytes from LEB %d:%d failed, error %d", in ubifs_leb_read()
105 int ubifs_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs, in ubifs_leb_write() argument
[all …]
/Linux-v5.10/drivers/net/wan/
Dz85230.c108 static void z8530_rx_done(struct z8530_channel *c);
109 static void z8530_tx_done(struct z8530_channel *c);
123 static inline u8 read_zsreg(struct z8530_channel *c, u8 reg) in read_zsreg() argument
126 z8530_write_port(c->ctrlio, reg); in read_zsreg()
127 return z8530_read_port(c->ctrlio); in read_zsreg()
138 static inline u8 read_zsdata(struct z8530_channel *c) in read_zsdata() argument
141 r=z8530_read_port(c->dataio); in read_zsdata()
157 static inline void write_zsreg(struct z8530_channel *c, u8 reg, u8 val) in write_zsreg() argument
160 z8530_write_port(c->ctrlio, reg); in write_zsreg()
161 z8530_write_port(c->ctrlio, val); in write_zsreg()
[all …]
/Linux-v5.10/fs/jffs2/
Dwbuf.c35 #define PAGE_DIV(x) ( ((unsigned long)(x) / (unsigned long)(c->wbuf_pagesize)) * (unsigned long)(c-…
36 #define PAGE_MOD(x) ( (unsigned long)(x) % (unsigned long)(c->wbuf_pagesize) )
48 static int jffs2_wbuf_pending_for_ino(struct jffs2_sb_info *c, uint32_t ino) in jffs2_wbuf_pending_for_ino() argument
50 struct jffs2_inodirty *this = c->wbuf_inodes; in jffs2_wbuf_pending_for_ino()
69 static void jffs2_clear_wbuf_ino_list(struct jffs2_sb_info *c) in jffs2_clear_wbuf_ino_list() argument
73 this = c->wbuf_inodes; in jffs2_clear_wbuf_ino_list()
82 c->wbuf_inodes = NULL; in jffs2_clear_wbuf_ino_list()
85 static void jffs2_wbuf_dirties_inode(struct jffs2_sb_info *c, uint32_t ino) in jffs2_wbuf_dirties_inode() argument
90 jffs2_dirty_trigger(c); in jffs2_wbuf_dirties_inode()
92 if (jffs2_wbuf_pending_for_ino(c, ino)) in jffs2_wbuf_dirties_inode()
[all …]
Dnodemgmt.c24 static int jffs2_rp_can_write(struct jffs2_sb_info *c) in jffs2_rp_can_write() argument
27 struct jffs2_mount_opts *opts = &c->mount_opts; in jffs2_rp_can_write()
29 avail = c->dirty_size + c->free_size + c->unchecked_size + in jffs2_rp_can_write()
30 c->erasing_size - c->resv_blocks_write * c->sector_size in jffs2_rp_can_write()
31 - c->nospc_dirty_size; in jffs2_rp_can_write()
37 opts->rp_size, c->dirty_size, c->free_size, in jffs2_rp_can_write()
38 c->erasing_size, c->unchecked_size, in jffs2_rp_can_write()
39 c->nr_erasing_blocks, avail, c->nospc_dirty_size); in jffs2_rp_can_write()
71 static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
74 int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, in jffs2_reserve_space() argument
[all …]
Dbuild.c27 first_inode_chain(int *i, struct jffs2_sb_info *c) in first_inode_chain() argument
29 for (; *i < c->inocache_hashsize; (*i)++) { in first_inode_chain()
30 if (c->inocache_list[*i]) in first_inode_chain()
31 return c->inocache_list[*i]; in first_inode_chain()
37 next_inode(int *i, struct jffs2_inode_cache *ic, struct jffs2_sb_info *c) in next_inode() argument
43 return first_inode_chain(i, c); in next_inode()
46 #define for_each_inode(i, c, ic) \ argument
47 for (i = 0, ic = first_inode_chain(&i, (c)); \
49 ic = next_inode(&i, ic, (c)))
52 static void jffs2_build_inode_pass1(struct jffs2_sb_info *c, in jffs2_build_inode_pass1() argument
[all …]
Derase.c24 static void jffs2_erase_failed(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_…
25 static void jffs2_erase_succeeded(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
26 static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
28 static void jffs2_erase_block(struct jffs2_sb_info *c, in jffs2_erase_block() argument
34 ret = jffs2_flash_erase(c, jeb); in jffs2_erase_block()
36 jffs2_erase_succeeded(c, jeb); in jffs2_erase_block()
45 jeb->offset, jeb->offset, jeb->offset + c->sector_size); in jffs2_erase_block()
49 mutex_lock(&c->erase_free_sem); in jffs2_erase_block()
50 spin_lock(&c->erase_completion_lock); in jffs2_erase_block()
51 list_move(&jeb->list, &c->erase_pending_list); in jffs2_erase_block()
[all …]
/Linux-v5.10/arch/mips/kernel/
Dcpu-probe.c86 static int set_ftlb_enable(struct cpuinfo_mips *c, enum ftlb_flags flags);
143 static inline void cpu_set_mt_per_tc_perf(struct cpuinfo_mips *c) in cpu_set_mt_per_tc_perf() argument
146 c->options |= MIPS_CPU_MT_PER_TC_PERF_COUNTERS; in cpu_set_mt_per_tc_perf()
151 struct cpuinfo_mips *c = &current_cpu_data; in check_errata() local
160 if ((c->processor_id & PRID_REV_MASK) <= PRID_REV_34K_V1_0_2) in check_errata()
208 static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) in cpu_probe_vmbits() argument
213 c->vmbits = fls64(read_c0_entryhi() & 0x3fffffffffffe000ULL); in cpu_probe_vmbits()
217 static void set_isa(struct cpuinfo_mips *c, unsigned int isa) in set_isa() argument
221 c->isa_level |= MIPS_CPU_ISA_M32R5 | MIPS_CPU_ISA_M64R5; in set_isa()
225 c->isa_level |= MIPS_CPU_ISA_M32R2 | MIPS_CPU_ISA_M64R2; in set_isa()
[all …]
/Linux-v5.10/drivers/most/
Dmost_cdev.c50 static inline bool ch_has_mbo(struct comp_channel *c) in ch_has_mbo() argument
52 return channel_has_mbo(c->iface, c->channel_id, &comp.cc) > 0; in ch_has_mbo()
55 static inline struct mbo *ch_get_mbo(struct comp_channel *c, struct mbo **mbo) in ch_get_mbo() argument
57 if (!kfifo_peek(&c->fifo, mbo)) { in ch_get_mbo()
58 *mbo = most_get_mbo(c->iface, c->channel_id, &comp.cc); in ch_get_mbo()
60 kfifo_in(&c->fifo, mbo, 1); in ch_get_mbo()
67 struct comp_channel *c, *tmp; in get_channel() local
71 list_for_each_entry_safe(c, tmp, &channel_list, list) { in get_channel()
72 if ((c->iface == iface) && (c->channel_id == id)) { in get_channel()
74 return c; in get_channel()
[all …]
Dcore.c102 struct most_channel *c = mbo->context; in most_free_mbo_coherent() local
103 u16 const coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len; in most_free_mbo_coherent()
105 if (c->iface->dma_free) in most_free_mbo_coherent()
106 c->iface->dma_free(mbo, coherent_buf_size); in most_free_mbo_coherent()
110 if (atomic_sub_and_test(1, &c->mbo_ref)) in most_free_mbo_coherent()
111 complete(&c->cleanup); in most_free_mbo_coherent()
118 static void flush_channel_fifos(struct most_channel *c) in flush_channel_fifos() argument
123 if (list_empty(&c->fifo) && list_empty(&c->halt_fifo)) in flush_channel_fifos()
126 spin_lock_irqsave(&c->fifo_lock, flags); in flush_channel_fifos()
127 list_for_each_entry_safe(mbo, tmp, &c->fifo, list) { in flush_channel_fifos()
[all …]
/Linux-v5.10/arch/x86/kernel/cpu/
Damd.c99 static void init_amd_k5(struct cpuinfo_x86 *c) in init_amd_k5() argument
111 if (c->x86_model == 9 || c->x86_model == 10) { in init_amd_k5()
118 static void init_amd_k6(struct cpuinfo_x86 *c) in init_amd_k6() argument
124 if (c->x86_model < 6) { in init_amd_k6()
126 if (c->x86_model == 0) { in init_amd_k6()
127 clear_cpu_cap(c, X86_FEATURE_APIC); in init_amd_k6()
128 set_cpu_cap(c, X86_FEATURE_PGE); in init_amd_k6()
133 if (c->x86_model == 6 && c->x86_stepping == 1) { in init_amd_k6()
162 if (c->x86_model < 8 || in init_amd_k6()
163 (c->x86_model == 8 && c->x86_stepping < 8)) { in init_amd_k6()
[all …]
/Linux-v5.10/tools/include/linux/
Dctype.h23 #define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) argument
24 #define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) argument
25 #define iscntrl(c) ((__ismask(c)&(_C)) != 0) argument
26 static inline int __isdigit(int c) in __isdigit() argument
28 return '0' <= c && c <= '9'; in __isdigit()
30 #define isdigit(c) __isdigit(c) argument
31 #define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) argument
32 #define islower(c) ((__ismask(c)&(_L)) != 0) argument
33 #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) argument
34 #define ispunct(c) ((__ismask(c)&(_P)) != 0) argument
[all …]
/Linux-v5.10/include/linux/
Dctype.h23 #define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) argument
24 #define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) argument
25 #define iscntrl(c) ((__ismask(c)&(_C)) != 0) argument
26 static inline int isdigit(int c) in isdigit() argument
28 return '0' <= c && c <= '9'; in isdigit()
30 #define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) argument
31 #define islower(c) ((__ismask(c)&(_L)) != 0) argument
32 #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) argument
33 #define ispunct(c) ((__ismask(c)&(_P)) != 0) argument
35 #define isspace(c) ((__ismask(c)&(_S)) != 0) argument
[all …]
/Linux-v5.10/drivers/scsi/
Datp870u.c44 static void send_s870(struct atp_unit *dev,unsigned char c);
45 static void atp_is(struct atp_unit *dev, unsigned char c, bool wide_chip, unsigned char lvdmode);
122 unsigned char i, j, c, target_id, lun,cmdp; in atp870u_intr_handle() local
132 for (c = 0; c < 2; c++) { in atp870u_intr_handle()
133 j = atp_readb_io(dev, c, 0x1f); in atp870u_intr_handle()
136 dev->in_int[c] = 0; in atp870u_intr_handle()
143 dev->in_int[c] = 1; in atp870u_intr_handle()
144 cmdp = atp_readb_io(dev, c, 0x10); in atp870u_intr_handle()
145 if (dev->working[c] != 0) { in atp870u_intr_handle()
147 if ((atp_readb_io(dev, c, 0x16) & 0x80) == 0) in atp870u_intr_handle()
[all …]
/Linux-v5.10/sound/firewire/
Dcmp.c46 void cmp_error(struct cmp_connection *c, const char *fmt, ...) in cmp_error() argument
51 dev_err(&c->resources.unit->device, "%cPCR%u: %pV", in cmp_error()
52 (c->direction == CMP_INPUT) ? 'i' : 'o', in cmp_error()
53 c->pcr_index, &(struct va_format){ fmt, &va }); in cmp_error()
57 static u64 mpr_address(struct cmp_connection *c) in mpr_address() argument
59 if (c->direction == CMP_INPUT) in mpr_address()
65 static u64 pcr_address(struct cmp_connection *c) in pcr_address() argument
67 if (c->direction == CMP_INPUT) in pcr_address()
68 return CSR_REGISTER_BASE + CSR_IPCR(c->pcr_index); in pcr_address()
70 return CSR_REGISTER_BASE + CSR_OPCR(c->pcr_index); in pcr_address()
[all …]

12345678910>>...90