Messages in this thread | | | Date | Wed, 8 Mar 2000 08:43:09 +0100 | From | Jakub Jelinek <> | Subject | Re: Can we dispose of __irq_itoa() ? |
| |
On Tue, Mar 07, 2000 at 11:21:46PM -0800, Pete Zaitcev wrote: > Hi, > > I kinda have my doubts about __irq_itoa, which does not appear > terribly SMP safe... and incurs one more #ifdef __sparc__ > in every damn driver that is shared, even if it is never > going to be used on sun4d (which is the only architecture > with a nontrivial __irq_itoa).
Wrong, see include/asm-sparc64/irq.h, sparc64 has non-trivial __irq_itoa as well. To make them SMP safe, we could do something like: sparc64: #define IRQ_FORMAT "%d,%x" #define IRQ_ARGS(irq) __irq_pil(irq), (unsigned int)__irq_ino(irq) on say i386 #define IRQ_FORMAT "%d" #define IRQ_ARGS(irq) (irq)
and drivers could use it without #ifdef __sparc__ like this:
printk(KERN_ERR "%s: request irq " IRQ_FORMAT " failure\n", ncr_name(np), IRQ_ARGS(irq));
The question would be what to do on sparc, but perhaps we could just throw the ,%x argument on some sun4d irqs (and only provide pil there).
Cheers, Jakub ___________________________________________________________________ Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj Linux version 2.3.47 on a sparc64 machine (1343.49 BogoMips) ___________________________________________________________________
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |