• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ pr_crit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setup_machine_fdt

static void __init setup_machine_fdt(phys_addr_t dt_phys)
{
	void *dt_virt = fixmap_remap_fdt(dt_phys);

	if (!dt_virt || !early_init_dt_scan(dt_virt)) {
		pr_crit("\n"
			"Error: invalid device tree blob at physical address %pa (virtual address 0x%p)\n"
			"The dtb must be 8-byte aligned and must not exceed 2 MB in size\n"
			"\nPlease check your bootloader.",
			&dt_phys, dt_virt);

		while (true)
			cpu_relax();
	}

	dump_stack_set_arch_desc("%s (DT)", of_flat_dt_get_machine_name());
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:17,代码来源:setup.c


示例2: __cpu_die

/*
 * called on the thread which is asking for a CPU to be shutdown -
 * waits until shutdown has completed, or it is timed out.
 */
void __cpu_die(unsigned int cpu)
{
	if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) {
		pr_crit("CPU%u: cpu didn't die\n", cpu);
		return;
	}
	pr_notice("CPU%u: shutdown\n", cpu);

	/*
	 * Now that the dying CPU is beyond the point of no return w.r.t.
	 * in-kernel synchronisation, try to get the firwmare to help us to
	 * verify that it has really left the kernel before we consider
	 * clobbering anything it might still be using.
	 */
	if (!op_cpu_kill(cpu))
		pr_warn("CPU%d may not have shut down cleanly\n", cpu);
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:21,代码来源:smp.c


示例3: msm_wfi_cpu_die

static void msm_wfi_cpu_die(unsigned int cpu)
{
	if (unlikely(cpu != smp_processor_id())) {
		pr_crit("%s: running on %u, should be %u\n",
			__func__, smp_processor_id(), cpu);
		BUG();
	}
	for (;;) {
		lpm_cpu_hotplug_enter(cpu);
		if (secondary_holding_pen_release == cpu_logical_map(cpu)) {
			/*Proper wake up */
			break;
		}
		pr_debug("CPU%u: spurious wakeup call\n", cpu);
		BUG();
	}
}
开发者ID:AudioGod,项目名称:Gods_kernel_yu_msm8916,代码行数:17,代码来源:cpu_ops.c


示例4: ipi_cpu_stop

/*
 * ipi_cpu_stop - handle IPI from smp_send_stop()
 */
static void ipi_cpu_stop(unsigned int cpu)
{
	if (system_state == SYSTEM_BOOTING ||
	    system_state == SYSTEM_RUNNING) {
		raw_spin_lock(&stop_lock);
		pr_crit("CPU%u: stopping\n", cpu);
		dump_stack();
		raw_spin_unlock(&stop_lock);
	}

	set_cpu_online(cpu, false);

	local_irq_disable();

	while (1)
		cpu_relax();
}
开发者ID:Acesine,项目名称:linux,代码行数:20,代码来源:smp.c


示例5: swordfish_init

static void __init swordfish_init(void)
{
	int rc;

	msm_acpu_clock_init(&swordfish_clock_data);
#if defined(CONFIG_MSM_SERIAL_DEBUGGER)
	msm_serial_debug_init(MSM_UART3_PHYS, INT_UART3,
			      &msm_device_uart3.dev, 1);
#endif
	msm_device_hsusb.dev.platform_data = &msm_hsusb_pdata;
	msm_device_touchscreen.dev.platform_data = &swordfish_ts_pdata;
	platform_add_devices(devices, ARRAY_SIZE(devices));
	msm_hsusb_set_vbus_state(1);
	rc = swordfish_init_mmc();
	if (rc)
		pr_crit("%s: MMC init failure (%d)\n", __func__, rc);
}
开发者ID:1041574425,项目名称:Z5S_NX503A_130_kernel,代码行数:17,代码来源:board-swordfish.c


示例6: platform_cpu_die

/*
 * platform-specific code to shutdown a CPU
 *
 * Called with IRQs disabled
 */
void platform_cpu_die(unsigned int cpu)
{
	if (unlikely(cpu != smp_processor_id())) {
		pr_crit("%s: running on %u, should be %u\n",
			__func__, smp_processor_id(), cpu);
		BUG();
	}
	complete(&__get_cpu_var(msm_hotplug_devices).cpu_killed);
	/*
	 * we're ready for shutdown now, so do it
	 */
	cpu_enter_lowpower();
	platform_do_lowpower(cpu);

	pr_notice("CPU%u: %s: normal wakeup\n", cpu, __func__);
	cpu_leave_lowpower();
}
开发者ID:lyfkevin,项目名称:Wind_iproj_ICS_kernel,代码行数:22,代码来源:hotplug.c


示例7: bad_mode

/*
 * bad_mode handles the impossible case in the exception vector.
 */
asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
{
	siginfo_t info;
	void __user *pc = (void __user *)instruction_pointer(regs);
	console_verbose();

	pr_crit("Bad mode in %s handler detected, code 0x%08x\n",
		handler[reason], esr);
	__show_regs(regs);

	info.si_signo = SIGILL;
	info.si_errno = 0;
	info.si_code  = ILL_ILLOPC;
	info.si_addr  = pc;

	arm64_notify_die("Oops - bad mode", regs, &info, 0);
}
开发者ID:tinocyngn,项目名称:sofia-kernel,代码行数:20,代码来源:traps.c


示例8: handle_IPI

/*
 * Main handler for inter-processor interrupts
 */
void handle_IPI(int ipinr, struct pt_regs *regs)
{
	unsigned int cpu = smp_processor_id();
	struct pt_regs *old_regs = set_irq_regs(regs);

	if (ipinr >= IPI_RESCHEDULE && ipinr < IPI_RESCHEDULE + NR_IPI)
		__inc_irq_stat(cpu, ipi_irqs[ipinr - IPI_RESCHEDULE]);

	switch (ipinr) {
	case IPI_RESCHEDULE:
		scheduler_ipi();
		break;

	case IPI_CALL_FUNC:
		irq_enter();
		generic_smp_call_function_interrupt();
		irq_exit();
		break;

	case IPI_CALL_FUNC_SINGLE:
		irq_enter();
		generic_smp_call_function_single_interrupt();
		irq_exit();
		break;

	case IPI_CPU_STOP:
		irq_enter();
		ipi_cpu_stop(cpu);
		irq_exit();
		break;

#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
	case IPI_TIMER:
		irq_enter();
		tick_receive_broadcast();
		irq_exit();
		break;
#endif

	default:
		pr_crit("CPU%u: Unknown IPI message 0x%x\n", cpu, ipinr);
		break;
	}
	set_irq_regs(old_regs);
}
开发者ID:EPDCenter,项目名称:android_kernel_rockchip,代码行数:48,代码来源:smp.c


示例9: at91sam926x_pit_init

/*
 * Set up both clocksource and clockevent support.
 */
void __init at91sam926x_pit_init(void)
{
	unsigned long	pit_rate;
	unsigned	bits;
	int		ret;

	mck = ERR_PTR(-ENOENT);

	/* For device tree enabled device: initialize here */
	of_at91sam926x_pit_init();

	/*
	 * Use our actual MCK to figure out how many MCK/16 ticks per
	 * 1/HZ period (instead of a compile-time constant LATCH).
	 */
	if (IS_ERR(mck))
		mck = clk_get(NULL, "mck");

	if (IS_ERR(mck))
		panic("AT91: PIT: Unable to get mck clk\n");
	pit_rate = clk_get_rate(mck) / 16;
	pit_cycle = (pit_rate + HZ/2) / HZ;
	WARN_ON(((pit_cycle - 1) & ~AT91_PIT_PIV) != 0);

	/* Initialize and enable the timer */
	at91sam926x_pit_reset();

	/*
	 * Register clocksource.  The high order bits of PIV are unused,
	 * so this isn't a 32-bit counter unless we get clockevent irqs.
	 */
	bits = 12 /* PICNT */ + ilog2(pit_cycle) /* PIV */;
	pit_clk.mask = CLOCKSOURCE_MASK(bits);
	clocksource_register_hz(&pit_clk, pit_rate);

	/* Set up irq handler */
	ret = setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq);
	if (ret)
		pr_crit("AT91: PIT: Unable to setup IRQ\n");

	/* Set up and register clockevents */
	pit_clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, pit_clkevt.shift);
	pit_clkevt.cpumask = cpumask_of(0);
	clockevents_register_device(&pit_clkevt);
}
开发者ID:01org,项目名称:KVMGT-kernel,代码行数:48,代码来源:at91sam926x_time.c


示例10: iop_wdt_release

static int iop_wdt_release(struct inode *inode, struct file *file)
{
	int state = 1;
	if (test_bit(WDT_OK_TO_CLOSE, &wdt_status))
		if (test_bit(WDT_ENABLED, &wdt_status))
			state = wdt_disable();

	if (state != 0) {
		wdt_enable();
		pr_crit("Device closed unexpectedly - reset in %lu seconds\n",
			iop_watchdog_timeout());
	}

	clear_bit(WDT_IN_USE, &wdt_status);
	clear_bit(WDT_OK_TO_CLOSE, &wdt_status);

	return 0;
}
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:18,代码来源:iop_wdt.c


示例11: wrn_wdt_init

static int __init wrn_wdt_init(void)
{
	int ret;

	// that's enough, termios struct must be initialized in user space by the WRN Daemon
	filp_port = filp_open(serial_port, O_RDWR | O_NOCTTY | O_NDELAY, 0);

	if (IS_ERR(filp_port)) {
		ret = PTR_ERR(filp_port);
		pr_crit("Unable to open port %s: %d\n", serial_port, ret);
	} else {
		ret = misc_register(&wrn_wdt_miscdev);
		if (ret == 0)
			wdt_timeout();
	}

	return ret;
}
开发者ID:alexcustos,项目名称:wrn-project,代码行数:18,代码来源:wrn_wdt.c


示例12: platform_cpu_die

void platform_cpu_die(unsigned int cpu)
{
	int spurious = 0;

	if (unlikely(cpu != smp_processor_id())) {
		pr_crit("%s: running on %u, should be %u\n",
			__func__, smp_processor_id(), cpu);
		BUG();
	}
	cpu_enter_lowpower();
	platform_do_lowpower(cpu, &spurious);

	pr_debug("CPU%u: %s: normal wakeup\n", cpu, __func__);
	cpu_leave_lowpower();

	if (spurious)
		pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
}
开发者ID:Blackburn29,项目名称:PsycoKernel,代码行数:18,代码来源:hotplug.c


示例13: D1

struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
					   struct jffs2_raw_inode *ri, const unsigned char *data,
					   uint32_t datalen, int alloc_mode)

{
	struct jffs2_full_dnode *fn;
	size_t retlen;
	uint32_t flash_ofs;
	struct kvec vecs[2];
	int ret;
	int retried = 0;
	unsigned long cnt = 2;

	D1(if(je32_to_cpu(ri->hdr_crc) != crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)) {
		pr_crit("Eep. CRC not correct in jffs2_write_dnode()\n");
		BUG();
	}
	   );
开发者ID:Av3ng3,项目名称:Lamobo-D1s,代码行数:18,代码来源:write.c


示例14: exynos_notify

static int exynos_notify(struct thermal_zone_device *dev,
			int count, enum thermal_trip_type type)
{
	char tmustate_string[20];
	char *envp[2];

	if (type == THERMAL_TRIP_CRITICAL) {
		snprintf(tmustate_string, sizeof(tmustate_string), "TMUSTATE=%d",
							THERMAL_TRIP_CRITICAL);
		envp[0] = tmustate_string;
		envp[1] = NULL;

		pr_crit("Try S/W tripping, send uevent %s\n", envp[0]);
		return kobject_uevent_env(&dev->device.kobj, KOBJ_CHANGE, envp);
	}

	return 0;
}
开发者ID:cm-3470,项目名称:android_kernel_samsung_degaslte,代码行数:18,代码来源:exynos_thermal.c


示例15: get_cpu_for_node

static int __init get_cpu_for_node(struct device_node *node)
{
	struct device_node *cpu_node;
	int cpu;

	cpu_node = of_parse_phandle(node, "cpu", 0);
	if (!cpu_node)
		return -1;

	cpu = of_cpu_node_to_id(cpu_node);
	if (cpu >= 0)
		topology_parse_cpu_capacity(cpu_node, cpu);
	else
		pr_crit("Unable to find CPU node for %pOF\n", cpu_node);

	of_node_put(cpu_node);
	return cpu;
}
开发者ID:CCNITSilchar,项目名称:linux,代码行数:18,代码来源:topology.c


示例16: modem_unlock_timeout

static void modem_unlock_timeout(struct work_struct *work)
{
	void __iomem *hwio_modem_reset_addr =
			ioremap_nocache(MODEM_HWIO_MSS_RESET_ADDR, 8);
	pr_crit("%s: Timeout waiting for modem to unlock.\n", MODULE_NAME);

	/* We don't want it happens */
	BUG_ON(!hwio_modem_reset_addr);

	/* Set MSS_MODEM_RESET to 0x0 since the unlock didn't work */
	writel_relaxed(0x0, hwio_modem_reset_addr);
	/* Write needs to go through before the modem is restarted. */
	mb();
	iounmap(hwio_modem_reset_addr);

	subsystem_restart("modem");
	enable_irq(MARM_WDOG_EXPIRED);
}
开发者ID:84506232,项目名称:htc-rider-ics-kernel,代码行数:18,代码来源:subsystem-fatal-8x60.c


示例17: ip_forward_options

void ip_forward_options(struct sk_buff *skb)
{
    struct   ip_options * opt	= &(IPCB(skb)->opt);
    unsigned char * optptr;
    struct rtable *rt = skb_rtable(skb);
    unsigned char *raw = skb_network_header(skb);

    if (opt->rr_needaddr) {
        optptr = (unsigned char *)raw + opt->rr;
        ip_rt_get_source(&optptr[optptr[2]-5], skb, rt);
        opt->is_changed = 1;
    }
    if (opt->srr_is_hit) {
        int srrptr, srrspace;

        optptr = raw + opt->srr;

        for ( srrptr=optptr[2], srrspace = optptr[1];
                srrptr <= srrspace;
                srrptr += 4
            ) {
            if (srrptr + 3 > srrspace)
                break;
            if (memcmp(&opt->nexthop, &optptr[srrptr-1], 4) == 0)
                break;
        }
        if (srrptr + 3 <= srrspace) {
            opt->is_changed = 1;
            ip_hdr(skb)->daddr = opt->nexthop;
            ip_rt_get_source(&optptr[srrptr-1], skb, rt);
            optptr[2] = srrptr+4;
        } else if (net_ratelimit())
            pr_crit("%s(): Argh! Destination lost!\n", __func__);
        if (opt->ts_needaddr) {
            optptr = raw + opt->ts;
            ip_rt_get_source(&optptr[optptr[2]-9], skb, rt);
            opt->is_changed = 1;
        }
    }
    if (opt->is_changed) {
        opt->is_changed = 0;
        ip_send_check(ip_hdr(skb));
    }
}
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:44,代码来源:ip_options.c


示例18: power_down

/**
 * power_down - Shut the machine down for hibernation.
 *
 * Use the platform driver, if configured, to put the system into the sleep
 * state corresponding to hibernation, or try to power it off or reboot,
 * depending on the value of hibernation_mode.
 */
static void power_down(void)
{
#ifdef CONFIG_SUSPEND
	int error;

	if (hibernation_mode == HIBERNATION_SUSPEND) {
		error = suspend_devices_and_enter(PM_SUSPEND_MEM);
		if (error) {
			hibernation_mode = hibernation_ops ?
						HIBERNATION_PLATFORM :
						HIBERNATION_SHUTDOWN;
		} else {
			/* Restore swap signature. */
			error = swsusp_unmark();
			if (error)
				pr_err("Swap will be unusable! Try swapon -a.\n");

			return;
		}
	}
#endif

	switch (hibernation_mode) {
	case HIBERNATION_REBOOT:
		kernel_restart(NULL);
		break;
	case HIBERNATION_PLATFORM:
		hibernation_platform_enter();
		/* Fall through */
	case HIBERNATION_SHUTDOWN:
		if (pm_power_off)
			kernel_power_off();
		break;
	}
	kernel_halt();
	/*
	 * Valid image is on the disk, if we continue we risk serious data
	 * corruption after resume.
	 */
	pr_crit("Power down manually\n");
	while (1)
		cpu_relax();
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:50,代码来源:hibernate.c


示例19: tim_c_read

static cycle_t tim_c_read(struct clocksource *cs)
{
	unsigned int hi;
	unsigned int next_hi;
	unsigned int lo;

	hi = readl(&tim_c->hi);

	for (;;) {
		lo = readl(&tim_c->lo);
		next_hi = readl(&tim_c->hi);
		if (next_hi == hi)
			break;
		hi = next_hi;
	}

pr_crit("%s: read %llx\n", __func__, ((u64) hi << 32) | lo);
	return ((u64) hi << 32) | lo;
}
开发者ID:007kumarraja,项目名称:rockchip-rk3188-mk908,代码行数:19,代码来源:csrc-powertv.c


示例20: cpu_die_early

/*
 * Kill the calling secondary CPU, early in bringup before it is turned
 * online.
 */
void cpu_die_early(void)
{
	int cpu = smp_processor_id();

	pr_crit("CPU%d: will not boot\n", cpu);

	/* Mark this CPU absent */
	set_cpu_present(cpu, 0);

#ifdef CONFIG_HOTPLUG_CPU
	update_cpu_boot_status(CPU_KILL_ME);
	/* Check if we can park ourselves */
	if (cpu_ops[cpu] && cpu_ops[cpu]->cpu_die)
		cpu_ops[cpu]->cpu_die(cpu);
#endif
	update_cpu_boot_status(CPU_STUCK_IN_KERNEL);

	cpu_park_loop();
}
开发者ID:bradbishop,项目名称:linux,代码行数:23,代码来源:smp.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ pr_dbg函数代码示例发布时间:2022-05-30
下一篇:
C++ pr_cont函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap