aboutsummaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
mastergeneric: add mac-address property for NVMEM mac addressesDavid Bauer3 years
less-old-masterkernel: make kmod-ata-core selected by dependent modulesSungbo Eo5 years
upstreamkernel: make kmod-ata-core selected by dependent modulesSungbo Eo5 years
openwrt-19.07rssileds: add dependencies based on LDFLAGSAdrian Schmutzler5 years
openwrt-18.06ar71xx: ew-dorin, fix the trigger level for WPS buttonCatrinel Catrinescu5 years
lede-17.01mac80211: brcmfmac: fix PCIe reset crash and WARNINGRafał Miłecki5 years
old-masterramips: add support for HiWiFi HC5861BDeng Qingfang6 years
chaos_calmerCC: kernel: update to 3.18.45, refresh targetsZoltan HERPAI8 years
barrier_breakerBB: openssl: update to 1.0.2f (fixes CVE-2016-0701, CVE-2015-3197)Jo-Philipp Wich9 years
attitude_adjustmentAA: mac80211: merge ath9k fixes from bbFelix Fietkau10 years
 
TagDownloadAuthorAge
v22.03.6upstream-22.03.6.tar.gz  upstream-22.03.6.tar.bz2  upstream-22.03.6.zip  Hauke Mehrtens13 months
v23.05.2upstream-23.05.2.tar.gz  upstream-23.05.2.tar.bz2  upstream-23.05.2.zip  Hauke Mehrtens13 months
v23.05.1upstream-23.05.1.tar.gz  upstream-23.05.1.tar.bz2  upstream-23.05.1.zip  Hauke Mehrtens13 months
v23.05.0upstream-23.05.0.tar.gz  upstream-23.05.0.tar.bz2  upstream-23.05.0.zip  Hauke Mehrtens15 months
v23.05.0-rc4upstream-23.05.0-rc4.tar.gz&
#ifndef _LINUX_INIT_H
#define _LINUX_INIT_H

#include <xeno/config.h>

/* These macros are used to mark some functions or 
 * initialized data (doesn't apply to uninitialized data)
 * as `initialization' functions. The kernel can take this
 * as hint that the function is used only during the initialization
 * phase and free up used memory resources after
 *
 * Usage:
 * For functions:
 * 
 * You should add __init immediately before the function name, like:
 *
 * static void __init initme(int x, int y)
 * {
 *    extern int z; z = x * y;
 * }
 *
 * If the function has a prototype somewhere, you can also add
 * __init between closing brace of the prototype and semicolon:
 *
 * extern int initialize_foobar_device(int, int, int) __init;
 *
 * For initialized data:
 * You should insert __initdata between the variable name and equal
 * sign followed by value, e.g.:
 *
 * static int init_variable __initdata = 0;
 * static char linux_logo[] __initdata = { 0x32, 0x36, ... };
 *
 * Don't forget to initialize data not at file scope, i.e. within a function,
 * as gcc otherwise puts the data into the bss section and not into the init
 * section.
 * 
 * Also note, that this data cannot be "const".
 */

#ifndef MODULE

#ifndef __ASSEMBLY__

/*
 * Used for initialization calls..
 */
typedef int (*initcall_t)(void);
typedef void (*exitcall_t)(void);

extern initcall_t __initcall_start, __initcall_end;

#define __initcall(fn)								\
	static initcall_t __initcall_##fn __init_call = fn
#define __exitcall(fn)								\
	static exitcall_t __exitcall_##fn __exit_call = fn

/*
 * Used for kernel command line parameter setup
 */
struct kernel_param {
	const char *str;
	int (*setup_func)(char *);
};

extern struct kernel_param __setup_start, __setup_end;

#define __setup(str, fn)								\
	static char __setup_str_##fn[] __initdata = str;				\
	static struct kernel_param __setup_##fn __attribute__((unused)) __initsetup = { __setup_str_##fn, fn }

#endif /* __ASSEMBLY__ */

/*
 * Mark functions and data as being only used at initialization
 * or exit time.
 */
#define __init		__attribute__ ((__section__ (".text.init")))
#define __exit		__attribute__ ((unused, __section__(".text.exit")))
#define __initdata	__attribute__ ((__section__ (".data.init")))
#define __exitdata	__attribute__ ((unused, __section__ (".data.exit")))
#define __initsetup	__attribute__ ((unused,__section__ (".setup.init")))
#define __init_call	__attribute__ ((unused,__section__ (".initcall.init")))
#define __exit_call	__attribute__ ((unused,__section__ (".exitcall.exit")))

/* For assembly routines */
#define __INIT		.section	".text.init","ax"
#define __FINIT		.previous
#define __INITDATA	.section	".data.init","aw"

/**
 * module_init() - driver initialization entry point
 * @x: function to be run at kernel boot time or module insertion
 * 
 * module_init() will add the driver initialization routine in
 * the "__initcall.int" code segment if the driver is checked as
 * "y" or static, or else it will wrap the driver initialization
 * routine with init_module() which is used by insmod and
 * modprobe when the driver is used as a module.
 */
#define module_init(x)	__initcall(x);

/**
 * module_exit() - driver exit entry point
 * @x: function to be run when driver is removed
 * 
 * module_exit() will wrap the driver clean-up code
 * with cleanup_module() when used with rmmod when
 * the driver is a module.  If the driver is statically
 * compiled into the kernel,'>upstream-19.07.9.tar.bz2  upstream-19.07.9.zip  
Hauke Mehrtens3 years
v21.02.2upstream-21.02.2.tar.gz  upstream-21.02.2.tar.bz2  upstream-21.02.2.zip  Hauke Mehrtens3 years
v21.02.1upstream-21.02.1.tar.gz  upstream-21.02.1.tar.bz2  upstream-21.02.1.zip  Hauke Mehrtens3 years
v21.02.0upstream-21.02.0.tar.gz  upstream-21.02.0.tar.bz2  upstream-21.02.0.zip  Hauke Mehrtens3 years
v21.02.0-rc4upstream-21.02.0-rc4.tar.gz  upstream-21.02.0-rc4.tar.bz2  upstream-21.02.0-rc4.zip  Hauke Mehrtens3 years
v19.07.8upstream-19.07.8.tar.gz  upstream-19.07.8.tar.bz2  upstream-19.07.8.zip  Hauke Mehrtens3 years
v21.02.0-rc3upstream-21.02.0-rc3.tar.gz  upstream-21.02.0-rc3.tar.bz2  upstream-21.02.0-rc3.zip  Hauke Mehrtens
nbsp;upstream-21.02.0-rc2.tar.bz2  upstream-21.02.0-rc2.zip  Hauke Mehrtens4 years v21.02.0-rc1upstream-21.02.0-rc1.tar.gz  upstream-21.02.0-rc1.tar.bz2  upstream-21.02.0-rc1.zip  Hauke Mehrtens4 years v19.07.7upstream-19.07.7.tar.gz  upstream-19.07.7.tar.bz2  upstream-19.07.7.zip  Hauke Mehrtens4 years v19.07.6upstream-19.07.6.tar.gz  upstream-19.07.6.tar.bz2  upstream-19.07.6.zip  Hauke Mehrtens4 years v19.07.5upstream-19.07.5.tar.gz  upstream-19.07.5.tar.bz2  upstream-19.07.5.zip  Hauke Mehrtens4 years v18.06.9upstream-18.06.9.tar.gz  upstream-18.06.9.tar.bz2  upstream-18.06.9.zip  Hauke Mehrtens4 years v19.07.4upstream-19.07.4.tar.gz  upstream-19.07.4.tar.bz2  upstream-19.07.4.zip  Hauke Mehrtens4 years v19.07.3upstream-19.07.3.tar.gz  upstream-19.07.3.tar.bz2  upstream-19.07.3.zip  Hauke Mehrtens5 years v19.07.2upstream-19.07.2.tar.gz  upstream-19.07.2.tar.bz2  upstream-19.07.2.zip  Jo-Philipp Wich5 years v18.06.8upstream-18.06.8.tar.gz  upstream-18.06.8.tar.bz2  upstream-18.06.8.zip  Jo-Philipp Wich5 years v18.06.7upstream-18.06.7.tar.gz  upstream-18.06.7.tar.bz2  upstream-18.06.7.zip  Jo-Philipp Wich5 years v19.07.1upstream-19.07.1.tar.gz  upstream-19.07.1.tar.bz2  upstream-19.07.1.zip  Jo-Philipp Wich5 years v19.07.0upstream-19.07.0.tar.gz  upstream-19.07.0.tar.bz2  upstream-19.07.0.zip  Hauke Mehrtens5 years v18.06.6upstream-18.06.6.tar.gz  upstream-18.06.6.tar.bz2  upstream-18.06.6.zip  Hauke Mehrtens5 years v19.07.0-rc2upstream-19.07.0-rc2.tar.gz  upstream-19.07.0-rc2.tar.bz2  upstream-19.07.0-rc2.zip  Hauke Mehrtens5 years v18.06.5upstream-18.06.5.tar.gz  upstream-18.06.5.tar.bz2  upstream-18.06.5.zip  Jo-Philipp Wich5 years v19.07.0-rc1upstream-19.07.0-rc1.tar.gz  upstream-19.07.0-rc1.tar.bz2  upstream-19.07.0-rc1.zip  Jo-Philipp Wich5 years v18.06.4upstream-18.06.4.tar.gz  upstream-18.06.4.tar.bz2  upstream-18.06.4.zip  Jo-Philipp Wich5 years v18.06.3upstream-18.06.3.tar.gz  upstream-18.06.3.tar.bz2  upstream-18.06.3.zip  Jo-Philipp Wich6 years v17.01.7upstream-17.01.7.tar.gz  upstream-17.01.7.tar.bz2  upstream-17.01.7.zip  Jo-Philipp Wich6 years v18.06.2upstream-18.06.2.tar.gz  upstream-18.06.2.tar.bz2  upstream-18.06.2.zip  Jo-Philipp Wich6 years v17.01.6upstream-17.01.6.tar.gz  upstream-17.01.6.tar.bz2  upstream-17.01.6.zip  Hauke Mehrtens6 years v18.06.1upstream-18.06.1.tar.gz  upstream-18.06.1.tar.bz2  upstream-18.06.1.zip  Jo-Philipp Wich6 years v18.06.0upstream-18.06.0.tar.gz  upstream-18.06.0.tar.bz2  upstream-18.06.0.zip  Jo-Philipp Wich6 years v17.01.5upstream-17.01.5.tar.gz  upstream-17.01.5.tar.bz2  upstream-17.01.5.zip  Hauke Mehrtens6 years v18.06.0-rc2upstream-18.06.0-rc2.tar.gz  upstream-18.06.0-rc2.tar.bz2  upstream-18.06.0-rc2.zip  Jo-Philipp Wich6 years v18.06.0-rc1upstream-18.06.0-rc1.tar.gz  upstream-18.06.0-rc1.tar.bz2  upstream-18.06.0-rc1.zip  Jo-Philipp Wich7 years v17.01.4upstream-17.01.4.tar.gz  upstream-17.01.4.tar.bz2  upstream-17.01.4.zip  Stijn Tintel7 years v17.01.3upstream-17.01.3.tar.gz  upstream-17.01.3.tar.bz2  upstream-17.01.3.zip  Stijn Tintel7 years v17.01.2upstream-17.01.2.tar.gz  upstream-17.01.2.tar.bz2  upstream-17.01.2.zip  Alexander Couzens8 years rebootupstream-reboot.tar.gz  upstream-reboot.tar.bz2  upstream-reboot.zip  Jo-Philipp Wich9 years v15.05.1upstream-15.05.1.tar.gz  upstream-15.05.1.tar.bz2  upstream-15.05.1.zip  Felix Fietkau9 years v15.05upstream-15.05.tar.gz  upstream-15.05.tar.bz2  upstream-15.05.zip  Felix Fietkau9 years v14.07upstream-14.07.tar.gz  upstream-14.07.tar.bz2  upstream-14.07.zip  Felix Fietkau10 years v12.09upstream-12.09.tar.gz  upstream-12.09.tar.bz2  upstream-12.09.zip  Florian Fainelli12 years trunkupstream-trunk.tar.gz  upstream-trunk.tar.bz2  upstream-trunk.zip  OpenWrt Developers21 years