mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: davem@davemloft.net, vonbrand@inf.utfsm.cl, linux-kernel@vger.kernel.org
Subject: [PATCH] 2.6.17 on SPARC64 compile fails
Date: Wed, 5 Jul 2006 14:02:24 -0700	[thread overview]
Message-ID: <20060705140224.144cb9bc.rdunlap@xenotime.net> (raw)
In-Reply-To: <20060705131539.ba3275d8.rdunlap@xenotime.net>

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)

  reply	other threads:[~2006-07-05 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 14:17 Horst von Brand
2006-07-05 18:39 ` David Miller
2006-07-05 20:15   ` Randy.Dunlap
2006-07-05 21:02     ` Randy.Dunlap [this message]
2006-07-06  3:21       ` [PATCH] " David Miller
2006-07-08 13:33     ` Horst von Brand
2006-07-08 20:44       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060705140224.144cb9bc.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vonbrand@inf.utfsm.cl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®