MIPS: module.h usage cleanup.
Subsystems (4)
cover MIPS: module.h usage cleanup.
Hi Ralf,
Not a lot to see here, really. MIPS had usages of module.h tucked away in a couple asm files, and that was masking some of the other implicit users, plus preventing MIPS from getting the full benefit of not having to feed module.h to cpp 35,000 times.
I've left the two drivers/serial commits separate, in case there is a desire to have them go in via Greg's trees, but they are a required dependency for the arch/mips fixes, so I think it makes sense they stay together with the other changes here.
I will have some arch independent module.h cleanups (in fs and lib) that will require me to create a module.h tree for 3.4, so I can carry this there if required. But this lot is all self-contained to MIPS and so I'd be fine with (and actually prefer) this going in via the MIPS tree. No strong preference - either way, let me know.
Thanks,
Paul.
---
Paul Gortmaker (5):
serial: MIPS DECstation zs.c driver needs module.h
serial: MIPS swarm sb1250-duart.c driver needs module.h
MIPS: fix several implicit uses of export.h/module.h
MIPS: delete bogus module.h usage in termios.h
MIPS: dont use module.h just to export symbols in asm/uasm.h
arch/mips/alchemy/devboards/db1200.c | 1 + arch/mips/cavium-octeon/setup.c | 1 + arch/mips/include/asm/module.h | 1 + arch/mips/include/asm/termios.h | 2 +- arch/mips/include/asm/uasm.h | 2 +- arch/mips/kernel/traps.c | 1 + arch/mips/pmc-sierra/yosemite/setup.c | 1 + arch/mips/rb532/devices.c | 1 + arch/mips/sni/setup.c | 1 + drivers/tty/serial/sb1250-duart.c | 1 + drivers/tty/serial/zs.c | 1 + 11 files changed, 11 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.1
PATCH 1/5 serial: MIPS DECstation zs.c driver needs module.h
This driver is a module and needs module.h, otherwise it will break when we remove a bogus usage of module.h from one of the other MIPS headers.
--- drivers/tty/serial/zs.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/tty/serial/zs.c +1 -0
@@ -57,6 +57,7 @@#include <linux/ioport.h> #include <linux/irqflags.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/major.h> #include <linux/serial.h> #include <linux/serial_core.h>
Signature · 1 line
1.7.9.1
PATCH 2/5 serial: MIPS swarm sb1250-duart.c driver needs module.h
In reply to Paul GortmakerThis driver is a module and needs module.h, otherwise it will break when we remove a bogus usage of module.h from one of the other MIPS headers.
--- drivers/tty/serial/sb1250-duart.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/tty/serial/sb1250-duart.c +1 -0
@@ -31,6 +31,7 @@#include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/major.h> #include <linux/serial.h> #include <linux/serial_core.h>
Signature · 1 line
1.7.9.1
PATCH 3/5 MIPS: fix several implicit uses of export.h/module.h
In reply to Paul GortmakerThese will show up as a build failure once we clean up a misuse of module.h in the mips termios header.
Uses export.h: (EXPORT_SYMBOL)
arch/mips/cavium-octeon/setup.c
arch/mips/pmc-sierra/yosemite/setup.c
arch/mips/rb532/devices.c
arch/mips/sni/setup.c
Uses module.h: (symbol_get/put)
arch/mips/alchemy/devboards/db1200.c
Uses module.h: (print_modules)
arch/mips/kernel/traps.c
--- arch/mips/alchemy/devboards/db1200.c | 1 + arch/mips/cavium-octeon/setup.c | 1 + arch/mips/kernel/traps.c | 1 + arch/mips/pmc-sierra/yosemite/setup.c | 1 + arch/mips/rb532/devices.c | 1 + arch/mips/sni/setup.c | 1 + 6 files changed, 6 insertions(+), 0 deletions(-)
arch/mips/alchemy/devboards/db1200.c +1 -0
@@ -22,6 +22,7 @@#include <linux/gpio.h> #include <linux/i2c.h> #include <linux/init.h> +#include <linux/module.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/leds.h>
arch/mips/cavium-octeon/setup.c +1 -0
@@ -9,6 +9,7 @@#include <linux/init.h> #include <linux/console.h> #include <linux/delay.h> +#include <linux/export.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/serial.h>
arch/mips/kernel/traps.c +1 -0
@@ -15,6 +15,7 @@#include <linux/compiler.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/module.h> #include <linux/mm.h> #include <linux/sched.h> #include <linux/smp.h>
arch/mips/pmc-sierra/yosemite/setup.c +1 -0
@@ -27,6 +27,7 @@#include <linux/bcd.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/export.h> #include <linux/types.h> #include <linux/mm.h> #include <linux/bootmem.h>
arch/mips/rb532/devices.c +1 -0
@@ -15,6 +15,7 @@* GNU General Public License for more details. */ #include <linux/kernel.h> +#include <linux/export.h> #include <linux/init.h> #include <linux/ctype.h> #include <linux/string.h>
arch/mips/sni/setup.c +1 -0
@@ -10,6 +10,7 @@*/ #include <linux/eisa.h> #include <linux/init.h> +#include <linux/export.h> #include <linux/console.h> #include <linux/fb.h> #include <linux/screen_info.h>
Signature · 1 line
1.7.9.1
PATCH 4/5 MIPS: delete bogus module.h usage in termios.h
In reply to Paul GortmakerThere is no need for this. Removing it causes a small amount of fallout (shown below) due to a few implicit header presence assumptions that are easily fixed.
arch/mips/include/asm/termios.h:103: error: implicit declaration of function 'access_ok' arch/mips/include/asm/module.h:17: error: expected specifier-qualifier-list before 'Elf64_Addr'
--- arch/mips/include/asm/module.h | 1 + arch/mips/include/asm/termios.h | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
arch/mips/include/asm/module.h +1 -0
@@ -2,6 +2,7 @@#define _ASM_MODULE_H#include <linux/list.h> +#include <linux/elf.h> #include <asm/uaccess.h> struct mod_arch_specific {
arch/mips/include/asm/termios.h +1 -1
@@ -60,7 +60,7 @@ struct termio { };#ifdef __KERNEL__ -#include <linux/module.h> +#include <asm/uaccess.h> /* * intr=^C quit=^\ erase=del kill=^U
Signature · 1 line
1.7.9.1
PATCH 5/5 MIPS: dont use module.h just to export symbols in asm/uasm.h
In reply to Paul GortmakerPutting module.h into widely used headers just bogs cpp down with reams of stuff that isn't needed. Here, we only need visibility to EXPORT_SYMBOL.
--- arch/mips/include/asm/uasm.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/include/asm/uasm.h +1 -1
@@ -11,7 +11,7 @@#include <linux/types.h> #ifdef CONFIG_EXPORT_UASM -#include <linux/module.h> +#include <linux/export.h> #define __uasminit#define __uasminitdata#define UASM_EXPORT_SYMBOL (sym) EXPORT_SYMBOL(sym)
Signature · 1 line
1.7.9.1
Quoted 12 lines · Paul Gortmaker
Hi Ralf,
Not a lot to see here, really. MIPS had usages of
module.htucked away in a couple asm files, and that was masking some of the other implicit users, plus preventing MIPS from getting the full benefit of not having to feedmodule.hto cpp 35,000 times.I've left the two
drivers/serialcommits separate, in case there is a desire to have them go in via Greg's trees, but they are a required dependency for thearch/mipsfixes, so I think it makes sense they stay together with the other changes here.
Quoted 5 lines
I will have some arch independent
module.hcleanups (in fs and lib) that will require me to create amodule.htree for 3.4, so I can carry this there if required. But this lot is all self-contained to MIPS and so I'd be fine with (and actually prefer) this going in via the MIPS tree. No strong preference - either way, let me know.
Haven't received any comment and the patches are trivial so I'm going to queue them hopeing that Alan Cox (not on cc ...) doesn't mind ...
Ralf
Quoted 14 lines · Ralf Baechle
Quoted 12 lines · Paul Gortmaker
Hi Ralf,
Not a lot to see here, really. MIPS had usages of
module.htucked away in a couple asm files, and that was masking some of the other implicit users, plus preventing MIPS from getting the full benefit of not having to feedmodule.hto cpp 35,000 times.I've left the two
drivers/serialcommits separate, in case there is a desire to have them go in via Greg's trees, but they are a required dependency for thearch/mipsfixes, so I think it makes sense they stay together with the other changes here.
Quoted 8 lines
Quoted 5 lines
I will have some arch independent
module.hcleanups (in fs and lib) that will require me to create amodule.htree for 3.4, so I can carry this there if required. But this lot is all self-contained to MIPS and so I'd be fine with (and actually prefer) this going in via the MIPS tree. No strong preference - either way, let me know.Haven't received any comment and the patches are trivial so I'm going to queue them hopeing that Alan Cox (not on cc ...) doesn't mind ...
I stuck them in linux-next for additional sanity testing above the defconfig builds that I did and nothing caught fire. I'll back them out from my for-next branch now that I know you've got them queued via the mips for-next.
Thanks!
Paul.
Quoted 2 lines
Ralf