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

C++ scu_base_addr函数代码示例

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

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



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

示例1: exynos_smp_init_cpus

// ARM10C 20140215
static void __init exynos_smp_init_cpus(void)
{
	void __iomem *scu_base = scu_base_addr();
	// scu_base: 0xF8800000
	unsigned int i, ncores;

        // read_cpuid_part_number(): 0x0000C0F0, ARM_CPU_PART_CORTEX_A9: 0xC090
	if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
		ncores = scu_base ? scu_get_core_count(scu_base) : 1;
	else
		/*
		 * CPU Nodes are passed thru DT and set_cpu_possible
		 * is set by "arm_dt_init_cpu_maps".
		 */
		return;
		// return 수행

	/* sanity check */
	if (ncores > nr_cpu_ids) {
		pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
			ncores, nr_cpu_ids);
		ncores = nr_cpu_ids;
	}

	for (i = 0; i < ncores; i++)
		set_cpu_possible(i, true);
}
开发者ID:BozkurTR,项目名称:kernel,代码行数:28,代码来源:platsmp.c


示例2: r8a7779_get_core_count

static unsigned int __init r8a7779_get_core_count(void)
{
	void __iomem *scu_base = scu_base_addr();

	shmobile_twd_init(&twd_local_timer);
	return scu_get_core_count(scu_base);
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:7,代码来源:smp-r8a7779.c


示例3: brcm_smp_prepare_cpus

static void __init  brcm_smp_prepare_cpus(unsigned int max_cpus)
{
	unsigned int ncores = get_core_count();
	unsigned int cpu = smp_processor_id();
	int i;

	
	/* sanity check */
	if (ncores == 0) {
		printk(KERN_ERR
		       "MPCORE: strange CPU count of 0? Default to 1\n");

		ncores = 1;
	}

	if (ncores > NR_CPUS) {
		printk(KERN_WARNING
		       "MPCORE: no. of cores (%d) greater than configured "
		       "maximum of %d - clipping\n",
		       ncores, NR_CPUS);
		ncores = NR_CPUS;
	}
	printk(KERN_INFO "%d cores has been found\n",ncores);
	/*
	 * are we trying to boot more cores than exist?
	 */
	if (max_cpus > ncores)
		max_cpus = ncores;

	/*
	 * Initialise the present map, which describes the set of CPUs
	 * actually populated at the present time.
	 */
	for (i = 0; i < max_cpus; i++)
		set_cpu_present(i, true);

	/*
	 * Initialise the SCU if there are more than one CPU and let
	 * them know where to start. Note that, on modern versions of
	 * MILO, the "poke" doesn't actually do anything until each
	 * individual core is sent a soft interrupt to get it out of
	 * WFI
	 */
	if (max_cpus > 1) {
		/* nobody is to be released from the pen yet */
		pen_release = -1;

		/*
		 * Enable the local timer or broadcast device for the
		 * boot CPU, but only if we have more than one CPU.
		 */
//		percpu_timer_setup();

		scu_enable(scu_base_addr());

		/* Wakeup other cores in an SoC-specific manner */
		plat_wake_secondary_cpu( max_cpus, platform_secondary_startup );

	}
}
开发者ID:janfj,项目名称:dd-wrt,代码行数:60,代码来源:platsmp.c


示例4: smp_init_cpus

void __init smp_init_cpus(void)
{
	void __iomem *scu_base = scu_base_addr();
	unsigned int i, ncores;

	if (soc_is_exynos4210() || soc_is_exynos4212() ||
	    soc_is_exynos5250())
		ncores = 2;
	else if (soc_is_exynos4412() || soc_is_exynos5410())
		ncores = 4;
	else
		ncores = scu_base ? scu_get_core_count(scu_base) : 1;

	/* sanity check */
	if (ncores > nr_cpu_ids) {
		pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
			ncores, nr_cpu_ids);
		ncores = nr_cpu_ids;
	}

	for (i = 0; i < ncores; i++)
		set_cpu_possible(i, true);

	set_smp_cross_call(gic_raise_softirq);
}
开发者ID:Juanhulk,项目名称:Adam-Kernel-GS4,代码行数:25,代码来源:platsmp.c


示例5: get_core_count

static inline unsigned int get_core_count(void)
{
    void __iomem *scu_base = scu_base_addr();
    if (scu_base)
        return scu_get_core_count(scu_base);
    return 1;
}
开发者ID:nikatshun,项目名称:asuswrt-merlin,代码行数:7,代码来源:platsmp.c


示例6: exynos_smp_prepare_cpus

static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
{
	int i;

	if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
		scu_enable(scu_base_addr());

	/*
	 * Write the address of secondary startup into the
	 * system-wide flags register. The boot monitor waits
	 * until it receives a soft interrupt, and then the
	 * secondary CPU branches to this address.
	 *
	 * Try using firmware operation first and fall back to
	 * boot register if it fails.
	 */
	for (i = 1; i < max_cpus; ++i) {
		unsigned long phys_cpu;
		unsigned long boot_addr;

		phys_cpu = cpu_logical_map(i);
		boot_addr = virt_to_phys(exynos4_secondary_startup);

		if (call_firmware_op(set_cpu_boot_addr, phys_cpu, boot_addr))
			__raw_writel(boot_addr, cpu_boot_reg(phys_cpu));
	}
}
开发者ID:060411121,项目名称:zcl_linux,代码行数:27,代码来源:platsmp.c


示例7: smp_init_cpus

void __init smp_init_cpus(void)
{
	void __iomem *scu_base = scu_base_addr();
	unsigned int i, ncores;

	ncores = scu_base ? scu_get_core_count(scu_base) : 1;

	/* sanity check */
	if (ncores == 0) {
		printk(KERN_ERR
		       "S5PV310: strange CM count of 0? Default to 1\n");

		ncores = 1;
	}

	if (ncores > NR_CPUS) {
		printk(KERN_WARNING
		       "S5PV310: no. of cores (%d) greater than configured "
		       "maximum of %d - clipping\n",
		       ncores, NR_CPUS);
		ncores = NR_CPUS;
	}

	for (i = 0; i < ncores; i++)
		set_cpu_possible(i, true);
}
开发者ID:123456798wil,项目名称:kernel_dell_streak7,代码行数:26,代码来源:platsmp.c


示例8: platform_smp_prepare_cpus

void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
	unsigned int ncores = get_core_count();
	unsigned long addr;
	int i;

	edb_trace(1);
	edb_putstr("smp_prepare_cpus\n");

	/* sanity check */
	if (ncores == 0) {
		printk(KERN_ERR
			"hisik3: strange CM count of 0? Default to 1\n");

		ncores = 1;
	}

	if (ncores > NR_CPUS) {
		printk(KERN_WARNING
		       "hisik3: no. of cores (%d) greater than configured "
		       "maximum of %d - clipping\n",
		       ncores, NR_CPUS);
		ncores = NR_CPUS;
	}

	/*
	 * are we trying to boot more cores than exist?
	 */
	if (max_cpus > ncores) {
		WARN(1, "hisik3: smp max cpus should NOT more cores than exist\n");
		max_cpus = ncores;
	}

	/*
	 * Initialise the present map, which describes the set of CPUs
	 * actually populated at the present time.
	 */
	for (i = 0; i < max_cpus; i++)
		set_cpu_present(i, true);

	scu_enable(scu_base_addr());


	addr = (unsigned long) IO_ADDRESS(MEMORY_AXI_SECOND_CPU_BOOT_ADDR);

	printk("poke_milo addr 0x%lx at 0x%x\n", addr, virt_to_phys(k3v2_secondary_startup));

	/*
	 * Write the address of secondary startup into the system-wide flags
	 * register. The BootMonitor waits for this register to become
	 * non-zero.
	 */
	writel(BSYM(virt_to_phys(k3v2_secondary_startup)), addr);

	wmb();
	flush_cache_all();

	edb_putstr("smp_prepare_cpus out\n");
}
开发者ID:HuaweiHonor4C,项目名称:kernel_hi6210sft_mm,代码行数:59,代码来源:platsmp.c


示例9: wmt_pm_resume

static void wmt_pm_resume(void)
{
#ifdef CONFIG_SMP
	*(volatile unsigned int *)MPCORE_PRIVATE_MEM |= BIT5 | BIT6;
	scu_enable(scu_base_addr());
#endif
	return;
}
开发者ID:androportal,项目名称:apc-rock-II,代码行数:8,代码来源:platsmp.c


示例10: platform_smp_prepare_cpus

/*
 * for arch/arm/kernel/smp.c:smp_prepare_cpus(unsigned int max_cpus)
 */
void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
    void __iomem *scu_base;

    pr_debug("[%s] enter\n", __FUNCTION__);
    scu_base = scu_base_addr();
    scu_enable(scu_base);
}
开发者ID:bigdreamteam,项目名称:loftq-linux,代码行数:11,代码来源:platsmp.c


示例11: scu_enable

/*
 * Setup the SCU
 */
static void scu_enable(void)
{
    u32 scu_ctrl;
    void __iomem *scu_base = scu_base_addr();

    scu_ctrl = __raw_readl(scu_base + SCU_CTRL);
    scu_ctrl |= 1;
    __raw_writel(scu_ctrl, scu_base + SCU_CTRL);
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:12,代码来源:platsmp.c


示例12: smp_prepare_cpus

void __init smp_prepare_cpus(unsigned int max_cpus)
{
	unsigned int ncores = get_core_count();
	unsigned int cpu = smp_processor_id();
	int i;

	/* sanity check */
	if (ncores == 0) {
		printk(KERN_ERR
		       "Realview: strange CM count of 0? Default to 1\n");

		ncores = 1;
	}

	if (ncores > NR_CPUS) {
		printk(KERN_WARNING
		       "Realview: no. of cores (%d) greater than configured "
		       "maximum of %d - clipping\n",
		       ncores, NR_CPUS);
		ncores = NR_CPUS;
	}

	smp_store_cpu_info(cpu);

	/*
	 * are we trying to boot more cores than exist?
	 */
	if (max_cpus > ncores)
		max_cpus = ncores;

	/*
	 * Initialise the present map, which describes the set of CPUs
	 * actually populated at the present time.
	 */
	for (i = 0; i < max_cpus; i++)
		set_cpu_present(i, true);

	/*
	 * Initialise the SCU if there are more than one CPU and let
	 * them know where to start. Note that, on modern versions of
	 * MILO, the "poke" doesn't actually do anything until each
	 * individual core is sent a soft interrupt to get it out of
	 * WFI
	 */
	if (max_cpus > 1) {
		/*
		 * Enable the local timer or broadcast device for the
		 * boot CPU, but only if we have more than one CPU.
		 */
		percpu_timer_setup();

		scu_enable(scu_base_addr());
		poke_milo();
	}
}
开发者ID:BinVul,项目名称:linux2.6.32,代码行数:55,代码来源:platsmp.c


示例13: msm8625_smp_init_cpus

/*
 * Initialise the CPU possible map early - this describes the CPUs
 * which may be present or become present in the system.
 */
void __init msm8625_smp_init_cpus(void)
{
	void __iomem *scu_base = scu_base_addr();

	unsigned int i, ncores;

	ncores = scu_base ? scu_get_core_count(scu_base) : 1;

	for (i = 0; i < ncores; i++)
		set_cpu_possible(i, true);

	set_smp_cross_call(gic_raise_softirq);
}
开发者ID:84506232,项目名称:AK-OnePone,代码行数:17,代码来源:platsmp-8625.c


示例14: modify_scu_cpu_psr

static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
{
	void __iomem *scu_base = scu_base_addr();

	spin_lock(&scu_lock);
	tmp = __raw_readl(scu_base + 8);
	tmp &= ~clr;
	tmp |= set;
	spin_unlock(&scu_lock);

	/* disable cache coherency after releasing the lock */
	__raw_writel(tmp, scu_base + 8);
}
开发者ID:84506232,项目名称:AK-OnePone,代码行数:13,代码来源:smp-r8a7779.c


示例15: get_core_count

static unsigned int __init get_core_count(void)
{
    unsigned int ncores;
    void __iomem *scu_base = scu_base_addr();

    if (scu_base) {
        ncores = __raw_readl(scu_base + SCU_CONFIG);
        ncores = (ncores & 0x03) + 1;
    } else
        ncores = 1;

    return ncores;
}
开发者ID:emreharbutoglu,项目名称:Xperia-X10-Kernel-2.6.29,代码行数:13,代码来源:platsmp.c


示例16: platform_smp_prepare_cpus

void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{

	scu_enable(scu_base_addr());

	/*
	 * Write the address of secondary startup into the
	 * system-wide flags register. The boot monitor waits
	 * until it receives a soft interrupt, and then the
	 * secondary CPU branches to this address.
	 */
	__raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), S5P_VA_SYSRAM);
}
开发者ID:303750856,项目名称:linux-3.1,代码行数:13,代码来源:platsmp.c


示例17: platform_smp_prepare_cpus

void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
	if (!soc_is_exynos5250())
		scu_enable(scu_base_addr());

	/*
                                                   
                                                      
                                                    
                                           
  */
	__raw_writel(virt_to_phys(exynos4_secondary_startup),
			CPU1_BOOT_REG);
}
开发者ID:curbthepain,项目名称:android_kernel_us990_rev,代码行数:14,代码来源:platsmp.c


示例18: platform_smp_prepare_cpus

void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
	int i;

	/*
	 * Initialise the present map, which describes the set of CPUs
	 * actually populated at the present time.
	 */
	for (i = 0; i < max_cpus; i++)
		set_cpu_present(i, true);

	scu_enable(scu_base_addr());
	wakeup_secondary();
}
开发者ID:Abhinav1997,项目名称:android_kernel_riogrande,代码行数:14,代码来源:platsmp.c


示例19: platform_smp_prepare_cpus

void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
	*(volatile unsigned int *)MPCORE_PRIVATE_MEM |= BIT5 | BIT6;
	scu_enable(scu_base_addr());

	/*
	 * Write the address of secondary startup into the
	 * system-wide flags register. The boot monitor waits
	 * until it receives a soft interrupt, and then the
	 * secondary CPU branches to this address.
	 */
	__raw_writel(virt_to_phys(wmt_secondary_startup),
			CPU1_BOOT_REG);
}
开发者ID:androportal,项目名称:apc-rock-II,代码行数:14,代码来源:platsmp.c


示例20: realview_smp_prepare_cpus

static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
{

	scu_enable(scu_base_addr());

	/*
	 * Write the address of secondary startup into the
	 * system-wide flags register. The BootMonitor waits
	 * until it receives a soft interrupt, and then the
	 * secondary CPU branches to this address.
	 */
	__raw_writel(virt_to_phys(versatile_secondary_startup),
		     __io_address(REALVIEW_SYS_FLAGSSET));
}
开发者ID:020gzh,项目名称:linux,代码行数:14,代码来源:platsmp.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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