* Linux 2.2.19pre1
@ 2000-12-15 19:51 Alan Cox
2000-12-15 20:03 ` [PATCH] Re: Linux 2.2.19pre1 : procfs api Michael Rothwell
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Alan Cox @ 2000-12-15 19:51 UTC (permalink / raw)
To: linux-kernel
Ok this is the first block of changes before we merge the VM stuff. This is
mostly the bits left over from the 2.2.18 port that were deferred as too
risky near the end of a prerelease set and some bug swats
2.2.19pre1
o Basic page aging (Neil Schemenauer)
| This is a beginning to trying to get the VM right
| Next stage is to go through Andrea's stuff and sort
| it out the way I want it.
o E820 memory detect backport from 2.4 (Michael Chen)
o Fix cs46xx refusing to run on emachines400 (me)
o Fix parport docs (Tim Waugh)
o Fix USB serial name reporting (me)
o Fix else warning in initio scsi (John Fort)
o Fix incorrect timeout (that couldnt occur
fortunately) in sched.c (Andrew Archibald)
o Fix A20 fix credits (Christian Lademann)
o Support for OnStream SC-x0 tape drives (Willem Riede,
Kurt Garloff)
o Intel 815 added to the AGPGART code (Robert M Love)
o 3Ware scsi fixes (Arnaldo Carvalho de Melo)
o Clean up scsi_init_malloc no mem case (Arnaldo Carvalho de Melo)
o Fix dead module parameter in ip_masq_user.c (Keith Owens)
o Switch max_files and friends to a struct to (Tigran Aivazian)
be sure they stay together
o Update microcode driver (Tigran Aivazian)
o Fix free memory dereference in lance driver (Eli Carter)
o ISOfs fixes (Andries Brouwer)
o Watchdog driver for Advantech boards (Marek Michalkiewicz)
o ISDN updates (Karsten Keil)
o Docs fix (Pavel Rabel)
o wake_one semantics for accept() (Andrew Morton)
o Masquerade updates (Juanjo Ciarlante)
o Add support for long serialnums on the Metricom (Alex Belits)
o Onboard ethernet driver for the Intel 'Panther' (Ard van Breemen,
boards Andries Brouwer)
o VIA686a timer reset to 18Hz background (Vojtech Pavlik)
o 3c527 driver rewrite (Richard Procter)
| This supercedes my driver because
| - it works for more people
| - he has time to use his MCA box to debug it
o Minix subpartition support (Anand Krishnamurthy
Rajeev Pillai)
o Remove unused() crap from DRM. You will need
to hand load agp as well if needed (me)
--
Alan Cox <alan@lxorguk.ukuu.org.uk>
Red Hat Kernel Hacker
& Linux 2.2 Maintainer Brainbench MVP for TCP/IP
http://www.linux.org.uk/diary http://www.brainbench.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Re: Linux 2.2.19pre1 : procfs api
2000-12-15 19:51 Linux 2.2.19pre1 Alan Cox
@ 2000-12-15 20:03 ` Michael Rothwell
2000-12-16 7:05 ` Willy Tarreau
2000-12-15 20:05 ` [PATCH] Re: Linux 2.2.19pre1 64-bit printk Michael Rothwell
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Michael Rothwell @ 2000-12-15 20:03 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 7124 bytes --]
Alan Cox wrote:
> Ok this is the first block of changes before we merge the VM stuff. This is
> mostly the bits left over from the 2.2.18 port that were deferred as too
> risky near the end of a prerelease set and some bug swats
Here's the procfs patch again... :) Because the 2.2.18 procfs api is
different than both 2.2.17 and 2.4.0, this patch makes it work like
2.4.0. It seems like the 2.2.18 changes were a half-way implementation
of the 2.4.0 api.
--- linux-2.2.18pre25-VIRGIN/include/linux/proc_fs.h Fri Dec 8 14:57:08 2000
+++ zinux/include/linux/proc_fs.h Fri Dec 8 23:21:26 2000
@@ -262,6 +262,12 @@
#define PROC_SUPER_MAGIC 0x9fa0
+typedef int (read_proc_t)(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
+typedef int (write_proc_t)(struct file *file, const char *buffer,
+ unsigned long count, void *data);
+typedef int (get_info_t)(char *, char **, off_t, int, int);
+
/*
* This is not completely implemented yet. The idea is to
* create an in-memory tree (like the actual /proc filesystem
@@ -287,24 +293,17 @@
gid_t gid;
unsigned long size;
struct inode_operations * ops;
- int (*get_info)(char *, char **, off_t, int, int);
+ get_info_t *get_info;
void (*fill_inode)(struct inode *, int);
struct proc_dir_entry *next, *parent, *subdir;
void *data;
- int (*read_proc)(char *page, char **start, off_t off,
- int count, int *eof, void *data);
- int (*write_proc)(struct file *file, const char *buffer,
- unsigned long count, void *data);
+ read_proc_t *read_proc;
+ write_proc_t *write_proc;
int (*readlink_proc)(struct proc_dir_entry *de, char *page);
unsigned int count; /* use count */
int deleted; /* delete flag */
};
-typedef int (read_proc_t)(char *page, char **start, off_t off,
- int count, int *eof, void *data);
-typedef int (write_proc_t)(struct file *file, const char *buffer,
- unsigned long count, void *data);
-
extern int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
off_t offset, int length, int inout);
@@ -433,15 +432,33 @@
/*
* generic.c
*/
+extern struct proc_dir_entry *proc_symlink(const char *,
+ struct proc_dir_entry *, const char *);
+extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
+
struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
struct proc_dir_entry *parent);
void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
-#define create_proc_info_entry(n, m, b, g) \
- { \
- struct proc_dir_entry *r = create_proc_entry(n, m, b); \
- if (r) r->get_info = g; \
+extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base,
+ read_proc_t *read_proc, void * data)
+{
+ struct proc_dir_entry *res=create_proc_entry(name,mode,base);
+ if (res) {
+ res->read_proc=read_proc;
+ res->data=data;
}
+ return res;
+}
+
+extern inline struct proc_dir_entry *create_proc_info_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
+{
+ struct proc_dir_entry *res=create_proc_entry(name,mode,base);
+ if (res) res->get_info=get_info;
+ return res;
+}
/*
* proc_tty.c
@@ -470,12 +487,18 @@
return NULL;
}
-#define create_proc_info_entry(n, m, b, g) \
- { \
- struct proc_dir_entry *r = create_proc_entry(n, m, b); \
- if (r) r->get_info = g; \
- }
-
+extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base,
+ read_proc_t read_proc,
+ void * data) { return NULL; }
+extern inline struct proc_dir_entry *create_proc_info_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
+ { return NULL; }
+
+extern inline struct proc_dir_entry *proc_symlink(const char *name,
+ struct proc_dir_entry *parent,char *dest) {return NULL;}
+extern inline struct proc_dir_entry *proc_mkdir(const char *name,
+ struct proc_dir_entry *parent) {return NULL;}
extern inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {};
@@ -485,7 +508,5 @@
extern struct proc_dir_entry proc_root;
#endif /* CONFIG_PROC_FS */
-
-#define proc_mkdir(buf, usbdir) create_proc_entry(buf, S_IFDIR, usbdir)
#endif /* _LINUX_PROC_FS_H */
diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/generic.c zinux/fs/proc/generic.c
--- linux-2.2.18pre25-VIRGIN/fs/proc/generic.c Fri Dec 8 14:57:07 2000
+++ zinux/fs/proc/generic.c Fri Dec 8 17:58:34 2000
@@ -246,6 +246,65 @@
return 0;
}
+struct proc_dir_entry *proc_symlink(const char *name,
+ struct proc_dir_entry *parent, const char *dest)
+{
+ struct proc_dir_entry *ent = NULL;
+ const char *fn = name;
+ int len;
+
+ if (!parent && xlate_proc_name(name, &parent, &fn) != 0)
+ goto out;
+ len = strlen(fn);
+
+ ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
+ if (!ent)
+ goto out;
+ memset(ent, 0, sizeof(struct proc_dir_entry));
+ memcpy(((char *) ent) + sizeof(*ent), fn, len + 1);
+ ent->name = ((char *) ent) + sizeof(*ent);
+ ent->namelen = len;
+ ent->nlink = 1;
+ ent->mode = S_IFLNK|S_IRUGO|S_IWUGO|S_IXUGO;
+ ent->data = kmalloc((ent->size=strlen(dest))+1, GFP_KERNEL);
+ if (!ent->data) {
+ kfree(ent);
+ goto out;
+ }
+ strcpy((char*)ent->data,dest);
+
+ proc_register(parent, ent);
+
+out:
+ return ent;
+}
+
+struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent)
+{
+ struct proc_dir_entry *ent = NULL;
+ const char *fn = name;
+ int len;
+
+ if (!parent && xlate_proc_name(name, &parent, &fn) != 0)
+ goto out;
+ len = strlen(fn);
+
+ ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
+ if (!ent)
+ goto out;
+ memset(ent, 0, sizeof(struct proc_dir_entry));
+ memcpy(((char *) ent) + sizeof(*ent), fn, len + 1);
+ ent->name = ((char *) ent) + sizeof(*ent);
+ ent->namelen = len;
+ ent->nlink = 2;
+ ent->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+
+ proc_register(parent, ent);
+
+out:
+ return ent;
+}
+
struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
struct proc_dir_entry *parent)
{
diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c zinux/fs/proc/openpromfs.c
--- linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c Fri Dec 8 14:57:07 2000
+++ zinux/fs/proc/openpromfs.c Fri Dec 8 15:08:59 2000
@@ -1,4 +1,4 @@
-/* $Id: openpromfs.c,v 1.33 1999/04/28 11:57:33 davem Exp $
+/* $Id: openpromfs.c,v 1.1.1.1 2000/12/08 20:08:59 zapman Exp $
* openpromfs.c: /proc/openprom handling routines
*
* Copyright (C) 1996-1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/procfs_syms.c zinux/fs/proc/procfs_syms.c
--- linux-2.2.18pre25-VIRGIN/fs/proc/procfs_syms.c Fri Dec 8 14:57:07 2000
+++ zinux/fs/proc/procfs_syms.c Fri Dec 8 18:12:37 2000
@@ -19,6 +19,8 @@
EXPORT_SYMBOL(proc_register);
EXPORT_SYMBOL(proc_unregister);
EXPORT_SYMBOL(create_proc_entry);
+EXPORT_SYMBOL(proc_mkdir);
+EXPORT_SYMBOL(proc_symlink);
EXPORT_SYMBOL(remove_proc_entry);
EXPORT_SYMBOL(proc_root);
EXPORT_SYMBOL(proc_root_fs);
[-- Attachment #2: 2.2.19-procfs-patch --]
[-- Type: text/plain, Size: 6661 bytes --]
--- linux-2.2.18pre25-VIRGIN/include/linux/proc_fs.h Fri Dec 8 14:57:08 2000
+++ zinux/include/linux/proc_fs.h Fri Dec 8 23:21:26 2000
@@ -262,6 +262,12 @@
#define PROC_SUPER_MAGIC 0x9fa0
+typedef int (read_proc_t)(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
+typedef int (write_proc_t)(struct file *file, const char *buffer,
+ unsigned long count, void *data);
+typedef int (get_info_t)(char *, char **, off_t, int, int);
+
/*
* This is not completely implemented yet. The idea is to
* create an in-memory tree (like the actual /proc filesystem
@@ -287,24 +293,17 @@
gid_t gid;
unsigned long size;
struct inode_operations * ops;
- int (*get_info)(char *, char **, off_t, int, int);
+ get_info_t *get_info;
void (*fill_inode)(struct inode *, int);
struct proc_dir_entry *next, *parent, *subdir;
void *data;
- int (*read_proc)(char *page, char **start, off_t off,
- int count, int *eof, void *data);
- int (*write_proc)(struct file *file, const char *buffer,
- unsigned long count, void *data);
+ read_proc_t *read_proc;
+ write_proc_t *write_proc;
int (*readlink_proc)(struct proc_dir_entry *de, char *page);
unsigned int count; /* use count */
int deleted; /* delete flag */
};
-typedef int (read_proc_t)(char *page, char **start, off_t off,
- int count, int *eof, void *data);
-typedef int (write_proc_t)(struct file *file, const char *buffer,
- unsigned long count, void *data);
-
extern int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
off_t offset, int length, int inout);
@@ -433,15 +432,33 @@
/*
* generic.c
*/
+extern struct proc_dir_entry *proc_symlink(const char *,
+ struct proc_dir_entry *, const char *);
+extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
+
struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
struct proc_dir_entry *parent);
void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
-#define create_proc_info_entry(n, m, b, g) \
- { \
- struct proc_dir_entry *r = create_proc_entry(n, m, b); \
- if (r) r->get_info = g; \
+extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base,
+ read_proc_t *read_proc, void * data)
+{
+ struct proc_dir_entry *res=create_proc_entry(name,mode,base);
+ if (res) {
+ res->read_proc=read_proc;
+ res->data=data;
}
+ return res;
+}
+
+extern inline struct proc_dir_entry *create_proc_info_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
+{
+ struct proc_dir_entry *res=create_proc_entry(name,mode,base);
+ if (res) res->get_info=get_info;
+ return res;
+}
/*
* proc_tty.c
@@ -470,12 +487,18 @@
return NULL;
}
-#define create_proc_info_entry(n, m, b, g) \
- { \
- struct proc_dir_entry *r = create_proc_entry(n, m, b); \
- if (r) r->get_info = g; \
- }
-
+extern inline struct proc_dir_entry *create_proc_read_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base,
+ read_proc_t read_proc,
+ void * data) { return NULL; }
+extern inline struct proc_dir_entry *create_proc_info_entry(const char *name,
+ mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
+ { return NULL; }
+
+extern inline struct proc_dir_entry *proc_symlink(const char *name,
+ struct proc_dir_entry *parent,char *dest) {return NULL;}
+extern inline struct proc_dir_entry *proc_mkdir(const char *name,
+ struct proc_dir_entry *parent) {return NULL;}
extern inline void remove_proc_entry(const char *name, struct proc_dir_entry *parent) {};
@@ -485,7 +508,5 @@
extern struct proc_dir_entry proc_root;
#endif /* CONFIG_PROC_FS */
-
-#define proc_mkdir(buf, usbdir) create_proc_entry(buf, S_IFDIR, usbdir)
#endif /* _LINUX_PROC_FS_H */
diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/generic.c zinux/fs/proc/generic.c
--- linux-2.2.18pre25-VIRGIN/fs/proc/generic.c Fri Dec 8 14:57:07 2000
+++ zinux/fs/proc/generic.c Fri Dec 8 17:58:34 2000
@@ -246,6 +246,65 @@
return 0;
}
+struct proc_dir_entry *proc_symlink(const char *name,
+ struct proc_dir_entry *parent, const char *dest)
+{
+ struct proc_dir_entry *ent = NULL;
+ const char *fn = name;
+ int len;
+
+ if (!parent && xlate_proc_name(name, &parent, &fn) != 0)
+ goto out;
+ len = strlen(fn);
+
+ ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
+ if (!ent)
+ goto out;
+ memset(ent, 0, sizeof(struct proc_dir_entry));
+ memcpy(((char *) ent) + sizeof(*ent), fn, len + 1);
+ ent->name = ((char *) ent) + sizeof(*ent);
+ ent->namelen = len;
+ ent->nlink = 1;
+ ent->mode = S_IFLNK|S_IRUGO|S_IWUGO|S_IXUGO;
+ ent->data = kmalloc((ent->size=strlen(dest))+1, GFP_KERNEL);
+ if (!ent->data) {
+ kfree(ent);
+ goto out;
+ }
+ strcpy((char*)ent->data,dest);
+
+ proc_register(parent, ent);
+
+out:
+ return ent;
+}
+
+struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent)
+{
+ struct proc_dir_entry *ent = NULL;
+ const char *fn = name;
+ int len;
+
+ if (!parent && xlate_proc_name(name, &parent, &fn) != 0)
+ goto out;
+ len = strlen(fn);
+
+ ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
+ if (!ent)
+ goto out;
+ memset(ent, 0, sizeof(struct proc_dir_entry));
+ memcpy(((char *) ent) + sizeof(*ent), fn, len + 1);
+ ent->name = ((char *) ent) + sizeof(*ent);
+ ent->namelen = len;
+ ent->nlink = 2;
+ ent->mode = S_IFDIR | S_IRUGO | S_IXUGO;
+
+ proc_register(parent, ent);
+
+out:
+ return ent;
+}
+
struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
struct proc_dir_entry *parent)
{
diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c zinux/fs/proc/openpromfs.c
--- linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c Fri Dec 8 14:57:07 2000
+++ zinux/fs/proc/openpromfs.c Fri Dec 8 15:08:59 2000
@@ -1,4 +1,4 @@
-/* $Id: openpromfs.c,v 1.33 1999/04/28 11:57:33 davem Exp $
+/* $Id: openpromfs.c,v 1.1.1.1 2000/12/08 20:08:59 zapman Exp $
* openpromfs.c: /proc/openprom handling routines
*
* Copyright (C) 1996-1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/procfs_syms.c zinux/fs/proc/procfs_syms.c
--- linux-2.2.18pre25-VIRGIN/fs/proc/procfs_syms.c Fri Dec 8 14:57:07 2000
+++ zinux/fs/proc/procfs_syms.c Fri Dec 8 18:12:37 2000
@@ -19,6 +19,8 @@
EXPORT_SYMBOL(proc_register);
EXPORT_SYMBOL(proc_unregister);
EXPORT_SYMBOL(create_proc_entry);
+EXPORT_SYMBOL(proc_mkdir);
+EXPORT_SYMBOL(proc_symlink);
EXPORT_SYMBOL(remove_proc_entry);
EXPORT_SYMBOL(proc_root);
EXPORT_SYMBOL(proc_root_fs);
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Re: Linux 2.2.19pre1 64-bit printk
2000-12-15 19:51 Linux 2.2.19pre1 Alan Cox
2000-12-15 20:03 ` [PATCH] Re: Linux 2.2.19pre1 : procfs api Michael Rothwell
@ 2000-12-15 20:05 ` Michael Rothwell
2000-12-15 20:56 ` Linux 2.2.19pre1 Tom Rini
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Michael Rothwell @ 2000-12-15 20:05 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 10236 bytes --]
Alan Cox wrote:
> Ok this is the first block of changes before we merge the VM stuff. This is
> mostly the bits left over from the 2.2.18 port that were deferred as too
> risky near the end of a prerelease set and some bug swats
And here is the 64-bit printk patch -- a backport of the 2.4.0 code.
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-alpha/div64.h linux/include/asm-alpha/div64.h
--- linux-2.2.16/include/asm-alpha/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-alpha/div64.h Fri Aug 11 20:04:18 2000
@@ -0,0 +1,14 @@
+#ifndef __ALPHA_DIV64
+#define __ALPHA_DIV64
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) (n)) % (unsigned) (base); \
+ (n) = ((unsigned long) (n)) / (unsigned) (base); \
+ __res; })
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-arm/div64.h linux/include/asm-arm/div64.h
--- linux-2.2.16/include/asm-arm/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-arm/div64.h Fri Aug 11 20:05:41 2000
@@ -0,0 +1,14 @@
+#ifndef __ASM_ARM_DIV64
+#define __ASM_ARM_DIV64
+
+/* We're not 64-bit, but... */
+#define do_div(n,base) \
+({ \
+ int __res; \
+ __res = ((unsigned long)n) % (unsigned int)base; \
+ n = ((unsigned long)n) / (unsigned int)base; \
+ __res; \
+})
+
+#endif
+
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-i386/div64.h linux/include/asm-i386/div64.h
--- linux-2.2.16/include/asm-i386/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-i386/div64.h Fri Aug 11 20:06:05 2000
@@ -0,0 +1,17 @@
+#ifndef __I386_DIV64
+#define __I386_DIV64
+
+#define do_div(n,base) ({ \
+ unsigned long __upper, __low, __high, __mod; \
+ asm("":"=a" (__low), "=d" (__high):"A" (n)); \
+ __upper = __high; \
+ if (__high) { \
+ __upper = __high % (base); \
+ __high = __high / (base); \
+ } \
+ asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \
+ asm("":"=A" (n):"a" (__low),"d" (__high)); \
+ __mod; \
+})
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-m68k/div64.h linux/include/asm-m68k/div64.h
--- linux-2.2.16/include/asm-m68k/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-m68k/div64.h Fri Aug 11 20:06:57 2000
@@ -0,0 +1,35 @@
+#ifndef _M68K_DIV64_H
+#define _M68K_DIV64_H
+
+/* n = n / base; return rem; */
+
+#if 1
+#define do_div(n, base) ({ \
+ union { \
+ unsigned long n32[2]; \
+ unsigned long long n64; \
+ } __n; \
+ unsigned long __rem, __upper; \
+ \
+ __n.n64 = (n); \
+ if ((__upper = __n.n32[0])) { \
+ asm ("divul.l %2,%1:%0" \
+ : "=d" (__n.n32[0]), "=d" (__upper) \
+ : "d" (base), "0" (__n.n32[0])); \
+ } \
+ asm ("divu.l %2,%1:%0" \
+ : "=d" (__n.n32[1]), "=d" (__rem) \
+ : "d" (base), "1" (__upper), "0" (__n.n32[1])); \
+ (n) = __n.n64; \
+ __rem; \
+})
+#else
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; \
+})
+#endif
+
+#endif /* _M68K_DIV64_H */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-mips/div64.h linux/include/asm-mips/div64.h
--- linux-2.2.16/include/asm-mips/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-mips/div64.h Fri Aug 11 20:41:49 2000
@@ -0,0 +1,20 @@
+/* $Id: div64.h,v 1.1.2.1 2000/08/12 00:41:49 zapman Exp $
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#ifndef _ASM_DIV64_H
+#define _ASM_DIV64_H
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* _ASM_DIV64_H */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-ppc/div64.h linux/include/asm-ppc/div64.h
--- linux-2.2.16/include/asm-ppc/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-ppc/div64.h Fri Aug 11 20:07:41 2000
@@ -0,0 +1,10 @@
+#ifndef __PPC_DIV64
+#define __PPC_DIV64
+
+#define do_div(n,base) ({ \
+int __res; \
+__res = ((unsigned long) n) % (unsigned) base; \
+n = ((unsigned long) n) / (unsigned) base; \
+__res; })
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-s390/div64.h linux/include/asm-s390/div64.h
--- linux-2.2.16/include/asm-s390/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-s390/div64.h Fri Aug 11 20:08:05 2000
@@ -0,0 +1,10 @@
+#ifndef __S390_DIV64
+#define __S390_DIV64
+
+#define do_div(n,base) ({ \
+int __res; \
+__res = ((unsigned long) n) % (unsigned) base; \
+n = ((unsigned long) n) / (unsigned) base; \
+__res; })
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-sparc/div64.h linux/include/asm-sparc/div64.h
--- linux-2.2.16/include/asm-sparc/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-sparc/div64.h Fri Aug 11 20:08:25 2000
@@ -0,0 +1,11 @@
+#ifndef __SPARC_DIV64
+#define __SPARC_DIV64
+
+/* We're not 64-bit, but... */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* __SPARC_DIV64 */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-sparc64/div64.h linux/include/asm-sparc64/div64.h
--- linux-2.2.16/include/asm-sparc64/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-sparc64/div64.h Fri Aug 11 20:08:42 2000
@@ -0,0 +1,14 @@
+#ifndef __SPARC64_DIV64
+#define __SPARC64_DIV64
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* __SPARC64_DIV64 */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/lib/vsprintf.c linux/lib/vsprintf.c
--- linux-2.2.16/lib/vsprintf.c Wed Aug 9 15:58:33 2000
+++ linux/lib/vsprintf.c Fri Aug 11 20:13:09 2000
@@ -14,6 +14,8 @@
#include <linux/string.h>
#include <linux/ctype.h>
+#include <asm/div64.h>
+
unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
{
unsigned long result = 0,value;
@@ -29,8 +31,8 @@
}
}
}
- while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
- ? toupper(*cp) : *cp)-'A'+10) < base) {
+ while (isxdigit(*cp) &&
+ (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) {
result = result*base + value;
cp++;
}
@@ -46,14 +48,11 @@
return simple_strtoul(cp,endp,base);
}
-/* we use this so that we can do without the ctype library */
-#define is_digit(c) ((c) >= '0' && (c) <= '9')
-
static int skip_atoi(const char **s)
{
int i=0;
- while (is_digit(**s))
+ while (isdigit(**s))
i = i*10 + *((*s)++) - '0';
return i;
}
@@ -66,14 +65,7 @@
#define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
-#define do_div(n,base) ({ \
-int __res; \
-__res = ((unsigned long) n) % (unsigned) base; \
-n = ((unsigned long) n) / (unsigned) base; \
-__res; })
-
-static char * number(char * str, long num, int base, int size, int precision
- ,int type)
+static char * number(char * str, long long num, int base, int size, int precision, int type)
{
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
@@ -145,7 +137,7 @@
int vsprintf(char *buf, const char *fmt, va_list args)
{
int len;
- unsigned long num;
+ unsigned long long num;
int i, base;
char * str;
const char *s;
@@ -156,7 +148,10 @@
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier; /* 'h', 'l', or 'L' for integer fields */
+ /* 'z' support added 23/7/1999 S.H. */
+ /* 'z' changed to 'Z' --davidm 1/25/99 */
+
for (str=buf ; *fmt ; ++fmt) {
if (*fmt != '%') {
*str++ = *fmt;
@@ -177,7 +172,7 @@
/* get field width */
field_width = -1;
- if (is_digit(*fmt))
+ if (isdigit(*fmt))
field_width = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
@@ -193,7 +188,7 @@
precision = -1;
if (*fmt == '.') {
++fmt;
- if (is_digit(*fmt))
+ if (isdigit(*fmt))
precision = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
@@ -206,7 +201,7 @@
/* get the conversion qualifier */
qualifier = -1;
- if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
+ if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') {
qualifier = *fmt;
++fmt;
}
@@ -255,6 +250,9 @@
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
*ip = (str - buf);
+ } else if (qualifier == 'Z') {
+ size_t * ip = va_arg(args, size_t *);
+ *ip = (str - buf);
} else {
int * ip = va_arg(args, int *);
*ip = (str - buf);
@@ -290,16 +288,23 @@
--fmt;
continue;
}
- if (qualifier == 'l')
+ if (qualifier == 'L')
+ num = va_arg(args, long long);
+ else if (qualifier == 'l') {
num = va_arg(args, unsigned long);
- else if (qualifier == 'h') {
+ if (flags & SIGN)
+ num = (signed long) num;
+ } else if (qualifier == 'Z') {
+ num = va_arg(args, size_t);
+ } else if (qualifier == 'h') {
num = (unsigned short) va_arg(args, int);
if (flags & SIGN)
- num = (short) num;
- } else if (flags & SIGN)
- num = va_arg(args, int);
- else
+ num = (signed short) num;
+ } else {
num = va_arg(args, unsigned int);
+ if (flags & SIGN)
+ num = (signed int) num;
+ }
str = number(str, num, base, field_width, precision, flags);
}
*str = '\0';
[-- Attachment #2: printk.patch --]
[-- Type: text/plain, Size: 9934 bytes --]
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-alpha/div64.h linux/include/asm-alpha/div64.h
--- linux-2.2.16/include/asm-alpha/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-alpha/div64.h Fri Aug 11 20:04:18 2000
@@ -0,0 +1,14 @@
+#ifndef __ALPHA_DIV64
+#define __ALPHA_DIV64
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) (n)) % (unsigned) (base); \
+ (n) = ((unsigned long) (n)) / (unsigned) (base); \
+ __res; })
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-arm/div64.h linux/include/asm-arm/div64.h
--- linux-2.2.16/include/asm-arm/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-arm/div64.h Fri Aug 11 20:05:41 2000
@@ -0,0 +1,14 @@
+#ifndef __ASM_ARM_DIV64
+#define __ASM_ARM_DIV64
+
+/* We're not 64-bit, but... */
+#define do_div(n,base) \
+({ \
+ int __res; \
+ __res = ((unsigned long)n) % (unsigned int)base; \
+ n = ((unsigned long)n) / (unsigned int)base; \
+ __res; \
+})
+
+#endif
+
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-i386/div64.h linux/include/asm-i386/div64.h
--- linux-2.2.16/include/asm-i386/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-i386/div64.h Fri Aug 11 20:06:05 2000
@@ -0,0 +1,17 @@
+#ifndef __I386_DIV64
+#define __I386_DIV64
+
+#define do_div(n,base) ({ \
+ unsigned long __upper, __low, __high, __mod; \
+ asm("":"=a" (__low), "=d" (__high):"A" (n)); \
+ __upper = __high; \
+ if (__high) { \
+ __upper = __high % (base); \
+ __high = __high / (base); \
+ } \
+ asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \
+ asm("":"=A" (n):"a" (__low),"d" (__high)); \
+ __mod; \
+})
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-m68k/div64.h linux/include/asm-m68k/div64.h
--- linux-2.2.16/include/asm-m68k/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-m68k/div64.h Fri Aug 11 20:06:57 2000
@@ -0,0 +1,35 @@
+#ifndef _M68K_DIV64_H
+#define _M68K_DIV64_H
+
+/* n = n / base; return rem; */
+
+#if 1
+#define do_div(n, base) ({ \
+ union { \
+ unsigned long n32[2]; \
+ unsigned long long n64; \
+ } __n; \
+ unsigned long __rem, __upper; \
+ \
+ __n.n64 = (n); \
+ if ((__upper = __n.n32[0])) { \
+ asm ("divul.l %2,%1:%0" \
+ : "=d" (__n.n32[0]), "=d" (__upper) \
+ : "d" (base), "0" (__n.n32[0])); \
+ } \
+ asm ("divu.l %2,%1:%0" \
+ : "=d" (__n.n32[1]), "=d" (__rem) \
+ : "d" (base), "1" (__upper), "0" (__n.n32[1])); \
+ (n) = __n.n64; \
+ __rem; \
+})
+#else
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; \
+})
+#endif
+
+#endif /* _M68K_DIV64_H */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-mips/div64.h linux/include/asm-mips/div64.h
--- linux-2.2.16/include/asm-mips/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-mips/div64.h Fri Aug 11 20:41:49 2000
@@ -0,0 +1,20 @@
+/* $Id: div64.h,v 1.1.2.1 2000/08/12 00:41:49 zapman Exp $
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#ifndef _ASM_DIV64_H
+#define _ASM_DIV64_H
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* _ASM_DIV64_H */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-ppc/div64.h linux/include/asm-ppc/div64.h
--- linux-2.2.16/include/asm-ppc/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-ppc/div64.h Fri Aug 11 20:07:41 2000
@@ -0,0 +1,10 @@
+#ifndef __PPC_DIV64
+#define __PPC_DIV64
+
+#define do_div(n,base) ({ \
+int __res; \
+__res = ((unsigned long) n) % (unsigned) base; \
+n = ((unsigned long) n) / (unsigned) base; \
+__res; })
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-s390/div64.h linux/include/asm-s390/div64.h
--- linux-2.2.16/include/asm-s390/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-s390/div64.h Fri Aug 11 20:08:05 2000
@@ -0,0 +1,10 @@
+#ifndef __S390_DIV64
+#define __S390_DIV64
+
+#define do_div(n,base) ({ \
+int __res; \
+__res = ((unsigned long) n) % (unsigned) base; \
+n = ((unsigned long) n) / (unsigned) base; \
+__res; })
+
+#endif
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-sparc/div64.h linux/include/asm-sparc/div64.h
--- linux-2.2.16/include/asm-sparc/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-sparc/div64.h Fri Aug 11 20:08:25 2000
@@ -0,0 +1,11 @@
+#ifndef __SPARC_DIV64
+#define __SPARC_DIV64
+
+/* We're not 64-bit, but... */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* __SPARC_DIV64 */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/include/asm-sparc64/div64.h linux/include/asm-sparc64/div64.h
--- linux-2.2.16/include/asm-sparc64/div64.h Wed Dec 31 19:00:00 1969
+++ linux/include/asm-sparc64/div64.h Fri Aug 11 20:08:42 2000
@@ -0,0 +1,14 @@
+#ifndef __SPARC64_DIV64
+#define __SPARC64_DIV64
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* __SPARC64_DIV64 */
diff -B --unidirectional-new-file --exclude-from=DiffExcludeList --recursive --unified linux-2.2.16/lib/vsprintf.c linux/lib/vsprintf.c
--- linux-2.2.16/lib/vsprintf.c Wed Aug 9 15:58:33 2000
+++ linux/lib/vsprintf.c Fri Aug 11 20:13:09 2000
@@ -14,6 +14,8 @@
#include <linux/string.h>
#include <linux/ctype.h>
+#include <asm/div64.h>
+
unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
{
unsigned long result = 0,value;
@@ -29,8 +31,8 @@
}
}
}
- while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
- ? toupper(*cp) : *cp)-'A'+10) < base) {
+ while (isxdigit(*cp) &&
+ (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) {
result = result*base + value;
cp++;
}
@@ -46,14 +48,11 @@
return simple_strtoul(cp,endp,base);
}
-/* we use this so that we can do without the ctype library */
-#define is_digit(c) ((c) >= '0' && (c) <= '9')
-
static int skip_atoi(const char **s)
{
int i=0;
- while (is_digit(**s))
+ while (isdigit(**s))
i = i*10 + *((*s)++) - '0';
return i;
}
@@ -66,14 +65,7 @@
#define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
-#define do_div(n,base) ({ \
-int __res; \
-__res = ((unsigned long) n) % (unsigned) base; \
-n = ((unsigned long) n) / (unsigned) base; \
-__res; })
-
-static char * number(char * str, long num, int base, int size, int precision
- ,int type)
+static char * number(char * str, long long num, int base, int size, int precision, int type)
{
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
@@ -145,7 +137,7 @@
int vsprintf(char *buf, const char *fmt, va_list args)
{
int len;
- unsigned long num;
+ unsigned long long num;
int i, base;
char * str;
const char *s;
@@ -156,7 +148,10 @@
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier; /* 'h', 'l', or 'L' for integer fields */
+ /* 'z' support added 23/7/1999 S.H. */
+ /* 'z' changed to 'Z' --davidm 1/25/99 */
+
for (str=buf ; *fmt ; ++fmt) {
if (*fmt != '%') {
*str++ = *fmt;
@@ -177,7 +172,7 @@
/* get field width */
field_width = -1;
- if (is_digit(*fmt))
+ if (isdigit(*fmt))
field_width = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
@@ -193,7 +188,7 @@
precision = -1;
if (*fmt == '.') {
++fmt;
- if (is_digit(*fmt))
+ if (isdigit(*fmt))
precision = skip_atoi(&fmt);
else if (*fmt == '*') {
++fmt;
@@ -206,7 +201,7 @@
/* get the conversion qualifier */
qualifier = -1;
- if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
+ if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') {
qualifier = *fmt;
++fmt;
}
@@ -255,6 +250,9 @@
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
*ip = (str - buf);
+ } else if (qualifier == 'Z') {
+ size_t * ip = va_arg(args, size_t *);
+ *ip = (str - buf);
} else {
int * ip = va_arg(args, int *);
*ip = (str - buf);
@@ -290,16 +288,23 @@
--fmt;
continue;
}
- if (qualifier == 'l')
+ if (qualifier == 'L')
+ num = va_arg(args, long long);
+ else if (qualifier == 'l') {
num = va_arg(args, unsigned long);
- else if (qualifier == 'h') {
+ if (flags & SIGN)
+ num = (signed long) num;
+ } else if (qualifier == 'Z') {
+ num = va_arg(args, size_t);
+ } else if (qualifier == 'h') {
num = (unsigned short) va_arg(args, int);
if (flags & SIGN)
- num = (short) num;
- } else if (flags & SIGN)
- num = va_arg(args, int);
- else
+ num = (signed short) num;
+ } else {
num = va_arg(args, unsigned int);
+ if (flags & SIGN)
+ num = (signed int) num;
+ }
str = number(str, num, base, field_width, precision, flags);
}
*str = '\0';
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Linux 2.2.19pre1
2000-12-15 19:51 Linux 2.2.19pre1 Alan Cox
2000-12-15 20:03 ` [PATCH] Re: Linux 2.2.19pre1 : procfs api Michael Rothwell
2000-12-15 20:05 ` [PATCH] Re: Linux 2.2.19pre1 64-bit printk Michael Rothwell
@ 2000-12-15 20:56 ` Tom Rini
2000-12-16 14:13 ` Andrea Arcangeli
2000-12-16 21:40 ` Andre Hedrick
4 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2000-12-15 20:56 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
On Fri, Dec 15, 2000 at 07:51:04PM +0000, Alan Cox wrote:
> Ok this is the first block of changes before we merge the VM stuff. This is
> mostly the bits left over from the 2.2.18 port that were deferred as too
> risky near the end of a prerelease set and some bug swats
I believe Brad Douglas has soemthing for aty128fb as well, but the attached
patch defines the correct CONFIG_FBCON_CFBXXs for aty128.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
[-- Attachment #3: 128fix.patch --]
[-- Type: text/plain, Size: 3757 bytes --]
===== drivers/video/Config.in 1.10 vs edited =====
--- 1.10/drivers/video/Config.in Fri Oct 20 22:20:29 2000
+++ edited/drivers/video/Config.in Sun Dec 10 13:33:45 2000
@@ -188,7 +188,8 @@
"$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_IGA" = "y" -o "$CONFIG_FB_MATROX" = "y" -o \
"$CONFIG_FB_CT65550" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
- "$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_FB_CYBER2000" = "y" ]; then
+ "$CONFIG_FB_SGIVW" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \
+ "$CONFIG_FB_ATY128" = "y" ]; then
define_bool CONFIG_FBCON_CFB8 y
else
if [ "$CONFIG_FB_ACORN" = "m" -o "$CONFIG_FB_ATARI" = "m" -o \
@@ -202,14 +203,15 @@
"$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_IGA" = "m" -o "$CONFIG_FB_MATROX" = "m" -o \
"$CONFIG_FB_CT65550" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
- "$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_CYBER2000" = "m" ]; then
+ "$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_CYBER2000" = "m" -o \
+ "$CONFIG_FB_ATY128" = "m" ]; then
define_bool CONFIG_FBCON_CFB8 m
fi
fi
if [ "$CONFIG_FB_ATARI" = "y" -o "$CONFIG_FB_ATY" = "y" -o \
"$CONFIG_FB_MAC" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
"$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_TBOX" = "y" -o \
- "$CONFIG_FB_Q40" = "y" -o \
+ "$CONFIG_FB_Q40" = "y" -o "$CONFIG_FB_ATY128" = "y" -o \
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_VIRGE" = "y" -o "$CONFIG_FB_CYBER" = "y" -o \
"$CONFIG_FB_VALKYRIE" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
@@ -221,7 +223,7 @@
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
"$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_VESA" = "m" -o \
"$CONFIG_FB_VIRTUAL" = "m" -o "$CONFIG_FB_TBOX" = "m" -o \
- "$CONFIG_FB_Q40" = "m" -o \
+ "$CONFIG_FB_Q40" = "m" -o "$CONFIG_FB_ATY128" = "m" -o \
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_VIRGE" = "m" -o "$CONFIG_FB_CYBER" = "m" -o \
"$CONFIG_FB_VALKYRIE" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
@@ -233,14 +235,14 @@
fi
if [ "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \
"$CONFIG_FB_CLGEN" = "y" -o "$CONFIG_FB_VESA" = "y" -o \
- "$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
- "$CONFIG_FB_CYBER2000" = "y" ]; then
+ "$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
+ "$CONFIG_FB_CYBER2000" = "y" -o "$CONFIG_FB_ATY128" = "y" ]; then
define_bool CONFIG_FBCON_CFB24 y
else
if [ "$CONFIG_FB_ATY" = "m" -o "$CONFIG_FB_VIRTUAL" = "m" -o \
"$CONFIG_FB_CLGEN" = "m" -o "$CONFIG_FB_VESA" = "m" -o \
"$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
- "$CONFIG_FB_CYBER2000" = "m" ]; then
+ "$CONFIG_FB_CYBER2000" = "m" -o "$CONFIG_FB_ATY128" = "m" ]; then
define_bool CONFIG_FBCON_CFB24 m
fi
fi
@@ -249,7 +251,8 @@
"$CONFIG_FB_CONTROL" = "y" -o "$CONFIG_FB_CLGEN" = "y" -o \
"$CONFIG_FB_TGA" = "y" -o "$CONFIG_FB_PLATINUM" = "y" -o \
"$CONFIG_FB_MATROX" = "y" -o "$CONFIG_FB_PM2" = "y" -o \
- "$CONFIG_FB_FM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" ]; then
+ "$CONFIG_FB_FM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \
+ "$CONFIG_FB_ATY128" = "y" ]; then
define_bool CONFIG_FBCON_CFB32 y
else
if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \
@@ -257,7 +260,7 @@
"$CONFIG_FB_CONTROL" = "m" -o "$CONFIG_FB_CLGEN" = "m" -o \
"$CONFIG_FB_TGA" = "m" -o "$CONFIG_FB_PLATINUM" = "m" -o \
"$CONFIG_FB_MATROX" = "m" -o "$CONFIG_FB_PM2" = "m" -o \
- "$CONFIG_FB_SGIVW" = "m" ]; then
+ "$CONFIG_FB_SGIVW" = "m" -o "$CONFIG_FB_ATY128" = "m" ]; then
define_bool CONFIG_FBCON_CFB32 m
fi
fi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Re: Linux 2.2.19pre1 : procfs api
2000-12-15 20:03 ` [PATCH] Re: Linux 2.2.19pre1 : procfs api Michael Rothwell
@ 2000-12-16 7:05 ` Willy Tarreau
2000-12-16 14:34 ` Michael Rothwell
0 siblings, 1 reply; 10+ messages in thread
From: Willy Tarreau @ 2000-12-16 7:05 UTC (permalink / raw)
To: Michael Rothwell; +Cc: Alan Cox, linux-kernel
Hello Michael, I wonder about this patch which only fixes an Id/author but no
code. It may be perfectly normal, but could also come from a mangled file in
one of your trees. Just for info anyway...
Cheers,
Willy
> diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c
zinux/fs/proc/openpromfs.c
> --- linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c Fri Dec 8 14:57:07 2000
> +++ zinux/fs/proc/openpromfs.c Fri Dec 8 15:08:59 2000
> @@ -1,4 +1,4 @@
> -/* $Id: openpromfs.c,v 1.33 1999/04/28 11:57:33 davem Exp $
> +/* $Id: openpromfs.c,v 1.1.1.1 2000/12/08 20:08:59 zapman Exp $
> * openpromfs.c: /proc/openprom handling routines
> *
> * Copyright (C) 1996-1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Linux 2.2.19pre1
2000-12-15 19:51 Linux 2.2.19pre1 Alan Cox
` (2 preceding siblings ...)
2000-12-15 20:56 ` Linux 2.2.19pre1 Tom Rini
@ 2000-12-16 14:13 ` Andrea Arcangeli
2000-12-16 16:19 ` Alan Cox
2000-12-16 21:40 ` Andre Hedrick
4 siblings, 1 reply; 10+ messages in thread
From: Andrea Arcangeli @ 2000-12-16 14:13 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
On Fri, Dec 15, 2000 at 07:51:04PM +0000, Alan Cox wrote:
> o Basic page aging (Neil Schemenauer)
> | This is a beginning to trying to get the VM right
(page aging isn't a matter of correctness of the VM, it's only a matter of
performance basically only during swap [for all other usages lru behaviour is
enough])
About the implementation the swapcache aging is going to be wrong and it could
cause swapcache storms during swap. In 2.2.x we can't implement a kind of
deactivate_page that works on lru, because there's no lru, so all we can do is
to ignore the aging for swap_cache that isn't referenced by anybody (either on
swap or on memory).
Also the implementation is dubios and suboptimal (I'd replace PG_referenced
with page->age instead of mixing the two things, plus page->age is set at
page-freeing time while you want to initialize it only when adding swapcache or
pagecache [this save CPU cycles]).
Even if the patch [after fixing the swapout issue pointed out above] looks safe
I need a bit more time to verify that it doesn't change the balancing of the VM
(the point of aging is to make harder the in-core pages to be freed so it will
somehow increase the swapout factor) and so in the very short term I won't
support the VM-global patch on top of page-aging (to avoid invalidating all the
testing and feedback it had).
For 2.2.19pre2 short term I'd suggest to backout the aging patch and to apply
VM-global against 2.2.18. This will make VM behaviour better regardless
of aging, then if you still feel the need of aging on your 486 8mbyte box
I will try to put your patch on top of VM-global at least after addressing
the swapcache shrinking issue and optimizing it a little bit.
Comments?
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Re: Linux 2.2.19pre1 : procfs api
2000-12-16 7:05 ` Willy Tarreau
@ 2000-12-16 14:34 ` Michael Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Michael Rothwell @ 2000-12-16 14:34 UTC (permalink / raw)
To: Willy Tarreau; +Cc: Alan Cox, linux-kernel
Heh. Mangleage. :)
Willy Tarreau wrote:
>
> Hello Michael, I wonder about this patch which only fixes an Id/author but no
> code. It may be perfectly normal, but could also come from a mangled file in
> one of your trees. Just for info anyway...
>
> Cheers,
> Willy
>
> > diff -r -u -x CVS -x *.o linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c
> zinux/fs/proc/openpromfs.c
> > --- linux-2.2.18pre25-VIRGIN/fs/proc/openpromfs.c Fri Dec 8 14:57:07 2000
> > +++ zinux/fs/proc/openpromfs.c Fri Dec 8 15:08:59 2000
> > @@ -1,4 +1,4 @@
> > -/* $Id: openpromfs.c,v 1.33 1999/04/28 11:57:33 davem Exp $
> > +/* $Id: openpromfs.c,v 1.1.1.1 2000/12/08 20:08:59 zapman Exp $
> > * openpromfs.c: /proc/openprom handling routines
> > *
> > * Copyright (C) 1996-1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Linux 2.2.19pre1
2000-12-16 14:13 ` Andrea Arcangeli
@ 2000-12-16 16:19 ` Alan Cox
2000-12-16 16:26 ` Andrea Arcangeli
0 siblings, 1 reply; 10+ messages in thread
From: Alan Cox @ 2000-12-16 16:19 UTC (permalink / raw)
To: Andrea Arcangeli; +Cc: Alan Cox, linux-kernel
> > o Basic page aging (Neil Schemenauer)
> > | This is a beginning to trying to get the VM right
>
> (page aging isn't a matter of correctness of the VM, it's only a matter of
> performance basically only during swap [for all other usages lru behaviour is
> enough])
'Getting the VM right' isnt just correctness although that is obviously
extremely important. And getting it in early to find out how it behaves was
done because its hard to predict right now.
> For 2.2.19pre2 short term I'd suggest to backout the aging patch and to apply
> VM-global against 2.2.18. This will make VM behaviour better regardless
> of aging, then if you still feel the need of aging on your 486 8mbyte box
> I will try to put your patch on top of VM-global at least after addressing
> the swapcache shrinking issue and optimizing it a little bit.
Ok
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Linux 2.2.19pre1
2000-12-16 16:19 ` Alan Cox
@ 2000-12-16 16:26 ` Andrea Arcangeli
0 siblings, 0 replies; 10+ messages in thread
From: Andrea Arcangeli @ 2000-12-16 16:26 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
On Sat, Dec 16, 2000 at 04:19:47PM +0000, Alan Cox wrote:
> extremely important. And getting it in early to find out how it behaves was
> done because its hard to predict right now.
Did you got any feedback yet? I believe it shouldn't make much difference
because it's a very light aging, but as you say it's hard to predict in all
scenarios (and with another more aggressive one I could generate some weird
scenario...).
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Linux 2.2.19pre1
2000-12-15 19:51 Linux 2.2.19pre1 Alan Cox
` (3 preceding siblings ...)
2000-12-16 14:13 ` Andrea Arcangeli
@ 2000-12-16 21:40 ` Andre Hedrick
4 siblings, 0 replies; 10+ messages in thread
From: Andre Hedrick @ 2000-12-16 21:40 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
For the Nth time I have been asked so I will has you the Nth++ time.
Patch or wait..........
Nobody is to comment against this thread, this is an Alan & Andre issue.
Cheers,
Andre Hedrick
CTO Timpanogas Research Group
EVP Linux Development, TRG
Linux ATA Development
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2000-12-16 22:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-15 19:51 Linux 2.2.19pre1 Alan Cox
2000-12-15 20:03 ` [PATCH] Re: Linux 2.2.19pre1 : procfs api Michael Rothwell
2000-12-16 7:05 ` Willy Tarreau
2000-12-16 14:34 ` Michael Rothwell
2000-12-15 20:05 ` [PATCH] Re: Linux 2.2.19pre1 64-bit printk Michael Rothwell
2000-12-15 20:56 ` Linux 2.2.19pre1 Tom Rini
2000-12-16 14:13 ` Andrea Arcangeli
2000-12-16 16:19 ` Alan Cox
2000-12-16 16:26 ` Andrea Arcangeli
2000-12-16 21:40 ` Andre Hedrick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox