From: Peter Korsgaard <jacmet@sunsite.dk>
To: linux-kernel@vger.kernel.org
Subject: serial/8250: Platform override of is_real_interrupt
Date: Wed, 29 Mar 2006 14:23:31 +0200 [thread overview]
Message-ID: <8764lxphh8.fsf@sleipner.barco.com> (raw)
Hi,
I'm using the serial/8250 driver on a ML300 based PPC board which uses
interrupt vector 0 for the UART.
is_real_interrupt() unfortunately interpretes IRQ0 as meaning no
interrupt, so performance is kinda crap.
How to fix? 8250.c is setup so that asm/serial.h is included after the
definition of is_real_interrupt and the idea is that you can redefine
it in your platform header if needed. Now, this doesn't work on PPC as
the platform headers are included in asm/io.h AND asm/serial.h so they
won't be reparsed the second time.
I see 3 options:
1) Put an #ifndef is_real_interrupt around the is_real_interrupt
definition so the platform header can define it's own version
independent of inclusion order.
2) A lot of platforms (but not all) define NO_IRQ to something
sensible (-1). Define is_real_interrupt in terms of NO_IRQ instead
of testing against 0. For the remaining platforms we could locally
define NO_IRQ to 0 to keep the old behavior.
3) Put the redefine directly in asm/serial.h surrounded by an #ifdef
CONFIG_XILINX_ML300 (ugly)
Which solution is preferable?
--
Bye, Peter Korsgaard
next reply other threads:[~2006-03-29 12:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-29 12:23 Peter Korsgaard [this message]
2006-03-29 14:12 ` serial/8250: Platform override of is_real_interrupt Alan Cox
2006-03-30 6:42 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8764lxphh8.fsf@sleipner.barco.com \
--to=jacmet@sunsite.dk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.