From patchwork Tue Nov 16 08:24:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingfan Liu X-Patchwork-Id: 12692713 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BD67C433F5 for ; Tue, 16 Nov 2021 08:28:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 328D061B49 for ; Tue, 16 Nov 2021 08:28:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 328D061B49 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1KQYZQFJDEE//c2lfcQSE0RZapgAhGKiLuufm/7mWVE=; b=CFI2gZscpFZeAm L0iFKJ8NMrkb2pYjFcwAxGleIn7hMEnKdXqyDQgJBp6kIgeJ1BJPgJtawaGRHEQl6xgUFVULxOP3Y uuvwu1e8QCbKhTr7AMthpjkKp4rz9IYz46/x2OaJAFVndZmhgqMVkn2c30Xa+tOo8K2MSP7WQZCYW oTzg031vdC6XcqlVzj0NaXjEmFdMzi/d7FcjUUCaQomNx89qA2vH2ZHg51Bze3JHUNRckA+gS+p5Y HmtHISOdB8aOQgYLCGAPYbkL+IReDNCGndNzI5vuoFATwxVgPVA/DQZP2KCENyLGLnAxKrJjxpvzu ZsZQJuqnhmaYrUSLEsdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmtnl-000hhE-Dg; Tue, 16 Nov 2021 08:26:49 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmtmb-000hHj-A2 for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 08:25:38 +0000 Received: by mail-pj1-x1029.google.com with SMTP id p18-20020a17090ad31200b001a78bb52876so1571084pju.3 for ; Tue, 16 Nov 2021 00:25:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/k7ZQTqFPkVe68fPluKvdaKWxmA9a158887sw7Su1/4=; b=gLogDyhZU9sK0BSc6HsmO9xUvr3Aa0msUi4iNIOMyKknMCxjkBZUFNTjDNE3ITZ4IU dxAEiZ/nHAyvE7WdRnGePxamCaPcSLfDfe+2HIv9vnWpQjuH098iXl/hi7I2Uomy4CT6 vX53QncWyakrpgV6TIInfFmwpY3X8Jno43gPIZkA9ypMugvwZR0oEJF30lFkIpGbm7B3 XBYkGdUute6bJNMM23cavnEtz1iX+r5did5r5aDa5Q8+QD7ICT9ePoS5vnekAlzSg3Dj AiobkzNHk//otAr/iVcQasZBYRb0DaXUxcXlbl0EdYo8sBY6CFNaz/6VveMCQU6EuIph eUKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/k7ZQTqFPkVe68fPluKvdaKWxmA9a158887sw7Su1/4=; b=3EV92TrR6ydkWXbHQRWtKfchrXwKymQV4NdQoCnaDrBod4yuR9JEp5SlLJLo4Qf+so IBQVGRDBFtLxXwfVI8sIF2iOax4O+g4UJQ52jUnt5KxVB2f28SLeSG14VVD6cOrLEulL DOID38yVUzzHs2gDIimEX6DZUJ7KmGI5fm4yVPB8s4qTW/POJbzXGC0e5nKcvBwFRRKW rt6zSV3GKSA4myThiEyoV5iGhwEhDgjGWvR2jChoPweqbhdivEgJHb7SoMzxi9dbS40m sDFraiAZRKSU3EpFjDrYzdoiJQNxHtO6sCDAh7PphBuhQq0VHYeDT9+XlVpRPj5dOaaK GjZQ== X-Gm-Message-State: AOAM533ueTP7y0a3GB4PSWNnJ2IFNdmEh10j75boJ3Uk25Fp/sQhbQyx kSIewwteNCdBLeJNTuSY2CXmhCVvvQ== X-Google-Smtp-Source: ABdhPJzmw70bzQWlkimM0FYveFOEKi10kbRk4Q8PEUVrScT8iKsxaUDdDV6cRHFB0t2eyRD8LqF2NA== X-Received: by 2002:a17:90b:4b48:: with SMTP id mi8mr1126119pjb.214.1637051136061; Tue, 16 Nov 2021 00:25:36 -0800 (PST) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id 11sm17104011pfl.41.2021.11.16.00.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Nov 2021 00:25:35 -0800 (PST) From: Pingfan Liu To: linux-arm-kernel@lists.infradead.org Cc: Pingfan Liu , Catalin Marinas , Will Deacon , Mark Rutland , Marc Zyngier , Joey Gouly , Sami Tolvanen , Julien Thierry , Yuichi Ito , rcu@vger.kernel.org Subject: [PATCHv3 4/4] arm64: entry: remove pNMI judgement in __el1_interrupt() path Date: Tue, 16 Nov 2021 16:24:50 +0800 Message-Id: <20211116082450.10357-5-kernelfans@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211116082450.10357-1-kernelfans@gmail.com> References: <20211116082450.10357-1-kernelfans@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_002537_395719_92CF5F07 X-CRM114-Status: GOOD ( 13.23 ) 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 Now, all pNMI can be detected before the dispatching of __el1_pnmi() or __el1_interrupt(), and __el1_interrupt() will never be called in pNMI context. As a result, the judgement of pNMI in arm64_preempt_schedule_irq() becomes unnecessary. Signed-off-by: Pingfan Liu Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Marc Zyngier Cc: Joey Gouly Cc: Sami Tolvanen Cc: Julien Thierry Cc: Yuichi Ito Cc: rcu@vger.kernel.org To: linux-arm-kernel@lists.infradead.org --- arch/arm64/kernel/entry-common.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c index afcde43f1b73..57d654b915a5 100644 --- a/arch/arm64/kernel/entry-common.c +++ b/arch/arm64/kernel/entry-common.c @@ -224,15 +224,6 @@ static void __sched arm64_preempt_schedule_irq(void) { lockdep_assert_irqs_disabled(); - /* - * DAIF.DA are cleared at the start of IRQ/FIQ handling, and when GIC - * priority masking is used the GIC irqchip driver will clear DAIF.IF - * using gic_arch_enable_irqs() for normal IRQs. If anything is set in - * DAIF we must have handled an NMI, so skip preemption. - */ - if (system_uses_irq_prio_masking() && read_sysreg(daif)) - return; - /* * Preempting a task from an IRQ means we leave copies of PSTATE * on the stack. cpufeature's enable calls may modify PSTATE, but