Re: 2.6.7-rc3-mm1

William Lee Irwin III
2004-06-09T15:03:57Z

On Wed, Jun 09, 2004 at 07:48:09AM -0700, William Lee Irwin III wrote:
> I'm questioning whether the marking scheme is worth anything and if I
> should just rely on bounds-checking against the dynamically-detected
> physical APIC ID instead.

Actually I think blowing it away immediately is best. Bounds checks
don't work for everything.

-- wli

Index: mm1-2.6.7-rc3/arch/i386/kernel/mpparse.c
===================================================================
--- mm1-2.6.7-rc3.orig/arch/i386/kernel/mpparse.c 2004-06-09 07:42:04.221000000 -0700
+++ mm1-2.6.7-rc3/arch/i386/kernel/mpparse.c 2004-06-09 07:54:51.703325000 -0700
@@ -119,16 +119,6 @@
}
#endif

-static void MP_mark_version_physids(int version)
-{
- int i;
-
- for (i = 0; i < MAX_APICS; ++i) {
- if (!MP_valid_apicid(i, version))
- physid_set(i, phys_cpu_present_map);
- }
-}
-
void __init MP_processor_info (struct mpc_config_processor *m)
{
int ver, apicid;
@@ -207,9 +197,7 @@
num_processors++;
ver = m->mpc_apicver;

- if (MP_valid_apicid(apicid, ver))
- MP_mark_version_physids(ver);
- else {
+ if (!MP_valid_apicid(apicid, ver)) {
printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n",
m->mpc_apicid, MAX_APICS);
--num_processors;
Index: mm1-2.6.7-rc3/arch/i386/mach-visws/mpparse.c
===================================================================
--- mm1-2.6.7-rc3.orig/arch/i386/mach-visws/mpparse.c 2004-06-09 07:11:51.380594000 -0700
+++ mm1-2.6.7-rc3/arch/i386/mach-visws/mpparse.c 2004-06-09 07:57:04.521134000 -0700
@@ -75,14 +75,6 @@
m->mpc_apicid);
ver = 0x10;
}
- if (ver >= 0x14)
- physid_set(0xff, phys_cpu_present_map);
- else {
- int i;
-
- for (i = 0xf; i < MAX_APICS; ++i)
- physid_set(i, phys_cpu_present_map);
- }
apic_version[m->mpc_apicid] = ver;
}