Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2809036imu; Thu, 29 Nov 2018 10:32:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/UEc/Ij1GpFeG4lTapyg0xto/qMSAYvO2Y4KiQdrb4yJ3fydiJRFijruhyY3hMp+sVwagn4 X-Received: by 2002:a63:334a:: with SMTP id z71mr2168813pgz.400.1543516374218; Thu, 29 Nov 2018 10:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543516374; cv=none; d=google.com; s=arc-20160816; b=T3D/TwwnM1yhYvJSDz5wcgbQqwMUqxltm4AP0y2bCv37RP1EztkuUdutha/tfwVY2d nGz765FSFV/VAtdXVYeycOVYBQeBIqSE+zFbITgSmObskq12uu2KQTdFTALv40SVJy0p 3FU6rBsloD14T+KxzVIcpYXoskiAfhMPaNcIfhALxEYdhpOJ7GaJk4VVui5ugLfCZ6nV xBzqlodn3nyVNwzIQL2VJ3SUFvLX7Z9hfsC0lnrVsn1+YmwjMtqLQoRTuewauyfaCxCk 12sysNqQB4eijWxUkUjUh8R/DSOGAN4Z64NbXFqhgHHXzFEjiZxmeVTRdYCTZilipLRt 2Y/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zINCoEQMxMqgpGj22uzDCjZSdDsCzAngMppM5DX8GOQ=; b=JpONxkLuZ5qEayLf/HgOzZeJNoVaFK29jczX7TN9oBw2ZCV+lS1HoFo97Kz1S7+ntN j3FLDrN0DpPkfCf52Ki/YT6Z+Bb3pPRXWELLWJWaVNOXPyWOtUsCSj2mnafHnvGVlB8o NhKipkVR+0GaQmVWxJ/w6MuB3DC0EV/d37wV/hEjhiVqLmVq4kTgJc1bpMjUtqGrHfXy jJz+rq5clORkzpsSnWB/HZlsbwz2SMfFMhoSouV+09PTouBieQQcuFVPbERxrFxU0uWo LS1FOXLI30uhmaiLfAa6B2wg1uaJQS6livG1hDAkL1GrptJpyw9EXmEmL337CDqTP1GI xnCg== 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 t9si2674409plz.427.2018.11.29.10.32.39; Thu, 29 Nov 2018 10:32:54 -0800 (PST) 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 S1729564AbeK3DqQ (ORCPT + 99 others); Thu, 29 Nov 2018 22:46:16 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:38922 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729290AbeK3DqP (ORCPT ); Thu, 29 Nov 2018 22:46:15 -0500 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 3CD0DA78; Thu, 29 Nov 2018 08:40:18 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4BDA63F59C; Thu, 29 Nov 2018 08:40:16 -0800 (PST) Date: Thu, 29 Nov 2018 16:40:13 +0000 From: Mark Rutland To: Julien Thierry Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, daniel.thompson@linaro.org, joel@joelfernandes.org, marc.zyngier@arm.com, christoffer.dall@arm.com, james.morse@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, Oleg Nesterov Subject: Re: [PATCH v6 06/24] arm64: ptrace: Provide definitions for PMR values Message-ID: <20181129164013.qmmwhbygjkh5lwx5@lakrids.cambridge.arm.com> References: <1542023835-21446-1-git-send-email-julien.thierry@arm.com> <1542023835-21446-7-git-send-email-julien.thierry@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1542023835-21446-7-git-send-email-julien.thierry@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 12, 2018 at 11:56:57AM +0000, Julien Thierry wrote: > 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 Nit: s/chosent/chosen/ > that a single bit (GIC_PMR_UNMASKED_BIT) encodes the information whether > interrupts are masked or not. There's no GIC_PMR_UNMASKED_BIT in this patch. Should that be GIC_PRIO_STATUS_BIT? > 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) Could you elaborate on the GIC priority logic a bit? Are lower numbers higher priority? Are there restrictions on valid PMR values? IIUC GIC_PRIO_IRQOFF is 0xb0 (aka 0b10110000), which seems a little surprising. I'd have expected that we'd use the most signficant bit. Thanks, Mark.