revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-pc / kernel / allocirq.c
blob82198520d8fb9380be4f772426820ae8cb5409c5
1 /*
2 Copyright © 2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/kernel.h>
8 #include <kernel_base.h>
9 #include <kernel_debug.h>
11 #include <proto/kernel.h>
13 #define D(x)
15 AROS_LH2(ULONG, KrnAllocIRQ,
16 AROS_LHA(ULONG, irq_type, D0),
17 AROS_LHA(ULONG, count, D1),
18 struct KernelBase *, KernelBase, 38, Kernel)
20 AROS_LIBFUNC_INIT
22 struct PlatformData *pdata = KernelBase->kb_PlatformData;
23 ULONG irqID = (ULONG)-1;
25 D(bug("[KRN] KrnAllocIRQ(%08x):\n", irq_type));
27 if ((irq_type == IRQTYPE_MSI) && (pdata->kb_PDFlags & PLATFORMF_HAVEMSI))
29 D(bug("[KRN] KrnAllocIRQ: Attempting to allocate MSI Interrupt...\n"));
30 irqID = core_APIC_AllocMSI(count);
32 return irqID;
34 AROS_LIBFUNC_EXIT