Add a method to determine whether given interrupt is per CPU or not.
MFC after: 2 weeks
This commit is contained in:
parent
da45ea6bc6
commit
eb20867f52
@ -946,6 +946,21 @@ intr_resolve_irq(device_t dev, intptr_t xref, struct intr_map_data *data,
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
intr_is_per_cpu(struct resource *res)
|
||||
{
|
||||
u_int res_id;
|
||||
struct intr_irqsrc *isrc;
|
||||
|
||||
res_id = (u_int)rman_get_start(res);
|
||||
isrc = intr_map_get_isrc(res_id);
|
||||
|
||||
if (isrc == NULL)
|
||||
panic("Attempt to get isrc for non-active resource id: %u\n",
|
||||
res_id);
|
||||
return ((isrc->isrc_flags & INTR_ISRCF_PPI) != 0);
|
||||
}
|
||||
|
||||
int
|
||||
intr_activate_irq(device_t dev, struct resource *res)
|
||||
{
|
||||
|
@ -115,6 +115,7 @@ int intr_pic_deregister(device_t, intptr_t);
|
||||
int intr_pic_claim_root(device_t, intptr_t, intr_irq_filter_t *, void *, u_int);
|
||||
struct intr_pic *intr_pic_add_handler(device_t, struct intr_pic *,
|
||||
intr_child_irq_filter_t *, void *, uintptr_t, uintptr_t);
|
||||
bool intr_is_per_cpu(struct resource *);
|
||||
|
||||
extern device_t intr_irq_root_dev;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user