lkml.org 
[lkml]   [1999]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] read[bwl] and ioremap problem
   Date:   Sat, 18 Dec 1999 15:50:19 -0800 (PST)
From: Linus Torvalds <torvalds@transmeta.com>

THAT case is certainly a rather strong argument for using something
like "gsc_read[bwl]()" on HP-PA.

The other strong reason for doing gsc_read[bwl] on HP-PA is that some
PA-RISC boxes have both a GSC bus *and* a PCI bus, and you need to
access devices on both buses....

Something to consider is that for certain drivers, such as the serial
driver, I'm already having to do a serial_inp() which dispatches to the
proper {inb,readb,gsc_readb} already. Yes I take a overhead/performance
hit for doing this, but it's the only clean way to support both ISA and
PCI serial boards in a single i386 box, or to support multiple buses in
the HP-PA scenario.

We've historically said that this kind of thing is horrible for
performance reasons, and the SCO and NetBSD approaches of doing
parameterized I/O has been derided for that reason. However, it's
something that perhaps we should rethink; on modern CPU's, the extra
procedure activation/deactivation isn't *that* expensive, and it ends up
making the drivers much more portable and easier to support multiple
architectures. The alternative is that each driver author ends up
writing their own I/O dispatch routines, such as what's currently in the
serial driver. While this approach does have some advantages, in that
each driver author can decide whether or not he/she wishes to pay the
indirection overhead, it can mean code duplication and a delay before
certain devices get supported on non-mainline architectures.

Something to think about.

- Ted

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.149 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site