Re: alpha/2.4.x: CPU misdetection, possible miscompilation

From: Jay Estabrook (Jay.Estabrook@compaq.com)
Date: Thu May 17 2001 - 13:35:44 EST


On Thu, May 17, 2001 at 02:23:03PM +0200, Michael Wildpaner wrote:
>
> trying to boot any 2.4.x kernel on a Tsunami DP264 alpha with dual EV67,
> we found the following problems:
>
> CPU misdetection:
>
> On our machine the cpu->type field contains 0x80000000B
> (= 2^35 + 11) instead of 0xB (= hwrpb.h: #define EV67_CPU 11).
>
> The spurious high bit leads to false/default values for
> on_chip_cache in smp.c:smp_tune_scheduling.
>...
>+/* mask for cpu->type (arbitrary assumption based on #define's in hwrpb.h) */
>+#define CPU_TYPE_MASK 0xFFFFFF
>...
>- switch (cpu->type)
>+ switch (cpu->type & CPU_TYPE_MASK)

The Alpha Architecture Reference Manual describes the PROCESSOR TYPE field
of the per-CPU slot HWRPB information, as:

        bits interpretation
        ---- --------------
        63-32 minor type
        31-0 major type

so the above patch should have CPU_TYPE_MASK as 0xffffffff (optimistic :-);
or you could just:

        switch ((unsigned int) cpu->type)

like the /proc/cpuinfo printing code in setup.c does.

The "minor type" is usually a reference to the "pass" number of the chip,
and can be ignored.

--Jay++

-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
-
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/



This archive was generated by hypermail 2b29 : Wed May 23 2001 - 21:00:24 EST