Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3277821imm; Fri, 25 May 2018 02:57:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq/VzXT7TQbxDvLEdERaIm/5lvStQfUWrqo0ThMIh4GHIBSgYx1A1nwveDWP8UPXS0bn30F X-Received: by 2002:a62:d352:: with SMTP id q79-v6mr1859255pfg.45.1527242272767; Fri, 25 May 2018 02:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527242272; cv=none; d=google.com; s=arc-20160816; b=dlSi+w1+FRI/uENFehz7KGdpGbq9sPraSnQim9eSRqpr3ZQQAdC9N4SLA+f4Z+RjoP y/JF9DZNhNIlCctzQ4VwPwBMxhS6fOjAtdtKneSPL8CtbJhUtc/d5OuH7UlwIxwll01C PeR8LUHjERf40QakqZbxYReHWF177GH/phaH/mNGw9PNaPu5WwqFyqZkRXBtNQv5/2Ar BPlUWq56r9gp5xfDuwKxz06z5hs+DRUv5lLa4q523H1urBNgpx0794P7upGPEKBIEb5H RguEcGgep4Qu2cBUDBy+qbxXnZgy0wtA8tDOrcenlshtbZpkLqCFLkbNkHOYLtHy+C1+ feFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=p6/XzjA6uII3TI5PqETaCxbTCvUBfAIGj8MEpeNAteQ=; b=u+4OJe/OSztV9zP4xpD31nmLDXOtBEa60aMK0aYu4hBCB2BsAJ+LbYi3+/1VbK6T2J tvg4AfPi0YKCq2ek+zE1gwLGS5FqdyfjaOtL9BD8BClQvJn7JHpwxSd2TtgXOvt4xz5h E0yAS1NI+fqORVZvIorA+lcBlKZAsZAJvzOP7fxWS5V7iA6jQ9Coipfga7oDJAF82KI0 ZM6ALGj8MOj+uqJtBXfPIgMKSJyu6fPSXe1LYoJXbYXAcvbybg0Tgja2g1BO9lIGTLqm HLFeA/rijbHLA/iFNQFy2Nn0Ek45aMiZsAmgQUlqzENBCe/yX41ZjrxhBXHWWEuObDnj 0zYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si25224095pli.324.2018.05.25.02.57.38; Fri, 25 May 2018 02:57:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965858AbeEYJuG (ORCPT + 99 others); Fri, 25 May 2018 05:50:06 -0400 Received: from foss.arm.com ([217.140.101.70]:57412 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965829AbeEYJuA (ORCPT ); Fri, 25 May 2018 05:50:00 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AE1F61688; Fri, 25 May 2018 02:50:00 -0700 (PDT) Received: from e112298-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7EB473F25D; Fri, 25 May 2018 02:49:58 -0700 (PDT) From: Julien Thierry To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, daniel.thompson@linaro.org, joel@joelfernandes.org, marc.zyngier@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, james.morse@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, Julien Thierry , Suzuki K Poulose Subject: [PATCH v4 02/26] arm64: cpufeature: Add cpufeature for IRQ priority masking Date: Fri, 25 May 2018 10:49:08 +0100 Message-Id: <1527241772-48007-3-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1527241772-48007-1-git-send-email-julien.thierry@arm.com> References: <1527241772-48007-1-git-send-email-julien.thierry@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a cpufeature indicating whether a cpu supports masking interrupts by priority. Signed-off-by: Julien Thierry Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Suzuki K Poulose --- arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/kernel/cpufeature.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h index bc51b72..cd8f9ed 100644 --- a/arch/arm64/include/asm/cpucaps.h +++ b/arch/arm64/include/asm/cpucaps.h @@ -48,7 +48,8 @@ #define ARM64_HAS_CACHE_IDC 27 #define ARM64_HAS_CACHE_DIC 28 #define ARM64_HW_DBM 29 +#define ARM64_HAS_IRQ_PRIO_MASKING 30 -#define ARM64_NCAPS 30 +#define ARM64_NCAPS 31 #endif /* __ASM_CPUCAPS_H */ diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index e03e897..a177104 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1202,6 +1202,21 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused) .cpu_enable = cpu_enable_hw_dbm, }, #endif +#ifdef CONFIG_USE_ICC_SYSREGS_FOR_IRQFLAGS + { + /* + * Depends on having GICv3 + */ + .desc = "IRQ priority masking", + .capability = ARM64_HAS_IRQ_PRIO_MASKING, + .type = ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE, + .matches = has_useable_gicv3_cpuif, + .sys_reg = SYS_ID_AA64PFR0_EL1, + .field_pos = ID_AA64PFR0_GIC_SHIFT, + .sign = FTR_UNSIGNED, + .min_field_value = 1, + }, +#endif {}, }; -- 1.9.1