Skip to contentSkip to conversation

hugepagetlb, include linux/module.h

PATCH Paul Jackson 2 participants 5 messages Apr 26, 2004 – May 10, 2004

lore
Share & tools
lore
#0 lore raw

The #include of linux/module.h in several arch/*/mm/hugetlbpage.c files for EXPORT_SYMBOL(hugetlb_total_pages) was late to the party, and now appears to be late leaving. The hugetlb consolidation should have taken these includes out.

This patch removes the #include of module.h from 4 arch/*/mm/hugetlbpage.c files. It is based off 2.6.6-rc2-mm2.

I have only managed to rebuild 1 of these 4 w/o this include, but still this patch seems "obviously right".

I rebuilt i386 successfully.

I tried using the http://developer.osdl.org/dev/plm/cross_compile/
stuff to compile this for sparc64, but ran afoul of missing PCI IDS for the Creator cards on sparc, as Andrew reported last week.

I don't know how to test the ppc64 build.

I'm running afoul of some elf32_map breakage with the ia64 build, which will likely result in a separate patch. Still working that ...

The patch, for what it's worth:

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1898 -> 1.1899
# arch/ppc64/mm/hugetlbpage.c 1.25 -> 1.26
# arch/ia64/mm/hugetlbpage.c 1.25 -> 1.26
# arch/sparc64/mm/hugetlbpage.c 1.16 -> 1.17
# arch/i386/mm/hugetlbpage.c 1.49 -> 1.50
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/04/26 [email protected] 1.1899
# Now that hugetlb consolidation removed EXPORT_SYMBOL, dont need module.h. # --------------------------------------------
#

arch/i386/mm/hugetlbpage.c +0 -1
diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
@@ -12,7 +12,6 @@
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/sysctl.h>
 #include <asm/mman.h>
arch/ia64/mm/hugetlbpage.c +0 -1
diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
@@ -9,7 +9,6 @@
  */
 
 #include <linux/config.h>
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/mm.h>
arch/ppc64/mm/hugetlbpage.c +0 -1
diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c
@@ -14,7 +14,6 @@
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/sysctl.h>
 #include <asm/mman.h>
arch/sparc64/mm/hugetlbpage.c +0 -2
diff -Nru a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
@@ -5,7 +5,6 @@
  */
 
 #include <linux/config.h>
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/mm.h>
@@ -14,7 +13,6 @@
 #include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <linux/sysctl.h>
-#include <linux/module.h>
 
 #include <asm/mman.h>
 #include <asm/pgalloc.h>
Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373
#1 lore raw

Once I hack around the bssprot patch damage to the routine arch/ia64/ia32/binfmt_elf32.c: elf32_map(), then this patch to remove #include of module.h from arch/ia64/mm/hugetlbpage.c compiles ok against 2.6.6-rc2-mm2.

As expected.

Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373
#2 lore raw
In reply to Paul Jackson

And with a couple more hacks (kill ffb_drv.c for lack of PCI IDS, and random clueless hubstatus variable rename in drivers/usb/core/hub.c), this removal of #include of linux/module.h compiles for sparc64 as well.

Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373
#3 lore raw
In reply to Paul Jackson
Quoted 8 lines · Paul Jackson

The #include of linux/module.h in several arch/*/mm/hugetlbpage.c files for EXPORT_SYMBOL(hugetlb_total_pages) was late to the party, and now appears to be late leaving. The hugetlb consolidation should have taken these includes out.

This patch removes the #include of module.h from 4 arch/*/mm/hugetlbpage.c files. It is based off 2.6.6-rc2-mm2.

Quoted 8 lines

I have only managed to rebuild 1 of these 4 w/o this include, but still this patch seems "obviously right".

I rebuilt i386 successfully.

I tried using the http://developer.osdl.org/dev/plm/cross_compile/
stuff to compile this for sparc64, but ran afoul of missing PCI IDS for the Creator cards on sparc, as Andrew reported last week.

hmm, maybe this might be useful too:

http://vserver.13thfloor.at/Stuff/Cross/
(especially http://vserver.13thfloor.at/Stuff/Cross/howto.info)

HTH,
Herbert

PS: let me know if you need some help with the compile

Quoted 86 lines

I don't know how to test the ppc64 build.

I'm running afoul of some elf32_map breakage with the ia64 build, which will likely result in a separate patch. Still working that ...

The patch, for what it's worth:

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1898 -> 1.1899
# arch/ppc64/mm/hugetlbpage.c 1.25 -> 1.26
# arch/ia64/mm/hugetlbpage.c 1.25 -> 1.26
# arch/sparc64/mm/hugetlbpage.c 1.16 -> 1.17
# arch/i386/mm/hugetlbpage.c 1.49 -> 1.50
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/04/26 [email protected] 1.1899
# Now that hugetlb consolidation removed EXPORT_SYMBOL, dont need module.h. # --------------------------------------------
#
diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c

arch/i386/mm/hugetlbpage.c +0 -1
@@ -12,7 +12,6 @@
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/sysctl.h>
 #include <asm/mman.h>

diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c

arch/ia64/mm/hugetlbpage.c +0 -1
@@ -9,7 +9,6 @@
  */
 
 #include <linux/config.h>
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/mm.h>

diff -Nru a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c

arch/ppc64/mm/hugetlbpage.c +0 -1
@@ -14,7 +14,6 @@
 #include <linux/pagemap.h>
 #include <linux/smp_lock.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/err.h>
 #include <linux/sysctl.h>
 #include <asm/mman.h>

diff -Nru a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c

arch/sparc64/mm/hugetlbpage.c +0 -2
@@ -5,7 +5,6 @@
  */
 
 #include <linux/config.h>
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/mm.h>
@@ -14,7 +13,6 @@
 #include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <linux/sysctl.h>
-#include <linux/module.h>
 
 #include <asm/mman.h>
 #include <asm/pgalloc.h>
Signature · 9 lines
-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
#4 lore raw

Thanks, Herbert. I no longer need to worry about compiling this particular change - it has propogated far enough that it's not an issue anymore.

But I will likely consider what you pointed me at for other work I have in progress ...

Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373