From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADDC02EA737 for ; Wed, 19 Nov 2025 17:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763575032; cv=none; b=DaOfgYKzEXRqIyOUsGvoxUuRhn7x5wW3BCpshwQ5BqYiKyW2i4K7Jc91vYnOZwWA0KBlrkAcOjer2ekYAvHPXAt7XKNzJrjAs4Z6rcbDJs6GZkR/zXc5uE3sRtBLGWQ9AzTM/z1iu+k1TTfcHLl9+AJLq9/Xa/VhFjgw53DEIQo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763575032; c=relaxed/simple; bh=TE0Cmmb6jq9r4iHwqC1vcuVuTajVWRhOjBLKlCSfoIo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=d2XcFk/23D5CUI6vwa0jMcdlWrDN2oGWVMVSu+/5aKIfn/vc/OtQSpdw4/oPrcd0agKw5auR4MMWI0i2Z9WJEzRf1gCr2EIokTabd9csKL+6wCbcdqEfQdWNx1MyjdkYuqndzFnWpyFwytKA/hkKgvvdxUKabF+pwt1U362DKO4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Pxx1wpLO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rx6GdwtQ; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Pxx1wpLO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rx6GdwtQ" From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1763575022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SCqIKcsbVAvX/DFeGFKc7d0lwiR7NZ7qoM25+GzyYZs=; b=Pxx1wpLOV5LMlqWqdMIfJvcaWjqnBW5V/74A0ru3o4aV+hIouMaUq2yIK5FzA5NgQxhHNn Nesug9FDXlWLNKTW6Cle8jZ77YR1MBdKIqKU4QLPsbRvv5ztUCPH6Q3wt8FeCJKzzWy/iy dWZBbhcyqR5VaBfvS/dEakGAEsx83gPRE/81pW4q8hLaGXjI9mbWlJfjX8glS+fMMxKAgY UYhlho+0K9sN+rdvqnJmE2Ww8WYFFvJ+JTCZhvD/XS1gG5cU/U0St2VWTYS7eo/Qetr7dD 7bBAKqr+uT2oJ9SRHaQMXkgdXg2qZUvarU/YmD2MHRaHvwgXu+kCnNaVCVPxvg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1763575022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SCqIKcsbVAvX/DFeGFKc7d0lwiR7NZ7qoM25+GzyYZs=; b=rx6GdwtQ9y8S8dro1uf28mrjBLvbD8eY1auP4KI13Q3iMThqOuYNtsKyV2Rn83kj/XcqHr xSqL1HDqr38FrFDw== To: Shrikanth Hegde , Mukesh Kumar Chaurasiya , maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com Cc: christophe.leroy@csgroup.eu, oleg@redhat.com, kees@kernel.org, luto@amacapital.net, wad@chromium.org, mchauras@linux.ibm.com, thuth@redhat.com, akpm@linux-foundation.org, macro@orcam.me.uk, ldv@strace.io, deller@gmx.de, charlie@rivosinc.com, bigeasy@linutronix.de, segher@kernel.crashing.org, thomas.weissschuh@linutronix.de, menglong8.dong@gmail.com, ankur.a.arora@oracle.com, peterz@infradead.org, namcao@linutronix.de, kan.liang@linux.intel.com, mingo@kernel.org, atrajeev@linux.vnet.ibm.com, mark.barnett@arm.com, coltonlewis@google.com, rppt@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/8] Generic IRQ entry/exit support for powerpc In-Reply-To: <5a2678a6-66e5-4c15-b95a-ce9f977f79e5@linux.ibm.com> References: <20251102115358.1744304-1-mkchauras@linux.ibm.com> <5a2678a6-66e5-4c15-b95a-ce9f977f79e5@linux.ibm.com> Date: Wed, 19 Nov 2025 18:57:01 +0100 Message-ID: <87ms4hlxci.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Nov 07 2025 at 21:53, Shrikanth Hegde wrote: > On 11/2/25 5:23 PM, Mukesh Kumar Chaurasiya wrote: > diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c > index ce59431f977c..c7cf9a3f1202 100644 > --- a/arch/powerpc/kernel/interrupt.c > +++ b/arch/powerpc/kernel/interrupt.c > @@ -118,16 +118,18 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3, > regs->exit_flags |= _TIF_RESTOREALL; > } > > -again: > + local_irq_disable(); > + > + user_exit_irqoff(); > syscall_exit_to_user_mode(regs); > > - user_enter_irqoff(); > - if (!prep_irq_for_enabled_exit(true)) { > - user_exit_irqoff(); > - local_irq_enable(); > - local_irq_disable(); > - goto again; > - } > +again: > + if (!prep_irq_for_enabled_exit(true)) { > + local_irq_enable(); > + local_irq_disable(); > + goto again; > + } > + This does not look right at all. syscall_exit_to_user_mode(regs) syscall_exit_to_user_mode_work() exit_to_user_mode() user_exit_irqoff() What you really want to do here is: again: syscall_exit_to_user_mode_work(regs); exit_to_user_mode(regs); if (!prep_irq_for_enabled_exit(true)) { // Re-establishes the full state required // to restart enter_from_user_mode(regs); local_irq_enable(); local_irq_disable(); goto again; That should cure it. Same issue in the other places. Thanks, tglx