lkml.org 
[lkml]   [1999]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH for 2.3.13-pre4 : APM & bogus init.h
Hi.

I've just tested pre-2.3.13-4

First, i'v a bug with 2.3.13-pre3 with the amount of buffer (I've 128Mb
RAM)

$ free
total used free shared buffers
cached
Mem: 127332 122236 5096 81060 4192792
71920
-/+ buffers/cache: 51828 75504
Swap: 136512 2192 134320


2) the apm code won't compile.
Here is a patch fixing it. It also fix a typo in init.h (defnit instead
if define)

--
MandrakeSoft http://www.mandrakesoft.com/
somewhere between the playstation and the super cray
--Thierrydiff -ru old/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c
--- old/arch/i386/kernel/apm.c Wed Aug 4 09:53:22 1999
+++ linux/arch/i386/kernel/apm.c Wed Aug 4 09:44:33 1999
@@ -284,6 +284,7 @@

extern int apm_register_callback(int (*)(apm_event_t));
extern void apm_unregister_callback(int (*)(apm_event_t));
+static int hlt_counter;

/*
* Local variables
@@ -1227,7 +1228,6 @@
unsigned short bx;
unsigned short cx;
unsigned short dx;
- unsigned short nbat;
unsigned short error;
unsigned short ac_line_status = 0xff;
unsigned short battery_status = 0xff;
@@ -1428,7 +1428,7 @@
* In short, if something bad happens, at least we have a choice
* of just killing the apm thread..
*/
-static int __init apm_init(void)
+static void __init apm_init(void)
{
static struct proc_dir_entry *ent;

diff -ru old/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
--- old/arch/i386/kernel/process.c Wed Aug 4 09:53:22 1999
+++ linux/arch/i386/kernel/process.c Wed Aug 4 09:37:26 1999
@@ -54,12 +54,6 @@
/*
* We'll get there..
*/
-#ifdef CONFIG_APM
-#define powermanagement_idle() do { } while (0)
-#else
-#define powermanagement_idle() do { } while (0)
-#endif
-
static int hlt_counter=0;

void disable_hlt(void)
diff -ru old/include/linux/apm_bios.h linux/include/linux/apm_bios.h
--- old/include/linux/apm_bios.h Wed Aug 4 09:53:28 1999
+++ linux/include/linux/apm_bios.h Wed Aug 4 09:40:37 1999
@@ -19,6 +19,15 @@
typedef unsigned short apm_event_t;
typedef unsigned short apm_eventinfo_t;

+#ifdef CONFIG_APM
+#define powermanagement_idle() do { } while (0)
+#else
+#define powermanagement_idle() do { } while (0)
+#endif
+extern int hlt_counter;
+
+
+
#ifdef __KERNEL__

#define APM_40 0x40
diff -ru old/include/linux/init.h linux/include/linux/init.h
--- old/include/linux/init.h Wed Aug 4 09:53:28 1999
+++ linux/include/linux/init.h Wed Aug 4 09:45:44 1999
@@ -107,7 +107,7 @@
#define __initdata
#define __exitdata
#define __initfunc(__arginit) __arginit
-#defint __initcall
+#define __initcall
/* For assembly routines */
#define __INIT
#define __FINIT
\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.378 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site