* [Xenomai-help] adeos patch for 2.6.21
@ 2007-10-08 17:22 roland Tollenaar
2007-10-08 17:38 ` Jan Kiszka
0 siblings, 1 reply; 9+ messages in thread
From: roland Tollenaar @ 2007-10-08 17:22 UTC (permalink / raw)
To: xenomai-help
Hi,
just a repeat of a mail I sent to the adeos emergency center a couple
of minutes ago.
I have a kernel 2.6.21 but there is no adeos patch for that kernel.
which adeos patch must I use?
I am planning to apply xenomai 2.4 just in case this has any effect on
the choice of adeos.
Kind regards,
Rolnad.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-08 17:22 [Xenomai-help] adeos patch for 2.6.21 roland Tollenaar
@ 2007-10-08 17:38 ` Jan Kiszka
2007-10-08 18:16 ` roland Tollenaar
0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2007-10-08 17:38 UTC (permalink / raw)
To: roland Tollenaar; +Cc: xenomai-help
roland Tollenaar wrote:
> Hi,
>
> just a repeat of a mail I sent to the adeos emergency center a couple
> of minutes ago.
"Thank you for calling the emergency centre. We are busy, please leave
your report after the signal."
>
> I have a kernel 2.6.21 but there is no adeos patch for that kernel.
>
> which adeos patch must I use?
There is none for this kernel on i386 (assuming this is your arch). The
easiest thing is to move forward to 2.6.22 - or you would have to
back-port that patch... ;)
>
> I am planning to apply xenomai 2.4 just in case this has any effect on
> the choice of adeos.
Xenomai 2.4 is required for kernels beyond 2.6.20 anyway.
But note that we are still sweeping out remaining bugs around this
kernel, see "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
broken fasteoi handling" on Xenomai-core / Adeos-main. Moreover, today's
SVN breaks at least my test box. So you may want to wait a few days at
least, until the dust (hopefully) settled down again.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-08 17:38 ` Jan Kiszka
@ 2007-10-08 18:16 ` roland Tollenaar
2007-10-08 23:10 ` Jan Kiszka
0 siblings, 1 reply; 9+ messages in thread
From: roland Tollenaar @ 2007-10-08 18:16 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-help
Hi,
> > which adeos patch must I use?
>
> There is none for this kernel on i386 (assuming this is your arch). The
> easiest thing is to move forward to 2.6.22 - or you would have to
> back-port that patch... ;)
Ouch. How is that for bad luck.
> Xenomai 2.4 is required for kernels beyond 2.6.20 anyway.
Great.
> But note that we are still sweeping out remaining bugs around this
> kernel, see "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
> broken fasteoi handling" on Xenomai-core / Adeos-main. Moreover, today's
> SVN breaks at least my test box. So you may want to wait a few days at
> least, until the dust (hopefully) settled down again.
Not so great. But then, this at least gives me some time to upgrade to 2.6.22
I'll give a holler before I try patching.
Thanks.
Roland.
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT SE 2
> Corporate Competence Center Embedded Linux
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-08 18:16 ` roland Tollenaar
@ 2007-10-08 23:10 ` Jan Kiszka
2007-10-09 6:16 ` Roland Tollenaar
0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2007-10-08 23:10 UTC (permalink / raw)
To: roland Tollenaar; +Cc: xenomai-help
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
roland Tollenaar wrote:
> Hi,
>
>>> which adeos patch must I use?
>> There is none for this kernel on i386 (assuming this is your arch). The
>> easiest thing is to move forward to 2.6.22 - or you would have to
>> back-port that patch... ;)
> Ouch. How is that for bad luck.
>
>> Xenomai 2.4 is required for kernels beyond 2.6.20 anyway.
> Great.
>
>> But note that we are still sweeping out remaining bugs around this
>> kernel, see "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
>> broken fasteoi handling" on Xenomai-core / Adeos-main. Moreover, today's
>> SVN breaks at least my test box. So you may want to wait a few days at
>> least, until the dust (hopefully) settled down again.
> Not so great. But then, this at least gives me some time to upgrade to 2.6.22
Just checked again: The problem is still limited to kernels with
CONFIG_HIGH_RES_TIMERS or CONFIG_NO_HZ. So you can already do your tests
with those features disabled and the two mentioned patches applied.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-08 23:10 ` Jan Kiszka
@ 2007-10-09 6:16 ` Roland Tollenaar
2007-10-09 6:49 ` Jan Kiszka
0 siblings, 1 reply; 9+ messages in thread
From: Roland Tollenaar @ 2007-10-09 6:16 UTC (permalink / raw)
To: Jan Kiszka, Xenomai-help
Hi Jan,
>>> But note that we are still sweeping out remaining bugs around this
>>> kernel, see "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
>>> broken fasteoi handling" on Xenomai-core / Adeos-main. Moreover, today's
> Just checked again: The problem is still limited to kernels with
> CONFIG_HIGH_RES_TIMERS or CONFIG_NO_HZ. So you can already do your tests
> with those features disabled and the two mentioned patches applied.
I presume the "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
>>> broken fasteoi handling" are the patches you are refering to. I
also assume these have been posted on xenomai-core and/or adeos-main
mailing list. If that is correct I am having some trouble locating them
in the ML archives with the labels above. Any other manner I can get
hold of those patches?
Regards,
Roland.
>
> Jan
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-09 6:16 ` Roland Tollenaar
@ 2007-10-09 6:49 ` Jan Kiszka
2007-10-12 21:42 ` Philippe Gerum
0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2007-10-09 6:49 UTC (permalink / raw)
To: rolandtollenaar; +Cc: Xenomai-help
[-- Attachment #1.1: Type: text/plain, Size: 1143 bytes --]
Roland Tollenaar wrote:
> Hi Jan,
>
>>>> But note that we are still sweeping out remaining bugs around this
>>>> kernel, see "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
>>>> broken fasteoi handling" on Xenomai-core / Adeos-main. Moreover,
>>>> today's
>
>> Just checked again: The problem is still limited to kernels with
>> CONFIG_HIGH_RES_TIMERS or CONFIG_NO_HZ. So you can already do your tests
>> with those features disabled and the two mentioned patches applied.
> I presume the "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
>>>> broken fasteoi handling" are the patches you are refering to. I also
> assume these have been posted on xenomai-core and/or adeos-main mailing
> list. If that is correct I am having some trouble locating them in the
> ML archives with the labels above. Any other manner I can get hold of
> those patches?
This way e.g.:
http://search.gmane.org/?query=Fix+__ipipe_pin_range_globally&group=gmane.linux.real-time.xenomai.devel
Alternatively, I attached both for you, adding a third one which is
relevant if you use Xenomai with --enable-x86-sep.
Jan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: fix-fasteoi.patch --]
[-- Type: text/x-patch; name="fix-fasteoi.patch", Size: 1260 bytes --]
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 2ae79e9..517937b 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -2022,6 +2022,8 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
__unmask_and_level_IO_APIC_irq(irq);
spin_unlock(&ioapic_lock);
}
+
+ __mask_IO_APIC_irq(irq);
}
static int ioapic_retrigger_irq(unsigned int irq)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index ba497a7..1560b4a 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -422,8 +422,13 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
+#ifdef CONFIG_IPIPE
+ desc->chip->unmask(irq);
+out:
+#else
out:
desc->chip->eoi(irq);
+#endif
spin_unlock(&desc->lock);
}
@@ -533,11 +538,12 @@ void fastcall __ipipe_end_level_irq(unsigned irq, struct irq_desc *desc)
void fastcall __ipipe_ack_fasteoi_irq(unsigned irq, struct irq_desc *desc)
{
+ desc->chip->eoi(irq);
}
void fastcall __ipipe_end_fasteoi_irq(unsigned irq, struct irq_desc *desc)
{
- desc->chip->eoi(irq);
+ desc->chip->unmask(irq);
}
void fastcall __ipipe_ack_edge_irq(unsigned irq, struct irq_desc *desc)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: fix-pin_range_globally.patch --]
[-- Type: text/x-patch; name="fix-pin_range_globally.patch", Size: 2619 bytes --]
---
arch/i386/mm/fault.c | 16 +++++++++++-----
include/linux/ipipe.h | 7 ++-----
mm/memory.c | 14 --------------
3 files changed, 13 insertions(+), 24 deletions(-)
Index: linux-2.6.22.7/arch/i386/mm/fault.c
===================================================================
--- linux-2.6.22.7.orig/arch/i386/mm/fault.c
+++ linux-2.6.22.7/arch/i386/mm/fault.c
@@ -650,16 +650,22 @@ void vmalloc_sync_all(void)
}
#ifdef CONFIG_IPIPE
-int __ipipe_pin_range_mapping(struct mm_struct *mm,
- unsigned long start, unsigned long end)
+void __ipipe_pin_range_globally(unsigned long start, unsigned long end)
{
unsigned long next, addr = start;
+ unsigned long flags;
+ struct page *page;
do {
next = pgd_addr_end(addr, end);
- vmalloc_sync_one(mm->pgd, addr);
- } while (addr = next, addr != end);
- return 0;
+ spin_lock_irqsave(&pgd_lock, flags);
+ for (page = pgd_list; page; page = (struct page *)page->index)
+ if (!vmalloc_sync_one(page_address(page), addr)) {
+ BUG_ON(page != pgd_list);
+ break;
+ }
+ spin_unlock_irqrestore(&pgd_lock, flags);
+ } while (addr = next, addr != end);
}
#endif /* CONFIG_IPIPE */
Index: linux-2.6.22.7/include/linux/ipipe.h
===================================================================
--- linux-2.6.22.7.orig/include/linux/ipipe.h
+++ linux-2.6.22.7/include/linux/ipipe.h
@@ -223,11 +223,6 @@ static inline void ipipe_irq_unlock(unsi
__ipipe_unlock_irq(ipipe_current_domain, irq);
}
-struct mm_struct;
-
-int __ipipe_pin_range_mapping(struct mm_struct *mm,
- unsigned long start, unsigned long end);
-
#ifndef __ipipe_sync_pipeline
#define __ipipe_sync_pipeline(syncmask) __ipipe_sync_stage(syncmask)
#endif
@@ -298,6 +293,8 @@ static inline void ipipe_init_notify(str
__ipipe_dispatch_event(IPIPE_EVENT_INIT,p);
}
+struct mm_struct;
+
static inline void ipipe_cleanup_notify(struct mm_struct *mm)
{
if (__ipipe_event_monitored_p(IPIPE_EVENT_CLEANUP))
Index: linux-2.6.22.7/mm/memory.c
===================================================================
--- linux-2.6.22.7.orig/mm/memory.c
+++ linux-2.6.22.7/mm/memory.c
@@ -2959,18 +2959,4 @@ int ipipe_disable_ondemand_mappings(stru
}
EXPORT_SYMBOL(ipipe_disable_ondemand_mappings);
-
-void __ipipe_pin_range_globally(unsigned long start, unsigned long end)
-{
- struct task_struct *p;
-
- read_lock(&tasklist_lock);
-
- for_each_process(p)
- if (p->mm)
- __ipipe_pin_range_mapping(p->mm, start, end);
-
- read_unlock(&tasklist_lock);
-}
-
#endif
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: fix-wrmsr-race.patch --]
[-- Type: text/x-patch; name="fix-wrmsr-race.patch", Size: 1217 bytes --]
---
arch/i386/kernel/vm86.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-2.6.20.20/arch/i386/kernel/vm86.c
===================================================================
--- linux-2.6.20.20.orig/arch/i386/kernel/vm86.c
+++ linux-2.6.20.20/arch/i386/kernel/vm86.c
@@ -148,12 +148,14 @@ struct pt_regs * fastcall save_v86_state
do_exit(SIGSEGV);
}
+ local_irq_disable_hw_cond();
tss = &per_cpu(init_tss, get_cpu());
current->thread.esp0 = current->thread.saved_esp0;
current->thread.sysenter_cs = __KERNEL_CS;
load_esp0(tss, ¤t->thread);
current->thread.saved_esp0 = 0;
put_cpu();
+ local_irq_enable_hw_cond();
ret = KVM86->regs32;
@@ -324,12 +326,14 @@ static void do_sys_vm86(struct kernel_vm
savesegment(fs, tsk->thread.saved_fs);
tsk->thread.saved_gs = info->regs32->xgs;
+ local_irq_disable_hw_cond();
tss = &per_cpu(init_tss, get_cpu());
tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0;
if (cpu_has_sep)
tsk->thread.sysenter_cs = 0;
load_esp0(tss, &tsk->thread);
put_cpu();
+ local_irq_enable_hw_cond();
tsk->thread.screen_bitmap = info->screen_bitmap;
if (info->flags & VM86_SCREEN_BITMAP)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-09 6:49 ` Jan Kiszka
@ 2007-10-12 21:42 ` Philippe Gerum
2007-10-13 17:13 ` Roland Tollenaar
0 siblings, 1 reply; 9+ messages in thread
From: Philippe Gerum @ 2007-10-12 21:42 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai-help
On Tue, 2007-10-09 at 08:49 +0200, Jan Kiszka wrote:
> Roland Tollenaar wrote:
> > Hi Jan,
> >
> >>>> But note that we are still sweeping out remaining bugs around this
> >>>> kernel, see "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
> >>>> broken fasteoi handling" on Xenomai-core / Adeos-main. Moreover,
> >>>> today's
> >
> >> Just checked again: The problem is still limited to kernels with
> >> CONFIG_HIGH_RES_TIMERS or CONFIG_NO_HZ. So you can already do your tests
> >> with those features disabled and the two mentioned patches applied.
> > I presume the "Fix __ipipe_pin_range_globally" and "IO-APIC stall due to
> >>>> broken fasteoi handling" are the patches you are refering to. I also
> > assume these have been posted on xenomai-core and/or adeos-main mailing
> > list. If that is correct I am having some trouble locating them in the
> > ML archives with the labels above. Any other manner I can get hold of
> > those patches?
>
> This way e.g.:
>
> http://search.gmane.org/?query=Fix+__ipipe_pin_range_globally&group=gmane.linux.real-time.xenomai.devel
>
> Alternatively, I attached both for you, adding a third one which is
> relevant if you use Xenomai with --enable-x86-sep.
Warning: the fasteoi patch as inlined is incomplete, and has been fixed
in the latest I-pipe release (i.e. 2.6.22-1.10-07, 2.6.20-1.10-06) --
spinlocking around the IO-APIC manipulation is missing.
--
Philippe.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-12 21:42 ` Philippe Gerum
@ 2007-10-13 17:13 ` Roland Tollenaar
2007-10-13 17:21 ` Jan Kiszka
0 siblings, 1 reply; 9+ messages in thread
From: Roland Tollenaar @ 2007-10-13 17:13 UTC (permalink / raw)
To: rpm; +Cc: Xenomai-help, Jan Kiszka
Hi,
>>
>> http://search.gmane.org/?query=Fix+__ipipe_pin_range_globally&group=gmane.linux.real-time.xenomai.devel
>>
>> Alternatively, I attached both for you, adding a third one which is
>> relevant if you use Xenomai with --enable-x86-sep.
>
> Warning: the fasteoi patch as inlined is incomplete, and has been fixed
> in the latest I-pipe release (i.e. 2.6.22-1.10-07, 2.6.20-1.10-06) --
> spinlocking around the IO-APIC manipulation is missing.
Is the adeos patch for 2.6.23 on its way? I believe the 2.6.23 kernel is
released as stable.
Kind regards,
Roland
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] adeos patch for 2.6.21
2007-10-13 17:13 ` Roland Tollenaar
@ 2007-10-13 17:21 ` Jan Kiszka
0 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2007-10-13 17:21 UTC (permalink / raw)
To: rolandtollenaar; +Cc: Xenomai-help
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
Roland Tollenaar wrote:
> Hi,
>
>>>
>>> http://search.gmane.org/?query=Fix+__ipipe_pin_range_globally&group=gmane.linux.real-time.xenomai.devel
>>>
>>>
>>> Alternatively, I attached both for you, adding a third one which is
>>> relevant if you use Xenomai with --enable-x86-sep.
>>
>> Warning: the fasteoi patch as inlined is incomplete, and has been fixed
>> in the latest I-pipe release (i.e. 2.6.22-1.10-07, 2.6.20-1.10-06) --
>> spinlocking around the IO-APIC manipulation is missing.
>
> Is the adeos patch for 2.6.23 on its way? I believe the 2.6.23 kernel is
> released as stable.
Check my posting to xenomai-core. This is not yet the official ipipe
release for that kernel, but that shall not stop you from testing and
reporting.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-10-13 17:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08 17:22 [Xenomai-help] adeos patch for 2.6.21 roland Tollenaar
2007-10-08 17:38 ` Jan Kiszka
2007-10-08 18:16 ` roland Tollenaar
2007-10-08 23:10 ` Jan Kiszka
2007-10-09 6:16 ` Roland Tollenaar
2007-10-09 6:49 ` Jan Kiszka
2007-10-12 21:42 ` Philippe Gerum
2007-10-13 17:13 ` Roland Tollenaar
2007-10-13 17:21 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.