lkml.org 
[lkml]   [2003]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6-test2: gcc-3.3.1 warning.

On Sat, 16 Aug 2003, Richard Henderson wrote:
>
> Fixed by doing
>
> __asm__ __volatile__("lidt %0": :"m" (*no_idt));

Good catch, although I'd prefer something like this instead (ie change
"no_idt" to be a real IDT descriptor, like the other ones).

It shouldn't matter all that much, since the only thing that really
matters is to load the IDT with bogus values, so just about anything
should do it.

Linus

--- 1.9/arch/i386/kernel/reboot.c Mon Aug 11 14:55:58 2003
+++ edited/arch/i386/kernel/reboot.c Sat Aug 16 18:33:05 2003
@@ -16,7 +16,6 @@
*/
void (*pm_power_off)(void);

-static long no_idt[2];
static int reboot_mode;
int reboot_thru_bios;

@@ -87,7 +86,9 @@
unsigned long long * base __attribute__ ((packed));
}
real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries },
-real_mode_idt = { 0x3ff, 0 };
+real_mode_idt = { 0x3ff, 0 },
+no_idt = { 0, 0 };
+

/* This is 16-bit protected mode code to disable paging and the cache,
switch to real mode and jump to the BIOS reset code.
-
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/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.121 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site