Re: Modularized x86 math emulation PATCH against pre-2.1.104-1

David Woodhouse (Dave@imladris.demon.co.uk)
Mon, 25 May 1998 02:44:18 +0200


mec@shout.net said:
> Unfortunately there's a lot more of this stuff in your patch ... I
> really hate it when the resident kernel changes depending on whether
> something is a module or not included. Maybe that's just me though.

Nope. Not just you. I'd already picked up on it in his other patch.

I've been looking at how to avoid the same kind of thing in Michael Beck's PC
Speaker driver, so we can try to get it into early 2.3

It already happens in a few places in the kernel, but IMHO it's best avoided
if possible. Unless the hooks are in a particularly critical path, they should
be left in place regardless of whether the module is configured. They're
hardly heavyweight.

Sorry, Adam, we're not picking on you, honest. :) It happens in a lot of other
places, too. I've included a list of the offending config options - the full
list of files was a bit big.

What reason is there in each case for not turning '#ifdef CONFIG_xxx_MODULE' to
'#ifndef CONFIG_xxx', and just removing the conditions altogether on code
marked '#if defined(CONFIG_xxx) || defined(CONFIG_xxx_MODULE)'

If it were my decision, which it isn't, then about the only excuse I'd accept
would be "It's in the networking/syscall critical path."

Otherwise, do we get to #ifdef out the register_netdev and register_chrdev
mechanisms when the user doesn't configure any modules of the relevant type?
That'd save _lots_ of space and time.

CONFIG_6PACK_MODULE
CONFIG_ATALK_MODULE
CONFIG_ATARI_SLM_MODULE
CONFIG_AWE32_SYNTH_MODULE
CONFIG_AX25_MODULE
CONFIG_BINFMT_ELF32_MODULE
CONFIG_BLK_DEV_HD_MODULE
CONFIG_BLK_DEV_IDE_MODULE
CONFIG_DLCI_MODULE
CONFIG_FC4_SOC_MODULE
CONFIG_IPDDP_MODULE
CONFIG_IPV6_MODULE
CONFIG_IPX_MODULE
CONFIG_LAPB_MODULE
CONFIG_LLC_MODULE
CONFIG_MATHEMU_MODULE
CONFIG_MIPS_FPE_MODULE
CONFIG_NETLINK_DEV_MODULE
CONFIG_NETROM_MODULE
CONFIG_NFSD_MODULE
CONFIG_PACKET_MODULE
CONFIG_PARPORT_ARC_MODULE
CONFIG_PARPORT_AX_MODULE
CONFIG_PARPORT_MODULE
CONFIG_PARPORT_PC_MODULE
CONFIG_PCSP_MODULE
CONFIG_PNP_PARPORT_MODULE
CONFIG_ROSE_MODULE
CONFIG_SHAPER_MODULE
CONFIG_SOLARIS_EMUL_MODULE
CONFIG_SPX_MODULE
CONFIG_SUN_OPENPROMFS_MODULE
CONFIG_X25_MODULE

---- ---- ----
David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355
Dave@imladris.demon.co.uk http://www.imladris.demon.co.uk
finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu