From patchwork Mon Nov 12 11:56:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Thierry X-Patchwork-Id: 10678545 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B004D14BD for ; Mon, 12 Nov 2018 12:00:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D6AA29E96 for ; Mon, 12 Nov 2018 12:00:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9198D29EDE; Mon, 12 Nov 2018 12:00:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 186D829E96 for ; Mon, 12 Nov 2018 12:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=MQEerqcolNsLi8l0TO5WItc8aP7kMrpFimcl+wOZ678=; b=mQ1secO3bRdvhZzjqRs1hjjX4q bGLOX+uRzRucuK/sPsTqPyixayJObdCNuMzYT+LcCIWOeCE0AJXn/0RvuEnt35sg7b5WeIz9gxY0S OCt2bxNesqpAl6zaqrkZQ7bx2bc3H6p4KBx/mZqyHCIX7ZNRxmfL5CFgsRcNmCGX1kQA480+0X403 B6yvYHS3sd/aqw1xVA5CrIxt1+kTIxH/fsVujpTCoOSh0Lvg1yBIj8kNuTDDvPRLotFcx69T1f0KC PaCWgr7n5cgsdgMsRAAUwgpANwZL02iFqBaIaDkBzStTzb7ddeDnUJ147UxNVKiLeir4vORvWVteF +T97kZ5Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMAtH-0007wh-MK; Mon, 12 Nov 2018 12:00:27 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMAqp-0004No-5x for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 11:57:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5roYOq0DloQmIgjs/cIhmsOpbbcqS1/HJncg35XSldQ=; b=CfCIJIZkkl0dLxNv2RKvYDWsF X1NtMKH36EKkpfJkt35EbGRhmSTELKawxknUWACVjbILQWF4SbcueLzJtlD592xOYbX7uW90lysd1 SM5YMKIQe8ZAYmmZzBL8Ou4VKqX0HsLz+Lf9s8Xkax8bnSYIUJC3u8jFYwcKO4hDCo3btDkmdHN63 9Jt/GfTBQR/r+IBSdNC6IwKb05c2504MHH+MLaSYZJtJJx69o50xSSyV/y8zORPRWcuht45O4ZCzZ ivhv2AhyxmKYX3ea6iiYIB2OAL6AXKJMZEhbygKw92GN0Fdz7V9ELVKOtDA4K4E9LgmnAgppkFhwj kuwrCWDXw==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMAql-0003WY-OU for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 11:57:53 +0000 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 CF2EE1688; Mon, 12 Nov 2018 03:57:40 -0800 (PST) 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 D64DD3F5A0; Mon, 12 Nov 2018 03:57:38 -0800 (PST) From: Julien Thierry To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 06/24] arm64: ptrace: Provide definitions for PMR values Date: Mon, 12 Nov 2018 11:56:57 +0000 Message-Id: <1542023835-21446-7-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1542023835-21446-1-git-send-email-julien.thierry@arm.com> References: <1542023835-21446-1-git-send-email-julien.thierry@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_115752_072189_FD871BE9 X-CRM114-Status: UNSURE ( 8.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.thompson@linaro.org, Julien Thierry , marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, christoffer.dall@arm.com, james.morse@arm.com, Oleg Nesterov , joel@joelfernandes.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Introduce fixed values for PMR that are going to be used to mask and unmask interrupts by priority. These values are chosent in such a way that a single bit (GIC_PMR_UNMASKED_BIT) encodes the information whether interrupts are masked or not. Signed-off-by: Julien Thierry Suggested-by: Daniel Thompson Cc: Oleg Nesterov Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/ptrace.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index fce22c4..ce6998c 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h @@ -25,6 +25,12 @@ #define CurrentEL_EL1 (1 << 2) #define CurrentEL_EL2 (2 << 2) +/* PMR values used to mask/unmask interrupts */ +#define GIC_PRIO_IRQON 0xf0 +#define GIC_PRIO_STATUS_SHIFT 6 +#define GIC_PRIO_STATUS_BIT (1 << GIC_PRIO_STATUS_SHIFT) +#define GIC_PRIO_IRQOFF (GIC_PRIO_IRQON ^ GIC_PRIO_STATUS_BIT) + /* Additional SPSR bits not exposed in the UABI */ #define PSR_IL_BIT (1 << 20)