Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7441216pxb; Thu, 18 Feb 2021 10:06:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLQ3yU/1YNkxxTKmkBgcdzDq1MsjrMounoOvIogF1b/lEIHlwGclykK2uytyGzltoyhCva X-Received: by 2002:aa7:d8da:: with SMTP id k26mr5286630eds.364.1613671592703; Thu, 18 Feb 2021 10:06:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613671592; cv=none; d=google.com; s=arc-20160816; b=lp89BBTZ7qO96V0iJfop8/9sRgNXlV845MSrJpJDn8bdDqgYcRQL5WZG9nufLuFtJP mYgZJtrsiCnZZPSXPp4j1WxS/uvmmqTNYyFyzc5sKue2/L9lH+3ssgddU3kdRhGTFO7I yghWbHnJJWb/trp+2QPHBJnd6+YQoQi8G/nHsYwwJzalwMSkitmPuYX7xc7WR06v8NTK 2KYytXa3Q+5Eeg9E1KkoF8M3eS54k0bl90hWUjvYWfAArNdA3PgdcSoiVsdIPYYBbGFD j1dBFq2cWWD34ikT8fepVLw/SLAeX8fH89gH3JaWi8GBLj+1vQpqWCSt1lzVa8pViUzP UbzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=uNelWKFsUsl3GL9AkmMuOC82uE9dYiLf1qy1fiqCU70=; b=lV4PeEST2DiT3rAdB+fdLh7rH+XvFIKMOmKCmr1fbMeB3dIbqS7PPFdWlDWqmFmgUv izuGzSVsAi/CKJb059fCsHm0+oJqrv8NgVCo/SASSqa4eGFDcmTJe8kAGbtvLgAGTU9B wPtc5AVLMXQ81zDN/e6REzKuTOGxqw+lZSGPduGd0CVnhptOnk1IBNrnWSSTYYTt3Ndq VflM4LLb1Xs6s1Z/o91AxlUA5kcbclhq0J6hR0YDgyto5a8qUKxK9xlGB3npMWpfHSKF EMJQCb0sdOnCSoDovxwaFLg6iVIM6GDphCrta41QTVebptEDQr4zkyI9z73V9TZUV/TW /p4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp19si4148272ejb.19.2021.02.18.10.05.59; Thu, 18 Feb 2021 10:06:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234967AbhBRSCc (ORCPT + 99 others); Thu, 18 Feb 2021 13:02:32 -0500 Received: from foss.arm.com ([217.140.110.172]:52464 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232284AbhBRP1R (ORCPT ); Thu, 18 Feb 2021 10:27:17 -0500 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 E8F81ED1; Thu, 18 Feb 2021 07:26:27 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.48.237]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8DAA73F73D; Thu, 18 Feb 2021 07:26:24 -0800 (PST) Date: Thu, 18 Feb 2021 15:26:18 +0000 From: Mark Rutland To: Hector Martin Cc: Arnd Bergmann , Rob Herring , Tony Lindgren , Marc Zyngier , Linus Walleij , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Alexander Graf , Olof Johansson , Mohamed Mediouni , Stan Skowronek , Will Deacon , linux-arm-kernel@lists.infradead.org, Mark Kettenis Subject: Re: [PATCH v2 08/25] arm64: Always keep DAIF.[IF] in sync Message-ID: <20210218152618.GA91307@C02TD0UTHF1T.local> References: <20210215121713.57687-1-marcan@marcan.st> <20210215121713.57687-9-marcan@marcan.st> <20210217122200.GC5556@C02TD0UTHF1T.local> <20210218142205.GB89209@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 18, 2021 at 11:42:01PM +0900, Hector Martin wrote: > On 18/02/2021 23.22, Mark Rutland wrote: > > I think that for consistency we always want to keep IRQ and FIQ in-sync, > > even when using GIC priorities. So when handling a pseudo-NMI we should > > unmask DAIF.DA and leave DAIF.IF masked. > > In that case there's one more, in daifflags.h:local_daif_restore(): > > /* > * If interrupts are disabled but we can take > * asynchronous errors, we can take NMIs > */ > flags &= PSR_I_BIT; > pmr = GIC_PRIO_IRQOFF; Good spot, yes! I did a quick scan with `git grep 'PSR_[IF]_BIT' -- arch/arm64`, and AFAICT that's the last one. > > > And a minor related one: should init_gic_priority_masking() WARN if FIQ is > > > masked too? This probably goes with the above. > > > > I think it should, yes. > > Done for v3 then. Thanks! Cool! Mark.