Messages in this thread Patch in this message | | | From | Stephen.Rothwell@canb ... | Subject | Re: APM & Linux 2.2.1 | Date | Sun, 21 Feb 1999 22:52:38 +1100 |
| |
Hi Richard,
Richard Gooch <rgooch@atnf.csiro.au> writes: > > What do you think might be wrong? I would have thought that once the > APM BIOS power off code is called, then it should happen. It was my > understanding that the SMP issues were related to the kernel disabling > APM under SMP. Do you suspect the APM BIOS knows about SMP too?
From the report sent to me a while ago (from Marc Lehmann <pcg@goof.com>) [Sorry Marc for not replying sooner.] I think the problem was that when the APM driver realises that there are two (or more) processors, it does not do any of the normal connection setup with the BIOS and so the BIOS may just ignore any requests to gets from the driver.
Anyway, as a quick hack (i.e. I have not even compiled this) can you try this: (a patch of arch/i386/kernel/apm.c from 2.2.1)
--- apm.c.old Thu Feb 4 21:51:53 1999 +++ apm.c Sun Feb 21 22:44:32 1999 @@ -1378,14 +1378,6 @@ (apm_bios_info.dseg_len - 1) & 0xffff); } #endif -#ifdef CONFIG_SMP - if (smp_num_cpus > 1) { - printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n"); - if (smp_hack) - smp_hack = 2; - return; - } -#endif if (apm_bios_info.version > 0x100) { /* * We only support BIOSs up to version 1.2 @@ -1440,6 +1432,14 @@ } } +#ifdef CONFIG_SMP + if (smp_num_cpus > 1) { + printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n"); + if (smp_hack) + smp_hack = 2; + return; + } +#endif #ifdef CONFIG_APM_DO_ENABLE if (apm_bios_info.flags & APM_BIOS_DISABLED) { /* If possible, run the kernel with "apm=debug,smp-power-off". If this doesn't work, you could try moving the CONFIG_SMP code either below the CONFIG_APM_DO_ENABLE (if you enable that config option, or even further, below the code:
if (((apm_bios_info.flags & APM_BIOS_DISABLED) == 0) && (apm_bios_info.version > 0x0100)) { if (apm_engage_power_management(0x0001) == APM_SUCCESS) apm_bios_info.flags &= ~APM_BIOS_DISENGAGED; } Marc also said he added "apm_enabled = 1" just before returning in the CONFIG_SMP check above, but I do not see how that could have affected anything.
Cheers, Stephen -- Stephen Rothwell Stephen.Rothwell@canb.auug.org.au http://www.canb.auug.org.au/~sfr/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |