From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line Date: Wed, 12 Nov 2014 14:26:34 +0000 Message-ID: <54636E1A.50504@linaro.org> References: <1414579268.29975.13.camel@citrix.com> <1414579302-6692-18-git-send-email-ian.campbell@citrix.com> <21585.6188.366311.80971@mariner.uk.xensource.com> <1414672390.2064.31.camel@citrix.com> <54623E3D.4060803@linaro.org> <1415786876.25176.49.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1415786876.25176.49.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org, Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 11/12/2014 10:07 AM, Ian Campbell wrote: > On Tue, 2014-11-11 at 17:50 +0100, Julien Grall wrote: >> Hi, >> >> Somehow I missed this email. >> >> On 30/10/2014 13:33, Ian Campbell wrote: >>> create ! >>> title it arm: domain 0 disables clocks which are in fact being used >>> thanks >>> >>> On Wed, 2014-10-29 at 16:39 +0000, Ian Jackson wrote: >>>> Ian Campbell writes ("[PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line"): >>>>> This stops dom0 from messing with clocks which it should and is required on >>>>> some platforms. It's harmless even when not needed. >>>> >>>> This is pretty odd. Doesn't this correspond to some kind of bug, in >>>> the dom0 kernel perhaps ? >>> >>> dom0 is not aware that some clocks are actually in use (e.g. by the >>> hypervisor), so the bug is probably in the lack of some interface to >>> communicate this from Xen to dom0, or some other mechanism to gate this. >> >> In reality, Xen is only using the clock of the UART. Even though, I >> think this would also happen with platform device passthrough. >> >> For the latter, it would be fairly easy via a PV drivers. But for >> UART... gating the clock could be a nightmare because every platform >> have their own way to enable/disable the clock. Futhermore, the clock >> could be shared with multiple device... >> >> I'm wondering if we could expose the UART to DOM0 without marking as >> disabled. It would avoid DOM0 to mess up the clock while everything >> would be catch via the vuart implementation in Xen. > > Perhaps we could propagate any clock related properties from the UART > node into the Xen hypervisor node (or a subnode)? The Xen Linux code > would then consume those and mark the relevant clocks as in use. I've > not looked into the clock bindings to know how plausible this might be. It looks like the bindings for clock is well defined and fairly common (Documentation/devicetree/bindins/clock/clock-bindings.txt). So your solution sounds plausible. Regards, -- Julien Grall