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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DD05C636D4 for ; Wed, 15 Feb 2023 23:15:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjBOXPr (ORCPT ); Wed, 15 Feb 2023 18:15:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjBOXPp (ORCPT ); Wed, 15 Feb 2023 18:15:45 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A87CB3BD96 for ; Wed, 15 Feb 2023 15:15:44 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 22A3761DE5 for ; Wed, 15 Feb 2023 23:15:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E0F3C433EF; Wed, 15 Feb 2023 23:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676502943; bh=OPn98kKcj/M/4ixhfckcLtxaNT3VAVS3WKPh941pI2Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GWXmQL/Ri20fzECOS3eoj/3kijVPi/KP0RDkT+7vpNlJR7wtM0OHtBiXpHGWc8HEE IXINgLOWt1jtqUtw46S5EG6PartrVJpLuu1uR/iUEv1mSM+Bsct0DnifWv1dwgLpld RVoOIOC4IKt5oIu75DucglNRc7B8VbonoFFu+w11dJY8uPLweXzpI7vG8Gih2fCx5M +nDPciXvFovGIaQ/0ZR5Br95y4fQSX9xJUICgXq8i6yuyVzAt8xhwqejVmG4x69xH1 5eVY9v7w37Edpd71hyGW6vHlQ7PAe/WlHJl3YSgmY9w93qvxLCCbRkWd96y6G1pBcs kGZhCAelyJd+w== Received: by pali.im (Postfix) id 2AF1CB98; Thu, 16 Feb 2023 00:15:40 +0100 (CET) Date: Thu, 16 Feb 2023 00:15:40 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Scott Wood , Christophe Leroy Cc: Michael Ellerman , Nicholas Piggin , jbglaw@lug-owl.de, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 5/5] powerpc/epapr: Don't use wrteei on non booke Message-ID: <20230215231540.vmskpw33l2ctyp4c@pali> References: <38a8d765ed9149bc6b5484a7142e3bc59ffa3b1a.1671475543.git.christophe.leroy@csgroup.eu> <20221220202111.jpxsyviplco6sbsm@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221220202111.jpxsyviplco6sbsm@pali> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 20 December 2022 21:21:11 Pali Rohár wrote: > On Monday 19 December 2022 19:46:00 Christophe Leroy wrote: > > wrteei is only for booke. Use the standard mfmsr/ori/mtmsr > > when non booke. > > > > Reported-by: Jan-Benedict Glaw > > Signed-off-by: Christophe Leroy > > --- > > Not sure this is needed at all, the commit that introduced the code says it is for e500, but there's no such limitation in Kconfig. Maybe we should limit all the file to CONFIG_PPC_E500 > > This ePAPR code is according to ePAPR v1.1. So it does not have to be > e500 specific. But is there anything else in this category? Scott Wood: Do you know any details about it? > > --- > > arch/powerpc/kernel/epapr_hcalls.S | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/powerpc/kernel/epapr_hcalls.S b/arch/powerpc/kernel/epapr_hcalls.S > > index 69a912550577..033116e465d0 100644 > > --- a/arch/powerpc/kernel/epapr_hcalls.S > > +++ b/arch/powerpc/kernel/epapr_hcalls.S > > @@ -21,7 +21,13 @@ _GLOBAL(epapr_ev_idle) > > ori r4, r4,_TLF_NAPPING /* so when we take an exception */ > > PPC_STL r4, TI_LOCAL_FLAGS(r2) /* it will return to our caller */ > > > > +#ifdef CONFIG_BOOKE_OR_40x > > wrteei 1 > > +#else > > + mfmsr r4 > > + ori r4, r4, MSR_EE > > + mtmsr r4 > > +#endif > > > > idle_loop: > > LOAD_REG_IMMEDIATE(r11, EV_HCALL_TOKEN(EV_IDLE)) > > -- > > 2.38.1 > >