Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16377
b: refs/heads/master
c: 92f17f0
h: refs/heads/master
i:
  16375: 2512522
v: v3
  • Loading branch information
Zachary Amsden authored and Linus Torvalds committed Jan 6, 2006
1 parent bcec506 commit cfaf617
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2891dcdc4538e8f4ce50c9d1eea457cf2d81fb5b
refs/heads/master: 92f17f0171e864a2cbe448c5b7b473e72a7d27b8
23 changes: 11 additions & 12 deletions trunk/arch/i386/kernel/apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2222,8 +2222,8 @@ static struct dmi_system_id __initdata apm_dmi_table[] = {
static int __init apm_init(void)
{
struct proc_dir_entry *apm_proc;
struct desc_struct *gdt;
int ret;
int i;

dmi_check_system(apm_dmi_table);

Expand Down Expand Up @@ -2314,18 +2314,17 @@ static int __init apm_init(void)
* not restrict themselves to their claimed limit. When this happens,
* they will cause a segmentation violation in the kernel at boot time.
* Most BIOS's, however, will respect a 64k limit, so we use that.
*
* Note we only set APM segments on CPU zero, since we pin the APM
* code to that CPU.
*/
for (i = 0; i < NR_CPUS; i++) {
struct desc_struct *gdt = get_cpu_gdt_table(i);
if (!gdt)
continue;
set_base(gdt[APM_CS >> 3],
__va((unsigned long)apm_info.bios.cseg << 4));
set_base(gdt[APM_CS_16 >> 3],
__va((unsigned long)apm_info.bios.cseg_16 << 4));
set_base(gdt[APM_DS >> 3],
__va((unsigned long)apm_info.bios.dseg << 4));
}
gdt = get_cpu_gdt_table(0);
set_base(gdt[APM_CS >> 3],
__va((unsigned long)apm_info.bios.cseg << 4));
set_base(gdt[APM_CS_16 >> 3],
__va((unsigned long)apm_info.bios.cseg_16 << 4));
set_base(gdt[APM_DS >> 3],
__va((unsigned long)apm_info.bios.dseg << 4));

apm_proc = create_proc_info_entry("apm", 0, NULL, apm_get_info);
if (apm_proc)
Expand Down

0 comments on commit cfaf617

Please sign in to comment.