2.6.17 on SPARC64 compile fails
It has failed from around June 19, with:
CC arch/sparc64/kernel/devices.o
In file included from include/linux/dma-mapping.h:27,
from include/asm/sbus.h:10,
from include/asm/dma.h:14,
from include/linux/bootmem.h:8,
from arch/sparc64/kernel/devices.c:14:include/asm/dma-mapping.h: In function `dma_sync_single_range_for_cpu':include/asm/dma-mapping.h:186: warning: implicit declaration of function dma_sync_single_for_cpu' include/asm/dma-mapping.h: In function dma_sync_single_range_for_device':include/asm/dma-mapping.h:195: warning: implicit declaration of function `dma_sync_single_for_device' make[1]: *** [arch/sparc64/kernel/devices.o] Error 1
make: *** [arch/sparc64/kernel] Error 2
Looking at the relevant file, it seems the offending functions are for PCI only (and my SparcStation Ultra 1 sure doesn't have any PCI in it, so this is disabled in the configuration). Maybe the #endif is too early?
Signature · 4 lines
Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
From: Horst von Brand <[email protected]>
Date: Tue, 04 Jul 2006 10:17:23 -0400
Quoted 3 lines
Looking at the relevant file, it seems the offending functions are for PCI only (and my SparcStation Ultra 1 sure doesn't have any PCI in it, so this is disabled in the configuration). Maybe the #endif is too early?
Yes, I'm still thinking how to fix this.
Turn CONFIG_PCI on as a workaround for now.
Quoted 8 lines · On Wed, 05 Jul 2006 11:39:11 -0700 (PDT) David Miller wrote:
From: Horst von Brand <[email protected]>
Date: Tue, 04 Jul 2006 10:17:23 -0400Quoted 3 lines
Looking at the relevant file, it seems the offending functions are for PCI only (and my SparcStation Ultra 1 sure doesn't have any PCI in it, so this is disabled in the configuration). Maybe the #endif is too early?
Yes, I'm still thinking how to fix this.
Do you mean a generalized arch-independent fix?
Quoted 1 line
Turn
CONFIG_PCIon as a workaround for now.
Good plan. With CONFIG_PCI still off and a patch for the above problem, next CONFIG_PCI=n issue is this one:
/var/linsrc/linux-2617-g24/arch/sparc64/kernel/time.c: In function `clock_probe':/var/linsrc/linux-2617-g24/arch/sparc64/kernel/time.c:795: error: invalid lvalue in assignment
---
~Randy
PATCH 1/1 2.6.17 on SPARC64 compile fails
Quoted 13 lines · On Wed, 5 Jul 2006 13:15:39 -0700 Randy.Dunlap wrote:
Quoted 8 lines · On Wed, 05 Jul 2006 11:39:11 -0700 (PDT) David Miller wrote:
From: Horst von Brand <[email protected]>
Date: Tue, 04 Jul 2006 10:17:23 -0400Quoted 3 lines
Looking at the relevant file, it seems the offending functions are for PCI only (and my SparcStation Ultra 1 sure doesn't have any PCI in it, so this is disabled in the configuration). Maybe the #endif is too early?
Yes, I'm still thinking how to fix this.
Do you mean a generalized arch-independent fix?
Quoted 7 lines
Quoted 1 line
Turn
CONFIG_PCIon as a workaround for now.Good plan. With
CONFIG_PCIstill off and a patch for the above problem, nextCONFIG_PCI=nissue is this one:
/var/linsrc/linux-2617-g24/arch/sparc64/kernel/time.c: In function `clock_probe':/var/linsrc/linux-2617-g24/arch/sparc64/kernel/time.c:795: error: invalid lvalue in assignment
This fixes all sparc64 build errors for me when using Horst's config (PCI=n).
---
From: Randy Dunlap <[email protected]>
Fix sparc64 build errors when CONFIG_PCI=n.
--- arch/sparc64/kernel/prom.c | 2 ++ arch/sparc64/kernel/time.c | 5 ++++- include/asm-sparc64/dma-mapping.h | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-)
include/asm-sparc64/dma-mapping.h +14 -0
@@ -160,6 +160,20 @@ static inline void dma_free_coherent(str BUG(); } +static inline void +dma_sync_single_for_cpu (struct device *dev,dma_addr_t dma_handle,size_t size, +enum dma_data_direction direction) +{ +BUG (); +} + +static inline void +dma_sync_single_for_device (struct device *dev,dma_addr_t dma_handle,size_t size, +enum dma_data_direction direction) +{ +BUG (); +} +#endif /* PCI */
arch/sparc64/kernel/time.c +4 -1
@@ -788,12 +788,15 @@ static int __devinit clock_probe(structif (!regs)return -ENOMEM ; +#ifdef CONFIG_PCI if (!strcmp (model,"ds1287" ) || !strcmp (model,"m5819" ) || !strcmp (model,"m5819p" ) || !strcmp (model,"m5823" )) { ds1287_regs = (unsigned long ) regs; - }else if (model[5 ] =='0' && model[6 ] =='2' ) { + } else +#endif +if (model[5 ] =='0' && model[6 ] =='2' ) { mstk48t02_regs = regs; }else if (model[5 ] =='0' && model[6 ] =='8' ) { mstk48t08_regs = regs;
arch/sparc64/kernel/prom.c +2 -0
@@ -1032,7 +1032,9 @@ static void sun4v_vdev_irq_trans_init(ststatic void irq_trans_init (struct device_node *dp) {const char *model; +#ifdef CONFIG_PCI int i; +#endif model =of_get_property (dp,"model" ,NULL );if (!model)
From: "Randy.Dunlap" <[email protected]>
Date: Wed, 5 Jul 2006 14:02:24 -0700
Quoted 5 lines
From: Randy Dunlap <[email protected]>
Fix sparc64 build errors when
CONFIG_PCI=n.Signed-off-by Randy Dunlap <[email protected]>
Randy I'll apply this for now, thanks.
The DMA stuff I want to do differently, but that won't happen for a few days as I'm still on vacation until Friday.
The idea is to move the SBUS stuff over to the of_driver stuff the sparc64 port has, and thus make it use the dma_*() interfaces in the SBUS drivers instead of the SBUS specific DMA mapping calls the drivers use now.
This will allow drivers which support a chip on both PCI and SBUS (for example sunhme and one of the ATM drivers) to be done much more cleanly.
Quoted 2 lines · Randy.Dunlap
Quoted 1 line · On Wed, 05 Jul 2006 11:39:11 -0700 (PDT) David Miller wrote:
From: Horst von Brand <[email protected]>
[...]
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
Looking at the relevant file, it seems the offending functions are for PCI only (and my SparcStation Ultra 1 sure doesn't have any PCI in it, so this is disabled in the configuration). Maybe the #endif is too early?
Yes, I'm still thinking how to fix this.
Do you mean a generalized arch-independent fix?
Quoted 1 line
Turn
CONFIG_PCIon as a workaround for now.
FWIW, 2.6.18-rc1 works fine (it's what I'm running now)
Signature · 4 lines
Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
From: Horst von Brand <[email protected]>
Date: Sat, 08 Jul 2006 09:33:22 -0400
Quoted 1 line
FWIW, 2.6.18-rc1 works fine (it's what I'm running now)
Yep, Randy's fixes are in there. Thanks for testing.