
Messages in this thread

In article <>, (Timur Tabi) writes:
> ** Reply to message from Robert Kaiser <> on Tue, 9 Jan 2001
> 23:17:11 +0100
>> temp = mk_pte_phys(__pa(vaddr), PAGE_KERNEL);
>> *pte = temp;
>> 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
> 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:
Am Pfaffenstein 14 phone: (49) 6136 9948-762
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.032 / U:0.668 seconds]