[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME



> 
> > +        void (*fn)(const struct cpu_user_regs *) = (void *)regs-
> > >BUG_FN_REG;
> 
> ... this, wouldn't it be better (and independent of the specific
> arch) if
> you checked for BUG_FN_REG being defined?
> 
> Another (#ifdef-free) variant would be to have bug_ptr() take a 2nd
> argument
> and then uniformly use ...
> 
> > +#else
> > +        void (*fn)(const struct cpu_user_regs *) = bug_ptr(bug);
> 
> ... this, slightly altered to
> 
>         void (*fn)(const struct cpu_user_regs *) = bug_ptr(bug,
> regs);
I think that I will go with BUG_FN_REG instead of changing bug_ptr()'s
arguments as bug_ptr() is used below to get file name so it won't be
clear what bug_ptr() should return either an address of file name or
regs->BUG_FN_REG.
> 
> > +#endif
> > +
> > +        fn(regs);
> > +        return 0;
> > +    }
> > +
> > +    /* WARN, BUG or ASSERT: decode the filename pointer and line
> > number. */
> > +    filename = bug_ptr(bug);
> > +    if ( !is_kernel(filename) && !is_patch(filename) )
> 

~ Oleksii




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.