summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-23 14:05:01 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-23 14:05:01 +0000
commitf3627cbe9236a062012c836f3b6ee311b43f63f2 (patch)
treeae854838b9a73b35bd0f3b8f42e5fb7f9cb1d5a9 /include/linux
parentfea12a7b3f20bc135ab533491411e9ff753c01c8 (diff)
Merge with Linux 2.4.0-test5-pre4.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h10
-rw-r--r--include/linux/file.h37
-rw-r--r--include/linux/genhd.h2
-rw-r--r--include/linux/kmod.h3
-rw-r--r--include/linux/mm.h49
-rw-r--r--include/linux/ncp_fs.h2
-rw-r--r--include/linux/poll.h15
-rw-r--r--include/linux/raid/md.h3
-rw-r--r--include/linux/raid/md_p.h15
-rw-r--r--include/linux/sched.h30
-rw-r--r--include/linux/serialP.h3
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/usb.h2
13 files changed, 45 insertions, 127 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 4f00239bf..f8ec698cc 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -196,4 +196,14 @@ extern int * max_segments[MAX_BLKDEV];
extern void drive_stat_acct (kdev_t dev, int rw,
unsigned long nr_sectors, int new_io);
+static inline int get_hardsect_size(kdev_t dev)
+{
+ extern int *hardsect_size[];
+ if (hardsect_size[MAJOR(dev)] != NULL)
+ return hardsect_size[MAJOR(dev)][MINOR(dev)];
+ else
+ return 512;
+}
+
+
#endif
diff --git a/include/linux/file.h b/include/linux/file.h
index 268fd27a1..a206b616b 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -5,7 +5,8 @@
#ifndef __LINUX_FILE_H
#define __LINUX_FILE_H
-extern void _fput(struct file *);
+extern void FASTCALL(fput(struct file *));
+extern struct file * FASTCALL(fget(unsigned int fd));
static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
{
@@ -38,40 +39,6 @@ static inline struct file * frip(struct files_struct *files, unsigned int fd)
return file;
}
-static inline struct file * fget(unsigned int fd)
-{
- struct file * file = NULL;
- struct files_struct *files = current->files;
-
- read_lock(&files->file_lock);
- file = fcheck(fd);
- if (file)
- get_file(file);
- read_unlock(&files->file_lock);
- return file;
-}
-
-/*
- * 23/12/1998 Marcin Dalecki <dalecki@cs.net.pl>:
- *
- * Since those functions where calling other functions, it was completely
- * bogus to make them all "extern inline".
- *
- * The removal of this pseudo optimization saved me scandalous:
- *
- * 3756 (i386 arch)
- *
- * precious bytes from my kernel, even without counting all the code compiled
- * as module!
- *
- * I suspect there are many other similar "optimizations" across the
- * kernel...
- */
-static inline void fput(struct file * file)
-{
- if (atomic_dec_and_test(&file->f_count))
- _fput(file);
-}
extern void put_filp(struct file *);
extern int get_unused_fd(void);
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index c0f69dbb4..6cfe0bbb7 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -231,7 +231,7 @@ char *disk_name (struct gendisk *hd, int minor, char *buf);
extern void devfs_register_partitions (struct gendisk *dev, int minor,
int unregister);
-int get_hardsect_size(kdev_t dev);
+
/*
* FIXME: this should use genhd->minor_shift, but that is slow to look up.
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 4e880c937..4bc6187b3 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -8,6 +8,9 @@
#ifdef CONFIG_KMOD
extern int request_module(const char * name);
extern int exec_usermodehelper(char *program_path, char *argv[], char *envp[]);
+#ifdef CONFIG_HOTPLUG
+extern char hotplug_path [];
+#endif
#else
static inline int request_module(const char * name) { return -ENOSYS; }
static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 70f57f770..b8f6a4964 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -327,18 +327,10 @@ static inline struct page * alloc_pages(int gfp_mask, unsigned long order)
extern struct page * alloc_pages(int gfp_mask, unsigned long order);
#endif /* !CONFIG_DISCONTIGMEM */
-#define alloc_page(gfp_mask) \
- alloc_pages(gfp_mask, 0)
+#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
-static inline unsigned long __get_free_pages (int gfp_mask, unsigned long order)
-{
- struct page * page;
-
- page = alloc_pages(gfp_mask, order);
- if (!page)
- return 0;
- return page_address(page);
-}
+extern unsigned long FASTCALL(__get_free_pages(int gfp_mask, unsigned long order));
+extern unsigned long FASTCALL(get_zeroed_page(int gfp_mask));
#define __get_free_page(gfp_mask) \
__get_free_pages((gfp_mask),0)
@@ -346,16 +338,6 @@ static inline unsigned long __get_free_pages (int gfp_mask, unsigned long order)
#define __get_dma_pages(gfp_mask, order) \
__get_free_pages((gfp_mask) | GFP_DMA,(order))
-static inline unsigned long get_zeroed_page(int gfp_mask)
-{
- unsigned long page;
-
- page = __get_free_page(gfp_mask);
- if (page)
- clear_page((void *)page);
- return page;
-}
-
/*
* The old interface name will be removed in 2.5:
*/
@@ -364,29 +346,10 @@ static inline unsigned long get_zeroed_page(int gfp_mask)
/*
* There is only one 'core' page-freeing function.
*/
-extern void FASTCALL(__free_pages_ok(struct page * page, unsigned long order));
-
-static inline void __free_pages(struct page *page, unsigned long order)
-{
- if (!put_page_testzero(page))
- return;
- __free_pages_ok(page, order);
-}
-
-#define __free_page(page) __free_pages(page, 0)
-
-static inline void free_pages(unsigned long addr, unsigned long order)
-{
- unsigned long map_nr;
-
-#ifdef CONFIG_DISCONTIGMEM
- if (addr == 0) return;
-#endif
- map_nr = MAP_NR(addr);
- if (map_nr < max_mapnr)
- __free_pages(mem_map + map_nr, order);
-}
+extern void FASTCALL(__free_pages(struct page *page, unsigned long order));
+extern void FASTCALL(free_pages(unsigned long addr, unsigned long order));
+#define __free_page(page) __free_pages((page), 0)
#define free_page(addr) free_pages((addr),0)
extern void show_free_areas(void);
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index cedd7f05e..7d67f410b 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -212,7 +212,7 @@ static inline void *
static inline void ncp_kfree_s(void *obj, int size)
{
ncp_current_malloced -= 1;
- kfree(obj, size);
+ kfree(obj);
}
#else /* DEBUG_NCP_MALLOC */
diff --git a/include/linux/poll.h b/include/linux/poll.h
index 64b5df671..24138dbd2 100644
--- a/include/linux/poll.h
+++ b/include/linux/poll.h
@@ -10,26 +10,13 @@
#include <linux/mm.h>
#include <asm/uaccess.h>
-
-struct poll_table_entry {
- struct file * filp;
- wait_queue_t wait;
- wait_queue_head_t * wait_address;
-};
-
-struct poll_table_page {
- struct poll_table_page * next;
- unsigned int nr;
- struct poll_table_entry * entry;
-};
+struct poll_table_page;
typedef struct poll_table_struct {
int error;
struct poll_table_page * table;
} poll_table;
-#define __MAX_POLL_TABLE_ENTRIES ((PAGE_SIZE - sizeof (struct poll_table_page)) / sizeof (struct poll_table_entry))
-
extern void __pollwait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p);
extern inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index b36a7ce01..7aef27bca 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -19,7 +19,6 @@
#define _MD_H
#include <linux/mm.h>
-#include <linux/config.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <asm/semaphore.h>
@@ -84,8 +83,6 @@ extern int md_notify_reboot(struct notifier_block *this,
unsigned long code, void *x);
extern int md_error (kdev_t mddev, kdev_t rdev);
-extern void raid_setup(char *str) md__init;
-
extern void md_print_devices (void);
#define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); }
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index 1b9632c14..0c6e1a368 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -115,7 +115,7 @@ typedef struct mdp_superblock_s {
__u32 not_persistent; /* 12 does it have a persistent superblock */
__u32 set_uuid1; /* 13 Raid set identifier #2 */
__u32 set_uuid2; /* 14 Raid set identifier #3 */
- __u32 set_uuid3; /* 14 Raid set identifier #4 */
+ __u32 set_uuid3; /* 15 Raid set identifier #4 */
__u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 16];
/*
@@ -128,7 +128,13 @@ typedef struct mdp_superblock_s {
__u32 failed_disks; /* 4 Number of failed disks */
__u32 spare_disks; /* 5 Number of spare disks */
__u32 sb_csum; /* 6 checksum of the whole superblock */
- __u64 events; /* 7 number of superblock updates (64-bit!) */
+#ifdef __BIG_ENDIAN
+ __u32 events_hi; /* 7 high-order of superblock update count */
+ __u32 events_lo; /* 8 low-order of superblock update count */
+#else
+ __u32 events_lo; /* 7 low-order of superblock update count */
+ __u32 events_hi; /* 8 high-order of superblock update count */
+#endif
__u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 9];
/*
@@ -157,5 +163,10 @@ typedef struct mdp_superblock_s {
} mdp_super_t;
+static inline __u64 md_event(mdp_super_t *sb) {
+ __u64 ev = sb->events_hi;
+ return (ev<<32)| sb->events_lo;
+}
+
#endif _MD_P_H
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5058586ee..2d7161676 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -727,33 +727,9 @@ extern void daemonize(void);
extern int do_execve(char *, char **, char **, struct pt_regs *);
extern int do_fork(unsigned long, unsigned long, struct pt_regs *);
-static inline void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
-{
- unsigned long flags;
-
- wq_write_lock_irqsave(&q->lock, flags);
- __add_wait_queue(q, wait);
- wq_write_unlock_irqrestore(&q->lock, flags);
-}
-
-static inline void add_wait_queue_exclusive(wait_queue_head_t *q,
- wait_queue_t * wait)
-{
- unsigned long flags;
-
- wq_write_lock_irqsave(&q->lock, flags);
- __add_wait_queue_tail(q, wait);
- wq_write_unlock_irqrestore(&q->lock, flags);
-}
-
-static inline void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
-{
- unsigned long flags;
-
- wq_write_lock_irqsave(&q->lock, flags);
- __remove_wait_queue(q, wait);
- wq_write_unlock_irqrestore(&q->lock, flags);
-}
+extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));
+extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait));
+extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));
#define __wait_event(wq, condition) \
do { \
diff --git a/include/linux/serialP.h b/include/linux/serialP.h
index d1f901262..1545e60e1 100644
--- a/include/linux/serialP.h
+++ b/include/linux/serialP.h
@@ -180,7 +180,8 @@ struct pci_board_inst {
#define SPCI_FL_IRQBASE4 (0x0004 << 4)
#define SPCI_FL_GET_IRQBASE(x) ((x & SPCI_FL_IRQ_MASK) >> 4)
-/* Use sucessiveentries base resource table */
+/* Use sucessive BARs (PCI base address registers),
+ else use offset into some specified BAR */
#define SPCI_FL_BASE_TABLE 0x0100
/* Use successive entries in the irq resource table */
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index b374bb9c6..7dfe40942 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -112,6 +112,7 @@ enum
KERN_OVERFLOWUID=46, /* int: overflow UID */
KERN_OVERFLOWGID=47, /* int: overflow GID */
KERN_SHMPATH=48, /* string: path to shm fs */
+ KERN_HOTPLUG=49, /* string: path to hotplug policy agent */
};
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 885687193..27e6fe7df 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -10,10 +10,12 @@
#define USB_CLASS_AUDIO 1
#define USB_CLASS_COMM 2
#define USB_CLASS_HID 3
+#define USB_CLASS_PHYSICAL 5
#define USB_CLASS_PRINTER 7
#define USB_CLASS_MASS_STORAGE 8
#define USB_CLASS_HUB 9
#define USB_CLASS_DATA 10
+#define USB_CLASS_APP_SPEC 0xfe
#define USB_CLASS_VENDOR_SPEC 0xff
/*