From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932225AbcHSAus (ORCPT ); Thu, 18 Aug 2016 20:50:48 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:46795 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932192AbcHSAuq (ORCPT ); Thu, 18 Aug 2016 20:50:46 -0400 Subject: Re: [PATCH] powerpc/8xx: use SPRN_EIE and SPRN_EID to enable/disable interrupts To: Segher Boessenkool References: <20160818155602.DAD601A2459@localhost.localdomain> <20160818163431.GB24467@gate.crashing.org> Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Christophe Leroy Message-ID: Date: Thu, 18 Aug 2016 18:52:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160818163431.GB24467@gate.crashing.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 18/08/2016 à 18:34, Segher Boessenkool a écrit : > On Thu, Aug 18, 2016 at 05:56:02PM +0200, Christophe Leroy wrote: >> The 8xx has two special registers called EID (External Interrupt >> Disable) and EIE (External Interrupt Enable) for clearing/setting >> EE in MSR. It avoids the three instructions set mfmsr/ori/mtmsr or >> mfmsr/rlwinm/mtmsr. > > All 8xx? What other models? (5xx for example). At least 823, 860, 866 and 885 have it. Looks like the 5xx have it too (at least the 565). Does Linux supports that one at all ? 8272 and 8323 don't have it. > >> +/* Special MSR manipulation registers */ >> +#define SPRN_EIE 80 /* External interrupt enable (EE=1, RI=1) */ >> +#define SPRN_EID 81 /* External interrupt disable (EE=0, RI=1) */ >> +#define SPRN_NRI 81 /* Non Recoverable interrupt (EE=0, RI=0) */ > > This is wrong (NRI is 82). Don't write code you cannot test / don't submit > code you haven't tested? :-) Oops. You're right, copy/paste failure. Was tested on an 885. Unfortunatly SPRN_NRI is not used (yet) :-( Christophe