Skip to contentSkip to conversation

inter-module-* removal.. small next step

PATCH Arjan van de Ven 6 participants 16 messages Jan 30, 2005 – Jan 31, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.

kernel/Makefile +5 -1
@@ -6,7 +6,7 @@
 	    exit.o itimer.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
 	    signal.o sys.o kmod.o workqueue.o pid.o \
-	    rcupdate.o intermodule.o extable.o params.o posix-timers.o \
+	    rcupdate.o extable.o params.o posix-timers.o \
 	    kthread.o wait.o kfifo.o sys_ni.o
 
 obj-$(CONFIG_FUTEX) += futex.o
@@ -27,6 +27,10 @@
 obj-$(CONFIG_SYSFS) += ksysfs.o
 obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
 
+inter-$(CONFIG_MTD)	+= intermodule.o
+obj-y	+= $(inter-y)
+obj-y  += $(inter=m)
+
 ifneq ($(CONFIG_IA64),y)
 # According to Alan Modra <[email protected]>, the -fno-omit-frame-pointer is
 # needed for x86 only.  Why this used to be enabled for all architectures is beyond
#1 lore raw
Quoted 22 lines · Arjan van de Ven

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.

kernel/Makefile +1 -1
@@ -6,7 +6,7 @@
 	    exit.o itimer.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
 	    signal.o sys.o kmod.o workqueue.o pid.o \
-	    rcupdate.o intermodule.o extable.o params.o posix-timers.o \
+	    rcupdate.o extable.o params.o posix-timers.o \
 	    kthread.o wait.o kfifo.o sys_ni.o
 
 obj-$(CONFIG_FUTEX) += futex.o

kernel/Makefile line 32

Quoted 7 lines
kernel/Makefile +3 -0
@@ -27,6 +27,10 @@
 obj-$(CONFIG_SYSFS) += ksysfs.o
 obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
 
+inter-$(CONFIG_MTD)	+= intermodule.o
+obj-y	+= $(inter-y)
+obj-y  += $(inter=m)
...

This should be inter-m .

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 Seed
#2 lore raw
In reply to Arjan van de Ven
Quoted 7 lines · Arjan van de Ven

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.
...

agpgart-allow-multiple-backends-to-be-initialized.patch in -mm adds a call to inter_module_unregister to drivers/char/agp/backend.c ...

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 Seed
#3 lore raw
Quoted 4 lines · Adrian Bunk
Quoted 2 lines · Arjan van de Ven

Hi,

Quoted 8 lines
Quoted 5 lines

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.
...

agpgart-allow-multiple-backends-to-be-initialized.patch in -mm adds a call to inter_module_unregister to drivers/char/agp/backend.c ...

that is a bug in -mm; inter-module* got removed from agp entirely some time ago

sounds like andrew has some bad patchnoise in his his agp patch

#4 lore raw
Quoted 12 lines · Arjan van de Ven
Quoted 10 lines · Adrian Bunk
Quoted 7 lines · Arjan van de Ven

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.
...

Quoted 5 lines
Quoted 2 lines

agpgart-allow-multiple-backends-to-be-initialized.patch in -mm adds a call to inter_module_unregister to drivers/char/agp/backend.c ...

that is a bug in -mm; inter-module* got removed from agp entirely some time ago

Michael's patches put it back in. What's the fix?

#5 lore raw
Quoted 13 lines · Andrew Morton
Quoted 12 lines · Arjan van de Ven
Quoted 10 lines · Adrian Bunk
Quoted 7 lines · Arjan van de Ven

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.
...

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

agpgart-allow-multiple-backends-to-be-initialized.patch in -mm adds a call to inter_module_unregister to drivers/char/agp/backend.c ...

that is a bug in -mm; inter-module* got removed from agp entirely some time ago

Michael's patches put it back in. What's the fix?

they only put it half in. just drop the one line; it tries to unregister something that never got registered...
the old cleanup code had to do that, but that got removed. The patch basically replaces the cleanup code, and thus puts it back in. One line deleted and it's fine.

#6 lore raw
In reply to Arjan van de Ven
Quoted 6 lines · Arjan van de Ven

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.

Please get the dependencies right -- it's not core MTD code, but the NOR chip drivers and the old DiskOnChip drivers which use this.

Signature · 1 line
dwmw2
#7 lore raw
Quoted 10 lines · David Woodhouse
Quoted 6 lines · Arjan van de Ven

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.

Please get the dependencies right -- it's not core MTD code, but the NOR chip drivers and the old DiskOnChip drivers which use this.

Are these things old enough to just be marked broken instead and finish removing inter_xx?

Signature · 2 lines
Jon Smirl
[email protected]
#8 lore raw
Quoted 2 lines · Jon Smirl

Are these things old enough to just be marked broken instead and finish removing inter_xx?

The DiskOnChip drivers are getting that way; not the NOR flash drivers though. Those need the problem solving properly; just hacking out the inter_module_ crap and replacing it without thinking too hard isn't the answer. I'll be glad to see the back of it though -- I was annoyed enough when it was done in the first place, against my wishes.

Signature · 1 line
dwmw2
#9 lore raw
In reply to David Woodhouse
Quoted 10 lines · David Woodhouse
Quoted 6 lines · Arjan van de Ven

Hi,

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.

Please get the dependencies right -- it's not core MTD code, but the NOR chip drivers and the old DiskOnChip drivers which use this.

that's just a slightly more finegrained thing, not sure if it's worth going that deep, esp since it become 2 deps not one, making a bigger mess than needed.

now if one of the two can go (obsolete) it'd make sense

#10 lore raw
Quoted 8 lines · Arjan van de Ven
Quoted 7 lines · David Woodhouse
Quoted 5 lines · Arjan van de Ven

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.

Quoted 6 lines
Quoted 2 lines

Please get the dependencies right -- it's not core MTD code, but the NOR chip drivers and the old DiskOnChip drivers which use this.

that's just a slightly more finegrained thing, not sure if it's worth going that deep, esp since it become 2 deps not one, making a bigger mess than needed.

How about this one? It's actually less messy inside kernel/Makefile.

Completely untested, though.

Jörn

Signature · 94 lines
"Error protection by error detection and correction."
-- from a university class


Signed-off-by: Jörn Engel <[email protected]>
---

 drivers/mtd/chips/Kconfig   |    4 ++++
 drivers/mtd/devices/Kconfig |    4 ++++
 kernel/Makefile             |    3 ++-
 3 files changed, 10 insertions(+), 1 deletion(-)

--- linux-2.6.10cow/kernel/Makefile~inter_module	2004-12-28 17:31:37.000000000 +0100
+++ linux-2.6.10cow/kernel/Makefile	2005-01-31 14:49:40.000000000 +0100
@@ -6,9 +6,10 @@ obj-y     = sched.o fork.o exec_domain.o
 	    exit.o itimer.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
 	    signal.o sys.o kmod.o workqueue.o pid.o \
-	    rcupdate.o intermodule.o extable.o params.o posix-timers.o \
+	    rcupdate.o extable.o params.o posix-timers.o \
 	    kthread.o wait.o kfifo.o sys_ni.o
 
+obj-$(CONFIG_INTER_MODULE_CRAP) += intermodule.o
 obj-$(CONFIG_FUTEX) += futex.o
 obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
 obj-$(CONFIG_SMP) += cpu.o spinlock.o
--- linux-2.6.10cow/drivers/mtd/devices/Kconfig~inter_module	2005-01-11 20:48:52.000000000 +0100
+++ linux-2.6.10cow/drivers/mtd/devices/Kconfig	2005-01-31 14:51:29.000000000 +0100
@@ -140,6 +140,7 @@ comment "Disk-On-Chip Device Drivers"
 config MTD_DOC2000
 	tristate "M-Systems Disk-On-Chip 2000 and Millennium (DEPRECATED)"
 	depends on MTD
+	select INTER_MODULE_CRAP
 	---help---
 	  This provides an MTD device driver for the M-Systems DiskOnChip
 	  2000 and Millennium devices.  Originally designed for the DiskOnChip
@@ -161,6 +162,7 @@ config MTD_DOC2000
 config MTD_DOC2001
 	tristate "M-Systems Disk-On-Chip Millennium-only alternative driver (DEPRECATED)"
 	depends on MTD
+	select INTER_MODULE_CRAP
 	---help---
 	  This provides an alternative MTD device driver for the M-Systems 
 	  DiskOnChip Millennium devices.  Use this if you have problems with
@@ -181,6 +183,7 @@ config MTD_DOC2001
 config MTD_DOC2001PLUS
 	tristate "M-Systems Disk-On-Chip Millennium Plus"
 	depends on MTD
+	select INTER_MODULE_CRAP
 	---help---
 	  This provides an MTD device driver for the M-Systems DiskOnChip
 	  Millennium Plus devices.
@@ -198,6 +201,7 @@ config MTD_DOCPROBE
 	tristate
 	default m if MTD_DOC2001!=y && MTD_DOC2000!=y && MTD_DOC2001PLUS!=y && (MTD_DOC2001=m || MTD_DOC2000=m || MTD_DOC2001PLUS=m)
 	default y if MTD_DOC2001=y || MTD_DOC2000=y || MTD_DOC2001PLUS=y
+	select INTER_MODULE_CRAP
 	help
 	  This isn't a real config option; it's derived.
 
--- linux-2.6.10cow/drivers/mtd/chips/Kconfig~inter_module	2004-09-04 22:59:02.000000000 +0200
+++ linux-2.6.10cow/drivers/mtd/chips/Kconfig	2005-01-31 14:53:05.000000000 +0100
@@ -7,6 +7,7 @@ menu "RAM/ROM/Flash chip drivers"
 config MTD_CFI
 	tristate "Detect flash chips by Common Flash Interface (CFI) probe"
 	depends on MTD
+	select INTER_MODULE_CRAP
 	help
 	  The Common Flash Interface specification was developed by Intel,
 	  AMD and other flash manufactures that provides a universal method
@@ -158,6 +159,7 @@ config MTD_CFI_I8
 config MTD_CFI_INTELEXT
 	tristate "Support for Intel/Sharp flash chips"
 	depends on MTD_GEN_PROBE
+	select INTER_MODULE_CRAP
 	help
 	  The Common Flash Interface defines a number of different command
 	  sets which a CFI-compliant chip may claim to implement. This code
@@ -167,6 +169,7 @@ config MTD_CFI_INTELEXT
 config MTD_CFI_AMDSTD
 	tristate "Support for AMD/Fujitsu flash chips"
 	depends on MTD_GEN_PROBE
+	select INTER_MODULE_CRAP
 	help
 	  The Common Flash Interface defines a number of different command
 	  sets which a CFI-compliant chip may claim to implement. This code
@@ -197,6 +200,7 @@ config MTD_CFI_AMDSTD_RETRY_MAX
 config MTD_CFI_STAA
 	tristate "Support for ST (Advanced Architecture) flash chips"
 	depends on MTD_GEN_PROBE
+	select INTER_MODULE_CRAP
 	help
 	  The Common Flash Interface defines a number of different command
 	  sets which a CFI-compliant chip may claim to implement. This code
#11 lore raw
Quoted 12 lines · Jörn Engel
Quoted 11 lines · Arjan van de Ven
Quoted 9 lines · David Woodhouse
Quoted 5 lines · Arjan van de Ven

intermodule is deprecated for quite some time now, and MTD is the sole last user in the tree. To shrink the kernel for the people who don't use MTD, and to prevent accidental return of more users of this, make the compiling of this function conditional on MTD.

Please get the dependencies right -- it's not core MTD code, but the NOR chip drivers and the old DiskOnChip drivers which use this.

Quoted 7 lines
Quoted 3 lines

that's just a slightly more finegrained thing, not sure if it's worth going that deep, esp since it become 2 deps not one, making a bigger mess than needed.

How about this one? It's actually less messy inside kernel/Makefile.

Completely untested, though.

Your patch doesn't add a Kconfig entry for INTER_MODULE_CRAP.

Quoted 2 lines

Jörn
...

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 Seed
#12 lore raw
Quoted 2 lines · Adrian Bunk

Your patch doesn't add a Kconfig entry for INTER_MODULE_CRAP.

True. But where to add it? arch/*/Kconfig is pretty ugly. drivers/mtd/Kconfig?

Jörn

Signature · 2 lines
When in doubt, use brute force.
-- Ken Thompson
#13 lore raw
In reply to Adrian Bunk
Quoted 2 lines · Adrian Bunk

Your patch doesn't add a Kconfig entry for INTER_MODULE_CRAP.

Now it does, and it picked up dwmw2's suggestion as well.

Jörn

Signature · 61 lines
He who knows others is wise.
He who knows himself is enlightened.
-- Lao Tsu


Signed-off-by: Jörn Engel <[email protected]>
---

 drivers/mtd/Kconfig         |    4 ++++
 drivers/mtd/chips/Kconfig   |    1 +
 drivers/mtd/devices/Kconfig |    1 +
 kernel/Makefile             |    3 ++-
 4 files changed, 8 insertions(+), 1 deletion(-)

--- linux-2.6.10cow/drivers/mtd/Kconfig~inter_module	2004-09-04 22:59:02.000000000 +0200
+++ linux-2.6.10cow/drivers/mtd/Kconfig	2005-01-31 15:29:14.000000000 +0100
@@ -2,6 +2,10 @@
 
 menu "Memory Technology Devices (MTD)"
 
+# This doens't actually belong here, but mtd is the last user, so...
+config INTER_MODULE_CRAP
+	boolean
+
 config MTD
 	tristate "Memory Technology Device (MTD) support"
 	help
--- linux-2.6.10cow/drivers/mtd/chips/Kconfig~inter_module	2004-09-04 22:59:02.000000000 +0200
+++ linux-2.6.10cow/drivers/mtd/chips/Kconfig	2005-01-31 15:32:42.000000000 +0100
@@ -31,6 +31,7 @@ config MTD_GEN_PROBE
 	tristate
 	default m if MTD_CFI!=y && !MTD_INTELPROBE && MTD_JEDECPROBE!=y && (MTD_CFI=m || MTD_JEDECPROBE=m)
 	default y if MTD_CFI=y || MTD_INTELPROBE || MTD_JEDECPROBE=y
+	select INTER_MODULE_CRAP
 
 config MTD_CFI_ADV_OPTIONS
 	bool "Flash chip driver advanced configuration options"
--- linux-2.6.10cow/drivers/mtd/devices/Kconfig~inter_module	2005-01-11 20:48:52.000000000 +0100
+++ linux-2.6.10cow/drivers/mtd/devices/Kconfig	2005-01-31 15:31:59.000000000 +0100
@@ -198,6 +198,7 @@ config MTD_DOCPROBE
 	tristate
 	default m if MTD_DOC2001!=y && MTD_DOC2000!=y && MTD_DOC2001PLUS!=y && (MTD_DOC2001=m || MTD_DOC2000=m || MTD_DOC2001PLUS=m)
 	default y if MTD_DOC2001=y || MTD_DOC2000=y || MTD_DOC2001PLUS=y
+	select INTER_MODULE_CRAP
 	help
 	  This isn't a real config option; it's derived.
 
--- linux-2.6.10cow/kernel/Makefile~inter_module	2004-12-28 17:31:37.000000000 +0100
+++ linux-2.6.10cow/kernel/Makefile	2005-01-31 14:49:40.000000000 +0100
@@ -6,9 +6,10 @@ obj-y     = sched.o fork.o exec_domain.o
 	    exit.o itimer.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
 	    signal.o sys.o kmod.o workqueue.o pid.o \
-	    rcupdate.o intermodule.o extable.o params.o posix-timers.o \
+	    rcupdate.o extable.o params.o posix-timers.o \
 	    kthread.o wait.o kfifo.o sys_ni.o
 
+obj-$(CONFIG_INTER_MODULE_CRAP) += intermodule.o
 obj-$(CONFIG_FUTEX) += futex.o
 obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
 obj-$(CONFIG_SMP) += cpu.o spinlock.o
#14 lore raw
In reply to Jörn Engel
Quoted 4 lines · Jörn Engel

How about this one? It's actually less messy inside kernel/Makefile.

Completely untested, though.

Surely it would suffice just to make MTD_GEN_PROBE and MTD_DOCPROBE select it, rather than all the _users_ of each?

Signature · 1 line
dwmw2
#15 lore raw
Quoted 8 lines · David Woodhouse
Quoted 4 lines · Jörn Engel

How about this one? It's actually less messy inside kernel/Makefile.

Completely untested, though.

Surely it would suffice just to make MTD_GEN_PROBE and MTD_DOCPROBE select it, rather than all the _users_ of each?

Agreed. Actually, those two should be selected by their respective users, instead of the current *cough* logic.

Jörn

Signature · 4 lines
The story so far:
In the beginning the Universe was created.  This has made a lot
of people very angry and been widely regarded as a bad move.
-- Douglas Adams