From nobody Mon Apr 6 00:12:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F5CCC6FA82 for ; Tue, 13 Sep 2022 09:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbiIMJGj (ORCPT ); Tue, 13 Sep 2022 05:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231319AbiIMJGd (ORCPT ); Tue, 13 Sep 2022 05:06:33 -0400 Received: from us-smtp-delivery-115.mimecast.com (us-smtp-delivery-115.mimecast.com [170.10.133.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A601D55095 for ; Tue, 13 Sep 2022 02:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maxlinear.com; s=selector; t=1663059990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mTAKWZxrTR4aLotQeR306wv06XVq5Q1W4FyW8YJ7oiU=; b=SoSzNACoWlcQYTS44NAj5ZfdG8zlNx1kC46r2aEJGlt5X+yQYD3ILTX59RYKfTDdj8XmfY gmt0A6Zrtml0Ik/hTwTej0tc2I5zVzltyBpS/f6Rk4gjLUVtkU5g2SX2lu5qDEpvrR4uK1 RjLee9i5wfiBG0gJOAXXZnvT8/JDOzA9vsDIrThi/fZa/yNIo5HTnd3tlsbA/WgEg73Z3X PKnkP/7AAm3NIcyU8dDRGCXRP/LXGgoVCc0gow/KMJ5RCDp9qwaBm9p9cme6S5o0JhJQ4V i/qHKa2dopXAARy3cIb3OX1Xe+BaSTES6T9HTTmJ+05jCgeX5VZ4Re7gB9pPhQ== Received: from mail.maxlinear.com (174-47-1-83.static.ctl.one [174.47.1.83]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id us-mta-608-xsSsPUECPFOa3iDlInHszw-1; Tue, 13 Sep 2022 05:06:28 -0400 X-MC-Unique: xsSsPUECPFOa3iDlInHszw-1 Received: from sgsxdev001.isng.phoenix.local (10.226.81.111) by mail.maxlinear.com (10.23.38.120) with Microsoft SMTP Server id 15.1.2375.24; Tue, 13 Sep 2022 02:06:24 -0700 From: Rahul Tanwar To: , , , , CC: , , , Rahul Tanwar Subject: [PATCH] x86/devicetree: Add support for boot time interrupt mode config Date: Tue, 13 Sep 2022 17:06:20 +0800 Message-ID: <20220913090620.9193-1-rtanwar@maxlinear.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: maxlinear.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Presently, init/boot time interrupt delivery mode is enumerated only for ACPI enabled systems by parsing MADT table or for older systems by parsing MP table. But for OF based x86 systems, it is assumed & fixed to legacy PIC mode. Add support for configuration of init time interrupt delivery mode for x86 OF based systems by introducing a new boolean property 'intel,no-imcr' for interrupt-controller node of local APIC. This property emulates IMCRP Bit 7 of MP feature info byte 2 of MP floating pointer structure. Defaults to legacy PIC mode if absent. Configures it to virtual wire compatibility mode if present. Signed-off-by: Rahul Tanwar --- arch/x86/kernel/devicetree.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 5cd51f25f446..de14015317f8 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -167,7 +167,15 @@ static void __init dtb_lapic_setup(void) return; } smp_found_config =3D 1; - pic_mode =3D 1; + if (of_property_read_bool(dn, "intel,no-imcr")) { + pr_info(" Virtual Wire compatibility mode.\n"); + pic_mode =3D 0; + } + else { + pr_info(" IMCR and PIC compatibility mode.\n"); + pic_mode =3D 1; + } + register_lapic_address(lapic_addr); } =20 --=20 2.17.1