linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* halt/reset on assert?
@ 2011-04-02  0:22 Evan Lavelle
  0 siblings, 0 replies; 7+ messages in thread
From: Evan Lavelle @ 2011-04-02  0:22 UTC (permalink / raw)
  To: linuxppc-dev

I'd like to use an assert macro in a device driver for an MPC870 using 
ppcboot; something like:

#define MY_ASSERT(expr)                                         \
    do {                                                         \
       if(!(expr)) {                                             \
          printk(                                                \
             KERN_EMERG                                          \
             "assertion failure: %s, line %d\n",                 \
             __FILE__, __LINE__);                                \
          asm(--ppc halt/reset?)                                 \
       }                                                         \
    } while(0)

However, I've got no idea how to halt or reset the processor here. 
Anyone happen to know?

Thanks -

Evan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-07 21:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4D966C5C.9030409__15236.8285613649$1301704900$gmane$org@cyconix.com>
2011-04-02  6:51 ` halt/reset on assert? Andreas Schwab
2011-04-02  6:53 ` Andreas Schwab
2011-04-06 13:01   ` Evan Lavelle
2011-04-07  7:55     ` Benjamin Herrenschmidt
2011-04-07 17:04       ` kevin diggs
2011-04-07 21:48         ` Benjamin Herrenschmidt
2011-04-02  0:22 Evan Lavelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).