2008-04-01 07:15:42     xenomai rtdm_irq_disable does nothing

Document created by Aaronwu Employee on Aug 11, 2013
Version 1Show Document
  • View in full screen mode

2008-04-01 07:15:42     xenomai rtdm_irq_disable does nothing

Filip Van Rillaer (BELGIUM)

Message: 53445   

 

Hello,

 

The Xenomai function rdm_irq_disable does nothing.  This is because this function uses the function default_disable (linux-2.6.x/kernel/irq/chip.c) which is an empty function.

 

I solved this problem by implementing the function as follows:

 

static void default_disable(unsigned int irq)

{

struct irq_desc *desc = irq_desc + irq;

 

desc->chip->mask(irq);

desc->status |= IRQ_DISABLED;

}

 

Please comment and eventually update the file.

 

Best regards,

 

Filip

 

 

TranslateQuoteReplyEditDelete

 

 

2008-04-01 23:33:34     Re: xenomai rtdm_irq_disable does nothing

Yi Li (CHINA)

Message: 53502    Could you please post the patch to xenomai-core mailing list here: https://mail.gna.org/listinfo/xenomai-core, for comments from xenomai developers?

QuoteReplyEditDelete

 

 

2008-04-02 00:12:47     Re: xenomai rtdm_irq_disable does nothing

Yi Li (CHINA)

Message: 53503    I cannot follow the call trace without detailed analysis, but as far as I can remember rtdm_irq_disable() will finally call arch (blackfin) specific routine (not generic disable_irq()).

QuoteReplyEditDelete

 

 

2008-04-02 03:24:43     Re: xenomai rtdm_irq_disable does nothing

Filip Van Rillaer (BELGIUM)

Message: 53510   

 

Hello Li,

 

The call tee:

 

rtdm_irq_disable (rtdm_driver.h)

xnintr_disable (intr.c)

xnarch_disable_irq (intr.h)

rthal_irq_disable (arch/blackfin/hal.c)

rthal_irq_chip_disable (include/asm-blackfin/wrappers.h)

rthal_irq_descp(irq)->chip->disable(irq)  (kernel/irq/chip.c)

default_disable

 

Best regards,

 

Filip

TranslateQuoteReplyEditDelete

 

 

2008-04-02 03:42:06     Re: xenomai rtdm_irq_disable does nothing

Filip Van Rillaer (BELGIUM)

Message: 53511   

 

I registered myself as a user on that web-site (and got an email confirmation), but I don't see a place where I can report this problem to the xenomai developers.

TranslateQuoteReplyEditDelete

 

 

2008-04-02 03:46:13     Re: xenomai rtdm_irq_disable does nothing

Michael Hennerich (GERMANY)

Message: 53512    What Linux version are you using?

This issue sounds familiar - and it was fixed recently.

 

-Michael

QuoteReplyEditDelete

 

 

2008-04-02 03:50:52     Re: xenomai rtdm_irq_disable does nothing

Filip Van Rillaer (BELGIUM)

Message: 53513   

 

uClinux version :

 

URL: svn://firewall-sources.blackfin.uclinux.org:80/svn/uclinux-dist/branches/2008R1

Repository Root: svn://firewall-sources.blackfin.uclinux.org:80/svn/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 6112

Node Kind: directory

Schedule: normal

Last Changed Author: adamliyi

Last Changed Rev: 6111

Last Changed Date: 2008-01-29 08:25:22 +0100 (Tue, 29 Jan 2008)

 

xenomai version:

URL: http://svn.gna.org/svn/xenomai/tags/v2.4.0

Repository Root: http://svn.gna.org/svn/xenomai

Repository UUID: c6d672ea-8702-0410-b560-f74c916a59fe

Revision: 3452

Node Kind: directory

Schedule: normal

Last Changed Author: rpm

Last Changed Rev: 3260

Last Changed Date: 2007-12-08 17:56:43 +0100 (Sat, 08 Dec 2007)

 

 

 

TranslateQuoteReplyEditDelete

 

 

2008-04-02 04:23:10     Re: xenomai rtdm_irq_disable does nothing

Yi Li (CHINA)

Message: 53527    "To post a message to all the list members, send email to xenomai-core@gna.org".

 

I checked the xenomai source:

 

"rtdm_irq_disable (rtdm_driver.h)

xnintr_disable (intr.c)

xnarch_disable_irq (intr.h)

rthal_irq_disable (arch/blackfin/hal.c)

rthal_irq_chip_disable (include/asm-blackfin/wrappers.h)

rthal_irq_descp(irq)->chip->disable(irq)  (kernel/irq/chip.c)"

 

And following the call trace:

 

include/asm-blackfin/hal.h:#define rthal_irq_descp(irq) (&irq_desc[(irq)])

 

finally it will call: irq_desc[irq].chip.disable()

 

arch/blackfin/mach-common/ints-priority-sc.c

"static struct irq_chip bfin_core_irqchip = {

        .ack = ack_noop,

        .mask = bfin_core_mask_irq,

        .unmask = bfin_core_unmask_irq,

};

"

 

I think maybe need to add two lines here:

 

.disable = bfin_core_mask_irq,

.enable = bfin_core_unmask_irq,

QuoteReplyEditDelete

 

 

2008-04-02 04:31:05     Re: xenomai rtdm_irq_disable does nothing

Michael Hennerich (GERMANY)

Message: 53528    Ok - this feature is called delayed disable - which means the IRQ stays enabled until a IRQ happens - then it will be disabled.

On architecture were IRQ disable is expensive this provides some optimization.

 

Can you update your 2008R1 tree. I committed a fix some time ago.

 

Revision 4307

Author hennerich

Date 2008-02-20 04:17:46 -0500 (Wed, 20 Feb 2008)

 

Log Message

[#2424]

Bypass delayed disable feature by implementing chip->disable and

chip->enable.

Remove use of local_irq_enable(), local_irq_disable() we might

erroneously re-enable interrupts.Diffstat

 

ints-priority.c |   15 +++++----------

1 files changed, 5 insertions(+), 10 deletions(-)

 

Modified Paths

branches/2008R1/arch/blackfin/mach-common/ints-priority.c

 

-Michael

QuoteReplyEditDelete

 

 

2008-04-02 04:37:08     Re: xenomai rtdm_irq_disable does nothing

Michael Hennerich (GERMANY)

Message: 53529    Are you seeing this with Core, System or GPIO IRQs?

 

-Michael

QuoteReplyEditDelete

 

 

2008-04-02 05:03:59     Re: xenomai rtdm_irq_disable does nothing

Filip Van Rillaer (BELGIUM)

Message: 53530   

 

Hello Michael,

 

I am using the DMA6 interrupt (sport1 TX) on the bf537.

 

Filip.

TranslateQuoteReplyEditDelete

 

 

2008-04-02 05:16:21     Re: xenomai rtdm_irq_disable does nothing

Michael Hennerich (GERMANY)

Message: 53531    ok - it's a System interrupt - so updating your tree will fix the problem.

 

-Michael

QuoteReplyEditDelete

 

 

2008-04-02 07:16:02     Re: xenomai rtdm_irq_disable does nothing

Filip Van Rillaer (BELGIUM)

Message: 53534   

 

Indeed, the problem is solved in the latest version (sorry for the delay : reversing the xenomai patch, upgrading the kernel, and then applying the latest version of the xenomai patch took some time on my slow machine).

 

Many thanks to everybody involved in this discussion.

 

Filip

TranslateQuoteReplyEditDelete

 

 

2009-02-05 12:45:55     Re: xenomai rtdm_irq_disable does nothing

Michael McTernan (UNITED KINGDOM)

Message: 68925   

 

> (sorry for the delay : reversing the xenomai patch, upgrading the kernel, and then applying the

> latest version of the xenomai patch took some time on my slow machine).

 

Does this mean you have a patch for the latest Xenomai (2.4.6.1) for the uClinux 2008R1branch?  If so could you post it please?

 

Regards,

 

Mike

Attachments

    Outcomes