From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4D4204C8.9040905@mentor.com> Date: Thu, 27 Jan 2011 17:50:32 -0600 From: Meador Inge MIME-Version: 1.0 To: Yoder Stuart-B08248 Subject: Re: [PATCH 1/2] powerpc: document the MPIC device tree binding References: <4D34E448.8000902@mentor.com> <9F6FE96B71CF29479FF1CDC8046E150306BF11@039-SN1MPN1-004.039d.mgd.msft.net> <4D377CE3.6000608@mentor.com> <9F6FE96B71CF29479FF1CDC8046E150307A5C8@039-SN1MPN1-004.039d.mgd.msft.net> In-Reply-To: <9F6FE96B71CF29479FF1CDC8046E150307A5C8@039-SN1MPN1-004.039d.mgd.msft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: "Blanchard, Hollis" , Wood Scott-B07421 , "devicetree-discuss@lists.ozlabs.org" , "linuxppc-dev@lists.ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 01/20/2011 09:50 AM, Yoder Stuart-B08248 wrote: > > >> -----Original Message----- >> From: Meador Inge [mailto:meador_inge@mentor.com] >> Sent: Wednesday, January 19, 2011 6:08 PM >> To: Yoder Stuart-B08248 >> Cc: Wood Scott-B07421; linuxppc-dev@lists.ozlabs.org; devicetree- >> discuss@lists.ozlabs.org; Blanchard, Hollis >> Subject: Re: [PATCH 1/2] powerpc: document the MPIC device tree binding >> >> On 01/19/2011 04:14 PM, Yoder Stuart-B08248 wrote: >>> >>>> +** Optional properties: >>>> + >>>> + - no-reset : The presence of this property indicates that the MPIC >>>> + should not be reset during runtime initialization. >>>> + - protected-sources : Specifies a list of interrupt sources that >>>> + are not >>>> + available for use and whose corresponding >>>> + vectors >>>> + should not be initialized. A typical use >>>> + case for >>>> + this property is in AMP systems where multiple >>>> + independent operating systems need to share >>>> + the MPIC >>>> + without clobbering each other. >>> >>> Is "protected-sources" really needed for AMP systems to tell the OSes >>> not to clobber each other? Won't each OS be given a device tree with >>> only its interrupt sources? ...so you know what you are allowed to >>> touch. >> >> This was discussed a little bit already [1, 2]. The MPIC driver currently >> initializes the VECPRI register for all interrupt sources, which can lead >> to the aforementioned clobbering. > > For sources that are protected and not to be touched, it seems > that the other need is for the OS to know (be guaranteed?) that > those sources have been put in state where the source is masked > or directed to other cores. You can't have interrupts occurring > on sources that you are not allowed to initialize. > > So the "no-reset" property could potentially cover this as well-- if it was > defined to mean "don't reset the mpic" and boot firmware has put all sources > in a sane initial state. And we wouldn't need the "protected-sources" > property any longer. > This seems reasonable to me. If "no-reset" is there, then we will not reset the MPIC and *only* sources explicitly listed in "interrupts" properties are up for any sort of initialization (e.g. the VECPRI init). If "no-reset" is not there, then anything is free game. In terms of implementation, I think we can (1) pull the protected sources code, (2) keep the VECPRI initialization in 'mpic_init' from happening when "no-reset" is present, and (3) "lazily" perform the VECPRI initialization in 'mpic_host_map' (this way only sources mentioned in the device tree are initialized). I will send out a patch with these updates tomorrow. I also CC'd Ben, who wrote the original protected sources work, to make sure something about the original use case is not being missed. -- Meador Inge | meador_inge AT mentor.com Mentor Embedded | http://www.mentor.com/embedded-software From mboxrd@z Thu Jan 1 00:00:00 1970 From: Meador Inge Subject: Re: [PATCH 1/2] powerpc: document the MPIC device tree binding Date: Thu, 27 Jan 2011 17:50:32 -0600 Message-ID: <4D4204C8.9040905@mentor.com> References: <4D34E448.8000902@mentor.com> <9F6FE96B71CF29479FF1CDC8046E150306BF11@039-SN1MPN1-004.039d.mgd.msft.net> <4D377CE3.6000608@mentor.com> <9F6FE96B71CF29479FF1CDC8046E150307A5C8@039-SN1MPN1-004.039d.mgd.msft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9F6FE96B71CF29479FF1CDC8046E150307A5C8-TcFNo7jSaXM0vywKSws3iq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Yoder Stuart-B08248 Cc: "Blanchard, Hollis" , Wood Scott-B07421 , "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , "linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" List-Id: devicetree@vger.kernel.org On 01/20/2011 09:50 AM, Yoder Stuart-B08248 wrote: > > >> -----Original Message----- >> From: Meador Inge [mailto:meador_inge-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org] >> Sent: Wednesday, January 19, 2011 6:08 PM >> To: Yoder Stuart-B08248 >> Cc: Wood Scott-B07421; linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; devicetree- >> discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; Blanchard, Hollis >> Subject: Re: [PATCH 1/2] powerpc: document the MPIC device tree binding >> >> On 01/19/2011 04:14 PM, Yoder Stuart-B08248 wrote: >>> >>>> +** Optional properties: >>>> + >>>> + - no-reset : The presence of this property indicates that the MPIC >>>> + should not be reset during runtime initialization. >>>> + - protected-sources : Specifies a list of interrupt sources that >>>> + are not >>>> + available for use and whose corresponding >>>> + vectors >>>> + should not be initialized. A typical use >>>> + case for >>>> + this property is in AMP systems where multiple >>>> + independent operating systems need to share >>>> + the MPIC >>>> + without clobbering each other. >>> >>> Is "protected-sources" really needed for AMP systems to tell the OSes >>> not to clobber each other? Won't each OS be given a device tree with >>> only its interrupt sources? ...so you know what you are allowed to >>> touch. >> >> This was discussed a little bit already [1, 2]. The MPIC driver currently >> initializes the VECPRI register for all interrupt sources, which can lead >> to the aforementioned clobbering. > > For sources that are protected and not to be touched, it seems > that the other need is for the OS to know (be guaranteed?) that > those sources have been put in state where the source is masked > or directed to other cores. You can't have interrupts occurring > on sources that you are not allowed to initialize. > > So the "no-reset" property could potentially cover this as well-- if it was > defined to mean "don't reset the mpic" and boot firmware has put all sources > in a sane initial state. And we wouldn't need the "protected-sources" > property any longer. > This seems reasonable to me. If "no-reset" is there, then we will not reset the MPIC and *only* sources explicitly listed in "interrupts" properties are up for any sort of initialization (e.g. the VECPRI init). If "no-reset" is not there, then anything is free game. In terms of implementation, I think we can (1) pull the protected sources code, (2) keep the VECPRI initialization in 'mpic_init' from happening when "no-reset" is present, and (3) "lazily" perform the VECPRI initialization in 'mpic_host_map' (this way only sources mentioned in the device tree are initialized). I will send out a patch with these updates tomorrow. I also CC'd Ben, who wrote the original protected sources work, to make sure something about the original use case is not being missed. -- Meador Inge | meador_inge AT mentor.com Mentor Embedded | http://www.mentor.com/embedded-software