From: Linus Torvalds <torvalds@transmeta.com>
To: ja@himel.com, linux-kernel@vger.kernel.org
Subject: Re: cpuid_eax damages registers (2.4.7pre7)
Date: Wed, 18 Jul 2001 08:10:22 -0700 [thread overview]
Message-ID: <200107181510.f6IFAMW03662@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10107181347030.16710-100000@l>
In article <Pine.LNX.4.10.10107181347030.16710-100000@l> you write:
>
> I don't know whether cpuid_eax (2.4.7pre) should preserve the
>registers changed from cpuid
It should. It has the proper "this instruction assigned values to these
registers" stuff, so gcc should know which ones change.
> but I have an oops on boot with 2.4.7pre7 in
>squash_the_stupid_serial_number where cpuid_eax changes ebx and the
>parameter "c" is loaded with "Genu". The following change fixes the
>problem:
Interesting. Can you do the following:
- tell us your compiler version
- do a "make arch/i386/kernel/setup.s" both ways, and show what
squash_the_stupid_serial_number() looks like.
- fix _all_ the "cpuid*()" functions to have
:"0" (op)
instead of their current incorrect
:"a" (op)
(we're supposed to explicitly tell the compiler that the first input
is the same as the first output)
- see if that makes any difference to the assembler output.
In any case it does sound like a compiler bug, but it would be good to
have a workaround. But it would also be good to have a more complete
dump of the oops in question to see more about what is going on..
Thanks,
Linus
next prev parent reply other threads:[~2001-07-18 15:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-18 10:48 cpuid_eax damages registers (2.4.7pre7) Julian Anastasov
2001-07-18 15:10 ` Linus Torvalds [this message]
2001-07-18 17:08 ` Julian Anastasov
2001-07-18 17:21 ` Linus Torvalds
2001-07-18 20:43 ` Kai Germaschewski
2001-07-18 22:04 ` Linus Torvalds
2001-07-18 22:25 ` Kai Germaschewski
2001-07-19 8:23 ` Julian Anastasov
2001-07-19 18:36 ` H. Peter Anvin
2001-07-20 1:42 ` Julian Anastasov
2001-07-19 22:51 ` H. Peter Anvin
2001-07-20 2:01 ` Julian Anastasov
2001-07-19 23:02 ` H. Peter Anvin
2001-07-19 22:55 ` Linus Torvalds
2001-07-20 2:19 ` Julian Anastasov
2001-07-19 23:23 ` H. Peter Anvin
2001-07-19 23:24 ` Linus Torvalds
2001-07-22 0:00 ` Richard Henderson
2001-07-22 4:27 ` H. Peter Anvin
2001-07-21 23:45 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2001-07-18 20:30 Rick Hohensee
2001-07-19 5:15 ` Keith Owens
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=200107181510.f6IFAMW03662@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=ja@himel.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