Port-m68k archive

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

Re: MVME177 panic: pmap_enter_ptpage (PR #45915 on 6.x)



On Thu, Sep 19, 2013 at 09:52:44PM +0900, Izumi Tsutsui wrote:
> Does anyone have suggestion how this should be fixed?
> Rewrite outstr (and the similar outln) functions in asm?

This might be a bit overengeneered, but you could create arg-count specific
macros and create the functions with cpp:

#define DEFCALL_A2(CALLNO)                                      \
static inline int CALL_##CALLNO(void *arg0, void *arg1)         \
{                                                               \
        int ret;                                                \
        __asm volatile ("movel %0, %%sp@-; movel %0,%%sp@-;"    \
                        "trap #15; .short " #CALLNO ";"         \
                        "movew %%sr,%0"                         \
                         : "=d" (ret)                           \
                         : "r" (arg0), "r" (arg1)               \
                         :);                                    \
        return ret;                                             \
}

DEFCALL_A2(MVMEPROM_OUTSTR)

and then just call it like:

  CALL_MVMEPROM_OUTSTR(start, end);


Martin


Home | Main Index | Thread Index | Old Index