Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1339203rdb; Fri, 16 Feb 2024 12:25:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVmD6U3h8V5wQLVZDEgricE3MnWMu8r7UXhyx4EeqAIJpu51fD1wMzYEfVQx6Kfl9E3AhxGMnAwhAFQy/wl0G5hHWTzoC7jPMIIrdBZ8g== X-Google-Smtp-Source: AGHT+IHagTNhUa36lt46bhtJfmDkM8hvglEkUzG2Bk8aZkuT+AdAC1jmnKH7qN2rHDlRuOZO9AoS X-Received: by 2002:a05:6a00:26d4:b0:6e0:f47b:a5e1 with SMTP id p20-20020a056a0026d400b006e0f47ba5e1mr5389176pfw.20.1708115153765; Fri, 16 Feb 2024 12:25:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708115153; cv=pass; d=google.com; s=arc-20160816; b=kMTuwjOzKIYAQvlQwmFK6aEi6rNWsEQPe8+dV8RD9OvdNciTnWOtEB6AB9e9jaB9TQ NvPDRgC6svccjc8c57CR/AfaATiPqeuk/PtqpHQNjaadQhWx4X0GOJsNqJzvOrLACNGw QQDtyo7lKnpMyBto2U5lIzNPYv9gN5M1/6Z4+VHkLI7r71G4RhdSnGAN4IfrMgGBwcit 5h+eGGKA58qS+LJAyfzOR2Dyievd9Fw86mVQr6HoIPYxz4YCJKStRY4lFsHWMicODTlY 3sqClHPKatfl/6puXLR5+zy4a/uMComsRCCaZNh1wZX7GKoTsTPpVOh7Sg+rNLCQXWZE 8AHA== 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=Es1Zfpnot7t8dYpKyO5gVL1oLAd05L/DxJA2k+A5vT4=; fh=D+pJfjAH0KjH3m2NOUjICL42eShPqIOrEBw/UMHDQJE=; b=DL1Nfc6fChy1pdAwArOi+HGrP1YuwNP/DrlYKnWyJ/T8akG1aPmkSiB0Olh9xL2niP JW5utWdDHdiiPs8kOsdP5S4B57qLdi2kFNYC8JuhzFci1HWfCXGyFRbti0HBtcMuocM5 cASHzfgeTGos3y6DfpDlk9ydBiCSRUK3GDIQZYAo04VLeUiglSDzFtf/yvY8jCYRxATh FLH6M3T1gZsDvXghhM/0noNY5Hx33Kpl5pM6HiyH7QOJeHalEPxLrZje3v2aJ9sKiuT5 KyZPmaVOitbuqeOn8+x8zuD/lNHqgdmtShha4r/cu/IW/urPGqXFhOmwFvFa132bBXye Jkug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MnNmhh1/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q26-20020a65685a000000b005ce7efd2eb5si357321pgt.266.2024.02.16.12.25.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 12:25:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MnNmhh1/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69293-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 12213B20F60 for ; Fri, 16 Feb 2024 20:25:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70336139573; Fri, 16 Feb 2024 20:25:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MnNmhh1/" 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 97E4444369 for ; Fri, 16 Feb 2024 20:25:32 +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=1708115132; cv=none; b=rkTRFNBVvYdnUUC9jpFg40wUBsQ3H0mWntr79CW51FTI0yMuqKp7QHjsESDDoSdjVLbDMLHNiAv50oY+NlZNTEFLB665MlQLLt8k6C0n4NGQ8m+tQnTeNzddtmyKmFI7IVJlnp4AMZoTsclkQOPHLflAQwLTDPGFuEVs8j/Scvk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708115132; c=relaxed/simple; bh=5m10hyFOE1LGB3w8Av1dfB/+tfaDWVKf5u7u9AlK1ok=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ufktK4UQ4RGbVzd0rjIp2II5K1C8DPNuh4kikOXdCeQI610bqOmmwsmyAitAqUQlrgy8FEtk8fmy20sWeuZOHhXOxyZbsmMvcJDkkFcT/7kq8Bb3VJrnGld2v2PDYF/yw+UX5cuN0n3HK8iDYGbfu9MsaoPz6lGmBqw1ACvpTsI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MnNmhh1/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CED9FC433C7; Fri, 16 Feb 2024 20:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708115132; bh=5m10hyFOE1LGB3w8Av1dfB/+tfaDWVKf5u7u9AlK1ok=; h=From:To:Cc:Subject:Date:From; b=MnNmhh1//5twLjJEkyCnIDz9Um/b2GOKFtnqMuxk9ERPUcI+pUQonhRu/Sh64ion7 sHPrqpdy0NNwF/cXo0KoOA/F23NVdadthL6IggofQ7flgncidAB2XgP4ZXxYqcMepR yhN5JTA1vHapW/9vg3GvLxM+oN3klxnxBUqO73GNWtv3AaKMxAE4baeP/3IzHMtPXy IP+23WhEuOoK2Xa/o6Ey3/YuaqhSDJ33oCafVJ+FBd7S0dZLN89EAUro38Qq3rBKlJ eVmpRP7nGNwuXiGyQq99Ll5PyVHO0j13tNsO00DsO08z/gAJ+uD5FoTf3kU2DecEol cwqBHuKGaPq+w== From: Arnd Bergmann To: Xin Li , "H. Peter Anvin" Cc: Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86/fred: fix building without CONFIG_KVM Date: Fri, 16 Feb 2024 21:25:14 +0100 Message-Id: <20240216202527.2493264-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 Some constants are only defined if KVM is enabled: arch/x86/entry/entry_fred.c:117:9: error: use of undeclared identifier 'POSTED_INTR_VECTOR' 117 | SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi), | ^ arch/x86/entry/entry_fred.c:118:9: error: use of undeclared identifier 'POSTED_INTR_WAKEUP_VECTOR' 118 | SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi), | ^ arch/x86/entry/entry_fred.c:119:9: error: use of undeclared identifier 'POSTED_INTR_NESTED_VECTOR' 119 | SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi), | ^ Hiding the references behind the same preprocessor conditional is probably the best fix here. Fixes: 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code") Signed-off-by: Arnd Bergmann --- arch/x86/entry/entry_fred.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c index ac120cbdaaf2..660b7f7f9a79 100644 --- a/arch/x86/entry/entry_fred.c +++ b/arch/x86/entry/entry_fred.c @@ -114,9 +114,11 @@ static idtentry_t sysvec_table[NR_SYSTEM_VECTORS] __ro_after_init = { SYSVEC(IRQ_WORK_VECTOR, irq_work), +#if IS_ENABLED(CONFIG_KVM) SYSVEC(POSTED_INTR_VECTOR, kvm_posted_intr_ipi), SYSVEC(POSTED_INTR_WAKEUP_VECTOR, kvm_posted_intr_wakeup_ipi), SYSVEC(POSTED_INTR_NESTED_VECTOR, kvm_posted_intr_nested_ipi), +#endif }; static bool fred_setup_done __initdata; -- 2.39.2