From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 13/14] xen/xsm: Add support for device tree Date: Fri, 14 Mar 2014 18:24:38 +0000 Message-ID: <53234966.9030901@linaro.org> References: <1394640969-25583-1-git-send-email-julien.grall@linaro.org> <1394640969-25583-14-git-send-email-julien.grall@linaro.org> <1394818442.6065.19.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WOWmg-00061M-Bt for xen-devel@lists.xenproject.org; Fri, 14 Mar 2014 18:24:42 +0000 Received: by mail-ee0-f44.google.com with SMTP id e49so1697219eek.17 for ; Fri, 14 Mar 2014 11:24:40 -0700 (PDT) In-Reply-To: <1394818442.6065.19.camel@kazak.uk.xensource.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.xenproject.org, Daniel De Graaf , tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 03/14/2014 05:34 PM, Ian Campbell wrote: > On Wed, 2014-03-12 at 16:16 +0000, Julien Grall wrote: >> This patch adds a new module "xen,xsm-blob" to allow the user to load the XSM >> policy when Xen is booting. > > While xsm_dt_policy_init does seem DT specific the xem_dt_init is very > similar to the xsm_multiboot_init. Can they not be a common function > with #ifdef HAVE_MULTIBOOT / #ifdef HAVE_DEVICETREE around the relevant > specific bits (essentially just the call to the relevant policy_init)? > Or at least refactor the tail of xsm_init into xsm_core_init which both > cases can call into. The parameters of the function is not the same and it seems stupid to also ifdef the list of arguments :). I can at least create a new function with if ( verify(&dummy_xsm_ops) ) { printk("%s could not verify dummy_xsm_ops structure.\n", __FUNCTION__); ret = -EIO; goto err; } xsm_ops = &dummy_xsm_ops; do_xsm_initcalls(); Regards, -- Julien Grall