Received: by 2002:ac8:6d01:0:b0:423:7e07:f8e4 with SMTP id o1csp6615243qtt; Mon, 18 Dec 2023 01:25:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKUEElhBc+j9LLdMttix7/8A6iiIE0A3FRao7OUoxGf/30+4lMtmjhKIj9flQj5xFgqe5a X-Received: by 2002:a17:902:c406:b0:1d0:cf22:c6ca with SMTP id k6-20020a170902c40600b001d0cf22c6camr9420181plk.52.1702891510747; Mon, 18 Dec 2023 01:25:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702891510; cv=none; d=google.com; s=arc-20160816; b=gllE0D27m4IJZbXYXUyKsyxPBELguouZIy0Jq+dFyEAnJEF72nwGy1ScmRKvLnoI76 P7+e5lMsrDKL5h1reDXbCq1i2Ay2V7OFJbhdFj1umGGAkoD0znx0bkKimdLYCMl1eR6U rNjbBHCZkjd8g6VzIj0MLFEc+eSMvR6DND6DXJ7zTRBRWQGe735Yu7VHhJ9xJMoFwPME T+dYfXkHf99V0o8RNULing8iLcShUem1gGfGBErVlaLAhHOwDZO2jSQVEmgcjtEBIQ/4 HAB3VSm5zmItA6PpXFG9lNmIamZf2Mif9MxRoGOUeC1wtcIyjsxCgliFWfs1w/dxBZTA TsqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=9RSkWH20zMOFSpjDD2Yt5rxtOgy0YsHyagVqqxIyXL8=; fh=QFTCQXNU02CJ5v22Y4wN8OvPGcFomViQaNJUm2i0HM0=; b=FJcFUC1KSKAcMeqJKyvs+qoy6ESGnyxtTUTDzq1da2ze6vJZ3nVMeuLgXM/spLELDj 4l9dryStzwn9ESafSyb5LhvcT4o4ViBfmsIPazz12z3EOyGauE0VOvsZaGcD+aSgxIi+ xZ5fhtQEqvLwDQkzrbl9sqDpBJwZWH6N6EVscazp+zRa9MW/m9kIXLWZkRgfR6C8yrh7 /mS8dHCYWjJivE6OAueGbtcrZ0GvT1YGxG2RokmlSiDb6ijDJpHCdr0wDbDF6+VdP0SG phNrQ45fWMfTwy4CgIMd+1vQJmPc5e/rUKdook58F4jkTXvo4C/vKlUPkae5nPvqKO4k K7tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rA220P5B; spf=pass (google.com: domain of linux-kernel+bounces-3244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q24-20020a170902bd9800b001d06ae1f9ccsi17232521pls.606.2023.12.18.01.25.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 01:25:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rA220P5B; spf=pass (google.com: domain of linux-kernel+bounces-3244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7C217283B4E for ; Mon, 18 Dec 2023 09:25:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70FA711CA6; Mon, 18 Dec 2023 09:25:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rA220P5B" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A620F1170B for ; Mon, 18 Dec 2023 09:25:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8166AC433C8; Mon, 18 Dec 2023 09:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702891501; bh=cO07dxNW1PUmAXiXVsm47VunUdfatHSRsSDDVCHJ6wc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=rA220P5BlJTSEX3Psx00JnQIFYvldI3rP2MKQwj21FcBWOwzOLIW6Rv6Vg0pJT6jt b8SoUrqgHea+y4/ntqMhux0XUjNt+1ZS/8HEXaZtJuGXyXSuYp3iAQ1phrJb0pkDXH pU7Z/4Ig7WdUHybk8YRHNlYX5m5o8Od8Xwm76FQHaKzSGrCHKDCnJi3NtRj6KDzB+l gi+nKIj1KDBVS10wDuBD5rBzHdB//2G7UHy79v3n5OvKrnoHNFF84FI267k2wkQbWO mXEdBvJZM/22gvePtaqVkv8XzX065dNGMImdmlTMHD73Kek70k+6x/Py3+7mj3aesj 1enb0BCuJctdQ== X-Mailer: emacs 29.1 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: Luming Yu , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu Cc: luming.yu@gmail.com, ke.zhao@shingroup.cn, dawei.li@shingroup.cn, shenghui.qu@shingroup.cn, Luming Yu Subject: Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure In-Reply-To: References: Date: Mon, 18 Dec 2023 14:54:53 +0530 Message-ID: <8734vzsw0q.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Luming Yu writes: > Before we have powerpc to use the generic entry infrastructure, > the call to fire user return notifier is made temporarily in powerpc > entry code. > It is still not clear what will be registered as user return notifier. Can you summarize that here? > > Signed-off-by: Luming Yu > --- > arch/powerpc/kernel/interrupt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c > index c4f6d3c69ba9..7fe704946e96 100644 > --- a/arch/powerpc/kernel/interrupt.c > +++ b/arch/powerpc/kernel/interrupt.c > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > > #if defined(CONFIG_PPC_ADV_DEBUG_REGS) && defined(CONFIG_PPC32) > unsigned long global_dbcr0[NR_CPUS]; > @@ -245,6 +246,8 @@ interrupt_exit_user_prepare_main(unsigned long ret, struct pt_regs *regs) > /* Restore user access locks last */ > kuap_user_restore(regs); > > + arch_exit_to_user_mode_prepare(regs, ti_flags); > + > That will run the notifier with user AMR/IAMR values. > return ret; > } > > -- > 2.42.0.windows.2