diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2009-08-09 17:03:52 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-10 11:10:52 +0200 |
commit | c7425314c755d5f94da7c978205c85a7c6201212 (patch) | |
tree | ef0e1152756a6e113a6d6b0cebc53b263eb78974 /drivers/pnp | |
parent | 4c711576b90cc36c13b94816a953a8de6a53d03c (diff) | |
download | linux-3.10-c7425314c755d5f94da7c978205c85a7c6201212.tar.gz linux-3.10-c7425314c755d5f94da7c978205c85a7c6201212.tar.bz2 linux-3.10-c7425314c755d5f94da7c978205c85a7c6201212.zip |
x86: Introduce GDT_ENTRY_INIT(), initialize bad_bios_desc statically
Fully initialize bad_bios_desc statically instead of doing some
fields statically and some dynamically.
Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
LKML-Reference: <20090809080350.GA4765@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/pnpbios/bioscalls.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index bd035e3d355..fc83783c3a9 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c @@ -60,7 +60,8 @@ do { \ set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \ } while(0) -static struct desc_struct bad_bios_desc = GDT_ENTRY_INIT(0x4092, 0, 0); +static struct desc_struct bad_bios_desc = GDT_ENTRY_INIT(0x4092, + (unsigned long)__va(0x400UL), PAGE_SIZE - 0x400 - 1); /* * At some point we want to use this stack frame pointer to unwind @@ -476,8 +477,6 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header) pnp_bios_callpoint.offset = header->fields.pm16offset; pnp_bios_callpoint.segment = PNP_CS16; - set_desc_base(&bad_bios_desc, (unsigned long)__va(0x40UL << 4)); - set_desc_limit(&bad_bios_desc, 4095 - (0x40 << 4)); for_each_possible_cpu(i) { struct desc_struct *gdt = get_cpu_gdt_table(i); if (!gdt) |