Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_INIT_H
0003 #define _LINUX_INIT_H
0004 
0005 #include <linux/compiler.h>
0006 #include <asm/export.h>
0007 #include <linux/memory_hotplug.h>
0008 
0009 #define __section(section)              __attribute__((__section__(section)))
0010 
0011 #define __initconst
0012 #define __meminit
0013 #define __meminitdata
0014 #define __refdata
0015 #define __initdata
0016 
0017 struct obs_kernel_param {
0018     const char *str;
0019     int (*setup_func)(char *st);
0020     int early;
0021 };
0022 
0023 #define __setup_param(str, unique_id, fn, early)            \
0024     static const char __setup_str_##unique_id[] __initconst     \
0025         __aligned(1) = str;                 \
0026     static struct obs_kernel_param __setup_##unique_id      \
0027         __used __section(".init.setup")             \
0028         __aligned(__alignof__(struct obs_kernel_param)) =   \
0029         { __setup_str_##unique_id, fn, early }
0030 
0031 #define early_param(str, fn)                        \
0032     __setup_param(str, fn, fn, 1)
0033 
0034 #endif