Skip to contentSkip to conversation

sparc64: fix modpost failure

PATCH Applied Sam Ravnborg 3 participants 3 messages Jan 16, 2009 – Jan 18, 2009 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc64: fix modpost failure

Previously PeeCeeI.o was a library but it
was always pulled in due to insw and friends being exported (at least for a modular kernel).

But this resulted in modpost failures if there where no in-kernel users because then insw & friends were not linked in.

Fix this by including PeeCeeI.o in the kernel unconditionally.

The only drawback for this solution is that a nonmodular kernel will always include insw & friends no matter if they are in use or not.

---

I have no good suggestion how to fix this if we do not accept that they are always pulled in.

Sam

arch/sparc/lib/Makefile +2 -1
index 273fc85..e75faf0 100644
@@ -18,7 +18,7 @@ lib-$(CONFIG_SPARC32) += lshrdi3.o ashldi3.o
 lib-y                 += rwsem_$(BITS).o
 lib-$(CONFIG_SPARC32) += muldi3.o bitext.o cmpdi2.o
 
-lib-$(CONFIG_SPARC64) += PeeCeeI.o copy_page.o clear_page.o bzero.o
+lib-$(CONFIG_SPARC64) += copy_page.o clear_page.o bzero.o
 lib-$(CONFIG_SPARC64) += csum_copy.o csum_copy_from_user.o csum_copy_to_user.o
 lib-$(CONFIG_SPARC64) += VISsave.o
 lib-$(CONFIG_SPARC64) += bitops.o
@@ -43,3 +43,4 @@ lib-$(CONFIG_SPARC64) += mcount.o ipcsum.o xor.o
 obj-y                 += iomap.o
 obj-$(CONFIG_SPARC32) += atomic32.o
 obj-y                 += ksyms.o
+obj-$(CONFIG_SPARC64) += PeeCeeI.o
#1 lore raw
Quoted 7 lines

Previously PeeCeeI.o was a library but it
was always pulled in due to insw and friends being exported (at least for a modular kernel).

But this resulted in modpost failures if there where no in-kernel users because then insw & friends were not linked in.

Quoted 7 lines

Fix this by including PeeCeeI.o in the kernel unconditionally.

The only drawback for this solution is that a nonmodular kernel will always include insw & friends no matter if they are in use or not.

And it works too.

Signature · 1 line
Meelis Roos ([email protected])
maintainer Applied
#2 lore raw
In reply to Sam Ravnborg

From: Sam Ravnborg <[email protected]>
Date: Fri, 16 Jan 2009 11:14:49 +0100

Quoted 12 lines

Previously PeeCeeI.o was a library but it
was always pulled in due to insw and friends being exported (at least for a modular kernel).

But this resulted in modpost failures if there where no in-kernel users because then insw & friends were not linked in.

Fix this by including PeeCeeI.o in the kernel unconditionally.

The only drawback for this solution is that a nonmodular kernel will always include insw & friends no matter if they are in use or not.

Quoted 6 lines

---

I have no good suggestion how to fix this if we do not accept that they are always pulled in.

This is the correct way to fix this, for sure.

Applied, thanks Sam.