2008-06-18 04:05:36     Is there any inter-processor interrupt (IPI)??

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

2008-06-18 04:05:36     Is there any inter-processor interrupt (IPI)??

Stephen Sheldon (GERMANY)

Message: 57461   

 

Hi,

 

I would like to interrupt Core A through Core B. Is there any inter-processor interrupt (IPI) or inter-core interrupt, which I can use for this. Or should I just use the software interrupts (SWI)?

 

I need this to implement a little cache coherency synchronization.

 

Best regards

 

Stephen Sheldon

TranslateQuoteReplyEditDelete

 

 

2008-06-18 04:57:27     Re: Is there any inter-processor interrupt (IPI)??

Mike Frysinger (UNITED STATES)

Message: 57503   

 

please read the HRM.  the only way to signal one core from the other is documented in chapter 3 (see SICB_SYSCR).

QuoteReplyEditDelete

 

 

2008-06-18 08:10:16     Re: Is there any inter-processor interrupt (IPI)??

Stephen Sheldon (GERMANY)

Message: 57518   

 

thanks for reply!

 

I think I ask my question wrong.

 

What I am trying to do is, that an application running on Core B should raise an interrupt. This interrupt should interrupt a running uClinux application on Core A, so that this uClinux application can do something after it gets the interrupt.

 

I think I should use an Software Interrupt for this, because with SICB_SYSCR I reset the Core and I only want to interrupt my application running on CoreA.

 

I also dont know how to detect the interrupt in my CoreA application. How can I enable the interrupts? And how do I write a interrupt handler in my uClinux application?

 

I read the doc http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:interrupts but it didn't help me. :-(

TranslateQuoteReplyEditDelete

 

 

2008-06-18 08:21:33     Re: Is there any inter-processor interrupt (IPI)??

Mike Frysinger (UNITED STATES)

Message: 57520   

 

SICB_SYSCR is the only method for interrupting the other core.  otherwise you will have to use a busy polling interface between the two programs.

QuoteReplyEditDelete

 

 

2008-06-18 08:51:14     Re: Is there any inter-processor interrupt (IPI)??

Stephen Sheldon (GERMANY)

Message: 57524   

 

Ok, thanks. I will try it with SICB_SYSCR.

 

But how do I write a interrupt handler? In the doc I found this:

 

__attribute__ ((interrupt_handler))

void my_irq_handler(void)

{

    /* do the stuff needed to handle the IRQ properly */

}

 

 

 

But how do this handler know on which interrupt it has to run? And don't I have to enable this interrupt first?

TranslateQuoteReplyEditDelete

 

 

2008-06-18 09:03:23     Re: Is there any inter-processor interrupt (IPI)??

Mike Frysinger (UNITED STATES)

Message: 57526   

 

since you're signaling Core A from Core B, you would write a normal Linux kernel interrupt handler to run on Core A

 

QuoteReplyEditDelete

 

 

2008-06-18 09:51:11     Re: Is there any inter-processor interrupt (IPI)??

Stephen Sheldon (GERMANY)

Message: 57527   

 

I'm starting to understand it. :-)

 

You wrote in the thread

http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&thread_id=23417&_forum_action=ForumMessageBrowse

that it is not possible to write an IRQ handler in userspace, it needs to be in kernel space.

 

I think I tried to write my IRQ handler in userspace.

TranslateQuoteReplyEditDelete

 

 

2008-06-18 10:19:54     Re: Is there any inter-processor interrupt (IPI)??

Mike Frysinger (UNITED STATES)

Message: 57528   

 

the code example you referred to would make sense if you wanted to create an interrupt handler that would run in your Core B application and if you wanted Core A to signal Core B ...

QuoteReplyEditDelete

 

 

2008-06-18 11:16:24     Re: Is there any inter-processor interrupt (IPI)??

Stephen Sheldon (GERMANY)

Message: 57529   

 

Ok. Now I am totaly confused. :-(

 

I think I have to learn some more basics to solve my problem.

 

Can you give me a little example how to use interrupts?

 

I need to know how I can:

- enable software interrupt

- set a software interrupt in an application running on uClinux.

- and "recieve" the software interrupt by an other application running on uClinux

(both appl. on same core)

 

 

 

Thanks for your perfect help. I know it isn't easy with me. But I am only a student, who is new on this kind of software development.

 

 

TranslateQuoteReplyEditDelete

 

 

2008-06-18 12:38:45     Re: Is there any inter-processor interrupt (IPI)??

Mike Frysinger (UNITED STATES)

Message: 57530   

 

the document you've seen shows how to use request_irq() to register an interrupt handler.  just give it IRQ_SUPPLE_0 or IRQ_SUPPLE_1 to bind to the interrupt of your choice.

 

as for raising any specific interrupt via software, that's not supported.

Attachments

    Outcomes