[PATCH 2/11] cell: generalize io-workarounds code
Benjamin Herrenschmidt
benh at kernel.crashing.org
Mon Mar 24 21:44:34 EST 2008
On Mon, 2008-03-24 at 21:41 +1100, Benjamin Herrenschmidt wrote:
> On Fri, 2008-03-14 at 21:20 +0900, Ishizaki Kou wrote:
> > This patch splits cell io-workaround code into spider-pci dependent
> > code and a generic part, and also adds interfaces to the generic
> > io-workaround mechanism.
> >
> > Signed-off-by: Kou Ishizaki <kou.ishizaki at toshiba.co.jp>
> > ---
>
> Hi !
>
> I noticed that you add a second level of indirection. We already have
> one going to the workarounds in the first place, so that looks a bit too
> much to my taste.
>
> I may have missed something in your patch but if the workarounds are
> specific to a given bridge, they may as well set the top level
> indirections once straight to the right workarounds.
Looking more closely, I wonder if a good solution would be to move the
function pointers away from globals, to the dev_archdata structure,
and thus make them per-device (like the DMA ops)
That way, you can populate the workarounds differently for the PCI
devices and the PCI-E devices at probe time and still have only one
indirection.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list