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

C++ pr_notice函数代码示例

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

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



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

示例1: htifbd_transfer

static void htifbd_transfer(struct htifbd_dev *dev, unsigned long sector,
	unsigned long nsect, char *buf, int direction)
{
	/* HTIF disk address packet */
	volatile struct htifbd_dap {
		unsigned long address;
		unsigned long offset;	/* offset in bytes */
		unsigned long length;	/* length in bytes */
		unsigned long tag;
	} req;
	unsigned long offset, length;
	unsigned long htif_cmd;

	offset = (sector << SECTOR_SIZE_SHIFT);
	length = (nsect << SECTOR_SIZE_SHIFT);

	if ((offset + length) > dev->size) {
		pr_notice(DRIVER_NAME "out-of-bounds access to %s with"
			"offset=%lx length=%lx\n",
			dev->gd->disk_name, offset, length);
		return;
	}

	req.address = (unsigned long)__pa(buf);
	req.offset = offset;
	req.length = length;
	req.tag = 0;

	if (direction == READ) {
		htif_cmd = HTIF_CMD_READ;
	} else if (direction == WRITE) {
		htif_cmd = HTIF_CMD_WRITE;
	} else {
		return;
	}

	mb();
	htif_tohost(dev->dev->minor, htif_cmd, __pa(&req));
	htif_fromhost();
	mb();
}
开发者ID:rishinaidu,项目名称:riscv-linux,代码行数:41,代码来源:htifbd.c


示例2: jailhouse_get_smp_config

static void __init jailhouse_get_smp_config(unsigned int early)
{
	struct ioapic_domain_cfg ioapic_cfg = {
		.type = IOAPIC_DOMAIN_STRICT,
		.ops = &mp_ioapic_irqdomain_ops,
	};
	struct mpc_intsrc mp_irq = {
		.type = MP_INTSRC,
		.irqtype = mp_INT,
		.irqflag = MP_IRQPOL_ACTIVE_HIGH | MP_IRQTRIG_EDGE,
	};
	unsigned int cpu;

	jailhouse_x2apic_init();

	register_lapic_address(0xfee00000);

	for (cpu = 0; cpu < setup_data.num_cpus; cpu++) {
		generic_processor_info(setup_data.cpu_ids[cpu],
				       boot_cpu_apic_version);
	}

	smp_found_config = 1;

	if (setup_data.standard_ioapic) {
		mp_register_ioapic(0, 0xfec00000, gsi_top, &ioapic_cfg);

		/* Register 1:1 mapping for legacy UART IRQs 3 and 4 */
		mp_irq.srcbusirq = mp_irq.dstirq = 3;
		mp_save_irq(&mp_irq);

		mp_irq.srcbusirq = mp_irq.dstirq = 4;
		mp_save_irq(&mp_irq);
	}
}

static void jailhouse_no_restart(void)
{
	pr_notice("Jailhouse: Restart not supported, halting\n");
	machine_halt();
}
开发者ID:grate-driver,项目名称:linux,代码行数:41,代码来源:jailhouse.c


示例3: disable_secondary_clusters_pwr

int disable_secondary_clusters_pwr(void)
{
	int err = 0;
	
	if(g_l2c_share_info.share_cluster_num == 1)
	{
		pr_notice("L2$ share cluster num is only 1, no needs to disable other cluster's pwr.\n");
	}
	else if(g_l2c_share_info.share_cluster_num == 2)
	{
		spm_mtcmos_ctrl_cpusys1(STA_POWER_DOWN, 1);
	}
	//else if(TBD...)
	else
	{
		pr_err("[ERROR] Inllegal L2$ share_cluster_num!\n");
		err = -1;
	}

	return err;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:21,代码来源:l2c_share_normal.c


示例4: cur_l2c_store

static ssize_t cur_l2c_store(struct device_driver *driver, const char *buf,
			     size_t count)
{
	char *p = (char *)buf;
	int option, ret;

	option = simple_strtoul(p, &p, 10);

	if(option >= BORROW_NONE) {
		pr_err("wrong option %d\n", option);
		return count;
	}

	pr_notice("config L2 option: %s\n", log[option]);

	ret = switch_L2(option);

	if (ret < 0)
		pr_err("Config L2 error ret:%d by %s\n", ret, log[option]);
	return count;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:21,代码来源:l2c_share_normal.c


示例5: xen_vmalloc_p2m_tree

void __init xen_vmalloc_p2m_tree(void)
{
	static struct vm_struct vm;

	vm.flags = VM_ALLOC;
	vm.size = ALIGN(sizeof(unsigned long) * xen_max_p2m_pfn,
			PMD_SIZE * PMDS_PER_MID_PAGE);
	vm_area_register_early(&vm, PMD_SIZE * PMDS_PER_MID_PAGE);
	pr_notice("p2m virtual area at %p, size is %lx\n", vm.addr, vm.size);

	xen_max_p2m_pfn = vm.size / sizeof(unsigned long);

	xen_rebuild_p2m_list(vm.addr);

	xen_p2m_addr = vm.addr;
	xen_p2m_size = xen_max_p2m_pfn;

	xen_inv_extra_mem();

	m2p_override_init();
}
开发者ID:abinnj009,项目名称:ubuntu-vivid,代码行数:21,代码来源:p2m.c


示例6: __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)
{
	int err;

	if (!cpu_wait_death(cpu, 5)) {
		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.
	 */
	err = op_cpu_kill(cpu);
	if (err)
		pr_warn("CPU%d may not have shut down cleanly: %d\n",
			cpu, err);
}
开发者ID:bradbishop,项目名称:linux,代码行数:25,代码来源:smp.c


示例7: xen_vmalloc_p2m_tree

void __init xen_vmalloc_p2m_tree(void)
{
    static struct vm_struct vm;
    unsigned long p2m_limit;

    p2m_limit = (phys_addr_t)P2M_LIMIT * 1024 * 1024 * 1024 / PAGE_SIZE;
    vm.flags = VM_ALLOC;
    vm.size = ALIGN(sizeof(unsigned long) * max(xen_max_p2m_pfn, p2m_limit),
                    PMD_SIZE * PMDS_PER_MID_PAGE);
    vm_area_register_early(&vm, PMD_SIZE * PMDS_PER_MID_PAGE);
    pr_notice("p2m virtual area at %p, size is %lx\n", vm.addr, vm.size);

    xen_max_p2m_pfn = vm.size / sizeof(unsigned long);

    xen_rebuild_p2m_list(vm.addr);

    xen_p2m_addr = vm.addr;
    xen_p2m_size = xen_max_p2m_pfn;

    xen_inv_extra_mem();
}
开发者ID:quadcores,项目名称:cbs_4.2.4,代码行数:21,代码来源:p2m.c


示例8: module_i2c_driver

/*
module_i2c_driver(wacom_i2c_driver);
*/
static int __init wacom_i2c_init(void)
{
	int ret = 0;
/*
#if defined(WACOM_SLEEP_WITH_PEN_SLP)
	printk(KERN_ERR "[E-PEN] %s: Sleep type-PEN_SLP pin\n", __func__);
#elif defined(WACOM_SLEEP_WITH_PEN_LDO_EN)
	printk(KERN_ERR "[E-PEN] %s: Sleep type-PEN_LDO_EN pin\n", __func__);
#endif
*/
#ifdef CONFIG_SAMSUNG_LPM_MODE
	if (poweroff_charging) {
		pr_notice("%s : LPM Charging Mode!!\n", __func__);
		return 0;
	}
#endif
	ret = i2c_add_driver(&wacom_i2c_driver);
	if (ret)
		printk(KERN_ERR "[E-PEN] fail to i2c_add_driver\n");
	return ret;
}
开发者ID:adis1313,项目名称:android_kernel_samsung_msm8974,代码行数:24,代码来源:wacom_i2c.c


示例9: dispatch_llseek

loff_t dispatch_llseek(struct file *filp, loff_t off, int whence)
{
	struct phys_mem_session * session = filp->private_data;
	loff_t (*fn) (struct file *, loff_t, int);

	if (session->status.state >= SESSION_NUM_STATES) {
		pr_err("Seeking with an invalid session state of %i!\n",
			session->status.state);
		return -EIO;
	}

	fn = fops_by_session_state[session->status.state].llseek;

	if (fn)
		return fn(filp, off, whence);
	else {
		pr_notice("Session %llu:  llseek not supported in state %i\n",
			   session->session_id, session->status.state);
		return -EIO;
	}
}
开发者ID:danceos,项目名称:rampage,代码行数:21,代码来源:file_operations.c


示例10: toshiba_acpi_notify

static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
{
	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);
	u32 hci_result, value;
	int retries = 3;
	int scancode;

	if (event != 0x80)
		return;

	if (dev->info_supported) {
		scancode = toshiba_acpi_query_hotkey(dev);
		if (scancode < 0)
			pr_err("Failed to query hotkey event\n");
		else if (scancode != 0)
			toshiba_acpi_report_hotkey(dev, scancode);
	} else if (dev->system_event_supported) {
		do {
			hci_read1(dev, HCI_SYSTEM_EVENT, &value, &hci_result);
			switch (hci_result) {
			case HCI_SUCCESS:
				toshiba_acpi_report_hotkey(dev, (int)value);
				break;
			case HCI_NOT_SUPPORTED:
				/*
                                             
                                                 
                                    
     */
				hci_write1(dev, HCI_SYSTEM_EVENT, 1,
					   &hci_result);
				pr_notice("Re-enabled hotkeys\n");
				/*              */
			default:
				retries--;
				break;
			}
		} while (retries && hci_result != HCI_EMPTY);
	}
}
开发者ID:romanbb,项目名称:android_kernel_lge_d851,代码行数:40,代码来源:toshiba_acpi.c


示例11: edmini_v2_init

static void __init edmini_v2_init(void)
{
	/*
	 * Setup basic Orion functions. Need to be called early.
	 */
	orion5x_init();

	orion5x_mpp_conf(edminiv2_mpp_modes);

	/*
	 * Configure peripherals.
	 */
	orion5x_ehci0_init();
	orion5x_eth_init(&edmini_v2_eth_data);
	orion5x_i2c_init();
	orion5x_sata_init(&edmini_v2_sata_data);
	orion5x_uart0_init();

	orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE,
				EDMINI_V2_NOR_BOOT_SIZE);
	platform_device_register(&edmini_v2_nor_flash);
	platform_device_register(&edmini_v2_gpio_leds);
	platform_device_register(&edmini_v2_gpio_buttons);

	pr_notice("edmini_v2: USB device port, flash write and power-off "
		  "are not yet supported.\n");

	/* Get RTC IRQ and register the chip */
	if (gpio_request(EDMINIV2_RTC_GPIO, "rtc") == 0) {
		if (gpio_direction_input(EDMINIV2_RTC_GPIO) == 0)
			edmini_v2_i2c_rtc.irq = gpio_to_irq(EDMINIV2_RTC_GPIO);
		else
			gpio_free(EDMINIV2_RTC_GPIO);
	}

	if (edmini_v2_i2c_rtc.irq == 0)
		pr_warning("edmini_v2: failed to get RTC IRQ\n");

	i2c_register_board_info(0, &edmini_v2_i2c_rtc, 1);
}
开发者ID:15-712,项目名称:linux-2.6,代码行数:40,代码来源:edmini_v2-setup.c


示例12: mce_intel_adjust_timer

unsigned long mce_intel_adjust_timer(unsigned long interval)
{
	int r;

	if (interval < CMCI_POLL_INTERVAL)
		return interval;

	switch (__this_cpu_read(cmci_storm_state)) {
	case CMCI_STORM_ACTIVE:
		/*
		 * We switch back to interrupt mode once the poll timer has
		 * silenced itself. That means no events recorded and the
		 * timer interval is back to our poll interval.
		 */
		__this_cpu_write(cmci_storm_state, CMCI_STORM_SUBSIDED);
		r = atomic_sub_return(1, &cmci_storm_on_cpus);
		if (r == 0)
			pr_notice("CMCI storm subsided: switching to interrupt mode\n");
		/* FALLTHROUGH */

	case CMCI_STORM_SUBSIDED:
		/*
		 * We wait for all cpus to go back to SUBSIDED
		 * state. When that happens we switch back to
		 * interrupt mode.
		 */
		if (!atomic_read(&cmci_storm_on_cpus)) {
			__this_cpu_write(cmci_storm_state, CMCI_STORM_NONE);
			cmci_reenable();
			cmci_recheck();
		}
		return CMCI_POLL_INTERVAL;
	default:
		/*
		 * We have shiny weather. Let the poll do whatever it
		 * thinks.
		 */
		return interval;
	}
}
开发者ID:03199618,项目名称:linux,代码行数:40,代码来源:mce_intel.c


示例13: print_vsd_dev_hw_regs

static void print_vsd_dev_hw_regs(vsd_dev_t *vsd_dev)
{
    if (!LOCAL_DEBUG)
        return;

    pr_notice(LOG_TAG "VSD dev hwregs: \n"
              "CMD: %x \n"
              "RESULT: %x \n"
              "TASKLET_VADDR: %llx \n"
              "dma_paddr: %llx \n"
              "dma_size:  %llx \n"
              "dev_offset: %llx \n"
              "dev_size: %llx \n",
              vsd_dev->hwregs->cmd,
              vsd_dev->hwregs->result,
              vsd_dev->hwregs->tasklet_vaddr,
              vsd_dev->hwregs->dma_paddr,
              vsd_dev->hwregs->dma_size,
              vsd_dev->hwregs->dev_offset,
              vsd_dev->hwregs->dev_size
             );
}
开发者ID:wtf42,项目名称:au-linux-kernel-spring-2016,代码行数:22,代码来源:module.c


示例14: evdi_fb_mmap

static int evdi_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
	unsigned long vma_start = vma->vm_start;
	unsigned long vma_size = vma->vm_end - vma->vm_start;
	unsigned long vma_page_cnt = vma_size >> PAGE_SHIFT;
	unsigned long smem_page_cnt = info->fix.smem_len >> PAGE_SHIFT;
	unsigned long smem_offset = vma->vm_pgoff << PAGE_SHIFT;
	unsigned long smem_pos;

	if (smem_page_cnt < vma->vm_pgoff)
		return -EINVAL;

	if (vma_page_cnt > smem_page_cnt - vma->vm_pgoff)
		return -EINVAL;

	smem_pos = (unsigned long)info->fix.smem_start + smem_offset;

	pr_notice("mmap() framebuffer addr:%lu size:%lu\n", smem_pos, vma_size);

	while (vma_size > 0) {
		unsigned long page = vmalloc_to_pfn((void *)smem_pos);

		if (remap_pfn_range(vma,
				    vma_start,
				    page,
				    PAGE_SIZE,
				    PAGE_SHARED))
			return -EAGAIN;

		vma_start += PAGE_SIZE;
		smem_pos += PAGE_SIZE;
		if (vma_size > PAGE_SIZE)
			vma_size -= PAGE_SIZE;
		else
			vma_size = 0;
	}

	return 0;
}
开发者ID:LLC-Technologies-Collier,项目名称:evdi,代码行数:39,代码来源:evdi_fb.c


示例15: dispatch_read

ssize_t dispatch_read(struct file *filp, char __user *buf, size_t count,
		      loff_t *f_pos)
{
	struct phys_mem_session * session = filp->private_data;
	ssize_t(*fn) (struct file *, char __user *, size_t, loff_t *);

	if (session->status.state >= SESSION_NUM_STATES) {
		pr_err("Reading with an invalid session state of %i!\n",
			session->status.state);
		return -EIO;
	}

	fn = fops_by_session_state[session->status.state].read;

	if (fn)
		return fn(filp, buf, count, f_pos);
	else {
		pr_notice("Session %llu:  read not supported in state %i\n",
			   session->session_id, session->status.state);
		return -EIO;
	}
}
开发者ID:danceos,项目名称:rampage,代码行数:22,代码来源:file_operations.c


示例16: acpi_processor_cstate_first_run_checks

static inline void acpi_processor_cstate_first_run_checks(void)
{
	acpi_status status;
	static int first_run;

	if (first_run)
		return;
	dmi_check_system(processor_power_dmi_table);
	max_cstate = acpi_processor_cstate_check(max_cstate);
	if (max_cstate < ACPI_C_STATES_MAX)
		pr_notice("ACPI: processor limited to max C-state %d\n",
			  max_cstate);
	first_run++;

	if (acpi_gbl_FADT.cst_control && !nocst) {
		status = acpi_os_write_port(acpi_gbl_FADT.smi_command,
					    acpi_gbl_FADT.cst_control, 8);
		if (ACPI_FAILURE(status))
			ACPI_EXCEPTION((AE_INFO, status,
					"Notifying BIOS of _CST ability failed"));
	}
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:22,代码来源:processor_idle.c


示例17: e_compass_fetch_sysconfig_para

static int e_compass_fetch_sysconfig_para(enum input_sensor_type *e_compass_type)
{
	int ret = -1;
	script_item_u	val;
	script_item_value_type_e  type;
	struct sensor_config_info *data = container_of(e_compass_type,
					struct sensor_config_info, input_type);

	type = script_get_item("compass_para", "compass_used", &val);

	if (SCIRPT_ITEM_VALUE_TYPE_INT != type) {
		pr_err("%s: type err  device_used = %d. \n", __func__, val.val);
		goto script_get_err;
	}
	data->sensor_used = val.val;
	
	if (1 == data->sensor_used) {
		type = script_get_item("compass_para", "compass_twi_id", &val);	
		if(SCIRPT_ITEM_VALUE_TYPE_INT != type){
			pr_err("%s: type err twi_id = %d. \n", __func__, val.val);
			goto script_get_err;
		}
		data->twi_id = val.val;

		ret = 0;
		
	} else {
		pr_err("%s: compass_unused. \n",  __func__);
		ret = -1;
	}

	return ret;

script_get_err:
	pr_notice("=========script_get_err============\n");
	return ret;

}
开发者ID:lucatib,项目名称:a33_linux,代码行数:38,代码来源:init-input.c


示例18: ir_fetch_sysconfig_para

/**
 * gyr_fetch_sysconfig_para - get config info from sysconfig.fex file.
 * return value:  
 *                    = 0; success;
 *                    < 0; err
 */
static int ir_fetch_sysconfig_para(enum input_sensor_type *ir_type)
{
	int ret = -1;
	script_item_u	val;
	script_item_value_type_e  type;
	struct ir_config_info *data = container_of(ir_type,
					struct ir_config_info, input_type);
		
	type = script_get_item("s_ir0", "ir_used", &val);
 
	if (SCIRPT_ITEM_VALUE_TYPE_INT != type) {
		pr_err("%s: type err  device_used = %d. \n", __func__, val.val);
		goto script_get_err;
	}
	data->ir_used = val.val;
	
	if (1 == data->ir_used) {
		type = script_get_item("s_ir0", "ir_rx", &val);
		if(SCIRPT_ITEM_VALUE_TYPE_PIO != type){
			pr_err("%s: IR gpio type err! \n", __func__);
			goto script_get_err;
		}
		data->ir_gpio = val.gpio;


		ret = 0;
		
	} else {
		pr_err("%s: ir_unused. \n",  __func__);
		ret = -1;
	}

	return ret;

script_get_err:
	pr_notice("=========script_get_err============\n");
	return ret;
}
开发者ID:lucatib,项目名称:a33_linux,代码行数:44,代码来源:init-input.c


示例19: htifbd_request

static void htifbd_request(struct request_queue *q)
{
	struct request *req;

	req = blk_fetch_request(q);
	while (req != NULL) {
		struct htifbd_dev *dev;

		dev = req->rq_disk->private_data;
		if (req->cmd_type != REQ_TYPE_FS) {
			pr_notice(DRIVER_NAME ": ignoring non-fs request for %s\n",
				req->rq_disk->disk_name);
			__blk_end_request_all(req, -EIO);
			continue;
		}

		htifbd_transfer(dev, blk_rq_pos(req), blk_rq_cur_sectors(req),
			req->buffer, rq_data_dir(req));
		if (!__blk_end_request_cur(req, 0)) {
			req = blk_fetch_request(q);
		}
	}
}
开发者ID:rishinaidu,项目名称:riscv-linux,代码行数:23,代码来源:htifbd.c


示例20: arm_cpuidle_read_ops

/**
 * arm_cpuidle_read_ops() - Initialize the cpuidle ops with the device tree
 * @dn: a pointer to a struct device node corresponding to a cpu node
 * @cpu: the cpu identifier
 *
 * Get the method name defined in the 'enable-method' property, retrieve the
 * associated cpuidle_ops and do a struct copy. This copy is needed because all
 * cpuidle_ops are tagged __initdata and will be unloaded after the init
 * process.
 *
 * Return 0 on sucess, -ENOENT if no 'enable-method' is defined, -EOPNOTSUPP if
 * no cpuidle_ops is registered for the 'enable-method'.
 */
static int __init arm_cpuidle_read_ops(struct device_node *dn, int cpu)
{
	const char *enable_method;
	struct cpuidle_ops *ops;

	enable_method = of_get_property(dn, "enable-method", NULL);
	if (!enable_method)
		return -ENOENT;

	ops = arm_cpuidle_get_ops(enable_method);
	if (!ops) {
		pr_warn("%s: unsupported enable-method property: %s\n",
			dn->full_name, enable_method);
		return -EOPNOTSUPP;
	}

	cpuidle_ops[cpu] = *ops; /* structure copy */

	pr_notice("cpuidle: enable-method property '%s'"
		  " found operations\n", enable_method);

	return 0;
}
开发者ID:magarto,项目名称:linux-rpi-grsecurity,代码行数:36,代码来源:cpuidle.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ pr_perror函数代码示例发布时间:2022-05-30
下一篇:
C++ pr_msg函数代码示例发布时间: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