From: Robert Kaiser <rob@sysgo.de>
To: ttabi@interactivesi.com
Cc: linux-kernel@vger.kernel.org
Date: Tue, 9 Jan 2001 23:57:52 +0100 [thread overview]
Message-ID: <01011000323301.03050@rob> (raw)
Hi,
In article <20010109224454Z129835-400+2448@vger.kernel.org>,
ttabi@interactivesi.com (Timur Tabi) writes:
> ** Reply to message from Robert Kaiser <rob@sysgo.de> on Tue, 9 Jan 2001
> 23:17:11 +0100
>
>
>> temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL);
>> *pte = temp;
>>
>> where temp is declared "volatile pte_t". I inserted test-prints between the
>> above two lines. Accoding to that, the _first_ line , i.e. the evaluation of the
>> mk_pte_phys() macro is causing the crash!
>
> In that case, it's either a compiler bug or a race condition.
>
> Compiling this source file with the -S option will generate an assembly output.
> The output should be the same regardless of whether you use the temp variable or
> not. That will answer the question as to what the cause is. If you're lucky,
> it's a compiler bug, because they're easier to fix.
>
>
I thought that by declaring temp "volatile" I could force the compiler to not
optimize it away, i.e. make sure that the evaluation of the mk_pte_phys()
macro and the assignment to *pte indeed get seperated. Is this not the case ?
Anyway, the actual code I'm using has debug output in between the lines, so it
looks more like this:
*((volatile unsigned char*)0xb8000) = '1';
temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL);
*((volatile unsigned char*)0xb8000) = '2';
*pte = temp;
*((volatile unsigned char*)0xb8000) = '3';
When the system crashes, just before the BIOS clears the screen, I can clearly
see a '2' in the upper left corner of the screen.
----------------------------------------------------------------
Robert Kaiser email: rkaiser@sysgo.de
SYSGO RTS GmbH
Am Pfaffenstein 14 phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
reply other threads:[~2001-01-09 23:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=01011000323301.03050@rob \
--to=rob@sysgo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ttabi@interactivesi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.