summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-21 22:00:56 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-21 22:00:56 +0000
commit168660f24dfc46c2702acbe4701a446f42a59578 (patch)
treef431368afbf6b1b71809cf3fd904d800ea126f4d /include/linux
parent6420f767924fa73b0ea267864d96820815f4ba5a (diff)
Merge with Linux 2.4.0-test5-pre3.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h10
-rw-r--r--include/linux/coda_linux.h2
-rw-r--r--include/linux/elevator.h63
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/hfs_sysdep.h2
-rw-r--r--include/linux/msdos_fs_sb.h3
-rw-r--r--include/linux/ncp_fs.h4
-rw-r--r--include/linux/nfsd/stats.h3
-rw-r--r--include/linux/nls.h22
-rw-r--r--include/linux/pm.h1
-rw-r--r--include/linux/raid/md.h5
-rw-r--r--include/linux/slab.h1
-rw-r--r--include/linux/smb_fs.h2
-rw-r--r--include/linux/timer.h27
14 files changed, 44 insertions, 102 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 6a9894bb0..993fd93e7 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -114,6 +114,10 @@ typedef int acpi_dstate_t;
#define ACPI_TMR_VAL_EXT 0x00000100
#define ACPI_DCK_CAP 0x00000200
+/* FACP BOOT_ARCH flags */
+#define FACP_BOOT_ARCH_LEGACY_DEVICES 0x0001
+#define FACP_BOOT_ARCH_KBD_CONTROLLER 0x0002
+
/* FACS flags */
#define ACPI_S4BIOS 0x00000001
@@ -184,8 +188,7 @@ struct acpi_facp {
__u8 day_alarm;
__u8 mon_alarm;
__u8 century;
- __u8 reserved4;
- __u8 reserved5;
+ __u16 boot_arch;
__u8 reserved6;
__u32 flags;
} __attribute__ ((packed));
@@ -221,6 +224,9 @@ enum
ACPI_ENTER_LVL3_LAT,
ACPI_P_LVL2_LAT,
ACPI_P_LVL3_LAT,
+ ACPI_C1_TIME,
+ ACPI_C2_TIME,
+ ACPI_C3_TIME,
ACPI_S0_SLP_TYP,
ACPI_S1_SLP_TYP,
ACPI_S5_SLP_TYP,
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 556d1b60e..0b4057efc 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -116,7 +116,7 @@ do { \
} while (0)
-#define CODA_FREE(ptr,size) do {if (size < 3000) { kfree_s((ptr), (size)); CDEBUG(D_MALLOC, "kfreed: %lx at %p.\n", (long) size, ptr); } else { vfree((ptr)); CDEBUG(D_MALLOC, "vfreed: %lx at %p.\n", (long) size, ptr);} } while (0)
+#define CODA_FREE(ptr,size) do {if (size < 3000) { kfree((ptr)); CDEBUG(D_MALLOC, "kfreed: %lx at %p.\n", (long) size, ptr); } else { vfree((ptr)); CDEBUG(D_MALLOC, "vfreed: %lx at %p.\n", (long) size, ptr);} } while (0)
/* inode to cnode access functions */
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index b1f56316b..16fa9cae6 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -30,9 +30,6 @@ struct elevator_s
unsigned int queue_ID;
};
-void elevator_default(struct request *, elevator_t *, struct list_head *, struct list_head *, int);
-int elevator_default_merge(request_queue_t *, struct request **, struct buffer_head *, int, int *, int *);
-void elevator_default_dequeue(struct request *);
void elevator_noop(struct request *, elevator_t *, struct list_head *, struct list_head *, int);
int elevator_noop_merge(request_queue_t *, struct request **, struct buffer_head *, int, int *, int *);
void elevator_noop_dequeue(struct request *);
@@ -54,17 +51,6 @@ extern int blkelvset_ioctl(elevator_t *, const blkelv_ioctl_arg_t *);
extern void elevator_init(elevator_t *, elevator_t);
-#ifdef ELEVATOR_DEBUG
-extern void elevator_default_debug(request_queue_t *, kdev_t);
-#else
-#define elevator_default_debug(a,b) do { } while(0)
-#endif
-
-#define elevator_sequence_after(a,b) ((int)((b)-(a)) < 0)
-#define elevator_sequence_before(a,b) elevator_sequence_after(b,a)
-#define elevator_sequence_after_eq(a,b) ((int)((b)-(a)) <= 0)
-#define elevator_sequence_before_eq(a,b) elevator_sequence_after_eq(b,a)
-
/*
* Return values from elevator merger
*/
@@ -83,39 +69,6 @@ extern void elevator_default_debug(request_queue_t *, kdev_t);
(s1)->sector < (s2)->sector)) || \
(s1)->rq_dev < (s2)->rq_dev)
-static inline void elevator_merge_requests(struct request * req, struct request * next)
-{
- if (elevator_sequence_before(next->elevator_sequence, req->elevator_sequence))
- req->elevator_sequence = next->elevator_sequence;
- if (req->cmd == READ)
- req->e->read_pendings--;
-
-}
-
-static inline int elevator_sequence(elevator_t * e, int latency)
-{
- return latency + e->sequence;
-}
-
-#define elevator_merge_before(req, lat) __elevator_merge((req), (lat), 0)
-#define elevator_merge_after(req, lat) __elevator_merge((req), (lat), 1)
-static inline void __elevator_merge(struct request * req, int latency, int after)
-{
- int sequence = elevator_sequence(req->e, latency);
- if (after)
- sequence -= req->nr_segments;
- if (elevator_sequence_before(sequence, req->elevator_sequence))
- req->elevator_sequence = sequence;
-}
-
-static inline void elevator_account_request(struct request * req)
-{
- req->e->sequence++;
- if (req->cmd == READ)
- req->e->read_pendings++;
- req->e->nr_segments++;
-}
-
static inline int elevator_request_latency(elevator_t * elevator, int rw)
{
int latency;
@@ -127,22 +80,6 @@ static inline int elevator_request_latency(elevator_t * elevator, int rw)
return latency;
}
-#define ELEVATOR_DEFAULT \
-((elevator_t) { \
- 0, /* sequence */ \
- \
- 100000, /* read_latency */ \
- 100000, /* write_latency */ \
- 128, /* max_bomb_segments */ \
- \
- 0, /* nr_segments */ \
- 0, /* read_pendings */ \
- \
- elevator_default, /* elevator_fn */ \
- elevator_default_merge, /* elevator_merge_fn */ \
- elevator_default_dequeue, /* dequeue_fn */ \
- })
-
#define ELEVATOR_NOOP \
((elevator_t) { \
0, /* sequence */ \
diff --git a/include/linux/fs.h b/include/linux/fs.h
index dcb93786e..821abdf30 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -73,7 +73,6 @@ extern int max_super_blocks, nr_super_blocks;
#define WRITERAW 5 /* raw write - don't play with buffer lists */
-#define NIL_FILP ((struct file *)0)
#define SEL_IN 1
#define SEL_OUT 2
#define SEL_EX 4
diff --git a/include/linux/hfs_sysdep.h b/include/linux/hfs_sysdep.h
index 5172139ec..0c0b9bb91 100644
--- a/include/linux/hfs_sysdep.h
+++ b/include/linux/hfs_sysdep.h
@@ -61,7 +61,7 @@ extern inline void *hfs_malloc(unsigned int size) {
}
extern inline void hfs_free(void *ptr, unsigned int size) {
- kfree_s(ptr, size);
+ kfree(ptr);
#if defined(DEBUG_ALL) || defined(DEBUG_MEM)
hfs_warn("%ld bytes allocation at %s:%u\n",
(hfs_alloc -= ptr ? size : 0), __FILE__, __LINE__);
diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
index de8913cd3..6c86a6a2e 100644
--- a/include/linux/msdos_fs_sb.h
+++ b/include/linux/msdos_fs_sb.h
@@ -24,7 +24,8 @@ struct fat_mount_options {
posixfs:1, /* Allow names like makefile and Makefile to coexist */
numtail:1, /* Does first alias have a numeric '~1' type tail? */
atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */
- fat32:1; /* Is this a FAT32 partition? */
+ fat32:1, /* Is this a FAT32 partition? */
+ nocase:1; /* Does this need case conversion? 0=need case conversion*/
};
struct vfat_unicode {
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index 87dfef8cb..cedd7f05e 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -212,13 +212,13 @@ static inline void *
static inline void ncp_kfree_s(void *obj, int size)
{
ncp_current_malloced -= 1;
- kfree_s(obj, size);
+ kfree(obj, size);
}
#else /* DEBUG_NCP_MALLOC */
#define ncp_kmalloc(s,p) kmalloc(s,p)
-#define ncp_kfree_s(o,s) kfree_s(o,s)
+#define ncp_kfree_s(o,s) kfree(o)
#endif /* DEBUG_NCP_MALLOC */
diff --git a/include/linux/nfsd/stats.h b/include/linux/nfsd/stats.h
index 3523a6daa..b6f1e0cda 100644
--- a/include/linux/nfsd/stats.h
+++ b/include/linux/nfsd/stats.h
@@ -29,6 +29,9 @@ struct nfsd_stats {
* in the cache (10percentiles). [10] = not found */
};
+/* thread usage wraps very million seconds (approx one fortnight) */
+#define NFSD_USAGE_WRAP (HZ*1000000)
+
#ifdef __KERNEL__
extern struct nfsd_stats nfsdstats;
diff --git a/include/linux/nls.h b/include/linux/nls.h
index 62f52e740..68f204934 100644
--- a/include/linux/nls.h
+++ b/include/linux/nls.h
@@ -1,20 +1,22 @@
#include <linux/init.h>
-struct nls_unicode {
- unsigned char uni1;
- unsigned char uni2;
-};
+/* unicode character */
+typedef __u16 wchar_t;
struct nls_table {
char *charset;
- unsigned char **page_uni2charset;
- struct nls_unicode *charset2uni;
+ int (*uni2char) (wchar_t uni, unsigned char *out, int boundlen);
+ int (*char2uni) (const unsigned char *rawstring, int boundlen,
+ wchar_t *uni);
unsigned char *charset2lower;
unsigned char *charset2upper;
struct module *owner;
struct nls_table *next;
};
+/* this value hold the maximum octet of charset */
+#define NLS_MAX_CHARSET_SIZE 3
+
/* nls.c */
extern int register_nls(struct nls_table *);
extern int unregister_nls(struct nls_table *);
@@ -22,7 +24,7 @@ extern struct nls_table *load_nls(char *);
extern void unload_nls(struct nls_table *);
extern struct nls_table *load_nls_default(void);
-extern int utf8_mbtowc(__u16 *, const __u8 *, int);
-extern int utf8_mbstowcs(__u16 *, const __u8 *, int);
-extern int utf8_wctomb(__u8 *, __u16, int);
-extern int utf8_wcstombs(__u8 *, const __u16 *, int);
+extern int utf8_mbtowc(wchar_t *, const __u8 *, int);
+extern int utf8_mbstowcs(wchar_t *, const __u8 *, int);
+extern int utf8_wctomb(__u8 *, wchar_t, int);
+extern int utf8_wcstombs(__u8 *, const wchar_t *, int);
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 1a4205a9d..ce31f81a6 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -59,6 +59,7 @@ enum
PM_USB_DEV, /* USB device */
PM_SCSI_DEV, /* SCSI device */
PM_ISA_DEV, /* ISA device */
+ PM_MTD_DEV, /* Memory Technology Device */
};
typedef int pm_dev_t;
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index 152fb359b..b36a7ce01 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -76,6 +76,7 @@ extern void md_interrupt_thread (mdk_thread_t *thread);
extern int md_update_sb (mddev_t *mddev);
extern int md_do_sync(mddev_t *mddev, mdp_disk_t *spare);
extern void md_done_sync(mddev_t *mddev, int blocks, int ok);
+extern void md_sync_acct(kdev_t dev, unsigned long nr_sectors);
extern void md_recover_arrays (void);
extern int md_check_ordering (mddev_t *mddev);
extern struct gendisk * find_gendisk (kdev_t dev);
@@ -83,9 +84,7 @@ extern int md_notify_reboot(struct notifier_block *this,
unsigned long code, void *x);
extern int md_error (kdev_t mddev, kdev_t rdev);
-#if CONFIG_BLK_DEV_MD
-extern void raid_setup(char *str,int *ints) md__init;
-#endif
+extern void raid_setup(char *str) md__init;
extern void md_print_devices (void);
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 58edc3b0c..ace3e2863 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -58,7 +58,6 @@ extern void kmem_cache_free(kmem_cache_t *, void *);
extern void *kmalloc(size_t, int);
extern void kfree(const void *);
-#define kfree_s(objp,s) kfree(objp)
extern void kmem_cache_reap(int);
extern int slabinfo_read_proc(char *page, char **start, off_t off,
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h
index 9eb6c28bd..375ff3112 100644
--- a/include/linux/smb_fs.h
+++ b/include/linux/smb_fs.h
@@ -61,7 +61,7 @@ smb_vfree(void *obj)
#else /* DEBUG_SMB_MALLOC */
#define smb_kmalloc(s,p) kmalloc(s,p)
-#define smb_kfree_s(o,s) kfree_s(o,s)
+#define smb_kfree_s(o,s) kfree(o)
#define smb_vmalloc(s) vmalloc(s)
#define smb_vfree(o) vfree(o)
diff --git a/include/linux/timer.h b/include/linux/timer.h
index e921de639..0dc24204f 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -24,14 +24,23 @@ struct timer_list {
void (*function)(unsigned long);
};
-extern volatile struct timer_list *running_timer;
extern void add_timer(struct timer_list * timer);
extern int del_timer(struct timer_list * timer);
+#ifdef CONFIG_SMP
+extern int del_timer_sync(struct timer_list * timer);
+extern void sync_timers(void);
+#else
+#define del_timer_sync(t) del_timer(t)
+#define sync_timers() do { } while (0)
+#endif
+
/*
* mod_timer is a more efficient way to update the expire field of an
* active timer (if the timer is inactive it will be activated)
- * mod_timer(a,b) is equivalent to del_timer(a); a->expires = b; add_timer(a)
+ * mod_timer(a,b) is equivalent to del_timer(a); a->expires = b; add_timer(a).
+ * If the timer is known to be not pending (ie, in the handler), mod_timer
+ * is less efficient than a->expires = b; add_timer(a).
*/
int mod_timer(struct timer_list *timer, unsigned long expires);
@@ -47,20 +56,6 @@ static inline int timer_pending (const struct timer_list * timer)
return timer->list.next != NULL;
}
-#ifdef CONFIG_SMP
-#define timer_enter(t) do { running_timer = t; mb(); } while (0)
-#define timer_exit() do { running_timer = NULL; } while (0)
-#define timer_is_running(t) (running_timer == t)
-#define timer_synchronize(t) while (timer_is_running(t)) barrier()
-extern int del_timer_sync(struct timer_list * timer);
-#else
-#define timer_enter(t) do { } while (0)
-#define timer_exit() do { } while (0)
-#define timer_is_running(t) (0)
-#define timer_synchronize(t) do { (void)(t); barrier(); } while(0)
-#define del_timer_sync(t) del_timer(t)
-#endif
-
/*
* These inlines deal with timer wrapping correctly. You are
* strongly encouraged to use them