I get tons of these errors:
CC arch/i386/kernel/i386_ksyms.o
In file included from include/linux/spinlock.h:97,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from arch/i386/kernel/i386_ksyms.c:2:
include/linux/rt_lock.h:386: warning: 'struct semaphore' declared inside
parameter list
include/linux/rt_lock.h:386: warning: its scope is only this definition
or declaration, which is probably not what you want
Lee
* Lee Revell <[email protected]> wrote:
> I get tons of these errors:
>
> CC arch/i386/kernel/i386_ksyms.o
> In file included from include/linux/spinlock.h:97,
> from include/linux/capability.h:45,
> from include/linux/sched.h:7,
> from include/linux/module.h:10,
> from arch/i386/kernel/i386_ksyms.c:2:
> include/linux/rt_lock.h:386: warning: 'struct semaphore' declared inside
> parameter list
> include/linux/rt_lock.h:386: warning: its scope is only this definition
> or declaration, which is probably not what you want
could you try -rt16, does it work better?
Ingo
On Sat, 2005-11-26 at 13:23 +0100, Ingo Molnar wrote:
> * Lee Revell <[email protected]> wrote:
>
> > I get tons of these errors:
> >
> > CC arch/i386/kernel/i386_ksyms.o
> > In file included from include/linux/spinlock.h:97,
> > from include/linux/capability.h:45,
> > from include/linux/sched.h:7,
> > from include/linux/module.h:10,
> > from arch/i386/kernel/i386_ksyms.c:2:
> > include/linux/rt_lock.h:386: warning: 'struct semaphore' declared inside
> > parameter list
> > include/linux/rt_lock.h:386: warning: its scope is only this definition
> > or declaration, which is probably not what you want
>
> could you try -rt16, does it work better?
>
-rt19 seems to work except that asm/io_apic.h fails to include
asm/apicdef.h so MAX_IO_APICS is undefined.
Lee
On Sat, 2005-11-26 at 14:05 -0500, Lee Revell wrote:
> -rt19 seems to work except that asm/io_apic.h fails to include
> asm/apicdef.h so MAX_IO_APICS is undefined.
The patch below fixes the Makefile x86_64 clutter and the io_apic
compile problem
tglx
Index: linux-2.6.14-rt/Makefile
===================================================================
--- linux-2.6.14-rt.orig/Makefile
+++ linux-2.6.14-rt/Makefile
@@ -189,8 +189,8 @@ SUBARCH := $(shell uname -m | sed -e s/i
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
-ARCH = x86_64
-CROSS_COMPILE = x86_64-linux-
+ARCH ?= $(SUBARCH)
+CROSS_COMPILE ?=
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
Index: linux-2.6.14-rt/arch/i386/kernel/i8253.c
===================================================================
--- linux-2.6.14-rt.orig/arch/i386/kernel/i8253.c
+++ linux-2.6.14-rt/arch/i386/kernel/i8253.c
@@ -10,10 +10,10 @@
#include <linux/init.h>
#include <linux/mca.h>
+#include <asm/smp.h>
#include <asm/io_apic.h>
#include <asm/delay.h>
#include <asm/i8253.h>
-#include <asm/smp.h>
#include <asm/io.h>
#include "io_ports.h"
* Thomas Gleixner <[email protected]> wrote:
> On Sat, 2005-11-26 at 14:05 -0500, Lee Revell wrote:
>
> > -rt19 seems to work except that asm/io_apic.h fails to include
> > asm/apicdef.h so MAX_IO_APICS is undefined.
>
> The patch below fixes the Makefile x86_64 clutter and the io_apic
> compile problem
thanks, applied.
Ingo
On Sun, 2005-11-27 at 13:30 +0100, Ingo Molnar wrote:
> * Thomas Gleixner <[email protected]> wrote:
>
> > On Sat, 2005-11-26 at 14:05 -0500, Lee Revell wrote:
> >
> > > -rt19 seems to work except that asm/io_apic.h fails to include
> > > asm/apicdef.h so MAX_IO_APICS is undefined.
> >
> > The patch below fixes the Makefile x86_64 clutter and the io_apic
> > compile problem
>
> thanks, applied.
-rt19 still does not boot for me with PREEMPT_DESKTOP and the latency
debugging options enabled (same .config I sent previously). I get
endless screenfuls of "=============" on boot. grep shows that these
most likely come from kernel/rt.c.
rlrevell@mindpipe:~$ grep -rI "=====================" linux-2.6.14-rt19/kernel/
linux-2.6.14-rt19/kernel/rt.c: printk("=============================================\n\n");
linux-2.6.14-rt19/kernel/rt.c: printk("\n==========================================\n");
linux-2.6.14-rt19/kernel/rt.c: printk("\n===========================================\n");
linux-2.6.14-rt19/kernel/rt.c: printk("\n============================================\n");
Lee
On Sun, 2005-11-27 at 13:30 +0100, Ingo Molnar wrote:
> * Thomas Gleixner <[email protected]> wrote:
>
> > On Sat, 2005-11-26 at 14:05 -0500, Lee Revell wrote:
> >
> > > -rt19 seems to work except that asm/io_apic.h fails to include
> > > asm/apicdef.h so MAX_IO_APICS is undefined.
> >
> > The patch below fixes the Makefile x86_64 clutter and the io_apic
> > compile problem
>
> thanks, applied.
>
-rt20 BUGs and dies on boot with an assertion at line 1931 of
fs/jbd/transaction.c:
1924 void __journal_file_buffer(struct journal_head *jh,
1925 transaction_t *transaction, int jlist)
1926 {
1927 struct journal_head **list = NULL;
1928 int was_dirty = 0;
1929 struct buffer_head *bh = jh2bh(jh);
1930
1931 J_ASSERT_JH(jh, jbd_is_locked_bh_state(bh));
1932 assert_spin_locked(&transaction->t_journal->j_list_lock);
1933
Lee
* Lee Revell <[email protected]> wrote:
> -rt19 still does not boot for me with PREEMPT_DESKTOP and the latency
> debugging options enabled (same .config I sent previously). I get
> endless screenfuls of "=============" on boot. grep shows that these
> most likely come from kernel/rt.c.
yeah - i can reproduce it with your .config. It goes away if i go from
PREEMPT_DESKTOP to PREEMPT_RT. Investigating.
Ingo
which was the last -rt kernel that worked fine for you in
PREEMPT_DESKTOP mode?
Ingo
On Mon, 2005-11-28 at 12:48 +0100, Ingo Molnar wrote:
> which was the last -rt kernel that worked fine for you in
> PREEMPT_DESKTOP mode?
It has been a long time, possibly months - I've mostly been using
PREEMPT_RT. But now I am working on a soft RT project that for various
reasons would like to use the mainline kernel, and I've found it still
has some scheduling bumps up to 5-7ms and am trying to identify the
problem.
Would you like me to do a binary search?
Lee
* Lee Revell <[email protected]> wrote:
> On Mon, 2005-11-28 at 12:48 +0100, Ingo Molnar wrote:
> > which was the last -rt kernel that worked fine for you in
> > PREEMPT_DESKTOP mode?
>
> It has been a long time, possibly months - I've mostly been using
> PREEMPT_RT. But now I am working on a soft RT project that for
> various reasons would like to use the mainline kernel, and I've found
> it still has some scheduling bumps up to 5-7ms and am trying to
> identify the problem.
ok.
> Would you like me to do a binary search?
that would certainly be very helpful!
Ingo
On Mon, 2005-11-28 at 17:00 +0100, Ingo Molnar wrote:
> * Lee Revell <[email protected]> wrote:
>
> > On Mon, 2005-11-28 at 12:48 +0100, Ingo Molnar wrote:
> > > which was the last -rt kernel that worked fine for you in
> > > PREEMPT_DESKTOP mode?
> >
> > It has been a long time, possibly months - I've mostly been using
> > PREEMPT_RT. But now I am working on a soft RT project that for
> > various reasons would like to use the mainline kernel, and I've found
> > it still has some scheduling bumps up to 5-7ms and am trying to
> > identify the problem.
>
> ok.
>
> > Would you like me to do a binary search?
>
> that would certainly be very helpful!
>
OK, 2.6.13-rt12 has the same problem. I'm trying
2.6.13-rc4-RT-V0.7.52-02 now which is the oldest thing I still have
around.
Lee
On Mon, 2005-11-28 at 17:00 +0100, Ingo Molnar wrote:
> * Lee Revell <[email protected]> wrote:
>
> > On Mon, 2005-11-28 at 12:48 +0100, Ingo Molnar wrote:
> > > which was the last -rt kernel that worked fine for you in
> > > PREEMPT_DESKTOP mode?
> >
> > It has been a long time, possibly months - I've mostly been using
> > PREEMPT_RT. But now I am working on a soft RT project that for
> > various reasons would like to use the mainline kernel, and I've found
> > it still has some scheduling bumps up to 5-7ms and am trying to
> > identify the problem.
>
> ok.
>
> > Would you like me to do a binary search?
>
> that would certainly be very helpful!
>
With 2.6.13-rc4-RT-V0.7.52-02 (the oldest version I still have around) I
still can't build that config, but it fails with:
LD .tmp_vmlinux1
net/built-in.o: In function `rt_check_expire':
route.c:(.text+0x1a66a): undefined reference to `__bad_spinlock_type'
route.c:(.text+0x1a68d): undefined reference to `__bad_spinlock_type'
net/built-in.o: In function `rt_run_flush':
route.c:(.text+0x1a7c1): undefined reference to `__bad_spinlock_type'
route.c:(.text+0x1a7d9): undefined reference to `__bad_spinlock_type'
net/built-in.o: In function `rt_garbage_collect':
route.c:(.text+0x1aa2a): undefined reference to `__bad_spinlock_type'
net/built-in.o:route.c:(.text+0x1aa55): more undefined references to
`__bad_spinlock_type' follow
make: *** [.tmp_vmlinux1] Error 1
AFAICT all the realtime-preempt patches have references to
__bad_spinlock_type but none of them ever define it - I can't figure out
what's going on.
I'll try to build something older.
Lee
On Mon, 2005-11-28 at 17:00 +0100, Ingo Molnar wrote:
> > On Mon, 2005-11-28 at 12:48 +0100, Ingo Molnar wrote:
> > > which was the last -rt kernel that worked fine for you in
> > > PREEMPT_DESKTOP mode?
> >
> > Would you like me to do a binary search?
>
> that would certainly be very helpful!
>
Well, 2.6.11-RT-V0.7.40-04 works...
Lee
On Mon, 2005-11-28 at 17:40 -0500, Lee Revell wrote:
> 2.6.11-RT-V0.7.40-04 works
and 2.6.12-RT-V0.7.51-28 does not.
Lee
* Lee Revell <[email protected]> wrote:
> On Mon, 2005-11-28 at 17:40 -0500, Lee Revell wrote:
> > 2.6.11-RT-V0.7.40-04 works
>
> and 2.6.12-RT-V0.7.51-28 does not.
thanks. I have further narrowed it down from this point: your .config
breaks from the 51-01 to the 51-02 kernel (on my testbox).
Ingo
* Ingo Molnar <[email protected]> wrote:
> * Lee Revell <[email protected]> wrote:
>
> > On Mon, 2005-11-28 at 17:40 -0500, Lee Revell wrote:
> > > 2.6.11-RT-V0.7.40-04 works
> >
> > and 2.6.12-RT-V0.7.51-28 does not.
>
> thanks. I have further narrowed it down from this point: your .config
> breaks from the 51-01 to the 51-02 kernel (on my testbox).
ok, fixed this one, it was the CURRENT_PTR optimization on UP that broke
if 4K stacks were enabled. (i disabled the optimization for now)
But interestingly, your .config unearthed 2 other serious bugs (!) as
well: the spin_unlock_irq() upon printk was incorrect for !PREEMPT_RT,
and there was an assert introduced by the get-rid-of-bitlocks ext3
patches which was invalid on UP && !PREEMPT_RT. We had these bugs for
quite some time.
I've released -rt21 with these fixes, does it work better for you?
Ingo
On Tue, 2005-11-29 at 10:32 +0100, Ingo Molnar wrote:
> I've released -rt21 with these fixes, does it work better for you?
Thanks, this works perfectly.
Lee
On Tue, 2005-11-29 at 10:32 +0100, Ingo Molnar wrote:
> * Ingo Molnar <[email protected]> wrote:
>
> > * Lee Revell <[email protected]> wrote:
> >
> > > On Mon, 2005-11-28 at 17:40 -0500, Lee Revell wrote:
> > > > 2.6.11-RT-V0.7.40-04 works
> > >
> > > and 2.6.12-RT-V0.7.51-28 does not.
> >
> > thanks. I have further narrowed it down from this point: your .config
> > breaks from the 51-01 to the 51-02 kernel (on my testbox).
>
> ok, fixed this one, it was the CURRENT_PTR optimization on UP that broke
> if 4K stacks were enabled. (i disabled the optimization for now)
>
> But interestingly, your .config unearthed 2 other serious bugs (!) as
> well: the spin_unlock_irq() upon printk was incorrect for !PREEMPT_RT,
> and there was an assert introduced by the get-rid-of-bitlocks ext3
> patches which was invalid on UP && !PREEMPT_RT. We had these bugs for
> quite some time.
>
> I've released -rt21 with these fixes, does it work better for you?
Ingo,
We are unable to build a similar .config (PREEMPT_DESKTOP with soft and
hardirq preemption disabled) on x86-64:
In file included from include/linux/mm.h:15,
from kernel/printk.c:20:
include/linux/fs.h: In function `lock_super':
include/linux/fs.h:849: warning: implicit declaration of function `down'
include/linux/fs.h: In function `unlock_super':
include/linux/fs.h:855: warning: implicit declaration of function `up'
Let me know if you need the exact .config
Lee
On Thu, 2005-12-08 at 20:05 -0500, Lee Revell wrote:
> On Tue, 2005-11-29 at 10:32 +0100, Ingo Molnar wrote:
> > * Ingo Molnar <[email protected]> wrote:
> >
> > > * Lee Revell <[email protected]> wrote:
> > >
> > > > On Mon, 2005-11-28 at 17:40 -0500, Lee Revell wrote:
> > > > > 2.6.11-RT-V0.7.40-04 works
> > > >
> > > > and 2.6.12-RT-V0.7.51-28 does not.
> > >
> > > thanks. I have further narrowed it down from this point: your .config
> > > breaks from the 51-01 to the 51-02 kernel (on my testbox).
> >
> > ok, fixed this one, it was the CURRENT_PTR optimization on UP that broke
> > if 4K stacks were enabled. (i disabled the optimization for now)
> >
> > But interestingly, your .config unearthed 2 other serious bugs (!) as
> > well: the spin_unlock_irq() upon printk was incorrect for !PREEMPT_RT,
> > and there was an assert introduced by the get-rid-of-bitlocks ext3
> > patches which was invalid on UP && !PREEMPT_RT. We had these bugs for
> > quite some time.
> >
> > I've released -rt21 with these fixes, does it work better for you?
> 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.
Lee
$ make ARCH=x86_64
CHK include/linux/version.h
scripts/kconfig/conf -s arch/x86_64/Kconfig
#
# using defaults found in .config
#
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/x86_64/kernel/asm-offsets.s
GEN include/asm-x86_64/asm-offsets.h
HOSTCC scripts/testlpp
CC init/main.o
In file included from include/linux/proc_fs.h:6,
from init/main.c:17:
include/linux/fs.h: In function 'lock_super':
include/linux/fs.h:849: warning: implicit declaration of function 'down'
include/linux/fs.h: In function 'unlock_super':
include/linux/fs.h:855: warning: implicit declaration of function 'up'
CHK include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
In file included from include/linux/tty.h:20,
from init/do_mounts.c:5:
include/linux/fs.h: In function 'lock_super':
include/linux/fs.h:849: warning: implicit declaration of function 'down'
include/linux/fs.h: In function 'unlock_super':
include/linux/fs.h:855: warning: implicit declaration of function 'up'
CC init/do_mounts_rd.o
In file included from init/do_mounts_rd.c:3:
include/linux/fs.h: In function 'lock_super':
include/linux/fs.h:849: warning: implicit declaration of function 'down'
include/linux/fs.h: In function 'unlock_super':
include/linux/fs.h:855: warning: implicit declaration of function 'up'
CC init/do_mounts_initrd.o
etc
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:
include/linux/rwsem.h: In function 'compat_down_read':
include/linux/rwsem.h:61: warning: implicit declaration of function
'__down_read'
include/linux/rwsem.h: In function 'compat_down_read_trylock':
include/linux/rwsem.h:72: warning: implicit declaration of function
'__down_read_trylock'
include/linux/rwsem.h: In function 'compat_down_write':
include/linux/rwsem.h:84: warning: implicit declaration of function
'__down_write'
include/linux/rwsem.h: In function 'compat_down_write_trylock':
include/linux/rwsem.h:95: warning: implicit declaration of function
'__down_write_trylock'
include/linux/rwsem.h: In function 'compat_up_read':
include/linux/rwsem.h:106: warning: implicit declaration of function
'__up_read'
include/linux/rwsem.h: In function 'compat_up_write':
include/linux/rwsem.h:116: warning: implicit declaration of function
'__up_write'
include/linux/rwsem.h: In function 'compat_downgrade_write':
include/linux/rwsem.h:126: warning: implicit declaration of function
'__downgrade_write'
include/linux/rwsem.h: In function 'init_rwsem':
include/linux/rwsem.h:136: warning: implicit declaration of function
'compat_init_rwsem'
In file included from arch/x86_64/kernel/asm-offsets.c:7:
include/linux/sched.h: At top level:
include/linux/sched.h:485: error: field 'mmap_sem' has incomplete type
make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
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);
On Mon, 2005-12-12 at 16:49 -0500, Steven Rostedt wrote:
> 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.
The patch had no effect.
In fact x86-64 does not set CONFIG_RWSEM_XCHGADD_ALGORITHM so this test
in include/linux/rwsem.h causes asm/rwsem.h to be included which does
not exist on x86-64:
36 #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
37 # include <linux/rwsem-spinlock.h> /* use a generic implementation */
38 # ifndef CONFIG_PREEMPT_RT
39 # define __RWSEM_INITIALIZER __COMPAT_RWSEM_INITIALIZER
40 # define DECLARE_RWSEM COMPAT_DECLARE_RWSEM
41 # endif
42 #else
43 # include <asm/rwsem.h> /* use an arch-specific implementation */
44 #endif
If I change that code to always include <linux/rwsem-spinlock.h>, I get
the exact same failures I did with 2.6.14-rt22:
$ make
CHK include/linux/version.h
CC arch/x86_64/kernel/asm-offsets.s
GEN include/asm-x86_64/asm-offsets.h
CC init/main.o
In file included from include/linux/proc_fs.h:6,
from init/main.c:17:
include/linux/fs.h: In function 'lock_super':
include/linux/fs.h:867: warning: implicit declaration of function 'down'
include/linux/fs.h: In function 'unlock_super':
include/linux/fs.h:873: warning: implicit declaration of function 'up'
CHK include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
In file included from include/linux/tty.h:20,
from init/do_mounts.c:5:
include/linux/fs.h: In function 'lock_super':
include/linux/fs.h:867: warning: implicit declaration of function 'down'
include/linux/fs.h: In function 'unlock_super':
include/linux/fs.h:873: warning: implicit declaration of function 'up'
etc.
Lee
On Mon, 2005-12-12 at 17:14 -0500, Lee Revell wrote:
>
> The patch had no effect.
The patch should work for krfoley though. His errors where the same
that I had for i386. I also have it working under x86_64.
>
> In fact x86-64 does not set CONFIG_RWSEM_XCHGADD_ALGORITHM so this test
> in include/linux/rwsem.h causes asm/rwsem.h to be included which does
> not exist on x86-64:
Yeah OK, you have a different problem. Did you post your .config? You
can send it privately to me if you haven't already posted it.
-- Steve
On Mon, 2005-12-12 at 17:22 -0500, Steven Rostedt wrote:
> On Mon, 2005-12-12 at 17:14 -0500, Lee Revell wrote:
>
> >
> > The patch had no effect.
>
> The patch should work for krfoley though. His errors where the same
> that I had for i386. I also have it working under x86_64.
> >
> > In fact x86-64 does not set CONFIG_RWSEM_XCHGADD_ALGORITHM so this test
> > in include/linux/rwsem.h causes asm/rwsem.h to be included which does
> > not exist on x86-64:
>
> Yeah OK, you have a different problem. Did you post your .config? You
> can send it privately to me if you haven't already posted it.
Yes I posted the .config earlier in the thread. Let me know if you want
me to resend it to you.
Lee
On Mon, 12 Dec 2005, Lee Revell wrote:
>
> Yes I posted the .config earlier in the thread. Let me know if you want
> me to resend it to you.
>
Yeah, could you send it to me privately. I see a .config, but that was
for the 2.6.14-rt15 thread.
Send it to me and I'll try to compile it later tonight.
-- Steve
Steven Rostedt wrote:
> On Mon, 2005-12-12 at 17:14 -0500, Lee Revell wrote:
>
>> The patch had no effect.
>
> The patch should work for krfoley though. His errors where the same
> that I had for i386. I also have it working under x86_64.
Yes it does. Sorry I hadn't responded yet. Thanks. Now just wish I could
get it booted. :)
>> In fact x86-64 does not set CONFIG_RWSEM_XCHGADD_ALGORITHM so this test
>> in include/linux/rwsem.h causes asm/rwsem.h to be included which does
>> not exist on x86-64:
>
> Yeah OK, you have a different problem. Did you post your .config? You
> can send it privately to me if you haven't already posted it.
>
> -- Steve
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
kr
On Mon, 2005-12-12 at 17:31 -0500, Lee Revell wrote:
> On Mon, 2005-12-12 at 17:22 -0500, Steven Rostedt wrote:
> > On Mon, 2005-12-12 at 17:14 -0500, Lee Revell wrote:
> >
> > >
> > > The patch had no effect.
> >
> > The patch should work for krfoley though. His errors where the same
> > that I had for i386. I also have it working under x86_64.
> > >
> > > In fact x86-64 does not set CONFIG_RWSEM_XCHGADD_ALGORITHM so this test
> > > in include/linux/rwsem.h causes asm/rwsem.h to be included which does
> > > not exist on x86-64:
> >
> > Yeah OK, you have a different problem. Did you post your .config? You
> > can send it privately to me if you haven't already posted it.
>
> Yes I posted the .config earlier in the thread. Let me know if you want
> me to resend it to you.
Here Lee,
I got it to compile, but I haven't yet tried to boot it. As a matter of
fact, I haven't booted any 2.6.15-rc5-rt1 on any of my machines. I must
trust Ingo too much, since I started porting my kernel to his before
testing it to see if it works without my changes. Oh well, I know what
to do tomorrow.
Well, this compiles, you can see if it boots ;-)
-- Steve
Index: linux-2.6.15-rc5-rt1/arch/x86_64/Kconfig
===================================================================
--- linux-2.6.15-rc5-rt1.orig/arch/x86_64/Kconfig 2005-12-12 10:56:37.000000000 -0500
+++ linux-2.6.15-rc5-rt1/arch/x86_64/Kconfig 2005-12-12 21:33:56.000000000 -0500
@@ -240,7 +240,6 @@
config RWSEM_GENERIC_SPINLOCK
bool
- depends on PREEMPT_RT
default y
config RWSEM_XCHGADD_ALGORITHM
Index: linux-2.6.15-rc5-rt1/include/asm-x86_64/semaphore.h
===================================================================
--- linux-2.6.15-rc5-rt1.orig/include/asm-x86_64/semaphore.h 2005-12-12 10:56:37.000000000 -0500
+++ linux-2.6.15-rc5-rt1/include/asm-x86_64/semaphore.h 2005-12-12 22:13:08.000000000 -0500
@@ -104,6 +104,7 @@
asmlinkage int __compat_down_interruptible(struct compat_semaphore * sem);
asmlinkage int __compat_down_trylock(struct compat_semaphore * sem);
asmlinkage void __compat_up(struct compat_semaphore * sem);
+asmlinkage int compat_sem_is_locked(struct compat_semaphore *sem);
/*
* This is ugly, but we want the default case to fall through.
@@ -199,5 +200,10 @@
:"D" (sem)
:"memory");
}
+
+#ifndef CONFIG_PREEMPT_RT
+# include <linux/semaphore.h>
+#endif
+
#endif /* __KERNEL__ */
#endif
Index: linux-2.6.15-rc5-rt1/include/linux/rwsem.h
===================================================================
--- linux-2.6.15-rc5-rt1.orig/include/linux/rwsem.h 2005-12-12 10:56:37.000000000 -0500
+++ linux-2.6.15-rc5-rt1/include/linux/rwsem.h 2005-12-12 22:13:00.000000000 -0500
@@ -163,6 +163,10 @@
{
compat_downgrade_write(rwsem);
}
+static inline int rwsem_is_locked(struct compat_rw_semaphore *sem)
+{
+ return compat_rwsem_is_locked(sem);
+}
#endif /* CONFIG_PREEMPT_RT */
#endif /* __KERNEL__ */
* Steven Rostedt <[email protected]> wrote:
> Here Lee,
>
> I got it to compile, but I haven't yet tried to boot it. As a matter
> of fact, I haven't booted any 2.6.15-rc5-rt1 on any of my machines. I
> must trust Ingo too much, since I started porting my kernel to his
> before testing it to see if it works without my changes. Oh well, I
> know what to do tomorrow.
thanks, i have applied most of this patch.
Ingo
* Steven Rostedt <[email protected]> wrote:
> 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.
i rather went for fixing up the Kconfig, that makes things easier to
follow. If it turns out to be lots of duplicate stuff we could create a
lib/Kconfig.rwsem that architectures can include.
Ingo
On Tue, 2005-12-13 at 09:15 +0100, Ingo Molnar wrote:
> * Steven Rostedt <[email protected]> wrote:
>
> > 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.
>
> i rather went for fixing up the Kconfig, that makes things easier to
> follow. If it turns out to be lots of duplicate stuff we could create a
> lib/Kconfig.rwsem that architectures can include.
>
OK, scratch my last patch. I'll submit this arch per arch. Starting
with i386. Each arch does it differently, so a generic lib/Konfig.rwsem
wouldn't work, since each arch has a different dependency.
-- Steve
Quick note:
I originally had: default y if !(RWSEM_GENERIC_SPINLOCK || PREEMPT_RT || M386)
But then I realized that RWSEM_GENERIC_SPINLOCK was dependent on
(PREEMPT_RT || M386) so I thought it was redundant to keep the three,
since RWSEM_GENERIC_SPINLOCK itself satisfies the dependencies.
Index: linux-2.6.15-rc5-rt1/arch/i386/Kconfig
===================================================================
--- linux-2.6.15-rc5-rt1.orig/arch/i386/Kconfig 2005-12-12 16:31:25.000000000 -0500
+++ linux-2.6.15-rc5-rt1/arch/i386/Kconfig 2005-12-13 09:14:33.000000000 -0500
@@ -245,8 +245,7 @@
config RWSEM_XCHGADD_ALGORITHM
bool
- depends on !RWSEM_GENERIC_SPINLOCK && !PREEMPT_RT
- default y
+ default y if !RWSEM_GENERIC_SPINLOCK
config X86_UP_APIC
bool "Local APIC support on uniprocessors"
Index: linux-2.6.15-rc5-rt1/arch/i386/Kconfig.cpu
===================================================================
--- linux-2.6.15-rc5-rt1.orig/arch/i386/Kconfig.cpu 2005-12-12 16:31:20.000000000 -0500
+++ linux-2.6.15-rc5-rt1/arch/i386/Kconfig.cpu 2005-12-13 09:10:54.000000000 -0500
@@ -229,11 +229,6 @@
depends on M386
default y
-config RWSEM_XCHGADD_ALGORITHM
- bool
- depends on !M386
- default y
-
config GENERIC_CALIBRATE_DELAY
bool
default y
Index: linux-2.6.15-rc5-rt1/arch/i386/defconfig
===================================================================
--- linux-2.6.15-rc5-rt1.orig/arch/i386/defconfig 2005-10-27 20:02:08.000000000 -0400
+++ linux-2.6.15-rc5-rt1/arch/i386/defconfig 2005-12-13 09:05:21.000000000 -0500
@@ -81,7 +81,7 @@
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
On Tue, 2005-12-13 at 09:32 -0500, Steven Rostedt wrote:
> >
>
> OK, scratch my last patch. I'll submit this arch per arch. Starting
> with i386. Each arch does it differently, so a generic lib/Konfig.rwsem
> wouldn't work, since each arch has a different dependency.
I guess this may be the only patch needed so far. x86_64 doesn't use a
RWSEM_XCHGADD_ALGORITHM, and as for the other archs:
alpha and ia64 - doesn't have PREEPMT_RT yet.
arm, cris, frv, h8300, m32r, parsic don't seem to implement the XCHGADD.
But I see that powerpc will need a fix, but I'll let others who actually
have the boards to fix them. ;-)
As for what I own: x86_64 and i386, the patches I sent are sufficient.
If anyone would like to give me a special board (to keep), I'll gladly
make sure that Ingo's -RT kernel runs on it.
-- Steve
On Mon, 2005-12-12 at 22:28 -0500, Steven Rostedt wrote:
> On Mon, 2005-12-12 at 17:31 -0500, Lee Revell wrote:
> > On Mon, 2005-12-12 at 17:22 -0500, Steven Rostedt wrote:
> > > On Mon, 2005-12-12 at 17:14 -0500, Lee Revell wrote:
> > >
> > > >
> > > > The patch had no effect.
> > >
> > > The patch should work for krfoley though. His errors where the same
> > > that I had for i386. I also have it working under x86_64.
> > > >
> > > > In fact x86-64 does not set CONFIG_RWSEM_XCHGADD_ALGORITHM so this test
> > > > in include/linux/rwsem.h causes asm/rwsem.h to be included which does
> > > > not exist on x86-64:
> > >
> > > Yeah OK, you have a different problem. Did you post your .config? You
> > > can send it privately to me if you haven't already posted it.
> >
> > Yes I posted the .config earlier in the thread. Let me know if you want
> > me to resend it to you.
>
> Here Lee,
>
> I got it to compile, but I haven't yet tried to boot it. As a matter of
> fact, I haven't booted any 2.6.15-rc5-rt1 on any of my machines. I must
> trust Ingo too much, since I started porting my kernel to his before
> testing it to see if it works without my changes. Oh well, I know what
> to do tomorrow.
>
> Well, this compiles, you can see if it boots ;-)
The first chunk of this patch (removing dependency of
RWSEM_GENERIC_SPINLOCK on PREEMPT_RT) is still needed to build
2.6.15-rc5-rt2 on x86-64. Not sure whether this boots yet.
2.6.15-rc5-rt1 compiles with the patch but does not boot.
Lee