linuxkpi: on i386 only use first_msi_irq if apic is in kernel config

This commit is contained in:
Tijl Coosemans 2021-05-01 18:01:22 +02:00
parent 598b6d4a7c
commit fdc1894795
2 changed files with 12 additions and 2 deletions

View File

@ -27,6 +27,12 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#ifdef __amd64__
#define DEV_APIC
#elif defined(__i386__)
#include "opt_apic.h"
#endif
#include <linux/compat.h>
#include <linux/completion.h>
#include <linux/mm.h>
@ -39,7 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <vm/uma.h>
#if defined(__i386__) || defined(__amd64__)
#ifdef DEV_APIC
extern u_int first_msi_irq, num_msi_irqs;
#endif
@ -274,7 +280,7 @@ linux_current_init(void *arg __unused)
TUNABLE_INT_FETCH("compat.linuxkpi.task_struct_reserve",
&lkpi_task_resrv);
if (lkpi_task_resrv == 0) {
#if defined(__i386__) || defined(__amd64__)
#ifdef DEV_APIC
/*
* Number of interrupt threads plus per-cpu callout
* SWI threads.

View File

@ -38,6 +38,10 @@ SRCS= linux_compat.c \
SRCS+= opt_acpi.h acpi_if.h linux_acpi.c
.endif
.if ${MACHINE_CPUARCH} == "i386"
SRCS+= opt_apic.h
.endif
SRCS+= opt_ddb.h
SRCS+= ${LINUXKPI_GENSRCS}