本文整理汇总了C++中calibrate_delay函数的典型用法代码示例。如果您正苦于以下问题:C++ calibrate_delay函数的具体用法?C++ calibrate_delay怎么用?C++ calibrate_delay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了calibrate_delay函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: start_secondary
/*
* First C code run on the secondary CPUs after being started up by
* the master.
*/
asmlinkage void start_secondary(void)
{
unsigned int cpu;
cpu_probe();
cpu_report();
per_cpu_trap_init();
prom_init_secondary();
/*
* XXX parity protection should be folded in here when it's converted
* to an option instead of something based on .cputype
*/
#ifndef CONFIG_CPU_CAVIUM_OCTEON
/* There is no reason to waste time doing this on Octeon. All the cores
are on the same chip and are the same speed by definition */
calibrate_delay();
#endif
preempt_disable();
cpu = smp_processor_id();
cpu_data[cpu].udelay_val = loops_per_jiffy;
prom_smp_finish();
cpu_set(cpu, cpu_callin_map);
cpu_idle();
}
开发者ID:KrisChaplin,项目名称:LRT2x4_v1.0.2.06_GPL_source,代码行数:33,代码来源:smp.c
示例2: start_secondary
asmlinkage void start_secondary(void)
{
unsigned int cpu = smp_processor_id();
struct mm_struct *mm = &init_mm;
enable_mmu();
mmgrab(mm);
mmget(mm);
current->active_mm = mm;
#ifdef CONFIG_MMU
enter_lazy_tlb(mm, current);
local_flush_tlb_all();
#endif
per_cpu_trap_init();
preempt_disable();
notify_cpu_starting(cpu);
local_irq_enable();
calibrate_delay();
smp_store_cpu_info(cpu);
set_cpu_online(cpu, true);
per_cpu(cpu_state, cpu) = CPU_ONLINE;
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}
开发者ID:bsingharora,项目名称:linux,代码行数:31,代码来源:smp.c
示例3: start_secondary
asmlinkage void __cpuinit start_secondary(void)
{
unsigned int cpu;
struct mm_struct *mm = &init_mm;
atomic_inc(&mm->mm_count);
atomic_inc(&mm->mm_users);
current->active_mm = mm;
BUG_ON(current->mm);
enter_lazy_tlb(mm, current);
per_cpu_trap_init();
preempt_disable();
local_irq_enable();
calibrate_delay();
cpu = smp_processor_id();
smp_store_cpu_info(cpu);
cpu_set(cpu, cpu_online_map);
cpu_idle();
}
开发者ID:janrinze,项目名称:loox7xxport,代码行数:26,代码来源:smp.c
示例4: arch_cpu_pre_online
void __cpuinit arch_cpu_pre_online(void *arg)
{
unsigned int cpuid = hard_smp_processor_id();
register_percpu_ce(cpuid);
calibrate_delay();
smp_store_cpu_info(cpuid);
local_ops->cache_all();
local_ops->tlb_all();
switch(sparc_cpu_model) {
case sun4m:
sun4m_cpu_pre_online(arg);
break;
case sun4d:
sun4d_cpu_pre_online(arg);
break;
case sparc_leon:
leon_cpu_pre_online(arg);
break;
default:
BUG();
}
}
开发者ID:0x000000FF,项目名称:Linux4Edison,代码行数:26,代码来源:smp_32.c
示例5: start_secondary
/*
* First C code run on the secondary CPUs after being started up by
* the master.
*/
asmlinkage void start_secondary(void)
{
unsigned int cpu;
cpu_probe();
cpu_report();
per_cpu_trap_init();
prom_init_secondary();
/*
* XXX parity protection should be folded in here when it's converted
* to an option instead of something based on .cputype
*/
calibrate_delay();
preempt_disable();
cpu = smp_processor_id();
cpu_data[cpu].udelay_val = loops_per_jiffy;
prom_smp_finish();
cpu_set(cpu, cpu_callin_map);
cpu_idle();
}
开发者ID:1x23,项目名称:unifi-gpl,代码行数:29,代码来源:smp.c
示例6: omap2_clk_switch_mpurate_at_boot
/**
* omap2_clk_switch_mpurate_at_boot - switch ARM MPU rate by boot-time argument
* @mpurate_ck_name: clk name of the clock to change rate
*
* Change the ARM MPU clock rate to the rate specified on the command
* line, if one was specified. @mpurate_ck_name should be
* "virt_prcm_set" on OMAP2xxx and "dpll1_ck" on OMAP34xx/OMAP36xx.
* XXX Does not handle voltage scaling - on OMAP2xxx this is currently
* handled by the virt_prcm_set clock, but this should be handled by
* the OPP layer. XXX This is intended to be handled by the OPP layer
* code in the near future and should be removed from the clock code.
* Returns -EINVAL if 'mpurate' is zero or if clk_set_rate() rejects
* the rate, -ENOENT if the struct clk referred to by @mpurate_ck_name
* cannot be found, or 0 upon success.
*/
int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name)
{
struct clk *mpurate_ck;
int r;
if (!mpurate)
return -EINVAL;
mpurate_ck = clk_get(NULL, mpurate_ck_name);
if (WARN(IS_ERR(mpurate_ck), "Failed to get %s.\n", mpurate_ck_name))
return -ENOENT;
r = clk_set_rate(mpurate_ck, mpurate);
if (IS_ERR_VALUE(r)) {
WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n",
mpurate_ck->name, mpurate, r);
return -EINVAL;
}
calibrate_delay();
recalculate_root_clocks();
clk_put(mpurate_ck);
return 0;
}
开发者ID:AdiPat,项目名称:i9003_Kernel,代码行数:41,代码来源:clock.c
示例7: start_secondary
asmlinkage void start_secondary(void)
{
unsigned int cpu = smp_processor_id();
struct mm_struct *mm = &init_mm;
enable_mmu();
atomic_inc(&mm->mm_count);
atomic_inc(&mm->mm_users);
current->active_mm = mm;
enter_lazy_tlb(mm, current);
local_flush_tlb_all();
per_cpu_trap_init();
preempt_disable();
notify_cpu_starting(cpu);
local_irq_enable();
/* Enable local timers */
local_timer_setup(cpu);
calibrate_delay();
smp_store_cpu_info(cpu);
set_cpu_online(cpu, true);
per_cpu(cpu_state, cpu) = CPU_ONLINE;
cpu_startup_entry(CPUHP_ONLINE);
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:31,代码来源:smp.c
示例8: start_secondary
/*
* First C code run on the secondary CPUs after being started up by
* the master.
*/
asmlinkage __cpuinit void start_secondary(void)
{
unsigned int cpu;
#ifdef CONFIG_MIPS_MT_SMTC
/* Only do cpu_probe for first TC of CPU */
if ((read_c0_tcbind() & TCBIND_CURTC) == 0)
#endif /* CONFIG_MIPS_MT_SMTC */
cpu_probe();
cpu_report();
per_cpu_trap_init();
prom_init_secondary();
/*
* XXX parity protection should be folded in here when it's converted
* to an option instead of something based on .cputype
*/
calibrate_delay();
preempt_disable();
cpu = smp_processor_id();
cpu_data[cpu].udelay_val = loops_per_jiffy;
prom_smp_finish();
cpu_set(cpu, cpu_callin_map);
cpu_idle();
}
开发者ID:Einheri,项目名称:wl500g,代码行数:33,代码来源:smp.c
示例9: platform_secondary_init
void __cpuinit platform_secondary_init(unsigned int cpu)
{
local_irq_disable();
/* Clone setup for peripheral interrupt sources from CoreA. */
bfin_write_SICB_IMASK0(bfin_read_SICA_IMASK0());
bfin_write_SICB_IMASK1(bfin_read_SICA_IMASK1());
SSYNC();
/* Clone setup for IARs from CoreA. */
bfin_write_SICB_IAR0(bfin_read_SICA_IAR0());
bfin_write_SICB_IAR1(bfin_read_SICA_IAR1());
bfin_write_SICB_IAR2(bfin_read_SICA_IAR2());
bfin_write_SICB_IAR3(bfin_read_SICA_IAR3());
bfin_write_SICB_IAR4(bfin_read_SICA_IAR4());
bfin_write_SICB_IAR5(bfin_read_SICA_IAR5());
bfin_write_SICB_IAR6(bfin_read_SICA_IAR6());
bfin_write_SICB_IAR7(bfin_read_SICA_IAR7());
SSYNC();
local_irq_enable();
/* Calibrate loops per jiffy value. */
calibrate_delay();
/* Store CPU-private information to the cpu_data array. */
bfin_setup_cpudata(cpu);
/* We are done with local CPU inits, unblock the boot CPU. */
cpu_set(cpu, cpu_callin_map);
spin_lock(&boot_lock);
spin_unlock(&boot_lock);
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:33,代码来源:smp.c
示例10: smp_callin
void __init smp_callin(void)
{
#if 0
calibrate_delay();
smp_store_cpu_info(cpuid);
#endif
}
开发者ID:SimonKagstrom,项目名称:mci500h-linux-2.4.27,代码行数:7,代码来源:smp.c
示例11: move_off_scpll
/* Make sure ACPU clock is not PLL3, so PLL3 can be re-programmed. */
static void __init move_off_scpll(void)
{
struct clkctl_acpu_speed *tgt_s = &acpu_freq_tbl[PLL3_CALIBRATION_IDX];
BUG_ON(tgt_s->pll == ACPU_PLL_3);
select_clk_source(tgt_s);
select_core_source(tgt_s->core_src_sel);
drv_state.current_speed = tgt_s;
calibrate_delay();
}
开发者ID:0-t,项目名称:samsung-kernel-msm7x30,代码行数:11,代码来源:acpuclock-8x50a.c
示例12: clockattach
/*
* Start the real-time clock.
*/
void
clockattach(device_t parent, device_t self, void *aux)
{
const char *clockchip;
unsigned short interval;
int chipfreq;
#ifdef DRACO
u_char dracorev;
#endif
if (eclockfreq == 0)
eclockfreq = 715909; /* guess NTSC */
chipfreq = eclockfreq;
#ifdef DRACO
dracorev = is_draco();
if (dracorev >= 4) {
chipfreq = eclockfreq / 7;
clockchip = "QuickLogic";
} else if (dracorev) {
clockcia = (struct CIA *)CIAAbase;
clockchip = "CIA A";
} else
#endif
{
clockcia = (struct CIA *)CIABbase;
clockchip = "CIA B";
}
amiga_clk_interval = chipfreq / hz;
if (self != NULL) { /* real autoconfig? */
printf(": %s system hz %d hardware hz %d\n", clockchip, hz,
chipfreq);
clk_timecounter.tc_name = clockchip;
clk_timecounter.tc_frequency = chipfreq;
tc_init(&clk_timecounter);
}
#ifdef DRACO
if (dracorev >= 4) {
/*
* can't preload anything beforehand, timer is free_running;
* but need this for delay calibration.
*/
draco_ioct->io_timerlo = amiga_clk_interval & 0xff;
draco_ioct->io_timerhi = amiga_clk_interval >> 8;
calibrate_delay(self);
return;
}
开发者ID:krytarowski,项目名称:netbsd-current-src-sys,代码行数:58,代码来源:clock.c
示例13: smp_callin
/*
* Report back to the Boot Processor during boot time or to the caller processor
* during CPU online.
*/
static void smp_callin(void)
{
int cpuid, phys_id;
/*
* If waken up by an INIT in an 82489DX configuration
* cpu_callout_mask guarantees we don't get here before
* an INIT_deassert IPI reaches our local APIC, so it is
* now safe to touch our local APIC.
*/
cpuid = smp_processor_id();
/*
* (This works even if the APIC is not enabled.)
*/
phys_id = read_apic_id();
/*
* the boot CPU has finished the init stage and is spinning
* on callin_map until we finish. We are free to set up this
* CPU, first the APIC. (this is probably redundant on most
* boards)
*/
apic_ap_setup();
/*
* Save our processor parameters. Note: this information
* is needed for clock calibration.
*/
smp_store_cpu_info(cpuid);
/*
* Get our bogomips.
* Update loops_per_jiffy in cpu_data. Previous call to
* smp_store_cpu_info() stored a value that is close but not as
* accurate as the value just calculated.
*/
calibrate_delay();
cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy;
pr_debug("Stack at about %p\n", &cpuid);
/*
* This must be done before setting cpu_online_mask
* or calling notify_cpu_starting.
*/
set_cpu_sibling_map(raw_smp_processor_id());
wmb();
notify_cpu_starting(cpuid);
/*
* Allow the master to continue.
*/
cpumask_set_cpu(cpuid, cpu_callin_mask);
}
开发者ID:90d0fm15ch13f,项目名称:Arch-kernel-LOKI,代码行数:59,代码来源:smpboot.c
示例14: smp_callin
static void __init
smp_callin (void)
{
int cpuid, phys_id;
extern void ia64_init_itm(void);
#ifdef CONFIG_PERFMON
extern void pfm_init_percpu(void);
#endif
cpuid = smp_processor_id();
phys_id = hard_smp_processor_id();
if (test_and_set_bit(cpuid, &cpu_online_map)) {
printk("huh, phys CPU#0x%x, CPU#0x%x already present??\n", phys_id, cpuid);
BUG();
}
smp_setup_percpu_timer();
/*
* Synchronize the ITC with the BP
*/
Dprintk("Going to syncup ITC with BP.\n");
ia64_sync_itc(0);
/*
* Get our bogomips.
*/
ia64_init_itm();
/*
* Set I/O port base per CPU
*/
ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase));
#ifdef CONFIG_IA64_MCA
ia64_mca_cmc_vector_setup(); /* Setup vector on AP & enable */
ia64_mca_check_errors(); /* For post-failure MCA error logging */
#endif
#ifdef CONFIG_PERFMON
pfm_init_percpu();
#endif
local_irq_enable();
calibrate_delay();
local_cpu_data->loops_per_jiffy = loops_per_jiffy;
/*
* Allow the master to continue.
*/
set_bit(cpuid, &cpu_callin_map);
Dprintk("Stack on CPU %d at about %p\n",cpuid, &cpuid);
}
开发者ID:huangyukun2012,项目名称:linux-2.4.21,代码行数:54,代码来源:smpboot.c
示例15: smp_online
static void __init smp_online(void)
{
int cpu_id = smp_processor_id();
local_irq_enable();
/* Get our bogomips. */
calibrate_delay();
/* Save our processor parameters */
smp_store_cpu_info(cpu_id);
cpu_set(cpu_id, cpu_online_map);
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:14,代码来源:smpboot.c
示例16: secondary_start_kernel
void secondary_start_kernel(void)
{
struct mm_struct *mm = &init_mm;
unsigned int cpu = smp_processor_id();
init_mmu();
#ifdef CONFIG_DEBUG_KERNEL
if (boot_secondary_processors == 0) {
pr_debug("%s: boot_secondary_processors:%d; Hanging cpu:%d\n",
__func__, boot_secondary_processors, cpu);
for (;;)
__asm__ __volatile__ ("waiti " __stringify(LOCKLEVEL));
}
pr_debug("%s: boot_secondary_processors:%d; Booting cpu:%d\n",
__func__, boot_secondary_processors, cpu);
#endif
/* Init EXCSAVE1 */
secondary_trap_init();
/* All kernel threads share the same mm context. */
mmget(mm);
mmgrab(mm);
current->active_mm = mm;
cpumask_set_cpu(cpu, mm_cpumask(mm));
enter_lazy_tlb(mm, current);
preempt_disable();
trace_hardirqs_off();
calibrate_delay();
notify_cpu_starting(cpu);
secondary_init_irq();
local_timer_setup(cpu);
set_cpu_online(cpu, true);
local_irq_enable();
complete(&cpu_running);
cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:48,代码来源:smp.c
示例17: smp_online
static void __init smp_online(void)
{
int cpu_id = smp_processor_id();
notify_cpu_starting(cpu_id);
local_irq_enable();
/* Get our bogomips. */
calibrate_delay();
/* Save our processor parameters */
smp_store_cpu_info(cpu_id);
set_cpu_online(cpu_id, true);
}
开发者ID:ChaOSChriS,项目名称:bricked-flo,代码行数:16,代码来源:smpboot.c
示例18: start_kernel
/*
* This is the kernel main routine. When the boot process is completed, this
* function is called.
*/
void start_kernel(void) {
int pid, i;
char *names[N_CONSOLES] = { "PRG1", "PRG2", "PRG3",
"PRG4", "PRG5", "PRG6" };
// init traps
init_traps();
// initialize IRQs
init_irq();
// initialize the tty driver. The tty is composed by a keyboard driver
// that read input keys a print the relative ASCII code on video.
tty_init();
// initialize the timer.
time_init();
// initialize the scheduler
sched_init();
printk("Kernel info: %u bytes, start at 0x%x0 end at 0x%x0.\n",
&__KERNEL_END__-K_START, K_START, &__KERNEL_END__);
sti();
// calibrate delay
calibrate_delay();
// floppy driver initialization
floppy_init();
// switch in user mode
move_to_user_mode();
// for a process for each console and execute the program PRGi
for (i=0; i<N_CONSOLES; ++i) {
// spawn process i and run PRG1
pid = fork();
if (pid == 0) {
exec(names[i]);
} else if (pid < 0) {
print("idle: cannot duplicate myself.\n");
}
}
print("Idle: ok!\n");
// idle loop
while(1);
}
开发者ID:sasadangelo,项目名称:gollumix,代码行数:51,代码来源:main.c
示例19: force_all_to_afab
/* Force ACPU core and L2 cache clocks to their AFAB sources. */
static void __init force_all_to_afab(void)
{
int cpu;
for_each_possible_cpu(cpu) {
select_clk_source_div(cpu, &acpu_freq_tbl[AFAB_IDX]);
select_core_source(cpu, 0);
drv_state.current_speed[cpu] = &acpu_freq_tbl[AFAB_IDX];
l2_vote[cpu] = &acpu_freq_tbl[AFAB_IDX];
}
select_core_source(L2, 0);
drv_state.current_l2_speed = &acpu_freq_tbl[AFAB_IDX];
/* Both cores are assumed to have the same lpj values when on AFAB. */
calibrate_delay();
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:18,代码来源:acpuclock-8x60.c
示例20: start_kernel
void start_kernel(void)
{
seg_t base, end;
/* We set the idle task as #0, and init_task() will be task #1 */
sched_init(); /* This block of functions don't need console */
setup_arch(&base, &end);
mm_init(base, end);
buffer_init();
inode_init();
init_IRQ();
tty_init();
init_console();
#if (CONFIG_BOGOMIPS == 0)
calibrate_delay();
#endif
device_setup();
#ifdef CONFIG_SOCKET
sock_init();
#endif
fs_init();
mm_stat(base, end);
printk("ELKS version %s\n", system_utsname.release);
kfork_proc(init_task);
wake_up_process(&task[1]);
/*
* We are now the idle task. We won't run unless no other process can run.
*/
while (1) {
schedule();
#ifdef CONFIG_IDLE_HALT
idle_halt ();
#endif
}
}
开发者ID:jbruchon,项目名称:elks,代码行数:45,代码来源:main.c
注:本文中的calibrate_delay函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论