From: Ian Campbell Subject: Re: [PATCH v2] xen/arm: Propagate clock-frequency to DOMU if present in the DT timer node Date: Thu, 25 Jun 2015 12:59:53 +0100 Message-ID: <1435233593.32500.58.camel@citrix.com> References: <1434717689-1211-1-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z85p1-0006v3-P1 for xen-devel@lists.xenproject.org; Thu, 25 Jun 2015 11:59:59 +0000 In-Reply-To: <1434717689-1211-1-git-send-email-julien.grall@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: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, Chris Brand , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2015-06-19 at 13:41 +0100, Julien Grall wrote: > When the property "clock-frequency" is present in the DT timer node, it > means that the bootloader/firmware didn't correctly configure the > CNTFRQ/CNTFRQ_EL0 on each processor. > > The best solution would be to fix the offending firmware/bootloader, > although it may not always be possible to modify and re-flash it. > > As it's not possible to trap the register CNTFRQ/CNTFRQ_EL0, we have > to extend xen_arch_domainconfig to provide the timer frequency to the > toolstack when the property "clock-frequency" is present to the host DT > timer node. Then, a property "clock-frequency" will be created in the guest > DT timer node if the value is not 0. > > We could have set the property in the guest DT no matter if the property > is present in the host DT. Although, we still want to let the guest > using CNTFRQ in normal case. After all, the property "clock-frequency" > is just a workaround for buggy firmware. > > Also add a stub for fdt_property_u32 which is not present in libfdt < > 1.4.0 used by distribution such as Debian Wheezy. > > Signed-off-by: Julien Grall > Tested-by: Chris Brand Acked + applied, thanks > This patch requires to regenerate tools/configure. Done.