APM patch for idle_period handling

APM patch for idle_period handling

Post by Stephen Rothwel » Sat, 01 Jun 2002 09:20:13



Hi Marcelo, Linus,


and paste error.  The patch applies to 2.4.19-pre9 and 2.5.19 (with
some offsets).

Please apply.

--
Cheers,

http://www.canb.auug.org.au/~sfr/

--- linux-2.4.18/arch/i386/kernel/apm.c Mon Apr  1 12:12:48 2002

                        idle_threshold = simple_strtol(str + 15, NULL, 0);
                if ((strncmp(str, "idle-period=", 12) == 0) ||
                    (strncmp(str, "idle_period=", 12) == 0))
-                       idle_threshold = simple_strtol(str + 15, NULL, 0);
+                       idle_period = simple_strtol(str + 12, NULL, 0);
                invert = (strncmp(str, "no-", 3) == 0) ||
                        (strncmp(str, "no_", 3) == 0);
                if (invert)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. PATCH: apm.c - detection of brokern APM Idle call implementation


Well, the following three-liners (+ comments) seems to do it. It checks
if clock was advanced after return from APM Idle - if not we assume BIOS
did not halt CPU and do it ourselves. The addidional condition &&
!current->need_resched is for the case when BIOS did halt CPU and
non-clock interrupt happened that waked up somebody else. But may be I
am just plain paranoid. The code has no impact for "BIOS slows CPU"
case.

It works here for broken BIOS. I appreciate if people with good BIOS
test it.

-andrej

  apm-idle-2.diff
< 1K Download

2. Absolute newbie

3. PATCH: apm.c - runtime parameter for APM Idle call

4. HELP NEWSGROUPS AND NETSCAPE

5. irq handling and APM on new Laptop Sony Vaio GRX 570

6. oops while fixating cd-r: 2.4.18,aha152x,phillips cdd2600

7. New APM BIOS patches

8. GS framebuffer under Solaris 2.5

9. APM driver patch summary

10. APM patch for sysvinit (poweroff)

11. PATCH: make APM machine independant using mach headers

12. APM kernel patch with 1.2.13?

13. APM kernel patches