本文整理汇总了C++中smem_get_entry函数的典型用法代码示例。如果您正苦于以下问题:C++ smem_get_entry函数的具体用法?C++ smem_get_entry怎么用?C++ smem_get_entry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smem_get_entry函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: hfi_process_sys_get_prop_image_version
static void hfi_process_sys_get_prop_image_version(
struct hfi_msg_sys_property_info_packet *pkt)
{
int i = 0;
u32 smem_block_size = 0;
u8 *smem_table_ptr;
char version[256];
const u32 version_string_size = 128;
const u32 smem_image_index_venus = 14 * 128;
u8 *str_image_version;
int req_bytes;
req_bytes = pkt->size - sizeof(*pkt);
if (req_bytes < version_string_size ||
!pkt->rg_property_data[1] ||
pkt->num_properties > 1) {
dprintk(VIDC_ERR,
"hfi_process_sys_get_prop_image_version:bad_pkt: %d",
req_bytes);
return;
}
str_image_version = (u8 *)&pkt->rg_property_data[1];
/*
* The version string returned by firmware includes null
* characters at the start and in between. Replace the null
* characters with space, to print the version info.
*/
for (i = 0; i < version_string_size; i++) {
if (str_image_version[i] != '\0')
version[i] = str_image_version[i];
else
version[i] = ' ';
}
version[i] = '\0';
dprintk(VIDC_DBG, "F/W version: %s\n", version);
smem_table_ptr = smem_get_entry(SMEM_IMAGE_VERSION_TABLE,
&smem_block_size);
if (smem_table_ptr &&
((smem_image_index_venus +
version_string_size) <= smem_block_size))
memcpy(smem_table_ptr + smem_image_index_venus,
str_image_version, version_string_size);
}
开发者ID:marduk191,项目名称:android_kernel_htc_a3ul,代码行数:44,代码来源:hfi_response_handler.c
示例17: smsm_state_cb_hdlr
static void smsm_state_cb_hdlr(void *data, uint32_t old_state,
uint32_t new_state)
{
struct riva_data *drv = data;
char *smem_reset_reason;
char buffer[81];
unsigned smem_reset_size;
unsigned size;
drv->crash = true;
if (!(new_state & SMSM_RESET))
return;
if (drv->rst_in_progress) {
pr_err("riva: Ignoring smsm reset req, restart in progress\n");
return;
}
pr_err("riva: smsm state changed to smsm reset\n");
wcnss_riva_dump_pmic_regs();
smem_reset_reason = smem_get_entry(SMEM_SSR_REASON_WCNSS0,
&smem_reset_size);
if (!smem_reset_reason || !smem_reset_size) {
pr_err("wcnss subsystem failure reason:\n"
"(unknown, smem_get_entry failed)");
} else if (!smem_reset_reason[0]) {
pr_err("wcnss subsystem failure reason:\n"
"(unknown, init string found)");
} else {
size = smem_reset_size < sizeof(buffer) ? smem_reset_size :
(sizeof(buffer) - 1);
memcpy(buffer, smem_reset_reason, size);
buffer[size] = '\0';
pr_err("wcnss subsystem failure reason: %s\n", buffer);
memset(smem_reset_reason, 0, smem_reset_size);
wmb();
}
drv->rst_in_progress = 1;
subsystem_restart_dev(drv->subsys);
}
开发者ID:1041574425,项目名称:Z5S_NX503A_KitKat_kernel,代码行数:43,代码来源:pil-riva.c
示例18: remote_spinlock_dal_init
static int
remote_spinlock_dal_init(const char *chunk_name, _remote_spinlock_t *lock)
{
void *dal_smem_start, *dal_smem_end;
uint32_t dal_smem_size;
struct dal_chunk_header *cur_header;
if (!chunk_name)
return -EINVAL;
#if defined(CONFIG_QCT_LTE)
dal_smem_start = smem_get_entry(SMEM_DAL_AREA, &dal_smem_size);
#else
dal_smem_start = smem_item(SMEM_DAL_AREA, &dal_smem_size);
#endif
if (!dal_smem_start)
return -ENXIO;
dal_smem_end = dal_smem_start + dal_smem_size;
/* Find first chunk header */
cur_header = (struct dal_chunk_header *)
(((uint32_t)dal_smem_start + (4095)) & ~4095);
*lock = NULL;
while (cur_header->size != 0
&& ((uint32_t)(cur_header + 1) < (uint32_t)dal_smem_end)) {
/* Check if chunk name matches */
if (!strncmp(cur_header->name, chunk_name,
DAL_CHUNK_NAME_LENGTH)) {
*lock = (_remote_spinlock_t)&cur_header->lock;
return 0;
}
cur_header = (void *)cur_header + cur_header->size;
}
pr_err("%s: DAL remote lock \"%s\" not found.\n", __func__,
chunk_name);
return -EINVAL;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:42,代码来源:remote_spinlock.c
示例19: check_modem_reset
static int check_modem_reset(void)
{
u32 size;
int ret;
struct lge_hw_smem_id2_type *smem_id2;
smem_id2 = smem_get_entry(SMEM_ID_VENDOR2, &size);
if(smem_id2->modem_reset != 1) {
return 1;
}
printk("modem reset command is invoked.\n");
ret = subsys_modem_restart();
smem_id2->modem_reset = 0;
wmb();
return ret;
}
开发者ID:AbdulrahmanAmir,项目名称:Dorimanx-LG-G2-D802-Kernel,代码行数:20,代码来源:pil-q6v5-mss.c
示例20: update_apps_boot_mode
static int update_apps_boot_mode(void)
{
static int smem_apps_boot_mode;
// LGE_CHANGE_S, [email protected], Don't get the smem data. boot reason is received at lk.
#if 1
smem_apps_boot_mode = get_reboot_mode();
#else
unsigned smem_size;
smem_apps_boot_mode = *(unsigned int *)
(smem_get_entry(SMEM_APPS_BOOT_MODE, &smem_size));
#endif
// LGE_CHANGE_E, [email protected], Don't get the smem data. boot reason is received at lk.
apps_boot_mode = smem_apps_boot_mode;
printk(KERN_INFO "[BootMode] apps_boot_mode = 0x%08x\n", apps_boot_mode);
return apps_boot_mode;
}
开发者ID:RolanDroid,项目名称:lge_MonsterKernel-lproj,代码行数:20,代码来源:lge_boot_mode.c
注:本文中的smem_get_entry函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论