Linux-2.1.102 PATCH to allow CONFIG_APM to compile under x86

Adam J. Richter (adam@yggdrasil.com)
Thu, 14 May 1998 23:48:07 -0700


arch/i386/kernel/time.c in the Linux-2.1.102 now has a bunch
of stuff of some ifndef'ed out if CONFIG_APM is defined. However,
some of the stuff that has been ifndef'ed out is referenced in a
couple of other places that are not ifndef'ed out. So, assuming
that there is some good reason for these ifndefs, I went ahead and
commented out the other stuff. The kernel built and I am running it
now with no problems so far that did not exist in .101 (the qualifier
is because slip may have stopped working around 2.1.100, and I'm
looking into that right now).

Anyhow, here is the patch. I am not sure if it is right,
but it compiles and boots.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
-----------------------------CUT HERE--------------------------------
--- /tmp/linux-2.1.102/arch/i386/kernel/time.c Wed May 13 13:23:13 1998
+++ linux/arch/i386/kernel/time.c Thu May 14 22:07:12 1998
@@ -526,8 +526,10 @@

/* If we have the CPU hardware time counters, use them */
if (boot_cpu_data.x86_capability & 16) {
+#ifndef CONFIG_APM
do_gettimeoffset = do_fast_gettimeoffset;
do_get_fast_time = do_x86_get_fast_time;
+#endif /* CONFIG_APM */

if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
boot_cpu_data.x86 == 5 &&
@@ -541,11 +543,13 @@
udelay(500);
}

+#ifndef CONFIG_APM
/* read Pentium cycle counter */
__asm__("rdtsc"
:"=a" (init_timer_cc.low),
"=d" (init_timer_cc.high));
irq0.handler = pentium_timer_interrupt;
+#endif /* CONFIG_APM */
}
setup_x86_irq(0, &irq0);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu