2007-05-17 19:41:54

by Ingo Molnar

[permalink] [raw]
Subject: v2.6.21-rt3

i'm pleased to announce the v2.6.21-rt3 kernel, which can be downloaded
from the usual place:

http://redhat.com/~mingo/realtime-preempt/

more info about the -rt patchset can be found in the RT wiki:

http://rt.wiki.kernel.org

This is a fixes-only release assembled by Thomas Gleixner. Many PPC
fixes from Sergei Shtylyov, dynticks softirq fixes from Mikulas Patocka,
a CONFIG_IRQSOFF_TIMING fix from Daniel Walker and x86_64 hrt fixes from
Thomas Gleixner.

to build a 2.6.21-rt3 tree, the following patches should be applied:

http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2
http://redhat.com/~mingo/realtime-preempt/patch-2.6.21-rt3

Ingo


2007-05-18 07:40:17

by emin ak

[permalink] [raw]
Subject: Re: v2.6.21-rt3

Hi,
I have tried to compile -rt3 patch for ppc (mpc8540ads) and it failed
with undefined referance errors on ppc/kernel/asm-offsets.c. Here is
the compiler outputs:

HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/ppc/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-ppc
CC arch/ppc/kernel/asm-offsets.s
In file included from arch/ppc/include/asm/hw_irq.h:110,
from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
include/linux/irqflags.h:92:1: warning: "raw_local_irq_save" redefined
In file included from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
arch/ppc/include/asm/hw_irq.h:103:1: warning: this is the location of
the previous definition
In file included from arch/ppc/include/asm/hw_irq.h:110,
from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
include/linux/irqflags.h:97:1: warning: "raw_local_irq_restore" redefined
In file included from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
arch/ppc/include/asm/hw_irq.h:59:1: warning: this is the location of
the previous definition
In file included from include/linux/time.h:7,
from include/linux/timex.h:57,
from include/linux/sched.h:51,
from arch/ppc/kernel/asm-offsets.c:12:
include/linux/seqlock.h: In function '__read_seqretry':
include/linux/seqlock.h:139: warning: implicit declaration of function
'local_irq_save'
include/linux/seqlock.h:140: warning: implicit declaration of function
'local_irq_restore'
arch/ppc/kernel/asm-offsets.c: In function 'main':
arch/ppc/kernel/asm-offsets.c:148: error: 'struct vdso_data' has no
member named 'tb_orig_stamp'
arch/ppc/kernel/asm-offsets.c:149: error: 'struct vdso_data' has no
member named 'tb_ticks_per_sec'
arch/ppc/kernel/asm-offsets.c:150: error: 'struct vdso_data' has no
member named 'tb_to_xs'
arch/ppc/kernel/asm-offsets.c:151: error: 'struct vdso_data' has no
member named 'stamp_xsec'
arch/ppc/kernel/asm-offsets.c:152: error: 'struct vdso_data' has no
member named 'tb_update_count'
arch/ppc/kernel/asm-offsets.c:153: error: 'struct vdso_data' has no
member named 'tz_minuteswest'
arch/ppc/kernel/asm-offsets.c:154: error: 'struct vdso_data' has no
member named 'tz_dsttime'
arch/ppc/kernel/asm-offsets.c:156: error: 'struct vdso_data' has no
member named 'wtom_clock_sec'
arch/ppc/kernel/asm-offsets.c:157: error: 'struct vdso_data' has no
member named 'wtom_clock_nsec'
make[1]: *** [arch/ppc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2


For a workaround to overcome this problem, I have applied below patch
to asm-offsets.c:

diff -uNr linux-2.6.21/arch/ppc/kernel/asm-offsets.c
linux-2.6.21_orig/arch/ppc/kernel/asm-offsets.c
--- linux-2.6.21/arch/ppc/kernel/asm-offsets.c 2007-05-18
09:47:03.000000000 +0300
+++ linux-2.6.21_orj/arch/ppc/kernel/asm-offsets.c 2007-04-26
06:08:32.000000000 +0300
@@ -145,7 +145,6 @@
DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);

/* datapage offsets for use by vdso */
-#ifdef CONFIG_PPC64
DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data,
tb_ticks_per_sec));
DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
@@ -153,11 +152,9 @@
DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data,
tb_update_count));
DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
+ DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
-#endif /* CONFIG_PPC64 */
-
- DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));

Then it failed again on asm/hw_irq.h because of syntax errors. Here is
the outputs:

eminhp:/opt/tmp/linux_2.6.21/linux-2.6.21 # make uImage
scripts/kconfig/conf -s arch/ppc/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-ppc
CC arch/ppc/kernel/asm-offsets.s
In file included from arch/ppc/include/asm/hw_irq.h:110,
from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
include/linux/irqflags.h:92:1: warning: "raw_local_irq_save" redefined
In file included from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
arch/ppc/include/asm/hw_irq.h:103:1: warning: this is the location of
the previous definition
In file included from arch/ppc/include/asm/hw_irq.h:110,
from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
include/linux/irqflags.h:97:1: warning: "raw_local_irq_restore" redefined
In file included from include/asm/system.h:10,
from include/linux/list.h:9,
from include/linux/signal.h:8,
from arch/ppc/kernel/asm-offsets.c:11:
arch/ppc/include/asm/hw_irq.h:59:1: warning: this is the location of
the previous definition
In file included from include/linux/time.h:7,
from include/linux/timex.h:57,
from include/linux/sched.h:51,
from arch/ppc/kernel/asm-offsets.c:12:
include/linux/seqlock.h: In function '__read_seqretry':
include/linux/seqlock.h:139: warning: implicit declaration of function
'local_irq_save'
include/linux/seqlock.h:140: warning: implicit declaration of function
'local_irq_restore'
GEN include/asm-ppc/asm-offsets.h
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
CC init/main.o
In file included from include/asm/system.h:10,
from include/linux/spinlock.h:95,
from include/linux/module.h:9,
from init/main.c:13:
arch/ppc/include/asm/hw_irq.h:59:1: warning: "raw_local_irq_restore" redefined
In file included from include/linux/spinlock.h:93,
from include/linux/module.h:9,
from init/main.c:13:
include/linux/irqflags.h:97:1: warning: this is the location of the
previous definition
In file included from include/asm/system.h:10,
from include/linux/spinlock.h:95,
from include/linux/module.h:9,
from init/main.c:13:
arch/ppc/include/asm/hw_irq.h:65:46: error: macro
"raw_local_irq_disable" passed 1 arguments, but takes just 0
In file included from include/asm/system.h:10,
from include/linux/spinlock.h:95,
from include/linux/module.h:9,
from init/main.c:13:
arch/ppc/include/asm/hw_irq.h:66: error: syntax error before '{' token
arch/ppc/include/asm/hw_irq.h:77:45: error: macro
"raw_local_irq_enable" passed 1 arguments, but takes just 0
arch/ppc/include/asm/hw_irq.h:78: error: syntax error before '{' token
arch/ppc/include/asm/hw_irq.h:103:1: warning: "raw_local_irq_save" redefined
In file included from include/linux/spinlock.h:93,
from include/linux/module.h:9,
from init/main.c:13:
include/linux/irqflags.h:92:1: warning: this is the location of the
previous definition
In file included from include/linux/time.h:7,
from include/linux/stat.h:57,
from include/linux/module.h:11,
from init/main.c:13:
include/linux/seqlock.h: In function '__read_seqretry':
include/linux/seqlock.h:139: warning: implicit declaration of function
'local_irq_save'
include/linux/seqlock.h:140: warning: implicit declaration of function
'local_irq_restore'
In file included from include/linux/rtc.h:102,
from include/linux/efi.h:19,
from init/main.c:43:
include/linux/interrupt.h: In function 'cli':
include/linux/interrupt.h:210: warning: implicit declaration of
function 'local_irq_disable'
include/linux/interrupt.h: In function 'sti':
include/linux/interrupt.h:214: warning: implicit declaration of
function 'local_irq_enable'
include/linux/interrupt.h: In function 'save_flags':
include/linux/interrupt.h:218: warning: implicit declaration of
function 'local_save_flags'
init/main.c: In function 'start_kernel':
init/main.c:566: warning: implicit declaration of function 'irqs_disabled'
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2

Is a a compiler issue related to assembler (I'am currently using
gcc-4.0.0) or is this a bug?

Thanks alot.
Emin

2007/5/17, Ingo Molnar <[email protected]>:
> i'm pleased to announce the v2.6.21-rt3 kernel, which can be downloaded
> from the usual place:
>
> http://redhat.com/~mingo/realtime-preempt/
>
> more info about the -rt patchset can be found in the RT wiki:
>
> http://rt.wiki.kernel.org
>
> This is a fixes-only release assembled by Thomas Gleixner. Many PPC
> fixes from Sergei Shtylyov, dynticks softirq fixes from Mikulas Patocka,
> a CONFIG_IRQSOFF_TIMING fix from Daniel Walker and x86_64 hrt fixes from
> Thomas Gleixner.
>
> to build a 2.6.21-rt3 tree, the following patches should be applied:
>
> http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2
> http://redhat.com/~mingo/realtime-preempt/patch-2.6.21-rt3
>
> Ingo
> -
> 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/
>


Attachments:
(No filename) (10.84 kB)
.config (18.34 kB)
Download all attachments

2007-05-18 07:48:27

by Thomas Gleixner

[permalink] [raw]
Subject: Re: v2.6.21-rt3

On Fri, 2007-05-18 at 10:39 +0300, emin ak wrote:
> Hi,
> I have tried to compile -rt3 patch for ppc (mpc8540ads) and it failed
> with undefined referance errors on ppc/kernel/asm-offsets.c. Here is
> the compiler outputs:

arch/ppc is known to be broken. Does it even compile on 2.6.21 vanilla ?

tglx


2007-05-18 08:10:23

by emin ak

[permalink] [raw]
Subject: Re: v2.6.21-rt3

Yes, 2.6.21 was compiled and boot successfully for ppc, Is 85xx family
supported for powerpc arch?
Thanks.

2007/5/18, Thomas Gleixner <[email protected]>:
> On Fri, 2007-05-18 at 10:39 +0300, emin ak wrote:
> > Hi,
> > I have tried to compile -rt3 patch for ppc (mpc8540ads) and it failed
> > with undefined referance errors on ppc/kernel/asm-offsets.c. Here is
> > the compiler outputs:
>
> arch/ppc is known to be broken. Does it even compile on 2.6.21 vanilla ?
>
> tglx
>
>
>

2007-05-18 08:26:32

by Thomas Gleixner

[permalink] [raw]
Subject: Re: v2.6.21-rt3

Please do not top post !

On Fri, 2007-05-18 at 11:10 +0300, emin ak wrote:
> Yes, 2.6.21 was compiled and boot successfully for ppc, Is 85xx family
> supported for powerpc arch?

I don't know. You might ask the folks on the ppc mailing list.

tglx


2007-05-18 08:47:40

by Wolfgang Grandegger

[permalink] [raw]
Subject: Re: v2.6.21-rt3

Thomas Gleixner wrote:
> Please do not top post !
>
> On Fri, 2007-05-18 at 11:10 +0300, emin ak wrote:
>> Yes, 2.6.21 was compiled and boot successfully for ppc, Is 85xx family
>> supported for powerpc arch?
>
> I don't know. You might ask the folks on the ppc mailing list.

E.g. check http://lxr.free-electrons.com/source/arch/powerpc/configs/.
Even your board seems supported. But you need a boot loader aware of the
Open Firmware Flat Device Tree.

Wolfgang.

2007-05-21 16:11:35

by K.R. Foley

[permalink] [raw]
Subject: Re: v2.6.21-rt3

Ingo Molnar wrote:
> i'm pleased to announce the v2.6.21-rt3 kernel, which can be downloaded
> from the usual place:
>

This is actually regarding v2.6.21-rt5 but I don't remember seeing an
announcement for that one. The attached patch is necessary if you happen
to have RTC_HISTOGRAM enabled, which I'm guessing most folks don't.

BTW, what was the consensus on pagefault_enable and pagefault_disable?

--
kr


Attachments:
fixrtc.patch (511.00 B)

2007-05-21 20:13:40

by Daniel Walker

[permalink] [raw]
Subject: Re: v2.6.21-rt3


Where did the arm ep93xx changes come from? It looks like patch below
came in with them in 2.6.21-rt6 ..

--- linux.orig/include/asm-arm/system.h
+++ linux/include/asm-arm/system.h
@@ -235,8 +235,9 @@ static inline void set_copro_access(unsi
* so enable interrupts over the context switch to avoid high
* latency.
*/
+#if 0 // preempt_rt hack, because warn_on in shedule.c triggers
#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
-
+#endif
/*
* switch_to(prev, next) should switch from task `prev' to `next'
* `prev' will never be the same as `next'. schedule() itself


2007-05-21 20:24:27

by Thomas Gleixner

[permalink] [raw]
Subject: Re: v2.6.21-rt3

On Mon, 2007-05-21 at 13:11 -0700, Daniel Walker wrote:
> Where did the arm ep93xx changes come from?

Grown out of my nose probably.

> It looks like patch below
> came in with them in 2.6.21-rt6 ..

So what ?

tglx


2007-05-21 20:28:18

by Daniel Walker

[permalink] [raw]
Subject: Re: v2.6.21-rt3

On Mon, 2007-05-21 at 22:24 +0200, Thomas Gleixner wrote:
> On Mon, 2007-05-21 at 13:11 -0700, Daniel Walker wrote:
> > Where did the arm ep93xx changes come from?
>
> Grown out of my nose probably.
>
> > It looks like patch below
> > came in with them in 2.6.21-rt6 ..
>
> So what ?

It's silencing a WARN_ON() with no real reason why it's happening, or
why/if it's safe to silence it .. Why is that there?

Daniel

2007-05-21 20:36:21

by Thomas Gleixner

[permalink] [raw]
Subject: Re: v2.6.21-rt3

On Mon, 2007-05-21 at 13:25 -0700, Daniel Walker wrote:
> On Mon, 2007-05-21 at 22:24 +0200, Thomas Gleixner wrote:
> > On Mon, 2007-05-21 at 13:11 -0700, Daniel Walker wrote:
> > > Where did the arm ep93xx changes come from?
> >
> > Grown out of my nose probably.
> >
> > > It looks like patch below
> > > came in with them in 2.6.21-rt6 ..
> >
> > So what ?
>
> It's silencing a WARN_ON() with no real reason why it's happening, or
> why/if it's safe to silence it .. Why is that there?

Care to look at the code ?

tglx


2007-05-21 20:43:41

by Daniel Walker

[permalink] [raw]
Subject: Re: v2.6.21-rt3

On Mon, 2007-05-21 at 22:36 +0200, Thomas Gleixner wrote:
> On Mon, 2007-05-21 at 13:25 -0700, Daniel Walker wrote:
> > On Mon, 2007-05-21 at 22:24 +0200, Thomas Gleixner wrote:
> > > On Mon, 2007-05-21 at 13:11 -0700, Daniel Walker wrote:
> > > > Where did the arm ep93xx changes come from?
> > >
> > > Grown out of my nose probably.
> > >
> > > > It looks like patch below
> > > > came in with them in 2.6.21-rt6 ..
> > >
> > > So what ?
> >
> > It's silencing a WARN_ON() with no real reason why it's happening, or
> > why/if it's safe to silence it .. Why is that there?
>
> Care to look at the code ?

I copied the patch into the first email, I did look at it which is why
you got an email. Your introducing the patch , it's for you to explain
why it needs to be there.. considering that the comment says "hack" in
it, I have to wonder what the non-hack version is ..

Daniel

2007-05-22 08:26:20

by Ingo Molnar

[permalink] [raw]
Subject: Re: v2.6.21-rt3


* Daniel Walker <[email protected]> wrote:

> I copied the patch into the first email, I did look at it which is why
> you got an email. Your introducing the patch , it's for you to explain
> why it needs to be there.. considering that the comment says "hack" in
> it, I have to wonder what the non-hack version is ..

you might not have realized it, but the problem i think was the attitude
you showed in the very first sentence:

> Where did the arm ep93xx changes come from? It looks like patch below
> came in with them in 2.6.21-rt6 ..

AFAICS Thomas just mirrored that snotty comment back to you, and yes,
when you are on the receiving end it feels nasty, doesnt it? So please
restart and rephrase that into a more polite form and you might get an
answer (although i certainly do not talk for Thomas). Something like:

> Thomas, could you give me a bit more information about why the arm
> ep93xx changes were done in 2.6.21-rt6? I do not seem to understand
> the reason behind that change. I've attached the change below. Thanks!

You are asking Thomas a favor after all... Be a bit more polite when
asking others, and a completely new world might open up for you :-)

Ingo

2007-05-22 15:34:29

by Daniel Walker

[permalink] [raw]
Subject: Re: v2.6.21-rt3

On Tue, 2007-05-22 at 10:25 +0200, Ingo Molnar wrote:
> * Daniel Walker <[email protected]> wrote:
>
> > I copied the patch into the first email, I did look at it which is why
> > you got an email. Your introducing the patch , it's for you to explain
> > why it needs to be there.. considering that the comment says "hack" in
> > it, I have to wonder what the non-hack version is ..
>
> you might not have realized it, but the problem i think was the attitude
> you showed in the very first sentence:

I was not intending any attitude. I had no idea where those changes came
from ..

> > Where did the arm ep93xx changes come from? It looks like patch below
> > came in with them in 2.6.21-rt6 ..
>
> AFAICS Thomas just mirrored that snotty comment back to you, and yes,
> when you are on the receiving end it feels nasty, doesnt it? So please
> restart and rephrase that into a more polite form and you might get an
> answer (although i certainly do not talk for Thomas). Something like:

I don't read the sentence you quoted as snotty at all .. I had no idea
where the changes came from, and I was simply asking that.. Since there
isn't a history for the -rt patch, I honestly don't know where some of
the code comes from ..

Since I had no idea that Thomas wrote that code, there's no premeditated
aggravation, or flame bait there..

> > Thomas, could you give me a bit more information about why the arm
> > ep93xx changes were done in 2.6.21-rt6? I do not seem to understand
> > the reason behind that change. I've attached the change below. Thanks!
>
> You are asking Thomas a favor after all... Be a bit more polite when
> asking others, and a completely new world might open up for you :-)

I don't see that as me asking a favor.. If a patch crosses LKML and I
ask "Why does this hunk exist?" that's not a favor. That is pure code
review, which is exactly what I was doing in this thread. Which is
reviewing code and asking questions..

I hope you don't read my comments above as snotty cause it's not suppose
to be, just conversation..

Daniel