Lines Matching +full:core +full:- +full:module
1 // SPDX-License-Identifier: GPL-2.0
8 module: &'a str, field
14 fn new(module: &'a str) -> Self { in new()
16 module, in new()
24 // Built-in modules prefix their modinfo strings by `module.`. in emit_base()
26 "{module}.{field}={content}\0", in emit_base()
27 module = self.module, in emit_base()
32 // Loadable modules' modinfo strings go as-is. in emit_base()
43 pub static __{module}_{counter}: [u8; {length}] = *{string}; in emit_base()
46 "#[cfg(not(MODULE))]" in emit_base()
48 "#[cfg(MODULE)]" in emit_base()
50 module = self.module.to_uppercase(), in emit_base()
85 fn parse(it: &mut token_stream::IntoIter) -> Self { in parse()
153 pub(crate) fn module(ts: TokenStream) -> TokenStream { in module() function
170 // Built-in modules also export the `file` modinfo string. in module()
177 /// The module name. in module()
182 /// The \"Rust loadable module\" mark, for `scripts/is_rust_module.sh`. in module()
186 #[cfg(MODULE)] in module()
194 // freed until the module is unloaded. in module()
195 #[cfg(MODULE)] in module()
199 #[cfg(not(MODULE))] in module()
201 kernel::ThisModule::from_ptr(core::ptr::null_mut()) in module()
205 #[cfg(MODULE)] in module()
208 pub extern \"C\" fn init_module() -> core::ffi::c_int {{ in module()
212 #[cfg(MODULE)] in module()
219 // Built-in modules are initialized through an initcall pointer in module()
221 #[cfg(not(MODULE))] in module()
226 pub static __{name}_initcall: extern \"C\" fn() -> core::ffi::c_int = __{name}_init; in module()
228 #[cfg(not(MODULE))] in module()
230 core::arch::global_asm!( in module()
233 .long __{name}_init - . in module()
238 #[cfg(not(MODULE))] in module()
241 pub extern \"C\" fn __{name}_init() -> core::ffi::c_int {{ in module()
245 #[cfg(not(MODULE))] in module()
252 fn __init() -> core::ffi::c_int {{ in module()
253 match <{type_} as kernel::Module>::init(&THIS_MODULE) {{ in module()