init.h (844B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _LINUX_INIT_H 3#define _LINUX_INIT_H 4 5#include <linux/compiler.h> 6#include <asm/export.h> 7#include <linux/memory_hotplug.h> 8 9#define __section(section) __attribute__((__section__(section))) 10 11#define __initconst 12#define __meminit 13#define __meminitdata 14#define __refdata 15#define __initdata 16 17struct obs_kernel_param { 18 const char *str; 19 int (*setup_func)(char *st); 20 int early; 21}; 22 23#define __setup_param(str, unique_id, fn, early) \ 24 static const char __setup_str_##unique_id[] __initconst \ 25 __aligned(1) = str; \ 26 static struct obs_kernel_param __setup_##unique_id \ 27 __used __section(".init.setup") \ 28 __aligned(__alignof__(struct obs_kernel_param)) = \ 29 { __setup_str_##unique_id, fn, early } 30 31#define early_param(str, fn) \ 32 __setup_param(str, fn, fn, 1) 33 34#endif