From patchwork Wed Jul 24 05:46:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13740609 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56891C3DA61 for ; Wed, 24 Jul 2024 05:47:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=oZWVs29Lgs3X3ImmUMcrPbAp2f+g1FU/tnO6n4efa/4=; b=ETw9imaKInbt8AD4ZhxP+FwHtr qtTtZ1hO8jg8Wt2ix/qSZcESm7x0DINV+yzvwcuPUx4Gx+tER3eoQrgSWNxvoZCg5m1Li9zixcnmJ kZiBI8h1F29Z86lqGMkYMbw07W9B0LYE8dmQU6HJ1KN/SUJdOPntY7WWbe5A34Kc8YN/M5ByKCpcp vZNvo7f/NmrUt+X7NpMsCVg+5FUllPiI5KIfMgYqQFj/SN5bEIfVHVuwRfwAzwgezfEok21WjcVAZ S+D70WRI9+Id9qZ5LXVQbEHo9QkN1v5pX4DUBkNZ/AHJ1XoU/aslvyGpqiXPSu8fmuTcpqcKQpZJq 6gB1Vn0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWUq2-0000000ERX6-40D1; Wed, 24 Jul 2024 05:46:58 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWUpd-0000000ERRJ-3uB8 for linux-arm-kernel@lists.infradead.org; Wed, 24 Jul 2024 05:46:35 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 65DEF106F; Tue, 23 Jul 2024 22:46:57 -0700 (PDT) Received: from a077893.arm.com (unknown [10.163.54.139]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id ECDA13F5A1; Tue, 23 Jul 2024 22:46:28 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Marc Zyngier , Thomas Gleixner , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org Subject: [PATCH] irqchip: Replace compared GIC version with ID_AA64PFR0_EL1_GIC_V4P1 Date: Wed, 24 Jul 2024 11:16:23 +0530 Message-Id: <20240724054623.667595-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240723_224634_035029_EC7F9BDD X-CRM114-Status: GOOD ( 10.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace open encoding for GIC version code with ID_AA64PFR0_EL1_GIC_V4P1 in gic_cpuif_has_vsgi(). Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Acked-by: Marc Zyngier Reviewed-by: Zenghui Yu --- Applies after the following patch that fixes the given field in tools sysreg. https://lore.kernel.org/all/20240718215532.616447-1-rananta@google.com/ drivers/irqchip/irq-gic-v4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-v4.c b/drivers/irqchip/irq-gic-v4.c index ca32ac19d284..58c28895f8c4 100644 --- a/drivers/irqchip/irq-gic-v4.c +++ b/drivers/irqchip/irq-gic-v4.c @@ -97,7 +97,7 @@ bool gic_cpuif_has_vsgi(void) fld = cpuid_feature_extract_unsigned_field(reg, ID_AA64PFR0_EL1_GIC_SHIFT); - return fld >= 0x3; + return fld >= ID_AA64PFR0_EL1_GIC_V4P1; } #else bool gic_cpuif_has_vsgi(void)