Re: question from linuxppc group

Eyal Lebedinsky (eyal@eyal.emu.id.au)
Wed, 26 Sep 2001 09:39:24 +1000


Jim Potter wrote:
>
> We have a host bridge (plus PIC, mem ctlr, etc.) that is essentially
> identical
> for ppc and mips. Where is the best place to put the code since we
> don't want to
> duplicate it for both architectures?

A common practice is to create a pseudo-arch directory, let's called
it 'shared' or 'common' and under it a directory for each component
that is shared. We can now have symbolic links for s shared file:
arch/[mips|ppc]/pic.c -> arch/shared/pic-mippc.c

Or, for a shared subsystem 'pic1234'
arch/[mips|ppc]/pic -> arch/shared/pic-mippc

One can even look at more similar archs and have
arch/[mips|ppc]/pic -> arch/shared/mippc/pic
arch/[mips|ppc]/mem -> arch/shared/mippc/mem

--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.anu.edu.au/eyal/>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/