本文整理汇总了C++中do_initcalls函数的典型用法代码示例。如果您正苦于以下问题:C++ do_initcalls函数的具体用法?C++ do_initcalls怎么用?C++ do_initcalls使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_initcalls函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: start_of_day
static void __init start_of_day(void)
{
init_IRQ();
scheduler_init();
/* create idle domain */
idle_domain = domain_create(IDLE_DOMAIN_ID, 0, 0);
if ((idle_domain == NULL) || (alloc_vcpu(idle_domain, 0, 0) == NULL))
BUG();
set_current(idle_domain->vcpu[0]);
idle_vcpu[0] = current;
initialize_keytable();
/* Register another key that will allow for the the Harware Probe
* to be contacted, this works with RiscWatch probes and should
* work with Chronos and FSPs */
register_keyhandler('^', key_hw_probe_attn, "Trap to Hardware Probe");
/* allow the dumping of the devtree */
register_keyhandler('D', key_ofdump , "Dump OF Devtree");
timer_init();
rcu_init();
serial_init_postirq();
do_initcalls();
}
示例2: do_basic_setup
/*
* Ok, the machine is now initialized. None of the devices
* have been touched yet, but the CPU subsystem is up and
* running, and memory and process management works.
*
* Now we can finally start doing some real work..
*/
static void __init do_basic_setup(void)
{
/* drivers will send hotplug events */
init_workqueues();
usermodehelper_init();
driver_init();
init_irq_proc();
do_initcalls();
}
示例3: do_basic_setup
/*
* Ok, the machine is now initialized. None of the devices
* have been touched yet, but the CPU subsystem is up and
* running, and memory and process management works.
*
* Now we can finally start doing some real work..
*/
static void __init do_basic_setup(void)
{
rcu_init_sched(); /* needed by module_init stage. */
init_workqueues();
usermodehelper_init();
driver_init();
init_irq_proc();
do_initcalls();
}
示例4: dde_init
void dde_init()
{
/* invoked in vfs_cache_init in Linux */
chrdev_init();
driver_init();
dde_call_machine_init();
do_initcalls();
loadable_module_init();
}
示例5: do_basic_setup
/*
* Ok, the machine is now initialized. None of the devices
* have been touched yet, but the CPU subsystem is up and
* running, and memory and process management works.
*
* Now we can finally start doing some real work..
*/
static void __init do_basic_setup(void)
{
init_workqueues();
cpuset_init_smp();
usermodehelper_init();
init_tmpfs();
driver_init();
init_irq_proc();
do_ctors();
do_initcalls();
}
示例6: do_basic_setup
/*
* Ok, the machine is now initialized. None of the devices
* have been touched yet, but the CPU subsystem is up and
* running, and memory and process management works.
*
* Now we can finally start doing some real work..
*/
static void __init do_basic_setup(void)
{
driver_init();
#ifdef CONFIG_SYSCTL
sysctl_init();
#endif
/* Networking initialization needs a process context */
sock_init();
init_workqueues();
do_initcalls();
}
示例7: bathos_setup
int bathos_setup(void)
{
CPU_PRESCALE(0);
console_early_init();
/* Turn red led on */
timer_init();
events_init();
do_initcalls();
/* Interrupts are enabled by the calling assembly code */
return 0;
}
示例8: do_basic_setup
/*
* Ok, the machine is now initialized. None of the devices
* have been touched yet, but the CPU subsystem is up and
* running, and memory and process management works.
*
* Now we can finally start doing some real work..
*/
static void __init do_basic_setup(void)
{
/* drivers will send hotplug events */
init_workqueues();
usermodehelper_init();
driver_init();
#ifdef CONFIG_SYSCTL
sysctl_init();
#endif
/* Networking initialization needs a process context */
sock_init();
do_initcalls();
}
示例9: do_basic_setup
/*
* Ok, the machine is now initialized. None of the devices
* have been touched yet, but the CPU subsystem is up and
* running, and memory and process management works.
*
* Now we can finally start doing some real work..
*/
static void __init do_basic_setup(void)
{
/* drivers will send hotplug events */
init_workqueues();
usermodehelper_init();
driver_init();
init_irq_proc();
do_initcalls();
#ifdef CONFIG_OPENRG
/* Instruct mmap and do_mmap not to verify there are free pages before
* doing the mapping. This is useful when trying to load an executable
* that is larger than the current free memory. We let the swap
* mechanism to handle such cases because very little of the executable
* pages are really needed in ram at the same time. */
sysctl_overcommit_memory = OVERCOMMIT_ALWAYS;
#endif
}
示例10: init_task
/* Init task - the job of this task is to initialise all
* installed drivers, mount the root filesystem and
* bootstrap the system */
int init_task(void *priv)
{
uint32_t ret;
struct file *file;
char buf[20];
int rval;
/* Initialise kernel subsystems */
blk_init();
vfs_init();
pci_init();
do_initcalls();
/* Mount the root filesystem etc.. */
if ( vfs_mount_root("ext2", "floppy0") ) {
panic("Unable to mount root filesystem\n");
}
file = kernel_open("/test.txt", 0);
if ( NULL == file ) {
printk("init_task: open failed, returned %u\n", -1);
} else {
rval = kernel_read(file, buf, 16);
if ( rval < 0 )
printk("read error: %d\n", rval);
else if ( rval == 0 )
printk("read returned EOF\n");
else {
buf[rval] = '\0';
printk("read: %s.\n", buf);
}
rval = kernel_write(file, buf, 16);
kernel_close(file);
}
ret = _kernel_exec("/bin/bash");
ret = _kernel_exec("/sbin/init");
ret = _kernel_exec("/bin/cat");
printk("exec: /sbin/init: %i\n", (int)ret);
return ret;
}
示例11: drv_init
/*******************************************************************************
* @brief driver library initialization
*
* should be called on start-up step, to initial interrupt module
* and register hardware as camera, lcd...etc.
* @author xuchang
* @date 2008-01-21
* @return T_VOID
*******************************************************************************/
T_VOID drv_init(T_PDRIVE_INITINFO drv_info)
{
memcpy(&g_drv_info, drv_info, sizeof(g_drv_info));
clk_set_pll(DEF_PLL_VAL);
#if (CHIP_SEL_10C > 0 && DRV_SIMU_UART == 0)
uart_init(uiUART2, 115200);
#endif
//init function move to prog_manage of platform
//pmu_init();
timer_init();
gpio_init();
#ifndef BURN_TOOL
//init function move to prog_manage of platform
//analog_init();
//detector_init();
#endif
//l2_initial();
#if !(USB_VAR_MALLOC > 0)
DrvModule_Init();
#endif
//device module registeration init
do_initcalls();
drv_print(VERSION, 0, AK_TRUE);
//close VDDIO3V3 and VDD1V2 unstabitily detect
//REG32(REG_PMU_CTRL1) |= (PMU_PD_PWR_VCC | PMU_PD_PWR_VDD);
#if DRV_SUPPORT_CAMERA > 0
#if (CAMERA_GC6113 > 0)
camera_gc6113_reg();
#endif
#if (CAMERA_GC0308 > 0)
camera_gc0308_reg();
#endif
#endif
#if (CHIP_SEL_10C > 0)
//pwm32k 是给RDA芯片用的,如果FM工作不好,用32K晶振试下
pwm_start_32k_square();
#endif
}
示例12: xboot_main
int xboot_main(int argc, char * argv[])
{
struct runtime_t rt;
/* Create runtime */
runtime_create_save(&rt, 0, 0, 0, 0);
/* Do initial kobj */
do_init_kobj();
/* Do all initial calls */
do_initcalls();
/* Mount root filesystem */
do_system_rootfs();
/* Display system logo */
do_system_logo();
/* System autoboot */
do_system_autoboot();
/* Run loop */
while(1)
{
/* Run shell */
run_shell();
}
/* Do all exit calls */
do_exitcalls();
/* Destroy runtime */
runtime_destroy_restore(&rt, 0);
/* Xboot return */
return 0;
}
示例13: init_task
/* Init task - the job of this task is to initialise all
* installed drivers, mount the root filesystem and
* bootstrap the system */
int init_task(void *priv)
{
uint32_t ret;
/* Initialise kernel subsystems */
blk_init();
vfs_init();
pci_init();
do_initcalls();
/* Mount the root filesystem etc.. */
if ( vfs_mount_root("ext2", "floppy0") ) {
panic("Unable to mount root filesystem\n");
}
ret = _kernel_exec("/bin/bash");
ret = _kernel_exec("/sbin/init");
ret = _kernel_exec("/bin/cat");
printk("exec: /sbin/init: %i\n", (int)ret);
return ret;
}
示例14: master_init
void __noreturn master_init(void)
{
__attribute__ ((aligned(16)))
uint8_t bootstrap_pool[BOOTSTRAP_POOL_SIZE];
jump_handlers_apply();
kputs("KERN: We are in high address.\n");
arch_init();
/*
* Page allocator requires arbitrary size allocation to allocate
* struct pages, while arbitrary size allocation depends on
* page allocator to actually give out memory.
*
* We break such circular dependency by
* (1) bootstrap a small virtual memory allocator which works on the
* stack.
* (2) initialize a page allocator which works on the bootstrap
* allocator obtained in (1).
* (3) initialize a real virtual memory allocator which depend
* on (2).
* (4) make the page allocator depend on (3) instead.
*
* TODO: move the following piece of code to kern/mm
*/
simple_allocator_bootstrap(bootstrap_pool, BOOTSTRAP_POOL_SIZE);
kputs("KERN: Simple allocator bootstrapping.\n");
page_allocator_init();
kputs("KERN: Page allocator initialized.\n");
add_memory_pages();
kputs("KERN: Pages added.\n");
kprintf("KERN: Free memory: 0x%p\n", (size_t)get_free_memory());
struct simple_allocator old;
get_simple_allocator(&old);
simple_allocator_init();
kputs("KERN: Simple allocator initialized.\n");
page_allocator_move(&old);
kputs("KERN: Page allocator moved.\n");
trap_init();
kputs("KERN: Traps initialized.\n");
/* temporary test */
extern void trap_test(void);
trap_test();
kputs("KERN: Traps test passed.\n");
/* do early initcalls, one by one */
do_early_initcalls();
mm_init();
kputs("KERN: Memory management component initialized.\n");
extern void mm_test(void);
mm_test();
/* allocate per-cpu context and kworker */
// proc_init();
/* do initcalls, one by one */
do_initcalls();
/* temporary tests */
struct allocator_cache cache = {
.size = 1024,
.align = 1024,
.flags = 0,
.create_obj = NULL,
.destroy_obj = NULL
};
cache_create(&cache);
void *a, *b, *c;
a = cache_alloc(&cache);
kprintf("DEBUG: a = 0x%08x\n", a);
b = cache_alloc(&cache);
kprintf("DEBUG: b = 0x%08x\n", b);
c = cache_alloc(&cache);
kprintf("DEBUG: c = 0x%08x\n", c);
cache_free(&cache, a);
cache_free(&cache, b);
cache_free(&cache, c);
a = cache_alloc(&cache);
kprintf("DEBUG: a = 0x%08x\n", a);
cache_free(&cache, a);
int ret = cache_destroy(&cache);
kprintf("DEBUG: cache_destroy returned %d.\n", ret);
cache_create(&cache);
a = cache_alloc(&cache);
kprintf("DEBUG: a = 0x%08x\n", a);
/* startup smp */
/*
* do initcalls, one by one.
* They may fork or sleep or reschedule.
* In case any initcalls issue a fork, there MUST be EXACTLY one return
* from each initcall.
*/
//.........这里部分代码省略.........
示例15: do_basic_setup
/*
* Ok, the machine is now initialized. None of the devices
* have been touched yet, but the CPU subsystem is up and
* running, and memory and process management works.
*
* Now we can finally start doing some real work..
*/
static void __init do_basic_setup(void)
{
/*
* Tell the world that we're going to be the grim
* reaper of innocent orphaned children.
*
* We don't want people to have to make incorrect
* assumptions about where in the task array this
* can be found.
*/
child_reaper = current;
#if defined(CONFIG_MTRR) /* Do this after SMP initialization */
/*
* We should probably create some architecture-dependent "fixup after
* everything is up" style function where this would belong better
* than in init/main.c..
*/
mtrr_init();
#endif
#ifdef CONFIG_SYSCTL
sysctl_init();
#endif
/*
* Ok, at this point all CPU's should be initialized, so
* we can start looking into devices..
*/
#if defined(CONFIG_ARCH_S390)
s390_init_machine_check();
#endif
#ifdef CONFIG_ACPI_INTERPRETER
acpi_init();
#endif
#ifdef CONFIG_PCI
pci_init();
#endif
#ifdef CONFIG_SBUS
sbus_init();
#endif
#if defined(CONFIG_PPC)
ppc_init();
#endif
#ifdef CONFIG_MCA
mca_init();
#endif
#ifdef CONFIG_ARCH_ACORN
ecard_init();
#endif
#ifdef CONFIG_ZORRO
zorro_init();
#endif
#ifdef CONFIG_DIO
dio_init();
#endif
#ifdef CONFIG_NUBUS
nubus_init();
#endif
#ifdef CONFIG_ISAPNP
isapnp_init();
#endif
#ifdef CONFIG_TC
tc_init();
#endif
/* Networking initialization needs a process context */
sock_init();
start_context_thread();
do_initcalls();
#ifdef CONFIG_IRDA
irda_proto_init();
irda_device_init(); /* Must be done after protocol initialization */
#endif
#ifdef CONFIG_PCMCIA
init_pcmcia_ds(); /* Do this last */
#endif
}