[sheepdog] [PATCH] Fix hardcode AMD64 assembly code (RSP)

Hitoshi Mitake mitake.hitoshi at gmail.com
Mon Jul 29 07:05:27 CEST 2013


At Mon, 29 Jul 2013 11:28:03 +0800,
Liu Yuan wrote:
> 
> On Sun, Jul 28, 2013 at 05:39:32PM +0900, Hitoshi Mitake wrote:
> > At Sun, 28 Jul 2013 02:05:49 +0800,
> > YunQiang Su wrote:
> > > 
> > > RSP is a register name only for AMD64 (x86_64) platform,
> > > while on other platform it may be another name.
> > > 
> > > On i386 (x86_32) platform, it is "esp".
> > > On most of RISC platform (PowerPC, SPARC, MIPS, ARM, etc),
> > > it is "sp".
> > 
> > Please add your Signed-off-by tag here. It would be like this: 
> > Signed-off-by: YunQiang Su <wzssyqa at gmail.com>
> > 
> > > ---
> > >  include/logger.h | 23 ++++++++++++++++++++++-
> > >  lib/logger.c     |  5 -----
> > >  2 files changed, 22 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/include/logger.h b/include/logger.h
> > > index 79eb108..81691b2 100644
> > > --- a/include/logger.h
> > > +++ b/include/logger.h
> > > @@ -38,10 +38,31 @@ void log_write(int prio, const char *func, int line, const char *fmt, ...)
> > >  void set_thread_name(const char *name, bool show_idx);
> > >  void get_thread_name(char *name);
> > >  
> > > +#ifdef __i386__
> > > +#define SP_REG "esp"
> > > +#elif defined(__x86_64__)
> > > +#define SP_REG "rsp"
> > > +#elif defined(__mips__) || defined(__sparc__) || \
> > > +      defined (__arm__) || (defined __powerpc__) || \
> > > +      defined (__s390__) || (defined __s390x__) || \
> > > +      defined (__ia64__)
> > > +#define SP_REG "sp"
> > > +#endif
> > 
> > sheepdog cannot support ia64. Because sheepdog depends on urcu and
> > urcu doesn't support ia64.
> > 
> > I think supporting i386 and arm would be enough. Supporting other
> > architectures would be too costly, at least for now.
> 
> http://packages.debian.org/jessie/sheepdog
> 
> In debian, sheepdog has a wide ranage of architectures support. Why costly? SD
> is just pure userspace, OS will abstract out all the architecture stuff.

Testing sheepdog on various architectures would be costly. But making
packages for them is not so costly, sorry.

Thanks,
Hitoshi



More information about the sheepdog mailing list