Home
last modified time | relevance | path

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

12345678910>>...133

/Linux-v4.19/fs/ubifs/
Dmaster.c36 static int scan_for_master(struct ubifs_info *c) in scan_for_master() argument
44 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
53 memcpy(c->mst_node, snod->node, snod->len); in scan_for_master()
60 sleb = ubifs_scan(c, lnum, 0, c->sbuf, 1); in scan_for_master()
72 if (memcmp((void *)c->mst_node + UBIFS_CH_SZ, in scan_for_master()
76 c->mst_offs = offs; in scan_for_master()
85 ubifs_err(c, "unexpected node type %d master LEB %d:%d", in scan_for_master()
98 static int validate_master(const struct ubifs_info *c) in validate_master() argument
103 if (c->max_sqnum >= SQNUM_WATERMARK) { in validate_master()
108 if (c->cmt_no >= c->max_sqnum) { in validate_master()
[all …]
Dsuper.c67 static int validate_inode(struct ubifs_info *c, const struct inode *inode) in validate_inode() argument
72 if (inode->i_size > c->max_inode_sz) { in validate_inode()
73 ubifs_err(c, "inode is too large (%lld)", in validate_inode()
79 ubifs_err(c, "unknown compression type %d", ui->compr_type); in validate_inode()
92 if (!ubifs_compr_present(c, ui->compr_type)) { in validate_inode()
93 ubifs_warn(c, "inode %lu uses '%s' compression, but it was not compiled in", in validate_inode()
94 inode->i_ino, ubifs_compr_name(c, ui->compr_type)); in validate_inode()
97 err = dbg_check_dir(c, inode); in validate_inode()
106 struct ubifs_info *c = sb->s_fs_info; in ubifs_iget() local
125 ino_key_init(c, &key, inode->i_ino); in ubifs_iget()
[all …]
Dlpt_commit.c33 static int dbg_populate_lsave(struct ubifs_info *c);
42 static struct ubifs_cnode *first_dirty_cnode(const struct ubifs_info *c, struct ubifs_nnode *nnode) in first_dirty_cnode() argument
44 ubifs_assert(c, nnode); in first_dirty_cnode()
73 static struct ubifs_cnode *next_dirty_cnode(const struct ubifs_info *c, struct ubifs_cnode *cnode) in next_dirty_cnode() argument
78 ubifs_assert(c, cnode); in next_dirty_cnode()
88 return first_dirty_cnode(c, (struct ubifs_nnode *)cnode); in next_dirty_cnode()
100 static int get_cnodes_to_commit(struct ubifs_info *c) in get_cnodes_to_commit() argument
105 if (!c->nroot) in get_cnodes_to_commit()
108 if (!test_bit(DIRTY_CNODE, &c->nroot->flags)) in get_cnodes_to_commit()
111 c->lpt_cnext = first_dirty_cnode(c, c->nroot); in get_cnodes_to_commit()
[all …]
Dbudget.c63 static void shrink_liability(struct ubifs_info *c, int nr_to_write) in shrink_liability() argument
65 down_read(&c->vfs_sb->s_umount); in shrink_liability()
66 writeback_inodes_sb(c->vfs_sb, WB_REASON_FS_FREE_SPACE); in shrink_liability()
67 up_read(&c->vfs_sb->s_umount); in shrink_liability()
78 static int run_gc(struct ubifs_info *c) in run_gc() argument
83 down_read(&c->commit_sem); in run_gc()
84 lnum = ubifs_garbage_collect(c, 1); in run_gc()
85 up_read(&c->commit_sem); in run_gc()
91 err = ubifs_return_leb(c, lnum); in run_gc()
104 static long long get_liability(struct ubifs_info *c) in get_liability() argument
[all …]
Dsb.c73 static int create_default_filesystem(struct ubifs_info *c) in create_default_filesystem() argument
91 c->key_len = UBIFS_SK_LEN; in create_default_filesystem()
97 if (c->leb_cnt < 0x7FFFFFFF / DEFAULT_JNL_PERCENT) in create_default_filesystem()
99 jnl_lebs = c->leb_cnt * DEFAULT_JNL_PERCENT / 100; in create_default_filesystem()
101 jnl_lebs = (c->leb_cnt / 100) * DEFAULT_JNL_PERCENT; in create_default_filesystem()
105 if (jnl_lebs * c->leb_size > DEFAULT_MAX_JNL) in create_default_filesystem()
106 jnl_lebs = DEFAULT_MAX_JNL / c->leb_size; in create_default_filesystem()
114 tmp = 2 * (c->ref_node_alsz * jnl_lebs) + c->leb_size - 1; in create_default_filesystem()
115 log_lebs = tmp / c->leb_size; in create_default_filesystem()
118 if (c->leb_cnt - min_leb_cnt > 8) { in create_default_filesystem()
[all …]
Dcommit.c68 static int nothing_to_commit(struct ubifs_info *c) in nothing_to_commit() argument
74 if (c->mounting || c->remounting_rw) in nothing_to_commit()
81 if (c->zroot.znode && ubifs_zn_dirty(c->zroot.znode)) in nothing_to_commit()
91 if (c->nroot && test_bit(DIRTY_CNODE, &c->nroot->flags)) in nothing_to_commit()
94 ubifs_assert(c, atomic_long_read(&c->dirty_zn_cnt) == 0); in nothing_to_commit()
95 ubifs_assert(c, c->dirty_pn_cnt == 0); in nothing_to_commit()
96 ubifs_assert(c, c->dirty_nn_cnt == 0); in nothing_to_commit()
109 static int do_commit(struct ubifs_info *c) in do_commit() argument
116 ubifs_assert(c, !c->ro_media && !c->ro_mount); in do_commit()
118 if (c->ro_error) { in do_commit()
[all …]
Dlog.c32 static int dbg_check_bud_bytes(struct ubifs_info *c);
42 struct ubifs_bud *ubifs_search_bud(struct ubifs_info *c, int lnum) in ubifs_search_bud() argument
47 spin_lock(&c->buds_lock); in ubifs_search_bud()
48 p = c->buds.rb_node; in ubifs_search_bud()
56 spin_unlock(&c->buds_lock); in ubifs_search_bud()
60 spin_unlock(&c->buds_lock); in ubifs_search_bud()
71 struct ubifs_wbuf *ubifs_get_wbuf(struct ubifs_info *c, int lnum) in ubifs_get_wbuf() argument
77 if (!c->jheads) in ubifs_get_wbuf()
80 spin_lock(&c->buds_lock); in ubifs_get_wbuf()
81 p = c->buds.rb_node; in ubifs_get_wbuf()
[all …]
Dlpt.c58 static void do_calc_lpt_geom(struct ubifs_info *c) in do_calc_lpt_geom() argument
63 n = c->main_lebs + c->max_leb_cnt - c->leb_cnt; in do_calc_lpt_geom()
66 c->lpt_hght = 1; in do_calc_lpt_geom()
69 c->lpt_hght += 1; in do_calc_lpt_geom()
73 c->pnode_cnt = DIV_ROUND_UP(c->main_lebs, UBIFS_LPT_FANOUT); in do_calc_lpt_geom()
75 n = DIV_ROUND_UP(c->pnode_cnt, UBIFS_LPT_FANOUT); in do_calc_lpt_geom()
76 c->nnode_cnt = n; in do_calc_lpt_geom()
77 for (i = 1; i < c->lpt_hght; i++) { in do_calc_lpt_geom()
79 c->nnode_cnt += n; in do_calc_lpt_geom()
82 c->space_bits = fls(c->leb_size) - 3; in do_calc_lpt_geom()
[all …]
Dorphan.c55 static int dbg_check_orphans(struct ubifs_info *c);
65 int ubifs_add_orphan(struct ubifs_info *c, ino_t inum) in ubifs_add_orphan() argument
76 spin_lock(&c->orphan_lock); in ubifs_add_orphan()
77 if (c->tot_orphans >= c->max_orphans) { in ubifs_add_orphan()
78 spin_unlock(&c->orphan_lock); in ubifs_add_orphan()
82 p = &c->orph_tree.rb_node; in ubifs_add_orphan()
91 ubifs_err(c, "orphaned twice"); in ubifs_add_orphan()
92 spin_unlock(&c->orphan_lock); in ubifs_add_orphan()
97 c->tot_orphans += 1; in ubifs_add_orphan()
98 c->new_orphans += 1; in ubifs_add_orphan()
[all …]
Dtnc_commit.c37 static int make_idx_node(struct ubifs_info *c, struct ubifs_idx_node *idx, in make_idx_node() argument
48 struct ubifs_branch *br = ubifs_idx_branch(c, idx, i); in make_idx_node()
51 key_write_idx(c, &zbr->key, &br->key); in make_idx_node()
56 ubifs_err(c, "bad ref in znode"); in make_idx_node()
57 ubifs_dump_znode(c, znode); in make_idx_node()
59 ubifs_dump_znode(c, zbr->znode); in make_idx_node()
64 ubifs_prepare_node(c, idx, len, 0); in make_idx_node()
70 err = insert_old_idx_znode(c, znode); in make_idx_node()
82 c->zroot.lnum = lnum; in make_idx_node()
83 c->zroot.offs = offs; in make_idx_node()
[all …]
Dfind.c54 static int valuable(struct ubifs_info *c, const struct ubifs_lprops *lprops) in valuable() argument
63 heap = &c->lpt_heap[cat - 1]; in valuable()
66 if (lprops->free + lprops->dirty >= c->dark_wm) in valuable()
70 n = c->lst.empty_lebs + c->freeable_cnt - in valuable()
71 c->lst.taken_empty_lebs; in valuable()
72 if (n < c->lsave_cnt) in valuable()
95 static int scan_for_dirty_cb(struct ubifs_info *c, in scan_for_dirty_cb() argument
105 if (!in_tree && valuable(c, lprops)) in scan_for_dirty_cb()
114 if (lprops->free + lprops->dirty == c->leb_size) { in scan_for_dirty_cb()
118 } else if (lprops->dirty < c->dead_wm) in scan_for_dirty_cb()
[all …]
Dio.c82 void ubifs_ro_mode(struct ubifs_info *c, int err) in ubifs_ro_mode() argument
84 if (!c->ro_error) { in ubifs_ro_mode()
85 c->ro_error = 1; in ubifs_ro_mode()
86 c->no_chk_data_crc = 0; in ubifs_ro_mode()
87 c->vfs_sb->s_flags |= SB_RDONLY; in ubifs_ro_mode()
88 ubifs_warn(c, "switched to read-only mode, error %d", err); in ubifs_ro_mode()
99 int ubifs_leb_read(const struct ubifs_info *c, int lnum, void *buf, int offs, in ubifs_leb_read() argument
104 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read()
110 ubifs_err(c, "reading %d bytes from LEB %d:%d failed, error %d", in ubifs_leb_read()
117 int ubifs_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs, in ubifs_leb_write() argument
[all …]
Dlprops.c62 static void move_up_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in move_up_lpt_heap() argument
99 static void adjust_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in adjust_lpt_heap() argument
178 static int add_to_lpt_heap(struct ubifs_info *c, struct ubifs_lprops *lprops, in add_to_lpt_heap() argument
181 struct ubifs_lpt_heap *heap = &c->lpt_heap[cat - 1]; in add_to_lpt_heap()
190 ubifs_assert(c, cpos >= b); in add_to_lpt_heap()
191 ubifs_assert(c, cpos < LPT_HEAP_SZ); in add_to_lpt_heap()
192 ubifs_assert(c, cpos < heap->cnt); in add_to_lpt_heap()
202 list_add(&lp->list, &c->uncat_list); in add_to_lpt_heap()
205 move_up_lpt_heap(c, heap, lprops, cat); in add_to_lpt_heap()
206 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
[all …]
/Linux-v4.19/drivers/net/wan/
Dz85230.c111 static void z8530_rx_done(struct z8530_channel *c);
112 static void z8530_tx_done(struct z8530_channel *c);
126 static inline u8 read_zsreg(struct z8530_channel *c, u8 reg) in read_zsreg() argument
129 z8530_write_port(c->ctrlio, reg); in read_zsreg()
130 return z8530_read_port(c->ctrlio); in read_zsreg()
141 static inline u8 read_zsdata(struct z8530_channel *c) in read_zsdata() argument
144 r=z8530_read_port(c->dataio); in read_zsdata()
160 static inline void write_zsreg(struct z8530_channel *c, u8 reg, u8 val) in write_zsreg() argument
163 z8530_write_port(c->ctrlio, reg); in write_zsreg()
164 z8530_write_port(c->ctrlio, val); in write_zsreg()
[all …]
/Linux-v4.19/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-v4.19/arch/mips/kernel/
Dcpu-probe.c77 static inline void cpu_set_fpu_fcsr_mask(struct cpuinfo_mips *c) in cpu_set_fpu_fcsr_mask() argument
81 fcsr = c->fpu_csr31; in cpu_set_fpu_fcsr_mask()
99 c->fpu_msk31 = ~(fcsr0 ^ fcsr1) & ~mask; in cpu_set_fpu_fcsr_mask()
106 static void cpu_set_fpu_2008(struct cpuinfo_mips *c) in cpu_set_fpu_2008() argument
108 if (c->isa_level & (MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M64R1 | in cpu_set_fpu_2008()
131 c->options |= MIPS_CPU_NAN_LEGACY; in cpu_set_fpu_2008()
133 c->options |= MIPS_CPU_NAN_2008; in cpu_set_fpu_2008()
136 c->fpu_msk31 &= ~FPU_CSR_ABS2008; in cpu_set_fpu_2008()
138 c->fpu_csr31 |= fcsr & FPU_CSR_ABS2008; in cpu_set_fpu_2008()
141 c->fpu_msk31 &= ~FPU_CSR_NAN2008; in cpu_set_fpu_2008()
[all …]
/Linux-v4.19/arch/x86/kernel/cpu/
Damd.c90 static void init_amd_k5(struct cpuinfo_x86 *c) in init_amd_k5() argument
102 if (c->x86_model == 9 || c->x86_model == 10) { in init_amd_k5()
109 static void init_amd_k6(struct cpuinfo_x86 *c) in init_amd_k6() argument
115 if (c->x86_model < 6) { in init_amd_k6()
117 if (c->x86_model == 0) { in init_amd_k6()
118 clear_cpu_cap(c, X86_FEATURE_APIC); in init_amd_k6()
119 set_cpu_cap(c, X86_FEATURE_PGE); in init_amd_k6()
124 if (c->x86_model == 6 && c->x86_stepping == 1) { in init_amd_k6()
153 if (c->x86_model < 8 || in init_amd_k6()
154 (c->x86_model == 8 && c->x86_stepping < 8)) { in init_amd_k6()
[all …]
Dintel.c48 void check_mpx_erratum(struct cpuinfo_x86 *c) in check_mpx_erratum() argument
63 if (cpu_has(c, X86_FEATURE_MPX) && !cpu_has(c, X86_FEATURE_SMEP)) { in check_mpx_erratum()
78 static void probe_xeon_phi_r3mwait(struct cpuinfo_x86 *c) in probe_xeon_phi_r3mwait() argument
84 if (c->x86 != 6) in probe_xeon_phi_r3mwait()
86 switch (c->x86_model) { in probe_xeon_phi_r3mwait()
97 set_cpu_cap(c, X86_FEATURE_RING3MWAIT); in probe_xeon_phi_r3mwait()
101 if (c == &boot_cpu_data) in probe_xeon_phi_r3mwait()
142 static bool bad_spectre_microcode(struct cpuinfo_x86 *c) in bad_spectre_microcode() argument
150 if (cpu_has(c, X86_FEATURE_HYPERVISOR)) in bad_spectre_microcode()
153 if (c->x86 != 6) in bad_spectre_microcode()
[all …]
/Linux-v4.19/drivers/staging/most/cdev/
Dcdev.c51 static inline bool ch_has_mbo(struct comp_channel *c) in ch_has_mbo() argument
53 return channel_has_mbo(c->iface, c->channel_id, &comp.cc) > 0; in ch_has_mbo()
56 static inline struct mbo *ch_get_mbo(struct comp_channel *c, struct mbo **mbo) in ch_get_mbo() argument
58 if (!kfifo_peek(&c->fifo, mbo)) { in ch_get_mbo()
59 *mbo = most_get_mbo(c->iface, c->channel_id, &comp.cc); in ch_get_mbo()
61 kfifo_in(&c->fifo, mbo, 1); in ch_get_mbo()
68 struct comp_channel *c, *tmp; in get_channel() local
73 list_for_each_entry_safe(c, tmp, &channel_list, list) { in get_channel()
74 if ((c->iface == iface) && (c->channel_id == id)) { in get_channel()
82 return c; in get_channel()
[all …]
/Linux-v4.19/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-v4.19/drivers/scsi/
Datp870u.c43 static void send_s870(struct atp_unit *dev,unsigned char c);
44 static void atp_is(struct atp_unit *dev, unsigned char c, bool wide_chip, unsigned char lvdmode);
121 unsigned char i, j, c, target_id, lun,cmdp; in atp870u_intr_handle() local
131 for (c = 0; c < 2; c++) { in atp870u_intr_handle()
132 j = atp_readb_io(dev, c, 0x1f); in atp870u_intr_handle()
135 dev->in_int[c] = 0; in atp870u_intr_handle()
142 dev->in_int[c] = 1; in atp870u_intr_handle()
143 cmdp = atp_readb_io(dev, c, 0x10); in atp870u_intr_handle()
144 if (dev->working[c] != 0) { in atp870u_intr_handle()
146 if ((atp_readb_io(dev, c, 0x16) & 0x80) == 0) in atp870u_intr_handle()
[all …]
/Linux-v4.19/drivers/staging/most/
Dcore.c111 struct most_channel *c = mbo->context; in most_free_mbo_coherent() local
112 u16 const coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len; in most_free_mbo_coherent()
114 if (c->iface->dma_free) in most_free_mbo_coherent()
115 c->iface->dma_free(mbo, coherent_buf_size); in most_free_mbo_coherent()
119 if (atomic_sub_and_test(1, &c->mbo_ref)) in most_free_mbo_coherent()
120 complete(&c->cleanup); in most_free_mbo_coherent()
127 static void flush_channel_fifos(struct most_channel *c) in flush_channel_fifos() argument
132 if (list_empty(&c->fifo) && list_empty(&c->halt_fifo)) in flush_channel_fifos()
135 spin_lock_irqsave(&c->fifo_lock, flags); in flush_channel_fifos()
136 list_for_each_entry_safe(mbo, tmp, &c->fifo, list) { in flush_channel_fifos()
[all …]

12345678910>>...133