/* * Driver for ePAPR Embedded Hypervisor PIC * * Copyright 2008-2011 Freescale Semiconductor, Inc. * * Author: Ashish Kalra <ashish.kalra@freescale.com> * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied.
*/
/* * TODO : Add specific interface call for platform to set * individual interrupt priorities. * platform currently using static/default priority for all ints
*/
/* Return an interrupt vector or 0 if no interrupt is pending. */ unsignedint ehv_pic_get_irq(void)
{ int irq;
BUG_ON(global_ehv_pic == NULL);
if (global_ehv_pic->coreint_flag)
irq = mfspr(SPRN_EPR); /* if core int mode */ else
ev_int_iack(0, &irq); /* legacy mode */
if (irq == 0xFFFF) /* 0xFFFF --> no irq is pending */ return 0;
/* * this will also setup revmap[] in the slow path for the first * time, next calls will always use fast path by indexing revmap
*/ return irq_find_mapping(global_ehv_pic->irqhost, irq);
}
if (mpic_percpu_base_vaddr) if (hwirq_intspec[hw] & IRQ_TYPE_MPIC_DIRECT)
chip = &ehv_pic_direct_eoi_irq_chip;
irq_set_chip_data(virq, chip); /* * using handle_fasteoi_irq as our irq handler, this will * only call the eoi callback and suitable for the MPIC * controller which set ISR/IPR automatically and clear the * highest priority active interrupt in ISR/IPR when we do * a specific eoi
*/
irq_set_chip_and_handler(virq, chip, handle_fasteoi_irq);
/* Set default irq type */
irq_set_irq_type(virq, IRQ_TYPE_NONE);
{ /* * interrupt sense values coming from the guest device tree * interrupt specifiers can have four possible sense and * level encoding information and they need to * be translated between firmware type & linux type.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.