aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apm_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apm_32.c')
-rw-r--r--arch/x86/kernel/apm_32.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 79302e9a33a4..b5e841bd60d9 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -403,7 +403,7 @@ static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
403static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); 403static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
404static struct apm_user *user_list; 404static struct apm_user *user_list;
405static DEFINE_SPINLOCK(user_list_lock); 405static DEFINE_SPINLOCK(user_list_lock);
406static const struct desc_struct bad_bios_desc = { { { 0, 0x00409200 } } }; 406static struct desc_struct bad_bios_desc = { { { 0, 0x00409200 } } };
407 407
408static const char driver_version[] = "1.16ac"; /* no spaces */ 408static const char driver_version[] = "1.16ac"; /* no spaces */
409 409
@@ -2337,8 +2337,8 @@ static int __init apm_init(void)
2337 * This is for buggy BIOS's that refer to (real mode) segment 0x40 2337 * This is for buggy BIOS's that refer to (real mode) segment 0x40
2338 * even though they are called in protected mode. 2338 * even though they are called in protected mode.
2339 */ 2339 */
2340 set_base(bad_bios_desc, __va((unsigned long)0x40 << 4)); 2340 set_desc_base(&bad_bios_desc, (unsigned long)__va(0x40UL << 4));
2341 _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); 2341 set_desc_limit(&bad_bios_desc, 4095 - (0x40 << 4));
2342 2342
2343 /* 2343 /*
2344 * Set up the long jump entry point to the APM BIOS, which is called 2344 * Set up the long jump entry point to the APM BIOS, which is called
@@ -2358,12 +2358,12 @@ static int __init apm_init(void)
2358 * code to that CPU. 2358 * code to that CPU.
2359 */ 2359 */
2360 gdt = get_cpu_gdt_table(0); 2360 gdt = get_cpu_gdt_table(0);
2361 set_base(gdt[APM_CS >> 3], 2361 set_desc_base(&gdt[APM_CS >> 3],
2362 __va((unsigned long)apm_info.bios.cseg << 4)); 2362 (unsigned long)__va((unsigned long)apm_info.bios.cseg << 4));
2363 set_base(gdt[APM_CS_16 >> 3], 2363 set_desc_base(&gdt[APM_CS_16 >> 3],
2364 __va((unsigned long)apm_info.bios.cseg_16 << 4)); 2364 (unsigned long)__va((unsigned long)apm_info.bios.cseg_16 << 4));
2365 set_base(gdt[APM_DS >> 3], 2365 set_desc_base(&gdt[APM_DS >> 3],
2366 __va((unsigned long)apm_info.bios.dseg << 4)); 2366 (unsigned long)__va((unsigned long)apm_info.bios.dseg << 4));
2367 2367
2368 proc_create("apm", 0, NULL, &apm_file_ops); 2368 proc_create("apm", 0, NULL, &apm_file_ops);
2369 2369