From: James Bottomley <James.Bottomley@steeleye.com>
To: colpatch@us.ibm.com
Cc: "Martin J. Bligh" <mbligh@aracnet.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] NUMAQ subarchification
Date: 18 Mar 2003 11:16:20 -0500 [thread overview]
Message-ID: <1048004181.2210.53.camel@mulgrave> (raw)
In-Reply-To: <3E767D45.6020308@us.ibm.com>
On Mon, 2003-03-17 at 20:58, Matthew Dobson wrote:
>
> I'm inclined to agree with Martin on this one. The useless code
> duplication is outright stupidity. Makefile hackery would work, as
> would James' suggestion of #include'ing the .c files. I tend to agree
> with his assessment of that as the least of evils. But until we have a
> good way of falling back to mach-default for .c files, I'm going to
> leave the one (relatively) small .c file in arch/i386/kernel. It will
> be trivial to move it later, and for now it sits nicely next to it's
> kin: arch/i386/kernel/numaq.c.
There are five hooks in setup.c (since I assume SUMMIT isn't MCA),
amounting to about 20 lines of code in all. There is no extra code in
the hooks which doesn't serve a purpose to the rest of the subarch
implementations.
I also notice there's some summit code that *should* be in an arch hook:
> diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.65-vanilla/arch/i386/kernel/setup.c linux-2.5.65-summit_pcimap/arch/i386/kernel/setup.c
> --- linux-2.5.65-vanilla/arch/i386/kernel/setup.c Mon Mar 17 13:44:05 2003
> +++ linux-2.5.65-summit_pcimap/arch/i386/kernel/setup.c Mon Mar 17 17:34:03 2003
> @@ -939,6 +939,9 @@
> if (smp_found_config)
> get_smp_config();
> #endif
> +#ifdef CONFIG_X86_SUMMIT
> + setup_summit();
> +#endif
>
> register_memory(max_low_pfn);
>
> --- linux-2.5.65-vanilla/include/asm-i386/mpspec.h Mon Mar 17 13:43:37 2003
> +++ linux-2.5.65-summit_pcimap/include/asm-i386/mpspec.h Mon Mar 17 17:34:03 2003
> @@ -222,6 +222,10 @@
> extern int pic_mode;
> extern int using_apic_timer;
>
> +#ifdef CONFIG_X86_SUMMIT
> +extern void setup_summit (void);
> +#endif
> +
which is already there waiting for you to use it.
As I've already pointed out, the summit topology.c file should be split
out from the default one and the #ifdef CONFIG_NUMA removed.
All in all, properly done, there would be very little code duplication
even for something as PC like as the summit.
If I read correctly between the whines, the real issue is that subarch
is used to support things that vary from uniquely oddball to extremely
weird and are all ancient and highly unlikely ever to be found in
nature. IBM, understandably, doesn't want its brand new and expensive
summit lumped with such company.
I'm not the gatekeeper of code purity in arch/i386/kernel, so if you can
convince Linus, he'll probably take it. However, if you could come up
with a cogent technical argument why you can't use the subarch (or
modify it for your needs), it would probably be helpful. Not wanting to
duplicate 15 lines of code isn't really that convincing...
James
next prev parent reply other threads:[~2003-03-18 16:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-14 21:12 [patch] Summit support for pcibus <-> cpumask topology James Bottomley
2003-03-15 1:41 ` [patch] Summit support for pcibus <-> cpumask topology [1/2] Matthew Dobson
2003-03-15 1:43 ` [patch] Summit support for pcibus <-> cpumask topology [2/2] Matthew Dobson
2003-03-15 1:46 ` [patch] NUMAQ subarchification Matthew Dobson
2003-03-15 2:05 ` Martin J. Bligh
2003-03-15 17:53 ` James Bottomley
2003-03-15 17:58 ` Martin J. Bligh
2003-03-16 2:53 ` Kai Germaschewski
2003-03-16 3:22 ` Martin J. Bligh
2003-03-16 5:05 ` James Bottomley
2003-03-16 5:55 ` Kai Germaschewski
2003-03-16 14:36 ` James Bottomley
2003-03-16 1:07 ` Alan Cox
2003-03-16 2:24 ` Martin J. Bligh
2003-03-16 4:31 ` James Bottomley
2003-03-18 1:58 ` Matthew Dobson
2003-03-18 16:16 ` James Bottomley [this message]
2003-03-18 16:30 ` Martin J. Bligh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1048004181.2210.53.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=colpatch@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox