cm                 74 arch/arm/mach-integrator/core.c 	struct device_node *cm = of_find_matching_node(NULL, cm_match);
cm                 76 arch/arm/mach-integrator/core.c 	if (!cm) {
cm                 80 arch/arm/mach-integrator/core.c 	cm_base = of_iomap(cm, 0);
cm                 29 arch/arm/mach-omap2/cm.h extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2);
cm                 47 arch/arm/mach-omap2/cm_common.c void __init omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2)
cm                 49 arch/arm/mach-omap2/cm_common.c 	cm_base.va = cm;
cm                 57 arch/arm64/kernel/vdso.c 	struct vm_special_mapping *cm;
cm                134 arch/arm64/kernel/vdso.c 	vdso_lookup[arch_index].cm->pages = &vdso_pagelist[1];
cm                168 arch/arm64/kernel/vdso.c 				       vdso_lookup[arch_index].cm);
cm                257 arch/arm64/kernel/vdso.c 	vdso_lookup[ARM64_VDSO32].cm = &aarch32_vdso_spec[C_VDSO];
cm                398 arch/arm64/kernel/vdso.c 	vdso_lookup[ARM64_VDSO].cm = &vdso_spec[A_VDSO];
cm                443 arch/ia64/include/asm/pal.h 			cm		: 1,	/* MC corrected */
cm                697 arch/ia64/include/asm/pal.h #define pmci_proc_machine_check_corrected	pme_processor.cm
cm                668 arch/ia64/kernel/mca_drv.c 	if (psp->cm == 1)
cm                129 arch/mips/include/asm/addrspace.h #define PHYS_TO_XKPHYS(cm, a)		(XKPHYS | (_ACAST64_(cm) << 59) | (a))
cm                658 arch/x86/events/intel/cstate.c static int __init cstate_probe(const struct cstate_model *cm)
cm                661 arch/x86/events/intel/cstate.c 	if (cm->quirks & SLM_PKG_C6_USE_C7_MSR)
cm                665 arch/x86/events/intel/cstate.c 	if (cm->quirks & KNL_CORE_C6_MSR)
cm                670 arch/x86/events/intel/cstate.c 				       true, (void *) &cm->core_events);
cm                673 arch/x86/events/intel/cstate.c 				      true, (void *) &cm->pkg_events);
cm                717 arch/x86/mm/pat.c 	enum page_cache_mode cm = lookup_memtype(PFN_PHYS(pfn));
cm                719 arch/x86/mm/pat.c 	return cm == _PAGE_CACHE_MODE_UC ||
cm                720 arch/x86/mm/pat.c 	       cm == _PAGE_CACHE_MODE_UC_MINUS ||
cm                721 arch/x86/mm/pat.c 	       cm == _PAGE_CACHE_MODE_WC;
cm                845 drivers/clk/bcm/clk-bcm2835.c 	u32 cm, div, max_div = 1 << A2W_PLL_DIV_BITS;
cm                854 drivers/clk/bcm/clk-bcm2835.c 	cm = cprman_read(cprman, data->cm_reg);
cm                855 drivers/clk/bcm/clk-bcm2835.c 	cprman_write(cprman, data->cm_reg, cm | data->load_mask);
cm                856 drivers/clk/bcm/clk-bcm2835.c 	cprman_write(cprman, data->cm_reg, cm & ~data->load_mask);
cm                 41 drivers/clk/sprd/mux.c 	struct sprd_mux *cm = hw_to_sprd_mux(hw);
cm                 43 drivers/clk/sprd/mux.c 	return sprd_mux_helper_get_parent(&cm->common, &cm->mux);
cm                 66 drivers/clk/sprd/mux.c 	struct sprd_mux *cm = hw_to_sprd_mux(hw);
cm                 68 drivers/clk/sprd/mux.c 	return sprd_mux_helper_set_parent(&cm->common, &cm->mux, index);
cm                933 drivers/clk/sunxi-ng/ccu-sun50i-a64.c 	.cm		= &cpux_clk.mux,
cm               1224 drivers/clk/sunxi-ng/ccu-sun6i-a31.c 	.cm		= &cpu_clk.mux,
cm                782 drivers/clk/sunxi-ng/ccu-sun8i-a33.c 	.cm		= &cpux_clk.mux,
cm               1134 drivers/clk/sunxi-ng/ccu-sun8i-h3.c 	.cm		= &cpux_clk.mux,
cm               1262 drivers/clk/sunxi-ng/ccu-sun8i-r40.c 	.cm		= &cpu_clk.mux,
cm                520 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c 	.cm		= &cpu_clk.mux,
cm                 23 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	struct ccu_common *cm = hw_to_ccu_common(hw);
cm                 27 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	if (!(cm->features & CCU_FEATURE_MMC_TIMING_SWITCH))
cm                 30 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	spin_lock_irqsave(cm->lock, flags);
cm                 32 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	val = readl(cm->base + cm->reg);
cm                 37 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	writel(val, cm->base + cm->reg);
cm                 39 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	spin_unlock_irqrestore(cm->lock, flags);
cm                 56 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	struct ccu_common *cm = hw_to_ccu_common(hw);
cm                 58 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	if (!(cm->features & CCU_FEATURE_MMC_TIMING_SWITCH))
cm                 61 drivers/clk/sunxi-ng/ccu_mmc_timing.c 	return !!(readl(cm->base + cm->reg) & CCU_MMC_NEW_TIMING_MODE);
cm                270 drivers/clk/sunxi-ng/ccu_mp.c 	struct ccu_common *cm = hw_to_ccu_common(hw);
cm                271 drivers/clk/sunxi-ng/ccu_mp.c 	u32 val = readl(cm->base + cm->reg);
cm                281 drivers/clk/sunxi-ng/ccu_mp.c 	struct ccu_common *cm = hw_to_ccu_common(hw);
cm                282 drivers/clk/sunxi-ng/ccu_mp.c 	u32 val = readl(cm->base + cm->reg);
cm                307 drivers/clk/sunxi-ng/ccu_mp.c 	struct ccu_common *cm = hw_to_ccu_common(hw);
cm                308 drivers/clk/sunxi-ng/ccu_mp.c 	u32 val = readl(cm->base + cm->reg);
cm                 38 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = data;
cm                 41 drivers/clk/sunxi-ng/ccu_mult.c 	_cm.min = cm->mult.min;
cm                 43 drivers/clk/sunxi-ng/ccu_mult.c 	if (cm->mult.max)
cm                 44 drivers/clk/sunxi-ng/ccu_mult.c 		_cm.max = cm->mult.max;
cm                 46 drivers/clk/sunxi-ng/ccu_mult.c 		_cm.max = (1 << cm->mult.width) + cm->mult.offset - 1;
cm                 55 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                 57 drivers/clk/sunxi-ng/ccu_mult.c 	return ccu_gate_helper_disable(&cm->common, cm->enable);
cm                 62 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                 64 drivers/clk/sunxi-ng/ccu_mult.c 	return ccu_gate_helper_enable(&cm->common, cm->enable);
cm                 69 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                 71 drivers/clk/sunxi-ng/ccu_mult.c 	return ccu_gate_helper_is_enabled(&cm->common, cm->enable);
cm                 77 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                 81 drivers/clk/sunxi-ng/ccu_mult.c 	if (ccu_frac_helper_is_enabled(&cm->common, &cm->frac))
cm                 82 drivers/clk/sunxi-ng/ccu_mult.c 		return ccu_frac_helper_read_rate(&cm->common, &cm->frac);
cm                 84 drivers/clk/sunxi-ng/ccu_mult.c 	reg = readl(cm->common.base + cm->common.reg);
cm                 85 drivers/clk/sunxi-ng/ccu_mult.c 	val = reg >> cm->mult.shift;
cm                 86 drivers/clk/sunxi-ng/ccu_mult.c 	val &= (1 << cm->mult.width) - 1;
cm                 88 drivers/clk/sunxi-ng/ccu_mult.c 	parent_rate = ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
cm                 91 drivers/clk/sunxi-ng/ccu_mult.c 	return parent_rate * (val + cm->mult.offset);
cm                 97 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                 99 drivers/clk/sunxi-ng/ccu_mult.c 	return ccu_mux_helper_determine_rate(&cm->common, &cm->mux,
cm                100 drivers/clk/sunxi-ng/ccu_mult.c 					     req, ccu_mult_round_rate, cm);
cm                106 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                111 drivers/clk/sunxi-ng/ccu_mult.c 	if (ccu_frac_helper_has_rate(&cm->common, &cm->frac, rate)) {
cm                112 drivers/clk/sunxi-ng/ccu_mult.c 		ccu_frac_helper_enable(&cm->common, &cm->frac);
cm                114 drivers/clk/sunxi-ng/ccu_mult.c 		return ccu_frac_helper_set_rate(&cm->common, &cm->frac,
cm                115 drivers/clk/sunxi-ng/ccu_mult.c 						rate, cm->lock);
cm                117 drivers/clk/sunxi-ng/ccu_mult.c 		ccu_frac_helper_disable(&cm->common, &cm->frac);
cm                120 drivers/clk/sunxi-ng/ccu_mult.c 	parent_rate = ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
cm                123 drivers/clk/sunxi-ng/ccu_mult.c 	_cm.min = cm->mult.min;
cm                125 drivers/clk/sunxi-ng/ccu_mult.c 	if (cm->mult.max)
cm                126 drivers/clk/sunxi-ng/ccu_mult.c 		_cm.max = cm->mult.max;
cm                128 drivers/clk/sunxi-ng/ccu_mult.c 		_cm.max = (1 << cm->mult.width) + cm->mult.offset - 1;
cm                132 drivers/clk/sunxi-ng/ccu_mult.c 	spin_lock_irqsave(cm->common.lock, flags);
cm                134 drivers/clk/sunxi-ng/ccu_mult.c 	reg = readl(cm->common.base + cm->common.reg);
cm                135 drivers/clk/sunxi-ng/ccu_mult.c 	reg &= ~GENMASK(cm->mult.width + cm->mult.shift - 1, cm->mult.shift);
cm                136 drivers/clk/sunxi-ng/ccu_mult.c 	reg |= ((_cm.mult - cm->mult.offset) << cm->mult.shift);
cm                138 drivers/clk/sunxi-ng/ccu_mult.c 	writel(reg, cm->common.base + cm->common.reg);
cm                140 drivers/clk/sunxi-ng/ccu_mult.c 	spin_unlock_irqrestore(cm->common.lock, flags);
cm                142 drivers/clk/sunxi-ng/ccu_mult.c 	ccu_helper_wait_for_lock(&cm->common, cm->lock);
cm                149 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                151 drivers/clk/sunxi-ng/ccu_mult.c 	return ccu_mux_helper_get_parent(&cm->common, &cm->mux);
cm                156 drivers/clk/sunxi-ng/ccu_mult.c 	struct ccu_mult *cm = hw_to_ccu_mult(hw);
cm                158 drivers/clk/sunxi-ng/ccu_mult.c 	return ccu_mux_helper_set_parent(&cm->common, &cm->mux, index);
cm                 16 drivers/clk/sunxi-ng/ccu_mux.c 			      struct ccu_mux_internal *cm,
cm                 32 drivers/clk/sunxi-ng/ccu_mux.c 		parent_index = reg >> cm->shift;
cm                 33 drivers/clk/sunxi-ng/ccu_mux.c 		parent_index &= (1 << cm->width) - 1;
cm                 39 drivers/clk/sunxi-ng/ccu_mux.c 		for (i = 0; i < cm->n_predivs; i++)
cm                 40 drivers/clk/sunxi-ng/ccu_mux.c 			if (parent_index == cm->fixed_predivs[i].index)
cm                 41 drivers/clk/sunxi-ng/ccu_mux.c 				prediv = cm->fixed_predivs[i].div;
cm                 47 drivers/clk/sunxi-ng/ccu_mux.c 		for (i = 0; i < cm->n_var_predivs; i++)
cm                 48 drivers/clk/sunxi-ng/ccu_mux.c 			if (parent_index == cm->var_predivs[i].index) {
cm                 51 drivers/clk/sunxi-ng/ccu_mux.c 				div = reg >> cm->var_predivs[i].shift;
cm                 52 drivers/clk/sunxi-ng/ccu_mux.c 				div &= (1 << cm->var_predivs[i].width) - 1;
cm                 61 drivers/clk/sunxi-ng/ccu_mux.c 					  struct ccu_mux_internal *cm,
cm                 65 drivers/clk/sunxi-ng/ccu_mux.c 	return parent_rate / ccu_mux_get_prediv(common, cm, parent_index);
cm                 69 drivers/clk/sunxi-ng/ccu_mux.c 					    struct ccu_mux_internal *cm,
cm                 73 drivers/clk/sunxi-ng/ccu_mux.c 	return parent_rate * ccu_mux_get_prediv(common, cm, parent_index);
cm                 77 drivers/clk/sunxi-ng/ccu_mux.c 				  struct ccu_mux_internal *cm,
cm                 95 drivers/clk/sunxi-ng/ccu_mux.c 		adj_parent_rate = ccu_mux_helper_apply_prediv(common, cm, -1,
cm                 98 drivers/clk/sunxi-ng/ccu_mux.c 		best_rate = round(cm, best_parent, &adj_parent_rate,
cm                106 drivers/clk/sunxi-ng/ccu_mux.c 		best_parent_rate = ccu_mux_helper_unapply_prediv(common, cm, -1,
cm                120 drivers/clk/sunxi-ng/ccu_mux.c 		parent_rate = ccu_mux_helper_apply_prediv(common, cm, i,
cm                123 drivers/clk/sunxi-ng/ccu_mux.c 		tmp_rate = round(cm, parent, &parent_rate, req->rate, data);
cm                130 drivers/clk/sunxi-ng/ccu_mux.c 		parent_rate = ccu_mux_helper_unapply_prediv(common, cm, i,
cm                157 drivers/clk/sunxi-ng/ccu_mux.c 			     struct ccu_mux_internal *cm)
cm                163 drivers/clk/sunxi-ng/ccu_mux.c 	parent = reg >> cm->shift;
cm                164 drivers/clk/sunxi-ng/ccu_mux.c 	parent &= (1 << cm->width) - 1;
cm                166 drivers/clk/sunxi-ng/ccu_mux.c 	if (cm->table) {
cm                171 drivers/clk/sunxi-ng/ccu_mux.c 			if (cm->table[i] == parent)
cm                179 drivers/clk/sunxi-ng/ccu_mux.c 			      struct ccu_mux_internal *cm,
cm                185 drivers/clk/sunxi-ng/ccu_mux.c 	if (cm->table)
cm                186 drivers/clk/sunxi-ng/ccu_mux.c 		index = cm->table[index];
cm                191 drivers/clk/sunxi-ng/ccu_mux.c 	reg &= ~GENMASK(cm->width + cm->shift - 1, cm->shift);
cm                192 drivers/clk/sunxi-ng/ccu_mux.c 	writel(reg | (index << cm->shift), common->base + common->reg);
cm                201 drivers/clk/sunxi-ng/ccu_mux.c 	struct ccu_mux *cm = hw_to_ccu_mux(hw);
cm                203 drivers/clk/sunxi-ng/ccu_mux.c 	return ccu_gate_helper_disable(&cm->common, cm->enable);
cm                208 drivers/clk/sunxi-ng/ccu_mux.c 	struct ccu_mux *cm = hw_to_ccu_mux(hw);
cm                210 drivers/clk/sunxi-ng/ccu_mux.c 	return ccu_gate_helper_enable(&cm->common, cm->enable);
cm                215 drivers/clk/sunxi-ng/ccu_mux.c 	struct ccu_mux *cm = hw_to_ccu_mux(hw);
cm                217 drivers/clk/sunxi-ng/ccu_mux.c 	return ccu_gate_helper_is_enabled(&cm->common, cm->enable);
cm                222 drivers/clk/sunxi-ng/ccu_mux.c 	struct ccu_mux *cm = hw_to_ccu_mux(hw);
cm                224 drivers/clk/sunxi-ng/ccu_mux.c 	return ccu_mux_helper_get_parent(&cm->common, &cm->mux);
cm                229 drivers/clk/sunxi-ng/ccu_mux.c 	struct ccu_mux *cm = hw_to_ccu_mux(hw);
cm                231 drivers/clk/sunxi-ng/ccu_mux.c 	return ccu_mux_helper_set_parent(&cm->common, &cm->mux, index);
cm                237 drivers/clk/sunxi-ng/ccu_mux.c 	struct ccu_mux *cm = hw_to_ccu_mux(hw);
cm                239 drivers/clk/sunxi-ng/ccu_mux.c 	return ccu_mux_helper_apply_prediv(&cm->common, &cm->mux, -1,
cm                269 drivers/clk/sunxi-ng/ccu_mux.c 								mux->cm);
cm                270 drivers/clk/sunxi-ng/ccu_mux.c 		ret = ccu_mux_helper_set_parent(mux->common, mux->cm,
cm                273 drivers/clk/sunxi-ng/ccu_mux.c 		ret = ccu_mux_helper_set_parent(mux->common, mux->cm,
cm                 86 drivers/clk/sunxi-ng/ccu_mux.h 					  struct ccu_mux_internal *cm,
cm                 90 drivers/clk/sunxi-ng/ccu_mux.h 				  struct ccu_mux_internal *cm,
cm                 99 drivers/clk/sunxi-ng/ccu_mux.h 			     struct ccu_mux_internal *cm);
cm                101 drivers/clk/sunxi-ng/ccu_mux.h 			      struct ccu_mux_internal *cm,
cm                107 drivers/clk/sunxi-ng/ccu_mux.h 	struct ccu_mux_internal	*cm;
cm                 50 drivers/crypto/amcc/crypto4xx_alg.c static void set_dynamic_sa_command_1(struct dynamic_sa_ctl *sa, u32 cm,
cm                 56 drivers/crypto/amcc/crypto4xx_alg.c 	sa->sa_command_1.bf.crypto_mode31 = (cm & 4) >> 2;
cm                 57 drivers/crypto/amcc/crypto4xx_alg.c 	sa->sa_command_1.bf.crypto_mode9_8 = cm & 3;
cm                124 drivers/crypto/amcc/crypto4xx_alg.c 				unsigned char cm,
cm                149 drivers/crypto/amcc/crypto4xx_alg.c 	set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_ECB ?
cm                151 drivers/crypto/amcc/crypto4xx_alg.c 				 SA_NOT_LOAD_HASH, (cm == CRYPTO_MODE_ECB ?
cm                158 drivers/crypto/amcc/crypto4xx_alg.c 	set_dynamic_sa_command_1(sa, cm, SA_HASH_MODE_HASH,
cm                 35 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	(cm == CM_444 || cm == CM_RGB) ? (val444) : (cm == CM_422 ? (val422) : (val420))
cm                 44 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc, enum max_min max_min, float bpp)
cm                176 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c void calc_rc_params(struct rc_params *rc, enum colour_mode cm, enum bits_per_comp bpc, float bpp, int slice_width, int slice_height, int minor_version)
cm                184 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	rc->rc_quant_incr_limit0 = ((bpc == BPC_8) ? 11 : (bpc == BPC_10 ? 15 : 19)) - ((minor_version == 1 && cm == CM_444) ? 1 : 0);
cm                185 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	rc->rc_quant_incr_limit1 = ((bpc == BPC_8) ? 11 : (bpc == BPC_10 ? 15 : 19)) - ((minor_version == 1 && cm == CM_444) ? 1 : 0);
cm                189 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	switch (cm) {
cm                203 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 		rc->first_line_bpg_offset   = median3(0, (12 + (int) (0.09 *  min(34, slice_height - 8))), (int)(((3 * bpc + (cm == CM_444 ? 0 : 2)) * 3) - (3 * bpp_group)));
cm                208 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	initial_xmit_delay_factor = (cm == CM_444 || cm == CM_RGB) ? 1.0 : 2.0;
cm                211 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	if (cm == CM_422 || cm == CM_420)
cm                215 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	if (3 * bpp_group >= (((rc->initial_xmit_delay + 2) / 3) * (3 + (cm == CM_422)))) {
cm                222 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	rc->flatness_min_qp     = ((bpc == BPC_8) ?  (3) : ((bpc == BPC_10) ? (7)  : (11))) - ((minor_version == 1 && cm == CM_444) ? 1 : 0);
cm                223 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	rc->flatness_max_qp     = ((bpc == BPC_8) ? (12) : ((bpc == BPC_10) ? (16) : (20))) - ((minor_version == 1 && cm == CM_444) ? 1 : 0);
cm                226 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	get_qp_set(rc->qp_min, cm, bpc, MM_MIN, bpp);
cm                227 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	get_qp_set(rc->qp_max, cm, bpc, MM_MAX, bpp);
cm                228 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	if (cm == CM_444 && minor_version == 1) {
cm                234 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 	get_ofs_set(rc->ofs, cm, bpp);
cm                 81 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h void calc_rc_params(struct rc_params *rc, enum colour_mode cm, enum bits_per_comp bpc, float bpp, int slice_width, int slice_height, int minor_version);
cm                101 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 			u32 cm = ((1ULL << c->bits) - 1) << c->ctxs;
cm                103 drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c 			u32 cv = (nvkm_ro32(fctx, c->ctxp + data) & ~cm);
cm                 49 drivers/hid/hid-cmedia.c static void hp_ev(struct hid_device *hid, struct cmhid *cm, int value)
cm                 51 drivers/hid/hid-cmedia.c 	input_report_switch(cm->input_dev, SW_HEADPHONE_INSERT, value);
cm                 52 drivers/hid/hid-cmedia.c 	input_sync(cm->input_dev);
cm                 58 drivers/hid/hid-cmedia.c 	struct cmhid *cm = hid_get_drvdata(hid);
cm                 66 drivers/hid/hid-cmedia.c 		hp_ev(hid, cm, 0);
cm                 70 drivers/hid/hid-cmedia.c 		hp_ev(hid, cm, 1);
cm                 82 drivers/hid/hid-cmedia.c 	struct cmhid *cm = hid_get_drvdata(hid);
cm                 85 drivers/hid/hid-cmedia.c 	cm->input_dev = input_dev;
cm                 86 drivers/hid/hid-cmedia.c 	memcpy(cm->switch_map, jack_switch_types, sizeof(cm->switch_map));
cm                 89 drivers/hid/hid-cmedia.c 		input_set_capability(cm->input_dev,
cm                104 drivers/hid/hid-cmedia.c 	struct cmhid *cm;
cm                106 drivers/hid/hid-cmedia.c 	cm = kzalloc(sizeof(struct cmhid), GFP_KERNEL);
cm                107 drivers/hid/hid-cmedia.c 	if (!cm) {
cm                112 drivers/hid/hid-cmedia.c 	cm->hid = hid;
cm                115 drivers/hid/hid-cmedia.c 	hid_set_drvdata(hid, cm);
cm                131 drivers/hid/hid-cmedia.c 	kfree(cm);
cm                138 drivers/hid/hid-cmedia.c 	struct cmhid *cm = hid_get_drvdata(hid);
cm                141 drivers/hid/hid-cmedia.c 	kfree(cm);
cm                135 drivers/infiniband/core/cm.c } cm;
cm                326 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.state_lock, flags2);
cm                327 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm                336 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm.lock, flags);
cm                339 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm                373 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.state_lock, flags2);
cm                499 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm                508 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm                520 drivers/infiniband/core/cm.c 		read_lock_irqsave(&cm.device_lock, flags);
cm                521 drivers/infiniband/core/cm.c 		list_for_each_entry(cm_dev, &cm.device_list, list) {
cm                527 drivers/infiniband/core/cm.c 		read_unlock_irqrestore(&cm.device_lock, flags);
cm                535 drivers/infiniband/core/cm.c 		read_lock_irqsave(&cm.device_lock, flags);
cm                536 drivers/infiniband/core/cm.c 		list_for_each_entry(cm_dev, &cm.device_list, list) {
cm                546 drivers/infiniband/core/cm.c 		read_unlock_irqrestore(&cm.device_lock, flags);
cm                602 drivers/infiniband/core/cm.c 	return (__force u32) (local_id ^ cm.random_id_operand);
cm                607 drivers/infiniband/core/cm.c 	xa_erase_irq(&cm.local_id_table, cm_local_id(local_id));
cm                614 drivers/infiniband/core/cm.c 	cm_id_priv = xa_load(&cm.local_id_table, cm_local_id(local_id));
cm                629 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm                631 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm                663 drivers/infiniband/core/cm.c 	struct rb_node **link = &cm.listen_service_table.rb_node;
cm                690 drivers/infiniband/core/cm.c 	rb_insert_color(&cm_id_priv->service_node, &cm.listen_service_table);
cm                697 drivers/infiniband/core/cm.c 	struct rb_node *node = cm.listen_service_table.rb_node;
cm                724 drivers/infiniband/core/cm.c 	struct rb_node **link = &cm.remote_id_table.rb_node;
cm                747 drivers/infiniband/core/cm.c 	rb_insert_color(&timewait_info->remote_id_node, &cm.remote_id_table);
cm                754 drivers/infiniband/core/cm.c 	struct rb_node *node = cm.remote_id_table.rb_node;
cm                777 drivers/infiniband/core/cm.c 	struct rb_node **link = &cm.remote_qp_table.rb_node;
cm                800 drivers/infiniband/core/cm.c 	rb_insert_color(&timewait_info->remote_qp_node, &cm.remote_qp_table);
cm                807 drivers/infiniband/core/cm.c 	struct rb_node **link = &cm.remote_sidr_table.rb_node;
cm                834 drivers/infiniband/core/cm.c 	rb_insert_color(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
cm                874 drivers/infiniband/core/cm.c 	ret = xa_alloc_cyclic_irq(&cm.local_id_table, &id, NULL, xa_limit_32b,
cm                875 drivers/infiniband/core/cm.c 				  &cm.local_id_next, GFP_KERNEL);
cm                878 drivers/infiniband/core/cm.c 	cm_id_priv->id.local_id = (__force __be32)id ^ cm.random_id_operand;
cm                879 drivers/infiniband/core/cm.c 	xa_store_irq(&cm.local_id_table, cm_local_id(cm_id_priv->id.local_id),
cm                937 drivers/infiniband/core/cm.c 		rb_erase(&timewait_info->remote_id_node, &cm.remote_id_table);
cm                942 drivers/infiniband/core/cm.c 		rb_erase(&timewait_info->remote_qp_node, &cm.remote_qp_table);
cm                971 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm                973 drivers/infiniband/core/cm.c 	list_add_tail(&cm_id_priv->timewait_info->list, &cm.timewait_list);
cm                974 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm                985 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm                987 drivers/infiniband/core/cm.c 		queue_delayed_work(cm.wq, &cm_id_priv->timewait_info->work.work,
cm                989 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm               1000 drivers/infiniband/core/cm.c 		spin_lock_irqsave(&cm.lock, flags);
cm               1002 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm.lock, flags);
cm               1020 drivers/infiniband/core/cm.c 		spin_lock_irq(&cm.lock);
cm               1024 drivers/infiniband/core/cm.c 			spin_unlock_irq(&cm.lock);
cm               1027 drivers/infiniband/core/cm.c 		rb_erase(&cm_id_priv->service_node, &cm.listen_service_table);
cm               1028 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               1038 drivers/infiniband/core/cm.c 		spin_lock_irq(&cm.lock);
cm               1041 drivers/infiniband/core/cm.c 				 &cm.remote_sidr_table);
cm               1042 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               1095 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm               1102 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm               1155 drivers/infiniband/core/cm.c 		cm_id->service_id = cpu_to_be64(cm.listen_service_id++);
cm               1176 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm               1178 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm               1214 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm               1225 drivers/infiniband/core/cm.c 			spin_unlock_irqrestore(&cm.lock, flags);
cm               1231 drivers/infiniband/core/cm.c 		spin_unlock_irqrestore(&cm.lock, flags);
cm               1242 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm               1851 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm               1856 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               1871 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               1888 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               1898 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm               2310 drivers/infiniband/core/cm.c 	spin_lock(&cm.lock);
cm               2313 drivers/infiniband/core/cm.c 		spin_unlock(&cm.lock);
cm               2324 drivers/infiniband/core/cm.c 			 &cm.remote_id_table);
cm               2329 drivers/infiniband/core/cm.c 		spin_unlock(&cm.lock);
cm               2347 drivers/infiniband/core/cm.c 	spin_unlock(&cm.lock);
cm               2814 drivers/infiniband/core/cm.c 		spin_lock_irq(&cm.lock);
cm               2818 drivers/infiniband/core/cm.c 			spin_unlock_irq(&cm.lock);
cm               2821 drivers/infiniband/core/cm.c 		cm_id_priv = xa_load(&cm.local_id_table,
cm               2829 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               3434 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm               3436 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm               3579 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm               3582 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               3591 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               3597 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm               3668 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm               3670 drivers/infiniband/core/cm.c 		rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);
cm               3673 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm               3929 drivers/infiniband/core/cm.c 	spin_lock_irqsave(&cm.lock, flags);
cm               3931 drivers/infiniband/core/cm.c 		queue_delayed_work(cm.wq, &work->work, 0);
cm               3936 drivers/infiniband/core/cm.c 	spin_unlock_irqrestore(&cm.lock, flags);
cm               4060 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm               4062 drivers/infiniband/core/cm.c 		queue_delayed_work(cm.wq, &work->work, 0);
cm               4065 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm               4386 drivers/infiniband/core/cm.c 	write_lock_irqsave(&cm.device_lock, flags);
cm               4387 drivers/infiniband/core/cm.c 	list_add_tail(&cm_dev->list, &cm.device_list);
cm               4388 drivers/infiniband/core/cm.c 	write_unlock_irqrestore(&cm.device_lock, flags);
cm               4428 drivers/infiniband/core/cm.c 	write_lock_irqsave(&cm.device_lock, flags);
cm               4430 drivers/infiniband/core/cm.c 	write_unlock_irqrestore(&cm.device_lock, flags);
cm               4432 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm               4434 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm               4443 drivers/infiniband/core/cm.c 		spin_lock_irq(&cm.lock);
cm               4448 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.lock);
cm               4454 drivers/infiniband/core/cm.c 		flush_workqueue(cm.wq);
cm               4455 drivers/infiniband/core/cm.c 		spin_lock_irq(&cm.state_lock);
cm               4458 drivers/infiniband/core/cm.c 		spin_unlock_irq(&cm.state_lock);
cm               4471 drivers/infiniband/core/cm.c 	INIT_LIST_HEAD(&cm.device_list);
cm               4472 drivers/infiniband/core/cm.c 	rwlock_init(&cm.device_lock);
cm               4473 drivers/infiniband/core/cm.c 	spin_lock_init(&cm.lock);
cm               4474 drivers/infiniband/core/cm.c 	spin_lock_init(&cm.state_lock);
cm               4475 drivers/infiniband/core/cm.c 	cm.listen_service_table = RB_ROOT;
cm               4476 drivers/infiniband/core/cm.c 	cm.listen_service_id = be64_to_cpu(IB_CM_ASSIGN_SERVICE_ID);
cm               4477 drivers/infiniband/core/cm.c 	cm.remote_id_table = RB_ROOT;
cm               4478 drivers/infiniband/core/cm.c 	cm.remote_qp_table = RB_ROOT;
cm               4479 drivers/infiniband/core/cm.c 	cm.remote_sidr_table = RB_ROOT;
cm               4480 drivers/infiniband/core/cm.c 	xa_init_flags(&cm.local_id_table, XA_FLAGS_ALLOC | XA_FLAGS_LOCK_IRQ);
cm               4481 drivers/infiniband/core/cm.c 	get_random_bytes(&cm.random_id_operand, sizeof cm.random_id_operand);
cm               4482 drivers/infiniband/core/cm.c 	INIT_LIST_HEAD(&cm.timewait_list);
cm               4490 drivers/infiniband/core/cm.c 	cm.wq = alloc_workqueue("ib_cm", 0, 1);
cm               4491 drivers/infiniband/core/cm.c 	if (!cm.wq) {
cm               4502 drivers/infiniband/core/cm.c 	destroy_workqueue(cm.wq);
cm               4513 drivers/infiniband/core/cm.c 	spin_lock_irq(&cm.lock);
cm               4514 drivers/infiniband/core/cm.c 	list_for_each_entry(timewait_info, &cm.timewait_list, list)
cm               4516 drivers/infiniband/core/cm.c 	spin_unlock_irq(&cm.lock);
cm               4519 drivers/infiniband/core/cm.c 	destroy_workqueue(cm.wq);
cm               4521 drivers/infiniband/core/cm.c 	list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) {
cm               4527 drivers/infiniband/core/cm.c 	WARN_ON(!xa_empty(&cm.local_id_table));
cm                405 drivers/infiniband/ulp/ipoib/ipoib.h 	struct ipoib_cm_dev_priv cm;
cm                448 drivers/infiniband/ulp/ipoib/ipoib.h 	struct ipoib_cm_tx *cm;
cm                641 drivers/infiniband/ulp/ipoib/ipoib.h 	return test_bit(IPOIB_FLAG_OPER_UP, &neigh->cm->flags);
cm                646 drivers/infiniband/ulp/ipoib/ipoib.h 	return neigh->cm;
cm                651 drivers/infiniband/ulp/ipoib/ipoib.h 	neigh->cm = tx;
cm                657 drivers/infiniband/ulp/ipoib/ipoib.h 	return !!priv->cm.srq;
cm                663 drivers/infiniband/ulp/ipoib/ipoib.h 	return priv->cm.max_cm_mtu;
cm                 99 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.rx_wr.wr_id = id | IPOIB_OP_CM | IPOIB_OP_RECV;
cm                101 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	for (i = 0; i < priv->cm.num_frags; ++i)
cm                102 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.rx_sge[i].addr = priv->cm.srq_ring[id].mapping[i];
cm                104 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ret = ib_post_srq_recv(priv->cm.srq, &priv->cm.rx_wr, NULL);
cm                107 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		ipoib_cm_dma_unmap_rx(priv, priv->cm.num_frags - 1,
cm                108 drivers/infiniband/ulp/ipoib/ipoib_cm.c 				      priv->cm.srq_ring[id].mapping);
cm                109 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		dev_kfree_skb_any(priv->cm.srq_ring[id].skb);
cm                110 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.srq_ring[id].skb = NULL;
cm                217 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (list_empty(&priv->cm.rx_flush_list) ||
cm                218 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	    !list_empty(&priv->cm.rx_drain_list))
cm                225 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	p = list_entry(priv->cm.rx_flush_list.next, typeof(*p), list);
cm                230 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	list_splice_init(&priv->cm.rx_flush_list, &priv->cm.rx_drain_list);
cm                243 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	list_move(&p->list, &priv->cm.rx_flush_list);
cm                257 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		.srq = priv->cm.srq,
cm                335 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	for (i = 0; i < priv->cm.num_frags; ++i)
cm                339 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	for (i = 1; i < priv->cm.num_frags; ++i)
cm                344 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	wr->num_sge = priv->cm.num_frags;
cm                373 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (priv->cm.nonsrq_conn_qp >= ipoib_max_conn_qp) {
cm                379 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		++priv->cm.nonsrq_conn_qp;
cm                408 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	--priv->cm.nonsrq_conn_qp;
cm                481 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			   &priv->cm.stale_task, IPOIB_CM_RX_DELAY);
cm                486 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		list_move(&p->list, &priv->cm.passive_ids);
cm                579 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			list_splice_init(&priv->cm.rx_drain_list, &priv->cm.rx_reap_list);
cm                581 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			queue_work(priv->wq, &priv->cm.rx_reap_task);
cm                592 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	rx_ring = has_srq ? priv->cm.srq_ring : p->rx_ring;
cm                606 drivers/infiniband/ulp/ipoib/ipoib_cm.c 				list_move(&p->list, &priv->cm.rx_reap_list);
cm                608 drivers/infiniband/ulp/ipoib/ipoib_cm.c 				queue_work(priv->wq, &priv->cm.rx_reap_task);
cm                621 drivers/infiniband/ulp/ipoib/ipoib_cm.c 				list_move(&p->list, &priv->cm.passive_ids);
cm                686 drivers/infiniband/ulp/ipoib/ipoib_cm.c 							  &priv->cm.rx_wr,
cm                687 drivers/infiniband/ulp/ipoib/ipoib_cm.c 							  priv->cm.rx_sge,
cm                853 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			neigh->cm = NULL;
cm                860 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			list_move(&tx->list, &priv->cm.reap_list);
cm                861 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			queue_work(priv->wq, &priv->cm.reap_task);
cm                880 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.id = ib_create_cm_id(priv->ca, ipoib_cm_rx_handler, dev);
cm                881 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (IS_ERR(priv->cm.id)) {
cm                883 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		ret = PTR_ERR(priv->cm.id);
cm                887 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ret = ib_cm_listen(priv->cm.id, cpu_to_be64(IPOIB_CM_IETF_ID | priv->qp->qp_num),
cm                898 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ib_destroy_cm_id(priv->cm.id);
cm                900 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.id = NULL;
cm                911 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	list_splice_init(&priv->cm.rx_reap_list, &list);
cm                920 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			--priv->cm.nonsrq_conn_qp;
cm                934 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (!IPOIB_CM_SUPPORTED(dev->dev_addr) || !priv->cm.id)
cm                937 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ib_destroy_cm_id(priv->cm.id);
cm                938 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.id = NULL;
cm                941 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	while (!list_empty(&priv->cm.passive_ids)) {
cm                942 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		p = list_entry(priv->cm.passive_ids.next, typeof(*p), list);
cm                943 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		list_move(&p->list, &priv->cm.rx_error_list);
cm                955 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	while (!list_empty(&priv->cm.rx_error_list) ||
cm                956 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	       !list_empty(&priv->cm.rx_flush_list) ||
cm                957 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	       !list_empty(&priv->cm.rx_drain_list)) {
cm                964 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			list_splice_init(&priv->cm.rx_flush_list,
cm                965 drivers/infiniband/ulp/ipoib/ipoib_cm.c 					 &priv->cm.rx_reap_list);
cm                966 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			list_splice_init(&priv->cm.rx_error_list,
cm                967 drivers/infiniband/ulp/ipoib/ipoib_cm.c 					 &priv->cm.rx_reap_list);
cm                968 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			list_splice_init(&priv->cm.rx_drain_list,
cm                969 drivers/infiniband/ulp/ipoib/ipoib_cm.c 					 &priv->cm.rx_reap_list);
cm                982 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	cancel_delayed_work(&priv->cm.stale_task);
cm               1063 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		.srq			= priv->cm.srq,
cm               1284 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			neigh->cm = NULL;
cm               1291 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			list_move(&tx->list, &priv->cm.reap_list);
cm               1292 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			queue_work(priv->wq, &priv->cm.reap_task);
cm               1315 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	neigh->cm = tx;
cm               1318 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	list_add(&tx->list, &priv->cm.start_list);
cm               1320 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	queue_work(priv->wq, &priv->cm.start_task);
cm               1330 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		list_move(&tx->list, &priv->cm.reap_list);
cm               1331 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		queue_work(priv->wq, &priv->cm.reap_task);
cm               1344 drivers/infiniband/ulp/ipoib/ipoib_cm.c 						   cm.start_task);
cm               1358 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	while (!list_empty(&priv->cm.start_list)) {
cm               1359 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		p = list_entry(priv->cm.start_list.next, typeof(*p), list);
cm               1389 drivers/infiniband/ulp/ipoib/ipoib_cm.c 				neigh->cm = NULL;
cm               1404 drivers/infiniband/ulp/ipoib/ipoib_cm.c 						   cm.reap_task);
cm               1412 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	while (!list_empty(&priv->cm.reap_list)) {
cm               1413 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		p = list_entry(priv->cm.reap_list.next, typeof(*p), list);
cm               1429 drivers/infiniband/ulp/ipoib/ipoib_cm.c 						   cm.skb_task);
cm               1438 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	while ((skb = skb_dequeue(&priv->cm.skb_queue))) {
cm               1466 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	int e = skb_queue_empty(&priv->cm.skb_queue);
cm               1470 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	skb_queue_tail(&priv->cm.skb_queue, skb);
cm               1472 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		queue_work(priv->wq, &priv->cm.skb_task);
cm               1478 drivers/infiniband/ulp/ipoib/ipoib_cm.c 						cm.rx_reap_task)->dev);
cm               1484 drivers/infiniband/ulp/ipoib/ipoib_cm.c 						   cm.stale_task.work);
cm               1489 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	while (!list_empty(&priv->cm.passive_ids)) {
cm               1492 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		p = list_entry(priv->cm.passive_ids.prev, typeof(*p), list);
cm               1495 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		list_move(&p->list, &priv->cm.rx_error_list);
cm               1504 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (!list_empty(&priv->cm.passive_ids))
cm               1506 drivers/infiniband/ulp/ipoib/ipoib_cm.c 				   &priv->cm.stale_task, IPOIB_CM_RX_DELAY);
cm               1567 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.srq = ib_create_srq(priv->pd, &srq_init_attr);
cm               1568 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (IS_ERR(priv->cm.srq)) {
cm               1569 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		if (PTR_ERR(priv->cm.srq) != -EOPNOTSUPP)
cm               1571 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			       priv->ca->name, PTR_ERR(priv->cm.srq));
cm               1572 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.srq = NULL;
cm               1576 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.srq_ring = vzalloc(array_size(ipoib_recvq_size,
cm               1577 drivers/infiniband/ulp/ipoib/ipoib_cm.c 					       sizeof(*priv->cm.srq_ring)));
cm               1578 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (!priv->cm.srq_ring) {
cm               1579 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		ib_destroy_srq(priv->cm.srq);
cm               1580 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.srq = NULL;
cm               1591 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_LIST_HEAD(&priv->cm.passive_ids);
cm               1592 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_LIST_HEAD(&priv->cm.reap_list);
cm               1593 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_LIST_HEAD(&priv->cm.start_list);
cm               1594 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_LIST_HEAD(&priv->cm.rx_error_list);
cm               1595 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_LIST_HEAD(&priv->cm.rx_flush_list);
cm               1596 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_LIST_HEAD(&priv->cm.rx_drain_list);
cm               1597 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_LIST_HEAD(&priv->cm.rx_reap_list);
cm               1598 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_WORK(&priv->cm.start_task, ipoib_cm_tx_start);
cm               1599 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_WORK(&priv->cm.reap_task, ipoib_cm_tx_reap);
cm               1600 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_WORK(&priv->cm.skb_task, ipoib_cm_skb_reap);
cm               1601 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_WORK(&priv->cm.rx_reap_task, ipoib_cm_rx_reap);
cm               1602 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	INIT_DELAYED_WORK(&priv->cm.stale_task, ipoib_cm_stale_task);
cm               1604 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	skb_queue_head_init(&priv->cm.skb_queue);
cm               1611 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.max_cm_mtu = max_srq_sge * PAGE_SIZE - 0x10;
cm               1612 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.num_frags  = max_srq_sge;
cm               1614 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			  priv->cm.max_cm_mtu, priv->cm.num_frags);
cm               1616 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.max_cm_mtu = IPOIB_CM_MTU;
cm               1617 drivers/infiniband/ulp/ipoib/ipoib_cm.c 		priv->cm.num_frags  = IPOIB_CM_RX_SG;
cm               1620 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ipoib_cm_init_rx_wr(dev, &priv->cm.rx_wr, priv->cm.rx_sge);
cm               1624 drivers/infiniband/ulp/ipoib/ipoib_cm.c 			if (!ipoib_cm_alloc_rx_skb(dev, priv->cm.srq_ring, i,
cm               1625 drivers/infiniband/ulp/ipoib/ipoib_cm.c 						   priv->cm.num_frags - 1,
cm               1626 drivers/infiniband/ulp/ipoib/ipoib_cm.c 						   priv->cm.srq_ring[i].mapping,
cm               1652 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (!priv->cm.srq)
cm               1657 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ret = ib_destroy_srq(priv->cm.srq);
cm               1661 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.srq = NULL;
cm               1662 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	if (!priv->cm.srq_ring)
cm               1665 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	ipoib_cm_free_rx_ring(dev, priv->cm.srq_ring);
cm               1666 drivers/infiniband/ulp/ipoib/ipoib_cm.c 	priv->cm.srq_ring = NULL;
cm                 61 drivers/input/misc/yealink.c #define _SEG(t, a, am, b, bm, c, cm, d, dm, e, em, f, fm, g, gm)	\
cm                 63 drivers/input/misc/yealink.c 	  .u = { .s = {	_LOC(a, am), _LOC(b, bm), _LOC(c, cm),		\
cm                107 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 	void __iomem *cm;
cm                171 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 	inst->reg_base.cm = mtk_vcodec_get_reg_addr(inst->ctx, VDEC_CM);
cm                184 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 	void __iomem *cm = inst->reg_base.cm;
cm                192 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 			writel(val, cm + VP8_HW_VLD_ADDR);
cm                195 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 			writel(val, cm + VP8_HW_VLD_VALUE);
cm                205 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 	void __iomem *cm = inst->reg_base.cm;
cm                213 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 			writel(val, cm + VP8_HW_VLD_ADDR);
cm                215 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 			val = readl(cm + VP8_HW_VLD_VALUE);
cm                251 drivers/media/platform/ti-vpe/cal.c 	struct cm_data		*cm;
cm                366 drivers/media/platform/ti-vpe/cal.c 	struct cm_data *cm;
cm                368 drivers/media/platform/ti-vpe/cal.c 	cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
cm                369 drivers/media/platform/ti-vpe/cal.c 	if (!cm)
cm                372 drivers/media/platform/ti-vpe/cal.c 	cm->res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
cm                374 drivers/media/platform/ti-vpe/cal.c 	cm->base = devm_ioremap_resource(&pdev->dev, cm->res);
cm                375 drivers/media/platform/ti-vpe/cal.c 	if (IS_ERR(cm->base)) {
cm                377 drivers/media/platform/ti-vpe/cal.c 		return ERR_CAST(cm->base);
cm                381 drivers/media/platform/ti-vpe/cal.c 		cm->res->name, &cm->res->start, &cm->res->end);
cm                383 drivers/media/platform/ti-vpe/cal.c 	return cm;
cm                390 drivers/media/platform/ti-vpe/cal.c 	if (!ctx->dev->cm->base) {
cm                395 drivers/media/platform/ti-vpe/cal.c 	val = reg_read(ctx->dev->cm, CM_CTRL_CORE_CAMERRX_CONTROL);
cm                409 drivers/media/platform/ti-vpe/cal.c 	reg_write(ctx->dev->cm, CM_CTRL_CORE_CAMERRX_CONTROL, val);
cm                416 drivers/media/platform/ti-vpe/cal.c 	if (!ctx->dev->cm->base) {
cm                421 drivers/media/platform/ti-vpe/cal.c 	val = reg_read(ctx->dev->cm, CM_CTRL_CORE_CAMERRX_CONTROL);
cm                426 drivers/media/platform/ti-vpe/cal.c 	reg_write(ctx->dev->cm, CM_CTRL_CORE_CAMERRX_CONTROL, val);
cm                511 drivers/media/platform/ti-vpe/cal.c 		 &dev->cm->res->start);
cm                513 drivers/media/platform/ti-vpe/cal.c 		       (__force const void *)dev->cm->base,
cm                514 drivers/media/platform/ti-vpe/cal.c 		       resource_size(dev->cm->res), false);
cm               1847 drivers/media/platform/ti-vpe/cal.c 	dev->cm = cm_create(dev);
cm               1848 drivers/media/platform/ti-vpe/cal.c 	if (IS_ERR(dev->cm))
cm               1849 drivers/media/platform/ti-vpe/cal.c 		return PTR_ERR(dev->cm);
cm               2064 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	const struct pvr2_string_table *cm;
cm               2068 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	cm = &hdw->hdw_desc->client_modules;
cm               2069 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 	for (idx = 0; idx < cm->cnt; idx++) {
cm               2070 drivers/media/usb/pvrusb2/pvrusb2-hdw.c 		request_module(cm->lst[idx]);
cm                352 drivers/media/usb/pwc/pwc-dec23.c 	const unsigned char *cm = pwc_crop_table+MAX_OUTER_CROP_VALUE;
cm                356 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[0] >> scalebits];
cm                357 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[1] >> scalebits];
cm                358 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[2] >> scalebits];
cm                359 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[3] >> scalebits];
cm                362 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[4] >> scalebits];
cm                363 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[5] >> scalebits];
cm                364 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[6] >> scalebits];
cm                365 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[7] >> scalebits];
cm                368 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[8] >> scalebits];
cm                369 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[9] >> scalebits];
cm                370 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[10] >> scalebits];
cm                371 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[11] >> scalebits];
cm                374 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[12] >> scalebits];
cm                375 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[13] >> scalebits];
cm                376 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[14] >> scalebits];
cm                377 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[15] >> scalebits];
cm                407 drivers/media/usb/pwc/pwc-dec23.c 	const unsigned char *cm = pwc_crop_table+MAX_OUTER_CROP_VALUE;
cm                411 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[0] >> scalebits];
cm                412 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[4] >> scalebits];
cm                413 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[1] >> scalebits];
cm                414 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[5] >> scalebits];
cm                415 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[2] >> scalebits];
cm                416 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[6] >> scalebits];
cm                417 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[3] >> scalebits];
cm                418 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[7] >> scalebits];
cm                421 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[12] >> scalebits];
cm                422 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[8] >> scalebits];
cm                423 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[13] >> scalebits];
cm                424 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[9] >> scalebits];
cm                425 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[14] >> scalebits];
cm                426 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[10] >> scalebits];
cm                427 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[15] >> scalebits];
cm                428 drivers/media/usb/pwc/pwc-dec23.c 	*d++ = cm[c[11] >> scalebits];
cm                157 drivers/net/arcnet/com20020-pci.c 		struct com20020_pci_channel_map *cm = &ci->chan_map_tbl[i];
cm                173 drivers/net/arcnet/com20020-pci.c 		ioaddr = pci_resource_start(pdev, cm->bar) + cm->offset;
cm                175 drivers/net/arcnet/com20020-pci.c 		r = devm_request_region(&pdev->dev, ioaddr, cm->size,
cm                179 drivers/net/arcnet/com20020-pci.c 			       ioaddr, ioaddr + cm->size - 1);
cm                905 drivers/net/can/dev.c 		struct can_ctrlmode *cm = nla_data(data[IFLA_CAN_CTRLMODE]);
cm                907 drivers/net/can/dev.c 		is_can_fd = cm->flags & cm->mask & CAN_CTRLMODE_FD;
cm                973 drivers/net/can/dev.c 		struct can_ctrlmode *cm;
cm                980 drivers/net/can/dev.c 		cm = nla_data(data[IFLA_CAN_CTRLMODE]);
cm                982 drivers/net/can/dev.c 		maskedflags = cm->flags & cm->mask;
cm                985 drivers/net/can/dev.c 		if (cm->mask & ~(priv->ctrlmode_supported | ctrlstatic))
cm                997 drivers/net/can/dev.c 		priv->ctrlmode &= ~cm->mask;
cm               1128 drivers/net/can/dev.c 	struct can_ctrlmode cm = {.flags = priv->ctrlmode};
cm               1145 drivers/net/can/dev.c 	    nla_put(skb, IFLA_CAN_CTRLMODE, sizeof(cm), &cm) ||
cm                670 drivers/net/can/sja1000/plx_pci.c 		struct plx_pci_channel_map *cm = &ci->chan_map_tbl[i];
cm                689 drivers/net/can/sja1000/plx_pci.c 		addr = pci_iomap(pdev, cm->bar, cm->size);
cm                692 drivers/net/can/sja1000/plx_pci.c 			dev_err(&pdev->dev, "Failed to remap BAR%d\n", cm->bar);
cm                696 drivers/net/can/sja1000/plx_pci.c 		priv->reg_base = addr + cm->offset;
cm                247 drivers/net/ethernet/chelsio/cxgb3/adapter.h 	struct mc7 cm;
cm               2462 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 			mem = &adapter->cm;
cm               3170 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 			       adap->name, t3_mc7_size(&adap->cm) >> 20,
cm                316 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 			mem = &adapter->cm;
cm               1942 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c 		mc7_intr_handler(&adapter->cm);
cm               3388 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c 		    mc7_init(&adapter->cm, vpd->mclk, vpd->mem_timing) ||
cm               3694 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c 		mc7_prep(adapter, &adapter->cm, MC7_CM_BASE_ADDR, "CM");
cm               3699 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c 		p->cm_size = t3_mc7_size(&adapter->cm);
cm               3712 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c 				  t3_mc7_size(&adapter->cm);
cm                202 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	struct mlxsw_sp_sb_cm *cm;
cm                216 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		cm = mlxsw_sp_sb_cm_get(mlxsw_sp, local_port, pg_buff,
cm                218 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		cm->min_buff = min_buff;
cm                219 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		cm->max_buff = max_buff;
cm                220 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		cm->pool_index = pool_index;
cm                648 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		const struct mlxsw_sp_sb_cm *cm;
cm                654 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		cm = &cms[i];
cm                655 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		if (WARN_ON(sb_vals->pool_dess[cm->pool_index].dir != dir))
cm                658 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		min_buff = mlxsw_sp_bytes_cells(mlxsw_sp, cm->min_buff);
cm                659 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		max_buff = cm->max_buff;
cm                663 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 						   true, cm->pool_index);
cm                666 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 						       cm->pool_index))
cm                671 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 						   false, cm->pool_index);
cm               1121 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	struct mlxsw_sp_sb_cm *cm = mlxsw_sp_sb_cm_get(mlxsw_sp, local_port,
cm               1124 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	*p_threshold = mlxsw_sp_sb_threshold_out(mlxsw_sp, cm->pool_index,
cm               1125 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 						 cm->max_buff);
cm               1126 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	*p_pool_index = cm->pool_index;
cm               1140 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	const struct mlxsw_sp_sb_cm *cm;
cm               1157 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		cm = &mlxsw_sp->sb_vals->cms_ingress[tc_index];
cm               1159 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 		cm = &mlxsw_sp->sb_vals->cms_egress[tc_index];
cm               1161 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	if (cm->freeze_pool && cm->pool_index != pool_index) {
cm               1166 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	if (cm->freeze_thresh && cm->max_buff != threshold) {
cm               1198 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	struct mlxsw_sp_sb_cm *cm;
cm               1214 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 			cm = mlxsw_sp_sb_cm_get(mlxsw_sp, local_port, i,
cm               1217 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 						  &cm->occ.cur, &cm->occ.max);
cm               1228 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 			cm = mlxsw_sp_sb_cm_get(mlxsw_sp, local_port, i,
cm               1231 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 						  &cm->occ.cur, &cm->occ.max);
cm               1395 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	struct mlxsw_sp_sb_cm *cm = mlxsw_sp_sb_cm_get(mlxsw_sp, local_port,
cm               1398 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	*p_cur = mlxsw_sp_cells_bytes(mlxsw_sp, cm->occ.cur);
cm               1399 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c 	*p_max = mlxsw_sp_cells_bytes(mlxsw_sp, cm->occ.max);
cm                430 drivers/net/ethernet/ti/netcp_xgbepcsr.c 					     int lane, int cm, int c1, int c2)
cm               4481 drivers/net/wireless/ath/ath10k/mac.c static void ath10k_check_chain_mask(struct ath10k *ar, u32 cm, const char *dbg)
cm               4487 drivers/net/wireless/ath/ath10k/mac.c 	if (cm == 15 || cm == 7 || cm == 3 || cm == 1 || cm == 0)
cm               4491 drivers/net/wireless/ath/ath10k/mac.c 		    dbg, cm);
cm               3392 drivers/net/wireless/ath/ath6kl/wmi.c 	struct wmi_connect_cmd *cm;
cm               3395 drivers/net/wireless/ath/ath6kl/wmi.c 	skb = ath6kl_wmi_get_new_buf(sizeof(*cm));
cm               3399 drivers/net/wireless/ath/ath6kl/wmi.c 	cm = (struct wmi_connect_cmd *) skb->data;
cm               3400 drivers/net/wireless/ath/ath6kl/wmi.c 	memcpy(cm, p, sizeof(*cm));
cm               3415 drivers/net/wireless/ath/ath6kl/wmi.c 	struct wmi_ap_set_mlme_cmd *cm;
cm               3417 drivers/net/wireless/ath/ath6kl/wmi.c 	skb = ath6kl_wmi_get_new_buf(sizeof(*cm));
cm               3421 drivers/net/wireless/ath/ath6kl/wmi.c 	cm = (struct wmi_ap_set_mlme_cmd *) skb->data;
cm               3422 drivers/net/wireless/ath/ath6kl/wmi.c 	memcpy(cm->mac, mac, ETH_ALEN);
cm               3423 drivers/net/wireless/ath/ath6kl/wmi.c 	cm->reason = cpu_to_le16(reason);
cm               3424 drivers/net/wireless/ath/ath6kl/wmi.c 	cm->cmd = cmd;
cm               3426 drivers/net/wireless/ath/ath6kl/wmi.c 	ath6kl_dbg(ATH6KL_DBG_WMI, "ap_set_mlme: cmd=%d reason=%d\n", cm->cmd,
cm               3427 drivers/net/wireless/ath/ath6kl/wmi.c 		   cm->reason);
cm                 82 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 	u32 cm;
cm                193 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 	cfg->cm = numerator;
cm                195 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 	if (cfg->cm < 16 || cfg->cm > 255 ||
cm                199 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 			cfg->cm, cfg->cn, cfg->co);
cm                305 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 	if (priv->cfg.cm < 16 || priv->cfg.cm > 255 ||
cm                309 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 			priv->cfg.cm, priv->cfg.cn, priv->cfg.co);
cm                313 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 		priv->cfg.cm, priv->cfg.cn, priv->cfg.co);
cm                314 drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c 	phy_write(phy, CM(priv->cfg.cm), DPHY_CM);
cm                207 drivers/platform/x86/eeepc-laptop.c static int set_acpi(struct eeepc_laptop *eeepc, int cm, int value)
cm                209 drivers/platform/x86/eeepc-laptop.c 	const char *method = cm_setv[cm];
cm                213 drivers/platform/x86/eeepc-laptop.c 	if ((eeepc->cm_supported & (0x1 << cm)) == 0)
cm                221 drivers/platform/x86/eeepc-laptop.c static int get_acpi(struct eeepc_laptop *eeepc, int cm)
cm                223 drivers/platform/x86/eeepc-laptop.c 	const char *method = cm_getv[cm];
cm                228 drivers/platform/x86/eeepc-laptop.c 	if ((eeepc->cm_supported & (0x1 << cm)) == 0)
cm                236 drivers/platform/x86/eeepc-laptop.c static int acpi_setter_handle(struct eeepc_laptop *eeepc, int cm,
cm                239 drivers/platform/x86/eeepc-laptop.c 	const char *method = cm_setv[cm];
cm                244 drivers/platform/x86/eeepc-laptop.c 	if ((eeepc->cm_supported & (0x1 << cm)) == 0)
cm                267 drivers/platform/x86/eeepc-laptop.c static ssize_t store_sys_acpi(struct device *dev, int cm,
cm                276 drivers/platform/x86/eeepc-laptop.c 	rv = set_acpi(eeepc, cm, value);
cm                282 drivers/platform/x86/eeepc-laptop.c static ssize_t show_sys_acpi(struct device *dev, int cm, char *buf)
cm                285 drivers/platform/x86/eeepc-laptop.c 	int value = get_acpi(eeepc, cm);
cm                770 drivers/platform/x86/eeepc-laptop.c 			    enum rfkill_type type, int cm)
cm                775 drivers/platform/x86/eeepc-laptop.c 	result = acpi_setter_handle(eeepc, cm, &handle);
cm                785 drivers/platform/x86/eeepc-laptop.c 	rfkill_init_sw_state(*rfkill, get_acpi(eeepc, cm) != 1);
cm               1299 drivers/platform/x86/eeepc-laptop.c static void cmsg_quirk(struct eeepc_laptop *eeepc, int cm, const char *name)
cm               1305 drivers/platform/x86/eeepc-laptop.c 	if (!(eeepc->cm_supported & (1 << cm))
cm               1306 drivers/platform/x86/eeepc-laptop.c 	    && !read_acpi_int(eeepc->handle, cm_getv[cm], &dummy)) {
cm               1308 drivers/platform/x86/eeepc-laptop.c 			name, 1 << cm);
cm               1309 drivers/platform/x86/eeepc-laptop.c 		eeepc->cm_supported |= 1 << cm;
cm                 86 drivers/power/supply/charger-manager.c static bool is_batt_present(struct charger_manager *cm)
cm                 93 drivers/power/supply/charger-manager.c 	switch (cm->desc->battery_present) {
cm                100 drivers/power/supply/charger-manager.c 		psy = power_supply_get_by_name(cm->desc->psy_fuel_gauge);
cm                111 drivers/power/supply/charger-manager.c 		for (i = 0; cm->desc->psy_charger_stat[i]; i++) {
cm                113 drivers/power/supply/charger-manager.c 					cm->desc->psy_charger_stat[i]);
cm                115 drivers/power/supply/charger-manager.c 				dev_err(cm->dev, "Cannot find power supply \"%s\"\n",
cm                116 drivers/power/supply/charger-manager.c 					cm->desc->psy_charger_stat[i]);
cm                142 drivers/power/supply/charger-manager.c static bool is_ext_pwr_online(struct charger_manager *cm)
cm                150 drivers/power/supply/charger-manager.c 	for (i = 0; cm->desc->psy_charger_stat[i]; i++) {
cm                151 drivers/power/supply/charger-manager.c 		psy = power_supply_get_by_name(cm->desc->psy_charger_stat[i]);
cm                153 drivers/power/supply/charger-manager.c 			dev_err(cm->dev, "Cannot find power supply \"%s\"\n",
cm                154 drivers/power/supply/charger-manager.c 					cm->desc->psy_charger_stat[i]);
cm                178 drivers/power/supply/charger-manager.c static int get_batt_uV(struct charger_manager *cm, int *uV)
cm                184 drivers/power/supply/charger-manager.c 	fuel_gauge = power_supply_get_by_name(cm->desc->psy_fuel_gauge);
cm                202 drivers/power/supply/charger-manager.c static bool is_charging(struct charger_manager *cm)
cm                210 drivers/power/supply/charger-manager.c 	if (!is_batt_present(cm))
cm                214 drivers/power/supply/charger-manager.c 	for (i = 0; cm->desc->psy_charger_stat[i]; i++) {
cm                216 drivers/power/supply/charger-manager.c 		if (cm->emergency_stop)
cm                218 drivers/power/supply/charger-manager.c 		if (!cm->charger_enabled)
cm                221 drivers/power/supply/charger-manager.c 		psy = power_supply_get_by_name(cm->desc->psy_charger_stat[i]);
cm                223 drivers/power/supply/charger-manager.c 			dev_err(cm->dev, "Cannot find power supply \"%s\"\n",
cm                224 drivers/power/supply/charger-manager.c 					cm->desc->psy_charger_stat[i]);
cm                232 drivers/power/supply/charger-manager.c 			dev_warn(cm->dev, "Cannot read ONLINE value from %s\n",
cm                233 drivers/power/supply/charger-manager.c 				 cm->desc->psy_charger_stat[i]);
cm                250 drivers/power/supply/charger-manager.c 			dev_warn(cm->dev, "Cannot read STATUS value from %s\n",
cm                251 drivers/power/supply/charger-manager.c 				 cm->desc->psy_charger_stat[i]);
cm                271 drivers/power/supply/charger-manager.c static bool is_full_charged(struct charger_manager *cm)
cm                273 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm                281 drivers/power/supply/charger-manager.c 	if (!is_batt_present(cm))
cm                284 drivers/power/supply/charger-manager.c 	fuel_gauge = power_supply_get_by_name(cm->desc->psy_fuel_gauge);
cm                302 drivers/power/supply/charger-manager.c 		ret = get_batt_uV(cm, &uV);
cm                330 drivers/power/supply/charger-manager.c static bool is_polling_required(struct charger_manager *cm)
cm                332 drivers/power/supply/charger-manager.c 	switch (cm->desc->polling_mode) {
cm                338 drivers/power/supply/charger-manager.c 		return is_ext_pwr_online(cm);
cm                340 drivers/power/supply/charger-manager.c 		return is_charging(cm);
cm                342 drivers/power/supply/charger-manager.c 		dev_warn(cm->dev, "Incorrect polling_mode (%d)\n",
cm                343 drivers/power/supply/charger-manager.c 			 cm->desc->polling_mode);
cm                359 drivers/power/supply/charger-manager.c static int try_charger_enable(struct charger_manager *cm, bool enable)
cm                362 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm                365 drivers/power/supply/charger-manager.c 	if (enable == cm->charger_enabled)
cm                369 drivers/power/supply/charger-manager.c 		if (cm->emergency_stop)
cm                376 drivers/power/supply/charger-manager.c 		cm->charging_start_time = ktime_to_ms(ktime_get());
cm                377 drivers/power/supply/charger-manager.c 		cm->charging_end_time = 0;
cm                385 drivers/power/supply/charger-manager.c 				dev_warn(cm->dev, "Cannot enable %s regulator\n",
cm                394 drivers/power/supply/charger-manager.c 		cm->charging_start_time = 0;
cm                395 drivers/power/supply/charger-manager.c 		cm->charging_end_time = ktime_to_ms(ktime_get());
cm                403 drivers/power/supply/charger-manager.c 				dev_warn(cm->dev, "Cannot disable %s regulator\n",
cm                417 drivers/power/supply/charger-manager.c 				dev_warn(cm->dev, "Disable regulator(%s) forcibly\n",
cm                424 drivers/power/supply/charger-manager.c 		cm->charger_enabled = enable;
cm                435 drivers/power/supply/charger-manager.c static int try_charger_restart(struct charger_manager *cm)
cm                439 drivers/power/supply/charger-manager.c 	if (cm->emergency_stop)
cm                442 drivers/power/supply/charger-manager.c 	err = try_charger_enable(cm, false);
cm                446 drivers/power/supply/charger-manager.c 	return try_charger_enable(cm, true);
cm                461 drivers/power/supply/charger-manager.c static void uevent_notify(struct charger_manager *cm, const char *event)
cm                487 drivers/power/supply/charger-manager.c 		kobject_uevent(&cm->dev->kobj, KOBJ_CHANGE);
cm                499 drivers/power/supply/charger-manager.c 	kobject_uevent(&cm->dev->kobj, KOBJ_CHANGE);
cm                501 drivers/power/supply/charger-manager.c 	dev_info(cm->dev, "%s\n", event);
cm                516 drivers/power/supply/charger-manager.c 	struct charger_manager *cm = container_of(dwork,
cm                518 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm                522 drivers/power/supply/charger-manager.c 	cm->fullbatt_vchk_jiffies_at = 0;
cm                527 drivers/power/supply/charger-manager.c 	err = get_batt_uV(cm, &batt_uV);
cm                529 drivers/power/supply/charger-manager.c 		dev_err(cm->dev, "%s: get_batt_uV error(%d)\n", __func__, err);
cm                537 drivers/power/supply/charger-manager.c 	dev_info(cm->dev, "VBATT dropped %duV after full-batt\n", diff);
cm                540 drivers/power/supply/charger-manager.c 		try_charger_restart(cm);
cm                541 drivers/power/supply/charger-manager.c 		uevent_notify(cm, "Recharging");
cm                555 drivers/power/supply/charger-manager.c static int check_charging_duration(struct charger_manager *cm)
cm                557 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm                566 drivers/power/supply/charger-manager.c 	if (cm->charger_enabled) {
cm                567 drivers/power/supply/charger-manager.c 		duration = curr - cm->charging_start_time;
cm                570 drivers/power/supply/charger-manager.c 			dev_info(cm->dev, "Charging duration exceed %ums\n",
cm                572 drivers/power/supply/charger-manager.c 			uevent_notify(cm, "Discharging");
cm                573 drivers/power/supply/charger-manager.c 			try_charger_enable(cm, false);
cm                576 drivers/power/supply/charger-manager.c 	} else if (is_ext_pwr_online(cm) && !cm->charger_enabled) {
cm                577 drivers/power/supply/charger-manager.c 		duration = curr - cm->charging_end_time;
cm                580 drivers/power/supply/charger-manager.c 				is_ext_pwr_online(cm)) {
cm                581 drivers/power/supply/charger-manager.c 			dev_info(cm->dev, "Discharging duration exceed %ums\n",
cm                583 drivers/power/supply/charger-manager.c 			uevent_notify(cm, "Recharging");
cm                584 drivers/power/supply/charger-manager.c 			try_charger_enable(cm, true);
cm                592 drivers/power/supply/charger-manager.c static int cm_get_battery_temperature_by_psy(struct charger_manager *cm,
cm                598 drivers/power/supply/charger-manager.c 	fuel_gauge = power_supply_get_by_name(cm->desc->psy_fuel_gauge);
cm                610 drivers/power/supply/charger-manager.c static int cm_get_battery_temperature(struct charger_manager *cm,
cm                615 drivers/power/supply/charger-manager.c 	if (!cm->desc->measure_battery_temp)
cm                619 drivers/power/supply/charger-manager.c 	if (cm->tzd_batt) {
cm                620 drivers/power/supply/charger-manager.c 		ret = thermal_zone_get_temp(cm->tzd_batt, temp);
cm                628 drivers/power/supply/charger-manager.c 		ret = cm_get_battery_temperature_by_psy(cm, temp);
cm                634 drivers/power/supply/charger-manager.c static int cm_check_thermal_status(struct charger_manager *cm)
cm                636 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm                640 drivers/power/supply/charger-manager.c 	ret = cm_get_battery_temperature(cm, &temp);
cm                647 drivers/power/supply/charger-manager.c 		dev_err(cm->dev, "Failed to get battery temperature\n");
cm                654 drivers/power/supply/charger-manager.c 	if (cm->emergency_stop) {
cm                674 drivers/power/supply/charger-manager.c static bool _cm_monitor(struct charger_manager *cm)
cm                678 drivers/power/supply/charger-manager.c 	temp_alrt = cm_check_thermal_status(cm);
cm                681 drivers/power/supply/charger-manager.c 	if (temp_alrt && cm->emergency_stop)
cm                689 drivers/power/supply/charger-manager.c 		cm->emergency_stop = temp_alrt;
cm                690 drivers/power/supply/charger-manager.c 		if (!try_charger_enable(cm, false))
cm                691 drivers/power/supply/charger-manager.c 			uevent_notify(cm, default_event_names[temp_alrt]);
cm                697 drivers/power/supply/charger-manager.c 	} else if (!cm->emergency_stop && check_charging_duration(cm)) {
cm                698 drivers/power/supply/charger-manager.c 		dev_dbg(cm->dev,
cm                705 drivers/power/supply/charger-manager.c 	} else if (!cm->emergency_stop && is_ext_pwr_online(cm) &&
cm                706 drivers/power/supply/charger-manager.c 			!cm->charger_enabled) {
cm                707 drivers/power/supply/charger-manager.c 		fullbatt_vchk(&cm->fullbatt_vchk_work.work);
cm                713 drivers/power/supply/charger-manager.c 	} else if (!cm->emergency_stop && is_full_charged(cm) &&
cm                714 drivers/power/supply/charger-manager.c 			cm->charger_enabled) {
cm                715 drivers/power/supply/charger-manager.c 		dev_info(cm->dev, "EVENT_HANDLE: Battery Fully Charged\n");
cm                716 drivers/power/supply/charger-manager.c 		uevent_notify(cm, default_event_names[CM_EVENT_BATT_FULL]);
cm                718 drivers/power/supply/charger-manager.c 		try_charger_enable(cm, false);
cm                720 drivers/power/supply/charger-manager.c 		fullbatt_vchk(&cm->fullbatt_vchk_work.work);
cm                722 drivers/power/supply/charger-manager.c 		cm->emergency_stop = 0;
cm                723 drivers/power/supply/charger-manager.c 		if (is_ext_pwr_online(cm)) {
cm                724 drivers/power/supply/charger-manager.c 			if (!try_charger_enable(cm, true))
cm                725 drivers/power/supply/charger-manager.c 				uevent_notify(cm, "CHARGING");
cm                741 drivers/power/supply/charger-manager.c 	struct charger_manager *cm;
cm                745 drivers/power/supply/charger-manager.c 	list_for_each_entry(cm, &cm_list, entry) {
cm                746 drivers/power/supply/charger-manager.c 		if (_cm_monitor(cm))
cm                762 drivers/power/supply/charger-manager.c 	struct charger_manager *cm;
cm                768 drivers/power/supply/charger-manager.c 	list_for_each_entry(cm, &cm_list, entry) {
cm                769 drivers/power/supply/charger-manager.c 		if (is_polling_required(cm) && cm->desc->polling_interval_ms) {
cm                772 drivers/power/supply/charger-manager.c 			if (min > cm->desc->polling_interval_ms)
cm                773 drivers/power/supply/charger-manager.c 				min = cm->desc->polling_interval_ms;
cm                826 drivers/power/supply/charger-manager.c static void fullbatt_handler(struct charger_manager *cm)
cm                828 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm                834 drivers/power/supply/charger-manager.c 		device_set_wakeup_capable(cm->dev, true);
cm                836 drivers/power/supply/charger-manager.c 	mod_delayed_work(cm_wq, &cm->fullbatt_vchk_work,
cm                838 drivers/power/supply/charger-manager.c 	cm->fullbatt_vchk_jiffies_at = jiffies + msecs_to_jiffies(
cm                841 drivers/power/supply/charger-manager.c 	if (cm->fullbatt_vchk_jiffies_at == 0)
cm                842 drivers/power/supply/charger-manager.c 		cm->fullbatt_vchk_jiffies_at = 1;
cm                845 drivers/power/supply/charger-manager.c 	dev_info(cm->dev, "EVENT_HANDLE: Battery Fully Charged\n");
cm                846 drivers/power/supply/charger-manager.c 	uevent_notify(cm, default_event_names[CM_EVENT_BATT_FULL]);
cm                853 drivers/power/supply/charger-manager.c static void battout_handler(struct charger_manager *cm)
cm                856 drivers/power/supply/charger-manager.c 		device_set_wakeup_capable(cm->dev, true);
cm                858 drivers/power/supply/charger-manager.c 	if (!is_batt_present(cm)) {
cm                859 drivers/power/supply/charger-manager.c 		dev_emerg(cm->dev, "Battery Pulled Out!\n");
cm                860 drivers/power/supply/charger-manager.c 		uevent_notify(cm, default_event_names[CM_EVENT_BATT_OUT]);
cm                862 drivers/power/supply/charger-manager.c 		uevent_notify(cm, "Battery Reinserted?");
cm                871 drivers/power/supply/charger-manager.c static void misc_event_handler(struct charger_manager *cm,
cm                875 drivers/power/supply/charger-manager.c 		device_set_wakeup_capable(cm->dev, true);
cm                877 drivers/power/supply/charger-manager.c 	if (is_polling_required(cm) && cm->desc->polling_interval_ms)
cm                879 drivers/power/supply/charger-manager.c 	uevent_notify(cm, default_event_names[type]);
cm                886 drivers/power/supply/charger-manager.c 	struct charger_manager *cm = power_supply_get_drvdata(psy);
cm                887 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm                894 drivers/power/supply/charger-manager.c 		if (is_charging(cm))
cm                896 drivers/power/supply/charger-manager.c 		else if (is_ext_pwr_online(cm))
cm                902 drivers/power/supply/charger-manager.c 		if (cm->emergency_stop > 0)
cm                904 drivers/power/supply/charger-manager.c 		else if (cm->emergency_stop < 0)
cm                910 drivers/power/supply/charger-manager.c 		if (is_batt_present(cm))
cm                916 drivers/power/supply/charger-manager.c 		ret = get_batt_uV(cm, &val->intval);
cm                919 drivers/power/supply/charger-manager.c 		fuel_gauge = power_supply_get_by_name(cm->desc->psy_fuel_gauge);
cm                929 drivers/power/supply/charger-manager.c 		return cm_get_battery_temperature(cm, &val->intval);
cm                931 drivers/power/supply/charger-manager.c 		if (!is_batt_present(cm)) {
cm                937 drivers/power/supply/charger-manager.c 		fuel_gauge = power_supply_get_by_name(cm->desc->psy_fuel_gauge);
cm                956 drivers/power/supply/charger-manager.c 		if (is_charging(cm))
cm                963 drivers/power/supply/charger-manager.c 		ret = get_batt_uV(cm, &uV);
cm                971 drivers/power/supply/charger-manager.c 		    !is_charging(cm)) {
cm                978 drivers/power/supply/charger-manager.c 		if (is_ext_pwr_online(cm))
cm                984 drivers/power/supply/charger-manager.c 		if (is_full_charged(cm))
cm                991 drivers/power/supply/charger-manager.c 		if (is_charging(cm)) {
cm                993 drivers/power/supply/charger-manager.c 					cm->desc->psy_fuel_gauge);
cm               1062 drivers/power/supply/charger-manager.c 	struct charger_manager *cm;
cm               1071 drivers/power/supply/charger-manager.c 	list_for_each_entry(cm, &cm_list, entry) {
cm               1075 drivers/power/supply/charger-manager.c 		if (cm->fullbatt_vchk_jiffies_at) {
cm               1076 drivers/power/supply/charger-manager.c 			fbchk_ms = jiffies_to_msecs(cm->fullbatt_vchk_jiffies_at
cm               1079 drivers/power/supply/charger-manager.c 				cm->fullbatt_vchk_jiffies_at) ||
cm               1081 drivers/power/supply/charger-manager.c 				fullbatt_vchk(&cm->fullbatt_vchk_work.work);
cm               1088 drivers/power/supply/charger-manager.c 		if (!is_polling_required(cm) && !cm->emergency_stop)
cm               1091 drivers/power/supply/charger-manager.c 		if (cm->desc->polling_interval_ms == 0)
cm               1093 drivers/power/supply/charger-manager.c 		CM_MIN_VALID(wakeup_ms, cm->desc->polling_interval_ms);
cm               1148 drivers/power/supply/charger-manager.c 	try_charger_enable(cable->cm, cable->attached);
cm               1175 drivers/power/supply/charger-manager.c 	if (cable->attached && is_polling_required(cable->cm)) {
cm               1196 drivers/power/supply/charger-manager.c static int charger_extcon_init(struct charger_manager *cm,
cm               1228 drivers/power/supply/charger-manager.c static int charger_manager_register_extcon(struct charger_manager *cm)
cm               1230 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm               1239 drivers/power/supply/charger-manager.c 		charger->consumer = regulator_get(cm->dev,
cm               1242 drivers/power/supply/charger-manager.c 			dev_err(cm->dev, "Cannot find charger(%s)\n",
cm               1246 drivers/power/supply/charger-manager.c 		charger->cm = cm;
cm               1251 drivers/power/supply/charger-manager.c 			ret = charger_extcon_init(cm, cable);
cm               1253 drivers/power/supply/charger-manager.c 				dev_err(cm->dev, "Cannot initialize charger(%s)\n",
cm               1258 drivers/power/supply/charger-manager.c 			cable->cm = cm;
cm               1304 drivers/power/supply/charger-manager.c 	struct charger_manager *cm = charger->cm;
cm               1305 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm               1335 drivers/power/supply/charger-manager.c 		if (cm->charger_enabled) {
cm               1336 drivers/power/supply/charger-manager.c 			try_charger_enable(charger->cm, false);
cm               1338 drivers/power/supply/charger-manager.c 			try_charger_enable(charger->cm, true);
cm               1343 drivers/power/supply/charger-manager.c 		dev_warn(cm->dev,
cm               1364 drivers/power/supply/charger-manager.c static int charger_manager_prepare_sysfs(struct charger_manager *cm)
cm               1366 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm               1376 drivers/power/supply/charger-manager.c 		name = devm_kasprintf(cm->dev, GFP_KERNEL, "charger.%d", i);
cm               1412 drivers/power/supply/charger-manager.c 		dev_info(cm->dev, "'%s' regulator's externally_control is %d\n",
cm               1417 drivers/power/supply/charger-manager.c 		dev_err(cm->dev, "Cannot register regulator because charger-manager must need at least one charger for charging battery\n");
cm               1424 drivers/power/supply/charger-manager.c static int cm_init_thermal_data(struct charger_manager *cm,
cm               1427 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm               1436 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.properties[cm->charger_psy_desc.num_properties] =
cm               1438 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.num_properties++;
cm               1439 drivers/power/supply/charger-manager.c 		cm->desc->measure_battery_temp = true;
cm               1443 drivers/power/supply/charger-manager.c 		cm->tzd_batt =
cm               1445 drivers/power/supply/charger-manager.c 		if (IS_ERR(cm->tzd_batt))
cm               1446 drivers/power/supply/charger-manager.c 			return PTR_ERR(cm->tzd_batt);
cm               1449 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.properties[cm->charger_psy_desc.num_properties] =
cm               1451 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.num_properties++;
cm               1452 drivers/power/supply/charger-manager.c 		cm->desc->measure_battery_temp = true;
cm               1456 drivers/power/supply/charger-manager.c 	if (cm->desc->measure_battery_temp) {
cm               1619 drivers/power/supply/charger-manager.c 	struct charger_manager *cm;
cm               1631 drivers/power/supply/charger-manager.c 	cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
cm               1632 drivers/power/supply/charger-manager.c 	if (!cm)
cm               1636 drivers/power/supply/charger-manager.c 	cm->dev = &pdev->dev;
cm               1637 drivers/power/supply/charger-manager.c 	cm->desc = desc;
cm               1638 drivers/power/supply/charger-manager.c 	psy_cfg.drv_data = cm;
cm               1642 drivers/power/supply/charger-manager.c 		cm_timer = devm_kzalloc(cm->dev, sizeof(*cm_timer), GFP_KERNEL);
cm               1695 drivers/power/supply/charger-manager.c 	if (cm->desc->polling_mode != CM_POLL_DISABLE &&
cm               1709 drivers/power/supply/charger-manager.c 	platform_set_drvdata(pdev, cm);
cm               1711 drivers/power/supply/charger-manager.c 	memcpy(&cm->charger_psy_desc, &psy_default, sizeof(psy_default));
cm               1714 drivers/power/supply/charger-manager.c 		strncpy(cm->psy_name_buf, psy_default.name, PSY_NAME_MAX);
cm               1716 drivers/power/supply/charger-manager.c 		strncpy(cm->psy_name_buf, desc->psy_name, PSY_NAME_MAX);
cm               1717 drivers/power/supply/charger-manager.c 	cm->charger_psy_desc.name = cm->psy_name_buf;
cm               1720 drivers/power/supply/charger-manager.c 	cm->charger_psy_desc.properties =
cm               1725 drivers/power/supply/charger-manager.c 	if (!cm->charger_psy_desc.properties)
cm               1728 drivers/power/supply/charger-manager.c 	memcpy(cm->charger_psy_desc.properties, default_charger_props,
cm               1731 drivers/power/supply/charger-manager.c 	cm->charger_psy_desc.num_properties = psy_default.num_properties;
cm               1742 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.properties[cm->charger_psy_desc.num_properties] =
cm               1744 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.num_properties++;
cm               1749 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.properties[cm->charger_psy_desc.num_properties] =
cm               1751 drivers/power/supply/charger-manager.c 		cm->charger_psy_desc.num_properties++;
cm               1754 drivers/power/supply/charger-manager.c 	ret = cm_init_thermal_data(cm, fuel_gauge);
cm               1757 drivers/power/supply/charger-manager.c 		cm->desc->measure_battery_temp = false;
cm               1761 drivers/power/supply/charger-manager.c 	INIT_DELAYED_WORK(&cm->fullbatt_vchk_work, fullbatt_vchk);
cm               1764 drivers/power/supply/charger-manager.c 	ret = charger_manager_prepare_sysfs(cm);
cm               1772 drivers/power/supply/charger-manager.c 	cm->charger_psy = power_supply_register(&pdev->dev,
cm               1773 drivers/power/supply/charger-manager.c 						&cm->charger_psy_desc,
cm               1775 drivers/power/supply/charger-manager.c 	if (IS_ERR(cm->charger_psy)) {
cm               1777 drivers/power/supply/charger-manager.c 			cm->charger_psy_desc.name);
cm               1778 drivers/power/supply/charger-manager.c 		return PTR_ERR(cm->charger_psy);
cm               1782 drivers/power/supply/charger-manager.c 	ret = charger_manager_register_extcon(cm);
cm               1790 drivers/power/supply/charger-manager.c 	list_add(&cm->entry, &cm_list);
cm               1826 drivers/power/supply/charger-manager.c 	power_supply_unregister(cm->charger_psy);
cm               1833 drivers/power/supply/charger-manager.c 	struct charger_manager *cm = platform_get_drvdata(pdev);
cm               1834 drivers/power/supply/charger-manager.c 	struct charger_desc *desc = cm->desc;
cm               1840 drivers/power/supply/charger-manager.c 	list_del(&cm->entry);
cm               1858 drivers/power/supply/charger-manager.c 	power_supply_unregister(cm->charger_psy);
cm               1860 drivers/power/supply/charger-manager.c 	try_charger_enable(cm, false);
cm               1883 drivers/power/supply/charger-manager.c 	struct charger_manager *cm;
cm               1889 drivers/power/supply/charger-manager.c 	list_for_each_entry(cm, &cm_list, entry) {
cm               1890 drivers/power/supply/charger-manager.c 		if (is_charging(cm)) {
cm               1902 drivers/power/supply/charger-manager.c 	struct charger_manager *cm = dev_get_drvdata(dev);
cm               1915 drivers/power/supply/charger-manager.c 		cancel_delayed_work(&cm->fullbatt_vchk_work);
cm               1923 drivers/power/supply/charger-manager.c 	struct charger_manager *cm = dev_get_drvdata(dev);
cm               1938 drivers/power/supply/charger-manager.c 	_cm_monitor(cm);
cm               1941 drivers/power/supply/charger-manager.c 	if (cm->fullbatt_vchk_jiffies_at) {
cm               1945 drivers/power/supply/charger-manager.c 		if (time_after_eq(now, cm->fullbatt_vchk_jiffies_at)) {
cm               1947 drivers/power/supply/charger-manager.c 				- (long)(cm->fullbatt_vchk_jiffies_at));
cm               1962 drivers/power/supply/charger-manager.c 		queue_delayed_work(cm_wq, &cm->fullbatt_vchk_work,
cm               1965 drivers/power/supply/charger-manager.c 	device_set_wakeup_capable(cm->dev, false);
cm               2015 drivers/power/supply/charger-manager.c 	struct charger_manager *cm;
cm               2022 drivers/power/supply/charger-manager.c 	list_for_each_entry(cm, &cm_list, entry) {
cm               2023 drivers/power/supply/charger-manager.c 		if (match_string(cm->desc->psy_charger_stat, -1,
cm               2036 drivers/power/supply/charger-manager.c 		fullbatt_handler(cm);
cm               2039 drivers/power/supply/charger-manager.c 		battout_handler(cm);
cm               2043 drivers/power/supply/charger-manager.c 		misc_event_handler(cm, type);
cm               2047 drivers/power/supply/charger-manager.c 		uevent_notify(cm, msg ? msg : default_event_names[type]);
cm               2050 drivers/power/supply/charger-manager.c 		dev_err(cm->dev, "%s: type not specified\n", __func__);
cm                203 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm                226 drivers/rapidio/rio_cm.c static int riocm_post_send(struct cm_dev *cm, struct rio_dev *rdev,
cm                300 drivers/rapidio/rio_cm.c static void *riocm_rx_get_msg(struct cm_dev *cm)
cm                305 drivers/rapidio/rio_cm.c 	msg = rio_get_inb_message(cm->mport, cmbox);
cm                308 drivers/rapidio/rio_cm.c 			if (cm->rx_buf[i] == msg) {
cm                309 drivers/rapidio/rio_cm.c 				cm->rx_buf[i] = NULL;
cm                310 drivers/rapidio/rio_cm.c 				cm->rx_slots++;
cm                329 drivers/rapidio/rio_cm.c static void riocm_rx_fill(struct cm_dev *cm, int nent)
cm                333 drivers/rapidio/rio_cm.c 	if (cm->rx_slots == 0)
cm                336 drivers/rapidio/rio_cm.c 	for (i = 0; i < RIOCM_RX_RING_SIZE && cm->rx_slots && nent; i++) {
cm                337 drivers/rapidio/rio_cm.c 		if (cm->rx_buf[i] == NULL) {
cm                338 drivers/rapidio/rio_cm.c 			cm->rx_buf[i] = kmalloc(RIO_MAX_MSG_SIZE, GFP_KERNEL);
cm                339 drivers/rapidio/rio_cm.c 			if (cm->rx_buf[i] == NULL)
cm                341 drivers/rapidio/rio_cm.c 			rio_add_inb_buffer(cm->mport, cmbox, cm->rx_buf[i]);
cm                342 drivers/rapidio/rio_cm.c 			cm->rx_slots--;
cm                354 drivers/rapidio/rio_cm.c static void riocm_rx_free(struct cm_dev *cm)
cm                359 drivers/rapidio/rio_cm.c 		if (cm->rx_buf[i] != NULL) {
cm                360 drivers/rapidio/rio_cm.c 			kfree(cm->rx_buf[i]);
cm                361 drivers/rapidio/rio_cm.c 			cm->rx_buf[i] = NULL;
cm                376 drivers/rapidio/rio_cm.c static int riocm_req_handler(struct cm_dev *cm, void *req_data)
cm                404 drivers/rapidio/rio_cm.c 	req->cmdev = cm;
cm                486 drivers/rapidio/rio_cm.c static void rio_cm_handler(struct cm_dev *cm, void *data)
cm                490 drivers/rapidio/rio_cm.c 	if (!rio_mport_is_running(cm->mport))
cm                500 drivers/rapidio/rio_cm.c 		riocm_req_handler(cm, data);
cm                526 drivers/rapidio/rio_cm.c static int rio_rx_data_handler(struct cm_dev *cm, void *buf)
cm                582 drivers/rapidio/rio_cm.c 	struct cm_dev *cm = container_of(work, struct cm_dev, rx_work);
cm                586 drivers/rapidio/rio_cm.c 	if (!rio_mport_is_running(cm->mport))
cm                590 drivers/rapidio/rio_cm.c 		mutex_lock(&cm->rx_lock);
cm                591 drivers/rapidio/rio_cm.c 		data = riocm_rx_get_msg(cm);
cm                593 drivers/rapidio/rio_cm.c 			riocm_rx_fill(cm, 1);
cm                594 drivers/rapidio/rio_cm.c 		mutex_unlock(&cm->rx_lock);
cm                611 drivers/rapidio/rio_cm.c 			rio_rx_data_handler(cm, data);
cm                613 drivers/rapidio/rio_cm.c 			rio_cm_handler(cm, data);
cm                620 drivers/rapidio/rio_cm.c 	struct cm_dev *cm = dev_id;
cm                622 drivers/rapidio/rio_cm.c 	if (rio_mport_is_running(cm->mport) && !work_pending(&cm->rx_work))
cm                623 drivers/rapidio/rio_cm.c 		queue_work(cm->rx_wq, &cm->rx_work);
cm                635 drivers/rapidio/rio_cm.c static void rio_txcq_handler(struct cm_dev *cm, int slot)
cm                644 drivers/rapidio/rio_cm.c 		    cm->mport->id, slot, cm->tx_cnt);
cm                646 drivers/rapidio/rio_cm.c 	spin_lock(&cm->tx_lock);
cm                647 drivers/rapidio/rio_cm.c 	ack_slot = cm->tx_ack_slot;
cm                652 drivers/rapidio/rio_cm.c 	while (cm->tx_cnt && ((ack_slot != slot) ||
cm                653 drivers/rapidio/rio_cm.c 	       (cm->tx_cnt == RIOCM_TX_RING_SIZE))) {
cm                655 drivers/rapidio/rio_cm.c 		cm->tx_buf[ack_slot] = NULL;
cm                658 drivers/rapidio/rio_cm.c 		cm->tx_cnt--;
cm                661 drivers/rapidio/rio_cm.c 	if (cm->tx_cnt < 0 || cm->tx_cnt > RIOCM_TX_RING_SIZE)
cm                662 drivers/rapidio/rio_cm.c 		riocm_error("tx_cnt %d out of sync", cm->tx_cnt);
cm                664 drivers/rapidio/rio_cm.c 	WARN_ON((cm->tx_cnt < 0) || (cm->tx_cnt > RIOCM_TX_RING_SIZE));
cm                666 drivers/rapidio/rio_cm.c 	cm->tx_ack_slot = ack_slot;
cm                671 drivers/rapidio/rio_cm.c 	if (!list_empty(&cm->tx_reqs) && (cm->tx_cnt < RIOCM_TX_RING_SIZE)) {
cm                675 drivers/rapidio/rio_cm.c 		list_for_each_entry_safe(req, _req, &cm->tx_reqs, node) {
cm                677 drivers/rapidio/rio_cm.c 			cm->tx_buf[cm->tx_slot] = req->buffer;
cm                678 drivers/rapidio/rio_cm.c 			rc = rio_add_outb_message(cm->mport, req->rdev, cmbox,
cm                683 drivers/rapidio/rio_cm.c 			++cm->tx_cnt;
cm                684 drivers/rapidio/rio_cm.c 			++cm->tx_slot;
cm                685 drivers/rapidio/rio_cm.c 			cm->tx_slot &= (RIOCM_TX_RING_SIZE - 1);
cm                686 drivers/rapidio/rio_cm.c 			if (cm->tx_cnt == RIOCM_TX_RING_SIZE)
cm                691 drivers/rapidio/rio_cm.c 	spin_unlock(&cm->tx_lock);
cm                697 drivers/rapidio/rio_cm.c 	struct cm_dev *cm = dev_id;
cm                699 drivers/rapidio/rio_cm.c 	if (cm && rio_mport_is_running(cm->mport))
cm                700 drivers/rapidio/rio_cm.c 		rio_txcq_handler(cm, slot);
cm                703 drivers/rapidio/rio_cm.c static int riocm_queue_req(struct cm_dev *cm, struct rio_dev *rdev,
cm                717 drivers/rapidio/rio_cm.c 	spin_lock_irqsave(&cm->tx_lock, flags);
cm                718 drivers/rapidio/rio_cm.c 	list_add_tail(&treq->node, &cm->tx_reqs);
cm                719 drivers/rapidio/rio_cm.c 	spin_unlock_irqrestore(&cm->tx_lock, flags);
cm                733 drivers/rapidio/rio_cm.c static int riocm_post_send(struct cm_dev *cm, struct rio_dev *rdev,
cm                739 drivers/rapidio/rio_cm.c 	spin_lock_irqsave(&cm->tx_lock, flags);
cm                741 drivers/rapidio/rio_cm.c 	if (cm->mport == NULL) {
cm                746 drivers/rapidio/rio_cm.c 	if (cm->tx_cnt == RIOCM_TX_RING_SIZE) {
cm                752 drivers/rapidio/rio_cm.c 	cm->tx_buf[cm->tx_slot] = buffer;
cm                753 drivers/rapidio/rio_cm.c 	rc = rio_add_outb_message(cm->mport, rdev, cmbox, buffer, len);
cm                756 drivers/rapidio/rio_cm.c 		 buffer, rdev->destid, cm->tx_slot, cm->tx_cnt);
cm                758 drivers/rapidio/rio_cm.c 	++cm->tx_cnt;
cm                759 drivers/rapidio/rio_cm.c 	++cm->tx_slot;
cm                760 drivers/rapidio/rio_cm.c 	cm->tx_slot &= (RIOCM_TX_RING_SIZE - 1);
cm                763 drivers/rapidio/rio_cm.c 	spin_unlock_irqrestore(&cm->tx_lock, flags);
cm                942 drivers/rapidio/rio_cm.c static int riocm_ch_connect(u16 loc_ch, struct cm_dev *cm,
cm                959 drivers/rapidio/rio_cm.c 	ch->cmdev = cm;
cm                962 drivers/rapidio/rio_cm.c 	ch->loc_destid = cm->mport->host_deviceid;
cm                989 drivers/rapidio/rio_cm.c 	ret = riocm_post_send(cm, peer->rdev, hdr, sizeof(*hdr));
cm                994 drivers/rapidio/rio_cm.c 		ret = riocm_queue_req(cm, peer->rdev, hdr, sizeof(*hdr));
cm               1231 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               1238 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list) {
cm               1239 drivers/rapidio/rio_cm.c 		if ((cm->mport->id == mport_id) &&
cm               1240 drivers/rapidio/rio_cm.c 		     rio_mport_is_running(cm->mport)) {
cm               1262 drivers/rapidio/rio_cm.c 	ch->cmdev = cm;
cm               1263 drivers/rapidio/rio_cm.c 	ch->loc_destid = cm->mport->host_deviceid;
cm               1534 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               1543 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list) {
cm               1544 drivers/rapidio/rio_cm.c 		if (cm->mport->id == mport_id) {
cm               1545 drivers/rapidio/rio_cm.c 			count = cm->npeers;
cm               1562 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               1579 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list)
cm               1580 drivers/rapidio/rio_cm.c 		if (cm->mport->id == (u8)info[1])
cm               1587 drivers/rapidio/rio_cm.c 	nent = min(info[0], cm->npeers);
cm               1596 drivers/rapidio/rio_cm.c 	list_for_each_entry(peer, &cm->peers, node) {
cm               1621 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               1636 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list) {
cm               1638 drivers/rapidio/rio_cm.c 			*entry_ptr = (cm->mport->id << 16) |
cm               1639 drivers/rapidio/rio_cm.c 				      cm->mport->host_deviceid;
cm               1781 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               1793 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list) {
cm               1794 drivers/rapidio/rio_cm.c 		if (cm->mport->id == chan.mport_id) {
cm               1803 drivers/rapidio/rio_cm.c 	if (chan.remote_destid >= RIO_ANY_DESTID(cm->mport->sys_size)) {
cm               1811 drivers/rapidio/rio_cm.c 	list_for_each_entry(peer, &cm->peers, node) {
cm               1823 drivers/rapidio/rio_cm.c 	return riocm_ch_connect(chan.id, cm, peer, chan.remote_channel);
cm               1948 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               1962 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list) {
cm               1963 drivers/rapidio/rio_cm.c 		if (cm->mport == rdev->net->hport)
cm               1973 drivers/rapidio/rio_cm.c 	list_add_tail(&peer->node, &cm->peers);
cm               1974 drivers/rapidio/rio_cm.c 	cm->npeers++;
cm               1991 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               2006 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list) {
cm               2007 drivers/rapidio/rio_cm.c 		if (cm->mport == rdev->net->hport) {
cm               2020 drivers/rapidio/rio_cm.c 	list_for_each_entry(peer, &cm->peers, node) {
cm               2025 drivers/rapidio/rio_cm.c 			cm->npeers--;
cm               2100 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               2105 drivers/rapidio/rio_cm.c 	cm = kzalloc(sizeof(*cm), GFP_KERNEL);
cm               2106 drivers/rapidio/rio_cm.c 	if (!cm)
cm               2109 drivers/rapidio/rio_cm.c 	cm->mport = mport;
cm               2111 drivers/rapidio/rio_cm.c 	rc = rio_request_outb_mbox(mport, cm, cmbox,
cm               2116 drivers/rapidio/rio_cm.c 		kfree(cm);
cm               2120 drivers/rapidio/rio_cm.c 	rc = rio_request_inb_mbox(mport, cm, cmbox,
cm               2126 drivers/rapidio/rio_cm.c 		kfree(cm);
cm               2135 drivers/rapidio/rio_cm.c 		cm->rx_buf[i] = NULL;
cm               2137 drivers/rapidio/rio_cm.c 	cm->rx_slots = RIOCM_RX_RING_SIZE;
cm               2138 drivers/rapidio/rio_cm.c 	mutex_init(&cm->rx_lock);
cm               2139 drivers/rapidio/rio_cm.c 	riocm_rx_fill(cm, RIOCM_RX_RING_SIZE);
cm               2140 drivers/rapidio/rio_cm.c 	cm->rx_wq = create_workqueue(DRV_NAME "/rxq");
cm               2141 drivers/rapidio/rio_cm.c 	if (!cm->rx_wq) {
cm               2145 drivers/rapidio/rio_cm.c 		kfree(cm);
cm               2149 drivers/rapidio/rio_cm.c 	INIT_WORK(&cm->rx_work, rio_ibmsg_handler);
cm               2151 drivers/rapidio/rio_cm.c 	cm->tx_slot = 0;
cm               2152 drivers/rapidio/rio_cm.c 	cm->tx_cnt = 0;
cm               2153 drivers/rapidio/rio_cm.c 	cm->tx_ack_slot = 0;
cm               2154 drivers/rapidio/rio_cm.c 	spin_lock_init(&cm->tx_lock);
cm               2156 drivers/rapidio/rio_cm.c 	INIT_LIST_HEAD(&cm->peers);
cm               2157 drivers/rapidio/rio_cm.c 	cm->npeers = 0;
cm               2158 drivers/rapidio/rio_cm.c 	INIT_LIST_HEAD(&cm->tx_reqs);
cm               2161 drivers/rapidio/rio_cm.c 	list_add_tail(&cm->list, &cm_dev_list);
cm               2180 drivers/rapidio/rio_cm.c 	struct cm_dev *cm;
cm               2191 drivers/rapidio/rio_cm.c 	list_for_each_entry(cm, &cm_dev_list, list) {
cm               2192 drivers/rapidio/rio_cm.c 		if (cm->mport == mport) {
cm               2193 drivers/rapidio/rio_cm.c 			list_del(&cm->list);
cm               2202 drivers/rapidio/rio_cm.c 	flush_workqueue(cm->rx_wq);
cm               2203 drivers/rapidio/rio_cm.c 	destroy_workqueue(cm->rx_wq);
cm               2208 drivers/rapidio/rio_cm.c 		if (ch->cmdev == cm) {
cm               2228 drivers/rapidio/rio_cm.c 	if (!list_empty(&cm->peers))
cm               2230 drivers/rapidio/rio_cm.c 	list_for_each_entry_safe(peer, temp, &cm->peers, node) {
cm               2236 drivers/rapidio/rio_cm.c 	riocm_rx_free(cm);
cm               2237 drivers/rapidio/rio_cm.c 	kfree(cm);
cm                825 drivers/scsi/aic94xx/aic94xx_sds.c 	struct asd_ms_conn_map *cm;
cm                827 drivers/scsi/aic94xx/aic94xx_sds.c 	cm = asd_find_ll_by_id(manuf_sec, 'M', 'C');
cm                828 drivers/scsi/aic94xx/aic94xx_sds.c 	if (!cm) {
cm                833 drivers/scsi/aic94xx/aic94xx_sds.c 	if (cm->maj != 0) {
cm                835 drivers/scsi/aic94xx/aic94xx_sds.c 			    "\n", cm->maj);
cm                336 drivers/staging/rtl8188eu/include/rtw_cmd.h void rtw_setassocsta_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cm);
cm                193 drivers/usb/atm/cxacru.c static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
cm                609 drivers/usb/atm/cxacru.c static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
cm                636 drivers/usb/atm/cxacru.c 				cm, ret);
cm                642 drivers/usb/atm/cxacru.c 	wbuf[0] = cm;
cm                644 drivers/usb/atm/cxacru.c 		wbuf[offb] = cm;
cm                654 drivers/usb/atm/cxacru.c 				cm, ret);
cm                661 drivers/usb/atm/cxacru.c 			usb_err(instance->usbatm, "send of cm %#x failed (%d)\n", cm, ret);
cm                668 drivers/usb/atm/cxacru.c 			usb_err(instance->usbatm, "receive of cm %#x failed (%d)\n", cm, ret);
cm                674 drivers/usb/atm/cxacru.c 				cm, actlen);
cm                681 drivers/usb/atm/cxacru.c 		if (rbuf[offb] != cm) {
cm                684 drivers/usb/atm/cxacru.c 					rbuf[offb], cm);
cm                691 drivers/usb/atm/cxacru.c 					cm, rbuf[offb + 1]);
cm                702 drivers/usb/atm/cxacru.c 	usb_dbg(instance->usbatm, "cm %#x\n", cm);
cm                709 drivers/usb/atm/cxacru.c static int cxacru_cm_get_array(struct cxacru_data *instance, enum cxacru_cm_request cm,
cm                723 drivers/usb/atm/cxacru.c 	ret = cxacru_cm(instance, cm, NULL, 0, (u8 *) buf, buflen);
cm                735 drivers/usb/atm/cxacru.c 					cm, l);
cm                744 drivers/usb/atm/cxacru.c 						offd, cm);
cm                453 fs/dlm/config.c 	struct dlm_comm *cm;
cm                455 fs/dlm/config.c 	cm = kzalloc(sizeof(struct dlm_comm), GFP_NOFS);
cm                456 fs/dlm/config.c 	if (!cm)
cm                459 fs/dlm/config.c 	config_item_init_type_name(&cm->item, name, &comm_type);
cm                461 fs/dlm/config.c 	cm->seq = dlm_comm_count++;
cm                462 fs/dlm/config.c 	if (!cm->seq)
cm                463 fs/dlm/config.c 		cm->seq = dlm_comm_count++;
cm                465 fs/dlm/config.c 	cm->nodeid = -1;
cm                466 fs/dlm/config.c 	cm->local = 0;
cm                467 fs/dlm/config.c 	cm->addr_count = 0;
cm                468 fs/dlm/config.c 	return &cm->item;
cm                473 fs/dlm/config.c 	struct dlm_comm *cm = config_item_to_comm(i);
cm                474 fs/dlm/config.c 	if (local_comm == cm)
cm                476 fs/dlm/config.c 	dlm_lowcomms_close(cm->nodeid);
cm                477 fs/dlm/config.c 	while (cm->addr_count--)
cm                478 fs/dlm/config.c 		kfree(cm->addr[cm->addr_count]);
cm                484 fs/dlm/config.c 	struct dlm_comm *cm = config_item_to_comm(i);
cm                485 fs/dlm/config.c 	kfree(cm);
cm                579 fs/dlm/config.c 	struct dlm_comm *cm = config_item_to_comm(item);
cm                580 fs/dlm/config.c 	int rc = kstrtoint(buf, 0, &cm->local);
cm                584 fs/dlm/config.c 	if (cm->local && !local_comm)
cm                585 fs/dlm/config.c 		local_comm = cm;
cm                592 fs/dlm/config.c 	struct dlm_comm *cm = config_item_to_comm(item);
cm                599 fs/dlm/config.c 	if (cm->addr_count >= DLM_MAX_ADDR_COUNT)
cm                608 fs/dlm/config.c 	rv = dlm_lowcomms_addr(cm->nodeid, addr, len);
cm                614 fs/dlm/config.c 	cm->addr[cm->addr_count++] = addr;
cm                620 fs/dlm/config.c 	struct dlm_comm *cm = config_item_to_comm(item);
cm                636 fs/dlm/config.c 	for (i = 0; i < cm->addr_count; i++) {
cm                637 fs/dlm/config.c 		addr = cm->addr[i];
cm                745 fs/dlm/config.c 	struct dlm_comm *cm = NULL;
cm                754 fs/dlm/config.c 		cm = config_item_to_comm(i);
cm                756 fs/dlm/config.c 		if (cm->nodeid != nodeid)
cm                765 fs/dlm/config.c 		cm = NULL;
cm                766 fs/dlm/config.c 	return cm;
cm                769 fs/dlm/config.c static void put_comm(struct dlm_comm *cm)
cm                771 fs/dlm/config.c 	config_item_put(&cm->item);
cm                824 fs/dlm/config.c 	struct dlm_comm *cm = get_comm(nodeid);
cm                825 fs/dlm/config.c 	if (!cm)
cm                827 fs/dlm/config.c 	*seq = cm->seq;
cm                828 fs/dlm/config.c 	put_comm(cm);
cm               9638 include/linux/mlx5/mlx5_ifc.h 	u8         cm[0x1];
cm                 83 include/linux/power/charger-manager.h 	struct charger_manager *cm;
cm                126 include/linux/power/charger-manager.h 	struct charger_manager *cm;
cm                 80 kernel/irq/matrix.c 	struct cpumap *cm = this_cpu_ptr(m->maps);
cm                 82 kernel/irq/matrix.c 	BUG_ON(cm->online);
cm                 84 kernel/irq/matrix.c 	if (!cm->initialized) {
cm                 85 kernel/irq/matrix.c 		cm->available = m->alloc_size;
cm                 86 kernel/irq/matrix.c 		cm->available -= cm->managed + m->systembits_inalloc;
cm                 87 kernel/irq/matrix.c 		cm->initialized = true;
cm                 89 kernel/irq/matrix.c 	m->global_available += cm->available;
cm                 90 kernel/irq/matrix.c 	cm->online = true;
cm                101 kernel/irq/matrix.c 	struct cpumap *cm = this_cpu_ptr(m->maps);
cm                104 kernel/irq/matrix.c 	m->global_available -= cm->available;
cm                105 kernel/irq/matrix.c 	cm->online = false;
cm                110 kernel/irq/matrix.c static unsigned int matrix_alloc_area(struct irq_matrix *m, struct cpumap *cm,
cm                116 kernel/irq/matrix.c 	bitmap_or(m->scratch_map, cm->managed_map, m->system_map, end);
cm                117 kernel/irq/matrix.c 	bitmap_or(m->scratch_map, m->scratch_map, cm->alloc_map, end);
cm                122 kernel/irq/matrix.c 		bitmap_set(cm->managed_map, area, num);
cm                124 kernel/irq/matrix.c 		bitmap_set(cm->alloc_map, area, num);
cm                133 kernel/irq/matrix.c 	struct cpumap *cm;
cm                138 kernel/irq/matrix.c 		cm = per_cpu_ptr(m->maps, cpu);
cm                140 kernel/irq/matrix.c 		if (!cm->online || cm->available <= maxavl)
cm                144 kernel/irq/matrix.c 		maxavl = cm->available;
cm                154 kernel/irq/matrix.c 	struct cpumap *cm;
cm                159 kernel/irq/matrix.c 		cm = per_cpu_ptr(m->maps, cpu);
cm                161 kernel/irq/matrix.c 		if (!cm->online || cm->managed_allocated > allocated)
cm                165 kernel/irq/matrix.c 		allocated = cm->managed_allocated;
cm                184 kernel/irq/matrix.c 	struct cpumap *cm = this_cpu_ptr(m->maps);
cm                191 kernel/irq/matrix.c 		BUG_ON(!test_and_clear_bit(bit, cm->alloc_map));
cm                192 kernel/irq/matrix.c 		cm->allocated--;
cm                215 kernel/irq/matrix.c 		struct cpumap *cm = per_cpu_ptr(m->maps, cpu);
cm                218 kernel/irq/matrix.c 		bit = matrix_alloc_area(m, cm, 1, true);
cm                221 kernel/irq/matrix.c 		cm->managed++;
cm                222 kernel/irq/matrix.c 		if (cm->online) {
cm                223 kernel/irq/matrix.c 			cm->available--;
cm                226 kernel/irq/matrix.c 		trace_irq_matrix_reserve_managed(bit, cpu, m, cm);
cm                256 kernel/irq/matrix.c 		struct cpumap *cm = per_cpu_ptr(m->maps, cpu);
cm                259 kernel/irq/matrix.c 		if (WARN_ON_ONCE(!cm->managed))
cm                263 kernel/irq/matrix.c 		bitmap_andnot(m->scratch_map, cm->managed_map, cm->alloc_map, end);
cm                269 kernel/irq/matrix.c 		clear_bit(bit, cm->managed_map);
cm                271 kernel/irq/matrix.c 		cm->managed--;
cm                272 kernel/irq/matrix.c 		if (cm->online) {
cm                273 kernel/irq/matrix.c 			cm->available++;
cm                276 kernel/irq/matrix.c 		trace_irq_matrix_remove_managed(bit, cpu, m, cm);
cm                289 kernel/irq/matrix.c 	struct cpumap *cm;
cm                298 kernel/irq/matrix.c 	cm = per_cpu_ptr(m->maps, cpu);
cm                301 kernel/irq/matrix.c 	bitmap_andnot(m->scratch_map, cm->managed_map, cm->alloc_map, end);
cm                305 kernel/irq/matrix.c 	set_bit(bit, cm->alloc_map);
cm                306 kernel/irq/matrix.c 	cm->allocated++;
cm                307 kernel/irq/matrix.c 	cm->managed_allocated++;
cm                310 kernel/irq/matrix.c 	trace_irq_matrix_alloc_managed(bit, cpu, m, cm);
cm                323 kernel/irq/matrix.c 	struct cpumap *cm = this_cpu_ptr(m->maps);
cm                327 kernel/irq/matrix.c 	if (WARN_ON_ONCE(test_and_set_bit(bit, cm->alloc_map)))
cm                329 kernel/irq/matrix.c 	cm->allocated++;
cm                331 kernel/irq/matrix.c 	cm->available--;
cm                333 kernel/irq/matrix.c 	trace_irq_matrix_assign(bit, smp_processor_id(), m, cm);
cm                381 kernel/irq/matrix.c 	struct cpumap *cm;
cm                387 kernel/irq/matrix.c 	cm = per_cpu_ptr(m->maps, cpu);
cm                388 kernel/irq/matrix.c 	bit = matrix_alloc_area(m, cm, 1, false);
cm                391 kernel/irq/matrix.c 	cm->allocated++;
cm                392 kernel/irq/matrix.c 	cm->available--;
cm                398 kernel/irq/matrix.c 	trace_irq_matrix_alloc(bit, cpu, m, cm);
cm                414 kernel/irq/matrix.c 	struct cpumap *cm = per_cpu_ptr(m->maps, cpu);
cm                419 kernel/irq/matrix.c 	clear_bit(bit, cm->alloc_map);
cm                420 kernel/irq/matrix.c 	cm->allocated--;
cm                422 kernel/irq/matrix.c 		cm->managed_allocated--;
cm                424 kernel/irq/matrix.c 	if (cm->online)
cm                428 kernel/irq/matrix.c 		cm->available++;
cm                429 kernel/irq/matrix.c 		if (cm->online)
cm                432 kernel/irq/matrix.c 	trace_irq_matrix_free(bit, cpu, m, cm);
cm                443 kernel/irq/matrix.c 	struct cpumap *cm = this_cpu_ptr(m->maps);
cm                447 kernel/irq/matrix.c 	return m->global_available - cm->available;
cm                467 kernel/irq/matrix.c 	struct cpumap *cm = this_cpu_ptr(m->maps);
cm                469 kernel/irq/matrix.c 	return cm->allocated;
cm                495 kernel/irq/matrix.c 		struct cpumap *cm = per_cpu_ptr(m->maps, cpu);
cm                498 kernel/irq/matrix.c 			   cpu, cm->available, cm->managed,
cm                499 kernel/irq/matrix.c 			   cm->managed_allocated, cm->allocated,
cm                500 kernel/irq/matrix.c 			   m->matrix_bits, cm->alloc_map);
cm               1158 kernel/rcu/tree_plugin.h 	cpumask_var_t cm;
cm               1163 kernel/rcu/tree_plugin.h 	if (!zalloc_cpumask_var(&cm, GFP_KERNEL))
cm               1168 kernel/rcu/tree_plugin.h 			cpumask_set_cpu(cpu, cm);
cm               1169 kernel/rcu/tree_plugin.h 	if (cpumask_weight(cm) == 0)
cm               1170 kernel/rcu/tree_plugin.h 		cpumask_setall(cm);
cm               1171 kernel/rcu/tree_plugin.h 	set_cpus_allowed_ptr(t, cm);
cm               1172 kernel/rcu/tree_plugin.h 	free_cpumask_var(cm);
cm               1593 net/bridge/netfilter/ebtables.c 	struct compat_ebt_entry_mwt __user *cm = *dstptr;
cm               1600 net/bridge/netfilter/ebtables.c 	if (copy_to_user(cm->u.name, match->name, strlen(match->name) + 1) ||
cm               1601 net/bridge/netfilter/ebtables.c 	    put_user(match->revision, &cm->u.revision) ||
cm               1602 net/bridge/netfilter/ebtables.c 	    put_user(msize, &cm->match_size))
cm               1606 net/bridge/netfilter/ebtables.c 		if (match->compat_to_user(cm->data, m->data))
cm               1609 net/bridge/netfilter/ebtables.c 		if (xt_data_to_user(cm->data, m->data, match->usersize, msize,
cm               1615 net/bridge/netfilter/ebtables.c 	*dstptr = cm->data;
cm               1625 net/bridge/netfilter/ebtables.c 	struct compat_ebt_entry_mwt __user *cm = *dstptr;
cm               1632 net/bridge/netfilter/ebtables.c 	if (copy_to_user(cm->u.name, target->name, strlen(target->name) + 1) ||
cm               1633 net/bridge/netfilter/ebtables.c 	    put_user(target->revision, &cm->u.revision) ||
cm               1634 net/bridge/netfilter/ebtables.c 	    put_user(tsize, &cm->match_size))
cm               1638 net/bridge/netfilter/ebtables.c 		if (target->compat_to_user(cm->data, t->data))
cm               1641 net/bridge/netfilter/ebtables.c 		if (xt_data_to_user(cm->data, t->data, target->usersize, tsize,
cm               1647 net/bridge/netfilter/ebtables.c 	*dstptr = cm->data;
cm                212 net/compat.c   	struct compat_cmsghdr __user *cm = (struct compat_cmsghdr __user *) kmsg->msg_control;
cm                218 net/compat.c   	if (cm == NULL || kmsg->msg_controllen < sizeof(*cm)) {
cm                254 net/compat.c   	if (copy_to_user(cm, &cmhdr, sizeof cmhdr))
cm                256 net/compat.c   	if (copy_to_user(CMSG_COMPAT_DATA(cm), data, cmlen - sizeof(struct compat_cmsghdr)))
cm                268 net/compat.c   	struct compat_cmsghdr __user *cm = (struct compat_cmsghdr __user *) kmsg->msg_control;
cm                278 net/compat.c   	for (i = 0, cmfptr = (int __user *) CMSG_COMPAT_DATA(cm); i < fdmax; i++, cmfptr++) {
cm                299 net/compat.c   		err = put_user(SOL_SOCKET, &cm->cmsg_level);
cm                301 net/compat.c   			err = put_user(SCM_RIGHTS, &cm->cmsg_type);
cm                303 net/compat.c   			err = put_user(cmlen, &cm->cmsg_len);
cm                215 net/core/scm.c 	struct cmsghdr __user *cm
cm                224 net/core/scm.c 	if (cm==NULL || msg->msg_controllen < sizeof(*cm)) {
cm                237 net/core/scm.c 	if (copy_to_user(cm, &cmhdr, sizeof cmhdr))
cm                239 net/core/scm.c 	if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr)))
cm                280 net/core/scm.c 	struct cmsghdr __user *cm
cm                301 net/core/scm.c 	for (i=0, cmfptr=(__force int __user *)CMSG_DATA(cm); i<fdmax;
cm                331 net/core/scm.c 		err = put_user(SOL_SOCKET, &cm->cmsg_level);
cm                333 net/core/scm.c 			err = put_user(SCM_RIGHTS, &cm->cmsg_type);
cm                335 net/core/scm.c 			err = put_user(cmlen, &cm->cmsg_len);
cm                733 net/netfilter/x_tables.c 	struct compat_xt_entry_match *cm = (struct compat_xt_entry_match *)m;
cm                735 net/netfilter/x_tables.c 	u_int16_t msize = cm->u.user.match_size;
cm                739 net/netfilter/x_tables.c 	memcpy(m, cm, sizeof(*cm));
cm                741 net/netfilter/x_tables.c 		match->compat_from_user(m->data, cm->data);
cm                743 net/netfilter/x_tables.c 		memcpy(m->data, cm->data, msize - sizeof(*cm));
cm                769 net/netfilter/x_tables.c 	struct compat_xt_entry_match __user *cm = *dstptr;
cm                773 net/netfilter/x_tables.c 	if (XT_OBJ_TO_USER(cm, m, match, msize))
cm                777 net/netfilter/x_tables.c 		if (match->compat_to_user((void __user *)cm->data, m->data))
cm                780 net/netfilter/x_tables.c 		if (COMPAT_XT_DATA_TO_USER(cm, m, match, msize - sizeof(*cm)))
cm                153 net/netfilter/xt_limit.c 	const struct compat_xt_rateinfo *cm = src;
cm                155 net/netfilter/xt_limit.c 		.avg		= cm->avg,
cm                156 net/netfilter/xt_limit.c 		.burst		= cm->burst,
cm                157 net/netfilter/xt_limit.c 		.prev		= cm->prev | (unsigned long)cm->master << 32,
cm                158 net/netfilter/xt_limit.c 		.credit		= cm->credit,
cm                159 net/netfilter/xt_limit.c 		.credit_cap	= cm->credit_cap,
cm                160 net/netfilter/xt_limit.c 		.cost		= cm->cost,
cm                168 net/netfilter/xt_limit.c 	struct compat_xt_rateinfo cm = {
cm                177 net/netfilter/xt_limit.c 	return copy_to_user(dst, &cm, sizeof(cm)) ? -EFAULT : 0;
cm                 52 net/sched/em_canid.c static void em_canid_sff_match_add(struct canid_match *cm, u32 can_id,
cm                 66 net/sched/em_canid.c 		set_bit(can_id, cm->match_sff);
cm                 72 net/sched/em_canid.c 		bitmap_fill(cm->match_sff, (1 << CAN_SFF_ID_BITS));
cm                 83 net/sched/em_canid.c 			set_bit(i, cm->match_sff);
cm                 95 net/sched/em_canid.c 	struct canid_match *cm = em_canid_priv(m);
cm                104 net/sched/em_canid.c 		for (i = 0, lp = cm->rules_raw;
cm                105 net/sched/em_canid.c 		     i < cm->eff_rules_count; i++, lp++) {
cm                113 net/sched/em_canid.c 		match = (test_bit(can_id, cm->match_sff) ? 1 : 0);
cm                123 net/sched/em_canid.c 	struct canid_match *cm;
cm                135 net/sched/em_canid.c 	cm = kzalloc(sizeof(struct canid_match) + len, GFP_KERNEL);
cm                136 net/sched/em_canid.c 	if (!cm)
cm                139 net/sched/em_canid.c 	cm->rules_count = len / sizeof(struct can_filter);
cm                152 net/sched/em_canid.c 	for (i = 0; i < cm->rules_count; i++) {
cm                154 net/sched/em_canid.c 			memcpy(cm->rules_raw + cm->eff_rules_count,
cm                158 net/sched/em_canid.c 			cm->eff_rules_count++;
cm                163 net/sched/em_canid.c 	for (i = 0; i < cm->rules_count; i++) {
cm                165 net/sched/em_canid.c 			memcpy(cm->rules_raw
cm                166 net/sched/em_canid.c 				+ cm->eff_rules_count
cm                167 net/sched/em_canid.c 				+ cm->sff_rules_count,
cm                170 net/sched/em_canid.c 			cm->sff_rules_count++;
cm                172 net/sched/em_canid.c 			em_canid_sff_match_add(cm,
cm                178 net/sched/em_canid.c 	m->data = (unsigned long)cm;
cm                184 net/sched/em_canid.c 	struct canid_match *cm = em_canid_priv(m);
cm                186 net/sched/em_canid.c 	kfree(cm);
cm                191 net/sched/em_canid.c 	struct canid_match *cm = em_canid_priv(m);
cm                197 net/sched/em_canid.c 	if (nla_put_nohdr(skb, sizeof(struct can_filter) * cm->rules_count,
cm                198 net/sched/em_canid.c 	    &cm->rules_raw) < 0)
cm                502 sound/pci/cmipci.c static inline void snd_cmipci_write(struct cmipci *cm, unsigned int cmd, unsigned int data)
cm                504 sound/pci/cmipci.c 	outl(data, cm->iobase + cmd);
cm                507 sound/pci/cmipci.c static inline unsigned int snd_cmipci_read(struct cmipci *cm, unsigned int cmd)
cm                509 sound/pci/cmipci.c 	return inl(cm->iobase + cmd);
cm                513 sound/pci/cmipci.c static inline void snd_cmipci_write_w(struct cmipci *cm, unsigned int cmd, unsigned short data)
cm                515 sound/pci/cmipci.c 	outw(data, cm->iobase + cmd);
cm                518 sound/pci/cmipci.c static inline unsigned short snd_cmipci_read_w(struct cmipci *cm, unsigned int cmd)
cm                520 sound/pci/cmipci.c 	return inw(cm->iobase + cmd);
cm                524 sound/pci/cmipci.c static inline void snd_cmipci_write_b(struct cmipci *cm, unsigned int cmd, unsigned char data)
cm                526 sound/pci/cmipci.c 	outb(data, cm->iobase + cmd);
cm                529 sound/pci/cmipci.c static inline unsigned char snd_cmipci_read_b(struct cmipci *cm, unsigned int cmd)
cm                531 sound/pci/cmipci.c 	return inb(cm->iobase + cmd);
cm                535 sound/pci/cmipci.c static int snd_cmipci_set_bit(struct cmipci *cm, unsigned int cmd, unsigned int flag)
cm                538 sound/pci/cmipci.c 	val = oval = inl(cm->iobase + cmd);
cm                542 sound/pci/cmipci.c 	outl(val, cm->iobase + cmd);
cm                546 sound/pci/cmipci.c static int snd_cmipci_clear_bit(struct cmipci *cm, unsigned int cmd, unsigned int flag)
cm                549 sound/pci/cmipci.c 	val = oval = inl(cm->iobase + cmd);
cm                553 sound/pci/cmipci.c 	outl(val, cm->iobase + cmd);
cm                558 sound/pci/cmipci.c static int snd_cmipci_set_bit_b(struct cmipci *cm, unsigned int cmd, unsigned char flag)
cm                561 sound/pci/cmipci.c 	val = oval = inb(cm->iobase + cmd);
cm                565 sound/pci/cmipci.c 	outb(val, cm->iobase + cmd);
cm                569 sound/pci/cmipci.c static int snd_cmipci_clear_bit_b(struct cmipci *cm, unsigned int cmd, unsigned char flag)
cm                572 sound/pci/cmipci.c 	val = oval = inb(cm->iobase + cmd);
cm                576 sound/pci/cmipci.c 	outb(val, cm->iobase + cmd);
cm                651 sound/pci/cmipci.c static void snd_cmipci_set_pll(struct cmipci *cm, unsigned int rate, unsigned int slot)
cm                662 sound/pci/cmipci.c 	snd_cmipci_write_b(cm, reg, rate>>8);
cm                663 sound/pci/cmipci.c 	snd_cmipci_write_b(cm, reg, rate&0xff);
cm                678 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm                680 sound/pci/cmipci.c 		mutex_lock(&cm->open_mutex);
cm                681 sound/pci/cmipci.c 		if (cm->opened[CM_CH_PLAY]) {
cm                682 sound/pci/cmipci.c 			mutex_unlock(&cm->open_mutex);
cm                686 sound/pci/cmipci.c 		cm->opened[CM_CH_PLAY] = CM_OPEN_PLAYBACK_MULTI;
cm                687 sound/pci/cmipci.c 		mutex_unlock(&cm->open_mutex);
cm                692 sound/pci/cmipci.c static void snd_cmipci_ch_reset(struct cmipci *cm, int ch)
cm                694 sound/pci/cmipci.c 	int reset = CM_RST_CH0 << (cm->channel[ch].ch);
cm                695 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl | reset);
cm                696 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl & ~reset);
cm                726 sound/pci/cmipci.c static int set_dac_channels(struct cmipci *cm, struct cmipci_pcm *rec, int channels)
cm                729 sound/pci/cmipci.c 		if (!cm->can_multi_ch || !rec->ch)
cm                735 sound/pci/cmipci.c 	if (cm->can_multi_ch) {
cm                736 sound/pci/cmipci.c 		spin_lock_irq(&cm->reg_lock);
cm                738 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_NXCHG);
cm                739 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
cm                741 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_NXCHG);
cm                742 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
cm                745 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_EXT_MISC, CM_CHB3D8C);
cm                747 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_EXT_MISC, CM_CHB3D8C);
cm                749 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
cm                750 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
cm                752 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
cm                753 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
cm                756 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_CHB3D);
cm                758 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D);
cm                759 sound/pci/cmipci.c 		spin_unlock_irq(&cm->reg_lock);
cm                769 sound/pci/cmipci.c static int snd_cmipci_pcm_prepare(struct cmipci *cm, struct cmipci_pcm *rec,
cm                785 sound/pci/cmipci.c 	if (rec->is_dac && set_dac_channels(cm, rec, runtime->channels) < 0) {
cm                786 sound/pci/cmipci.c 		dev_dbg(cm->card->dev, "cannot set dac channels\n");
cm                800 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm                804 sound/pci/cmipci.c 	snd_cmipci_write(cm, reg, rec->offset);
cm                807 sound/pci/cmipci.c 	snd_cmipci_write_w(cm, reg, rec->dma_size - 1);
cm                808 sound/pci/cmipci.c 	snd_cmipci_write_w(cm, reg + 2, period_size - 1);
cm                813 sound/pci/cmipci.c 		cm->ctrl &= ~val;
cm                815 sound/pci/cmipci.c 		cm->ctrl |= val;
cm                816 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl);
cm                831 sound/pci/cmipci.c 	val = snd_cmipci_read(cm, CM_REG_FUNCTRL1);
cm                839 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_FUNCTRL1, val);
cm                840 sound/pci/cmipci.c 	dev_dbg(cm->card->dev, "functrl1 = %08x\n", val);
cm                843 sound/pci/cmipci.c 	val = snd_cmipci_read(cm, CM_REG_CHFORMAT);
cm                851 sound/pci/cmipci.c 	if (cm->can_96k) {
cm                855 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_CHFORMAT, val);
cm                856 sound/pci/cmipci.c 	dev_dbg(cm->card->dev, "chformat = %08x\n", val);
cm                858 sound/pci/cmipci.c 	if (!rec->is_dac && cm->chip_version) {
cm                860 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_EXT_MISC, CM_ADC48K44K);
cm                862 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_EXT_MISC, CM_ADC48K44K);
cm                866 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm                874 sound/pci/cmipci.c static int snd_cmipci_pcm_trigger(struct cmipci *cm, struct cmipci_pcm *rec,
cm                885 sound/pci/cmipci.c 	spin_lock(&cm->reg_lock);
cm                890 sound/pci/cmipci.c 		snd_cmipci_set_bit(cm, CM_REG_INT_HLDCLR, inthld);
cm                891 sound/pci/cmipci.c 		cm->ctrl |= chen;
cm                893 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl);
cm                894 sound/pci/cmipci.c 		dev_dbg(cm->card->dev, "functrl0 = %08x\n", cm->ctrl);
cm                899 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_INT_HLDCLR, inthld);
cm                901 sound/pci/cmipci.c 		cm->ctrl &= ~chen;
cm                902 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl | reset);
cm                903 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl & ~reset);
cm                908 sound/pci/cmipci.c 		cm->ctrl |= pause;
cm                909 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl);
cm                913 sound/pci/cmipci.c 		cm->ctrl &= ~pause;
cm                914 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl);
cm                920 sound/pci/cmipci.c 	spin_unlock(&cm->reg_lock);
cm                927 sound/pci/cmipci.c static snd_pcm_uframes_t snd_cmipci_pcm_pointer(struct cmipci *cm, struct cmipci_pcm *rec,
cm                938 sound/pci/cmipci.c 		rem = snd_cmipci_read_w(cm, reg);
cm                942 sound/pci/cmipci.c 	dev_err(cm->card->dev, "invalid PCM pointer: %#x\n", rem);
cm                948 sound/pci/cmipci.c 	ptr = snd_cmipci_read(cm, reg) - rec->offset;
cm                963 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm                964 sound/pci/cmipci.c 	return snd_cmipci_pcm_trigger(cm, &cm->channel[CM_CH_PLAY], cmd);
cm                969 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm                970 sound/pci/cmipci.c 	return snd_cmipci_pcm_pointer(cm, &cm->channel[CM_CH_PLAY], substream);
cm                982 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm                983 sound/pci/cmipci.c 	return snd_cmipci_pcm_trigger(cm, &cm->channel[CM_CH_CAPT], cmd);
cm                988 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm                989 sound/pci/cmipci.c 	return snd_cmipci_pcm_pointer(cm, &cm->channel[CM_CH_CAPT], substream);
cm               1123 sound/pci/cmipci.c static int save_mixer_state(struct cmipci *cm)
cm               1125 sound/pci/cmipci.c 	if (! cm->mixer_insensitive) {
cm               1133 sound/pci/cmipci.c 			struct snd_kcontrol *ctl = cm->mixer_res_ctl[i];
cm               1138 sound/pci/cmipci.c 				cm->mixer_res_status[i] = val->value.integer.value[0];
cm               1141 sound/pci/cmipci.c 				if (cm->mixer_res_status[i] != val->value.integer.value[0]) {
cm               1146 sound/pci/cmipci.c 				snd_ctl_notify(cm->card, event, &ctl->id);
cm               1150 sound/pci/cmipci.c 		cm->mixer_insensitive = 1;
cm               1157 sound/pci/cmipci.c static void restore_mixer_state(struct cmipci *cm)
cm               1159 sound/pci/cmipci.c 	if (cm->mixer_insensitive) {
cm               1166 sound/pci/cmipci.c 		cm->mixer_insensitive = 0; /* at first clear this;
cm               1169 sound/pci/cmipci.c 			struct snd_kcontrol *ctl = cm->mixer_res_ctl[i];
cm               1177 sound/pci/cmipci.c 				if (val->value.integer.value[0] != cm->mixer_res_status[i]) {
cm               1178 sound/pci/cmipci.c 					val->value.integer.value[0] = cm->mixer_res_status[i];
cm               1182 sound/pci/cmipci.c 				snd_ctl_notify(cm->card, event, &ctl->id);
cm               1190 sound/pci/cmipci.c static void setup_ac3(struct cmipci *cm, struct snd_pcm_substream *subs, int do_ac3, int rate)
cm               1194 sound/pci/cmipci.c 		snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_AC3EN1);
cm               1196 sound/pci/cmipci.c 		snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_AC3EN2);
cm               1198 sound/pci/cmipci.c 		if (cm->can_ac3_hw) {
cm               1201 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_SPD24SEL);
cm               1202 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1205 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1207 sound/pci/cmipci.c 			if (cm->chip_version == 33) {
cm               1209 sound/pci/cmipci.c 					snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_PLAYBACK_SRATE_176K);
cm               1211 sound/pci/cmipci.c 					snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_PLAYBACK_SRATE_176K);
cm               1217 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_AC3EN1);
cm               1218 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_AC3EN2);
cm               1220 sound/pci/cmipci.c 		if (cm->can_ac3_hw) {
cm               1223 sound/pci/cmipci.c 				snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1224 sound/pci/cmipci.c 				snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_SPD24SEL);
cm               1226 sound/pci/cmipci.c 				snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1227 sound/pci/cmipci.c 				snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_SPD24SEL);
cm               1230 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1231 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_SPD24SEL);
cm               1232 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_PLAYBACK_SRATE_176K);
cm               1237 sound/pci/cmipci.c static int setup_spdif_playback(struct cmipci *cm, struct snd_pcm_substream *subs, int up, int do_ac3)
cm               1244 sound/pci/cmipci.c 		if ((err = save_mixer_state(cm)) < 0)
cm               1247 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               1248 sound/pci/cmipci.c 	cm->spdif_playback_avail = up;
cm               1253 sound/pci/cmipci.c 		if (cm->spdif_playback_enabled)
cm               1254 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_PLAYBACK_SPDF);
cm               1255 sound/pci/cmipci.c 		setup_ac3(cm, subs, do_ac3, rate);
cm               1258 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_SPDIF48K | CM_SPDF_AC97);
cm               1260 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPDIF48K | CM_SPDF_AC97);
cm               1262 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_DBLSPDS);
cm               1264 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_DBLSPDS);
cm               1269 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_DBLSPDS);
cm               1270 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_PLAYBACK_SPDF);
cm               1271 sound/pci/cmipci.c 		setup_ac3(cm, subs, 0, 0);
cm               1273 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               1285 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1292 sound/pci/cmipci.c 	if (do_spdif && cm->can_ac3_hw) 
cm               1293 sound/pci/cmipci.c 		do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
cm               1294 sound/pci/cmipci.c 	if ((err = setup_spdif_playback(cm, substream, do_spdif, do_ac3)) < 0)
cm               1296 sound/pci/cmipci.c 	return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream);
cm               1302 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1305 sound/pci/cmipci.c 	if (cm->can_ac3_hw) 
cm               1306 sound/pci/cmipci.c 		do_ac3 = cm->dig_pcm_status & IEC958_AES0_NONAUDIO;
cm               1309 sound/pci/cmipci.c 	if ((err = setup_spdif_playback(cm, substream, 1, do_ac3)) < 0)
cm               1311 sound/pci/cmipci.c 	return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream);
cm               1322 sound/pci/cmipci.c static void snd_cmipci_silence_hack(struct cmipci *cm, struct cmipci_pcm *rec)
cm               1332 sound/pci/cmipci.c 		snd_cmipci_write(cm, reg, val);
cm               1336 sound/pci/cmipci.c 			set_dac_channels(cm, rec, 2);
cm               1337 sound/pci/cmipci.c 		spin_lock_irq(&cm->reg_lock);
cm               1338 sound/pci/cmipci.c 		val = snd_cmipci_read(cm, CM_REG_FUNCTRL1);
cm               1341 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL1, val);
cm               1342 sound/pci/cmipci.c 		val = snd_cmipci_read(cm, CM_REG_CHFORMAT);
cm               1345 sound/pci/cmipci.c 		if (cm->can_96k)
cm               1347 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_CHFORMAT, val);
cm               1350 sound/pci/cmipci.c 		cm->ctrl |= CM_CHEN0 << rec->ch;
cm               1351 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl);
cm               1352 sound/pci/cmipci.c 		spin_unlock_irq(&cm->reg_lock);
cm               1357 sound/pci/cmipci.c 		spin_lock_irq(&cm->reg_lock);
cm               1358 sound/pci/cmipci.c 		cm->ctrl &= ~(CM_CHEN0 << rec->ch);
cm               1360 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl | val);
cm               1361 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, cm->ctrl & ~val);
cm               1362 sound/pci/cmipci.c 		spin_unlock_irq(&cm->reg_lock);
cm               1370 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1371 sound/pci/cmipci.c 	setup_spdif_playback(cm, substream, 0, 0);
cm               1372 sound/pci/cmipci.c 	restore_mixer_state(cm);
cm               1373 sound/pci/cmipci.c 	snd_cmipci_silence_hack(cm, &cm->channel[0]);
cm               1379 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1380 sound/pci/cmipci.c 	snd_cmipci_silence_hack(cm, &cm->channel[1]);
cm               1387 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1388 sound/pci/cmipci.c 	return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream);
cm               1394 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1396 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               1397 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_CAPTURE_SPDF);
cm               1398 sound/pci/cmipci.c 	if (cm->can_96k) {
cm               1400 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_DBLSPDS);
cm               1402 sound/pci/cmipci.c 			snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_DBLSPDS);
cm               1405 sound/pci/cmipci.c 		snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1407 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1409 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               1411 sound/pci/cmipci.c 	return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream);
cm               1416 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(subs);
cm               1418 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               1419 sound/pci/cmipci.c 	snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_CAPTURE_SPDF);
cm               1420 sound/pci/cmipci.c 	snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_SPD32SEL);
cm               1421 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               1432 sound/pci/cmipci.c 	struct cmipci *cm = dev_id;
cm               1436 sound/pci/cmipci.c 	status = snd_cmipci_read(cm, CM_REG_INT_STATUS);
cm               1441 sound/pci/cmipci.c 	spin_lock(&cm->reg_lock);
cm               1446 sound/pci/cmipci.c 	snd_cmipci_clear_bit(cm, CM_REG_INT_HLDCLR, mask);
cm               1447 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_INT_HLDCLR, mask);
cm               1448 sound/pci/cmipci.c 	spin_unlock(&cm->reg_lock);
cm               1450 sound/pci/cmipci.c 	if (cm->rmidi && (status & CM_UARTINT))
cm               1451 sound/pci/cmipci.c 		snd_mpu401_uart_interrupt(irq, cm->rmidi->private_data);
cm               1453 sound/pci/cmipci.c 	if (cm->pcm) {
cm               1454 sound/pci/cmipci.c 		if ((status & CM_CHINT0) && cm->channel[0].running)
cm               1455 sound/pci/cmipci.c 			snd_pcm_period_elapsed(cm->channel[0].substream);
cm               1456 sound/pci/cmipci.c 		if ((status & CM_CHINT1) && cm->channel[1].running)
cm               1457 sound/pci/cmipci.c 			snd_pcm_period_elapsed(cm->channel[1].substream);
cm               1598 sound/pci/cmipci.c static int open_device_check(struct cmipci *cm, int mode, struct snd_pcm_substream *subs)
cm               1607 sound/pci/cmipci.c 	mutex_lock(&cm->open_mutex);
cm               1608 sound/pci/cmipci.c 	if (cm->opened[ch]) {
cm               1609 sound/pci/cmipci.c 		mutex_unlock(&cm->open_mutex);
cm               1612 sound/pci/cmipci.c 	cm->opened[ch] = mode;
cm               1613 sound/pci/cmipci.c 	cm->channel[ch].substream = subs;
cm               1616 sound/pci/cmipci.c 		cm->channel[ch].is_dac = 0;
cm               1617 sound/pci/cmipci.c 		spin_lock_irq(&cm->reg_lock);
cm               1618 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENDBDAC);
cm               1619 sound/pci/cmipci.c 		spin_unlock_irq(&cm->reg_lock);
cm               1621 sound/pci/cmipci.c 	mutex_unlock(&cm->open_mutex);
cm               1625 sound/pci/cmipci.c static void close_device_check(struct cmipci *cm, int mode)
cm               1629 sound/pci/cmipci.c 	mutex_lock(&cm->open_mutex);
cm               1630 sound/pci/cmipci.c 	if (cm->opened[ch] == mode) {
cm               1631 sound/pci/cmipci.c 		if (cm->channel[ch].substream) {
cm               1632 sound/pci/cmipci.c 			snd_cmipci_ch_reset(cm, ch);
cm               1633 sound/pci/cmipci.c 			cm->channel[ch].running = 0;
cm               1634 sound/pci/cmipci.c 			cm->channel[ch].substream = NULL;
cm               1636 sound/pci/cmipci.c 		cm->opened[ch] = 0;
cm               1637 sound/pci/cmipci.c 		if (! cm->channel[ch].is_dac) {
cm               1639 sound/pci/cmipci.c 			cm->channel[ch].is_dac = 1;
cm               1640 sound/pci/cmipci.c 			spin_lock_irq(&cm->reg_lock);
cm               1641 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_ENDBDAC);
cm               1642 sound/pci/cmipci.c 			spin_unlock_irq(&cm->reg_lock);
cm               1645 sound/pci/cmipci.c 	mutex_unlock(&cm->open_mutex);
cm               1653 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1657 sound/pci/cmipci.c 	if ((err = open_device_check(cm, CM_OPEN_PLAYBACK, substream)) < 0)
cm               1660 sound/pci/cmipci.c 	if (cm->chip_version == 68) {
cm               1664 sound/pci/cmipci.c 	} else if (cm->chip_version == 55) {
cm               1673 sound/pci/cmipci.c 	cm->dig_pcm_status = cm->dig_status;
cm               1679 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1683 sound/pci/cmipci.c 	if ((err = open_device_check(cm, CM_OPEN_CAPTURE, substream)) < 0)
cm               1686 sound/pci/cmipci.c 	if (cm->chip_version == 68) {	// 8768 only supports 44k/48k recording
cm               1689 sound/pci/cmipci.c 	} else if (cm->chip_version == 55) {
cm               1703 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1707 sound/pci/cmipci.c 	if ((err = open_device_check(cm, CM_OPEN_PLAYBACK2, substream)) < 0) /* use channel B */
cm               1710 sound/pci/cmipci.c 	mutex_lock(&cm->open_mutex);
cm               1711 sound/pci/cmipci.c 	if (! cm->opened[CM_CH_PLAY]) {
cm               1712 sound/pci/cmipci.c 		if (cm->can_multi_ch) {
cm               1713 sound/pci/cmipci.c 			runtime->hw.channels_max = cm->max_channels;
cm               1714 sound/pci/cmipci.c 			if (cm->max_channels == 4)
cm               1716 sound/pci/cmipci.c 			else if (cm->max_channels == 6)
cm               1718 sound/pci/cmipci.c 			else if (cm->max_channels == 8)
cm               1722 sound/pci/cmipci.c 	mutex_unlock(&cm->open_mutex);
cm               1723 sound/pci/cmipci.c 	if (cm->chip_version == 68) {
cm               1727 sound/pci/cmipci.c 	} else if (cm->chip_version == 55) {
cm               1741 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1745 sound/pci/cmipci.c 	if ((err = open_device_check(cm, CM_OPEN_SPDIF_PLAYBACK, substream)) < 0) /* use channel A */
cm               1747 sound/pci/cmipci.c 	if (cm->can_ac3_hw) {
cm               1749 sound/pci/cmipci.c 		if (cm->chip_version >= 37) {
cm               1753 sound/pci/cmipci.c 		if (cm->can_96k) {
cm               1762 sound/pci/cmipci.c 	cm->dig_pcm_status = cm->dig_status;
cm               1768 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1772 sound/pci/cmipci.c 	if ((err = open_device_check(cm, CM_OPEN_SPDIF_CAPTURE, substream)) < 0) /* use channel B */
cm               1775 sound/pci/cmipci.c 	if (cm->can_96k && !(cm->chip_version == 68)) {
cm               1790 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1791 sound/pci/cmipci.c 	close_device_check(cm, CM_OPEN_PLAYBACK);
cm               1797 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1798 sound/pci/cmipci.c 	close_device_check(cm, CM_OPEN_CAPTURE);
cm               1804 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1805 sound/pci/cmipci.c 	close_device_check(cm, CM_OPEN_PLAYBACK2);
cm               1806 sound/pci/cmipci.c 	close_device_check(cm, CM_OPEN_PLAYBACK_MULTI);
cm               1812 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1813 sound/pci/cmipci.c 	close_device_check(cm, CM_OPEN_SPDIF_PLAYBACK);
cm               1819 sound/pci/cmipci.c 	struct cmipci *cm = snd_pcm_substream_chip(substream);
cm               1820 sound/pci/cmipci.c 	close_device_check(cm, CM_OPEN_SPDIF_CAPTURE);
cm               1887 sound/pci/cmipci.c static int snd_cmipci_pcm_new(struct cmipci *cm, int device)
cm               1892 sound/pci/cmipci.c 	err = snd_pcm_new(cm->card, cm->card->driver, device, 1, 1, &pcm);
cm               1899 sound/pci/cmipci.c 	pcm->private_data = cm;
cm               1902 sound/pci/cmipci.c 	cm->pcm = pcm;
cm               1905 sound/pci/cmipci.c 					      snd_dma_pci_data(cm->pci), 64*1024, 128*1024);
cm               1910 sound/pci/cmipci.c static int snd_cmipci_pcm2_new(struct cmipci *cm, int device)
cm               1915 sound/pci/cmipci.c 	err = snd_pcm_new(cm->card, cm->card->driver, device, 1, 0, &pcm);
cm               1921 sound/pci/cmipci.c 	pcm->private_data = cm;
cm               1924 sound/pci/cmipci.c 	cm->pcm2 = pcm;
cm               1927 sound/pci/cmipci.c 					      snd_dma_pci_data(cm->pci), 64*1024, 128*1024);
cm               1932 sound/pci/cmipci.c static int snd_cmipci_pcm_spdif_new(struct cmipci *cm, int device)
cm               1937 sound/pci/cmipci.c 	err = snd_pcm_new(cm->card, cm->card->driver, device, 1, 1, &pcm);
cm               1944 sound/pci/cmipci.c 	pcm->private_data = cm;
cm               1947 sound/pci/cmipci.c 	cm->pcm_spdif = pcm;
cm               1950 sound/pci/cmipci.c 					      snd_dma_pci_data(cm->pci), 64*1024, 128*1024);
cm               1953 sound/pci/cmipci.c 				     snd_pcm_alt_chmaps, cm->max_channels, 0,
cm               2038 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2043 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2044 sound/pci/cmipci.c 	val = (snd_cmipci_mixer_read(cm, reg.left_reg) >> reg.left_shift) & reg.mask;
cm               2049 sound/pci/cmipci.c 		val = (snd_cmipci_mixer_read(cm, reg.right_reg) >> reg.right_shift) & reg.mask;
cm               2054 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2061 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2078 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2079 sound/pci/cmipci.c 	oleft = snd_cmipci_mixer_read(cm, reg.left_reg);
cm               2084 sound/pci/cmipci.c 			snd_cmipci_mixer_write(cm, reg.left_reg, left);
cm               2085 sound/pci/cmipci.c 			oright = snd_cmipci_mixer_read(cm, reg.right_reg);
cm               2090 sound/pci/cmipci.c 		snd_cmipci_mixer_write(cm, reg.right_reg, right);
cm               2092 sound/pci/cmipci.c 		snd_cmipci_mixer_write(cm, reg.left_reg, left);
cm               2093 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2120 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2125 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2126 sound/pci/cmipci.c 	val1 = snd_cmipci_mixer_read(cm, reg.left_reg);
cm               2127 sound/pci/cmipci.c 	val2 = snd_cmipci_mixer_read(cm, reg.right_reg);
cm               2128 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2139 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2145 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2146 sound/pci/cmipci.c 	oval1 = snd_cmipci_mixer_read(cm, reg.left_reg);
cm               2147 sound/pci/cmipci.c 	oval2 = snd_cmipci_mixer_read(cm, reg.right_reg);
cm               2155 sound/pci/cmipci.c 	snd_cmipci_mixer_write(cm, reg.left_reg, val1);
cm               2156 sound/pci/cmipci.c 	snd_cmipci_mixer_write(cm, reg.right_reg, val2);
cm               2157 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2210 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2215 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2216 sound/pci/cmipci.c 	oreg = inb(cm->iobase + reg.left_reg);
cm               2227 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2234 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2239 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2240 sound/pci/cmipci.c 	oreg = inb(cm->iobase + reg.left_reg);
cm               2253 sound/pci/cmipci.c 	outb(nreg, cm->iobase + reg.left_reg);
cm               2254 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2271 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2272 sound/pci/cmipci.c 	if (cm->mixer_insensitive) {
cm               2339 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2341 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2342 sound/pci/cmipci.c 	if (args->ac3_sensitive && cm->mixer_insensitive) {
cm               2344 sound/pci/cmipci.c 		spin_unlock_irq(&cm->reg_lock);
cm               2348 sound/pci/cmipci.c 		val = inb(cm->iobase + args->reg);
cm               2350 sound/pci/cmipci.c 		val = snd_cmipci_read(cm, args->reg);
cm               2352 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2372 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2374 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2375 sound/pci/cmipci.c 	if (args->ac3_sensitive && cm->mixer_insensitive) {
cm               2377 sound/pci/cmipci.c 		spin_unlock_irq(&cm->reg_lock);
cm               2381 sound/pci/cmipci.c 		val = inb(cm->iobase + args->reg);
cm               2383 sound/pci/cmipci.c 		val = snd_cmipci_read(cm, args->reg);
cm               2393 sound/pci/cmipci.c 			outb((unsigned char)val, cm->iobase + args->reg);
cm               2395 sound/pci/cmipci.c 			snd_cmipci_write(cm, args->reg, val);
cm               2397 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2502 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2508 sound/pci/cmipci.c 				 cm->chip_version >= 39 ? 3 : 2, texts);
cm               2511 sound/pci/cmipci.c static inline unsigned int get_line_in_mode(struct cmipci *cm)
cm               2514 sound/pci/cmipci.c 	if (cm->chip_version >= 39) {
cm               2515 sound/pci/cmipci.c 		val = snd_cmipci_read(cm, CM_REG_LEGACY_CTRL);
cm               2519 sound/pci/cmipci.c 	val = snd_cmipci_read_b(cm, CM_REG_MIXER1);
cm               2528 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2530 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2531 sound/pci/cmipci.c 	ucontrol->value.enumerated.item[0] = get_line_in_mode(cm);
cm               2532 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2539 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2542 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2544 sound/pci/cmipci.c 		change = snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_CENTR2LIN | CM_BASE2LIN);
cm               2546 sound/pci/cmipci.c 		change = snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CENTR2LIN | CM_BASE2LIN);
cm               2548 sound/pci/cmipci.c 		change |= snd_cmipci_set_bit_b(cm, CM_REG_MIXER1, CM_REAR2LIN);
cm               2550 sound/pci/cmipci.c 		change |= snd_cmipci_clear_bit_b(cm, CM_REG_MIXER1, CM_REAR2LIN);
cm               2551 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2566 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2568 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2570 sound/pci/cmipci.c 		(snd_cmipci_read_b(cm, CM_REG_MISC) & CM_SPDIF_INVERSE) ? 1 : 0;
cm               2571 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2578 sound/pci/cmipci.c 	struct cmipci *cm = snd_kcontrol_chip(kcontrol);
cm               2581 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2583 sound/pci/cmipci.c 		change = snd_cmipci_set_bit_b(cm, CM_REG_MISC, CM_SPDIF_INVERSE);
cm               2585 sound/pci/cmipci.c 		change = snd_cmipci_clear_bit_b(cm, CM_REG_MISC, CM_SPDIF_INVERSE);
cm               2586 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2653 sound/pci/cmipci.c static int snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_device)
cm               2661 sound/pci/cmipci.c 	if (snd_BUG_ON(!cm || !cm->card))
cm               2664 sound/pci/cmipci.c 	card = cm->card;
cm               2668 sound/pci/cmipci.c 	spin_lock_irq(&cm->reg_lock);
cm               2669 sound/pci/cmipci.c 	snd_cmipci_mixer_write(cm, 0x00, 0x00);		/* mixer reset */
cm               2670 sound/pci/cmipci.c 	spin_unlock_irq(&cm->reg_lock);
cm               2673 sound/pci/cmipci.c 		if (cm->chip_version == 68) {	// 8768 has no PCM volume
cm               2678 sound/pci/cmipci.c 		if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cmipci_mixers[idx], cm))) < 0)
cm               2685 sound/pci/cmipci.c 		err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm));
cm               2689 sound/pci/cmipci.c 	if (! cm->can_multi_ch) {
cm               2690 sound/pci/cmipci.c 		err = snd_ctl_add(cm->card, snd_ctl_new1(&snd_cmipci_nomulti_switch, cm));
cm               2694 sound/pci/cmipci.c 	if (cm->device == PCI_DEVICE_ID_CMEDIA_CM8738 ||
cm               2695 sound/pci/cmipci.c 	    cm->device == PCI_DEVICE_ID_CMEDIA_CM8738B) {
cm               2698 sound/pci/cmipci.c 			err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm));
cm               2702 sound/pci/cmipci.c 		if (cm->can_ac3_hw) {
cm               2703 sound/pci/cmipci.c 			if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_cmipci_spdif_default, cm))) < 0)
cm               2706 sound/pci/cmipci.c 			if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_cmipci_spdif_mask, cm))) < 0)
cm               2709 sound/pci/cmipci.c 			if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_cmipci_spdif_stream, cm))) < 0)
cm               2713 sound/pci/cmipci.c 		if (cm->chip_version <= 37) {
cm               2716 sound/pci/cmipci.c 				err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm));
cm               2722 sound/pci/cmipci.c 	if (cm->chip_version >= 39) {
cm               2725 sound/pci/cmipci.c 			err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm));
cm               2736 sound/pci/cmipci.c 	if (cm->chip_version < 39) {
cm               2737 sound/pci/cmipci.c 		err = snd_ctl_add(cm->card,
cm               2738 sound/pci/cmipci.c 				  snd_ctl_new1(&snd_cmipci_modem_switch, cm));
cm               2749 sound/pci/cmipci.c 		ctl = snd_ctl_find_id(cm->card, &elem_id);
cm               2751 sound/pci/cmipci.c 			cm->mixer_res_ctl[idx] = ctl;
cm               2765 sound/pci/cmipci.c 	struct cmipci *cm = entry->private_data;
cm               2768 sound/pci/cmipci.c 	snd_iprintf(buffer, "%s\n", cm->card->longname);
cm               2772 sound/pci/cmipci.c 		v = inb(cm->iobase + i);
cm               2780 sound/pci/cmipci.c static void snd_cmipci_proc_init(struct cmipci *cm)
cm               2782 sound/pci/cmipci.c 	snd_card_ro_proc_new(cm->card, "cmipci", cm, snd_cmipci_proc_read);
cm               2799 sound/pci/cmipci.c static void query_chip(struct cmipci *cm)
cm               2804 sound/pci/cmipci.c 	detect = snd_cmipci_read(cm, CM_REG_INT_HLDCLR) & CM_CHIP_MASK2;
cm               2807 sound/pci/cmipci.c 		detect = snd_cmipci_read(cm, CM_REG_CHFORMAT) & CM_CHIP_MASK1;
cm               2810 sound/pci/cmipci.c 			cm->chip_version = 33;
cm               2811 sound/pci/cmipci.c 			if (cm->do_soft_ac3)
cm               2812 sound/pci/cmipci.c 				cm->can_ac3_sw = 1;
cm               2814 sound/pci/cmipci.c 				cm->can_ac3_hw = 1;
cm               2817 sound/pci/cmipci.c 			cm->chip_version = 37;
cm               2818 sound/pci/cmipci.c 			cm->can_ac3_hw = 1;
cm               2821 sound/pci/cmipci.c 			cm->chip_version = 39;
cm               2822 sound/pci/cmipci.c 			cm->can_ac3_hw = 1;
cm               2825 sound/pci/cmipci.c 		cm->max_channels = 2;
cm               2828 sound/pci/cmipci.c 			cm->chip_version = 39;
cm               2830 sound/pci/cmipci.c 				cm->max_channels = 6;
cm               2832 sound/pci/cmipci.c 				cm->max_channels = 4;
cm               2834 sound/pci/cmipci.c 			cm->chip_version = 68;
cm               2835 sound/pci/cmipci.c 			cm->max_channels = 8;
cm               2836 sound/pci/cmipci.c 			cm->can_96k = 1;
cm               2838 sound/pci/cmipci.c 			cm->chip_version = 55;
cm               2839 sound/pci/cmipci.c 			cm->max_channels = 6;
cm               2840 sound/pci/cmipci.c 			cm->can_96k = 1;
cm               2842 sound/pci/cmipci.c 		cm->can_ac3_hw = 1;
cm               2843 sound/pci/cmipci.c 		cm->can_multi_ch = 1;
cm               2848 sound/pci/cmipci.c static int snd_cmipci_create_gameport(struct cmipci *cm, int dev)
cm               2871 sound/pci/cmipci.c 		dev_warn(cm->card->dev, "cannot reserve joystick ports\n");
cm               2875 sound/pci/cmipci.c 	cm->gameport = gp = gameport_allocate_port();
cm               2877 sound/pci/cmipci.c 		dev_err(cm->card->dev, "cannot allocate memory for gameport\n");
cm               2882 sound/pci/cmipci.c 	gameport_set_phys(gp, "pci%s/gameport0", pci_name(cm->pci));
cm               2883 sound/pci/cmipci.c 	gameport_set_dev_parent(gp, &cm->pci->dev);
cm               2887 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN);
cm               2889 sound/pci/cmipci.c 	gameport_register_port(cm->gameport);
cm               2894 sound/pci/cmipci.c static void snd_cmipci_free_gameport(struct cmipci *cm)
cm               2896 sound/pci/cmipci.c 	if (cm->gameport) {
cm               2897 sound/pci/cmipci.c 		struct resource *r = gameport_get_port_data(cm->gameport);
cm               2899 sound/pci/cmipci.c 		gameport_unregister_port(cm->gameport);
cm               2900 sound/pci/cmipci.c 		cm->gameport = NULL;
cm               2902 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN);
cm               2907 sound/pci/cmipci.c static inline int snd_cmipci_create_gameport(struct cmipci *cm, int dev) { return -ENOSYS; }
cm               2908 sound/pci/cmipci.c static inline void snd_cmipci_free_gameport(struct cmipci *cm) { }
cm               2911 sound/pci/cmipci.c static int snd_cmipci_free(struct cmipci *cm)
cm               2913 sound/pci/cmipci.c 	if (cm->irq >= 0) {
cm               2914 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN);
cm               2915 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_ENSPDOUT);
cm               2916 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_INT_HLDCLR, 0);  /* disable ints */
cm               2917 sound/pci/cmipci.c 		snd_cmipci_ch_reset(cm, CM_CH_PLAY);
cm               2918 sound/pci/cmipci.c 		snd_cmipci_ch_reset(cm, CM_CH_CAPT);
cm               2919 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL0, 0); /* disable channels */
cm               2920 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_FUNCTRL1, 0);
cm               2923 sound/pci/cmipci.c 		snd_cmipci_mixer_write(cm, 0, 0);
cm               2925 sound/pci/cmipci.c 		free_irq(cm->irq, cm);
cm               2928 sound/pci/cmipci.c 	snd_cmipci_free_gameport(cm);
cm               2929 sound/pci/cmipci.c 	pci_release_regions(cm->pci);
cm               2930 sound/pci/cmipci.c 	pci_disable_device(cm->pci);
cm               2931 sound/pci/cmipci.c 	kfree(cm);
cm               2937 sound/pci/cmipci.c 	struct cmipci *cm = device->device_data;
cm               2938 sound/pci/cmipci.c 	return snd_cmipci_free(cm);
cm               2941 sound/pci/cmipci.c static int snd_cmipci_create_fm(struct cmipci *cm, long fm_port)
cm               2951 sound/pci/cmipci.c 	if (cm->chip_version >= 39) {
cm               2953 sound/pci/cmipci.c 		iosynth = cm->iobase + CM_REG_FM_PCI;
cm               2954 sound/pci/cmipci.c 		err = snd_opl3_create(cm->card, iosynth, iosynth + 2,
cm               2961 sound/pci/cmipci.c 		val = snd_cmipci_read(cm, CM_REG_LEGACY_CTRL) & ~CM_FMSEL_MASK;
cm               2971 sound/pci/cmipci.c 		snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val);
cm               2973 sound/pci/cmipci.c 		snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN);
cm               2975 sound/pci/cmipci.c 		if (snd_opl3_create(cm->card, iosynth, iosynth + 2,
cm               2977 sound/pci/cmipci.c 			dev_err(cm->card->dev,
cm               2984 sound/pci/cmipci.c 		dev_err(cm->card->dev, "cannot create OPL3 hwdep\n");
cm               2990 sound/pci/cmipci.c 	snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_FMSEL_MASK);
cm               2991 sound/pci/cmipci.c 	snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN);
cm               2998 sound/pci/cmipci.c 	struct cmipci *cm;
cm               3018 sound/pci/cmipci.c 	cm = kzalloc(sizeof(*cm), GFP_KERNEL);
cm               3019 sound/pci/cmipci.c 	if (cm == NULL) {
cm               3024 sound/pci/cmipci.c 	spin_lock_init(&cm->reg_lock);
cm               3025 sound/pci/cmipci.c 	mutex_init(&cm->open_mutex);
cm               3026 sound/pci/cmipci.c 	cm->device = pci->device;
cm               3027 sound/pci/cmipci.c 	cm->card = card;
cm               3028 sound/pci/cmipci.c 	cm->pci = pci;
cm               3029 sound/pci/cmipci.c 	cm->irq = -1;
cm               3030 sound/pci/cmipci.c 	cm->channel[0].ch = 0;
cm               3031 sound/pci/cmipci.c 	cm->channel[1].ch = 1;
cm               3032 sound/pci/cmipci.c 	cm->channel[0].is_dac = cm->channel[1].is_dac = 1; /* dual DAC mode */
cm               3035 sound/pci/cmipci.c 		kfree(cm);
cm               3039 sound/pci/cmipci.c 	cm->iobase = pci_resource_start(pci, 0);
cm               3042 sound/pci/cmipci.c 			IRQF_SHARED, KBUILD_MODNAME, cm)) {
cm               3044 sound/pci/cmipci.c 		snd_cmipci_free(cm);
cm               3047 sound/pci/cmipci.c 	cm->irq = pci->irq;
cm               3049 sound/pci/cmipci.c 	pci_set_master(cm->pci);
cm               3055 sound/pci/cmipci.c 	cm->chip_version = 0;
cm               3056 sound/pci/cmipci.c 	cm->max_channels = 2;
cm               3057 sound/pci/cmipci.c 	cm->do_soft_ac3 = soft_ac3[dev];
cm               3061 sound/pci/cmipci.c 		query_chip(cm);
cm               3063 sound/pci/cmipci.c 	if (cm->can_multi_ch)
cm               3064 sound/pci/cmipci.c 		sprintf(cm->card->driver + strlen(cm->card->driver),
cm               3065 sound/pci/cmipci.c 			"-MC%d", cm->max_channels);
cm               3066 sound/pci/cmipci.c 	else if (cm->can_ac3_sw)
cm               3067 sound/pci/cmipci.c 		strcpy(cm->card->driver + strlen(cm->card->driver), "-SWIEC");
cm               3069 sound/pci/cmipci.c 	cm->dig_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
cm               3070 sound/pci/cmipci.c 	cm->dig_pcm_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
cm               3073 sound/pci/cmipci.c 	cm->ctrl = CM_CHADC0;	/* default FUNCNTRL0 */
cm               3075 sound/pci/cmipci.c 	cm->ctrl = CM_CHADC1;	/* default FUNCNTRL0 */
cm               3079 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_RESET);
cm               3080 sound/pci/cmipci.c 	snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_RESET);
cm               3081 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_INT_HLDCLR, 0);	/* disable ints */
cm               3082 sound/pci/cmipci.c 	snd_cmipci_ch_reset(cm, CM_CH_PLAY);
cm               3083 sound/pci/cmipci.c 	snd_cmipci_ch_reset(cm, CM_CH_CAPT);
cm               3084 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_FUNCTRL0, 0);	/* disable channels */
cm               3085 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_FUNCTRL1, 0);
cm               3087 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_CHFORMAT, 0);
cm               3088 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_ENDBDAC|CM_N4SPK3D);
cm               3090 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
cm               3092 sound/pci/cmipci.c 	snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
cm               3094 sound/pci/cmipci.c 	if (cm->chip_version) {
cm               3095 sound/pci/cmipci.c 		snd_cmipci_write_b(cm, CM_REG_EXT_MISC, 0x20); /* magic */
cm               3096 sound/pci/cmipci.c 		snd_cmipci_write_b(cm, CM_REG_EXT_MISC + 1, 0x09); /* more magic */
cm               3099 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_BREQ);
cm               3106 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_TXVX);
cm               3112 sound/pci/cmipci.c 	if (cm->chip_version < 68) {
cm               3115 sound/pci/cmipci.c 		switch (snd_cmipci_read_b(cm, CM_REG_INT_HLDCLR + 3) & 0x03) {
cm               3140 sound/pci/cmipci.c 	if (cm->chip_version < 68)
cm               3141 sound/pci/cmipci.c 		sprintf(modelstr, " (model %d)", cm->chip_version);
cm               3145 sound/pci/cmipci.c 		card->shortname, modelstr, cm->iobase, cm->irq);
cm               3147 sound/pci/cmipci.c 	if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, cm, &ops)) < 0) {
cm               3148 sound/pci/cmipci.c 		snd_cmipci_free(cm);
cm               3152 sound/pci/cmipci.c 	if (cm->chip_version >= 39) {
cm               3153 sound/pci/cmipci.c 		val = snd_cmipci_read_b(cm, CM_REG_MPU_PCI + 1);
cm               3155 sound/pci/cmipci.c 			iomidi = cm->iobase + CM_REG_MPU_PCI;
cm               3171 sound/pci/cmipci.c 			snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val);
cm               3173 sound/pci/cmipci.c 			snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_UART_EN);
cm               3175 sound/pci/cmipci.c 				dev_err(cm->card->dev,
cm               3178 sound/pci/cmipci.c 				snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1,
cm               3185 sound/pci/cmipci.c 	if (cm->chip_version < 68) {
cm               3186 sound/pci/cmipci.c 		err = snd_cmipci_create_fm(cm, fm_port[dev]);
cm               3192 sound/pci/cmipci.c 	snd_cmipci_mixer_write(cm, 0, 0);
cm               3194 sound/pci/cmipci.c 	snd_cmipci_proc_init(cm);
cm               3198 sound/pci/cmipci.c 	if ((err = snd_cmipci_pcm_new(cm, pcm_index)) < 0)
cm               3201 sound/pci/cmipci.c 	if ((err = snd_cmipci_pcm2_new(cm, pcm_index)) < 0)
cm               3204 sound/pci/cmipci.c 	if (cm->can_ac3_hw || cm->can_ac3_sw) {
cm               3206 sound/pci/cmipci.c 		if ((err = snd_cmipci_pcm_spdif_new(cm, pcm_index)) < 0)
cm               3211 sound/pci/cmipci.c 	if ((err = snd_cmipci_mixer_new(cm, pcm_spdif_index)) < 0)
cm               3220 sound/pci/cmipci.c 					       -1, &cm->rmidi)) < 0) {
cm               3221 sound/pci/cmipci.c 			dev_err(cm->card->dev,
cm               3228 sound/pci/cmipci.c 		snd_cmipci_set_pll(cm, rates[val], val);
cm               3233 sound/pci/cmipci.c 	snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_SPDIF48K|CM_SPDF_AC97);
cm               3236 sound/pci/cmipci.c 	if (snd_cmipci_create_gameport(cm, dev) < 0)
cm               3237 sound/pci/cmipci.c 		snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN);
cm               3239 sound/pci/cmipci.c 	*rcmipci = cm;
cm               3253 sound/pci/cmipci.c 	struct cmipci *cm;
cm               3282 sound/pci/cmipci.c 	err = snd_cmipci_create(card, pci, dev, &cm);
cm               3286 sound/pci/cmipci.c 	card->private_data = cm;
cm               3333 sound/pci/cmipci.c 	struct cmipci *cm = card->private_data;
cm               3340 sound/pci/cmipci.c 		cm->saved_regs[i] = snd_cmipci_read(cm, saved_regs[i]);
cm               3342 sound/pci/cmipci.c 		cm->saved_mixers[i] = snd_cmipci_mixer_read(cm, saved_mixers[i]);
cm               3345 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_INT_HLDCLR, 0);
cm               3352 sound/pci/cmipci.c 	struct cmipci *cm = card->private_data;
cm               3356 sound/pci/cmipci.c 	snd_cmipci_write(cm, CM_REG_INT_HLDCLR, 0);
cm               3357 sound/pci/cmipci.c 	snd_cmipci_ch_reset(cm, CM_CH_PLAY);
cm               3358 sound/pci/cmipci.c 	snd_cmipci_ch_reset(cm, CM_CH_CAPT);
cm               3359 sound/pci/cmipci.c 	snd_cmipci_mixer_write(cm, 0, 0);
cm               3363 sound/pci/cmipci.c 		snd_cmipci_write(cm, saved_regs[i], cm->saved_regs[i]);
cm               3365 sound/pci/cmipci.c 		snd_cmipci_mixer_write(cm, saved_mixers[i], cm->saved_mixers[i]);
cm                 99 sound/soc/intel/skylake/skl-sst-dsp.h #define SKL_ADSPCS_CRST_MASK(cm)	((cm) << SKL_ADSPCS_CRST_SHIFT)
cm                106 sound/soc/intel/skylake/skl-sst-dsp.h #define SKL_ADSPCS_CSTALL_MASK(cm)	((cm) << SKL_ADSPCS_CSTALL_SHIFT)
cm                113 sound/soc/intel/skylake/skl-sst-dsp.h #define SKL_ADSPCS_SPA_MASK(cm)		((cm) << SKL_ADSPCS_SPA_SHIFT)
cm                120 sound/soc/intel/skylake/skl-sst-dsp.h #define SKL_ADSPCS_CPA_MASK(cm)		((cm) << SKL_ADSPCS_CPA_SHIFT)
cm                268 sound/soc/sof/intel/hda.h #define HDA_DSP_ADSPCS_CRST_MASK(cm)	((cm) << HDA_DSP_ADSPCS_CRST_SHIFT)
cm                275 sound/soc/sof/intel/hda.h #define HDA_DSP_ADSPCS_CSTALL_MASK(cm)	((cm) << HDA_DSP_ADSPCS_CSTALL_SHIFT)
cm                282 sound/soc/sof/intel/hda.h #define HDA_DSP_ADSPCS_SPA_MASK(cm)	((cm) << HDA_DSP_ADSPCS_SPA_SHIFT)
cm                289 sound/soc/sof/intel/hda.h #define HDA_DSP_ADSPCS_CPA_MASK(cm)	((cm) << HDA_DSP_ADSPCS_CPA_SHIFT)
cm               1885 tools/perf/builtin-record.c 	const struct clockid_map *cm;
cm               1911 tools/perf/builtin-record.c 	for (cm = clockids; cm->name; cm++) {
cm               1912 tools/perf/builtin-record.c 		if (!strcasecmp(str, cm->name)) {
cm               1913 tools/perf/builtin-record.c 			opts->clockid = cm->clockid;
cm                 52 tools/testing/selftests/net/ipv6_flowlabel.c 		struct cmsghdr *cm;
cm                 54 tools/testing/selftests/net/ipv6_flowlabel.c 		cm = (void *)control;
cm                 55 tools/testing/selftests/net/ipv6_flowlabel.c 		cm->cmsg_len = CMSG_LEN(sizeof(flowlabel));
cm                 56 tools/testing/selftests/net/ipv6_flowlabel.c 		cm->cmsg_level = SOL_IPV6;
cm                 57 tools/testing/selftests/net/ipv6_flowlabel.c 		cm->cmsg_type = IPV6_FLOWINFO;
cm                 58 tools/testing/selftests/net/ipv6_flowlabel.c 		*(uint32_t *)CMSG_DATA(cm) = htonl(flowlabel);
cm                 80 tools/testing/selftests/net/ipv6_flowlabel.c 	struct cmsghdr *cm;
cm                104 tools/testing/selftests/net/ipv6_flowlabel.c 	cm = CMSG_FIRSTHDR(&msg);
cm                106 tools/testing/selftests/net/ipv6_flowlabel.c 		if (!cm)
cm                108 tools/testing/selftests/net/ipv6_flowlabel.c 		if (CMSG_NXTHDR(&msg, cm))
cm                110 tools/testing/selftests/net/ipv6_flowlabel.c 		if (cm->cmsg_level != SOL_IPV6 ||
cm                111 tools/testing/selftests/net/ipv6_flowlabel.c 		    cm->cmsg_type != IPV6_FLOWINFO)
cm                114 tools/testing/selftests/net/ipv6_flowlabel.c 		flowlabel = ntohl(*(uint32_t *)CMSG_DATA(cm));
cm                173 tools/testing/selftests/net/msg_zerocopy.c 	struct cmsghdr *cm;
cm                177 tools/testing/selftests/net/msg_zerocopy.c 	cm = (void *)msg->msg_control;
cm                178 tools/testing/selftests/net/msg_zerocopy.c 	cm->cmsg_len = CMSG_LEN(sizeof(cookie));
cm                179 tools/testing/selftests/net/msg_zerocopy.c 	cm->cmsg_level = SOL_RDS;
cm                180 tools/testing/selftests/net/msg_zerocopy.c 	cm->cmsg_type = RDS_CMSG_ZCOPY_COOKIE;
cm                181 tools/testing/selftests/net/msg_zerocopy.c 	memcpy(CMSG_DATA(cm), &cookie, sizeof(cookie));
cm                397 tools/testing/selftests/net/msg_zerocopy.c 	struct cmsghdr *cm;
cm                416 tools/testing/selftests/net/msg_zerocopy.c 	cm = CMSG_FIRSTHDR(&msg);
cm                417 tools/testing/selftests/net/msg_zerocopy.c 	if (!cm)
cm                419 tools/testing/selftests/net/msg_zerocopy.c 	if (!((cm->cmsg_level == SOL_IP && cm->cmsg_type == IP_RECVERR) ||
cm                420 tools/testing/selftests/net/msg_zerocopy.c 	      (cm->cmsg_level == SOL_IPV6 && cm->cmsg_type == IPV6_RECVERR) ||
cm                421 tools/testing/selftests/net/msg_zerocopy.c 	      (cm->cmsg_level == SOL_PACKET && cm->cmsg_type == PACKET_TX_TIMESTAMP)))
cm                423 tools/testing/selftests/net/msg_zerocopy.c 		      cm->cmsg_level, cm->cmsg_type);
cm                425 tools/testing/selftests/net/msg_zerocopy.c 	serr = (void *) CMSG_DATA(cm);
cm                584 tools/testing/selftests/net/nettest.c 	struct cmsghdr *cm;
cm                588 tools/testing/selftests/net/nettest.c 	for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(m);
cm                589 tools/testing/selftests/net/nettest.c 	     m->msg_controllen != 0 && cm;
cm                590 tools/testing/selftests/net/nettest.c 	     cm = (struct cmsghdr *)CMSG_NXTHDR(m, cm)) {
cm                592 tools/testing/selftests/net/nettest.c 		if (cm->cmsg_level == SOL_IP &&
cm                593 tools/testing/selftests/net/nettest.c 		    cm->cmsg_type == IP_PKTINFO) {
cm                596 tools/testing/selftests/net/nettest.c 			pi = (struct in_pktinfo *)(CMSG_DATA(cm));
cm                599 tools/testing/selftests/net/nettest.c 		} else if (cm->cmsg_level == SOL_IPV6 &&
cm                600 tools/testing/selftests/net/nettest.c 			   cm->cmsg_type == IPV6_PKTINFO) {
cm                603 tools/testing/selftests/net/nettest.c 			pi6 = (struct in6_pktinfo *)(CMSG_DATA(cm));
cm                642 tools/testing/selftests/net/nettest.c 	struct cmsghdr *cm;
cm                654 tools/testing/selftests/net/nettest.c 	cm = (struct cmsghdr *)cmsgbuf;
cm                655 tools/testing/selftests/net/nettest.c 	m.msg_control = (caddr_t)cm;
cm                660 tools/testing/selftests/net/nettest.c 		cm->cmsg_level = SOL_IP;
cm                661 tools/testing/selftests/net/nettest.c 		cm->cmsg_type = IP_PKTINFO;
cm                662 tools/testing/selftests/net/nettest.c 		cm->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo));
cm                663 tools/testing/selftests/net/nettest.c 		pi = (struct in_pktinfo *)(CMSG_DATA(cm));
cm                666 tools/testing/selftests/net/nettest.c 		m.msg_controllen = cm->cmsg_len;
cm                671 tools/testing/selftests/net/nettest.c 		cm->cmsg_level = SOL_IPV6;
cm                672 tools/testing/selftests/net/nettest.c 		cm->cmsg_type = IPV6_PKTINFO;
cm                673 tools/testing/selftests/net/nettest.c 		cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo));
cm                675 tools/testing/selftests/net/nettest.c 		pi6 = (struct in6_pktinfo *)(CMSG_DATA(cm));
cm                678 tools/testing/selftests/net/nettest.c 		m.msg_controllen = cm->cmsg_len;
cm                733 tools/testing/selftests/net/nettest.c 	struct cmsghdr *cm = (struct cmsghdr *)cmsgbuf;
cm                742 tools/testing/selftests/net/nettest.c 	m.msg_control = (caddr_t)cm;
cm                 68 tools/testing/selftests/net/so_txtime.c 	struct cmsghdr *cm;
cm                 85 tools/testing/selftests/net/so_txtime.c 		cm = CMSG_FIRSTHDR(&msg);
cm                 86 tools/testing/selftests/net/so_txtime.c 		cm->cmsg_level = SOL_SOCKET;
cm                 87 tools/testing/selftests/net/so_txtime.c 		cm->cmsg_type = SCM_TXTIME;
cm                 88 tools/testing/selftests/net/so_txtime.c 		cm->cmsg_len = CMSG_LEN(sizeof(tdeliver));
cm                 89 tools/testing/selftests/net/so_txtime.c 		memcpy(CMSG_DATA(cm), &tdeliver, sizeof(tdeliver));
cm                148 tools/testing/selftests/net/so_txtime.c 	struct cmsghdr *cm;
cm                170 tools/testing/selftests/net/so_txtime.c 		cm = CMSG_FIRSTHDR(&msg);
cm                171 tools/testing/selftests/net/so_txtime.c 		if (cm->cmsg_level != cfg_errq_level ||
cm                172 tools/testing/selftests/net/so_txtime.c 		    cm->cmsg_type != cfg_errq_type)
cm                174 tools/testing/selftests/net/so_txtime.c 				    cm->cmsg_level, cm->cmsg_type);
cm                176 tools/testing/selftests/net/so_txtime.c 		err = (struct sock_extended_err *)CMSG_DATA(cm);
cm                103 tools/testing/selftests/net/tcp_inq.c 	struct cmsghdr *cm;
cm                166 tools/testing/selftests/net/tcp_inq.c 	for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm))
cm                167 tools/testing/selftests/net/tcp_inq.c 		if (cm->cmsg_level == SOL_TCP && cm->cmsg_type == TCP_CM_INQ)
cm                168 tools/testing/selftests/net/tcp_inq.c 			inq = *((int *) CMSG_DATA(cm));
cm                457 tools/testing/selftests/net/udpgso.c 	struct cmsghdr *cm;
cm                472 tools/testing/selftests/net/udpgso.c 		cm = CMSG_FIRSTHDR(&msg);
cm                473 tools/testing/selftests/net/udpgso.c 		cm->cmsg_level = SOL_UDP;
cm                474 tools/testing/selftests/net/udpgso.c 		cm->cmsg_type = UDP_SEGMENT;
cm                475 tools/testing/selftests/net/udpgso.c 		cm->cmsg_len = CMSG_LEN(sizeof(uint16_t));
cm                476 tools/testing/selftests/net/udpgso.c 		*((uint16_t *) CMSG_DATA(cm)) = gso_len;
cm                298 tools/testing/selftests/net/udpgso_bench_tx.c static void send_ts_cmsg(struct cmsghdr *cm)
cm                302 tools/testing/selftests/net/udpgso_bench_tx.c 	cm->cmsg_level = SOL_SOCKET;
cm                303 tools/testing/selftests/net/udpgso_bench_tx.c 	cm->cmsg_type = SO_TIMESTAMPING;
cm                304 tools/testing/selftests/net/udpgso_bench_tx.c 	cm->cmsg_len = CMSG_LEN(sizeof(cfg_tx_ts));
cm                305 tools/testing/selftests/net/udpgso_bench_tx.c 	valp = (void *)CMSG_DATA(cm);
cm                362 tools/testing/selftests/net/udpgso_bench_tx.c static void send_udp_segment_cmsg(struct cmsghdr *cm)
cm                366 tools/testing/selftests/net/udpgso_bench_tx.c 	cm->cmsg_level = SOL_UDP;
cm                367 tools/testing/selftests/net/udpgso_bench_tx.c 	cm->cmsg_type = UDP_SEGMENT;
cm                368 tools/testing/selftests/net/udpgso_bench_tx.c 	cm->cmsg_len = CMSG_LEN(sizeof(cfg_gso_size));
cm                369 tools/testing/selftests/net/udpgso_bench_tx.c 	valp = (void *)CMSG_DATA(cm);
cm                267 tools/testing/selftests/networking/timestamping/timestamping.c 		struct cmsghdr cm;
cm                217 tools/testing/selftests/networking/timestamping/txtimestamp.c 	struct cmsghdr *cm;
cm                220 tools/testing/selftests/networking/timestamping/txtimestamp.c 	for (cm = CMSG_FIRSTHDR(msg);
cm                221 tools/testing/selftests/networking/timestamping/txtimestamp.c 	     cm && cm->cmsg_len;
cm                222 tools/testing/selftests/networking/timestamping/txtimestamp.c 	     cm = CMSG_NXTHDR(msg, cm)) {
cm                223 tools/testing/selftests/networking/timestamping/txtimestamp.c 		if (cm->cmsg_level == SOL_SOCKET &&
cm                224 tools/testing/selftests/networking/timestamping/txtimestamp.c 		    cm->cmsg_type == SCM_TIMESTAMPING) {
cm                225 tools/testing/selftests/networking/timestamping/txtimestamp.c 			tss = (void *) CMSG_DATA(cm);
cm                226 tools/testing/selftests/networking/timestamping/txtimestamp.c 		} else if ((cm->cmsg_level == SOL_IP &&
cm                227 tools/testing/selftests/networking/timestamping/txtimestamp.c 			    cm->cmsg_type == IP_RECVERR) ||
cm                228 tools/testing/selftests/networking/timestamping/txtimestamp.c 			   (cm->cmsg_level == SOL_IPV6 &&
cm                229 tools/testing/selftests/networking/timestamping/txtimestamp.c 			    cm->cmsg_type == IPV6_RECVERR) ||
cm                230 tools/testing/selftests/networking/timestamping/txtimestamp.c 			   (cm->cmsg_level == SOL_PACKET &&
cm                231 tools/testing/selftests/networking/timestamping/txtimestamp.c 			    cm->cmsg_type == PACKET_TX_TIMESTAMP)) {
cm                232 tools/testing/selftests/networking/timestamping/txtimestamp.c 			serr = (void *) CMSG_DATA(cm);
cm                240 tools/testing/selftests/networking/timestamping/txtimestamp.c 		} else if (cm->cmsg_level == SOL_IP &&
cm                241 tools/testing/selftests/networking/timestamping/txtimestamp.c 			   cm->cmsg_type == IP_PKTINFO) {
cm                242 tools/testing/selftests/networking/timestamping/txtimestamp.c 			struct in_pktinfo *info = (void *) CMSG_DATA(cm);
cm                245 tools/testing/selftests/networking/timestamping/txtimestamp.c 		} else if (cm->cmsg_level == SOL_IPV6 &&
cm                246 tools/testing/selftests/networking/timestamping/txtimestamp.c 			   cm->cmsg_type == IPV6_PKTINFO) {
cm                247 tools/testing/selftests/networking/timestamping/txtimestamp.c 			struct in6_pktinfo *info6 = (void *) CMSG_DATA(cm);
cm                252 tools/testing/selftests/networking/timestamping/txtimestamp.c 					cm->cmsg_level, cm->cmsg_type);