当前位置: 首页>>代码示例>>C++>>正文


C++ smem_get_entry函数代码示例

本文整理汇总了C++中smem_get_entry函数的典型用法代码示例。如果您正苦于以下问题:C++ smem_get_entry函数的具体用法?C++ smem_get_entry怎么用?C++ smem_get_entry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了smem_get_entry函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: debug_read_build_id

static void debug_read_build_id(struct seq_file *s)
{
	unsigned size;
	void *data;

	data = smem_get_entry(SMEM_HW_SW_BUILD_ID, &size, 0,
							SMEM_ANY_HOST_FLAG);
	if (!data)
		return;

	seq_write(s, data, size);
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:12,代码来源:smem_debug.c

示例2: smsm_state_cb_hdlr

static void smsm_state_cb_hdlr(void *data, uint32_t old_state,
					uint32_t new_state)
{
	char *smem_reset_reason;
	char buffer[MAX_BUF_SIZE];
	unsigned smem_reset_size;
	unsigned size;

	riva_crash = true;

	pr_err("%s: smsm state changed\n", MODULE_NAME);

	if (!(new_state & SMSM_RESET))
		return;

	if (ss_restart_inprogress) {
		pr_err("%s: Ignoring smsm reset req, restart in progress\n",
						MODULE_NAME);
		return;
	}

    pr_info(MODULE_NAME ": smsm_state_cb_hdlr, enable_riva_ssr=%d.\n", enable_riva_ssr);

    //ASUS_BSP+++ "for /data/log/ASUSEvtlog"
    ASUSEvtlog("[wcnss]: smsm_state_cb_hdlr, enable_riva_ssr=%d.\n", enable_riva_ssr);
    //ASUS_BSP--- "for /data/log/ASUSEvtlog"

	if (!enable_riva_ssr)
		panic(MODULE_NAME ": SMSM reset request received from Riva");

	smem_reset_reason = smem_get_entry(SMEM_SSR_REASON_WCNSS0,
			&smem_reset_size);

	if (!smem_reset_reason || !smem_reset_size) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, smem_get_entry failed)");
	} else if (!smem_reset_reason[0]) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, init string found)");
	} else {
		size = smem_reset_size < MAX_BUF_SIZE ? smem_reset_size :
			(MAX_BUF_SIZE - 1);
		memcpy(buffer, smem_reset_reason, size);
		buffer[size] = '\0';
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, buffer);
		memset(smem_reset_reason, 0, smem_reset_size);
		wmb();
	}

	ss_restart_inprogress = true;
	subsystem_restart("riva");
}
开发者ID:SmokyBob,项目名称:android_kernel_asus_padfone2,代码行数:53,代码来源:wcnss-ssr-8960.c

示例3: smsm_state_cb_hdlr

static void smsm_state_cb_hdlr(void *data, uint32_t old_state,
					uint32_t new_state)
{
	char *smem_reset_reason;
	char buffer[MAX_BUF_SIZE];
	unsigned smem_reset_size;
	unsigned size;

	riva_crash = true;

	pr_err("%s: smsm state changed\n", MODULE_NAME);

	wcnss_riva_dump_pmic_regs();

	if (!(new_state & SMSM_RESET))
		return;

	if (ss_restart_inprogress) {
		pr_err("%s: Ignoring smsm reset req, restart in progress\n",
						MODULE_NAME);
		return;
	}

	if (!enable_riva_ssr)
		panic(MODULE_NAME ": SMSM reset request received from Riva");

	smem_reset_reason = smem_get_entry(SMEM_SSR_REASON_WCNSS0,
			&smem_reset_size);

	if (!smem_reset_reason || !smem_reset_size) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, smem_get_entry failed)");
	} else if (!smem_reset_reason[0]) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, init string found)");
	} else {
		size = smem_reset_size < MAX_BUF_SIZE ? smem_reset_size :
			(MAX_BUF_SIZE - 1);
		memcpy(buffer, smem_reset_reason, size);
		buffer[size] = '\0';
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, buffer);
#ifdef CONFIG_RAMDUMP_TAGS
		rdtags_add_tag("ssr_reason", buffer, strnlen(buffer, MAX_BUF_SIZE - 1) + 1);
#endif
		memset(smem_reset_reason, 0, smem_reset_size);
		wmb();
	}

	ss_restart_inprogress = true;
	subsystem_restart_dev(riva_8960_dev);
}
开发者ID:dllogram,项目名称:kernel_sony_apq8064,代码行数:52,代码来源:wcnss-ssr-8960.c

示例4: smsm_state_cb_hdlr

static void smsm_state_cb_hdlr(void *data, uint32_t old_state,
					uint32_t new_state)
{
	char *smem_reset_reason;
	char buffer[MAX_BUF_SIZE];
	unsigned smem_reset_size;
	unsigned size;

	riva_crash = true;

	pr_err("%s: smsm state changed\n", MODULE_NAME);

	if (!(new_state & SMSM_RESET))
		return;

	if (ss_restart_inprogress) {
		pr_err("%s: Ignoring smsm reset req, restart in progress\n",
						MODULE_NAME);
		return;
	}

	if (!enable_riva_ssr) {
#if defined(CONFIG_LGE_HANDLE_PANIC)
		lge_set_magic_for_subsystem("wcnss");
		msm_set_restart_mode(0x6d632130);
#endif	
		panic(MODULE_NAME ": SMSM reset request received from Riva");
	}

	smem_reset_reason = smem_get_entry(SMEM_SSR_REASON_WCNSS0,
			&smem_reset_size);

	if (!smem_reset_reason || !smem_reset_size) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, smem_get_entry failed)");
	} else if (!smem_reset_reason[0]) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, init string found)");
	} else {
		size = smem_reset_size < MAX_BUF_SIZE ? smem_reset_size :
			(MAX_BUF_SIZE - 1);
		memcpy(buffer, smem_reset_reason, size);
		buffer[size] = '\0';
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, buffer);
		memset(smem_reset_reason, 0, smem_reset_size);
		wmb();
	}

	ss_restart_inprogress = true;
	subsystem_restart_dev(riva_8960_dev);
}
开发者ID:tkawajir,项目名称:android_kernel_lg_l04e,代码行数:52,代码来源:wcnss-ssr-8960.c

示例5: anx7808_get_sbl_cable_type

int anx7808_get_sbl_cable_type(void)
{
	int cable_type = 0;
	unsigned int *p_cable_type = (unsigned int *)
		(smem_get_entry(SMEM_ID_VENDOR1, &cable_smem_size));

	if (p_cable_type)
		cable_type = *p_cable_type;
	else
		cable_type = 0;

	return cable_type;
}
开发者ID:SerenityS,项目名称:msm8974_G2_render_kernel,代码行数:13,代码来源:slimport.c

示例6: mdm_modem_probe

static int __init mdm_modem_probe(struct platform_device *pdev)
{
	unsigned *br;
	unsigned sz;

	br = (unsigned *) smem_get_entry(SMEM_POWER_ON_STATUS_INFO, &sz);
	if (br != NULL && sz != 0)
		mdm_is_charge_only = *br & BOOT_REASON_CHG_USB || *br & BOOT_REASON_CHG_WALL;
	else
		pr_err("%s: Unable to read boot reason.\n", __func__);

	return mdm_common_create(pdev, &mdm_cb);
}
开发者ID:OmarBizreh,项目名称:Sliding_XZ,代码行数:13,代码来源:mdm2.c

示例7: msm_pm_restart

static void msm_pm_restart(char str, const char *cmd)
{
	int rc;
	unsigned size;

#if defined(CONFIG_MACH_ARUBASLIM_OPEN)
	unsigned int freq = 600000;

	rc = acpuclk_set_rate(0, freq, SETRATE_CPUFREQ);
	if (rc) {
		printk(KERN_ERR "%s(): failed to restore clock rate(%lu)\n",
			__func__, freq);
	}
	pr_info("%s: Current ACPU frequency %ld\n", __func__, acpuclk_get_rate(0));
#endif

	samsung_vendor1_id *smem_vendor1 = \
		(samsung_vendor1_id *)smem_get_entry(SMEM_ID_VENDOR1, &size);

	if (smem_vendor1) {
		smem_vendor1->silent_reset = 0xAEAEAEAE;
		smem_vendor1->reboot_reason = restart_reason;
        smem_vendor1->AP_reserved[0] = 0;
	} else {
		printk(KERN_EMERG "smem_flag is NULL\n");
	}

	pr_debug("The reset reason is %x\n", restart_reason);

	rc = ncp6335d_restart_config();
	if (rc)
		pr_err("Unable to configure NCP6335D for restart\n");

	/* Disable interrupts */
	local_irq_disable();
	local_fiq_disable();

	/*
	 * Take out a flat memory mapping  and will
	 * insert a 1:1 mapping in place of
	 * the user-mode pages to ensure predictable results
	 * This function takes care of flushing the caches
	 * and flushing the TLB.
	 */
	setup_mm_for_reboot();

	msm_proc_comm(PCOM_RESET_CHIP, &restart_reason, 0);

	for (;;)
		;
}
开发者ID:Alexxis2233,项目名称:gcore_kernel,代码行数:51,代码来源:restart_7k.c

示例8: smsm_state_cb_hdlr

static void smsm_state_cb_hdlr(void *data, uint32_t old_state,
					uint32_t new_state)
{
	char *smem_reset_reason;
	char buffer[MAX_BUF_SIZE];
	unsigned smem_reset_size;
	unsigned size;

	riva_crash = true;

	pr_err("%s: smsm state changed\n", MODULE_NAME);

	if (!(new_state & SMSM_RESET))
		return;

	if (get_kernel_flag() & KERNEL_FLAG_ENABLE_SSR_WCNSS)
		smsm_change_state_ssr(SMSM_APPS_STATE, SMSM_RESET, 0, KERNEL_FLAG_ENABLE_SSR_WCNSS);

	if (ss_restart_inprogress) {
		pr_err("%s: Ignoring smsm reset req, restart in progress\n",
						MODULE_NAME);
		return;
	}

	if (!enable_riva_ssr)
		panic(MODULE_NAME ": SMSM reset request received from Riva");

	smem_reset_reason = smem_get_entry(SMEM_SSR_REASON_WCNSS0,
			&smem_reset_size);

	if (!smem_reset_reason || !smem_reset_size) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, smem_get_entry failed)");
	} else if (!smem_reset_reason[0]) {
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, "(unknown, init string found)");
	} else {
		size = smem_reset_size < MAX_BUF_SIZE ? smem_reset_size :
			(MAX_BUF_SIZE - 1);
		memcpy(buffer, smem_reset_reason, size);
		buffer[size] = '\0';
		pr_err("%s: wcnss subsystem failure reason: %s\n",
				__func__, buffer);
		memset(smem_reset_reason, 0, smem_reset_size);
		wmb();
	}

	ss_restart_inprogress = true;
	subsystem_restart("riva");
}
开发者ID:thicklizard,项目名称:komodo_ville,代码行数:50,代码来源:wcnss-ssr-8960.c

示例9: debug_read_build_id

static int debug_read_build_id(char *buf, int max)
{
	unsigned size;
	void *data;

	data = smem_get_entry(SMEM_HW_SW_BUILD_ID, &size);
	if (!data)
		return 0;

	if (size >= max)
		size = max;
	memcpy(buf, data, size);

	return size;
}
开发者ID:Alkalinorap,项目名称:android_kernel_huawei_u8815-ics,代码行数:15,代码来源:smd_debug.c

示例10: create_testmode_status

void create_testmode_status(void)
{
	static uint32_t *p_smem_testmode_status ;
	static int l_testmode_status ;

	int size ;
	
	p_smem_testmode_status = smem_get_entry( SMEM_ID_VENDOR0 ,&size ) ;

	if( p_smem_testmode_status )
	l_testmode_status = *p_smem_testmode_status ;

	create_proc_read_entry("is_phone_testmode", S_IRUGO, NULL , testmode_read_proc,&l_testmode_status);

}
开发者ID:edgestorm,项目名称:lu3700-cm-gin,代码行数:15,代码来源:devices-msm7x27.c

示例11: create_qpst_enable_status

void create_qpst_enable_status(void)
{
	short *p_smem_qpst_enable_status ;
	static 	int qpst_enable_status = -1 ;

	int size ;
	
	p_smem_qpst_enable_status = smem_get_entry( SMEM_ID_VENDOR2 ,&size ) ;

	if( p_smem_qpst_enable_status )
		qpst_enable_status = *p_smem_qpst_enable_status ;

	if(qpst_enable_status!=-1)  //QPST_DISABLED = -1,  osbl_dload_mproc.c
			create_proc_read_entry("qpst_enable", S_IRUGO, NULL , qpst_enable_read_proc,&qpst_enable_status);

}
开发者ID:edgestorm,项目名称:lu3700-cm-gin,代码行数:16,代码来源:devices-msm7x27.c

示例12: debug_modem_err_f3

static int debug_modem_err_f3(char *buf, int max)
{
	char *x;
	int size;
	int i = 0, j = 0;
	unsigned cols = 0;
	char str[4*sizeof(unsigned)+1] = {0};

	x = smem_get_entry(SMEM_ERR_F3_TRACE_LOG, &size);
	if (x != 0) {
		pr_info("smem: F3 TRACE LOG\n");
		while (size > 0 && max - i) {
			if (size >= sizeof(unsigned)) {
				i += scnprintf(buf + i, max - i, "%08x",
					       *((unsigned *) x));
				for (j = 0; j < sizeof(unsigned); ++j)
					if (isprint(*(x+j)))
						str[cols*sizeof(unsigned) + j]
							= *(x+j);
					else
						str[cols*sizeof(unsigned) + j]
							= '-';
				x += sizeof(unsigned);
				size -= sizeof(unsigned);
			} else {
				while (size-- > 0 && max - i)
					i += scnprintf(buf + i, max - i,
						       "%02x",
						       (unsigned) *x++);
				break;
			}
			if (cols == 3) {
				cols = 0;
				str[4*sizeof(unsigned)] = 0;
				i += scnprintf(buf + i, max - i, " %s\n",
					       str);
				str[0] = 0;
			} else {
				cols++;
				i += scnprintf(buf + i, max - i, " ");
			}
		}
		i += scnprintf(buf + i, max - i, "\n");
	}

	return i;
}
开发者ID:Alkalinorap,项目名称:android_kernel_huawei_u8815-ics,代码行数:47,代码来源:smd_debug.c

示例13: create_smpl_reset_status

void create_smpl_reset_status(void)
{
    static uint32_t *p_smem_pwr_on_status ;
    static int l_power_on_status ;

    int size ;

    p_smem_pwr_on_status = smem_get_entry( SMEM_POWER_ON_STATUS_INFO, &size ) ;

    if( p_smem_pwr_on_status )
        l_power_on_status = *p_smem_pwr_on_status ;

    l_power_on_status = (l_power_on_status & 0x8) ? 1 : 0;
    
    create_proc_read_entry("smpl_reset", S_IRUGO, NULL , smpl_reset_read_proc,&l_power_on_status);

}
开发者ID:edgestorm,项目名称:lu3700-cm-gin,代码行数:17,代码来源:devices-msm7x27.c

示例14: msm_pm_power_off

static void msm_pm_power_off(void)
{
	unsigned size = 0;
	samsung_vendor1_id *smem_vendor1 = \
		(samsung_vendor1_id *)smem_get_entry(SMEM_ID_VENDOR1, &size);

	if (smem_vendor1) {
		smem_vendor1->AP_reserved[0] = 0;
	} else {
		printk(KERN_EMERG "smem_flag is NULL\n");
	}	
	
	printk("[msm_pm_power_off] START!!! \n");
	msm_proc_comm(PCOM_POWER_DOWN, 0, 0);
	for (;;)
		;
}
开发者ID:Alexxis2233,项目名称:gcore_kernel,代码行数:17,代码来源:restart_7k.c

示例15: dsps_log_sfr

static void dsps_log_sfr(void)
{
	const char dflt_reason[] = "Died too early due to unknown reason";
	char *smem_reset_reason;
	unsigned smem_reset_size;

	smem_reset_reason = smem_get_entry(SMEM_SSR_REASON_DSPS0,
		&smem_reset_size);
	if (smem_reset_reason != NULL && smem_reset_reason[0] != 0) {
		smem_reset_reason[smem_reset_size-1] = 0;
		pr_err("%s: DSPS failure: %s\nResetting DSPS\n",
			__func__, smem_reset_reason);
		memset(smem_reset_reason, 0, smem_reset_size);
		wmb();
	} else
		pr_err("%s: DSPS failure: %s\nResetting DSPS\n",
			__func__, dflt_reason);
}
开发者ID:Gilbert32,项目名称:dellstreak5-kernel-3.4,代码行数:18,代码来源:pil-dsps.c


注:本文中的smem_get_entry函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。