* question from linuxppc group
@ 2001-09-25 20:02 Jim Potter
2001-09-25 21:35 ` Benjamin Herrenschmidt
2001-09-25 23:39 ` Eyal Lebedinsky
0 siblings, 2 replies; 6+ messages in thread
From: Jim Potter @ 2001-09-25 20:02 UTC (permalink / raw)
To: linux-kernel
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?
--
Sincerely,
Jim Potter
45th Parallel Processing
jrp@wvi.com
"It is rather for us to be here dedicated to the great
task remaining before us -- that from these honored dead
we take increased devotion to that cause for which they
gave the last full measure of devotion -- that we here
highly resolve that these dead shall not have died in vain,
that this nation under God shall have a new birth of
freedom, and that government of the people, by the people,
for the people shall not perish from the earth.
A. Lincoln, Gettysburg, 1863
ln -sf /dev/null /osama/bin/laden
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question from linuxppc group
2001-09-25 20:02 question from linuxppc group Jim Potter
@ 2001-09-25 21:35 ` Benjamin Herrenschmidt
2001-09-25 21:42 ` James Simmons
2001-09-25 21:54 ` Tom Rini
2001-09-25 23:39 ` Eyal Lebedinsky
1 sibling, 2 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2001-09-25 21:35 UTC (permalink / raw)
To: Jim Potter; +Cc: linux-kernel
>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?
Well, most of the PCI & interrupt frameworks are mostly arch specific.
I can't tell for MIPS, but the way you setup a PCI host bridge on PPC
was written by me and Paulus without looking at MIPS.
I don't think there is real need to have common code here. Maybe some
common definitions (register defs for example) could go into a linux/*.h
file.
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question from linuxppc group
@ 2001-09-25 21:36 Benjamin Herrenschmidt
0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2001-09-25 21:36 UTC (permalink / raw)
To: Jim Potter; +Cc: linux-kernel
>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?
Well, most of the PCI & interrupt frameworks are mostly arch specific.
I can't tell for MIPS, but the way you setup a PCI host bridge on PPC
was written by Paulus and me without looking at MIPS.
I don't think there is real need to have common code here. Maybe some
common definitions (register defs for example) could go into a linux/*.h
file.
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question from linuxppc group
2001-09-25 21:35 ` Benjamin Herrenschmidt
@ 2001-09-25 21:42 ` James Simmons
2001-09-25 21:54 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: James Simmons @ 2001-09-25 21:42 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Jim Potter, linux-kernel
> Well, most of the PCI & interrupt frameworks are mostly arch specific.
> I can't tell for MIPS, but the way you setup a PCI host bridge on PPC
> was written by me and Paulus without looking at MIPS.
We toke the ideas from the PPC people and applied to the mips tree. Same
for the time code.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question from linuxppc group
2001-09-25 21:35 ` Benjamin Herrenschmidt
2001-09-25 21:42 ` James Simmons
@ 2001-09-25 21:54 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2001-09-25 21:54 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Jim Potter, linux-kernel
On Tue, Sep 25, 2001 at 11:35:57PM +0200, Benjamin Herrenschmidt 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?
>
> Well, most of the PCI & interrupt frameworks are mostly arch specific.
> I can't tell for MIPS, but the way you setup a PCI host bridge on PPC
> was written by me and Paulus without looking at MIPS.
Well, MIPS has been looking at us a bit I know. Also, the patch that
Mark/Matt did uses the pci_auto stuff for setting up the bridges (iirc
thats what that code is for anyhow :)) and MIPS has been using that
as well of late, tho their gt64120 bits don't look like they use it
right now.
> I don't think there is real need to have common code here. Maybe some
> common definitions (register defs for example) could go into a linux/*.h
> file.
If nothing else, yeah. And all of the drivers into drivers/.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question from linuxppc group
2001-09-25 20:02 question from linuxppc group Jim Potter
2001-09-25 21:35 ` Benjamin Herrenschmidt
@ 2001-09-25 23:39 ` Eyal Lebedinsky
1 sibling, 0 replies; 6+ messages in thread
From: Eyal Lebedinsky @ 2001-09-25 23:39 UTC (permalink / raw)
To: linux-kernel
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/>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-09-25 23:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-25 20:02 question from linuxppc group Jim Potter
2001-09-25 21:35 ` Benjamin Herrenschmidt
2001-09-25 21:42 ` James Simmons
2001-09-25 21:54 ` Tom Rini
2001-09-25 23:39 ` Eyal Lebedinsky
-- strict thread matches above, loose matches on Subject: below --
2001-09-25 21:36 Benjamin Herrenschmidt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.