diff options
author | Richard Braun <rbraun@sceen.net> | 2017-07-13 20:07:07 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-07-13 20:07:07 +0200 |
commit | b2ad7d862388558556288877a65f2797528168f4 (patch) | |
tree | 4d3080abf0cbcca7c058cba5cad2ed71e5d5e1e5 /kern/sref.c | |
parent | cacd797c0c1825301f21aab18a7ce2c410d14535 (diff) |
Switch to initialization operations
Diffstat (limited to 'kern/sref.c')
-rw-r--r-- | kern/sref.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/kern/sref.c b/kern/sref.c index 7167efff..9c49a425 100644 --- a/kern/sref.c +++ b/kern/sref.c @@ -816,7 +816,7 @@ sref_manage(void *arg) /* Never reached */ } -void __init +static int __init sref_bootstrap(void) { spinlock_init(&sref_data.lock); @@ -828,8 +828,13 @@ sref_bootstrap(void) syscnt_register(&sref_data.sc_true_zeroes, "sref_true_zeroes"); sref_cache_init(sref_cache_get(), 0); + + return 0; } +INIT_OP_DEFINE(sref_bootstrap, + INIT_OP_DEP(syscnt_setup, true)); + static void __init sref_setup_manager(struct sref_cache *cache, unsigned int cpu) { @@ -861,7 +866,7 @@ sref_setup_manager(struct sref_cache *cache, unsigned int cpu) cache->manager = manager; } -void __init +static int __init sref_setup(void) { unsigned int i; @@ -873,8 +878,20 @@ sref_setup(void) for (i = 0; i < cpu_count(); i++) { sref_setup_manager(percpu_ptr(sref_cache, i), i); } + + return 0; } +INIT_OP_DEFINE(sref_setup, + INIT_OP_DEP(cpu_mp_probe, true), + INIT_OP_DEP(log_setup, true), + INIT_OP_DEP(mutex_setup, true), + INIT_OP_DEP(panic_setup, true), + INIT_OP_DEP(percpu_setup, true), + INIT_OP_DEP(sref_bootstrap, true), + INIT_OP_DEP(syscnt_setup, true), + INIT_OP_DEP(thread_setup, true)); + void sref_register(void) { |