title: Inter processor Interrrupts in ARM cortex A9 ( How To write an handler for Software generated Interrupt ( ARM) in Linux? )
body: <p>I read that the Software generated interrupts in ARM are used as Inter-processor interrupts. I can also see that 5 of those interrupts are already in use. I also know that ARM provides 16 Software generated interrupts.</p>
  <p>In my application i am running a bare metal application on of the ARM-cortex cores and Linux on the other. I want to communicate some data from the core running bare metal application to the core which is running Linux. I plan to copy the data to the on chip memory ( which is shared) and I will trigger a SGI on the Core ( running linux) to indicate some data is available for it to process. Now I am able to generate the SGI from the core ( running bare-metal application ). But for handling the interrupt in the linux side, I am not sure of the SGI IRQ numbers which are free and I am also not sure whether i can use the IRQ number directly ( in general SGI are from 0-15). Does any one have an idea how to write a handler for SGI in Linux?</p>
  <p><strong>Edit:</strong>  This is a re-wording of the above text, because the question was closed for <a href="http://sscce.org/" rel="nofollow noreferrer">SSCE reasons</a>.  The Cortex-A CPUs are used in multi-CPU systems.  An ARM <em>generic interrupt controller</em> (GIC) monitors all global interrupts and dispatches them to a particular CPU.  In order for individual CPUs to signal each other, a <em>software generated interrupt</em> (SGI) is sent from one core to the other; this uses <em>peripheral private interrupts</em> (PPI).  This question is,</p>
  <blockquote>
  <p><strong>How to implement a Linux kernel driver that can receive an SGI as a PPI?</strong></p>
  </blockquote>