lkml.org 
[lkml]   [2005]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: 2.6.15-rc5-rt1 will not compile (was Re: 2.6.14-rt15: cannot build with !PREEMPT_RT)
From
Date
On Mon, 2005-12-12 at 12:44 -0500, Lee Revell wrote:
> On Fri, 2005-12-09 at 19:25 -0500, Lee Revell wrote:
> > > We are unable to build a similar .config (PREEMPT_DESKTOP with soft and
> > > hardirq preemption disabled) on x86-64:
> >
> > Here is the build output, .config attached.
>
> Similar problem with 2.6.15-rc5-rt1:
>
> $ make
> CHK include/linux/version.h
> UPD include/linux/version.h
> SYMLINK include/asm -> include/asm-x86_64
> SPLIT include/linux/autoconf.h -> include/config/*
> CC arch/x86_64/kernel/asm-offsets.s
> In file included from include/asm/semaphore.h:48,
> from include/linux/sched.h:20,
> from arch/x86_64/kernel/asm-offsets.c:7:
> include/linux/rwsem.h:43:66: error: asm/rwsem.h: No such file or
> directory
> In file included from include/asm/semaphore.h:48,
> from include/linux/sched.h:20,
> from arch/x86_64/kernel/asm-offsets.c:7:

Looks like Ingo has a generic rwsem to work with, but if your arch turns
on CONFIG_RWSEM_XCHGADD_ALGORITHM, it will compile lib/rwsem.c which
won't compile as you've seen.

Try out this patch: I changed the Makefile, instead of going to each
and every arch and change its Kconfig to do it properly.

-- Steve

Index: linux-2.6.15-rc5-rt1/lib/Makefile
===================================================================
--- linux-2.6.15-rc5-rt1.orig/lib/Makefile 2005-12-12 10:56:37.000000000 -0500
+++ linux-2.6.15-rc5-rt1/lib/Makefile 2005-12-12 16:23:47.000000000 -0500
@@ -19,7 +19,9 @@
obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o
obj-$(CONFIG_PREEMPT_RT) += plist.o
obj-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
+ifneq ($(CONFIG_RWSEM_GENERIC_SPINLOCK),y)
lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
+endif
lib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o
lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o
obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o
Index: linux-2.6.15-rc5-rt1/arch/x86_64/kernel/x8664_ksyms.c
===================================================================
--- linux-2.6.15-rc5-rt1.orig/arch/x86_64/kernel/x8664_ksyms.c 2005-12-12 10:56:37.000000000 -0500
+++ linux-2.6.15-rc5-rt1/arch/x86_64/kernel/x8664_ksyms.c 2005-12-12 16:27:40.000000000 -0500
@@ -165,7 +165,7 @@
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(__memcpy);

-#ifdef CONFIG_RWSEM_XCHGADD_ALGORITHM
+#if defined(CONFIG_RWSEM_XCHGADD_ALGORITHM) && !defined(CONFIG_RWSEM_GENERIC_SPINLOCK)
/* prototypes are wrong, these are assembly with custom calling functions */
extern void rwsem_down_read_failed_thunk(void);
extern void rwsem_wake_thunk(void);

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

\
 
 \ /
  Last update: 2005-12-12 22:52    [from the cache]
©2003-2011 Jasper Spaans