/* * MPIC flags (passed to mpic_alloc) * * The top 4 bits contain an MPIC bhw id that is used to index the * register offsets and some masks when CONFIG_MPIC_WEIRD is set. * Note setting any ID (leaving those bits to 0) means standard MPIC
*/
/* * This is a secondary ("chained") controller; it only uses the CPU0 * registers. Primary controllers have IPIs and affinity control.
*/ #define MPIC_SECONDARY 0x00000001
/* Set this for a big-endian MPIC */ #define MPIC_BIG_ENDIAN 0x00000002 /* Broken U3 MPIC */ #define MPIC_U3_HT_IRQS 0x00000004 /* Broken IPI registers (autodetected) */ #define MPIC_BROKEN_IPI 0x00000008 /* Spurious vector requires EOI */ #define MPIC_SPV_EOI 0x00000020 /* No passthrough disable */ #define MPIC_NO_PTHROU_DIS 0x00000040 /* DCR based MPIC */ #define MPIC_USES_DCR 0x00000080 /* MPIC has 11-bit vector fields (or larger) */ #define MPIC_LARGE_VECTORS 0x00000100 /* Enable delivery of prio 15 interrupts as MCK instead of EE */ #define MPIC_ENABLE_MCK 0x00000200 /* Disable bias among target selection, spread interrupts evenly */ #define MPIC_NO_BIAS 0x00000400 /* Destination only supports a single CPU at a time */ #define MPIC_SINGLE_DEST_CPU 0x00001000 /* Enable CoreInt delivery of interrupts */ #define MPIC_ENABLE_COREINT 0x00002000 /* Do not reset the MPIC during initialization */ #define MPIC_NO_RESET 0x00004000 /* Freescale MPIC (compatible includes "fsl,mpic") */ #define MPIC_FSL 0x00008000 /* Freescale MPIC supports EIMR (error interrupt mask register). * This flag is set for MPIC version >= 4.1 (version determined * from the BRR1 register).
*/ #define MPIC_FSL_HAS_EIMR 0x00010000
/* Get the version of primary MPIC */ #ifdef CONFIG_MPIC extern u32 fsl_mpic_primary_get_version(void); #else staticinline u32 fsl_mpic_primary_get_version(void)
{ return 0;
} #endif
/* Allocate the controller structure and setup the linux irq descs * for the range if interrupts passed in. No HW initialization is * actually performed. * * @phys_addr: physial base address of the MPIC * @flags: flags, see constants above * @isu_size: number of interrupts in an ISU. Use 0 to use a * standard ISU-less setup (aka powermac) * @irq_offset: first irq number to assign to this mpic * @irq_count: number of irqs to use with this mpic IRQ sources. Pass 0 * to match the number of sources * @ipi_offset: first irq number to assign to this mpic IPI sources, * used only on primary mpic * @senses: array of sense values * @senses_num: number of entries in the array * * Note about the sense array. If none is passed, all interrupts are * setup to be level negative unless MPIC_U3_HT_IRQS is set in which * case they are edge positive (and the array is ignored anyway). * The values in the array start at the first source of the MPIC, * that is senses[0] correspond to linux irq "irq_offset".
*/ externstruct mpic *mpic_alloc(struct device_node *node,
phys_addr_t phys_addr, unsignedint flags, unsignedint isu_size, unsignedint irq_count, constchar *name);
/* Assign ISUs, to call before mpic_init() * * @mpic: controller structure as returned by mpic_alloc() * @isu_num: ISU number * @phys_addr: physical address of the ISU
*/ externvoid mpic_assign_isu(struct mpic *mpic, unsignedint isu_num,
phys_addr_t phys_addr);
/* Initialize the controller. After this has been called, none of the above * should be called again for this mpic
*/ externvoid mpic_init(struct mpic *mpic);
/* * All of the following functions must only be used after the * ISUs have been assigned and the controller fully initialized * with mpic_init()
*/
/* Change the priority of an interrupt. Default is 8 for irqs and * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the * IPI number is then the offset'ed (linux irq number mapped to the IPI)
*/ externvoid mpic_irq_set_priority(unsignedint irq, unsignedint pri);
/* Setup a non-boot CPU */ externvoid mpic_setup_this_cpu(void);
/* Clean up for kexec (or cpu offline or ...) */ externvoid mpic_teardown_this_cpu(int secondary);
/* Get the current cpu priority for this cpu (0..15) */ externint mpic_cpu_get_priority(void);
/* Set the current cpu priority for this cpu */ externvoid mpic_cpu_set_priority(int prio);
/* Request IPIs on primary mpic */ void __init mpic_request_ipis(void);
/* Send a message (IPI) to a given target (cpu number or MSG_*) */ void smp_mpic_message_pass(int target, int msg);
/* Unmask a specific virq */ externvoid mpic_unmask_irq(struct irq_data *d); /* Mask a specific virq */ externvoid mpic_mask_irq(struct irq_data *d); /* EOI a specific virq */ externvoid mpic_end_irq(struct irq_data *d);
/* Fetch interrupt from a given mpic */ externunsignedint mpic_get_one_irq(struct mpic *mpic); /* This one gets from the primary mpic */ externunsignedint mpic_get_irq(void); /* This one gets from the primary mpic via CoreInt*/ externunsignedint mpic_get_coreint_irq(void); /* Fetch Machine Check interrupt from primary mpic */ externunsignedint mpic_get_mcirq(void);
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.