Re: [PATCH 2.6] Altix updates

From: Patrick Gefre
Date: Tue Jan 20 2004 - 15:16:30 EST


Christoph Hellwig wrote:

On Tue, Jan 20, 2004 at 11:50:19AM -0600, Patrick Gefre wrote:


Yes this probably looks a little odd. This was setup this way for TIO. The macro in the TIO code checks to see
if it is a 'soft' struct or bridge address AND what bridge type it is - accessing different registers depending
on TIO or not TIO (the 2 cases we have so far). We think this makes the register access functions pretty flexible/generic.



Sorry, but this is completly bogus. Just declare one accessor per
datatype.



Guess I don't understand your point. Do you want us to create separate functions for soft-struct and bridge address
and TIO and non-TIO - 4 functions for each register access, rather than 1 ?

That seems to add a lot of extra code now and we'll need to add new functions as we add more ASIC interfaces - which is exactly
what we are trying to avoid. The way we have it, if we add a new ASIC we just need to make the lowest level functions ASIC-aware
and then we are done - no need to have blocks of if-then-else code in the mainline to determine which function to call.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/