CONFIG_KMOD removal
Subsystems (26)
cover CONFIG_KMOD removal
Some place with some code or conditional I just converted to use CONFIG_MODULES, other places can invoke request_module unconditionally because it compiles out when the kernel is not modular, and one place (so far) converted to try_then_request_module.
Comments appreciated.
johannes
RFC 1/11 make CONFIG_KMOD invisible
... as preparation for removing it completely, make it an invisible bool defaulting to yes.
--- init/Kconfig | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
init/Kconfig +1 -9
@@ -893,16 +893,8 @@ config MODULE_SRCVERSION_ALL will be created for all modules. If unsure, say N. config KMOD - bool "Automatic kernel module loading" + def_bool y depends on MODULES - help - Normally when you have selected some parts of the kernel to - be created as kernel modules, you must load them (using the - "modprobe" command) before you can use them. If you say Y - here, some parts of the kernel will be able to load modules - automatically: when a part of the kernel needs a module, it - runs modprobe with the appropriate arguments, thereby - loading the module if it is available. If unsure, say Y. config STOP_MACHINE bool
RFC 2/11 remove CONFIG_KMOD from core kernel code
In reply to Johannes BergAlways compile request_module when the kernel allows modules.
--- include/linux/kmod.h | 2 +- kernel/exec_domain.c | 2 +- kernel/kmod.c | 2 +- kernel/sysctl.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
include/linux/kmod.h +1 -1
@@ -25,7 +25,7 @@#define KMOD_PATH_LEN 256 -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES /* modprobe exit status on success, -ve on error. Return value * usually useless though. */ extern int request_module (const char * name, ...) __attribute__ ((format (printf,1 ,2 )));
kernel/exec_domain.c +1 -1
@@ -65,7 +65,7 @@ lookup_exec_domain(u_long personality) goto out; } -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES read_unlock (&exec_domains_lock);request_module ("personality-%ld" , pers);read_lock (&exec_domains_lock);
kernel/kmod.c +1 -1
@@ -42,7 +42,7 @@ extern int max_threads;static struct workqueue_struct *khelper_wq; -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES /* modprobe_path is set via /proc/sys.
kernel/sysctl.c +2 -2
@@ -106,7 +106,7 @@ static int min_percpu_pagelist_fract = 8static int ngroups_max =NGROUPS_MAX ; -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES extern char modprobe_path[];#endif #ifdef CONFIG_CHR_DEV_SG
@@ -455,7 +455,7 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES { .ctl_name = KERN_MODPROBE, .procname = "modprobe",
RFC 3/11 rework try_then_request_module to do less in non-modular kernels
In reply to Johannes BergThis reworks try_then_request_module to only invoke the "lookup" function "x" once when the kernel is not modular.
--- include/linux/kmod.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/kmod.h +2 -1
@@ -29,11 +29,12 @@/* modprobe exit status on success, -ve on error. Return value * usually useless though. */ extern int request_module (const char * name, ...) __attribute__ ((format (printf,1 ,2 ))); +#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x)))#else static inline int request_module (const char * name, ...) {return -ENOSYS ; } +#define try_then_request_module(x, mod...) (x)#endif -#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x)))struct key ;struct file ;
RFC 4/11 remove CONFIG_KMOD from drivers
In reply to Johannes BergStraight forward conversions to CONFIG_MODULE; many drivers include <linux/kmod.h> conditionally and then don't have any other conditional code so remove it from those.
--- drivers/md/md.c | 7 +------ drivers/media/video/cpia.c | 4 ---- drivers/media/video/usbvision/usbvision-core.c | 4 ---- drivers/media/video/usbvision/usbvision-video.c | 4 ---- drivers/media/video/v4l1-compat.c | 4 ---- drivers/media/video/v4l2-common.c | 4 ---- drivers/media/video/vino.c | 5 +---- drivers/media/video/w9968cf.c | 4 ++-- drivers/mtd/mtdpart.c | 2 -- drivers/net/irda/sir_dongle.c | 2 -- drivers/net/ppp_generic.c | 10 +++------- drivers/net/pppox.c | 9 ++------- drivers/video/fbmem.c | 17 ++--------------- 13 files changed, 11 insertions(+), 65 deletions(-)
drivers/md/md.c +1 -6
@@ -44,14 +44,9 @@#include <linux/mutex.h> #include <linux/ctype.h> #include <linux/freezer.h> -#include <linux/init.h> -#include <linux/file.h> - -#ifdef CONFIG_KMOD #include <linux/kmod.h> -#endif #include <asm/unaligned.h>
@@ -3410,7 +3405,7 @@ static int do_md_run(mddev_t * mddev) } } -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (mddev->level !=LEVEL_NONE )request_module ("md-level-%d" , mddev->level);else if (mddev->clevel[0 ])
drivers/media/video/cpia.c +0 -4
@@ -39,10 +39,6 @@#include <asm/io.h> #include <linux/mutex.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif -#include "cpia.h" static int video_nr =-1 ;
drivers/media/video/usbvision/usbvision-core.c +0 -4
@@ -47,10 +47,6 @@#include <linux/workqueue.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif -#include "usbvision.h" static unsigned int core_debug;
drivers/media/video/usbvision/usbvision-video.c +0 -4
@@ -70,10 +70,6 @@#include <linux/workqueue.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif -#include "usbvision.h" #include "usbvision-cards.h"
drivers/media/video/v4l1-compat.c +0 -4
@@ -35,10 +35,6 @@#include <asm/system.h> #include <asm/pgtable.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif -static unsigned int debug;module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"enable debug messages" );
drivers/media/video/v4l2-common.c +0 -4
@@ -60,10 +60,6 @@#include <media/v4l2-common.h> #include <media/v4l2-chip-ident.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif -#include <linux/videodev.h> MODULE_AUTHOR ("Bill Dirks, Justin Schoeman, Gerd Knorr" );
drivers/media/video/vino.c +1 -4
@@ -30,10 +30,7 @@#include <linux/mm.h> #include <linux/time.h> #include <linux/version.h> - -#ifdef CONFIG_KMOD #include <linux/kmod.h> -#endif #include <linux/i2c.h> #include <linux/i2c-algo-sgi.h>
@@ -4641,7 +4638,7 @@ static int __init vino_module_init(void) } vino_init_stage++; -#if defined(CONFIG_KMOD ) && defined(MODULE ) +#ifdef MODULE request_module ("saa7191" );request_module ("indycam" );#endif
drivers/media/video/w9968cf.c +2 -2
@@ -110,7 +110,7 @@ static int specific_debug = W9968CF_SPECstatic unsigned int param_nv[24 ];/* number of values per parameter */ -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES module_param (ovmod_load, bool,0644 );#endif module_param (simcams, ushort,0644 );
@@ -143,7 +143,7 @@ module_param(debug, ushort, 0644);module_param (specific_debug, bool,0644 );#endif -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES MODULE_PARM_DESC (ovmod_load,"\n<0|1> Automatic 'ovcamchip' module loading." "\n0 disabled, 1 enabled."
drivers/mtd/mtdpart.c +0 -2
@@ -555,10 +555,8 @@ int parse_mtd_partitions(struct mtd_infofor ( ; ret <=0 && *types; types++) { parser =get_partition_parser (*types); -#ifdef CONFIG_KMOD if (!parser && !request_module ("%s" , *types)) parser =get_partition_parser (*types); -#endif if (!parser) {printk (KERN_NOTICE "%s partition parsing not available\n" , *types);
drivers/net/irda/sir_dongle.c +0 -2
@@ -67,9 +67,7 @@ int sirdev_get_dongle(struct sir_dev *deconst struct dongle_driver *drv =NULL ;int err = -EINVAL ; -#ifdef CONFIG_KMOD request_module ("irda-dongle-%d" , type); -#endif if (dev->dongle_drv !=NULL )return -EBUSY ;
drivers/net/ppp_generic.c +3 -7
@@ -2113,13 +2113,9 @@ ppp_set_compress(struct ppp *ppp, unsign || ccp_option[1] < 2 || ccp_option[1] > data.length) goto out; - cp =find_compressor (ccp_option[0 ]); -#ifdef CONFIG_KMOD -if (!cp) { -request_module ("ppp-compress-%d" , ccp_option[0 ]); - cp =find_compressor (ccp_option[0 ]); - } -#endif /* CONFIG_KMOD */ + cp =try_then_request_module ( +find_compressor (ccp_option[0 ]), +"ppp-compress-%d" , ccp_option[0 ]);if (!cp) goto out;
drivers/net/pppox.c +2 -7
@@ -115,13 +115,8 @@ static int pppox_create(struct net *net, goto out; rc = -EPROTONOSUPPORT ; -#ifdef CONFIG_KMOD -if (!pppox_protos[protocol]) { -char buffer[32 ]; -sprintf (buffer,"pppox-proto-%d" , protocol); -request_module (buffer); - } -#endif +if (!pppox_protos[protocol]) +request_module ("pppox-proto-%d" , protocol);if (!pppox_protos[protocol] || !try_module_get (pppox_protos[protocol]->owner)) goto out;
drivers/video/fbmem.c +2 -15
@@ -28,9 +28,7 @@#include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/console.h> -#ifdef CONFIG_KMOD #include <linux/kmod.h> -#endif #include <linux/err.h> #include <linux/device.h> #include <linux/efi.h>
@@ -837,13 +835,6 @@ fb_write(struct file *file, const char _return (cnt) ? cnt : err; } -#ifdef CONFIG_KMOD -static void try_to_load (int fb) -{ -request_module ("fb%d" , fb); -} -#endif /* CONFIG_KMOD */ -int fb_pan_display (struct fb_info *info,struct fb_var_screeninfo *var) {
@@ -1086,10 +1077,8 @@ fb_ioctl(struct inode *inode, struct filreturn -EINVAL ;if (con2fb.framebuffer <0 || con2fb.framebuffer >=FB_MAX )return -EINVAL ; -#ifdef CONFIG_KMOD if (!registered_fb[con2fb.framebuffer]) -try_to_load (con2fb.framebuffer); -#endif /* CONFIG_KMOD */ +request_module ("fb%d" , con2fb.framebuffer);if (!registered_fb[con2fb.framebuffer])return -EINVAL ; event.info = info;
@@ -1326,10 +1315,8 @@ fb_open(struct inode *inode, struct fileif (fbidx >=FB_MAX )return -ENODEV ; -#ifdef CONFIG_KMOD if (!(info = registered_fb[fbidx])) -try_to_load (fbidx); -#endif /* CONFIG_KMOD */ +request_module ("fb%d" , fbidx);if (!(info = registered_fb[fbidx]))return -ENODEV ;if (!try_module_get (info->fbops->owner))
Re: [RFC 04/11] remove CONFIG_KMOD from drivers
Quoted 5 lines · Johannes Berg
...
drivers/md/md.c +0
-0
drivers/md/md.c static int do_md_run(mddev_t * mddev) · line 3411
Quoted 9 lines
drivers/md/md.c +1
-1@@ -3410,7 +3405,7 @@ static int do_md_run(mddev_t * mddev) } } -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (mddev->level !=LEVEL_NONE )request_module ("md-level-%d" , mddev->level);else if (mddev->clevel[0 ])
You can remove the #ifdef
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRFC 5/11 remove CONFIG_KMOD from sparc64
In reply to Johannes BergOne place is just a comment, the other a conditional, unused inclusion of linux/kmod.h.
--- arch/sparc64/kernel/process.c | 6 +++--- arch/sparc64/kernel/traps.c | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-)
arch/sparc64/kernel/traps.c +0 -3
@@ -37,9 +37,6 @@#include <asm/processor.h> #include <asm/timer.h> #include <asm/head.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif #include <asm/prom.h> #include "entry.h"
arch/sparc64/kernel/process.c +3 -3
@@ -691,9 +691,9 @@ int copy_thread(int nr, unsigned long cl ((unsigned long ) child_sf) -STACK_BIAS ;/* Special case, if we are spawning a kernel thread from -* a userspace task (via KMOD, NFS, or similar) we must -* disable performance counters in the child because the -* address space and protection realm are changing. +* a userspace task (usermode helper, NFS or similar), we +* must disable performance counters in the child because +* the address space and protection realm are changing. */ if (t->flags & _TIF_PERFCTR) { t->user_cntd0 = t->user_cntd1 =NULL ;
RFC 6/11 remove CONFIG_KMOD from fs
In reply to Johannes BergJust always compile the code when the kernel is modular. load_nls could be converted to try_then_request_module but would lose the printk in that case.
--- fs/char_dev.c | 3 --- fs/exec.c | 9 +++------ fs/nls/nls_base.c | 6 +----- 3 files changed, 4 insertions(+), 14 deletions(-)
fs/char_dev.c +0 -3
@@ -22,9 +22,6 @@#include <linux/mutex.h> #include <linux/backing-dev.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif #include "internal.h" /*
fs/exec.c +3 -6
@@ -51,15 +51,12 @@#include <linux/tsacct_kern.h> #include <linux/cn_proc.h> #include <linux/audit.h> +#include <linux/kmod.h> #include <asm/uaccess.h> #include <asm/mmu_context.h> #include <asm/tlb.h> -#ifdef CONFIG_KMOD -#include <linux/kmod.h> -#endif -#ifdef __alpha__/* for /sbin/loader handling in search_binary_handler() */ #include <linux/a.out.h>
@@ -1239,8 +1236,8 @@ int search_binary_handler(struct linux_bread_unlock (&binfmt_lock);if (retval != -ENOEXEC || bprm->mm ==NULL ) {break ; -#ifdef CONFIG_KMOD - }else { +#ifdef CONFIG_MODULES + }else {#define printable (c) (((c)=='\t') || ((c)=='\n') || (0x20<=(c) && (c)<=0x7e)) if (printable(bprm->buf[0]) && printable(bprm->buf[1]) &&
fs/nls/nls_base.c +1 -5
@@ -13,9 +13,7 @@#include <linux/nls.h> #include <linux/kernel.h> #include <linux/errno.h> -#ifdef CONFIG_KMOD #include <linux/kmod.h> -#endif #include <linux/spinlock.h> static struct nls_table default_table;
@@ -216,15 +214,13 @@ static struct nls_table *find_nls(char *struct nls_table *load_nls (char *charset) {struct nls_table *nls; -#ifdef CONFIG_KMOD int ret; -#endif nls =find_nls (charset);if (nls)return nls; -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES ret =request_module ("nls_%s" , charset);if (ret !=0 ) {printk ("Unable to load NLS charset %s\n" , charset);
Re: [RFC 06/11] remove CONFIG_KMOD from fs
fs/nls/nls_base.c static struct nls_table *find_nls(char * · line 221
Quoted 11 lines · Johannes Berg
...
fs/nls/nls_base.c +0
-2@@ -216,15 +214,13 @@ static struct nls_table *find_nls(char *struct nls_table *load_nls (char *charset) {struct nls_table *nls; -#ifdef CONFIG_KMOD int ret; -#endif
That gives an "unused variable" gcc warning with CONFIG_MODULES=n.
fs/nls/nls_base.c static struct nls_table *find_nls(char *
Quoted 10 lines
fs/nls/nls_base.c +1
-1nls =find_nls (charset);if (nls)return nls; -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES ret =request_module ("nls_%s" , charset);if (ret !=0 ) {printk ("Unable to load NLS charset %s\n" , charset);
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [RFC 06/11] remove CONFIG_KMOD from fs
Quoted 14 lines · Adrian Bunk
fs/nls/nls_base.c static struct nls_table *find_nls(char * · line 221
Quoted 11 lines · Johannes Berg
...
fs/nls/nls_base.c +0
-2@@ -216,15 +214,13 @@ static struct nls_table *find_nls(char *struct nls_table *load_nls (char *charset) {struct nls_table *nls; -#ifdef CONFIG_KMOD int ret; -#endif That gives an "unused variable" gcc warning with
CONFIG_MODULES=n.
Will fix, thanks.
johannes
Re: [RFC 06/11] remove CONFIG_KMOD from fs
In reply to Adrian BunkQuoted 14 lines · Adrian Bunk
fs/nls/nls_base.c static struct nls_table *find_nls(char * · line 221
Quoted 11 lines · Johannes Berg
...
fs/nls/nls_base.c +0
-2@@ -216,15 +214,13 @@ static struct nls_table *find_nls(char *struct nls_table *load_nls (char *charset) {struct nls_table *nls; -#ifdef CONFIG_KMOD int ret; -#endif That gives an "unused variable" gcc warning with
CONFIG_MODULES=n.
Actually, would anyone object to removing the printk and just using try_then_request_module?
johannes
RFC 7/11 remove CONFIG_KMOD from sound
In reply to Johannes BergA bunch of things in alsa depend on CONFIG_KMOD, use CONFIG_MODULES instead where the dependency is needed at all.
--- include/sound/seq_kernel.h | 2 +- sound/core/seq/seq_clientmgr.c | 2 +- sound/core/seq/seq_device.c | 6 +++--- sound/core/sound.c | 8 ++++---- sound/core/timer.c | 6 +++--- sound/ppc/daca.c | 2 -- sound/ppc/tumbler.c | 2 -- 7 files changed, 12 insertions(+), 16 deletions(-)
include/sound/seq_kernel.h +1 -1
@@ -105,7 +105,7 @@ int snd_seq_event_port_attach(int client int cap, int type, int midi_channels, int midi_voices, char *portname);int snd_seq_event_port_detach (int client,int port); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES void snd_seq_autoload_lock (void );void snd_seq_autoload_unlock (void );#else
sound/core/seq/seq_clientmgr.c +1 -1
@@ -148,7 +148,7 @@ struct snd_seq_client *snd_seq_client_usreturn NULL ; }spin_unlock_irqrestore (&clients_lock, flags); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (!in_interrupt ()) {static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS ];static char card_requested[SNDRV_CARDS ];
sound/core/seq/seq_device.c +3 -3
@@ -124,7 +124,7 @@ static void snd_seq_device_info(struct s* load all registered drivers (called from seq_clientmgr.c) */ -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES /* avoid auto-loading during module_init() */ static int snd_seq_in_init;void snd_seq_autoload_lock (void )
@@ -140,7 +140,7 @@ void snd_seq_autoload_unlock(void)void snd_seq_device_load_drivers (void ) { -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES struct ops_list *ops;/* Calling request_module during module_init()
@@ -566,7 +566,7 @@ EXPORT_SYMBOL(snd_seq_device_load_driverEXPORT_SYMBOL (snd_seq_device_new);EXPORT_SYMBOL (snd_seq_device_register_driver);EXPORT_SYMBOL (snd_seq_device_unregister_driver); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES EXPORT_SYMBOL (snd_seq_autoload_lock);EXPORT_SYMBOL (snd_seq_autoload_unlock);#endif
sound/core/sound.c +4 -4
@@ -60,14 +60,14 @@ EXPORT_SYMBOL(snd_ecards_limit);static struct snd_minor *snd_minors[SNDRV_OS_MINORS ];static DEFINE_MUTEX (sound_mutex); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES /** * snd_request_card - try to load the card module * @card: the card number * * Tries to load the module "snd-card-X" for the given card number -* via KMOD. Returns immediately if already loaded. +* via request_module. Returns immediately if already loaded. */ void snd_request_card (int card) {
@@ -92,7 +92,7 @@ static void snd_request_other(int minor) request_module(str); } -#endif /* request_module support */ +#endif /* modular kernel */ /** * snd_lookup_minor_data - get user data of a registered device
@@ -132,7 +132,7 @@ static int snd_open(struct inode *inode,return -ENODEV ; mptr = snd_minors[minor];if (mptr ==NULL ) { -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES int dev =SNDRV_MINOR_DEVICE (minor);if (dev ==SNDRV_MINOR_CONTROL ) {/* /dev/aloadC? */
sound/core/timer.c +3 -3
@@ -146,7 +146,7 @@ static struct snd_timer *snd_timer_find(return NULL ; } -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES static void snd_timer_request (struct snd_timer_id *tid) {
@@ -259,8 +259,8 @@ int snd_timer_open(struct snd_timer_inst/* open a master instance */ mutex_lock (®ister_mutex); timer =snd_timer_find (tid); -#ifdef CONFIG_KMOD -if (timer ==NULL ) { +#ifdef CONFIG_MODULES +if (!timer) {mutex_unlock (®ister_mutex);snd_timer_request (tid);mutex_lock (®ister_mutex);
sound/ppc/daca.c +0 -2
@@ -249,9 +249,7 @@ int __init snd_pmac_daca_init(struct sndint i, err;struct pmac_daca *mix; -#ifdef CONFIG_KMOD request_module ("i2c-powermac" ); -#endif /* CONFIG_KMOD */ mix =kzalloc (sizeof (*mix),GFP_KERNEL );if (! mix)
sound/ppc/tumbler.c +0 -2
@@ -1350,9 +1350,7 @@ int __init snd_pmac_tumbler_init(structstruct device_node *tas_node, *np;char *chipname; -#ifdef CONFIG_KMOD request_module ("i2c-powermac" ); -#endif /* CONFIG_KMOD */ mix =kzalloc (sizeof (*mix),GFP_KERNEL );if (! mix)
Re: [RFC 07/11] remove CONFIG_KMOD from sound
Quoted 5 lines · Johannes Berg
...
sound/core/seq/seq_device.c +0
-0
sound/core/seq/seq_device.c EXPORT_SYMBOL(snd_seq_device_load_driver · line 572
Quoted 9 lines
sound/core/seq/seq_device.c +1
-1@@ -566,7 +566,7 @@ EXPORT_SYMBOL(snd_seq_device_load_driverEXPORT_SYMBOL (snd_seq_device_new);EXPORT_SYMBOL (snd_seq_device_register_driver);EXPORT_SYMBOL (snd_seq_device_unregister_driver); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES EXPORT_SYMBOL (snd_seq_autoload_lock);EXPORT_SYMBOL (snd_seq_autoload_unlock);#endif
You can remove the #ifdef
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [RFC 07/11] remove CONFIG_KMOD from sound
Quoted 17 lines · Adrian Bunk
Quoted 5 lines · Johannes Berg
...
sound/core/seq/seq_device.c +0
-0sound/core/seq/seq_device.c EXPORT_SYMBOL(snd_seq_device_load_driver · line 572
Quoted 9 lines
sound/core/seq/seq_device.c +1
-1@@ -566,7 +566,7 @@ EXPORT_SYMBOL(snd_seq_device_load_driverEXPORT_SYMBOL (snd_seq_device_new);EXPORT_SYMBOL (snd_seq_device_register_driver);EXPORT_SYMBOL (snd_seq_device_unregister_driver); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES EXPORT_SYMBOL (snd_seq_autoload_lock);EXPORT_SYMBOL (snd_seq_autoload_unlock);#endif You can remove the #ifdef
Same here as with dev_load, unless it's actually ok to export static inlines.
johannes
RFC 8/11 remove CONFIG_KMOD from net
In reply to Johannes BergSome code here depends on CONFIG_KMOD to not try to load protocol modules or similar, replace by CONFIG_MODULES where more than just request_module depends on CONFIG_KMOD and and also use try_then_request_module in ebtables.
--- include/linux/netdevice.h | 5 ++++- net/bluetooth/af_bluetooth.c | 8 +------- net/bridge/netfilter/ebtables.c | 15 +++------------ net/can/af_can.c | 4 ++-- net/core/dev.c | 2 +- net/core/rtnetlink.c | 4 ++-- net/dccp/ccid.c | 2 +- net/decnet/dn_dev.c | 2 -- net/ipv4/devinet.c | 2 -- net/ipv4/inet_diag.c | 2 -- net/ipv4/tcp_cong.c | 4 ++-- net/netfilter/nfnetlink.c | 2 +- net/netlink/af_netlink.c | 2 +- net/sched/act_api.c | 2 +- net/sched/cls_api.c | 2 +- net/sched/ematch.c | 2 +- net/sched/sch_api.c | 2 +- net/socket.c | 2 +- net/sunrpc/auth.c | 2 -- 19 files changed, 23 insertions(+), 43 deletions(-)
net/bluetooth/af_bluetooth.c +1 -7
@@ -36,10 +36,7 @@#include <linux/init.h> #include <linux/poll.h> #include <net/sock.h> - -#if defined(CONFIG_KMOD )#include <linux/kmod.h> -#endif #include <net/bluetooth/bluetooth.h>
@@ -144,11 +141,8 @@ static int bt_sock_create(struct net *neif (proto <0 || proto >=BT_MAX_PROTO )return -EINVAL ; -#if defined(CONFIG_KMOD ) -if (!bt_proto[proto]) { +if (!bt_proto[proto])request_module ("bt-proto-%d" , proto); - } -#endif err = -EPROTONOSUPPORT ;
net/bridge/netfilter/ebtables.c +3 -12
@@ -288,23 +288,14 @@ find_inlist_lock_noload(struct list_headreturn NULL ; } -#ifndef CONFIG_KMOD -#define find_inlist_lock (h,n,p,e,m) find_inlist_lock_noload((h),(n),(e),(m)) -#else static void *find_inlist_lock (struct list_head *head,const char *name,const char *prefix,int *error,struct mutex *mutex) { -void *ret; - - ret =find_inlist_lock_noload (head, name, error, mutex); -if (!ret) { -request_module ("%s%s" , prefix, name); - ret =find_inlist_lock_noload (head, name, error, mutex); - } -return ret; +return try_then_request_module ( +find_inlist_lock_noload (head, name, error, mutex), +"%s%s" , prefix, name); } -#endif static inline struct ebt_table *find_table_lock (const char *name,int *error,struct mutex *mutex)
net/can/af_can.c +2 -2
@@ -128,8 +128,8 @@ static int can_create(struct net *net, sif (net != &init_net)return -EAFNOSUPPORT ; -#ifdef CONFIG_KMOD -/* try to load protocol module, when CONFIG_KMOD is defined */ +#ifdef CONFIG_MODULES +/* try to load protocol module kernel is modular */ if (!proto_tab[protocol]) { err =request_module ("can-proto-%d" , protocol);
net/core/dev.c +1 -1
@@ -4639,7 +4639,7 @@ EXPORT_SYMBOL(br_fdb_get_hook);EXPORT_SYMBOL (br_fdb_put_hook);#endif -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES EXPORT_SYMBOL (dev_load);#endif
net/core/rtnetlink.c +2 -2
@@ -1029,7 +1029,7 @@ static int rtnl_newlink(struct sk_buff *struct nlattr *linkinfo[IFLA_INFO_MAX +1 ];int err; -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES replay:#endif err =nlmsg_parse (nlh,sizeof (*ifm), tb,IFLA_MAX , ifla_policy);
@@ -1118,7 +1118,7 @@ replay:return -EOPNOTSUPP ;if (!ops) { -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (kind[0 ]) {__rtnl_unlock ();request_module ("rtnl-link-%s" , kind);
net/dccp/ccid.c +1 -1
@@ -154,7 +154,7 @@ struct ccid *ccid_new(unsigned char id,struct ccid *ccid =NULL ;ccids_read_lock (); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (ccids[id] ==NULL ) {/* We only try to load if in process context */ ccids_read_unlock ();
net/decnet/dn_dev.c +0 -2
@@ -490,9 +490,7 @@ int dn_dev_ioctl(unsigned int cmd, voidreturn -EFAULT ; ifr->ifr_name[IFNAMSIZ -1 ] =0 ; -#ifdef CONFIG_KMOD dev_load (&init_net, ifr->ifr_name); -#endif switch (cmd) {case SIOCGIFADDR :
net/ipv4/devinet.c +0 -2
@@ -613,9 +613,7 @@ int devinet_ioctl(struct net *net, unsigif (colon) *colon =0 ; -#ifdef CONFIG_KMOD dev_load (net, ifr.ifr_name); -#endif switch (cmd) {case SIOCGIFADDR :/* Get interface address */
net/ipv4/inet_diag.c +0 -2
@@ -55,11 +55,9 @@ static DEFINE_MUTEX(inet_diag_table_mutestatic const struct inet_diag_handler *inet_diag_lock_handler (int type) { -#ifdef CONFIG_KMOD if (!inet_diag_table[type])request_module ("net-pf-%d-proto-%d-type-%d" ,PF_NETLINK ,NETLINK_INET_DIAG , type); -#endif mutex_lock (&inet_diag_table_mutex);if (!inet_diag_table[type])
net/ipv4/tcp_cong.c +2 -2
@@ -115,7 +115,7 @@ int tcp_set_default_congestion_control(cspin_lock (&tcp_cong_list_lock); ca =tcp_ca_find (name); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (!ca &&capable (CAP_SYS_MODULE )) {spin_unlock (&tcp_cong_list_lock);
@@ -244,7 +244,7 @@ int tcp_set_congestion_control(struct soif (ca == icsk->icsk_ca_ops) goto out; -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES /* not found attempt to autoload module */ if (!ca &&capable (CAP_SYS_MODULE )) {rcu_read_unlock ();
net/netfilter/nfnetlink.c +1 -1
@@ -134,7 +134,7 @@ static int nfnetlink_rcv_msg(struct sk_b type = nlh->nlmsg_type; ss =nfnetlink_get_subsys (type);if (!ss) { -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES nfnl_unlock ();request_module ("nfnetlink-subsys-%d" ,NFNL_SUBSYS_ID (type));nfnl_lock ();
net/netlink/af_netlink.c +1 -1
@@ -434,7 +434,7 @@ static int netlink_create(struct net *nereturn -EPROTONOSUPPORT ;netlink_lock_table (); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (!nl_table[protocol].registered) {netlink_unlock_table ();request_module ("net-pf-%d-proto-%d" ,PF_NETLINK , protocol);
net/sched/act_api.c +1 -1
@@ -495,7 +495,7 @@ struct tc_action *tcf_action_init_1(stru a_o =tc_lookup_action_n (act_name);if (a_o ==NULL ) { -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES rtnl_unlock ();request_module ("act_%s" , act_name);rtnl_lock ();
net/sched/cls_api.c +1 -1
@@ -223,7 +223,7 @@ replay: err = -ENOENT ; tp_ops =tcf_proto_lookup_ops (tca[TCA_KIND ]);if (tp_ops ==NULL ) { -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES struct nlattr *kind = tca[TCA_KIND ];char name[IFNAMSIZ ];
net/sched/ematch.c +1 -1
@@ -224,7 +224,7 @@ static int tcf_em_validate(struct tcf_prif (em->ops ==NULL ) { err = -ENOENT ; -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES __rtnl_unlock ();request_module ("ematch-kind-%u" , em_hdr->kind);rtnl_lock ();
net/sched/sch_api.c +1 -1
@@ -457,7 +457,7 @@ qdisc_create(struct net_device *dev, u32struct Qdisc_ops *ops; ops =qdisc_lookup_ops (kind); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES if (ops ==NULL && kind !=NULL ) {char name[IFNAMSIZ ];if (nla_strlcpy (name, kind,IFNAMSIZ ) <IFNAMSIZ ) {
net/socket.c +1 -1
@@ -1140,7 +1140,7 @@ static int __sock_create(struct net *net sock->type = type; -#if defined(CONFIG_KMOD ) +#ifdef CONFIG_MODULES /* Attempt to load a protocol module if the find failed. * * 12/09/1996 Marcin: But! this makes REALLY only sense, if the user
net/sunrpc/auth.c +0 -2
@@ -83,10 +83,8 @@ rpcauth_create(rpc_authflavor_t pseudoflif (flavor >=RPC_AUTH_MAXFLAVOR ) goto out; -#ifdef CONFIG_KMOD if ((ops = auth_flavors[flavor]) ==NULL )request_module ("rpc-auth-%u" , flavor); -#endif spin_lock (&rpc_authflavor_lock); ops = auth_flavors[flavor];if (ops ==NULL || !try_module_get (ops->owner)) {
include/linux/netdevice.h +4 -1
@@ -1484,8 +1484,11 @@ extern void dev_set_promiscuity(structextern void dev_set_allmulti (struct net_device *dev,int inc);extern void netdev_state_change (struct net_device *dev);extern void netdev_features_change (struct net_device *dev); -/* Load a device via the kmod */ +#ifdef CONFIG_MODULES extern void dev_load (struct net *net,const char *name); +#else +static inline void dev_load (struct net *net,const char *name) {}; +#endif extern void dev_mcast_init (void );extern int netdev_max_backlog;extern int weight_p;
Re: [RFC 08/11] remove CONFIG_KMOD from net
net/core/dev.c EXPORT_SYMBOL(br_fdb_get_hook); · line 4644
Quoted 12 lines · Johannes Berg
...
net/core/dev.c +1
-1@@ -4639,7 +4639,7 @@ EXPORT_SYMBOL(br_fdb_get_hook);EXPORT_SYMBOL (br_fdb_put_hook);#endif -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES EXPORT_SYMBOL (dev_load);#endif
You can remove the #ifdef
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [RFC 08/11] remove CONFIG_KMOD from net
Quoted 8 lines · Adrian Bunk
Quoted 7 lines · Johannes Berg
...
net/core/dev.c +0
-0@@ -4639,7 +4639,7 @@ EXPORT_SYMBOL(br_fdb_get_hook);EXPORT_SYMBOL (br_fdb_put_hook);#endif
Quoted 7 lines
net/core/dev.c EXPORT_SYMBOL(br_fdb_get_hook); · line 4644
Quoted 5 lines
net/core/dev.c +1
-1-#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES EXPORT_SYMBOL (dev_load);#endif You can remove the #ifdef
Eh, no. Not unless I also always compile in dev_load, which as of now depends on CONFIG_MODULES. In fact, another hunk in this series makes it a static inline when CONFIG_MODULES=n so that callers don't need to take care of #ifdef'ing it.
johannes
Re: [RFC 08/11] remove CONFIG_KMOD from net
Quoted 17 lines · Johannes Berg
Quoted 8 lines · Adrian Bunk
Quoted 7 lines · Johannes Berg
...
net/core/dev.c +0
-0@@ -4639,7 +4639,7 @@ EXPORT_SYMBOL(br_fdb_get_hook);EXPORT_SYMBOL (br_fdb_put_hook);#endif Quoted 7 lines
net/core/dev.c EXPORT_SYMBOL(br_fdb_get_hook); · line 4644
Quoted 5 lines
net/core/dev.c +1
-1-#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES EXPORT_SYMBOL (dev_load);#endif You can remove the #ifdef
Quoted 4 lines
Eh, no. Not unless I also always compile in
dev_load, which as of now depends onCONFIG_MODULES. In fact, another hunk in this series makes it a static inline whenCONFIG_MODULES=nso that callers don't need to take care of #ifdef'ing it.
Look at include/linux/module.h:
...
#ifdef CONFIG_MODULES
...
#define EXPORT_SYMBOL(sym) \
__EXPORT_SYMBOL(sym, "")...
#else /* !CONFIG_MODULES... */
#define EXPORT_SYMBOL(sym)
...
Quoted 1 line
johannes
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [RFC 08/11] remove CONFIG_KMOD from net
Quoted 11 lines
Quoted 5 lines
Eh, no. Not unless I also always compile in
dev_load, which as of now depends onCONFIG_MODULES. In fact, another hunk in this series makes it a static inline whenCONFIG_MODULES=nso that callers don't need to take care of #ifdef'ing it.Look at
include/linux/module.h:...
#ifdefCONFIG_MODULES
...
Quoted 6 lines
#define EXPORT_SYMBOL(sym) \ __EXPORT_SYMBOL(sym, "")...
#else /* !CONFIG_MODULES... */
#defineEXPORT_SYMBOL(sym)
...
Oh, right, I forgot I was dealing with CONFIG_MODULES and treated it just like another config option, thanks.
johannes
RFC 9/11 remove CONFIG_KMOD from lib
In reply to Johannes Bergtextsearch algorithms can be loaded, make the code depend on CONFIG_MODULES instead of CONFIG_KMOD.
--- lib/textsearch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/textsearch.c +1 -1
@@ -264,7 +264,7 @@ struct ts_config *textsearch_prepare(conreturn ERR_PTR (-EINVAL ); ops =lookup_ts_algo (algo); -#ifdef CONFIG_KMOD +#ifdef CONFIG_MODULES /* * Why not always autoload you may ask. Some users are * in a situation where requesting a module may deadlock,
RFC 10/11 remove mention of CONFIG_KMOD from documentation
In reply to Johannes BergAlso includes a few Kconfig files (xtensa, blackfin)
--- Documentation/filesystems/bfs.txt | 10 +++++----- Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl | 2 +- Documentation/telephony/ixj.txt | 13 +++---------- Documentation/video4linux/w9968cf.txt | 3 --- arch/blackfin/Kconfig | 4 ++-- arch/xtensa/Kconfig | 4 ++-- 6 files changed, 13 insertions(+), 23 deletions(-)
Documentation/filesystems/bfs.txt +5 -5
@@ -26,11 +26,11 @@ You can simplify mounting by just typing this will allocate the first available loopback device (and load loop.o kernel module if necessary) automatically. If the loopback driver is not -loaded automatically, make sure that your kernel is compiled with kmod -support (CONFIG_KMOD) enabled. Beware that umount will not -deallocate /dev/loopN device if /etc/mtab file on your system is a -symbolic link to /proc/mounts. You will need to do it manually using -"-d" switch of losetup(8). Read losetup(8) manpage for more info. +loaded automatically, make sure that you have compiled the module and +that modprobe is functioning. Beware that umount will not deallocate +/dev/loopN device if /etc/mtab file on your system is a symbolic link to +/proc/mounts. You will need to do it manually using "-d" switch of +losetup(8). Read losetup(8) manpage for more info. To create the BFS image under UnixWare you need to find out first which slice contains it. The command prtvtoc(1M) is your friend:
Documentation/telephony/ixj.txt +3 -10
@@ -305,21 +305,14 @@ driver, like this: which will result in the needed drivers getting loaded automatically. - g. if you are planning on using kerneld to automatically load the -module for you, then you need to edit /etc/conf.modules and add the + g. if you are planning on having the kernel automatically request +the module for you, then you need to edit /etc/conf.modules and add the following lines: options ixj dspio=0x340 xio=0x330 ixjdebug=0 If you do this, then when you execute an application that uses the -module kerneld will load the module for you. Note that to do this, -you need to have your kernel set to support kerneld. You can check -for this by looking at /usr/src/linux/.config and you should see this: - - # Loadable module support - # - <snip> - CONFIG_KMOD=y +module the kernel will request that it is loaded. h. if you want non-root users to be able to read and write to the ixj devices (this is a good idea!) you should do the following:
Documentation/video4linux/w9968cf.txt +0 -3
@@ -193,9 +193,6 @@ Description: Automatic 'ovcamchip' m loads that module automatically. This action is performed as once soon as the 'w9968cf' module is loaded into memory. Default: 1 -Note: The kernel must be compiled with the CONFIG_KMOD option - enabled for the 'ovcamchip' module to be loaded and for - this parameter to be present. ------------------------------------------------------------------------------- Name: simcams Type: int
Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl +1 -1
@@ -42,7 +42,7 @@ <sect1><title>Device Components</title> !Esound/core/device.c </sect1> - <sect1><title>KMOD and Device File Entries</title> + <sect1><title>Module requests and Device File Entries</title> !Esound/core/sound.c </sect1> <sect1><title>Memory Management Helpers</title>
arch/blackfin/Kconfig +2 -2
@@ -873,8 +873,8 @@ config HOTPLUG plugged into slots found on all modern laptop computers. Another example, used on modern desktops as well as laptops, is USB. - Enable HOTPLUG and KMOD, and build a modular kernel. Get agent - software (at <http://linux-hotplug.sourceforge.net/>) and install it. + Enable HOTPLUG and build a modular kernel. Get agent software + (from <http://linux-hotplug.sourceforge.net/>) and install it. Then your kernel will automatically call out to a user mode "policy agent" (/sbin/hotplug) to load modules and set up software needed to use devices as you hotplug them.
arch/xtensa/Kconfig +2 -2
@@ -194,8 +194,8 @@ config HOTPLUG plugged into slots found on all modern laptop computers. Another example, used on modern desktops as well as laptops, is USB. - Enable HOTPLUG and KMOD, and build a modular kernel. Get agent - software (at <http://linux-hotplug.sourceforge.net/>) and install it. + Enable HOTPLUG and build a modular kernel. Get agent software + (from <http://linux-hotplug.sourceforge.net/>) and install it. Then your kernel will automatically call out to a user mode "policy agent" (/sbin/hotplug) to load modules and set up software needed to use devices as you hotplug them.
Re: [RFC 10/11] remove mention of CONFIG_KMOD from documentation
Quoted 6 lines · On Tue, 08 Jul 2008 19:00:25 +0200 Johannes Berg wrote:
Also includes a few
Kconfigfiles (xtensa, blackfin)Signed-off-by Johannes Berg <[email protected]>Cc Michael Kerrisk <[email protected]>Cc Randy Dunlap <[email protected]>
Quoted 106 lines
--- Documentation/filesystems/bfs.txt | 10 +++++----- Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl | 2 +- Documentation/telephony/ixj.txt | 13 +++---------- Documentation/video4linux/w9968cf.txt | 3 --- arch/blackfin/Kconfig | 4 ++-- arch/xtensa/Kconfig | 4 ++-- 6 files changed, 13 insertions(+), 23 deletions(-)Documentation/filesystems/bfs.txt +5
-5@@ -26,11 +26,11 @@ You can simplify mounting by just typing this will allocate the first available loopback device (and load loop.o kernel module if necessary) automatically. If the loopback driver is not -loaded automatically, make sure that your kernel is compiled with kmod -support (CONFIG_KMOD) enabled. Beware that umount will not -deallocate /dev/loopN device if /etc/mtab file on your system is a -symbolic link to /proc/mounts. You will need to do it manually using -"-d" switch of losetup(8). Read losetup(8) manpage for more info. +loaded automatically, make sure that you have compiled the module and +that modprobe is functioning. Beware that umount will not deallocate +/dev/loopN device if /etc/mtab file on your system is a symbolic link to +/proc/mounts. You will need to do it manually using "-d" switch of +losetup(8). Read losetup(8) manpage for more info. To create the BFS image under UnixWare you need to find out first which slice contains it. The command prtvtoc(1M) is your friend:Documentation/telephony/ixj.txt +3
-10@@ -305,21 +305,14 @@ driver, like this: which will result in the needed drivers getting loaded automatically. - g. if you are planning on using kerneld to automatically load the -module for you, then you need to edit /etc/conf.modules and add the + g. if you are planning on having the kernel automatically request +the module for you, then you need to edit /etc/conf.modules and add the following lines: options ixj dspio=0x340 xio=0x330 ixjdebug=0 If you do this, then when you execute an application that uses the -module kerneld will load the module for you. Note that to do this, -you need to have your kernel set to support kerneld. You can check -for this by looking at /usr/src/linux/.config and you should see this: - - # Loadable module support - # - <snip> - CONFIG_KMOD=y +module the kernel will request that it is loaded. h. if you want non-root users to be able to read and write to the ixj devices (this is a good idea!) you should do the following:Documentation/video4linux/w9968cf.txt +0
-3@@ -193,9 +193,6 @@ Description: Automatic 'ovcamchip' m loads that module automatically. This action is performed as once soon as the 'w9968cf' module is loaded into memory. Default: 1 -Note: The kernel must be compiled with the CONFIG_KMOD option - enabled for the 'ovcamchip' module to be loaded and for - this parameter to be present. ------------------------------------------------------------------------------- Name: simcams Type: intDocumentation/sound/alsa/DocBook/alsa-driver-api.tmpl +1
-1@@ -42,7 +42,7 @@ <sect1><title>Device Components</title> !Esound/core/device.c </sect1> - <sect1><title>KMOD and Device File Entries</title> + <sect1><title>Module requests and Device File Entries</title> !Esound/core/sound.c </sect1> <sect1><title>Memory Management Helpers</title>arch/blackfin/Kconfig +2
-2@@ -873,8 +873,8 @@ config HOTPLUG plugged into slots found on all modern laptop computers. Another example, used on modern desktops as well as laptops, is USB. - Enable HOTPLUG and KMOD, and build a modular kernel. Get agent - software (at <http://linux-hotplug.sourceforge.net/>) and install it. + Enable HOTPLUG and build a modular kernel. Get agent software + (from <http://linux-hotplug.sourceforge.net/>) and install it. Then your kernel will automatically call out to a user mode "policy agent" (/sbin/hotplug) to load modules and set up software needed to use devices as you hotplug them.arch/xtensa/Kconfig +2
-2@@ -194,8 +194,8 @@ config HOTPLUG plugged into slots found on all modern laptop computers. Another example, used on modern desktops as well as laptops, is USB. - Enable HOTPLUG and KMOD, and build a modular kernel. Get agent - software (at <http://linux-hotplug.sourceforge.net/>) and install it. + Enable HOTPLUG and build a modular kernel. Get agent software + (from <http://linux-hotplug.sourceforge.net/>) and install it. Then your kernel will automatically call out to a user mode "policy agent" (/sbin/hotplug) to load modules and set up software needed to use devices as you hotplug them.Signature · 1 line
--
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
RFC 11/11 remove CONFIG_KMOD
In reply to Johannes BergNow that nothing depends on it any more, remove CONFIG_KMOD.
--- init/Kconfig | 4 ---- 1 file changed, 4 deletions(-)
init/Kconfig +0 -4
@@ -892,10 +892,6 @@ config MODULE_SRCVERSION_ALL the version). With this option, such a "srcversion" field will be created for all modules. If unsure, say N. -config KMOD - def_bool y - depends on MODULES - config STOP_MACHINE bool default y
Quoted 4 lines · On Wednesday 09 July 2008 03:00:15 Johannes Berg wrote:
Some place with some code or conditional I just converted to use
CONFIG_MODULES, other places can invokerequest_moduleunconditionally because it compiles out when the kernel is not modular, and one place (so far) converted totry_then_request_module.
Applied 1, 2, 3, 5, 9, 10 and 11. The others had comments.
I added a help comment to the KMOD Kconfig, pointing out that it is deprecated.
Thanks,
Rusty.
Quoted 7 lines · Rusty Russell
Quoted 4 lines · On Wednesday 09 July 2008 03:00:15 Johannes Berg wrote:
Some place with some code or conditional I just converted to use
CONFIG_MODULES, other places can invokerequest_moduleunconditionally because it compiles out when the kernel is not modular, and one place (so far) converted totry_then_request_module.Applied 1, 2, 3, 5, 9, 10 and 11. The others had comments.
What to? I took akpm's advice and rebased them against linux-next, a few had minor conflicts. Nothing changed _much_, I only addressed the comments and fixed those small conflicts.
I'll send the updated set.
Quoted 2 lines
I added a help comment to the KMOD
Kconfig, pointing out that it is deprecated.
Good point.
Thanks,
johannes