From nobody Thu Sep 01 12:10:52 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MJKd8646yz4bRN8; Thu, 1 Sep 2022 12:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MJKd85f1Lz3w9n; Thu, 1 Sep 2022 12:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662034252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ux0fFTJgr+t5wX/cWYs5pWkvdbyiwnLOrv/V/Zr5k4w=; b=Y1GxyBfWFbdNsjDPFs/808KH7TOBiLQIJIoYOwT5AJgq0SJInX7kNQ2yuwVb4T3doSiGng 5ir7UiU/d5nxUjIpldfTww0Vk+RSj2ZL1MuGa9v9Bo0Y4fgOFV1EFV7uz0sFICZF1bGMuB skhjDj263obwAYoxxrU9SwdaSs1wO/EWgEroyGO3oGNlC/SpNxIduMT+Dymi5n+gg95ZIY m/qb8qMgzZaZllNPgnUGhRgn9xeAAqXYVZhCivRqd8r9MH4+kzNnljc/ygD4nhKMV3BtV6 qnYo01LtphULHPBOtuv+cfVFwCrNWWykNtUWdgy385K1TKxjVt926v9EPgdhgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MJKd84SFfzSfb; Thu, 1 Sep 2022 12:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 281CAqrM030856; Thu, 1 Sep 2022 12:10:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 281CAqBJ030855; Thu, 1 Sep 2022 12:10:52 GMT (envelope-from git) Date: Thu, 1 Sep 2022 12:10:52 GMT Message-Id: <202209011210.281CAqBJ030855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tijl Coosemans Subject: git: fdc1894795ef - main - linuxkpi: on i386 only use first_msi_irq if apic is in kernel config List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fdc1894795efb5c9d97044a724c01d149c569440 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662034252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ux0fFTJgr+t5wX/cWYs5pWkvdbyiwnLOrv/V/Zr5k4w=; b=RY2CjxrnFL9mtP6QuAYTUNmCn8+rg80KqO2DnqeiLR1frO7WeNewmfBkMAO9inQjf6CPOd BTeciKZg78tBBG6poDe9YE8bAbawv6MwKUnAk5S0WObBujeA38Uv2EaTLtXJTY/JbYXMm+ wNQhzIOqAANtyizolmlZWCqxqMIXO8rbDOoHrEdxKMNf4IA/ZxP612D0BHNrfSSKGhMFzv WSLgTZ4b6oRvbcyY+lFme4nByBIUj5MwYIkEoBX27ziBGw9PIN26TfkaiT/0TmnZ5HSibm kc5lPROTARj81W7rzT7k5GqdY9vHa4O1kF/hin8fq6YCeDlwmOqn0W+WH4+Apg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662034252; a=rsa-sha256; cv=none; b=nO44oJSUN2ya90EmLUSlgEt6nmdGpcKmsa55w9NzwqcEfU6twXKiSmDoo1/CaST8GMUPAD wh6A09SplnnNblhSN3f03LeqEXeRqT/kwpVp156aPYwWJcw2Yf44NNIymI0R+7r/cO9CVt IRTek/tM93hlyybFbJiFMkbqI/mM5JaLFWZmIqOuxu77Jk5hQPM9My7vV/pprUv9WxEHYn 5H4GU05E9wv4IYAafPY2ddnsEX4KkjklZc4cPt4DiR0+uGeaVESE+DFhVv2SqnRIvKqCfK O/wVRiu4KJCh+qcyNq6y++jUUIHFlkdOoKJxixdKnypHILrjTQ+UFF4wcH85Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tijl: URL: https://cgit.FreeBSD.org/src/commit/?id=fdc1894795efb5c9d97044a724c01d149c569440 commit fdc1894795efb5c9d97044a724c01d149c569440 Author: Tijl Coosemans AuthorDate: 2021-05-01 16:01:22 +0000 Commit: Tijl Coosemans CommitDate: 2022-09-01 12:08:15 +0000 linuxkpi: on i386 only use first_msi_irq if apic is in kernel config --- sys/compat/linuxkpi/common/src/linux_current.c | 10 ++++++++-- sys/modules/linuxkpi/Makefile | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_current.c b/sys/compat/linuxkpi/common/src/linux_current.c index 925d96770cc2..bfebbcb81d90 100644 --- a/sys/compat/linuxkpi/common/src/linux_current.c +++ b/sys/compat/linuxkpi/common/src/linux_current.c @@ -27,6 +27,12 @@ #include __FBSDID("$FreeBSD$"); +#ifdef __amd64__ +#define DEV_APIC +#elif defined(__i386__) +#include "opt_apic.h" +#endif + #include #include #include @@ -39,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include -#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. diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index 935584e39376..21663a078027 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -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}