[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/23] x86/boot/reloc: create generic alloc and copy funct
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2 05/23] x86/boot/reloc: create generic alloc and copy functions |
Date: |
Tue, 18 Aug 2015 00:03:48 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Aug 17, 2015 at 09:51:58AM -0600, Jan Beulich wrote:
> >>> On 20.07.15 at 16:29, <address@hidden> 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 <address@hidden>
> > Reviewed-by: Andrew Cooper <address@hidden>
> > ---
> > 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.
OK.
> > @@ -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?
Works...
> Preferably (i.e. if correct) this changed
..., so, I will change that.
> Acked-by: Jan Beulich <address@hidden>
Thanks!
Daniel