Messages in this thread Patch in this message | | | Date | Wed, 5 Jul 2006 14:02:24 -0700 | From | "Randy.Dunlap" <> | Subject | [PATCH] 2.6.17 on SPARC64 compile fails |
| |
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) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |