From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7378CC433DB for ; Mon, 8 Mar 2021 09:54:10 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 C7FD964FB7 for ; Mon, 8 Mar 2021 09:54:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C7FD964FB7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4DvDFX3XNNz3dM3 for ; Mon, 8 Mar 2021 20:54:08 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=NmUXpDBo; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1036; helo=mail-pj1-x1036.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=NmUXpDBo; dkim-atps=neutral Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4DvDDH74lXz3cXv for ; Mon, 8 Mar 2021 20:53:03 +1100 (AEDT) Received: by mail-pj1-x1036.google.com with SMTP id ga23-20020a17090b0397b02900c0b81bbcd4so2671862pjb.0 for ; Mon, 08 Mar 2021 01:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IcUGC/WC3idmEiqYEdboYch4xIiveWzvciw18OaggPU=; b=NmUXpDBom/s5+1aLumOhffsdRF0XAC1ILzKZ4O8FmcS2i2D7/d742Z9mvC7UvtMaW7 nwaFE85nn1qecUiKqV8+smwCjv+5yAZzdNeFTjOfBIhORzqaf/MexfKHjN17nQGZeRX9 l38ikC2tQ0DICY+a1xcCQimj44KTTYKrHbhe0LnlNFx2W6cA4jotAea3lGETQSw20DOv XqqOPwRfvq/ixR3abbTL7AGCxSpvqORI1apfxNkl20hfrSOKksmdWUCsB51rPT/0v1LB faztyTznJpYXYk3wqu88F32lcLylmpaonIl2HSEYoPBIKb+sbYSjdZsfpvkt4IMJZr77 0cJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IcUGC/WC3idmEiqYEdboYch4xIiveWzvciw18OaggPU=; b=jhUARuP+Joscxc/SkzzrLiBOdb/IUd06zgefpFUNkGqVAxKgU7KDdRNqKXCC2V1HyL uobzkIDMTVVxi8+9X5JSZDFOvjIaJrHou3V5cvmiadxrMi8YQKZ+4niYXCz9eBzYsrMJ rflFpniF5IePf7ssgmIdWukNzh+iLxA0z+kJn2HRd3yJA6VARUzjnIjBRQP/v4aeMNzv CX+x10DfnDwYB0RTyEzPYqpZPncYgcvz/PAs8ltgCO0m6nU6yErtojqP/viEN3QG0gt8 7zuSDC01WFU5STszUHqihmKIfpcxMh8vO3l/G+8Xc4jQIxblIpy3wJhpm4niw6iRqma4 xjrQ== X-Gm-Message-State: AOAM531eUsYsqpzJWW4cqFas4BY+3gXJ4oz7j+B9XdPBNTQIY8tl7COs Ko7HWiFyguOm0v44lygr/FP6v4OegOo= X-Google-Smtp-Source: ABdhPJxiyyGXrbwSi+06vs/eTtowFpWZ60+nknPVBc7pILhvWm4ypZ7YVS9Ddwxt2vTqr30/WWBOtg== X-Received: by 2002:a17:90a:66c2:: with SMTP id z2mr3084985pjl.139.1615197180902; Mon, 08 Mar 2021 01:53:00 -0800 (PST) Received: from bobo.ozlabs.ibm.com (58-6-239-121.tpgi.com.au. [58.6.239.121]) by smtp.gmail.com with ESMTPSA id e63sm1326850pfe.208.2021.03.08.01.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 01:53:00 -0800 (PST) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH 1/7] powerpc/syscall: switch user_exit_irqoff and trace_hardirqs_off order Date: Mon, 8 Mar 2021 19:52:38 +1000 Message-Id: <20210308095244.3195782-3-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210308095244.3195782-1-npiggin@gmail.com> References: <20210308095244.3195782-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" user_exit_irqoff() -> __context_tracking_exit -> vtime_user_exit warns in __seqprop_assert due to lockdep thinking preemption is enabled because trace_hardirqs_off() has not yet been called. Switch the order of these two calls, which matches their ordering in interrupt_enter_prepare. Fixes: 5f0b6ac3905f ("powerpc/64/syscall: Reconcile interrupts") Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c index 2ef3c4051bb9..38ee41f8844a 100644 --- a/arch/powerpc/kernel/interrupt.c +++ b/arch/powerpc/kernel/interrupt.c @@ -34,11 +34,11 @@ notrace long system_call_exception(long r3, long r4, long r5, if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG)) BUG_ON(irq_soft_mask_return() != IRQS_ALL_DISABLED); + trace_hardirqs_off(); /* finish reconciling */ + CT_WARN_ON(ct_state() == CONTEXT_KERNEL); user_exit_irqoff(); - trace_hardirqs_off(); /* finish reconciling */ - if (!IS_ENABLED(CONFIG_BOOKE) && !IS_ENABLED(CONFIG_40x)) BUG_ON(!(regs->msr & MSR_RI)); BUG_ON(!(regs->msr & MSR_PR)); -- 2.23.0