您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ soft_restart函数代码示例

51自学网 2021-06-03 08:06:38
  C++
这篇教程C++ soft_restart函数代码示例写得很实用,希望能帮到您。

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

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

示例1: imx6q_restart

void imx6q_restart(char mode, const char *cmd){	struct device_node *np;	void __iomem *wdog_base;	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-wdt");	wdog_base = of_iomap(np, 0);	if (!wdog_base)		goto soft;	imx_src_prepare_restart();	/* enable wdog */	writew_relaxed(1 << 2, wdog_base);	/* write twice to ensure the request will not get ignored */	writew_relaxed(1 << 2, wdog_base);	/* wait for reset to assert ... */	mdelay(500);	pr_err("Watchdog reset failed to assert reset/n");	/* delay to allow the serial port to show the message */	mdelay(50);soft:	/* we'll take a jump through zero as a poor second */	soft_restart(0);}
开发者ID:1041574425,项目名称:Z5S_NX503A_130_kernel,代码行数:29,


示例2: iop3xx_restart

void iop3xx_restart(char mode, const char *cmd){	*IOP3XX_PCSR = 0x30;	/*                            */	soft_restart(0);}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:7,


示例3: s5p64x0_restart

void s5p64x0_restart(char mode, const char *cmd){	if (mode != 's')		arch_wdt_reset();	soft_restart(0);}
开发者ID:7L,项目名称:pi_plus,代码行数:7,


示例4: s3c2416_restart

void s3c2416_restart(char mode, const char *cmd){	if (mode == 's')		soft_restart(0);	__raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);}
开发者ID:ARMWorks,项目名称:FA_2451_Linux_Kernel,代码行数:7,


示例5: s5pc100_restart

void s5pc100_restart(char mode, const char *cmd){	if (mode != 's')		samsung_wdt_reset();	soft_restart(0);}
开发者ID:Emerson3074,项目名称:linux,代码行数:7,


示例6: s5pc100_restart

void s5pc100_restart(enum reboot_mode mode, const char *cmd){	if (mode != REBOOT_SOFT)		samsung_wdt_reset();	soft_restart(0);}
开发者ID:1youhun1,项目名称:linux,代码行数:7,


示例7: machine_kexec

void machine_kexec(struct kimage *image){	unsigned long page_list;	unsigned long reboot_code_buffer_phys;	void *reboot_code_buffer;	page_list = image->head & PAGE_MASK;	/* we need both effective and real address here */	reboot_code_buffer_phys =	    page_to_pfn(image->control_code_page) << PAGE_SHIFT;	reboot_code_buffer = page_address(image->control_code_page);	/* Prepare parameters for reboot_code_buffer*/	kexec_start_address = image->start;	kexec_indirection_page = page_list;	kexec_mach_type = machine_arch_type;	kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;	/* copy our kernel relocation code to the control code page */	memcpy(reboot_code_buffer,	       relocate_new_kernel, relocate_new_kernel_size);	flush_icache_range((unsigned long) reboot_code_buffer,			   (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);	printk(KERN_INFO "Bye!/n");	if (kexec_reinit)		kexec_reinit();	soft_restart(reboot_code_buffer_phys);}
开发者ID:alessandroste,项目名称:testBSP,代码行数:34,


示例8: s3c64xx_restart

void s3c64xx_restart(enum reboot_mode mode, const char *cmd){	if (mode != REBOOT_SOFT)		samsung_wdt_reset();	/* if all else fails, or mode was for soft, jump to 0 */	soft_restart(0);}
开发者ID:01org,项目名称:XenGT-Preview-kernel,代码行数:8,


示例9: hawaii_restart

void hawaii_restart(char mode, const char *cmd){#if defined(CONFIG_MFD_BCMPMU) || defined(CONFIG_MFD_BCM_PMU59xxx)	int ret = 0;	if (hard_reset_reason) {		ret = bcmpmu_client_hard_reset(hard_reset_reason);		BUG_ON(ret);	} else {		switch (mode) {		case 's':			/* Jump into X address. Unused.			 * Kept to catch wrong mode*/			soft_restart(0);			break;		case 'h':		default:		/* Clear the magic key when reboot is required */			if (cmd == NULL)				cdebugger_set_upload_magic(0x00);			ret = reset_pwm_padcntrl();			if (ret)				pr_err("%s Failed to reset PADCNTRL"/				"pin for PWM2 to GPIO24:%d/n",/				__func__, ret);			kona_reset(mode, cmd);			break;		}	}#else	switch (mode) {	case 's':		/* Jump into X address. Unused.		* Kept to catch wrong mode*/		soft_restart(0);		break;	case 'h':	default:	/* Clear the magic key when reboot is required */		if (cmd == NULL)			cdebugger_set_upload_magic(0x00);		kona_reset(mode, cmd);		break;	}#endif}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:45,


示例10: rpc_restart

static void rpc_restart(char mode, const char *cmd){	iomd_writeb(0, IOMD_ROMCR0);	/*	 * Jump into the ROM	 */	soft_restart(0);}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:9,


示例11: nuc9xx_restart

void nuc9xx_restart(enum reboot_mode mode, const char *cmd){	if (mode == REBOOT_SOFT) {		/* Jump into ROM at address 0 */		soft_restart(0);	} else {		__raw_writel(WTE | WTRE | WTCLK, WTCR);	}}
开发者ID:01org,项目名称:thunderbolt-software-kernel-tree,代码行数:9,


示例12: arch_save_image

/* * Snapshot kernel memory and reset the system. * * swsusp_save() is executed in the suspend finisher so that the CPU * context pointer and memory are part of the saved image, which is * required by the resume kernel image to restart execution from * swsusp_arch_suspend(). * * soft_restart is not technically needed, but is used to get success * returned from cpu_suspend. * * When soft reboot completes, the hibernation snapshot is written out. */static int notrace arch_save_image(unsigned long unused){	int ret;	ret = swsusp_save();	if (ret == 0)		soft_restart(virt_to_phys(cpu_resume));	return ret;}
开发者ID:gcsuri,项目名称:linux-wetek-3.14.y,代码行数:22,


示例13: spear_restart

void spear_restart(char mode, const char *cmd){	if (mode == 's') {		/* software reset, Jump into ROM at address 0 */		soft_restart(0);	} else {		/* hardware reset, Use on-chip reset capability */		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);	}}
开发者ID:Jackeagle,项目名称:android_kernel_sony_c2305,代码行数:10,


示例14: sa11x0_restart

void sa11x0_restart(char mode, const char *cmd){    if (mode == 's') {        /* Jump into ROM at address 0 */        soft_restart(0);    } else {        /* Use on-chip reset capability */        RSRR = RSRR_SWR;    }}
开发者ID:yangxjzwd1,项目名称:linux,代码行数:10,


示例15: arch_restore_image

/* * Restore page contents for physical pages that were in use during loading * hibernation image.  Switch to idmap_pgd so the physical page tables * are overwritten with the same contents. */static void notrace arch_restore_image(void *unused){	struct pbe *pbe;	cpu_switch_mm(idmap_pgd, &init_mm);	for (pbe = restore_pblist; pbe; pbe = pbe->next)		copy_page(pbe->orig_address, pbe->address);	soft_restart(virt_to_phys(cpu_resume));}
开发者ID:gcsuri,项目名称:linux-wetek-3.14.y,代码行数:15,


示例16: sa11x0_restart

void sa11x0_restart(enum reboot_mode mode, const char *cmd){	if (mode == REBOOT_SOFT) {		/* Jump into ROM at address 0 */		soft_restart(0);	} else {		/* Use on-chip reset capability */		RSRR = RSRR_SWR;	}}
开发者ID:01org,项目名称:KVMGT-kernel,代码行数:10,


示例17: s3c2412_restart

void s3c2412_restart(char mode, const char *cmd){	if (mode == 's')		soft_restart(0);	__raw_writel(0x00, S3C2412_CLKSRC);	__raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST);	mdelay(1);}
开发者ID:Blackburn29,项目名称:PsycoKernel,代码行数:11,


示例18: machine_kexec

void machine_kexec(struct kimage *image){	unsigned long page_list;	unsigned long reboot_code_buffer_phys;	void *reboot_code_buffer;	arch_kexec();	page_list = image->head & PAGE_MASK;	/* we need both effective and real address here */	reboot_code_buffer_phys =	    page_to_pfn(image->control_code_page) << PAGE_SHIFT;	reboot_code_buffer = page_address(image->control_code_page);	/* Prepare parameters for reboot_code_buffer*/#ifdef CONFIG_KEXEC_HARDBOOT	mem_text_write_kernel_word(&kexec_start_address, image->start);	mem_text_write_kernel_word(&kexec_indirection_page, page_list);	mem_text_write_kernel_word(&kexec_mach_type, machine_arch_type);	if (!kexec_boot_atags)		mem_text_write_kernel_word(&kexec_boot_atags, image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET);	mem_text_write_kernel_word(&kexec_hardboot, image->hardboot);#else	kexec_start_address = image->start;	kexec_indirection_page = page_list;	kexec_mach_type = machine_arch_type;	kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;#endif	/* copy our kernel relocation code to the control code page */	memcpy(reboot_code_buffer,	       relocate_new_kernel, relocate_new_kernel_size);	flush_icache_range((unsigned long) reboot_code_buffer,			   (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);	printk(KERN_INFO "Bye!/n");	if (kexec_reinit)		kexec_reinit();#ifdef CONFIG_KEXEC_HARDBOOT	/* Run any final machine-specific shutdown code. */	if (image->hardboot && kexec_hardboot_hook)		kexec_hardboot_hook();#endif	soft_restart(reboot_code_buffer_phys);}
开发者ID:Clumsy-Kernel-Development,项目名称:M8_Kernel,代码行数:52,


示例19: arch_reset

/* * Reset the system. It is called by machine_restart(). */void arch_reset(char mode, const char *cmd){	/* reset the chip */	__mxs_setl(MXS_CLKCTRL_RESET_CHIP, mxs_clkctrl_reset_addr);	pr_err("Failed to assert the chip reset/n");	/* Delay to allow the serial port to show the message */	mdelay(50);	/* We'll take a jump through zero as a poor second */	soft_restart(0);}
开发者ID:BorisTw,项目名称:BBB-kernel,代码行数:16,


示例20: spear_restart

void spear_restart(char mode, const char *cmd){	if (mode == 's') {		/* software reset, Jump into ROM at address 0 */		soft_restart(0);	} else {		/* hardware reset, Use on-chip reset capability */#ifdef CONFIG_ARCH_SPEAR13XX		writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES);#else		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);#endif	}}
开发者ID:4atty,项目名称:linux,代码行数:14,


示例21: machine_kexec

void machine_kexec(struct kimage *image){    unsigned long page_list;    unsigned long reboot_code_buffer_phys;    unsigned long reboot_entry = (unsigned long)relocate_new_kernel;    unsigned long reboot_entry_phys;    void *reboot_code_buffer;    if (num_online_cpus() > 1) {        pr_err("kexec: error: multiple CPUs still online/n");        return;    }    page_list = image->head & PAGE_MASK;    /* we need both effective and real address here */    reboot_code_buffer_phys =        page_to_pfn(image->control_code_page) << PAGE_SHIFT;    reboot_code_buffer = page_address(image->control_code_page);    /* Prepare parameters for reboot_code_buffer*/    mem_text_write_kernel_word(&kexec_start_address, image->start);    mem_text_write_kernel_word(&kexec_indirection_page, page_list);    mem_text_write_kernel_word(&kexec_mach_type, machine_arch_type);    if (!kexec_boot_atags)        mem_text_write_kernel_word(&kexec_boot_atags, image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET);#ifdef CONFIG_KEXEC_HARDBOOT    mem_text_write_kernel_word(&kexec_hardboot, image->hardboot);#endif    /* copy our kernel relocation code to the control code page */    reboot_entry = fncpy(reboot_code_buffer,                         reboot_entry,                         relocate_new_kernel_size);    reboot_entry_phys = (unsigned long)reboot_entry +                        (reboot_code_buffer_phys - (unsigned long)reboot_code_buffer);    printk(KERN_INFO "Bye!/n");    if (kexec_reinit)        kexec_reinit();#ifdef CONFIG_KEXEC_HARDBOOT    /* Run any final machine-specific shutdown code. */    if (image->hardboot && kexec_hardboot_hook)        kexec_hardboot_hook();#endif    soft_restart(reboot_code_buffer_phys);}
开发者ID:tigartist,项目名称:Vindicator,代码行数:50,


示例22: footbridge_restart

void footbridge_restart(char mode, const char *cmd){    if (mode == 's') {        soft_restart(0x41000000);    } else {        *CSR_SA110_CNTL &= ~(1 << 13);        *CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |                           TIMER_CNTL_AUTORELOAD |                           TIMER_CNTL_DIV16;        *CSR_TIMER4_LOAD = 0x2;        *CSR_TIMER4_CLR  = 0;        *CSR_SA110_CNTL |= (1 << 13);    }}
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:15,


示例23: spear_restart

void spear_restart(enum reboot_mode mode, const char *cmd){	if (mode == REBOOT_SOFT) {		/* software reset, Jump into ROM at address 0 */		soft_restart(0);	} else {		/* hardware reset, Use on-chip reset capability */#ifdef CONFIG_ARCH_SPEAR13XX		writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES);#endif#if defined(CONFIG_ARCH_SPEAR3XX) || defined(CONFIG_ARCH_SPEAR6XX)		sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE);#endif	}}
开发者ID:01org,项目名称:KVMGT-kernel,代码行数:15,


示例24: ks8695_restart

void ks8695_restart(char mode, const char *cmd){	unsigned int reg;	if (mode == 's')		soft_restart(0);	/*                */	reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);	__raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);	/*                      */	__raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);	/*                  */	__raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);}
开发者ID:curbthepain,项目名称:android_kernel_us990_rev,代码行数:17,


示例25: ks8695_restart

void ks8695_restart(enum reboot_mode reboot_mode, const char *cmd){	unsigned int reg;	if (reboot_mode == REBOOT_SOFT)		soft_restart(0);	/* disable timer0 */	reg = readl_relaxed(KS8695_TMR_VA + KS8695_TMCON);	writel_relaxed(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);	/* enable watchdog mode */	writel_relaxed((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);	/* re-enable timer0 */	writel_relaxed(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);}
开发者ID:01org,项目名称:KVMGT-kernel,代码行数:17,


示例26: machine_kexec

void machine_kexec(struct kimage *image){	unsigned long page_list;	unsigned long reboot_code_buffer_phys;	unsigned long reboot_entry = (unsigned long)relocate_new_kernel;	unsigned long reboot_entry_phys;	void *reboot_code_buffer;	/*	 * This can only happen if machine_shutdown() failed to disable some	 * CPU, and that can only happen if the checks in	 * machine_kexec_prepare() were not correct. If this fails, we can't	 * reliably kexec anyway, so BUG_ON is appropriate.	 */	BUG_ON(num_online_cpus() > 1);	page_list = image->head & PAGE_MASK;	/* we need both effective and real address here */	reboot_code_buffer_phys =	    page_to_pfn(image->control_code_page) << PAGE_SHIFT;	reboot_code_buffer = page_address(image->control_code_page);	/* Prepare parameters for reboot_code_buffer*/	set_kernel_text_rw();	kexec_start_address = image->start;	kexec_indirection_page = page_list;	kexec_mach_type = machine_arch_type;	kexec_boot_atags = dt_mem ?: image->start - KEXEC_ARM_ZIMAGE_OFFSET				     + KEXEC_ARM_ATAGS_OFFSET;	/* copy our kernel relocation code to the control code page */	reboot_entry = fncpy(reboot_code_buffer,			     reboot_entry,			     relocate_new_kernel_size);	reboot_entry_phys = (unsigned long)reboot_entry +		(reboot_code_buffer_phys - (unsigned long)reboot_code_buffer);	pr_info("Bye!/n");	if (kexec_reinit)		kexec_reinit();	soft_restart(reboot_entry_phys);}
开发者ID:HUANG-YI-CHEN,项目名称:linux-xlnx,代码行数:45,


示例27: s3c2412_restart

void s3c2412_restart(char mode, const char *cmd){	if (mode == 's')		soft_restart(0);	/* errata "Watch-dog/Software Reset Problem" specifies that	 * this reset must be done with the SYSCLK sourced from	 * EXTCLK instead of FOUT to avoid a glitch in the reset	 * mechanism.	 *	 * See the watchdog section of the S3C2412 manual for more	 * information on this fix.	 */	__raw_writel(0x00, S3C2412_CLKSRC);	__raw_writel(S3C2412_SWRST_RESET, S3C2412_SWRST);	mdelay(1);}
开发者ID:ClarkChen633,项目名称:am335x-linux,代码行数:19,


示例28: ixp4xx_restart

void ixp4xx_restart(char mode, const char *cmd){	if ( 1 && mode == 's') {		/*                            */		soft_restart(0);	} else {		/*                              */		/*                                                                                 */		*IXP4XX_OSWK = IXP4XX_WDT_KEY;		/*                                                      */		*IXP4XX_OSWT = 0;		*IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;	}}
开发者ID:curbthepain,项目名称:android_kernel_us990_rev,代码行数:19,


示例29: ixp4xx_restart

void ixp4xx_restart(char mode, const char *cmd){	if ( 1 && mode == 's') {		/* Jump into ROM at address 0 */		soft_restart(0);	} else {		/* Use on-chip reset capability */		/* set the "key" register to enable access to		 * "timer" and "enable" registers		 */		*IXP4XX_OSWK = IXP4XX_WDT_KEY;		/* write 0 to the timer register for an immediate reset */		*IXP4XX_OSWT = 0;		*IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;	}}
开发者ID:8563,项目名称:millennium-sources,代码行数:19,



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


C++ softdevice_sys_evt_handler_set函数代码示例
C++ soft_reset函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。