mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.6.17 on SPARC64 compile fails
@ 2006-07-04 14:17 Horst von Brand
  2006-07-05 18:39 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Horst von Brand @ 2006-07-04 14:17 UTC (permalink / raw)
  To: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

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?


[-- Attachment #2: Configuration for the kernel (bzip2:ed) --]
[-- Type: application/x-bzip2, Size: 6921 bytes --]

[-- Attachment #3: Type: text/plain, Size: 277 bytes --]

-- 
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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.6.17 on SPARC64 compile fails
  2006-07-04 14:17 2.6.17 on SPARC64 compile fails Horst von Brand
@ 2006-07-05 18:39 ` David Miller
  2006-07-05 20:15   ` Randy.Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2006-07-05 18:39 UTC (permalink / raw)
  To: vonbrand; +Cc: linux-kernel

From: Horst von Brand <vonbrand@inf.utfsm.cl>
Date: Tue, 04 Jul 2006 10:17:23 -0400

> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.6.17 on SPARC64 compile fails
  2006-07-05 18:39 ` David Miller
@ 2006-07-05 20:15   ` Randy.Dunlap
  2006-07-05 21:02     ` [PATCH] " Randy.Dunlap
  2006-07-08 13:33     ` Horst von Brand
  0 siblings, 2 replies; 7+ messages in thread
From: Randy.Dunlap @ 2006-07-05 20:15 UTC (permalink / raw)
  To: David Miller; +Cc: vonbrand, linux-kernel

On Wed, 05 Jul 2006 11:39:11 -0700 (PDT) David Miller wrote:

> From: Horst von Brand <vonbrand@inf.utfsm.cl>
> Date: Tue, 04 Jul 2006 10:17:23 -0400
> 
> > 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?

> Turn CONFIG_PCI on 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] 2.6.17 on SPARC64 compile fails
  2006-07-05 20:15   ` Randy.Dunlap
@ 2006-07-05 21:02     ` Randy.Dunlap
  2006-07-06  3:21       ` David Miller
  2006-07-08 13:33     ` Horst von Brand
  1 sibling, 1 reply; 7+ messages in thread
From: Randy.Dunlap @ 2006-07-05 21:02 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: davem, vonbrand, linux-kernel

On Wed, 5 Jul 2006 13:15:39 -0700 Randy.Dunlap wrote:

> On Wed, 05 Jul 2006 11:39:11 -0700 (PDT) David Miller wrote:
> 
> > From: Horst von Brand <vonbrand@inf.utfsm.cl>
> > Date: Tue, 04 Jul 2006 10:17:23 -0400
> > 
> > > 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?
> 
> > Turn CONFIG_PCI on 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

This fixes all sparc64 build errors for me when using Horst's
config (PCI=n).

---
From: Randy Dunlap <rdunlap@xenotime.net>

Fix sparc64 build errors when CONFIG_PCI=n.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 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(-)

--- linux-2617-g24.orig/include/asm-sparc64/dma-mapping.h
+++ linux-2617-g24/include/asm-sparc64/dma-mapping.h
@@ -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 */
 
 
--- linux-2617-g24.orig/arch/sparc64/kernel/time.c
+++ linux-2617-g24/arch/sparc64/kernel/time.c
@@ -788,12 +788,15 @@ static int __devinit clock_probe(struct 
 	if (!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;
--- linux-2617-g24.orig/arch/sparc64/kernel/prom.c
+++ linux-2617-g24/arch/sparc64/kernel/prom.c
@@ -1032,7 +1032,9 @@ static void sun4v_vdev_irq_trans_init(st
 static 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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] 2.6.17 on SPARC64 compile fails
  2006-07-05 21:02     ` [PATCH] " Randy.Dunlap
@ 2006-07-06  3:21       ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2006-07-06  3:21 UTC (permalink / raw)
  To: rdunlap; +Cc: vonbrand, linux-kernel

From: "Randy.Dunlap" <rdunlap@xenotime.net>
Date: Wed, 5 Jul 2006 14:02:24 -0700

> From: Randy Dunlap <rdunlap@xenotime.net>
> 
> Fix sparc64 build errors when CONFIG_PCI=n.
> 
> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.6.17 on SPARC64 compile fails
  2006-07-05 20:15   ` Randy.Dunlap
  2006-07-05 21:02     ` [PATCH] " Randy.Dunlap
@ 2006-07-08 13:33     ` Horst von Brand
  2006-07-08 20:44       ` David Miller
  1 sibling, 1 reply; 7+ messages in thread
From: Horst von Brand @ 2006-07-08 13:33 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: David Miller, vonbrand, linux-kernel

Randy.Dunlap <rdunlap@xenotime.net> wrote:
> On Wed, 05 Jul 2006 11:39:11 -0700 (PDT) David Miller wrote:
> > From: Horst von Brand <vonbrand@inf.utfsm.cl>

[...]

> > > 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?
> 
> > Turn CONFIG_PCI on as a workaround for now.

FWIW, 2.6.18-rc1 works fine (it's what I'm running now)
-- 
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.6.17 on SPARC64 compile fails
  2006-07-08 13:33     ` Horst von Brand
@ 2006-07-08 20:44       ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2006-07-08 20:44 UTC (permalink / raw)
  To: vonbrand; +Cc: rdunlap, linux-kernel

From: Horst von Brand <vonbrand@inf.utfsm.cl>
Date: Sat, 08 Jul 2006 09:33:22 -0400

> FWIW, 2.6.18-rc1 works fine (it's what I'm running now)

Yep, Randy's fixes are in there.  Thanks for testing.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-07-08 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-04 14:17 2.6.17 on SPARC64 compile fails Horst von Brand
2006-07-05 18:39 ` David Miller
2006-07-05 20:15   ` Randy.Dunlap
2006-07-05 21:02     ` [PATCH] " Randy.Dunlap
2006-07-06  3:21       ` David Miller
2006-07-08 13:33     ` Horst von Brand
2006-07-08 20:44       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome