diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-11-28 03:58:46 +0000 |
commit | b63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch) | |
tree | 0a343ce219e2b8b38a5d702d66032c57b83d9720 /include/linux | |
parent | a9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff) |
Merge with 2.4.0-test11.
Diffstat (limited to 'include/linux')
46 files changed, 474 insertions, 144 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 993fd93e7..7a045f033 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -215,6 +215,7 @@ enum { ACPI_FACP = 1, ACPI_DSDT, + ACPI_FACS, ACPI_PM1_ENABLE, ACPI_GPE_ENABLE, ACPI_GPE_LEVEL, diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 166fa085b..99df46b37 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h @@ -45,6 +45,7 @@ enum chipset_type { INTEL_BX, INTEL_GX, INTEL_I810, + INTEL_I815, INTEL_I840, VIA_GENERIC, VIA_VP3, @@ -226,4 +227,23 @@ extern void agp_backend_release(void); * */ +typedef struct { + void (*free_memory)(agp_memory *); + agp_memory *(*allocate_memory)(size_t, u32); + int (*bind_memory)(agp_memory *, off_t); + int (*unbind_memory)(agp_memory *); + void (*enable)(u32); + int (*acquire)(void); + void (*release)(void); + void (*copy_info)(agp_kern_info *); +} drm_agp_t; + +extern const drm_agp_t *drm_agp_p; + +/* + * Interface between drm and agp code. When agp initializes, it makes + * the above structure available via inter_module_register(), drm might + * use it. Keith Owens <kaos@ocs.com.au> 28 Oct 2000. + */ + #endif /* _AGP_BACKEND_H */ diff --git a/include/linux/blk.h b/include/linux/blk.h index 66bbdcf60..eb4d603e7 100644 --- a/include/linux/blk.h +++ b/include/linux/blk.h @@ -115,7 +115,6 @@ void end_that_request_last(struct request *req); /* ram disk */ #define DEVICE_NAME "ramdisk" -#define DEVICE_REQUEST rd_request #define DEVICE_NR(device) (MINOR(device)) #define DEVICE_NO_RANDOM diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index a10ef3086..3ce838219 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h @@ -37,7 +37,7 @@ __u32 __x = (x); \ ((__u32)( \ (((__u32)(__x) & (__u32)0x00ff00ffUL) << 8) | \ - (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8) )) \ + (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8) )); \ }) #define ___constant_swahw32(x) \ diff --git a/include/linux/divert.h b/include/linux/divert.h index 624bc55ed..66e56ec15 100644 --- a/include/linux/divert.h +++ b/include/linux/divert.h @@ -112,6 +112,6 @@ void free_divert_blk(struct net_device *); int divert_ioctl(unsigned int cmd, struct divert_cf *arg); void divert_frame(struct sk_buff *skb); -#endif __KERNEL__ +#endif #endif /* _LINUX_DIVERT_H */ diff --git a/include/linux/dn.h b/include/linux/dn.h index 266dc0f25..c7448158b 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h @@ -139,23 +139,4 @@ struct dn_addr { #define OSIOCSNETADDR _IOW(DECNET_IOCTL_BASE, 0xe0, int) #define OSIOCGNETADDR _IOR(DECNET_IOCTL_BASE, 0xe1, int) -/* - * An unofficial structure used to set/get routes. - * Be warned, this will probably change as the routing - * evolves. Also this is only for use with the ioctl() - * and the routing will use rtnetlink eventually. - */ -struct dn_fib_rtinfo { - unsigned long flags; /* Flags */ -#define DN_FIB_RTINFO_F_REPLACE 0x0001 /* Replace any existing route */ -#define DN_FIB_RTINFO_F_DEVCOST 0x0002 /* Add cost of device */ - unsigned long timeout; /* Time in seconds route should last */ - unsigned short src; /* Source Address, 0 = any */ - unsigned short dst; /* Destination Address */ - unsigned short nhp; /* Next Hop Address */ - unsigned short hops; /* Hops on path */ - unsigned short cost; /* Cost of path */ - char device[16]; -}; - #endif /* _LINUX_DN_H */ diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h new file mode 100644 index 000000000..384171b3f --- /dev/null +++ b/include/linux/ethtool.h @@ -0,0 +1,97 @@ +/* $Id: ethtool.h,v 1.2 2000/11/12 10:05:57 davem Exp $ + * ethtool.h: Defines for Linux ethtool. + * + * Copyright (C) 1998 David S. Miller (davem@redhat.com) + */ + +#ifndef _LINUX_ETHTOOL_H +#define _LINUX_ETHTOOL_H + + +/* This should work for both 32 and 64 bit userland. */ +struct ethtool_cmd { + u32 cmd; + u32 supported; /* Features this interface supports */ + u32 advertising; /* Features this interface advertises */ + u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ + u8 duplex; /* Duplex, half or full */ + u8 port; /* Which connector port */ + u8 phy_address; + u8 transceiver; /* Which tranceiver to use */ + u8 autoneg; /* Enable or disable autonegotiation */ + u32 maxtxpkt; /* Tx pkts before generating tx int */ + u32 maxrxpkt; /* Rx pkts before generating rx int */ + u32 reserved[4]; +}; + + +/* CMDs currently supported */ +#define ETHTOOL_GSET 0x00000001 /* Get settings, non-privileged. */ +#define ETHTOOL_SSET 0x00000002 /* Set settings, privileged. */ + +/* compatibility with older code */ +#define SPARC_ETH_GSET ETHTOOL_GSET +#define SPARC_ETH_SSET ETHTOOL_SSET + +/* Indicates what features are supported by the interface. */ +#define SUPPORTED_10baseT_Half (1 << 0) +#define SUPPORTED_10baseT_Full (1 << 1) +#define SUPPORTED_100baseT_Half (1 << 2) +#define SUPPORTED_100baseT_Full (1 << 3) +#define SUPPORTED_1000baseT_Half (1 << 4) +#define SUPPORTED_1000baseT_Full (1 << 5) +#define SUPPORTED_Autoneg (1 << 6) +#define SUPPORTED_TP (1 << 7) +#define SUPPORTED_AUI (1 << 8) +#define SUPPORTED_MII (1 << 9) +#define SUPPORTED_FIBRE (1 << 10) + +/* Indicates what features are advertised by the interface. */ +#define ADVERTISED_10baseT_Half (1 << 0) +#define ADVERTISED_10baseT_Full (1 << 1) +#define ADVERTISED_100baseT_Half (1 << 2) +#define ADVERTISED_100baseT_Full (1 << 3) +#define ADVERTISED_1000baseT_Half (1 << 4) +#define ADVERTISED_1000baseT_Full (1 << 5) +#define ADVERTISED_Autoneg (1 << 6) +#define ADVERTISED_TP (1 << 7) +#define ADVERTISED_AUI (1 << 8) +#define ADVERTISED_MII (1 << 9) +#define ADVERTISED_FIBRE (1 << 10) + +/* The following are all involved in forcing a particular link + * mode for the device for setting things. When getting the + * devices settings, these indicate the current mode and whether + * it was foced up into this mode or autonegotiated. + */ + +/* The forced speed, 10Mb, 100Mb, gigabit. */ +#define SPEED_10 10 +#define SPEED_100 100 +#define SPEED_1000 1000 + +/* Duplex, half or full. */ +#define DUPLEX_HALF 0x00 +#define DUPLEX_FULL 0x01 + +/* Which connector port. */ +#define PORT_TP 0x00 +#define PORT_AUI 0x01 +#define PORT_MII 0x02 +#define PORT_FIBRE 0x03 +#define PORT_BNC 0x04 + +/* Which tranceiver to use. */ +#define XCVR_INTERNAL 0x00 +#define XCVR_EXTERNAL 0x01 +#define XCVR_DUMMY1 0x02 +#define XCVR_DUMMY2 0x03 +#define XCVR_DUMMY3 0x04 + +/* Enable or disable autonegotiation. If this is set to enable, + * the forced link modes above are completely ignored. + */ +#define AUTONEG_DISABLE 0x00 +#define AUTONEG_ENABLE 0x01 + +#endif /* _LINUX_ETHTOOL_H */ diff --git a/include/linux/fb.h b/include/linux/fb.h index fa8f9cded..357878b65 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -29,6 +29,9 @@ #define FBIO_FREE 0x4614 #define FBIOGET_GLYPH 0x4615 #define FBIOGET_HWCINFO 0x4616 +#define FBIOPUT_MODEINFO 0x4617 +#define FBIOGET_DISPINFO 0x4618 + #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ diff --git a/include/linux/fs.h b/include/linux/fs.h index 72effef4a..470186804 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -546,7 +546,6 @@ struct file_lock { #endif extern struct list_head file_lock_list; -extern struct semaphore file_lock_sem; #include <linux/fcntl.h> @@ -1150,6 +1149,15 @@ static inline struct inode *iget(struct super_block *sb, unsigned long ino) extern void clear_inode(struct inode *); extern struct inode * get_empty_inode(void); +static inline struct inode * new_inode(struct super_block *sb) +{ + struct inode *inode = get_empty_inode(); + if (inode) { + inode->i_sb = sb; + inode->i_dev = sb->s_dev; + } + return inode; +} extern void insert_inode_hash(struct inode *); extern void remove_inode_hash(struct inode *); diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 184407e40..9cac7759a 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -17,50 +17,56 @@ extern struct page * prepare_highmem_swapout(struct page *); extern struct page * replace_with_highmem(struct page *); extern struct buffer_head * create_bounce(int rw, struct buffer_head * bh_orig); + +static inline char *bh_kmap(struct buffer_head *bh) +{ + return kmap(bh->b_page) + bh_offset(bh); +} + +static inline void bh_kunmap(struct buffer_head *bh) +{ + kunmap(bh->b_page); +} + #else /* CONFIG_HIGHMEM */ static inline unsigned int nr_free_highpages(void) { return 0; } #define prepare_highmem_swapout(page) page #define replace_with_highmem(page) page -static __inline__ unsigned long kmap(struct page * page) { - return (unsigned long) page_address(page); -} +static inline void *kmap(struct page *page) { return page_address(page); } #define kunmap(page) do { } while (0) #define kmap_atomic(page,idx) kmap(page) #define kunmap_atomic(page,idx) kunmap(page) +#define bh_kmap(bh) ((bh)->b_data) +#define bh_kunmap(bh) do { } while (0); + #endif /* CONFIG_HIGHMEM */ /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ static inline void clear_user_highpage(struct page *page, unsigned long vaddr) { - unsigned long kaddr; - - kaddr = kmap(page); - clear_user_page((void *)kaddr, vaddr); + clear_user_page(kmap(page), vaddr); kunmap(page); } static inline void clear_highpage(struct page *page) { - unsigned long kaddr; - - kaddr = kmap(page); - clear_page((void *)kaddr); + clear_page(kmap(page)); kunmap(page); } static inline void memclear_highpage(struct page *page, unsigned int offset, unsigned int size) { - unsigned long kaddr; + char *kaddr; if (offset + size > PAGE_SIZE) BUG(); kaddr = kmap(page); - memset((void *)(kaddr + offset), 0, size); + memset(kaddr + offset, 0, size); kunmap(page); } @@ -69,34 +75,34 @@ static inline void memclear_highpage(struct page *page, unsigned int offset, uns */ static inline void memclear_highpage_flush(struct page *page, unsigned int offset, unsigned int size) { - unsigned long kaddr; + char *kaddr; if (offset + size > PAGE_SIZE) BUG(); kaddr = kmap(page); - memset((void *)(kaddr + offset), 0, size); + memset(kaddr + offset, 0, size); flush_page_to_ram(page); kunmap(page); } static inline void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr) { - unsigned long vfrom, vto; + char *vfrom, *vto; vfrom = kmap(from); vto = kmap(to); - copy_user_page((void *)vto, (void *)vfrom, vaddr); + copy_user_page(vto, vfrom, vaddr); kunmap(from); kunmap(to); } static inline void copy_highpage(struct page *to, struct page *from) { - unsigned long vfrom, vto; + char *vfrom, *vto; vfrom = kmap(from); vto = kmap(to); - copy_page((void *)vto, (void *)vfrom); + copy_page(vto, vfrom); kunmap(from); kunmap(to); } diff --git a/include/linux/irda.h b/include/linux/irda.h index d8532c2fc..40aec1c8d 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h @@ -78,14 +78,17 @@ enum { #define SOL_IRLMP 266 /* Same as SOL_IRDA for now */ #define SOL_IRTTP 266 /* Same as SOL_IRDA for now */ -#define IRLMP_ENUMDEVICES 1 -#define IRLMP_IAS_SET 2 -#define IRLMP_IAS_QUERY 3 -#define IRLMP_HINTS_SET 4 +#define IRLMP_ENUMDEVICES 1 /* Return discovery log */ +#define IRLMP_IAS_SET 2 /* Set an attribute in local IAS */ +#define IRLMP_IAS_QUERY 3 /* Query remote IAS for attribute */ +#define IRLMP_HINTS_SET 4 /* Set hint bits advertised */ #define IRLMP_QOS_SET 5 #define IRLMP_QOS_GET 6 #define IRLMP_MAX_SDU_SIZE 7 -#define IRLMP_IAS_GET 8 +#define IRLMP_IAS_GET 8 /* Get an attribute from local IAS */ +#define IRLMP_IAS_DEL 9 /* Remove attribute from local IAS */ +#define IRLMP_HINT_MASK_SET 10 /* Set discovery filter */ +#define IRLMP_WAITDEVICE 11 /* Wait for a new discovery */ #define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE /* Compatibility */ @@ -94,6 +97,12 @@ enum { #define IAS_MAX_CLASSNAME 64 #define IAS_MAX_ATTRIBNAME 256 +/* Attribute type needed for struct irda_ias_set */ +#define IAS_MISSING 0 +#define IAS_INTEGER 1 +#define IAS_OCT_SEQ 2 +#define IAS_STRING 3 + #define LSAP_ANY 0xff struct sockaddr_irda { @@ -132,6 +141,7 @@ struct irda_ias_set { __u8 string[IAS_MAX_STRING]; } irda_attrib_string; } attribute; + __u32 daddr; /* Address of device (for some queries only) */ }; /* Some private IOCTL's (max 16) */ diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 7cdd4ff43..51c06aec7 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -1,4 +1,4 @@ -/* $Id: isdn.h,v 1.106 2000/08/10 22:52:46 kai Exp $ +/* $Id: isdn.h,v 1.110 2000/11/01 17:54:01 detabc Exp $ * Main header for the Linux ISDN subsystem (linklevel). * @@ -66,8 +66,7 @@ #undef CONFIG_ISDN_WITH_ABC_CH_EXTINUSE #undef CONFIG_ISDN_WITH_ABC_CONN_ERROR #undef CONFIG_ISDN_WITH_ABC_RAWIPCOMPRESS -#undef CONFIG_ISDN_WITH_ABC_IPV4_RW_SOCKADDR -#undef CONFIG_ISDN_WITH_ABC_IPV4_RWUDP_SOCKADDR +#undef CONFIG_ISDN_WITH_ABC_IPTABLES_NETFILTER /* New ioctl-codes */ diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h index 63543da77..471c9af2c 100644 --- a/include/linux/iso_fs.h +++ b/include/linux/iso_fs.h @@ -177,16 +177,17 @@ extern int iso_date(char *, int); extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *); extern int get_rock_ridge_filename(struct iso_directory_record *, char *, struct inode *); +extern int isofs_name_translate(struct iso_directory_record *, char *, struct inode *); extern int find_rock_ridge_relocation(struct iso_directory_record *, struct inode *); -int get_joliet_filename(struct iso_directory_record *, struct inode *, unsigned char *); +int get_joliet_filename(struct iso_directory_record *, unsigned char *, struct inode *); int get_acorn_filename(struct iso_directory_record *, char *, struct inode *); extern struct dentry *isofs_lookup(struct inode *, struct dentry *); extern int isofs_get_block(struct inode *, long, struct buffer_head *, int); extern int isofs_bmap(struct inode *, int); -extern int isofs_lookup_grandparent(struct inode *, int); +extern struct buffer_head *isofs_bread(struct inode *, unsigned int, unsigned int); extern struct inode_operations isofs_dir_inode_operations; extern struct file_operations isofs_dir_operations; diff --git a/include/linux/kernel.h b/include/linux/kernel.h index aa337fe6c..beb41bfa3 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -45,11 +45,15 @@ #define FASTCALL(x) x #endif +struct semaphore; + extern struct notifier_block *panic_notifier_list; NORET_TYPE void panic(const char * fmt, ...) __attribute__ ((NORET_AND format (printf, 1, 2))); NORET_TYPE void do_exit(long error_code) ATTRIB_NORET; +NORET_TYPE void up_and_exit(struct semaphore *, long) + ATTRIB_NORET; extern unsigned long simple_strtoul(const char *,char **,unsigned int); extern long simple_strtol(const char *,char **,unsigned int); extern int sprintf(char * buf, const char * fmt, ...); diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h index 40530168e..acbdea338 100644 --- a/include/linux/kernelcapi.h +++ b/include/linux/kernelcapi.h @@ -1,5 +1,5 @@ /* - * $Id: kernelcapi.h,v 1.7 2000/06/12 09:20:20 kai Exp $ + * $Id: kernelcapi.h,v 1.8 2000/08/22 10:11:00 calle Exp $ * * Kernel CAPI 2.0 Interface for Linux * diff --git a/include/linux/kmod.h b/include/linux/kmod.h index bab128898..44e1ea652 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -1,22 +1,38 @@ +#ifndef __LINUX_KMOD_H__ +#define __LINUX_KMOD_H__ + /* - kmod header -*/ + * include/linux/kmod.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ #include <linux/config.h> #include <linux/errno.h> #ifdef CONFIG_KMOD extern int request_module(const char * name); +#else +static inline int request_module(const char * name) { return -ENOSYS; } +#endif + extern int exec_usermodehelper(char *program_path, char *argv[], char *envp[]); +extern int call_usermodehelper(char *path, char *argv[], char *envp[]); + #ifdef CONFIG_HOTPLUG extern char hotplug_path []; -extern int call_usermodehelper(char *path, char *argv[], char *envp[]); -#endif -#else -static inline int request_module(const char * name) { return -ENOSYS; } -static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[]) -{ - return -EACCES; -} #endif +#endif /* __LINUX_KMOD_H__ */ diff --git a/include/linux/lapb.h b/include/linux/lapb.h index bf1825a6b..2eeb76f2c 100644 --- a/include/linux/lapb.h +++ b/include/linux/lapb.h @@ -28,7 +28,7 @@ struct lapb_register_struct { void (*connect_indication)(void *token, int reason); void (*disconnect_confirmation)(void *token, int reason); void (*disconnect_indication)(void *token, int reason); - void (*data_indication)(void *token, struct sk_buff *skb); + int (*data_indication)(void *token, struct sk_buff *skb); void (*data_transmit)(void *token, struct sk_buff *skb); }; diff --git a/include/linux/mm.h b/include/linux/mm.h index 59355eb8a..70ffe28e4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -181,7 +181,8 @@ typedef struct page { #define PG_skip 10 #define PG_inactive_clean 11 #define PG_highmem 12 - /* bits 21-30 unused */ + /* bits 21-29 unused */ +#define PG_arch_1 30 #define PG_reserved 31 @@ -328,6 +329,10 @@ typedef struct page { * parts of the address space. * * PG_error is set to indicate that an I/O error occurred on this page. + * + * PG_arch_1 is an architecture specific page state bit. The generic + * code guarentees that this bit is cleared for a page when it first + * is entered into the page cache. */ extern mem_map_t * mem_map; @@ -412,8 +417,11 @@ extern void si_meminfo(struct sysinfo * val); extern void swapin_readahead(swp_entry_t); /* mmap.c */ +extern void lock_vma_mappings(struct vm_area_struct *); +extern void unlock_vma_mappings(struct vm_area_struct *); extern void merge_segments(struct mm_struct *, unsigned long, unsigned long); extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *); +extern void __insert_vm_struct(struct mm_struct *, struct vm_area_struct *); extern void build_mmap_avl(struct mm_struct *); extern void exit_mmap(struct mm_struct *); extern unsigned long get_unmapped_area(unsigned long, unsigned long); @@ -447,8 +455,6 @@ extern void truncate_inode_pages(struct address_space *, loff_t); /* generic vm_area_ops exported for stackable file systems */ extern int filemap_swapout(struct page * page, struct file *file); -extern pte_t filemap_swapin(struct vm_area_struct * vma, - unsigned long offset, unsigned long entry); extern int filemap_sync(struct vm_area_struct * vma, unsigned long address, size_t size, unsigned int flags); extern struct page *filemap_nopage(struct vm_area_struct * area, diff --git a/include/linux/module.h b/include/linux/module.h index 26f383a63..249cb0163 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -9,6 +9,7 @@ #include <linux/config.h> #include <linux/spinlock.h> +#include <linux/list.h> #ifdef __GENKSYMS__ # define _set_ver(sym) sym @@ -78,11 +79,17 @@ struct module unsigned long gp; #endif /* Members past this point are extensions to the basic - module support and are optional. Use mod_opt_member() + module support and are optional. Use mod_member_present() to examine them. */ const struct module_persist *persist_start; const struct module_persist *persist_end; int (*can_unload)(void); + int runsize; /* In modutils, not currently used */ + const char *kallsyms_start; /* All symbols for kernel debugging */ + const char *kallsyms_end; + const char *archdata_start; /* arch specific data for module */ + const char *archdata_end; + const char *kernel_data; /* Reserved for kernel internal use */ }; struct module_info @@ -123,6 +130,10 @@ struct module_info ((unsigned long)(&((struct module *)0L)->member + 1) \ <= (mod)->size_of_struct) +/* Check if an address p with number of entries n is within the body of module m */ +#define mod_bound(p, n, m) ((unsigned long)(p) >= ((unsigned long)(m) + ((m)->size_of_struct)) && \ + (unsigned long)((p)+(n)) <= (unsigned long)(m) + (m)->size) + /* Backwards compatibility definition. */ #define GET_USE_COUNT(module) (atomic_read(&(module)->uc.usecount)) @@ -142,14 +153,34 @@ struct module_info #define __MODULE_STRING_1(x) #x #define __MODULE_STRING(x) __MODULE_STRING_1(x) -/* Find a symbol exported by the kernel or another module */ -#ifdef CONFIG_MODULES -extern unsigned long get_module_symbol(char *, char *); -extern void put_module_symbol(unsigned long); -#else -static inline unsigned long get_module_symbol(char *unused1, char *unused2) { return 0; }; -static inline void put_module_symbol(unsigned long unused) { }; -#endif +/* Generic inter module communication. + * + * NOTE: This interface is intended for small amounts of data that are + * passed between two objects and either or both of the objects + * might be compiled as modules. Do not over use this interface. + * + * If more than two objects need to communicate then you probably + * need a specific interface instead of abusing this generic + * interface. If both objects are *always* built into the kernel + * then a global extern variable is good enough, you do not need + * this interface. + * + * Keith Owens <kaos@ocs.com.au> 28 Oct 2000. + */ + +#define HAVE_INTER_MODULE +extern void inter_module_register(const char *, struct module *, const void *); +extern void inter_module_unregister(const char *); +extern const void *inter_module_get(const char *); +extern const void *inter_module_get_request(const char *, const char *); +extern void inter_module_put(const char *); + +struct inter_module_entry { + struct list_head list; + const char *im_name; + struct module *owner; + const void *userdata; +}; extern int try_inc_mod_count(struct module *mod); @@ -313,4 +344,10 @@ __attribute__((section("__ksymtab"))) = \ #define EXPORT_NO_SYMBOLS #endif /* MODULE */ +#ifdef CONFIG_MODULES +#define SET_MODULE_OWNER(some_struct) do { some_struct->owner = THIS_MODULE; } while (0) +#else +#define SET_MODULE_OWNER(some_struct) do { } while (0) +#endif + #endif /* _LINUX_MODULE_H */ diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 46cb1d94b..c8bdd1cd7 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h @@ -92,6 +92,7 @@ struct cfi_private { int numchips; unsigned long chipshift; /* Because they're of the same type */ struct flchip chips[0]; /* per-chip data structure for each chip */ + const char *im_name; /* inter_module name for cmdset_setup */ }; #define MAX_CFI_CHIPS 8 /* Entirely arbitrary to avoid realloc() */ diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 4ca86bc4e..ebb41c973 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -7,7 +7,6 @@ #include <linux/types.h> #include <linux/mtd/mtd.h> -#include <linux/kmod.h> #include <linux/malloc.h> /* The map stuff is very simple. You fill in your struct map_info with @@ -52,6 +51,7 @@ struct map_info { unsigned long map_priv_2; void *fldrv_priv; void (*fldrv_destroy)(struct mtd_info *); + const char *im_name; }; /* @@ -59,20 +59,13 @@ struct map_info { * if anything is recognised. Doesn't register it because the calling * map driver needs to set the 'module' field first. */ -static inline struct mtd_info *do_map_probe(struct map_info *map, char *funcname, char *modname) +static inline struct mtd_info *do_map_probe(struct map_info *map, const char *funcname, const char *modname) { struct mtd_info *(*probe_p)(struct map_info *); struct mtd_info *mtd = NULL; - probe_p = (void *)get_module_symbol(NULL, funcname); - if (!probe_p) { - request_module(modname); - probe_p = (void *)get_module_symbol(NULL, funcname); - } - if (probe_p) { - mtd = (*probe_p)(map); - put_module_symbol((unsigned long)probe_p); - } + if ((probe_p = inter_module_get_request(modname, funcname))) + mtd = (*probe_p)(map); /* map->im_name is set by probe */ return mtd; } @@ -95,7 +88,7 @@ static inline void map_destroy(struct mtd_info *mtd) struct map_info *map = mtd->priv; map->fldrv_destroy(mtd); - put_module_symbol((unsigned long)map->fldrv_destroy); + inter_module_put(map->im_name); kfree(mtd); } diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 32677edae..2c2bfd4d5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -383,6 +383,9 @@ struct net_device int (*neigh_setup)(struct net_device *dev, struct neigh_parms *); int (*accept_fastpath)(struct net_device *, struct dst_entry*); + /* open/release and usage marking */ + struct module *owner; + /* bridge stuff */ struct net_bridge_port *br_port; diff --git a/include/linux/netfilter_decnet.h b/include/linux/netfilter_decnet.h index 2f8704f02..3064eec9c 100644 --- a/include/linux/netfilter_decnet.h +++ b/include/linux/netfilter_decnet.h @@ -36,4 +36,24 @@ #define NF_DN_ROUTE 6 #define NF_DN_NUMHOOKS 7 +enum nf_dn_hook_priorities { + NF_DN_PRI_FIRST = INT_MIN, + NF_DN_PRI_CONNTRACK = -200, + NF_DN_PRI_MANGLE = -150, + NF_DN_PRI_NAT_DST = -100, + NF_DN_PRI_FILTER = 0, + NF_DN_PRI_NAT_SRC = 100, + NF_DN_PRI_DNRTMSG = 200, + NF_DN_PRI_LAST = INT_MAX, +}; + +struct nf_dn_rtmsg { + int nfdn_ifindex; +}; + +#define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg))) + +#define DNRMG_L1_GROUP 0x01 +#define DNRMG_L2_GROUP 0x02 + #endif /*__LINUX_DECNET_NETFILTER_H*/ diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 41e7d92cc..2afb52e98 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -8,6 +8,7 @@ #define NETLINK_ARPD 8 #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ #define NETLINK_IP6_FW 13 +#define NETLINK_DNRTMSG 14 /* DECnet routing messages */ #define NETLINK_TAPBASE 16 /* 16 to 31 are ethertap */ #define MAX_LINKS 32 diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 5f6572b22..f6c35dc01 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -19,7 +19,7 @@ /* * Valid flags for a dirty buffer */ -#define PG_BUSY 0x0001 +#define PG_BUSY 0 struct nfs_page { struct list_head wb_hash, /* Inode */ @@ -38,7 +38,7 @@ struct nfs_page { struct nfs_writeverf wb_verf; /* Commit cookie */ }; -#define NFS_WBACK_BUSY(req) ((req)->wb_flags & PG_BUSY) +#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) extern struct nfs_page *nfs_create_request(struct file *file, struct page *page, @@ -68,10 +68,9 @@ extern spinlock_t nfs_wreq_lock; static __inline__ int nfs_lock_request(struct nfs_page *req) { - if (NFS_WBACK_BUSY(req)) + if (test_and_set_bit(PG_BUSY, &req->wb_flags)) return 0; req->wb_count++; - req->wb_flags |= PG_BUSY; return 1; } @@ -80,10 +79,13 @@ nfs_unlock_request(struct nfs_page *req) { if (!NFS_WBACK_BUSY(req)) { printk(KERN_ERR "NFS: Invalid unlock attempted\n"); - return; + BUG(); } - req->wb_flags &= ~PG_BUSY; - wake_up(&req->wb_wait); + smp_mb__before_clear_bit(); + clear_bit(PG_BUSY, &req->wb_flags); + smp_mb__after_clear_bit(); + if (waitqueue_active(&req->wb_wait)) + wake_up(&req->wb_wait); nfs_release_request(req); } diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 994e0889f..7a89c6525 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -340,6 +340,7 @@ #define PCI_DEVICE_ID_SI_620 0x0620 #define PCI_DEVICE_ID_SI_630 0x0630 #define PCI_DEVICE_ID_SI_630_VGA 0x6300 +#define PCI_DEVICE_ID_SI_730_VGA 0x7300 #define PCI_DEVICE_ID_SI_5107 0x5107 #define PCI_DEVICE_ID_SI_5300 0x5300 #define PCI_DEVICE_ID_SI_5511 0x5511 @@ -1334,3 +1335,8 @@ #define PCI_DEVICE_ID_ARK_STING 0xa091 #define PCI_DEVICE_ID_ARK_STINGARK 0xa099 #define PCI_DEVICE_ID_ARK_2000MT 0xa0a1 + +#define PCI_VENDOR_ID_MICROGATE 0x13c0 +#define PCI_DEVICE_ID_MICROGATE_USC 0x0010 +#define PCI_DEVICE_ID_MICROGATE_SCC 0x0020 +#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030 diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 28bf3daa0..da8f6b3dc 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -67,7 +67,7 @@ struct proc_dir_entry { void *data; read_proc_t *read_proc; write_proc_t *write_proc; - unsigned int count; /* use count */ + atomic_t count; /* use count */ int deleted; /* delete flag */ kdev_t rdev; }; diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index ec87c2ddd..7b184ce94 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -28,7 +28,6 @@ #include <asm/bitops.h> #include <linux/module.h> #include <linux/hdreg.h> -#include <linux/sysctl.h> #include <linux/proc_fs.h> #include <linux/smp_lock.h> #include <linux/delay.h> @@ -88,5 +87,5 @@ extern void md_print_devices (void); #define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } -#endif _MD_H +#endif diff --git a/include/linux/raid/md_compatible.h b/include/linux/raid/md_compatible.h index 1dd422185..35e60bd1a 100644 --- a/include/linux/raid/md_compatible.h +++ b/include/linux/raid/md_compatible.h @@ -31,7 +31,7 @@ /* 001 */ extern __inline__ int md_cpu_has_mmx(void) { - return boot_cpu_data.x86_capability & X86_FEATURE_MMX; + return test_bit(X86_FEATURE_MMX, &boot_cpu_data.x86_capability); } #endif @@ -152,5 +152,5 @@ typedef wait_queue_head_t md_wait_queue_head_t; /* END */ -#endif _MD_COMPATIBLE_H +#endif diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index ce998195c..41d729e16 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -365,5 +365,5 @@ do { \ __wait_event_lock_irq(wq, condition, lock); \ } while (0) -#endif _MD_K_H +#endif diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 0c6e1a368..d6bb37a81 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h @@ -168,5 +168,5 @@ static inline __u64 md_event(mdp_super_t *sb) { return (ev<<32)| sb->events_lo; } -#endif _MD_P_H +#endif diff --git a/include/linux/raid/md_u.h b/include/linux/raid/md_u.h index 9478513f9..c96b0e404 100644 --- a/include/linux/raid/md_u.h +++ b/include/linux/raid/md_u.h @@ -111,5 +111,5 @@ typedef struct mdu_param_s int max_fault; /* unused for now */ } mdu_param_t; -#endif _MD_U_H +#endif diff --git a/include/linux/raid/xor.h b/include/linux/raid/xor.h index c8034b759..0e6950a7b 100644 --- a/include/linux/raid/xor.h +++ b/include/linux/raid/xor.h @@ -3,10 +3,21 @@ #include <linux/raid/md.h> -#define MAX_XOR_BLOCKS 4 +#define MAX_XOR_BLOCKS 5 -extern void calibrate_xor_block(void); -extern void (*xor_block)(unsigned int count, - struct buffer_head **bh_ptr); +extern void xor_block(unsigned int count, struct buffer_head **bh_ptr); + +struct xor_block_template { + struct xor_block_template *next; + const char *name; + int speed; + void (*do_2)(unsigned long, unsigned long *, unsigned long *); + void (*do_3)(unsigned long, unsigned long *, unsigned long *, + unsigned long *); + void (*do_4)(unsigned long, unsigned long *, unsigned long *, + unsigned long *, unsigned long *); + void (*do_5)(unsigned long, unsigned long *, unsigned long *, + unsigned long *, unsigned long *, unsigned long *); +}; #endif diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 40738af95..0c7cab0de 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -139,6 +139,7 @@ enum #define RTPROT_MRT 10 /* Merit MRT */ #define RTPROT_ZEBRA 11 /* Zebra */ #define RTPROT_BIRD 12 /* BIRD */ +#define RTPROT_DNROUTED 13 /* DECnet routing daemon */ /* rtm_scope diff --git a/include/linux/sched.h b/include/linux/sched.h index 9385c9ea8..a58b23c86 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -85,7 +85,6 @@ extern int last_pid; #define TASK_UNINTERRUPTIBLE 2 #define TASK_ZOMBIE 4 #define TASK_STOPPED 8 -#define TASK_EXCLUSIVE 32 #define __set_task_state(tsk, state_value) \ do { (tsk)->state = (state_value); } while (0) @@ -150,6 +149,8 @@ extern void update_one_process(struct task_struct *p, unsigned long user, extern signed long FASTCALL(schedule_timeout(signed long timeout)); asmlinkage void schedule(void); +extern void schedule_task(struct tq_struct *task); + /* * The default fd array needs to be at least BITS_PER_LONG, * as this is the granularity returned by copy_fdset(). @@ -533,8 +534,8 @@ extern unsigned long prof_shift; #define CURRENT_TIME (xtime.tv_sec) -extern void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode)); -extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode)); +extern void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, unsigned int wq_mode)); +extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, unsigned int wq_mode)); extern void FASTCALL(sleep_on(wait_queue_head_t *q)); extern long FASTCALL(sleep_on_timeout(wait_queue_head_t *q, signed long timeout)); @@ -543,12 +544,12 @@ extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout)); extern void FASTCALL(wake_up_process(struct task_struct * tsk)); -#define wake_up(x) __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE | TASK_EXCLUSIVE) -#define wake_up_all(x) __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE) -#define wake_up_sync(x) __wake_up_sync((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE | TASK_EXCLUSIVE) -#define wake_up_interruptible(x) __wake_up((x),TASK_INTERRUPTIBLE | TASK_EXCLUSIVE) -#define wake_up_interruptible_all(x) __wake_up((x),TASK_INTERRUPTIBLE) -#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE | TASK_EXCLUSIVE) +#define wake_up(x) __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE,WQ_FLAG_EXCLUSIVE) +#define wake_up_all(x) __wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE,0) +#define wake_up_sync(x) __wake_up_sync((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE,WQ_FLAG_EXCLUSIVE) +#define wake_up_interruptible(x) __wake_up((x),TASK_INTERRUPTIBLE,WQ_FLAG_EXCLUSIVE) +#define wake_up_interruptible_all(x) __wake_up((x),TASK_INTERRUPTIBLE,0) +#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE,WQ_FLAG_EXCLUSIVE) extern int in_group_p(gid_t); extern int in_egroup_p(gid_t); diff --git a/include/linux/sisfb.h b/include/linux/sisfb.h index cfc8ce704..2f5be6474 100644 --- a/include/linux/sisfb.h +++ b/include/linux/sisfb.h @@ -1,17 +1,91 @@ #ifndef _LINUX_SISFB #define _LINUX_SISFB +/* CRT2 connection */ +#define MASK_DISPTYPE_CRT2 0x04 /* Connect CRT2 */ +#define MASK_DISPTYPE_LCD 0x02 /* Connect LCD */ +#define MASK_DISPTYPE_TV 0x01 /* Connect TV */ +#define MASK_DISPTYPE_DISP2 (MASK_DISPTYPE_LCD | MASK_DISPTYPE_TV | MASK_DISPTYPE_CRT2) + +#define DISPTYPE_CRT1 0x00000008L +#define DISPTYPE_CRT2 0x00000004L +#define DISPTYPE_LCD 0x00000002L +#define DISPTYPE_TV 0x00000001L +#define DISPTYPE_DISP1 DISPTYPE_CRT1 +#define DISPTYPE_DISP2 (DISPTYPE_CRT2 | DISPTYPE_LCD | DISPTYPE_TV) +#define DISPMODE_SINGLE 0x00000020L +#define DISPMODE_MIRROR 0x00000010L +#define DISPMODE_DUALVIEW 0x00000040L + +#define HASVB_NONE 0 +#define HASVB_301 1 +#define HASVB_LVDS 2 +#define HASVB_TRUMPION 3 +#define HASVB_LVDS_CHRONTEL 4 +#define HASVB_LVDS_ALL (HASVB_LVDS | HASVB_TRUMPION | HASVB_LVDS_CHRONTEL) + +enum _TVMODE +{ + TVMODE_NTSC = 0, + TVMODE_PAL, + TVMODE_HIVISION, + TVMODE_TOTAL +}; + +enum _TVPLUGTYPE +{ + TVPLUG_UNKNOWN = 0, + TVPLUG_COMPOSITE, + TVPLUG_SVIDEO, + TVPLUG_SCART, + TVPLUG_TOTAL +}; + +enum CHIPTYPE +{ + SiS_UNKNOWN = 0, + SiS_300, + SiS_540, + SiS_630, + SiS_630S, + SiS_730 +}; + struct sis_memreq { unsigned long offset; unsigned long size; }; +/* Data for AP */ +struct mode_info +{ + int bpp; + int xres; + int yres; + int v_xres; + int v_yres; + int org_x; + int org_y; + unsigned int vrate; +}; + +struct ap_data +{ + struct mode_info minfo; + unsigned long iobase; + unsigned int mem_size; + unsigned long disp_state; + enum CHIPTYPE chip; +}; + + +/* Data for kernel */ struct video_info { /* card parameters */ int chip_id; - int video_size; + unsigned int video_size; unsigned long video_base; char *video_vbase; unsigned long mmio_base; @@ -22,8 +96,17 @@ struct video_info int video_bpp; int video_width; int video_height; - unsigned int refresh_rate; - u8 status; + int video_vwidth; + int video_vheight; + int org_x; + int org_y; + unsigned int refresh_rate; + + /* VB functions */ + unsigned long disp_state; + unsigned char hasVB; + unsigned char TV_type; + unsigned char TV_plug; }; #ifdef __KERNEL__ diff --git a/include/linux/sockios.h b/include/linux/sockios.h index e9fd9e275..33ffddc50 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h @@ -75,6 +75,7 @@ #define SIOCGIFDIVERT 0x8944 /* Frame diversion support */ #define SIOCSIFDIVERT 0x8945 /* Set frame diversion options */ +#define SIOCETHTOOL 0x8946 /* Ethtool interface */ /* ARP cache control calls. */ /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index ca8ad780d..c7be4cc54 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h @@ -76,8 +76,8 @@ */ #ifndef _SIOWR -#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__INCioctlh) && !defined(__Lynx__))) -/* Use already defined ioctl defines if they exist (except with Sun) */ +#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__))) +/* Use already defined ioctl defines if they exist (except with Sun or Sparc) */ #define SIOCPARM_MASK IOCPARM_MASK #define SIOC_VOID IOC_VOID #define SIOC_OUT IOC_OUT @@ -179,7 +179,7 @@ typedef struct seq_event_rec { * Some big endian/little endian handling macros */ -#if defined(_AIX) || defined(AIX) || defined(sparc) || defined(HPPA) || defined(PPC) +#if defined(_AIX) || defined(AIX) || defined(sparc) || defined(__sparc__) || defined(HPPA) || defined(PPC) /* Big endian machines */ # define _PATCHKEY(id) (0xfd00|id) # define AFMT_S16_NE AFMT_S16_BE diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index eb55e776c..5d1f842c8 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h @@ -54,7 +54,7 @@ extern unsigned int nlm_debug; #undef ifdebug #ifdef RPC_DEBUG # define ifdebug(fac) if (rpc_debug & RPCDBG_##fac) -# define dfprintk(fac, args...) do { ifdebug(fac) printk(## args); } while(0) +# define dfprintk(fac, args...) do { ifdebug(fac) printk(args); } while(0) # define RPC_IFDEBUG(x) x #else # define dfprintk(fac, args...) do ; while (0) diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 8b559703a..f3e9ad2be 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -80,8 +80,7 @@ struct rpc_task { unsigned short tk_lock; /* Task lock counter */ unsigned char tk_active : 1,/* Task has been activated */ tk_wakeup : 1;/* Task waiting to wake up */ - volatile unsigned char tk_running : 1,/* Task is running */ - tk_sleeping : 1;/* Task is truly asleep */ + unsigned int tk_runstate; /* Task run status */ #ifdef RPC_DEBUG unsigned short tk_pid; /* debugging aid */ #endif @@ -110,11 +109,26 @@ typedef void (*rpc_action)(struct rpc_task *); #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) -#define RPC_IS_RUNNING(t) ((t)->tk_running) -#define RPC_IS_SLEEPING(t) ((t)->tk_sleeping) #define RPC_IS_ACTIVATED(t) ((t)->tk_active) #define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL) +#define RPC_TASK_SLEEPING 0 +#define RPC_TASK_RUNNING 1 +#define RPC_IS_SLEEPING(t) (test_bit(RPC_TASK_SLEEPING, &(t)->tk_runstate)) +#define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) + +#define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) +#define rpc_clear_running(t) (clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) + +#define rpc_set_sleeping(t) (set_bit(RPC_TASK_SLEEPING, &(t)->tk_runstate)) + +#define rpc_clear_sleeping(t) \ + do { \ + smp_mb__before_clear_bit(); \ + clear_bit(RPC_TASK_SLEEPING, &(t)->tk_runstate); \ + smp_mb__after_clear_bit(); \ + } while(0) + /* * RPC synchronization objects */ diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 450341b74..a733c79f4 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h @@ -1,9 +1,9 @@ /* * SyncLink Multiprotocol Serial Adapter Driver * - * ==FILEDATE 19990810== + * $Id: synclink.h,v 3.2 2000/11/06 22:34:38 paul Exp $ * - * Copyright (C) 1998 by Microgate Corporation + * Copyright (C) 1998-2000 by Microgate Corporation * * Redistribution of this file is permitted under * the terms of the GNU Public License (GPL) @@ -11,6 +11,7 @@ #ifndef _SYNCLINK_H_ #define _SYNCLINK_H_ +#define SYNCLINK_H_VERSION 3.2 #define BOOLEAN int #define TRUE 1 diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index b5155a2b6..07f2c83e9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -24,8 +24,12 @@ #ifndef _LINUX_SYSCTL_H #define _LINUX_SYSCTL_H +#include <linux/kernel.h> +#include <linux/types.h> #include <linux/list.h> +struct file; + #define CTL_MAXNAME 10 struct __sysctl_args { diff --git a/include/linux/time.h b/include/linux/time.h index 87f334547..8d641efd8 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -12,6 +12,8 @@ struct timespec { }; #endif /* _STRUCT_TIMESPEC */ +#ifdef __KERNEL__ + /* * Change timeval to jiffies, trying to avoid the * most obvious overflows.. @@ -80,6 +82,8 @@ mktime (unsigned int year, unsigned int mon, )*60 + sec; /* finally seconds */ } +#endif /* __KERNEL__ */ + struct timeval { time_t tv_sec; /* seconds */ diff --git a/include/linux/usb.h b/include/linux/usb.h index 428866672..2828238ac 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -350,7 +350,11 @@ struct usb_device_id { struct usb_driver { const char *name; - void * (*probe)(struct usb_device *, unsigned int); + void *(*probe)( + struct usb_device *dev, /* the device */ + unsigned intf, /* what interface */ + const struct usb_device_id *id /* from id_table */ + ); void (*disconnect)(struct usb_device *, void *); struct list_head driver_list; @@ -367,11 +371,6 @@ struct usb_driver { * binding policy can be driven from user mode too */ const struct usb_device_id *id_table; - void *(*bind)( - struct usb_device *dev, /* the device */ - unsigned intf, /* what interface */ - const struct usb_device_id *id /* from id_table */ - ); /* suspend before the bus suspends; * disconnect or resume when the bus resumes */ @@ -601,6 +600,9 @@ extern void usb_scan_devices(void); extern void usb_driver_claim_interface(struct usb_driver *driver, struct usb_interface *iface, void* priv); extern int usb_interface_claimed(struct usb_interface *iface); extern void usb_driver_release_interface(struct usb_driver *driver, struct usb_interface *iface); +const struct usb_device_id *usb_match_id(struct usb_device *dev, + struct usb_interface *interface, + const struct usb_device_id *id); extern struct usb_bus *usb_alloc_bus(struct usb_operations *); extern void usb_free_bus(struct usb_bus *); diff --git a/include/linux/wait.h b/include/linux/wait.h index 8629f3241..6b281ccad 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -44,7 +44,8 @@ extern int printk(const char *fmt, ...); #endif struct __wait_queue { - unsigned int compiler_warning; + unsigned int flags; +#define WQ_FLAG_EXCLUSIVE 0x01 struct task_struct * task; struct list_head task_list; #if WAITQUEUE_DEBUG @@ -109,7 +110,7 @@ typedef struct __wait_queue_head wait_queue_head_t; #endif #define __WAITQUEUE_INITIALIZER(name,task) \ - { 0x1234567, task, { NULL, NULL } __WAITQUEUE_DEBUG_INIT(name)} + { 0x0, task, { NULL, NULL } __WAITQUEUE_DEBUG_INIT(name)} #define DECLARE_WAITQUEUE(name,task) \ wait_queue_t name = __WAITQUEUE_INITIALIZER(name,task) @@ -141,6 +142,7 @@ static inline void init_waitqueue_entry(wait_queue_t *q, if (!q || !p) WQ_BUG(); #endif + q->flags = 0; q->task = p; #if WAITQUEUE_DEBUG q->__magic = (long)&q->__magic; diff --git a/include/linux/wrapper.h b/include/linux/wrapper.h index 36dd17fe4..3c62fdbc8 100644 --- a/include/linux/wrapper.h +++ b/include/linux/wrapper.h @@ -1,13 +1,6 @@ #ifndef _WRAPPER_H_ #define _WRAPPER_H_ -#define vma_set_inode(v,i) ((v)->vm_inode = (i)) -#define vma_get_flags(v) ((v)->vm_flags) -#define vma_get_pgoff(v) ((v)->vm_pgoff) -#define vma_get_start(v) ((v)->vm_start) -#define vma_get_end(v) ((v)->vm_end) -#define vma_get_page_prot(v) ((v)->vm_page_prot) - #define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags)) #define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags)) |