summaryrefslogtreecommitdiff
path: root/libdde_linux26/lib/src
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2010-01-16 01:21:07 +0100
committerZheng Da <zhengda1936@gmail.com>2010-01-16 01:21:07 +0100
commit2680eecc499e43679be098e5834d4f3a62f59a0c (patch)
tree32771b7ae2f930a6f107f9c86d7de03f9622f03f /libdde_linux26/lib/src
parent51299b970600d28df634708557f80df3526014ae (diff)
prepare to use initcall to do initialization.
Diffstat (limited to 'libdde_linux26/lib/src')
-rw-r--r--libdde_linux26/lib/src/arch/l4/init.c49
-rw-r--r--libdde_linux26/lib/src/arch/l4/local.h2
-rw-r--r--libdde_linux26/lib/src/arch/l4/page_alloc.c4
-rw-r--r--libdde_linux26/lib/src/arch/l4/pci.c2
-rw-r--r--libdde_linux26/lib/src/arch/l4/timer.c2
-rw-r--r--libdde_linux26/lib/src/block/genhd.c4
-rw-r--r--libdde_linux26/lib/src/drivers/pci/pci-driver.c4
-rw-r--r--libdde_linux26/lib/src/drivers/pci/pci.c4
-rw-r--r--libdde_linux26/lib/src/drivers/pci/probe.c4
-rw-r--r--libdde_linux26/lib/src/fs/char_dev.c2
-rw-r--r--libdde_linux26/lib/src/kernel/workqueue.c2
-rw-r--r--libdde_linux26/lib/src/net/core/dev.c4
-rw-r--r--libdde_linux26/lib/src/net/core/net_namespace.c4
13 files changed, 21 insertions, 66 deletions
diff --git a/libdde_linux26/lib/src/arch/l4/init.c b/libdde_linux26/lib/src/arch/l4/init.c
index 195b1b23..79112f78 100644
--- a/libdde_linux26/lib/src/arch/l4/init.c
+++ b/libdde_linux26/lib/src/arch/l4/init.c
@@ -26,53 +26,8 @@ void __init __attribute__((used)) l4dde26_init(void)
void l4dde26_do_initcalls(void)
{
- extern void dde_page_cache_init (void);
- extern void pci_iommu_init (void);
- extern void init_workqueues (void);
- extern void pci_init (void);
- extern void pci_driver_init (void);
- extern void pcibus_class_init (void);
- extern void net_dev_init (void);
- extern void neigh_init (void);
- extern void net_ns_init (void);
- extern void blk_ioc_init (void);
- extern void blk_settings_init (void);
- extern void blk_softirq_init (void);
- extern void genhd_device_init (void);
- extern void noop_init (void);
- extern void bdi_class_init (void);
- extern void init_bio (void);
- extern void chrdev_init (void);
/* finally, let DDEKit perform all the initcalls */
-// ddekit_do_initcalls();
- /* 1000: pure_, core_ */
- l4dde26_init ();
- l4dde26_process_init ();
- l4dde26_init_timers ();
- net_ns_init ();
- dde_page_cache_init ();
- init_workqueues ();
- chrdev_init ();
- /* 1001: postcore_ */
- pci_driver_init ();
- pcibus_class_init ();
- bdi_class_init ();
- /* 1002: arch_ */
- l4dde26_init_pci ();
- /* 1003: subsys_ */
- net_dev_init ();
-// neigh_init ();
- blk_ioc_init ();
- blk_settings_init ();
- blk_softirq_init ();
-// genhd_device_init ();
- noop_init ();
- init_bio ();
- /* 1004: fs_ */
- pci_iommu_init ();
- /* 1005: device_ */
- pci_init ();
- /* 1006: late_ */
+ ddekit_do_initcalls();
}
-//dde_initcall(l4dde26_init);
+dde_initcall(l4dde26_init);
diff --git a/libdde_linux26/lib/src/arch/l4/local.h b/libdde_linux26/lib/src/arch/l4/local.h
index 275c745b..d834a9db 100644
--- a/libdde_linux26/lib/src/arch/l4/local.h
+++ b/libdde_linux26/lib/src/arch/l4/local.h
@@ -6,7 +6,7 @@
#include <ddekit/assert.h>
#include <ddekit/condvar.h>
#include <ddekit/debug.h>
-//#include <ddekit/initcall.h>
+#include <ddekit/initcall.h>
#include <ddekit/interrupt.h>
#include <ddekit/lock.h>
#include <ddekit/memory.h>
diff --git a/libdde_linux26/lib/src/arch/l4/page_alloc.c b/libdde_linux26/lib/src/arch/l4/page_alloc.c
index 7c4faa0e..e887bd51 100644
--- a/libdde_linux26/lib/src/arch/l4/page_alloc.c
+++ b/libdde_linux26/lib/src/arch/l4/page_alloc.c
@@ -264,7 +264,7 @@ void *__init alloc_large_system_hash(const char *tablename,
}
-void __init dde_page_cache_init(void)
+static void __init dde_page_cache_init(void)
{
printk("Initializing DDE page cache\n");
int i=0;
@@ -273,4 +273,4 @@ void __init dde_page_cache_init(void)
INIT_HLIST_HEAD(&dde_page_cache[i]);
}
-//core_initcall(dde_page_cache_init);
+core_initcall(dde_page_cache_init);
diff --git a/libdde_linux26/lib/src/arch/l4/pci.c b/libdde_linux26/lib/src/arch/l4/pci.c
index e86c42e8..2a0391f2 100644
--- a/libdde_linux26/lib/src/arch/l4/pci.c
+++ b/libdde_linux26/lib/src/arch/l4/pci.c
@@ -186,4 +186,4 @@ void __init l4dde26_init_pci(void)
INITIALIZE_INITVAR(dde26_pci);
}
-//arch_initcall(l4dde26_init_pci);
+arch_initcall(l4dde26_init_pci);
diff --git a/libdde_linux26/lib/src/arch/l4/timer.c b/libdde_linux26/lib/src/arch/l4/timer.c
index 8149fe7e..2b657ab4 100644
--- a/libdde_linux26/lib/src/arch/l4/timer.c
+++ b/libdde_linux26/lib/src/arch/l4/timer.c
@@ -154,7 +154,7 @@ void __init l4dde26_init_timers(void)
INITIALIZE_INITVAR(dde26_timer);
}
-//core_initcall(l4dde26_init_timers);
+core_initcall(l4dde26_init_timers);
__attribute__((weak)) void do_gettimeofday (struct timeval *tv)
{
diff --git a/libdde_linux26/lib/src/block/genhd.c b/libdde_linux26/lib/src/block/genhd.c
index f9a205f5..921cebff 100644
--- a/libdde_linux26/lib/src/block/genhd.c
+++ b/libdde_linux26/lib/src/block/genhd.c
@@ -792,7 +792,7 @@ static struct kobject *base_probe(dev_t devt, int *partno, void *data)
return NULL;
}
-int __init genhd_device_init(void)
+static int __init genhd_device_init(void)
{
int error;
@@ -812,7 +812,7 @@ int __init genhd_device_init(void)
return 0;
}
-//subsys_initcall(genhd_device_init);
+subsys_initcall(genhd_device_init);
static ssize_t disk_range_show(struct device *dev,
struct device_attribute *attr, char *buf)
diff --git a/libdde_linux26/lib/src/drivers/pci/pci-driver.c b/libdde_linux26/lib/src/drivers/pci/pci-driver.c
index 591d9489..199ec8a7 100644
--- a/libdde_linux26/lib/src/drivers/pci/pci-driver.c
+++ b/libdde_linux26/lib/src/drivers/pci/pci-driver.c
@@ -992,12 +992,12 @@ struct bus_type pci_bus_type = {
.pm = PCI_PM_OPS_PTR,
};
-int __init pci_driver_init(void)
+static int __init pci_driver_init(void)
{
return bus_register(&pci_bus_type);
}
-//postcore_initcall(pci_driver_init);
+postcore_initcall(pci_driver_init);
EXPORT_SYMBOL(pci_match_id);
EXPORT_SYMBOL(__pci_register_driver);
diff --git a/libdde_linux26/lib/src/drivers/pci/pci.c b/libdde_linux26/lib/src/drivers/pci/pci.c
index 9bf601c3..f67bf734 100644
--- a/libdde_linux26/lib/src/drivers/pci/pci.c
+++ b/libdde_linux26/lib/src/drivers/pci/pci.c
@@ -2404,7 +2404,7 @@ int __devinit pci_init(void)
return 0;
}
-int __init pci_setup(char *str)
+static int __init pci_setup(char *str)
{
#ifndef DDE_LINUX
while (str) {
@@ -2434,7 +2434,7 @@ int __init pci_setup(char *str)
}
early_param("pci", pci_setup);
-//device_initcall(pci_init);
+device_initcall(pci_init);
EXPORT_SYMBOL(pci_reenable_device);
EXPORT_SYMBOL(pci_enable_device_io);
diff --git a/libdde_linux26/lib/src/drivers/pci/probe.c b/libdde_linux26/lib/src/drivers/pci/probe.c
index 9cbc3bfb..32da5108 100644
--- a/libdde_linux26/lib/src/drivers/pci/probe.c
+++ b/libdde_linux26/lib/src/drivers/pci/probe.c
@@ -100,11 +100,11 @@ static struct class pcibus_class = {
.dev_release = &release_pcibus_dev,
};
-int __init pcibus_class_init(void)
+static int __init pcibus_class_init(void)
{
return class_register(&pcibus_class);
}
-//postcore_initcall(pcibus_class_init);
+postcore_initcall(pcibus_class_init);
/*
* Translate the low bits of the PCI base
diff --git a/libdde_linux26/lib/src/fs/char_dev.c b/libdde_linux26/lib/src/fs/char_dev.c
index 9dd832b4..3b8e8b3d 100644
--- a/libdde_linux26/lib/src/fs/char_dev.c
+++ b/libdde_linux26/lib/src/fs/char_dev.c
@@ -556,7 +556,7 @@ void __init chrdev_init(void)
}
#ifndef LIBINPUT
-//core_initcall(chrdev_init);
+core_initcall(chrdev_init);
#endif
/* Let modules do char dev stuff */
diff --git a/libdde_linux26/lib/src/kernel/workqueue.c b/libdde_linux26/lib/src/kernel/workqueue.c
index d52b22b5..5ad26d9f 100644
--- a/libdde_linux26/lib/src/kernel/workqueue.c
+++ b/libdde_linux26/lib/src/kernel/workqueue.c
@@ -1034,5 +1034,5 @@ void __init init_workqueues(void)
}
#ifdef DDE_LINUX
-//core_initcall(init_workqueues);
+core_initcall(init_workqueues);
#endif
diff --git a/libdde_linux26/lib/src/net/core/dev.c b/libdde_linux26/lib/src/net/core/dev.c
index b1307dd2..65b4ba42 100644
--- a/libdde_linux26/lib/src/net/core/dev.c
+++ b/libdde_linux26/lib/src/net/core/dev.c
@@ -5186,7 +5186,7 @@ static struct pernet_operations __net_initdata default_device_ops = {
* This is called single threaded during boot, so no need
* to take the rtnl semaphore.
*/
-int __init net_dev_init(void)
+static int __init net_dev_init(void)
{
int i, rc = -ENOMEM;
@@ -5254,7 +5254,7 @@ out:
return rc;
}
-//subsys_initcall(net_dev_init);
+subsys_initcall(net_dev_init);
EXPORT_SYMBOL(__dev_get_by_index);
EXPORT_SYMBOL(__dev_get_by_name);
diff --git a/libdde_linux26/lib/src/net/core/net_namespace.c b/libdde_linux26/lib/src/net/core/net_namespace.c
index 29f29621..ab5a0a7f 100644
--- a/libdde_linux26/lib/src/net/core/net_namespace.c
+++ b/libdde_linux26/lib/src/net/core/net_namespace.c
@@ -202,7 +202,7 @@ struct net *copy_net_ns(unsigned long flags, struct net *old_net)
}
#endif
-int __init net_ns_init(void)
+static int __init net_ns_init(void)
{
struct net_generic *ng;
int err;
@@ -239,7 +239,7 @@ int __init net_ns_init(void)
return 0;
}
-//pure_initcall(net_ns_init);
+pure_initcall(net_ns_init);
#ifdef CONFIG_NET_NS
static int register_pernet_operations(struct list_head *list,