mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jay Estabrook <Jay.Estabrook@compaq.com>
To: linux-kernel@vger.kernel.org
Subject: Re: alpha/2.4.x: CPU misdetection, possible miscompilation
Date: Thu, 17 May 2001 14:35:44 -0400	[thread overview]
Message-ID: <20010517143544.A8396@linux04.mro.cpqcorp.net> (raw)
In-Reply-To: <Pine.LNX.4.21.0105161739440.31072-100000@rainbow.studorg.tuwien.ac.at>
In-Reply-To: <Pine.LNX.4.21.0105161739440.31072-100000@rainbow.studorg.tuwien.ac.at>; from mike@rainbow.studorg.tuwien.ac.at on Thu, May 17, 2001 at 02:23:03PM +0200

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
-----------------------------------------------------------------------------

      parent reply	other threads:[~2001-05-17 19:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-17 12:23 Michael Wildpaner
2001-05-17 12:45 ` Alan Cox
2001-05-17 17:00   ` Michael Wildpaner
2001-05-17 17:36     ` Alan Cox
2001-05-17 18:35 ` Jay Estabrook [this message]

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=20010517143544.A8396@linux04.mro.cpqcorp.net \
    --to=jay.estabrook@compaq.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®