[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1217972753.24157.204.camel@pasglop>
Date: Wed, 06 Aug 2008 07:45:53 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Karsten Keil <kkeil@...e.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, isdn4linux@...tserv.isdn4linux.de,
"Andreas.Eversberg" <Andreas.Eversberg@...satel.de>
Subject: Re: [PATCH 3/4] Fix remaining big endian issue of hfcmulti
> static void
> my_out32(struct card *c, u_int offset, u-int data)
> {
> if (c->mode == MMIO) {
> ...
> } else {
> ...
> }
> }
>
> or use 2 function, one for the MMIO and one for the PIO model and then use
> indirect calls (like c->my_out32(...)) ?
The former is more ugly but slightly faster on some archs.
Indirect function calls tend to be slightly slower than an if / else
statement that can be more easily predicted by the processor.
But in the case of IOs, it's not going to be a big deal, -especially- if
you use the _rep forms for data transfers (and thus don't do an indirect
call for each read/write). So it's totally up to you.
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists