* Re: PPC32: Add support for the OpenPIC register set to be in BE mode. [not found] <200401032002.i03K23iM024298@hera.kernel.org> @ 2004-01-05 14:02 ` Geert Uytterhoeven 2004-01-05 15:28 ` Anton Blanchard 0 siblings, 1 reply; 3+ messages in thread From: Geert Uytterhoeven @ 2004-01-05 14:02 UTC (permalink / raw) To: Tom Rini; +Cc: Linux/PPC Development On Fri, 2 Jan 2004, Linux Kernel Mailing List wrote: > ChangeSet 1.1356.1.1, 2004/01/02 08:51:22-07:00, trini@kernel.crashing.org > > PPC32: Add support for the OpenPIC register set to be in BE mode. > > > # This patch includes the following deltas: > # ChangeSet 1.1356 -> 1.1356.1.1 > # arch/ppc/kernel/open_pic.c 1.25 -> 1.26 > # > > open_pic.c | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletion(-) > > > diff -Nru a/arch/ppc/kernel/open_pic.c b/arch/ppc/kernel/open_pic.c > --- a/arch/ppc/kernel/open_pic.c Sat Jan 3 12:02:04 2004 > +++ b/arch/ppc/kernel/open_pic.c Sat Jan 3 12:02:04 2004 > @@ -166,13 +166,21 @@ > { > u_int val; > > +#ifdef CONFIG_PPC_OPENPIC_BE > + val = in_be32(addr); > +#else > val = in_le32(addr); > +#endif > return val; > } Wouldn't it be better to #define openpic_in() and openpic_out() macros, so you need the #ifdef at one spot only? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PPC32: Add support for the OpenPIC register set to be in BE mode. 2004-01-05 14:02 ` PPC32: Add support for the OpenPIC register set to be in BE mode Geert Uytterhoeven @ 2004-01-05 15:28 ` Anton Blanchard 2004-01-05 15:41 ` Tom Rini 0 siblings, 1 reply; 3+ messages in thread From: Anton Blanchard @ 2004-01-05 15:28 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Tom Rini, Linux/PPC Development > > diff -Nru a/arch/ppc/kernel/open_pic.c b/arch/ppc/kernel/open_pic.c > > --- a/arch/ppc/kernel/open_pic.c Sat Jan 3 12:02:04 2004 > > +++ b/arch/ppc/kernel/open_pic.c Sat Jan 3 12:02:04 2004 > > @@ -166,13 +166,21 @@ > > { > > u_int val; > > > > +#ifdef CONFIG_PPC_OPENPIC_BE > > + val = in_be32(addr); > > +#else > > val = in_le32(addr); > > +#endif > > return val; > > } > > Wouldn't it be better to #define openpic_in() and openpic_out() macros, so you > need the #ifdef at one spot only? Or grab the bit out of the ppc64 openpic code that detects this at runtime and get rid of the CONFIG option completely :) Anton ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PPC32: Add support for the OpenPIC register set to be in BE mode. 2004-01-05 15:28 ` Anton Blanchard @ 2004-01-05 15:41 ` Tom Rini 0 siblings, 0 replies; 3+ messages in thread From: Tom Rini @ 2004-01-05 15:41 UTC (permalink / raw) To: Anton Blanchard; +Cc: Geert Uytterhoeven, Linux/PPC Development On Tue, Jan 06, 2004 at 02:28:30AM +1100, Anton Blanchard wrote: > > > diff -Nru a/arch/ppc/kernel/open_pic.c b/arch/ppc/kernel/open_pic.c > > > --- a/arch/ppc/kernel/open_pic.c Sat Jan 3 12:02:04 2004 > > > +++ b/arch/ppc/kernel/open_pic.c Sat Jan 3 12:02:04 2004 > > > @@ -166,13 +166,21 @@ > > > { > > > u_int val; > > > > > > +#ifdef CONFIG_PPC_OPENPIC_BE > > > + val = in_be32(addr); > > > +#else > > > val = in_le32(addr); > > > +#endif > > > return val; > > > } > > > > Wouldn't it be better to #define openpic_in() and openpic_out() macros, so you > > need the #ifdef at one spot only? I suppose we should do it like that for 2.6 (note made). > Or grab the bit out of the ppc64 openpic code that detects this at runtime > and get rid of the CONFIG option completely :) I assume you mean the broken_ipi_registers bit (I only see used in one spot in what I've got locall) ? I think maybe with some thought it could work (it's needed in openpic_{read,write} as well for these machines, prpmc800 and e500, iirc). -- Tom Rini http://gate.crashing.org/~trini/ ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-05 15:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200401032002.i03K23iM024298@hera.kernel.org>
2004-01-05 14:02 ` PPC32: Add support for the OpenPIC register set to be in BE mode Geert Uytterhoeven
2004-01-05 15:28 ` Anton Blanchard
2004-01-05 15:41 ` Tom Rini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).