From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v2 05/23] x86/boot/reloc: create generic alloc and copy functions Date: Mon, 17 Aug 2015 09:51:58 -0600 Message-ID: <55D21F3E020000780009B716__42597.4867110655$1439826820$gmane$org@prv-mh.provo.novell.com> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-6-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZRMhh-0001tI-GU for xen-devel@lists.xenproject.org; Mon, 17 Aug 2015 15:52:05 +0000 In-Reply-To: <1437402558-7313-6-git-send-email-daniel.kiper@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel Kiper Cc: Juergen Gross , grub-devel@gnu.org, wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, phcoder@gmail.com, xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, keir@xen.org, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 20.07.15 at 16:29, wrote: > Create generic alloc and copy functions. We need > separate tools for memory allocation and copy to > provide multiboot2 protocol support. > > Signed-off-by: Daniel Kiper > Reviewed-by: Andrew Cooper > --- > v2 - suggestions/fixes: > - generalize new functions names > (suggested by Jan Beulich), > - reduce number of casts > (suggested by Jan Beulich). This contradicts retaining Andrew's R-b tag. Please remember to drop tags for everything you make non-trivial changes to. > @@ -55,50 +56,64 @@ static void *reloc_mbi_struct(void *old, unsigned int bytes) > " sub %1,%0 \n" > " and $~15,%0 \n" > " mov %0,alloc-1b(%%edx) \n" > - " mov %0,%%edi \n" > - " rep movsb \n" > - : "=&r" (new), "+c" (bytes), "+S" (old) > - : : "edx", "edi", "memory"); > - return new; > + : "=&r" (s) : "r" (bytes) : "edx", "memory"); Can't "bytes" use a simple "g" constraint now? Preferably (i.e. if correct) this changed Acked-by: Jan Beulich Jan