| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 37 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 37 Page - STMicroelectronics |
|
37 / 245 page ![]() UM0851 Platform section Doc ID 16604 Rev 2 37/245 kernel stack of the process which was interrupted), reads LR and SPSR from a temporary IRQ stack and saves them on the SVC mode stack. It increments the preempt count and calls get_irqnr_and_base() to find out the IRQ line number. The SPEAr architecture provides the get_irqnr_and_base (arch/arm/mach- spearxxx/include/mach/entry-macro.S) function to query the interrupt controller to find out which IRQ line raised this interrupt. After this, __irq_svc() calls asm_do_IRQ() which in turn calls the IRQ handler (the interrupt handler that you registered through request_irq ( )) or a default IRQ handler registered by default during boot time. After the completion of these actions, the IRQ line for which the interrupt was raised is unmasked and do_level_irq() returns. After this interrupt handling is complete __irq_svc () restores the state of the interrupted process. So now the IRQ infrastructure is in place, and various modules can register their IRQ handlers through request_irq(). When you call request_irq( ), the kernel appends your IRQ handler to the list of all the IRQ handlers registered for that particular IRQ line. It does not change the exception vector table. As described above, the Linux implementation for interrupt handling is not a vectored approach, hence it does not utilize the vector interrupt capabilities provided by the VIC hardware. 3.2.5 VIC usage The current implementation in Linux does not allow the exploitation of the complete capabilities of the VIC. Within the current capabilities that have been added in the Linux, you can use the VIC in the following ways. If a driver needs to register a specific interrupt handler, the following call is provided by Linux: /*The following functions declared in <linux/interrupt.h> implement the interrupt registration interface and is use to register the interrupt handler.*/ int request_irq(unsigned int irq, irqreturn_t (*handler)( ), unsigned long flags, const char *dev_name, void *dev_id); /* The details of the above fields are as follow: irq: interrupt number being requested (*handler)(): pointer to the handler being installed in driver. flags: Options related to interrupt management. *dev_name: string passed here is used in /proc/interrupts to show the owner of interrupts *dev_id: Pointer used for shared interrupt lines */ /* The function below is use to unregister the interrupt handler. */ void free_irq(unsigned int irq, void *dev_id); To check for the interrupt sources being used in the system, type in the following command. $cat /proc/interrupts CPU0 16: 3903 spear-vic gp_timer 18: 0 spear-vic <NULL> 20: 0 spear-vic spear-jpeg |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |