Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp579620lqi; Thu, 7 Mar 2024 06:07:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUE2fprCDsOemZD8awlJv5jJHB3LPPJLf5/73LMJTrSND6FOzRSK4nBVwO8PvUbTk9uIJMlMHrbR2171mRXEIBNhWOwCdmYBvlmTleJ5w== X-Google-Smtp-Source: AGHT+IE2RGIFD2zpcf0oxKEJnX9QyxS7vnnxJyS1gVF4gxs812utlZap76ZQX3JEnI0jbeU9n/P8 X-Received: by 2002:a17:906:aac8:b0:a3f:9f38:ded with SMTP id kt8-20020a170906aac800b00a3f9f380dedmr11239907ejb.69.1709820467366; Thu, 07 Mar 2024 06:07:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709820467; cv=pass; d=google.com; s=arc-20160816; b=aVJ7vgtoM5yqRXucWr8QrgcQ3B2bjpX+eOjwZHF1It6dfyIwtbATYbydrhxOhYWh5o oRZKcCxztfYqRiQgXvpkpNvcgP6C2u1CWweItCzN31GU30LUQshBcLoTIVidJLf2VEQz zDujQXMjgiJiwcWqgShk6+JHUEuk6tCt6gceKoA+PbheT7wsHZXs0uruTTfUphAdSL7H II+QvxvebKkw7oqgxQifz2vODdoK7XMkf9K/ZmiIuywyLdjkWfXDsxFMG4f/HPfVk67n IzoC7yDsk4NImUzkFa3bIk/xob8NWHLvTp2REG2TP2h+eJ+st+BFwMGDAV3ycABzFrRi AVfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=bXQhty/Vyck05wXdG6JUux2IncsI0SyiBJ/oYjZfwkc=; fh=o/yAatpoA6f1IrRj4gFDU/2mIH2H5m8wzzCq9Qj+9lY=; b=V/eqpP4+rj2WPK/pe8mRzOL3xkPtCLaIxB2AODsu1MWg/4C9jeKUjRhiAi851q+StV aYBihma51FQcL5D9QTe0ThkDcS+F18tO+u184q1yD8Ha3m2uzMKJzYjEe66OdojTYlZk +YVZGLMOKv+Y7MV+JN+dZGPdulT95RliswT4fYKJEJRIXVSRPFSSKr99iFXZ+MNK8GSj gT8VsAdLPQQC1ZDBA3/sxyzkJMmggnNtOubxAd7AlJY8w5iyJdJIMbLkJZdud73aay1L Nyv7su0zfnsRvXozMzsem/RqIyhxpn6tDap9QtvEimuHkHueCbDRpggMXZQQ39WGYvIh kg+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L92Thyse; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-95692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gt31-20020a1709072d9f00b00a45d21fac64si506013ejc.738.2024.03.07.06.07.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 06:07:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L92Thyse; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-95692-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1D2D71F24D6D for ; Thu, 7 Mar 2024 14:07:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A62412D774; Thu, 7 Mar 2024 14:05:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L92Thyse" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A10D712D779; Thu, 7 Mar 2024 14:05:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709820354; cv=none; b=qRm6jKiLCpfF4j9Yu/eIHXUOjmT/9enuWgGPbcaFldSyo/Niw/mh6Dfd+Ga3JEJuhsU1AycZNwTCx60HIS9m8RsZJEz5+FIzHP+1q5OYIXbxRu7ndlzG2BjQeUv6LhzA4K5PkiwCKEtWRA+Muwti+bfcau6LU53HRekXMDvUy3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709820354; c=relaxed/simple; bh=QmvXP9Hu5nQMu8timRycLMV4yMHoH9xYQ1ojjxc7l1A=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=AfiwMH3dI+xOp73ITAZIHlfd/4YCo/UuUVDyz2RcRublH5QDC51mEmWIQfTjX5y6Vt5fXrl92vrv1PGMjuwb0D1AjH7F8yddwtUS6nV9vxhm4RmGqMDRXIkeKidsQ10noY/LdAacFWOpEaCEz8nEu2EI+4Em4Bz9xNTwJ24V/g8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L92Thyse; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42183C433C7; Thu, 7 Mar 2024 14:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709820354; bh=QmvXP9Hu5nQMu8timRycLMV4yMHoH9xYQ1ojjxc7l1A=; h=From:To:Cc:Subject:Date:From; b=L92ThysecXPrRaTl+8PMNg6Y3rkUPTupoHok7Cvv28fFRlpeIbAFQ7tD6GMEaH7JM 9pY2yWdLxPv9GQySFPJcjGo8oqjwAuzwrQMlpHbZWjGNjGV8rlK7VGbjDp2G61lwCo UYYI0pP4PaPe3ZeAvu134qePEIffPnGxQlCzUthWIumNhsHFEbqsCA3phrMHODR94l B9wFf+/kZdV+WeFIHbWHq5pH2GOaQiUfRCglCU6D907fYkxojXfA6iROv/XCoFysRl lnH/Ck0ijnFDRkmOKb68pLEJQs4Ez9BlsgFbLJHgdLV9Rce+R8aVUvPnzJrrpoy9mK O6rrTjPXllfbA== From: Arnd Bergmann To: Joerg Roedel , Will Deacon Cc: Arnd Bergmann , Robin Murphy , Jason Gunthorpe , Kevin Tian , Lu Baolu , Ard Biesheuvel , Ingo Molnar , Suresh Siddha , Dan Carpenter , Ethan Zhao , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: always select INTEL_IOMMU for IRQ_REMAP Date: Thu, 7 Mar 2024 15:05:15 +0100 Message-Id: <20240307140547.2201713-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann CONFIG_INTR_REMAP was originally split out of the intel iommu code to be shared by IRQ_REMAP. This recently broke again because the IRQ_REMAP code calls the global device_rbtree_find() function that is unavailable for builds without INTEL_IOMMU: x86_64-linux-ld: vmlinux.o: in function `qi_submit_sync': (.text+0x10771e0): undefined reference to `device_rbtree_find' It seems that the intel iommu code now contains a lot of generic helper functions that are not specific to intel, such as alloc_pgtable_page(), iommu_flush_write_buffer(), domain_attach_iommu() etc, so presumably it is not x86 specific any more. Fix the build failure for now by just selectin INTEL_IOMMU by the code that relies on it. It might be helpful to split out all the functions without an intel_iommu_* prefix into a helper library to avoid including the x86 specific bits on non-x86, but that could be a follow-up. Fixes: d3f138106b4b ("iommu: Rename the DMAR and INTR_REMAP config options") Fixes: 80a9b50c0b9e ("iommu/vt-d: Improve ITE fault handling if target device isn't present") Signed-off-by: Arnd Bergmann --- Not sure about this one, I just ran across the build regression and wasn't sure if the intel-iommu functions are meant to be generic or just misnamed. The patch description assumes the former, if that is wrong, it needs a different explanation or a different fix. --- drivers/iommu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index df156f0a1a17..da5339bdb7e7 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -196,6 +196,7 @@ config IRQ_REMAP bool "Support for Interrupt Remapping" depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI select DMAR_TABLE + select INTEL_IOMMU help Supports Interrupt remapping for IO-APIC and MSI devices. To use x2apic mode in the CPU's which support x2APIC enhancements or -- 2.39.2