Skip to contentSkip to conversation

ppc: Fix build error with CONFIG_PCI=n

PATCH New Pranith Kumar 3 participants 5 messages Aug 18, 2014 – Aug 26, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ppc: Fix build error with CONFIG_PCI=n

Fix ppc 32 build failure as reported here:

http://kisskb.ellerman.id.au/kisskb/buildresult/11663513/

The error is as follows:

arch/powerpc/include/asm/floppy.h:142:20: error: 'isa_bridge_pcidev' undeclared (first use in this function)

This is happening since floppy.o is enabled by BLK_DEV_FD which depends on ARCH_MAY_HAVE_PC_FDC which is in-turn enabled if PPC_PSERIES=n.

The following commit changes the dependency so that ARCH_MAY_HAVE_PC_FDC is dependent exclusively on PCI since otherwise it will not compile.

---
 arch/powerpc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/Kconfig +1 -1
index a577609f..9c1aa77 100644
@@ -182,7 +182,7 @@ config SCHED_OMIT_FRAME_POINTER
 
 config ARCH_MAY_HAVE_PC_FDC
 	bool
-	default !PPC_PSERIES || PCI
+	default PCI
 
 config PPC_OF
 	def_bool y
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 powerpc: Fix build error for vga16fb

Fix a build error caused by

drivers/built-in.o: In function `vga16fb_probe':
drivers/video/fbdev/vga16fb.c:1326: undefined reference to vgacon_remap_base' drivers/video/fbdev/vga16fb.c:1326: undefined reference to vgacon_remap_base'
make: *** [vmlinux] Error 1

This is occuring as vgacon_remap_base is exported only when CONFIG_VGA_CONSOLE=y. Fix the error by making FB_VBA16 depend on CONFIG_VGA_CONSOLE.

---
 drivers/video/fbdev/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/Kconfig +1 -1
index e911b9c..09df564 100644
@@ -547,7 +547,7 @@ config FB_IMSTT
 
 config FB_VGA16
 	tristate "VGA 16-color graphics support"
-	depends on FB && (X86 || PPC)
+	depends on FB && (X86 || PPC) && CONFIG_VGA_CONSOLE
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH] powerpc: Fix build error for vga16fb

Hi Pranith,

Quoted 23 lines · Pranith Kumar

Fix a build error caused by

drivers/built-in.o: In function `vga16fb_probe':
drivers/video/fbdev/vga16fb.c:1326: undefined reference to vgacon_remap_base' drivers/video/fbdev/vga16fb.c:1326: undefined reference to vgacon_remap_base'
make: *** [vmlinux] Error 1

This is occuring as vgacon_remap_base is exported only when CONFIG_VGA_CONSOLE=y. Fix the error by making FB_VBA16 depend on CONFIG_VGA_CONSOLE.

---
 drivers/video/fbdev/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/Kconfig +0 -0
index e911b9c..09df564 100644

drivers/video/fbdev/Kconfig config FB_IMSTT · line 550

Quoted 5 lines
drivers/video/fbdev/Kconfig +1 -1
@@ -547,7 +547,7 @@ config FB_IMSTT
 
 config FB_VGA16
        tristate "VGA 16-color graphics support"
-       depends on FB && (X86 || PPC)
+       depends on FB && (X86 || PPC) && CONFIG_VGA_CONSOLE

The dependency on CONFIG_VGA_CONSOLE only exists on PPC, not on x86. So this is not correct.

Digging a bit deeper: There's no code left in arch/powerpc that actually sets vgacon_remap_base, so it's not gonna work anyway.
It seems vga16 support on PPC died with the removal of arch/ppc/.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

Re: [PATCH] powerpc: Fix build error for vga16fb

Quoted 3 lines · Geert Uytterhoeven

Digging a bit deeper: There's no code left in arch/powerpc that actually sets vgacon_remap_base, so it's not gonna work anyway.
It seems vga16 support on PPC died with the removal of arch/ppc/.

OK. I will remove the dependency on PPC for vga16fb.

Signature · 1 line
Pranith
#4 lore raw

Re: [PATCH] powerpc: Fix build error for vga16fb

In reply to Geert Uytterhoeven
Quoted 35 lines · Geert Uytterhoeven

Hi Pranith,

Quoted 23 lines · Pranith Kumar

Fix a build error caused by

drivers/built-in.o: In function `vga16fb_probe':
drivers/video/fbdev/vga16fb.c:1326: undefined reference to vgacon_remap_base' drivers/video/fbdev/vga16fb.c:1326: undefined reference to vgacon_remap_base'
make: *** [vmlinux] Error 1

This is occuring as vgacon_remap_base is exported only when CONFIG_VGA_CONSOLE=y. Fix the error by making FB_VBA16 depend on CONFIG_VGA_CONSOLE.

---
 drivers/video/fbdev/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/Kconfig +0 -0
index e911b9c..09df564 100644

drivers/video/fbdev/Kconfig config FB_IMSTT · line 550

Quoted 5 lines
drivers/video/fbdev/Kconfig +1 -1
@@ -547,7 +547,7 @@ config FB_IMSTT
 
 config FB_VGA16
        tristate "VGA 16-color graphics support"
-       depends on FB && (X86 || PPC)
+       depends on FB && (X86 || PPC) && CONFIG_VGA_CONSOLE

The dependency on CONFIG_VGA_CONSOLE only exists on PPC, not on x86. So this is not correct.

Quoted 3 lines

Digging a bit deeper: There's no code left in arch/powerpc that actually sets vgacon_remap_base, so it's not gonna work anyway.
It seems vga16 support on PPC died with the removal of arch/ppc/.

Hmm, so I wonder if vga16fb is supposed to work on ppc or not. Pranith's follow-up patch disables vga16fb for PPC, which obviously fixes the compilation problem, but is that really a correct fix?

Tomi